Re: Starthanging alignment on grid
Aryeh Zapinsky <[email protected]> Wed, 1 Jul 2026 18:49:49 -0400
| Newsgroups | gmane.comp.tex.context |
|---|---|
| Message-ID | <CAD+MA4u6GncU0RYbUtU7UDux24NCgAVjVKMitC2Ji8qVo2Es8w@mail.gmail.com> |
Thanks for your answer Wolfgang! Where is verticalbox defined? I keep getting the following error: ! Control sequence expected instead of undefined. Additionally where is lh and sd used in the height parameter defined? On Mon, Jun 29, 2026 at 2:03 PM Wolfgang Schuster < [email protected]> wrote: > Am 26.06.2026 um 07:33 schrieb Pablo Rodriguez via ntg-context: > > On 6/26/26 06:11, Aryeh Zapinsky wrote: > >> Thanks! I used \vbox, but yes, that does work. > > > > Sorry, comparing the results of both `\hbox` and `\vbox` to what I had > > in the first initial, the former option seemed the right one to me: I > > thought the placement with \vbox was wrong (although this was the first > > time I used the Hebrew script in my whole life 😅). > > > >> Do you know why the box is necessary? > > > > Since “TeX builds up a page as a nest of boxes within boxes within > > boxes” (“TeX for the Impatient”, p. 17), I guess this is required for > > ConTeXt to know how to snap the actual content to the grid. > > > > But I discovered the existence of `\snaptogrid` yesterday, so Hans, > > Mikael or Wolfgang (among other wizards) can give a more accurate answer > > to this. > > You have to measure the depth of your character and move the graphic > with outline down with the measured (and scaled) value. > > \startuseMPgraphic{letter_w} > picture q; > q := outlinetext(\MPstring{hebrew_letter}) scaled 3 ; > for i within q: > j := j + 1; > draw pathpart i withpen pencircle scaled 2; > endfor; > \stopuseMPgraphic > > \starttexdefinition hangingCharacter #1 > > \setMPtext{hebrew_letter}{#1} > > \dowithnextbox > {\verticalbox > [height=2lh-1sd, > yoffset=-3\nextboxdp, > top=\vss] > {\hbox{\useMPgraphic{letter_w}}}} > \hbox{#1} > > \stoptexdefinition > > Wolfgang > > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : [email protected] / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > ___________________________________________________________________________________ > ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________