[NTG-context] Re: Table and rotation: push together 45 degree rotated cells
Am Donnerstag, 19. September 2024, 09:35:49 MESZ schrieb Hans Hagen via ntg-context: > On 9/19/2024 7:54 AM, Mikael Sundqvist wrote: > > Hi, > > > > On Thu, Sep 19, 2024 at 12:23 AM Gerion Entrup > > wrote: > >> > >> Am Mittwoch, 18. September 2024, 22:53:55 MESZ schrieb Wolfgang Schuster: > >>> Gerion Entrup schrieb am 18.09.2024 um 14:44: > >>>> Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup: > >>>>> Hi, > >>>>> > >>>>> I want to typeset a table where some of the column headings are really > >>>>> long, while in the columns itself consists only of numbers. > >>>>> Therefore, my idea was to rotate the column headings but not 90 degrees > >>>>> (I found some solutions for that) but 45 degree. > >>>>> > >>>>> It then would be beneficial to push together the rotated cells, so the > >>>>> text of one cell actually starts above the previous cell. > >>>>> Do you know, how to achieve that? > >>>>> > >>>>> Here is a minimal example: > >>>>> ``` > >>>>> \startsetups[table:rotated] > >>>>> \setupTABLE[frame=off] > >>>>> \setupTABLE[row][first][bottomframe=on, style=bf, align={center, > >>>>> low}] > >>>>> \setupTABLE[row][2][align=flushright] > >>>>> \stopsetups > >>>>> > >>>>> \starttext > >>>>> \define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]} > >>>>> \bTABLE[setups=table:rotated] > >>>>> \bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD > >>>>> \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European > >>>>> turtle dove} \eTD \eTR > >>>>> \bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} > >>>>> \eTD \bTD \digits{2} \eTD \eTR > >>>>> \eTABLE > >>>>> \stoptext > >>>>> ``` > >>>>> I would like to achieve that the text "Mexican redknee tarantula" is > >>>>> typeset right and above of "Water buffalo" so that the single columns > >>>>> have a width that is similar to the width of the single digit coming in > >>>>> the second row. > >>>> > >>>> To visualize this, I patched the PDF of the above example to the desired > >>>> result. See the attachment. > >>> > >>> You can use Metapost. > >> > >> Thanks for this solution. It, however, seems to fail with any other angle > >> than 315° (I tested 305, 325 and 314). > > > > Try > > > > > > xyscaled(\the\struttotal,abs(sind(\MPvar{rotation}))*\the\widthofstring{\MPvar{text}}); > > > > with sind instead of sin. And maybe with abs around it, but one can > > think of improvements for smaller angles. It all depends on what one > > wants. > > here is an alternative > > \bTABLE[frame=off] >\bTR[align={middle,low}] > \bTH \eTH > \bTH > \dontleavehmode\kern1.5em\llap{\rotate[rotation=315,frame=on]{\strut > Water buffalo}\hss} \eTH > \bTH > \dontleavehmode\kern1.5em\llap{\rotate[rotation=315,frame=on]{\strut > Mexican redknee tarantula}\hss} \eTH > \bTH > \dontleavehmode\kern1.5em\llap{\rotate[rotation=315,frame=on]{\strut > European turtle dove}\hss} \eTH >\eTR >\bTR[frame=on,align=middle] > \bTD Amount of legs \eTD > \bTD[width=3em] 4 \eTD > \bTD[width=3em] 8 \eTD > \bTD[width=3em] 2 \eTD >\eTR > \eTABLE What is the meaning of \hss here? It seems to work just fine without it. Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: Table and rotation: push together 45 degree rotated cells
On 9/19/2024 7:54 AM, Mikael Sundqvist wrote: Hi, On Thu, Sep 19, 2024 at 12:23 AM Gerion Entrup wrote: Am Mittwoch, 18. September 2024, 22:53:55 MESZ schrieb Wolfgang Schuster: Gerion Entrup schrieb am 18.09.2024 um 14:44: Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup: Hi, I want to typeset a table where some of the column headings are really long, while in the columns itself consists only of numbers. Therefore, my idea was to rotate the column headings but not 90 degrees (I found some solutions for that) but 45 degree. It then would be beneficial to push together the rotated cells, so the text of one cell actually starts above the previous cell. Do you know, how to achieve that? Here is a minimal example: ``` \startsetups[table:rotated] \setupTABLE[frame=off] \setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}] \setupTABLE[row][2][align=flushright] \stopsetups \starttext \define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]} \bTABLE[setups=table:rotated] \bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European turtle dove} \eTD \eTR \bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \eTD \bTD \digits{2} \eTD \eTR \eTABLE \stoptext ``` I would like to achieve that the text "Mexican redknee tarantula" is typeset right and above of "Water buffalo" so that the single columns have a width that is similar to the width of the single digit coming in the second row. To visualize this, I patched the PDF of the above example to the desired result. See the attachment. You can use Metapost. Thanks for this solution. It, however, seems to fail with any other angle than 315° (I tested 305, 325 and 314). Try xyscaled(\the\struttotal,abs(sind(\MPvar{rotation}))*\the\widthofstring{\MPvar{text}}); with sind instead of sin. And maybe with abs around it, but one can think of improvements for smaller angles. It all depends on what one wants. here is an alternative \bTABLE[frame=off] \bTR[align={middle,low}] \bTH \eTH \bTH \dontleavehmode\kern1.5em\llap{\rotate[rotation=315,frame=on]{\strut Water buffalo}\hss} \eTH \bTH \dontleavehmode\kern1.5em\llap{\rotate[rotation=315,frame=on]{\strut Mexican redknee tarantula}\hss} \eTH \bTH \dontleavehmode\kern1.5em\llap{\rotate[rotation=315,frame=on]{\strut European turtle dove}\hss} \eTH \eTR \bTR[frame=on,align=middle] \bTD Amount of legs \eTD \bTD[width=3em] 4 \eTD \bTD[width=3em] 8 \eTD \bTD[width=3em] 2 \eTD \eTR \eTABLE and yes, i needed to trial and error a bit, Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: Table and rotation: push together 45 degree rotated cells
Hi, On Thu, Sep 19, 2024 at 12:23 AM Gerion Entrup wrote: > > Am Mittwoch, 18. September 2024, 22:53:55 MESZ schrieb Wolfgang Schuster: > > Gerion Entrup schrieb am 18.09.2024 um 14:44: > > > Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup: > > >> Hi, > > >> > > >> I want to typeset a table where some of the column headings are really > > >> long, while in the columns itself consists only of numbers. > > >> Therefore, my idea was to rotate the column headings but not 90 degrees > > >> (I found some solutions for that) but 45 degree. > > >> > > >> It then would be beneficial to push together the rotated cells, so the > > >> text of one cell actually starts above the previous cell. > > >> Do you know, how to achieve that? > > >> > > >> Here is a minimal example: > > >> ``` > > >> \startsetups[table:rotated] > > >>\setupTABLE[frame=off] > > >>\setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}] > > >>\setupTABLE[row][2][align=flushright] > > >> \stopsetups > > >> > > >> \starttext > > >> \define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]} > > >> \bTABLE[setups=table:rotated] > > >>\bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD > > >> \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European > > >> turtle dove} \eTD \eTR > > >>\bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} > > >> \eTD \bTD \digits{2} \eTD \eTR > > >> \eTABLE > > >> \stoptext > > >> ``` > > >> I would like to achieve that the text "Mexican redknee tarantula" is > > >> typeset right and above of "Water buffalo" so that the single columns > > >> have a width that is similar to the width of the single digit coming in > > >> the second row. > > > > > > To visualize this, I patched the PDF of the above example to the desired > > > result. See the attachment. > > > > You can use Metapost. > > Thanks for this solution. It, however, seems to fail with any other angle > than 315° (I tested 305, 325 and 314). Try xyscaled(\the\struttotal,abs(sind(\MPvar{rotation}))*\the\widthofstring{\MPvar{text}}); with sind instead of sin. And maybe with abs around it, but one can think of improvements for smaller angles. It all depends on what one wants. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: Table and rotation: push together 45 degree rotated cells
Am Mittwoch, 18. September 2024, 22:53:55 MESZ schrieb Wolfgang Schuster: > Gerion Entrup schrieb am 18.09.2024 um 14:44: > > Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup: > >> Hi, > >> > >> I want to typeset a table where some of the column headings are really > >> long, while in the columns itself consists only of numbers. > >> Therefore, my idea was to rotate the column headings but not 90 degrees (I > >> found some solutions for that) but 45 degree. > >> > >> It then would be beneficial to push together the rotated cells, so the > >> text of one cell actually starts above the previous cell. > >> Do you know, how to achieve that? > >> > >> Here is a minimal example: > >> ``` > >> \startsetups[table:rotated] > >>\setupTABLE[frame=off] > >>\setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}] > >>\setupTABLE[row][2][align=flushright] > >> \stopsetups > >> > >> \starttext > >> \define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]} > >> \bTABLE[setups=table:rotated] > >>\bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD > >> \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European > >> turtle dove} \eTD \eTR > >>\bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \eTD > >> \bTD \digits{2} \eTD \eTR > >> \eTABLE > >> \stoptext > >> ``` > >> I would like to achieve that the text "Mexican redknee tarantula" is > >> typeset right and above of "Water buffalo" so that the single columns have > >> a width that is similar to the width of the single digit coming in the > >> second row. > > > > To visualize this, I patched the PDF of the above example to the desired > > result. See the attachment. > > You can use Metapost. Thanks for this solution. It, however, seems to fail with any other angle than 315° (I tested 305, 325 and 314). > \startuseMPgraphic{tableheader}{text,rotation} > >label.lft("\strut\bf\MPvar{text}",origin) > rotated \MPvar{rotation} > shifted (\the\strutht,0); I guess, this one actually draws the text... >setbounds currentpicture to unitsquare > > xyscaled(\the\struttotal,sin(\MPvar{rotation})*\the\widthofstring{\MPvar{text}}); and this one calculates the faked width. Doesn't the sinus here calculate the height of the rotated text? Beside from using Metapost (since I currently do not understand it and would only be able to copy paste your code), is there some kind of box construct which artificially reduces the width of the inner content? I would have expected something like \fakewidth[width=1cm, align=flushright]{\rotate[rotation=-45, location=high]{A really long text, much longer than 1cm}}. If I see it right, such a construct would also solve the problem, while less cleaner due to the fixed width. Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: Table and rotation: push together 45 degree rotated cells
On 9/18/2024 10:53 PM, Wolfgang Schuster wrote: Gerion Entrup schrieb am 18.09.2024 um 14:44: Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup: Hi, I want to typeset a table where some of the column headings are really long, while in the columns itself consists only of numbers. Therefore, my idea was to rotate the column headings but not 90 degrees (I found some solutions for that) but 45 degree. It then would be beneficial to push together the rotated cells, so the text of one cell actually starts above the previous cell. Do you know, how to achieve that? Here is a minimal example: ``` \startsetups[table:rotated] \setupTABLE[frame=off] \setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}] \setupTABLE[row][2][align=flushright] \stopsetups \starttext \define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]} \bTABLE[setups=table:rotated] \bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European turtle dove} \eTD \eTR \bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \eTD \bTD \digits{2} \eTD \eTR \eTABLE \stoptext ``` I would like to achieve that the text "Mexican redknee tarantula" is typeset right and above of "Water buffalo" so that the single columns have a width that is similar to the width of the single digit coming in the second row. To visualize this, I patched the PDF of the above example to the desired result. See the attachment. You can use Metapost. \startuseMPgraphic{tableheader}{text,rotation} label.lft("\strut\bf\MPvar{text}",origin) rotated \MPvar{rotation} shifted (\the\strutht,0); setbounds currentpicture to unitsquare xyscaled(\the\struttotal,sin(\MPvar{rotation})*\the\widthofstring{\MPvar{text}}); \stopuseMPgraphic \starttext \bTABLE[frame=off] \bTR[align={middle,low}] \bTH \eTH \bTH[width=3em] \dontleavehmode\useMPgraphic{tableheader} {text=Water buffalo,rotation=315} \eTH \bTH[width=3em] \dontleavehmode\useMPgraphic{tableheader} {text=Mexican redknee tarantula,rotation=315} \eTH \bTH[width=3em] \dontleavehmode\useMPgraphic{tableheader} {text=European turtle dove,rotation=315} \eTH \eTR \bTR[topframe=on,align=middle] \bTD Amount of legs \eTD \bTD 4 \eTD \bTD 8 \eTD \bTD 2 \eTD \eTR \eTABLE \stoptext Neat. Added to the test suite. - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: Table and rotation: push together 45 degree rotated cells
Gerion Entrup schrieb am 18.09.2024 um 14:44: Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup: Hi, I want to typeset a table where some of the column headings are really long, while in the columns itself consists only of numbers. Therefore, my idea was to rotate the column headings but not 90 degrees (I found some solutions for that) but 45 degree. It then would be beneficial to push together the rotated cells, so the text of one cell actually starts above the previous cell. Do you know, how to achieve that? Here is a minimal example: ``` \startsetups[table:rotated] \setupTABLE[frame=off] \setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}] \setupTABLE[row][2][align=flushright] \stopsetups \starttext \define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]} \bTABLE[setups=table:rotated] \bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European turtle dove} \eTD \eTR \bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \eTD \bTD \digits{2} \eTD \eTR \eTABLE \stoptext ``` I would like to achieve that the text "Mexican redknee tarantula" is typeset right and above of "Water buffalo" so that the single columns have a width that is similar to the width of the single digit coming in the second row. To visualize this, I patched the PDF of the above example to the desired result. See the attachment. You can use Metapost. \startuseMPgraphic{tableheader}{text,rotation} label.lft("\strut\bf\MPvar{text}",origin) rotated \MPvar{rotation} shifted (\the\strutht,0); setbounds currentpicture to unitsquare xyscaled(\the\struttotal,sin(\MPvar{rotation})*\the\widthofstring{\MPvar{text}}); \stopuseMPgraphic \starttext \bTABLE[frame=off] \bTR[align={middle,low}] \bTH \eTH \bTH[width=3em] \dontleavehmode\useMPgraphic{tableheader}{text=Water buffalo,rotation=315} \eTH \bTH[width=3em] \dontleavehmode\useMPgraphic{tableheader}{text=Mexican redknee tarantula,rotation=315} \eTH \bTH[width=3em] \dontleavehmode\useMPgraphic{tableheader}{text=European turtle dove,rotation=315} \eTH \eTR \bTR[topframe=on,align=middle] \bTD Amount of legs \eTD \bTD 4 \eTD \bTD 8 \eTD \bTD 2 \eTD \eTR \eTABLE \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: Table and rotation: push together 45 degree rotated cells
Am Dienstag, 17. September 2024, 20:36:23 MESZ schrieb Gerion Entrup: > Hi, > > I want to typeset a table where some of the column headings are really long, > while in the columns itself consists only of numbers. > Therefore, my idea was to rotate the column headings but not 90 degrees (I > found some solutions for that) but 45 degree. > > It then would be beneficial to push together the rotated cells, so the text > of one cell actually starts above the previous cell. > Do you know, how to achieve that? > > Here is a minimal example: > ``` > \startsetups[table:rotated] > \setupTABLE[frame=off] > \setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}] > \setupTABLE[row][2][align=flushright] > \stopsetups > > \starttext > \define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]} > \bTABLE[setups=table:rotated] > \bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD > \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European > turtle dove} \eTD \eTR > \bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \eTD > \bTD \digits{2} \eTD \eTR > \eTABLE > \stoptext > ``` > I would like to achieve that the text "Mexican redknee tarantula" is typeset > right and above of "Water buffalo" so that the single columns have a width > that is similar to the width of the single digit coming in the second row. To visualize this, I patched the PDF of the above example to the desired result. See the attachment. > Another question in this context: Is is possible to specify a \setupTABLE > command that works for column 2-4 starting from row 2? > Something like \setupTABLE[row][2-][column][2,3,4][background=color, > backgroundcolor=red]. > In this example this would cover all numbers but nothing else. > > Best > Gerion mwe.fixed.pdf Description: Adobe PDF document signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Table and rotation: push together 45 degree rotated cells
Hi, I want to typeset a table where some of the column headings are really long, while in the columns itself consists only of numbers. Therefore, my idea was to rotate the column headings but not 90 degrees (I found some solutions for that) but 45 degree. It then would be beneficial to push together the rotated cells, so the text of one cell actually starts above the previous cell. Do you know, how to achieve that? Here is a minimal example: ``` \startsetups[table:rotated] \setupTABLE[frame=off] \setupTABLE[row][first][bottomframe=on, style=bf, align={center, low}] \setupTABLE[row][2][align=flushright] \stopsetups \starttext \define\tablerotate{\dontleavehmode\rotate[rotation=-45, location=high]} \bTABLE[setups=table:rotated] \bTR \bTD \eTD \bTD \tablerotate{Water buffalo} \eTD \bTD \tablerotate{Mexican redknee tarantula} \eTD \bTD \tablerotate{European turtle dove} \eTD \eTR \bTR \bTD Amount of legs \eTD \bTD \digits{4} \eTD \bTD \digits{8} \eTD \bTD \digits{2} \eTD \eTR \eTABLE \stoptext ``` I would like to achieve that the text "Mexican redknee tarantula" is typeset right and above of "Water buffalo" so that the single columns have a width that is similar to the width of the single digit coming in the second row. Another question in this context: Is is possible to specify a \setupTABLE command that works for column 2-4 starting from row 2? Something like \setupTABLE[row][2-][column][2,3,4][background=color, backgroundcolor=red]. In this example this would cover all numbers but nothing else. Best Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: (ConTeXt LMTX) How do I fix the centering and setting up width in xtables?
Felix schrieb am 01.09.2024 um 20:54: https://pastebin.com/TQdzmxeP I am trying to make a resume in ConTeXt (to see how well my skills have gotten, I am still quite a beginner) and Iw as able to produce what is in Pastebin. Your next lesson is to learn how to create a minimal example which contains only the necessary information needed to show the problem. Though, I am having trouble with the table that goes over the big sized text that would be my name. It has an email, a phone number, and an address but they are all aligned very weirdly. I want them to be centered. Though, the phone number has some sort of problem with alignment, and I don;t know fi the other ones are causing it or are also aligned wrong. I also wanted to make this code: \startxcell[topframe=on,bottomframe=on,align=flushright] Ability to communicate strongly and effectively, being a reliable team member, supporting a team whenever needed, and the desire to help everyone \stopxcell has it so that it doesn't take up so much horizontal space (Ideally it is taking up 1/3 of the width I am allowing for since there are three rows in total) , but when I add width={some value} into the square brackets, it will add a blank line after all the text, and this is not what I want. is there a way to fix what I am experiencing? I would also not mind if I could be told how to improve my code, whether it be by adding startxrowgroup, startxcellgroup, or head and footer sections., or other options. Thank you for reading. Your problem the usage of "option=stretch" to add filler space in the table cells. To calculate the space which is added in each cell context takes the widest text in each column to calculate the current width of the table and when table is narrower then the page it distributes the reaming spaces equally to all rows. This results in a different width for each row but another problem in your case is that context takes the long text in the first row (even though it spans three column) as value to compute the reaming space in the table. The fix for your case is to set a fixed width for all three column which ensures the text in the second column is centered. You can also simplify your setup by moving all settings at the start of the table and the only local change is needed for the merged cells. begin example \starttext % width=.33tw \startxtable[frame=off,topframe=on,bottomframe=on,width=.33tw,align=middle] \startxrow \startxcell[nx=3] contact information \stopxcell \stopxrow \startxrow \startxcell email \stopxcell \startxcell phone \stopxcell \startxcell address \stopxcell \stopxrow \stopxtable % option=stretch \startxtable[frame=off,topframe=on,bottomframe=on,option=stretch,align=middle] \startxrow \startxcell[nx=3] contact information \stopxcell \stopxrow \startxrow \startxcell email \stopxcell \startxcell phone \stopxcell \startxcell address \stopxcell \stopxrow \stopxtable \stoptext end example Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Two column layout with footnotes
Hello list, Is it possible to create a two-column journal layout with ConTeXt in which relatively large footnotes are always in the right column and, if the size of the footnotes exceeds a certain threshold, are distributed between the left and right columns? (comparable as shown in the attachment) As far as I understand it, there are different possibilities for column set (e.g. column set, pagecolumns), but which one would be best, if it is possible at all? Kind regards Michael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: (off-topic) hovering over links in Acrobat Reader
Am Thu, 20 Jun 2024 17:33:56 +0200 schrieb Pablo Rodriguez via ntg-context: > \setuptagging[state=start] is the culprit. "link" is the word displayed > when links are hovered over. well it would imho be better not to use that at all. Sorry but what context is doing here is cheating. It claims to add a structure (and probably manage to pass automated tests) but all StructElem with the exception of links are role mapped to NonStruct and so are non functional. Links miss the OBJR reference. Annotations only all have as /Content a generic text (link) (which creates your hover effect). When I let Adobe+NVDA read a PDF tagged with LaTeX it recognize and announces structures: headinglevel 2 A section text table with 2 rows and 2 columns row 1 column 1 header A column 2 header B row 2 header A column 1 data A header B column 2 data B out of table linkhttps://www.example.com I can navigate from one heading to the next and inside tables (and when I hover a link the pop up is correct as we are setting the right Contents value.) If you do the same with a document tagged with context you only get a large blob of text A section textHeader AHeader B data Adata B https://contextgarden.net and no navigation at all. All the tagging in the file is useless, it even actually harms because it makes user believe they get an accessible PDF. Tagged, accessible PDF has a lot of shortcomings, especially when it comes to complex documents and math, but for standard documents it can do much better then what context is making out of it. -- Ulrike Fischer http://www.troubleshooting-tex.de/ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: https://wiki.contextgarden.net/Command/blank
On Tue, Jun 4, 2024 at 19:30 (+0200), Wolfgang Schuster wrote: > Jim schrieb am 04.06.2024 um 18:01: >> Hi, >> When I run Example 1 given there, I get three bullet symbols, but no >> "column N ..." >> text. >> Note that the >> \starttext >> is *after* the \startitemize ... \stopitemize >> Q1: Is my ConTeXt installation broken, or is the wiki page showing output >> that does not correspond to the input? >> Q2: If the wiki page is inconsistent, is there an easy fix? >> Q3: If my installation is correct, why do I get bullet symbols *before* >> \starttext ? > The wiki adds \starttext at the start and \stoptext at the end of each > example > and the \starttext/\stoptext pair which is part is just ignored. > When you try to run the example as is there is no text before \starttext > because > no font has been loaded yet (you can add \setupbodyfont[modern] before > \startitemize to make the text visible). Hi Wolfgang, Thanks for the (prompt!) answer. I did not realize the wiki software did that. On reflection I suppose that is useful in many (most?) cases. But I'd argue that it is not always a good thing, such as in this case. (If nothing else, it might mislead a n00b into thinking that you should get output for text preceding \starttext.) If you (or some other knowledgeable person reading this) don't (doesn't) mind another question,... Is the bullet symbol not from some font? If so, why is that font loaded in time to see the bullet? And finally, might it make sense for the wiki software to do something like this: if grep '\\starttext' >/dev/null 2>&1 then process the example from the wiki else augment the wiki example with \starttext and \stoptext process the augmented wiki example fi Cheers. Jim ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: https://wiki.contextgarden.net/Command/blank
Jim schrieb am 04.06.2024 um 18:01: Hi, When I run Example 1 given there, I get three bullet symbols, but no "column N ..." text. Note that the \starttext is *after* the \startitemize ... \stopitemize Q1: Is my ConTeXt installation broken, or is the wiki page showing output that does not correspond to the input? Q2: If the wiki page is inconsistent, is there an easy fix? Q3: If my installation is correct, why do I get bullet symbols *before* \starttext ? The wiki adds \starttext at the start and \stoptext at the end of each example and the \starttext/\stoptext pair which is part is just ignored. When you try to run the example as is there is no text before \starttext because no font has been loaded yet (you can add \setupbodyfont[modern] before \startitemize to make the text visible). Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] https://wiki.contextgarden.net/Command/blank
Hi, When I run Example 1 given there, I get three bullet symbols, but no "column N ..." text. Note that the \starttext is *after* the \startitemize ... \stopitemize Q1: Is my ConTeXt installation broken, or is the wiki page showing output that does not correspond to the input? Q2: If the wiki page is inconsistent, is there an easy fix? Q3: If my installation is correct, why do I get bullet symbols *before* \starttext ? Thanks. Jim ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: simplify side by side Poems
seyal.zav...@gmail.com schrieb am 23.05.2024 um 18:59: Thanks so much but what should a person do if he wants to define an equivalent of \eTD? for example it can be useful for RTL language such as: \def\پسل{\eTD} and as you said this code will not work. You can create your own replacement for the \bTD ... \eTD pair define a command which is delimited by another command. To do this you have to first create a new command like always as \def\... which takes a single argument and at the end after the argument you another command is used as delimiter for the argument. The argument of your new delimited command is then passed to the normal commands for the table cell. begin example \starttext \protected\def\StartTableCell#1\StopTableCell {\bTD#1\eTD} % New method to create delimited arguments with #L and #R in Luametatex % % \protected\def\StartTableCell#L\StartTableCell#R\StopTableCell#1% % {\bTD#1\eTD} \bTABLE \bTR \StartTableCell row 1 column 1 \StopTableCell \StartTableCell row 1 column 2 \StopTableCell \eTR \bTR \StartTableCell row 2 column 1 \StopTableCell \StartTableCell row 2 column 2 \StopTableCell \eTR \eTABLE \stoptext %%% end example Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: simplify side by side Poems
seyal.zav...@gmail.com schrieb am 23.05.2024 um 14:13: Hi all, i want to use tables for constructing poems structure this snippet of code works well: \startsetups tablepoem \setupTABLE[column][each][width=5cm] \stopsetups \starttext \bTABLE[setups=tablepoem] \bTR \bTD One one ons ksl \eTD \bTD two gfjgfd oski kwo \eTD \eTR \bTR \bTD One wer s dft tgf \eTD \bTD two gfkdsjg dfs we \eTD \eTR \eTABLE \stoptext but when i use this code for simplifying of changing cells I get an error: \startsetups tablepoem \setupTABLE[column][each][width=5cm] \stopsetups \def\Poemstart{\bTABLE[setups=tablepoem] \bTR \bTD} \def\Mesra{\eTD \bTD} \def\nextBeyt{\eTD\eTR\bTR\bTD} \def\Poemstop{\eTD\eTR\eTABLE} \starttext \Poemstart One one ons ksl\Mesratwo gfjgfd oski kwo \nextBeyt One wer s dft tgf \Mesratwo gfkdsjg dfs we \Poemstop \stoptext what is the problem? The table environment collects the content of the table cell-wise which means when TeX sees a \bTD in the input it reads the following text until it finds the corresponding \eTD. When you put the \eTD in the definition of another command the scanner will never find the end of a cell and you either run out of memory or reach the end of the file etc. Below are a few alternative solutions to simplify the input, one of them is an alternative version of input (\startTABLE) for natural tables which uses the same commands to separate columns as tabulate does. begin example \starttext \startTABLE[width=5cm] \NC One one ons ksl \NC two gfjgfd oski kwo \NC\NR \NC One wer s dft tgf \NC two gfkdsjg dfs we \NC\NR \stopTABLE \starttabulate[|*{2}{k{0}lw(5cm)|}] \NC One one ons ksl \NC two gfjgfd oski kwo \NC\NR \NC One wer s dft tgf \NC two gfkdsjg dfs we \NC\NR \stoptabulate \defineparagraphs[poem][n=2,width=5cm] \setupparagraphs[poem][each][width=5cm,distance=0pt] \startpoem \startlines One one ons ksl One wer s dft tgf \stoplines \nextpoem \startlines two gfjgfd oski kwo two gfkdsjg dfs we \stoplines \stoppoem \stoptext end example Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] simplify side by side Poems
Hi all, i want to use tables for constructing poems structure this snippet of code works well: \startsetups tablepoem \setupTABLE[column][each][width=5cm] \stopsetups \starttext \bTABLE[setups=tablepoem] \bTR \bTD One one ons ksl \eTD \bTD two gfjgfd oski kwo \eTD \eTR \bTR \bTD One wer s dft tgf \eTD \bTD two gfkdsjg dfs we \eTD \eTR \eTABLE \stoptext but when i use this code for simplifying of changing cells I get an error: \startsetups tablepoem \setupTABLE[column][each][width=5cm] \stopsetups \def\Poemstart{\bTABLE[setups=tablepoem] \bTR \bTD} \def\Mesra{\eTD \bTD} \def\nextBeyt{\eTD\eTR\bTR\bTD} \def\Poemstop{\eTD\eTR\eTABLE} \starttext \Poemstart One one ons ksl\Mesratwo gfjgfd oski kwo \nextBeyt One wer s dft tgf \Mesratwo gfkdsjg dfs we \Poemstop \stoptext what is the problem? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] [installation] "unzipping" gives 0K files on windows
hi! greetings of the day. - ### QoL improvements for installation * on win10 22h2 pc, i am facing problems (attached below) in installing context via [`context-win64.zip`]. * so, i had to run the install.bat again and again. * due to which the same step of "fetching 'http://lmtx.pragma-ade.com/install-lmtx//texmf.zip'" and "fetching 'http://lmtx.pragma-ade.com/install-lmtx//texmf-context.zip'" was performed repeatedly * this consumes lots of time, will & internet bandwidth & takes away the focus from other important part of installation So, 1. can `install.bat` (or whatever responsible) pick these zips from current directory if these exist there? of course, it should match their hash from the internet for verifying that these are same zips it needs. 2. rather than blindly removing the zips after (trying to) unzip, the `mtx-install.lua` should confirm if the "unzipping" hasn't resulted in these empty 0B files - as it seems some fundamental issue on windows (description & context attached below) - ### version number i understand that there's [only a 'latest' version, ... no stable release][context_history], * but still where is the version number for this latest shown on web? * i am looking for a plaintext way, i.e. which can be accessed from anywhere without any install. * so, it might be via some "Releases" section on an html webpage, or some file like xml, yml, json, etc containing release versions listing also, please don't use `:` colon or ` ` spaces in version as various package managers use version as directory names. so, my suggested one is: `2025.01.08.T1320` i.e. `.MM.dd.THHmm` i found various places which mentioned versions, but none of those mentioned "latest stable" version: * news on [main_page]: `The Wiki's ConTeXt installation is on version ConTeXt 2024.01.08 11:23 LMTX.` again, it shows the "wiki's context installation". not the release. * installation wiki: [check_installation]: `mtx-context | current version: 2024.04.01 08:59` it is aimed at illustration & outdated. no reason for it to be kept up-to-date. * [pragma-ade] shows: `2024-05-11 12:57 | 118925584` but it seems for the sources i guess? and it uses `-` dashes as date separator rather than dots at other places above. also, what does last column show with '118925584'? - ### details of the problem: * on running `context-win64/install.bat` even as admin & finishing the procedure, the `context --version` is not running. * the `texmf` directory tree matches [`texmf.zip`] (~52MB), but rather than `fonts`, `web2c` being dirs, those appear as files of 0B * similarly the `texmf-context` dir tree matches [`texmf-context.zip`] (~115MB), but again, all the `colors`, `context`, `doc`, `tex`, `web2c` are shown as 0B files rather than being dirs * also the `texmf-win64/bin/` contains a link-file (broken) of 0B with its name in chinese: `畬浡瑥瑡硥攮數` just for records: i have already enabled the developer tools on windows since a long time ago. so, creating filesystem links should work here already. here's exerpt from the `install.bat` run's console output for "unzipping": ``` mtx-install | fetching 'http://lmtx.pragma-ade.com/install-lmtx//texmf.zip' mtx-install | unzipping 'texmf.zip' 70 files of 706 done,6960406 bytes, 0.083 seconds 140 files of 706 done, 10371456 bytes, 0.151 seconds 210 files of 706 done, 14124718 bytes, 0.234 seconds 280 files of 706 done, 19504148 bytes, 0.318 seconds 350 files of 706 done, 24662280 bytes, 0.401 seconds 420 files of 706 done, 33169752 bytes, 0.484 seconds 490 files of 706 done, 40851921 bytes, 0.583 seconds 560 files of 706 done, 47678981 bytes, 0.672 seconds 630 files of 706 done, 68347030 bytes, 0.818 seconds 700 files of 706 done, 85872915 bytes, 0.943 seconds 706 files of 706 done, 86963093 bytes, 0.963 seconds mtx-install | fetching 'http://lmtx.pragma-ade.com/install-lmtx//texmf-context.zip' mtx-install | unzipping 'texmf-context.zip' 533 files of 5333 done, 88905129 bytes, 0.807 seconds 1066 files of 5333 done, 96885926 bytes, 1.333 seconds 1599 files of 5333 done, 116688474 bytes, 1.911 seconds 2132 files of 5333 done, 125260237 bytes, 2.375 seconds 2665 files of 5333 done, 142877653 bytes, 2.890 seconds 3198 files of 5333 done, 152403593 bytes, 3.375 seconds 3731 files of 5333 done, 160173210 bytes, 3.854 seconds 4264 files of 5333 done, 170072731 bytes, 4.333 seconds 4797 files of 5333 done, 176877135 bytes, 4.791 seconds 5330 files of 5333 done, 183560838 bytes, 5.270 seconds 5333 files of 5333 done, 183587012 bytes, 5.270 seconds mtx-install | installing tex/texmf-win64, 5 files mtx-install | skipping tex/texmf-win64/bin/context.exe mtx-install | ne
[NTG-context] Re: How to stop ConTeXt from thinking period is at the end of a sentence?
https://wiki.contextgarden.net/French_spacing Joel via ntg-context hat am 05.05.2024 00:30 CEST geschrieben: I noticed that some code is being rendered wrong, most especially apparent in a column environment where sometimes the text can get stretched a bit more to fit the column width nicer. If a sentence says "They appeared between c. 1200 BCE and c. 1500 CE." it appears ConTeXt thinks that the period in "c." marks the end of a sentence. As such, when setting the text, sometimes it will give a large space between "c." and "1200 BCE". How do I correctly tell ConTeXt that that period doesn't mark the end of a sentence, so shouldn't be given extra space afterwards? --Joel ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 : ntg-context@ntg.nl / 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 ___
[NTG-context] How to stop ConTeXt from thinking period is at the end of a sentence?
I noticed that some code is being rendered wrong, most especially apparent in a column environment where sometimes the text can get stretched a bit more to fit the column width nicer. If a sentence says "They appeared between c. 1200 BCE and c. 1500 CE." it appears ConTeXt thinks that the period in "c." marks the end of a sentence. As such, when setting the text, sometimes it will give a large space between "c." and "1200 BCE". How do I correctly tell ConTeXt that that period doesn't mark the end of a sentence, so shouldn't be given extra space afterwards? --Joel ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: preventing column break after section title
On Thu, Apr 18 2024, Peter Münster wrote: > How could I prevent a column break after the second section title please? Ok, found it: \setupitemize[each][autointro] -- Peter ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] preventing column break after section title
Hi, How could I prevent a column break after the second section title please? Minimal example: \starttext \startcolumns[n=2] \section{title 1} \dorecurse{22}{bla\par} \section{title 2} % Here starts a new column. \startitemize \dorecurse{15}{\item bla} \stopitemize \stopcolumns \stoptext I’ve tried "\setuphead[section][after={\columnbreak[no]}]", but it does not help. TIA for any hints, -- Peter ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: [ using horizontal table lines ]
vm via ntg-context schrieb am 15.04.2024 um 13:15: I'm probably using the \starttable incorrectly: with this code I only get only *one* horizontal line in the header [...] with this code I get two horizontal lines, but the second is too short. [...] with this code I get two horizontal lines, with correct length, but above the wrong columns [...] diff: \NC\DC\DC\DC\DL[4]\DL[4]\AR \NC\DC\DC\DC\DL[4]\DL[3]\AR \NC\DC\DC\DL[4]\DL[4]\AR There is (probably) a correct way to solve this. My suggestion is to switch to either natural table or extreme tables but it seems to me there is a problem with the division lines which always leave an empty column afterwards. The following example should add horizontal lines above the first and third column but this setting results in an error. When I omit the last \DC the error disappears but as can be seen in the output the second line appears above the fourth column. \starttext \starttable[||] %\DL \DC \DL \DC \DC \DR \DL[red] \DC \DL[red] \DC \DR \VL 01 \VL 02 \VL 03 \VL 04 \VL 05 \VL\SR \stoptable \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: Visually balanced columns
Alexey Kryukov schrieb am 27.03.2024 um 14:02: Hi list, I'd like to know if its is possible to get visually balanced mixedcolumns in lmtx. For example, if I have \blank's between paragraphs, I would like them to be stretched or expanded by a such way that the bottommost lines have the same vertical position -- no matter, how many lines there are in each column and how exactly they are aligned. If I understand correctly, that's how the multicols environment in LaTeX works, and that's how old-multicolumns worked -- but this module seems to be no longer supported in lmtx. I tried to disable gridfitting for startcolumns, but it produces a completely distorted output. The pagecolumns environment supports bottom aligned content. \setupwhitespace[medium] \setupalign[depth] \starttext \startpagecolumns \dorecurse{20}{\samplefile{jojomayer}\par} \stoppagecolumns \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Visually balanced columns
Hi list, I'd like to know if its is possible to get visually balanced mixedcolumns in lmtx. For example, if I have \blank's between paragraphs, I would like them to be stretched or expanded by a such way that the bottommost lines have the same vertical position -- no matter, how many lines there are in each column and how exactly they are aligned. If I understand correctly, that's how the multicols environment in LaTeX works, and that's how old-multicolumns worked -- but this module seems to be no longer supported in lmtx. I tried to disable gridfitting for startcolumns, but it produces a completely distorted output. -- Regards, Alexey Kryukov Moscow State University Faculty of History ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] multicolumn title and abstact (bachotex) using tugboat.mkxl
Hello, I am currently writing my paper for last year's BachoTeX proceedings. I am using tugboat.mkxl module to design the layout. In bachotex proceedings, the author's data and abstract are on a single column and the article is usually typeset on two columns. Comments in tugboat.mkxl states: %D We have several column mechanisms and they all serve a different purpose. Here we %D use pagecolumns. They support much of what we can do in single columns, but of %D course there are exceptions. Floats can go into columns of aremoved to the top or %D bottom when there is no room. We don't span mid column. Notes can go in columns %D or at the end. We can start with a single column (for titles and such). I can't figure out which part of the file should be used/adapted to start with a single column. What I did is to put datas and abstract in a frame and use \placefigure. As stated in pagecolumns manual, everything is put on the top of next page. (BTW, there is a typo: «of aremoved») I don't know, whether this MWE helps is relevant, but just in case, here is what I did: * copy tugboat.mkxl to a new file p-bachotex.mkxl * changed p-bachotex.mkxl like this: \startsetups bachotex:naglowek:columns \defineframedtext [Dane] \setupframedtext [Dane] [width=18cm , align=normal, frame=no] \definenarrower [Streszczenia] [2*middle] \startplacefigure [location={here,none}] {\startDane {\tfa\getvariable{tugboat}{author}}\par \getvariable{tugboat}{address}\par {\tt\getvariable{tugboat}{email}}\par \startStreszczenia \doifelsebufferempty {abstract} { % no abstract } { \blank[line] \enforced\let\\\endgraf \setups[tugboat:abstract:setup] \startAbstracts[title={Abstract}] \stopAbstracts } \stopStreszczenia \stopDane} \stopplacefigure \stopsetups \startsetups tugboat:article:start \starttext \setups{tugboat:columns:presets} \setups{tugboat:banner:setup:\getvariable{tugboat}{type}} \setupheadertexts [\setups{tugboat:banner:text:article}] [pagenumber] \setuppagenumber [number=\getvariable{tugboat}{page}] \startmode[columns] \startpagecolumns \stopmode \setups[tugboat:introduction:article] \doifmodeelse{columns}{ \setups{bachotex:naglowek:columns} } { \setups{bachotex:naglowek:nocolumns} } \stopsetups My article begins so: \enablemode [columns] \usemodule [bachotex] % skipped tugboat variables for this MWE \StartAbstract \input tufte \StopAbstract \StartArticle \input knuth \StopArticle Thank you for your help Damien T ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: Japanese
Dear Wolfgang, thank you for your valuable remarks. I integrated them, see corrected attached example. Yes, correct layout examples exist. They're all showing vertical writing, but the rules and principles are exactly the same for horizontal writing. position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30 aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3 protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6 In my previous mail, I wrote wrong amounts of lines. They should be 46 lines on one page, while the actual example doesn't show the 46th line. It would be important to identify the reason why only 24 characters are used to create a line when 25 could be used. Then we can develop a method to turn that mechanism off or circumvent it. Quotation from https://www.w3.org/TR/jlreq: In principle, when composing a line with ideographic (cl-19) (https://www.w3.org/TR/jlreq/#cl-19), hiragana (cl-15) (https://www.w3.org/TR/jlreq/#cl-15) and katakana (cl-16) (https://www.w3.org/TR/jlreq/#cl-16) characters, no extra spacing appears between their character frame (https://www.w3.org/TR/jlreq/#term.character-frame). This is called solid setting (see Figure 5 (https://www.w3.org/TR/jlreq/#fig1_8)). I made manual corrections to scrp-cjk.lua, but with no effect to the ConTeXt output of my example. Do I have to recompile ConTeXt first? Emanuel On März 1 2024, at 2:59 pm, Wolfgang Schuster wrote: > Emanuel Han via ntg-context schrieb am 01.03.2024 um 13:08: > > Dear all, thanks for your contributions. > > > > Sure I'll update the > > https://wiki.contextgarden.net/Chinese_Japanese_and_Korean hopefully > > with the help of Jeong Dal and others as soon as things are sorted out. > > > > In attached example, the opening Brackets (I marked them with > > \color[red]{【} and \color[red]{{}) are taking the previous character > > with them to the next line. Please remove these to see that the > > previous character would stay on the previous line. Thanks Wolfgang > > for checking wether this is a bug. > > Can you stick to fonts which are available for all systems (e.g. Noto > CJK) because system fonts are a pain when you're on a different system. > > The missing line break before 【 is caused by a wrong table entry in > scrp-cjk.lua and I guess the following change is necessary > > local japanese_2 = { > jamo_initial = korean_break, > korean = stretch_break, > chinese = stretch_break, > hiragana = stretch_break, > katakana = stretch_break, > half_width_open = nobreak_stretch_break_autoshrink, > half_width_close = nobreak_stretch, > - full_width_open = nobreak_stretch_break_shrink, > + full_width_open = stretch_break, > full_width_close = nobreak_stretch, > full_width_punct = japanese_before_full_width_punct, -- > nobreak_stretch, > hyphen = nobreak_stretch, > non_starter = nobreak_stretch, > other = stretch_break, > } > > but there can be more wrong entries. > > I was not successful in figuring out how the protrusion mechanism can > > be set in order to keep full stops and commas on the previous line > > (protruding the column box). Could you please give me a hint, > > Wolfgang? Thanks. There's a \color[red]{。} in my example which should > > not jump to the next line. > > Adding the first and last line to your example document worked for me. > \definefontfeature [default] [default] [protrusion=pure] > \definefontfamily [...] [...] [...] > \setupbodyfont [...] > \setupalign [hanging] > > My example follows the Kihon-hanmen dimensioning as described in > > https://www.w3.org/TR/jlreq . What could be the reason that lines > > which could hold 25 characters are having only 24 characters, for > > example lines 2, 3 or 13 in column 1? I would expect them to have 25 > > characters, the same as for example lines 7, 9 or 16 in column 1. > > I guess the par builder is responsible for this when it arranges the > paragraph but this is just a guess. > > > How can I change alignment of the lines so that the highest character > > boxes align with the top border of the layout boxes for text and > > header and with the bottom border of the layout box for footer? I hope > > that when this is achieved for the layout box for text, then this box > > would hold the expected 45 lines, and not 44 lines as it is doing now. > > Ruby characters in the first line should protrude the box, what they > > already do. > > I tried to implement the 1em hskip of the header and footer away from > > the page border. While it works for left aligned headers and footers, > > it doesn't for the right aligned headers and footers (negative hskip > > has no effect). How to solve this problem? &g
[NTG-context] Re: Japanese
Emanuel Han via ntg-context schrieb am 01.03.2024 um 13:08: Dear all, thanks for your contributions. Sure I'll update the https://wiki.contextgarden.net/Chinese_Japanese_and_Korean hopefully with the help of Jeong Dal and others as soon as things are sorted out. In attached example, the opening Brackets (I marked them with \color[red]{【} and \color[red]{{}) are taking the previous character with them to the next line. Please remove these to see that the previous character would stay on the previous line. Thanks Wolfgang for checking wether this is a bug. Can you stick to fonts which are available for all systems (e.g. Noto CJK) because system fonts are a pain when you're on a different system. The missing line break before 【 is caused by a wrong table entry in scrp-cjk.lua and I guess the following change is necessary local japanese_2 = { jamo_initial = korean_break, korean = stretch_break, chinese = stretch_break, hiragana = stretch_break, katakana = stretch_break, half_width_open = nobreak_stretch_break_autoshrink, half_width_close = nobreak_stretch, - full_width_open = nobreak_stretch_break_shrink, + full_width_open = stretch_break, full_width_close = nobreak_stretch, full_width_punct = japanese_before_full_width_punct, -- nobreak_stretch, hyphen = nobreak_stretch, non_starter = nobreak_stretch, other = stretch_break, } but there can be more wrong entries. I was not successful in figuring out how the protrusion mechanism can be set in order to keep full stops and commas on the previous line (protruding the column box). Could you please give me a hint, Wolfgang? Thanks. There's a \color[red]{。} in my example which should not jump to the next line. Adding the first and last line to your example document worked for me. \definefontfeature [default] [default] [protrusion=pure] \definefontfamily [...] [...] [...] \setupbodyfont [...] \setupalign [hanging] My example follows the Kihon-hanmen dimensioning as described in https://www.w3.org/TR/jlreq . What could be the reason that lines which could hold 25 characters are having only 24 characters, for example lines 2, 3 or 13 in column 1? I would expect them to have 25 characters, the same as for example lines 7, 9 or 16 in column 1. I guess the par builder is responsible for this when it arranges the paragraph but this is just a guess. How can I change alignment of the lines so that the highest character boxes align with the top border of the layout boxes for text and header and with the bottom border of the layout box for footer? I hope that when this is achieved for the layout box for text, then this box would hold the expected 45 lines, and not 44 lines as it is doing now. Ruby characters in the first line should protrude the box, what they already do. I tried to implement the 1em hskip of the header and footer away from the page border. While it works for left aligned headers and footers, it doesn't for the right aligned headers and footers (negative hskip has no effect). How to solve this problem? Do you a proper example of the layout? Setting a few values is not enough because TeX doesn't work the way you need for your layout. Things can be improved but in cases like header and footer you have to tell ConTeXt there are no characters with depth. Also how to get rid of the first empty page? To load a math font from a typescript you have to use the \definetypeface command, replace the line \definefontfamily [JapaneseFont] [mm] [math] [lucidaot] [default] with \definetypeface [JapaneseFont] [mm] [math] [lucidaot] [default] and the page disappears. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: Japanese
Dear all, thanks for your contributions. Sure I'll update the https://wiki.contextgarden.net/Chinese_Japanese_and_Korean hopefully with the help of Jeong Dal and others as soon as things are sorted out. In attached example, the opening Brackets (I marked them with \color[red]{【} and \color[red]{{}) are taking the previous character with them to the next line. Please remove these to see that the previous character would stay on the previous line. Thanks Wolfgang for checking wether this is a bug. I was not successful in figuring out how the protrusion mechanism can be set in order to keep full stops and commas on the previous line (protruding the column box). Could you please give me a hint, Wolfgang? Thanks. There's a \color[red]{。} in my example which should not jump to the next line. My example follows the Kihon-hanmen dimensioning as described in https://www.w3.org/TR/jlreq . What could be the reason that lines which could hold 25 characters are having only 24 characters, for example lines 2, 3 or 13 in column 1? I would expect them to have 25 characters, the same as for example lines 7, 9 or 16 in column 1. How can I change alignment of the lines so that the highest character boxes align with the top border of the layout boxes for text and header and with the bottom border of the layout box for footer? I hope that when this is achieved for the layout box for text, then this box would hold the expected 45 lines, and not 44 lines as it is doing now. Ruby characters in the first line should protrude the box, what they already do. I tried to implement the 1em hskip of the header and footer away from the page border. While it works for left aligned headers and footers, it doesn't for the right aligned headers and footers (negative hskip has no effect). How to solve this problem? Also how to get rid of the first empty page? I'm happy to get suggestions for improving my example code. This example could then be put to the wiki. I try to continue to work on making ConTeXt usable for Japanese with the help of you all. Next step might be the realm and position of headings which seem complicated and for which I have no ideas. Best regards Emanuel On März 1 2024, at 8:04 am, luigi scarso wrote: > > > On Wed, 28 Feb 2024 at 20:53, Emanuel Han via ntg-context (mailto:ntg-context@ntg.nl)> wrote: > > Thank you all for your suggestions and contributions to the wiki. > > > > I don't intend to nag, but when looking at what ConTeXt is producing, I > > need to state that the result is still far away from a properly typeset > > Japanese text. > > So the nihongo script which comes with ConTeXt handles line breaks / line > > wrapping. But the line break rules defined in it need a rework, because > > they don't follow the standards. The standards are documented here: > > https://www.w3.org/TR/jlreq/#possibilities_for_linebreaking_between_characters > > , and all affected characters are listed here: > > https://www.w3.org/TR/jlreq/tables/table_en3.pdf > > We have different rules, depending what kind of character is surpassing the > > text width (or is in its last position). > > Rule 1: > > Before closing brackets, closing quotation marks, iteration marks, the > > Prolonged sound mark and small Kana, line breaking is prohibited. > > ’”)〕]}〉》」』】ヽヾゝゞ々ーぁぃぅぇぉァィゥェォっゃゅょッャュョ etc. > > The actual programmed behaviour by the nihongo script is that, if in the > > position which exceeds the line width, these characters jump to the next > > line and take the previous character with them. If they're in the last > > position of the line, they stay where they are. This behaviour is correct. > > Rule 2: > > After opening Brackets and opening quotation marks, line breaking is > > prohibited (but not before). > > ‘“(〔[{〈《「『【 > > The actual programmed behaviour by the nihongo script is that these > > characters jump to the next line and take the previous character with them. > > This behaviour is wrong. They should jump to the next line without taking > > the previous character with them, just like any regular character. The > > difference to a regular character is that they jump already when still > > within the line length, and they're in the last position of the line. The > > correct behaviour can be seen in LibreOffice Writer in action. > > Rule 3: > > Comma (tōten), full width comma, full stop > > 、,。 > > The actual programmed behaviour by the nihongo script is that, if in the > > position which exceeds the line width, these characters jump to the next > > line and take the previous character with them. This behaviour is wrong. > > They have to be put back to the end of the previous line, but beyond the > > s
[NTG-context] Re: MetaPost lines in tables?
Am 22.02.24 um 18:35 schrieb Hans Hagen via ntg-context: On 2/21/2024 7:47 PM, Henning Hraban Ramm wrote: (I’m sure I already used that somewhere… Must document…) ok, new feature dedicated to Hraban ... who then of course has to document it. This is nice. Thank you, will do. (Actually I’m not much interested in dashed borders but to have lines affected by my sketchy style - courtesy of Aditya et al., see below) Taco, will the syntax pages in the wiki update automatically to a newer version? """ \startuseMPgraphic{mp:sketchy} input mp-sketch.mp; sketchypaths; sketch_amount := 1 + (uniformdeviate 2); sketch_passes := 3; sketch_segments := 2 + (uniformdeviate 3); sketch_length := OverlayWidth / 3; draw topboundary withpen pensquare withcolor lightgray; naturalizepaths; \stopuseMPgraphic \defineoverlay[sketchylines][\useMPgraphic{mp:sketchy}] \setupTABLE[r][first][style=bold] \setupTABLE[r][each][ topoffset=1em,bottomoffset=0.5em, background=sketchylines, % would be nice if the background wouldn’t start at each column ] \setupTABLE[c][each][frame=off] \bTABLE[] \bTR \bTD{Stadt}\eTD \bTD{Land}\eTD \bTD{Fluss}\eTD \eTR \dorecurse{10}{ \bTR \bTD\strut \eTD\bTD \eTD\bTD \eTD \eTR } \eTABLE """ Hraban%D \module %D [ file=mp-sketch.mp %Dversion=2021.05.13 %D title=\CONTEXT\ \METAPOST\ graphics, %D subtitle=Sketch drawing, %D author=Aditya Mahajan, %D date=\currentdate, %D copyright={Aditya Mahajan}] %D This metapost module is inspired by a TeX.SE question: %D http://tex.stackexchange.com/q/39296/323 %D %D I thought that it would be fun to implement a similar feature in MetaPost. %D %D To use this package in MetaPost: %D %D \starttyping %Dinput mp-sketch; %D %Dbeginfig(1) %D sketchypaths; % Make draw and fill sketchy %D ... %D naturalizepaths; % Restore the value of draw and fill %D ... %Dendfig %D \stoptyping %D %D The code is heavily inspired by Hans Hagen's Metafun macros. %D %D The macro \type{sketchypaths} is modeled after \type{visualizepaths} from %D \filename{mp-tool}. def sketchypaths = let draw = sketchdraw ; let fill = sketchfill ; enddef ; %D Check if \filename{mp-tool} is loaded if not known context_tool : let normaldraw = draw; let normalfill = fill; def naturalizepaths = let fill = normalfill ; let draw = normaldraw ; enddef ; fi %D The variable \type{sketch_amount} determines the amount of randomness in the %D drawing numeric sketch_amount; sketch_amount := 0.75bp; %D The variable \type{sketch_passes} determines the number of times the path %D is drawn numeric sketch_passes; sketch_passes := 1; %D Based on \type{randomized}. Assumes p is path: numeric sketch_segments; sketch_segments := 20; %D Length (time) of line segments: numeric sketch_length; sketch_length := 5mm; primarydef p sketchrandomized s = ( if path p : for t = 0 step 1/sketch_segments until 1-1/sketch_segments : ((point (t*arclength(p)) on p) randomshifted s) .. controls ((postcontrol (t*arclength(p)) on p) randomshifted s) and ((precontrol ((t+1/sketch_segments)*arclength(p)) on p) randomshifted s) .. endfor % TODO: beide Ansätze kombinieren. Eckpunkte erhalten! %for t = 0 step sketch_length until arclength p: % (point (arctime t of p) of p) randomshifted s .. %endfor if cycle p : % funktioniert nicht cycle else : ((point (arclength(p)) on p) randomshifted s) %(point (arctime t of p) of p) randomshifted s fi else : p fi ) enddef ; %D The macro \type{sketchdraw} draws the randomized path. The %D \type{expr} ... \type{text} trick is copied from the definition of %D \type{drawarrow} def sketchdraw expr p = do_sketchdraw(p) enddef; def do_sketchdraw(expr p) text t = if (path p) : for i = 1 upto max(1,sketch_passes) : normaldraw p sketchrandomized sketch_amount withtransparency ("multiply", 1/max(1,sketch_passes)) t ; endfor; else : normaldraw p t; fi enddef; %D The macro \type{sketchfill} randomizes the path before filling it. def sketchfill expr p = do_sketchfill(p) enddef ; def do_sketchfill(expr p) text t = if (path p) : for i = 1 upto max(1,sketch_passes) : normalfill p sketchrandomized sketch_amount withtransparency ("multiply", 1/max(1,sketch_passes)) t ; endfor; else : normalfill p t; fi enddef; picture NoisePattern; NoisePattern := image( pickup pencircle xyscaled 0.5bp; numeric pmax ; pmax := 7 ; numeric x ; numeric y ; for i = 1 upto pmax: for j = 1 upto pmax:
[NTG-context] Re: \startcolumns and \startcolumnset
Dear Otared, Thank you for testing. I run the sample after changing the column command to ‘\startsimplecolumns … \stopsimplecolumns’. I got the same result as your output. And it is same as the result using \startcolumns … \stopcolumns. If ‘\vfill’ works, then it is OK for me, but it isn’t. It works under the command “\startcolumnset … \stopcolumnset”. But there are another problem under the ‘columnist’ command. I’ll read the manual of columnset carefully. Best regards, Dalyoung > 2024. 2. 9. 오후 1:37, Otared Kavian 작성: > > Dear Dalyoung, > > Have you tried > \startsimplecolumns > > \stopsimplecolumns > instead of the columnset mechanism? > > In your example I put the above commands and I got the attached PDF: is this > what you want to obtain? > > Best regards: Otared > > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: \startcolumns and \startcolumnset
Dear Dalyoung,Have you tried \startsimplecolumns\stopsimplecolumns instead of the columnset mechanism?In your example I put the above commands and I got the attached PDF: is this what you want to obtain?Best regards: Otared columns-figures.pdf Description: Adobe PDF document On 9 Feb 2024, at 02:22, Jeong Dal via ntg-context <ntg-context@ntg.nl> wrote:Dear all,I have a little problem to use “columns” in the following example.If I use “\startcolumnset”, then I have the following problems: 1. The figures is aligned left even though I use \startplacefigure[]. 2. In the second column, the first item located at the end of the page.However, \vfill works, so I managed the items evenly spaced vertically.If I use “\startcolumns”, then I have the following problems: 1. \vfill doesn’t works, but \blank[] works. So, it isn’t easy to locate the items evenly spaced vertically.Here are sample code and its outputs of two cases for comparison.Any suggestions are welcomed.Tomorrow is the New Years day in Lunar calendar.Happy new year, again.Best regards,Dalyoung%%%\startuseMPgraphic{mark}path p;p := unitsquare scaled 3cm;draw p;draw (point 0 of p)--(point 2 of p);draw (point 1 of p)--(point 3 of p);\stopuseMPgraphic\startuseMPgraphic{verticalrule3} draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: shifted(-2mm,0) fi ; draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: shifted(2mm,0) fi ; draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm; draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;\stopuseMPgraphic\defineoverlay [verticalrule] [\useMPgraphic{verticalrule3}]\setuppagenumbering[state=stop]\setupexternalfigures[location={local,defalut}]\definecolumnset [quiz] [n=2,background=verticalrule]\setupbodyfont[bonum, rm, 11pt]\starttext %\startcolumns[n=2,background="">\startcolumnset[quiz]\startitemize[n] \item Solve the following linear equations. \startitemize[r]\item equation%\blank[3.5cm]\vfill\item equation%\blank[3.5cm]\vfill\item equation\blank[3.5cm]\item equation\blank[3.5cm]\item equation\blank[3.5cm] \stopitemize \hrule\column \item Draw the graph of the following linear function.\startitemize[r]\item $2x +3y = 6$\startplacefigure[location={here,none},]\useMPgraphic{mark}\stopplacefigure \item $y = 2x - 1$ \startplacefigure[location={here,none}]\useMPgraphic{mark}\stopplacefigure\stopitemize \item Find the formula of the line 1: \vfill \item Find the formula of the line 2: \vfill\stopitemize\stopcolumnset\stoptext%%___If your question is of interest to others as well, please add an entry to the Wiki!maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nlwebpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)archive : https://github.com/contextgarden/contextwiki : https://wiki.contextgarden.net___ Otared Kaviane-mail: ota...@gmail.comPhone: +33 6 88 26 70 95 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] \startcolumns and \startcolumnset
Dear all,I have a little problem to use “columns” in the following example.If I use “\startcolumnset”, then I have the following problems: 1. The figures is aligned left even though I use \startplacefigure[]. 2. In the second column, the first item located at the end of the page.However, \vfill works, so I managed the items evenly spaced vertically.If I use “\startcolumns”, then I have the following problems: 1. \vfill doesn’t works, but \blank[] works. So, it isn’t easy to locate the items evenly spaced vertically.Here are sample code and its outputs of two cases for comparison.Any suggestions are welcomed.Tomorrow is the New Years day in Lunar calendar.Happy new year, again.Best regards,Dalyoung%%%\startuseMPgraphic{mark}path p;p := unitsquare scaled 3cm;draw p;draw (point 0 of p)--(point 2 of p);draw (point 1 of p)--(point 3 of p);\stopuseMPgraphic\startuseMPgraphic{verticalrule3} draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: shifted(-2mm,0) fi ; draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: shifted(2mm,0) fi ; draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm; draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;\stopuseMPgraphic\defineoverlay [verticalrule] [\useMPgraphic{verticalrule3}]\setuppagenumbering[state=stop]\setupexternalfigures[location={local,defalut}]\definecolumnset [quiz] [n=2,background=verticalrule]\setupbodyfont[bonum, rm, 11pt]\starttext %\startcolumns[n=2,background="">\startcolumnset[quiz]\startitemize[n] \item Solve the following linear equations. \startitemize[r]\item equation%\blank[3.5cm]\vfill\item equation%\blank[3.5cm]\vfill\item equation\blank[3.5cm]\item equation\blank[3.5cm]\item equation\blank[3.5cm] \stopitemize \hrule\column \item Draw the graph of the following linear function.\startitemize[r]\item $2x +3y = 6$\startplacefigure[location={here,none},]\useMPgraphic{mark}\stopplacefigure \item $y = 2x - 1$ \startplacefigure[location={here,none}]\useMPgraphic{mark}\stopplacefigure\stopitemize \item Find the formula of the line 1: \vfill \item Find the formula of the line 2: \vfill\stopitemize\stopcolumnset\stoptext%% testColumns.pdf Description: Adobe PDF document testColumnset.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: How to stop
> On 27 Jan 2024, at 21:29, Joel via ntg-context wrote: > > I have a document that uses ~40 different TABLE configurations, each with > their own special requirements, such as these below, and in total, perhaps > 2000 tables appear in a file, using one of the configurations. > > \setupTABLE[r][1][align=raggedleft] > \setupTABLE[c][1][width=.1\textwidth] > \setupTABLE[c][2][width=.33\textwidth] > \setupTABLE[c][3][width=.37\textwidth] > \setupTABLE[c][4][width=.1\textwidth] > \setupTABLE[c][5][width=.1\textwidth] > \setupTABLE[c][1,2,3,4,5][align=raggedleft, > frame=off] > > %\setupTABLE[r][2,3,4,5,6,8,9,11,12,14][bottomframe=off] > \setupTABLE[r][1][bottomframe=on] > \bTABLE[split=yes] > \bTR\bTD {\it Lesson}\eTD\bTD {\it > Time} \\eTD\bTD {\it Date} \eTD\bTD {\it Page} \eTD\eTR > \eTABLE > > What I've been finding is that previous settings on TABLES appearing earlier > in the document is impacting later tables. For instance, if one has a frame > to the right of column 1, then the next table seems to acquire this setting > as well, even if it isn't expected to have any frames at all. > > Note that each unique table is defined inside a macro. > > How can I make these table settings only apply to the a specific table? Use setups, one for each of your 40 variations: e.g: \startsetup formatA \setupTABLE[r][1][align=raggedleft] \setupTABLE[c][1][width=.1\textwidth] \stopsetup \startsetup formatB \setupTABLE[c][1,2,3,4,5][align=raggedleft, frame=off] \stopsetup \bTABLE[setups=formatA] ... \eTABLE \bTABLE[setups=formatB] ... \eTABLE — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: How to stop
Just use a group (\start ... \stop, \bgroup ... \egroup or {} ) around the setup commands and their table, or use \startsetup mytable ... \stopsetup and \startTABLE[setups=mytable] if you need the same settings for several tables. HR Am 27.01.24 um 22:29 schrieb Joel via ntg-context: I have a document that uses ~40 different TABLE configurations, each with their own special requirements, such as these below, and in total, perhaps 2000 tables appear in a file, using one of the configurations. \setupTABLE[r][1][align=raggedleft] \setupTABLE[c][1][width=.1\textwidth] \setupTABLE[c][2][width=.33\textwidth] \setupTABLE[c][3][width=.37\textwidth] \setupTABLE[c][4][width=.1\textwidth] \setupTABLE[c][5][width=.1\textwidth] \setupTABLE[c][1,2,3,4,5][align=raggedleft, frame=off] %\setupTABLE[r][2,3,4,5,6,8,9,11,12,14][bottomframe=off] \setupTABLE[r][1][bottomframe=on] \bTABLE[split=yes] \bTR\bTD {\it Lesson} \eTD\bTD {\it Time} \\eTD\bTD {\it Date} \eTD\bTD {\it Page} \eTD\eTR \eTABLE What I've been finding is that previous settings on TABLES appearing earlier in the document is impacting later tables. For instance, if one has a frame to the right of column 1, then the next table seems to acquire this setting as well, even if it isn't expected to have any frames at all. Note that each unique table is defined inside a macro. How can I make these table settings only apply to the a specific table? --Joel ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :ntg-context@ntg.nl /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 : ntg-context@ntg.nl / 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 ___
[NTG-context] How to stop
I have a document that uses ~40 different TABLE configurations, each with their own special requirements, such as these below, and in total, perhaps 2000 tables appear in a file, using one of the configurations. \setupTABLE[r][1][align=raggedleft] \setupTABLE[c][1][width=.1\textwidth] \setupTABLE[c][2][width=.33\textwidth] \setupTABLE[c][3][width=.37\textwidth] \setupTABLE[c][4][width=.1\textwidth] \setupTABLE[c][5][width=.1\textwidth] \setupTABLE[c][1,2,3,4,5][align=raggedleft, frame=off] %\setupTABLE[r][2,3,4,5,6,8,9,11,12,14][bottomframe=off] \setupTABLE[r][1][bottomframe=on] \bTABLE[split=yes] \bTR\bTD {\it Lesson} \eTD\bTD {\it Time} \\eTD\bTD {\it Date} \eTD\bTD {\it Page} \eTD\eTR \eTABLE What I've been finding is that previous settings on TABLES appearing earlier in the document is impacting later tables. For instance, if one has a frame to the right of column 1, then the next table seems to acquire this setting as well, even if it isn't expected to have any frames at all. Note that each unique table is defined inside a macro. How can I make these table settings only apply to the a specific table? --Joel ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: \starttable questions
On Fri, Jan 26, 2024 at 09:55 (+0100), Aditya Mahajan wrote: > On Thu, 25 Jan 2024, Jim wrote: >> The nice thing about your setup above is that it is nice and structured. >> But if a table calls for some row, column or cell to be treated >> differently, I guess I am in for some more reading. > You can do: \setupTABLE[2][3] to select the formatting for row 3 and column 2 > (or the other way around ... always forget). In the worst case, you can > always do > ... > \NC .. \NC[options] ... \NC \NR > > Each cell is just a \framed[...]; so all options for \framed[...] work for > Natural Tables. Aditya thanks very much for that information. I still appreciate the conciseness of the TaBlE macros (and thus \starttable ... \endtable), but I also appreciate the power of the TABLE macros. Jim ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: \starttable questions
On Thu, 25 Jan 2024, Jim wrote: > The nice thing about your setup above is that it is nice and structured. > But if a table calls for some row, column or cell to be treated > differently, I guess I am in for some more reading. You can do: \setupTABLE[2][3] to select the formatting for row 3 and column 2 (or the other way around ... always forget). In the worst case, you can always do ... \NC .. \NC[options] ... \NC \NR Each cell is just a \framed[...]; so all options for \framed[...] work for Natural Tables. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: \starttable questions
On Thu, Jan 25, 2024 at 22:22 (+0100), Wolfgang Schuster wrote: > Jim schrieb am 25.01.2024 um 22:01: >> Hi Henning, >> On Thu, Jan 25, 2024 at 17:16 (+0100), Henning Hraban Ramm wrote: >>> Am 25.01.24 um 16:12 schrieb Jim: >>> > Hi, I was wondering if anyone here could help me with these three things: >>> > For a long time I have been using Wichura's TaBle macros (i.e., what one >>> > gets with >>> > \input table >>> > in plain TeX) and would like to use what appears to be ConTeXt's version >>> > of >>> > those (i.e., what one gets with \starttable ... \stoptable). >>> > However, https://wiki.contextgarden.net/Command/starttable says >>> > The environment \starttable ... \stoptable is and (sic) old and >>> > nearly obsolete way to handle tabular material >>> > Q1: are there plans to remove \starttable ... \endtable from ConTeXt any >>> > time "soon", or is that wiki comment gratuitously pessimistic? >>> Hans suggests to use tabulate as long as it fits. >> I just gave that a try, using the same syntax as \starttable: >> \starttable[|c|c|] >> \HL >> \VL \bf Year \VL \bf Citizens \VL\SR >> \HL >> \VL 1675 \VL ˜428 \VL\FR >> \VL 1795 \VL 1124 \VL\MR >> \VL 1880 \VL 2405 \VL\MR >> \VL 1995 \VL 7408 \VL\LR >> \HL >> \stoptable >> \starttabulate[|c|c|] >> \HL >> \VL \bf Year \VL \bf Citizens \VL\SR >> \HL >> \VL 1675 \VL ˜428 \VL\FR >> \VL 1795 \VL 1124 \VL\MR >> \VL 1880 \VL 2405 \VL\MR >> \VL 1995 \VL 7408 \VL\LR >> \HL >> \stoptabulate >> While tabulate produced a table with the above input, it needs some work to >> make the table look good. (The columns are too narrow, the vrules don't >> meet the hrules, ...). >> Perhaps these can be fixed with some tweaking, but I notice that in all of >> https://wiki.contextgarden.net/Command/starttabulate >> and >> https://wiki.contextgarden.net/Tabulate >> and >> http://www.ntg.nl/maps/22/28.pdf >> there is a conspicuous lack of examples with vrules. And the tables in the >> (at least) the starttabulate wiki page which use vrules don't use tabulate >> to create the tables. >> Coincidence? I think not. :-) > Table which rely on rules to make the content readable have a serious > problem > (read Edward Tufte books how you can improve the visual style) but the > better > alternative in this case are either natural tables or extreme tables. > Below is a example which uses the table like wrapper for natural tables > which makes adding rules and changing the padding around text very > simple because each table cell is a \framed block with all its options. > \starttext > \startsetups[ruledtable] > \setupTABLE [frame=off,align=middle,loffset=.5em,roffset=.5em] > \setupTABLE [column] [each] [leftframe=on,rightframe=on] > \setupTABLE [row] [first] > [topframe=on,bottomframe=on,foregroundstyle=bold] > \setupTABLE [row] [last] [bottomframe=on] > \stopsetups > \startTABLE[setups=ruledtable] > \NC Year \NC Citizens \NC\NR > \NC 1675 \NC ˜428 \NC\NR > \NC 1795 \NC 1124 \NC\NR > \NC 1880 \NC 2405 \NC\NR > \NC 1995 \NC 7408 \NC\NR > \stopTABLE > \stoptext Wolfgang, thanks for the response and the sample code. [ Note to anyone else trying out this example: there are non-breakable spaces above, and depending on your system if you copy and paste them into a file, they will cause this code to fail. ] I won't argue with you about readability of tables, but if I am typesetting something for someone and they want it a certain way, I don't want to get into an argument about it with them either. :-) The nice thing about your setup above is that it is nice and structured. But if a table calls for some row, column or cell to be treated differently, I guess I am in for some more reading. Cheers. Jim ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: \starttable questions
Jim schrieb am 25.01.2024 um 22:01: Hi Henning, On Thu, Jan 25, 2024 at 17:16 (+0100), Henning Hraban Ramm wrote: Am 25.01.24 um 16:12 schrieb Jim: Hi, I was wondering if anyone here could help me with these three things: For a long time I have been using Wichura's TaBle macros (i.e., what one gets with \input table in plain TeX) and would like to use what appears to be ConTeXt's version of those (i.e., what one gets with \starttable ... \stoptable). However, https://wiki.contextgarden.net/Command/starttable says The environment \starttable ... \stoptable is and (sic) old and nearly obsolete way to handle tabular material Q1: are there plans to remove \starttable ... \endtable from ConTeXt any time "soon", or is that wiki comment gratuitously pessimistic? Hans suggests to use tabulate as long as it fits. I just gave that a try, using the same syntax as \starttable: \starttable[|c|c|] \HL \VL \bf Year \VL \bf Citizens \VL\SR \HL \VL 1675 \VL ˜428 \VL\FR \VL 1795 \VL 1124 \VL\MR \VL 1880 \VL 2405 \VL\MR \VL 1995 \VL 7408 \VL\LR \HL \stoptable \starttabulate[|c|c|] \HL \VL \bf Year \VL \bf Citizens \VL\SR \HL \VL 1675 \VL ˜428 \VL\FR \VL 1795 \VL 1124 \VL\MR \VL 1880 \VL 2405 \VL\MR \VL 1995 \VL 7408 \VL\LR \HL \stoptabulate While tabulate produced a table with the above input, it needs some work to make the table look good. (The columns are too narrow, the vrules don't meet the hrules, ...). Perhaps these can be fixed with some tweaking, but I notice that in all of https://wiki.contextgarden.net/Command/starttabulate and https://wiki.contextgarden.net/Tabulate and http://www.ntg.nl/maps/22/28.pdf there is a conspicuous lack of examples with vrules. And the tables in the (at least) the starttabulate wiki page which use vrules don't use tabulate to create the tables. Coincidence? I think not. :-) Table which rely on rules to make the content readable have a serious problem (read Edward Tufte books how you can improve the visual style) but the better alternative in this case are either natural tables or extreme tables. Below is a example which uses the table like wrapper for natural tables which makes adding rules and changing the padding around text very simple because each table cell is a \framed block with all its options. \starttext \startsetups[ruledtable] \setupTABLE [frame=off,align=middle,loffset=.5em,roffset=.5em] \setupTABLE [column] [each] [leftframe=on,rightframe=on] \setupTABLE [row] [first] [topframe=on,bottomframe=on,foregroundstyle=bold] \setupTABLE [row] [last] [bottomframe=on] \stopsetups \startTABLE[setups=ruledtable] \NC Year \NC Citizens \NC\NR \NC 1675 \NC ˜428 \NC\NR \NC 1795 \NC 1124 \NC\NR \NC 1880 \NC 2405 \NC\NR \NC 1995 \NC 7408 \NC\NR \stopTABLE \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: Setuphead issue!
Am 09.01.24 um 14:43 schrieb G.C.H.M. Verhaag via ntg-context: Hi, The example below works as expected, but within my product it doesn't. % Subject example before and after! \setuphead[subject][color=limegreen,before={\blank[none]},after={\blank[none]},align={flushleft,nothyphenated,tolerant}] \starttext A paragraph before calling the subject. \subject{\sc The subject} A paragrapf after the subject was called. \stoptext I use the \subject command within a columnset, could that be the problem? Yes, because text in column(sets)s is typeset on a grid. Try \showgrid to visualize. You can try to reduce the interlinespace for your headline font size like \setupbodyfontenvironment[16pt][interlinespace=12pt] That will get ugly as soon as your headlines need more than one line. Look into details.pdf for more information on working with grids. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: mathalignment; alignment of columns
No, it seems to have been my mistake. I must apologize. I have tested the syntax with the preceding column numbers again, and lo and behold: it works. Unfortunately, I can no longer understand what went wrong with my first test of the new syntax. In any case, thank you very much for your support. You have helped me a lot. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: mathalignment; alignment of columns
Hi, try \startmathalignment[n=2,align={1:left,2:right}] I think this was changed two or three years ago. /Mikael On Fri, Nov 24, 2023 at 11:04 PM wolfgangbackes--- via ntg-context wrote: > > Something as elementary as "mathenvironment" can't really be faulty, can it? > According to my recent tests, a mathalignment environment does not seem to > react (any more) to the values of the "align" option. > The source code hab been rendered correctly a few years ago, > > Minimal example 1: > > \starttext > \startformula > \startmathalignment[n=2,align={left, right}] > \NC always aligned to the right \NC = u + at, \NR > \NC d \NC = ut + \frac12 at^2. \NR > \stopmathalignment > \stopformula > \stoptext > > Despite "align={left, right}", the first column is aligned to the right and > the second to the left. This does not change, no matter which values I assign > to "align", for example align={middle, middle}. > > The align option is also ignored in the case of other column numbers., for > example: > > \starttext > \startformula > \startmathalignment[n=1,align=left] > \NC This single column should \NR > \NC be left-aligned, \NR > \NC but it is centered. \NR > \stopmathalignment > \stopformula > \stoptext > > What am I missing here? Where is my mistake? > > Regards > Wolfgang > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > 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 : ntg-context@ntg.nl / 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 ___
[NTG-context] mathalignment; alignment of columns
Something as elementary as "mathenvironment" can't really be faulty, can it? According to my recent tests, a mathalignment environment does not seem to react (any more) to the values of the "align" option. The source code hab been rendered correctly a few years ago, Minimal example 1: \starttext \startformula \startmathalignment[n=2,align={left, right}] \NC always aligned to the right \NC = u + at, \NR \NC d \NC = ut + \frac12 at^2. \NR \stopmathalignment \stopformula \stoptext Despite "align={left, right}", the first column is aligned to the right and the second to the left. This does not change, no matter which values I assign to "align", for example align={middle, middle}. The align option is also ignored in the case of other column numbers., for example: \starttext \startformula \startmathalignment[n=1,align=left] \NC This single column should \NR \NC be left-aligned, \NR \NC but it is centered. \NR \stopmathalignment \stopformula \stoptext What am I missing here? Where is my mistake? Regards Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Markdown to HTML cross-references
Hi list, I'm looking to implement a consistent syntax for cross-references in KeenWrite <https://keenwrite.com/> and am wondering what you think would make the most sense for translating into ConTeXt commands. First, some background (the first two give an overview, the others are cross-reference references for various syntaxes): - https://talk.commonmark.org/t/cross-references-and-citations/4013/7 - https://thesynack.com/posts/markdown-captions - https://quarto.org/docs/authoring/cross-references.html - https://mystmd.org/guide/cross-references - https://lierdakil.github.io/pandoc-crossref - https://github.com/tomduck/pandoc-eqnos I'm leaning towards the following syntax: Markdown Item (table, blockquote, TeX block, figure, code, R chunk, etc.) : caption text {#type:label} See [@type:label] for details. There's a unit test that shows what's currently being generated with a number of examples for images, tables, blockquotes, internationalization, and so on: https://gitlab.com/DaveJarvis/KeenWrite/-/blob/main/src/test/java/com/keenwrite/processors/markdown/extensions/references/CrossReferencesExtensionTest.java#L51 The code is a work-in-progress; so the tests may have changed depending on if/when you view the Java source code. Presently, the captions produce anchor references, mostly. The following seems easier to typeset using ConTeXt: Meschiya Lake - Lucky Devil This diverges from the HTML specification for tables (table/caption) and figures (figure/figcaption). It would also mean having to write ConTeXt macros that flip the spans and anchors to produce a caption such as: *Lyrics 1.1.* Meschiya Lake - Lucky Devil While there are plenty of ways of presenting captions (e.g., multi-column images with sub-figure numbers) the majority of cross-references are to a single "thing" with a single "caption". What are your thoughts on this proposal? (Keeping in mind I'm the only person working on KeenWrite and while I'm trying to keep the syntax compatible with pandoc, implementing the full pandoc-crossref syntax is out of scope for me. Thank you! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: learning about the grid
Am 19.11.23 um 13:27 schrieb Miguel Diaz: 1. Why are the lines printed one over the other when grid=no? how do profis then use context without grid? That usually only happens in one of the column modes that requires the grid. It doesn’t happen in usual one-column typesetting. There must be something wrong in your setup. Please make a minimal example (MWE). 2. Is there a document where I can read how the grid is conceived to work for the many options in a simple way? AFAIK, the details manual is the only documentation for it. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: Several math features broke for me in new Debian version
On Fri, Nov 03, 2023 at 01:16:15PM +0100, Wolfgang Schuster wrote: > > \starttext > > Hello world! > > \startformula > > X(f) = \startcases[align={right,left},distance=3pt] > > \NC T, \NC{} $|f| < \frac{1}{2T}$ \NR > > \NC 0, \NC{} $|f| \geq \frac{1}{2T}$ \NR > > \stopcases > > \stopformula > > \stoptext > > There has been changes in the math alignment mechanism a while ago and the > cases > environment use math mode for a column entry when you use the \NC tag at the > begin > of a cell, to make your example working again remove the $ in the column. > > \starttext > > \startformula > X(f) = > \startcases > \NC T, \NC |f| < \frac{1}{2T} \NR > \NC 0, \NC |f| \geq \frac{1}{2T} \NR > \stopcases > \stopformula > > \stoptext > > To typeset the content of a column as text replace \NC with \TC at the begin > of the cell. > Thank you for pointing this out. For now, I shall refrain from upgrading, since this is a backwards incompatible change that affects many files. Eventually, I'll make the required changes. Kumar -- Kumar Appaiah ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Re: Several math features broke for me in new Debian version
Kumar Appaiah schrieb am 03.11.2023 um 11:44: Dear Friends, I am a regular user of ConTeXt. A recent upgrade of ConTeXt in Debian broke things for me. The bug report is here: https://bugs.debian.org/1055233 but I have reproduced the gist here: Upon upgrading to ConTeXt 2023.05.05.20230730+dfsg-2, several math features seem to break for me. Here is an example: \starttext Hello world! \startformula X(f) = \startcases[align={right,left},distance=3pt] \NC T, \NC{} $|f| < \frac{1}{2T}$ \NR \NC 0, \NC{} $|f| \geq \frac{1}{2T}$ \NR \stopcases \stopformula \stoptext There has been changes in the math alignment mechanism a while ago and the cases environment use math mode for a column entry when you use the \NC tag at the begin of a cell, to make your example working again remove the $ in the column. \starttext \startformula X(f) = \startcases \NC T, \NC |f| < \frac{1}{2T} \NR \NC 0, \NC |f| \geq \frac{1}{2T} \NR \stopcases \stopformula \stoptext To typeset the content of a column as text replace \NC with \TC at the begin of the cell. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Footnotes on the bottom of the column's current page, instead of the columns' end
> > > Hello, I'm trying to achieve a look similar to a magazine our religious organization frequently discusses, but unfortunately can't find the correct settings to do so. Whenever I call a custom note on a column, instead of the note showing on the bottom of the page, it shows at the end of the column. (like an endnote, except, it shows as a small footnote at the beginning) How should I make it shown on the bottom of the page of the current footnote instead of the end of the column command? My MWE: \definenote[question][textcommand=\gobbleoneargument, numbercommand=\gobbleoneargument] \setupnotation[question][counter=] \startdocument \startcolumns[n=2, balanced] \dorecurse{19}{ \question{1. This is a question for discussion. I wished it was on the current page instead of the end} \input{knuth} } \stopcolumns \stopdocument mwe.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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 ___
[NTG-context] Problems with line numbered program listings
I'm trying to typeset some program listings with annotations alongside. I've tried both columns and tabulate but both have (different) issues: 1) Plain \typefile won't allow the line numbers to be in the text - they stay in the margin whch I don't want. 2) \typefile using a \definedtyping name does work and works in \columns as well. This is great until my listing is too long to fit on a page and then I'd rather have the column continue onto the next page but \columns balances of course. 3) \tabulate allows a single cell to continue down over the page exactly as I'd like, but the line numbers disappear altogether. (And it has to be a single cell because the program listings are in source files that I want to include using \typefile rather than re-enter to avoid typos.) You can see each of these effects with the following MWE which first needs a file called "three_lines.txt" to be created in the local directory containing the lines: one two three begin \setuplinenumbering[location=text,style=\small\tt] \starttext Location=text not working in main body \typefile[numbering=line]{three_lines.txt} But it does work if a custom typing environment is created. \definetyping[MyTyping][style=\tt] \typefile[MyTyping][numbering=line]{three_lines.txt} Still works if used in a column \startcolumns \typefile[MyTyping][numbering=line]{three_lines.txt} \column :-) \stopcolumns \blank But doesn't work if used in tabulate \starttabulate[|p|p|] \NC \typefile[MyTyping][numbering=line]{three_lines.txt} \NC No line numbers at all :-( \NR \stoptabulate \stoptext end What I'd most like is for tabulate to allow \typefile with line numbers if at all possible. — Bruce Horrocks Hampshire, UK zz.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id} webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Bug? Text following columns at end of page goes into footer not next page
Two column text that ends near the foot of a page can push the next line into the footer rather than starting a new page. MWE for ConTeXt ver: 2023.09.26 18:19 LMTX :- \setuppapersize [A4] \showframe \starttext Knuth in knolumns \dorecurse{30}{\crlf} \startcolumns \input knuth \stopcolumns This line goes into the footer rather than the next page. \stoptext — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Reduce space between lines in Natural Tables
Jeroen schrieb am 10.09.2023 um 22:05: Is there an easy way to reduce the line space between rows in a natural table so the table takes less vertical space. Natural tables and extreme tables take extra vertical space because the table cell use the framed-mechanism which add a small margin on all sides, to get rid of this space set the offset value to 0pt. A unwanted side effect when you set the offset to 0pt is that you no longer have a distance between each row, to get the space between the columns back you can either use the loffset and roffset keys (when you have visible border) or the columndistance key (when you have invisible borders). % Alternative 1: % \setupTABLE[frame=on,offset=0pt,columndistance=1em] % Alternative 2: \setupTABLE [frame=off,offset=0pt,loffset=.5em,roffset=.5em] \setupTABLE [column] [first] [loffset=0pt] \setupTABLE [column] [last] [roffset=0pt] \starttext \bTABLE \bTR \bTD Cell 1:1 \eTD \bTD Cell 1:2 \eTD \bTD Cell 1:3 \eTD \eTR \bTR \bTD Cell 2:1 \eTD \bTD Cell 2:2 \eTD \bTD Cell 2:3 \eTD \eTR \bTR \bTD Cell 3:1 \eTD \bTD Cell 3:2 \eTD \bTD Cell 3:3 \eTD \eTR \eTABLE \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: how to define an environment with key=value arguments
Am 08.09.23 um 17:02 schrieb Henning Hraban Ramm: We can discuss the details next week and you put the resulting template on the wiki. Ah, I guess I understand the template mechanism. Yet again glorious setups. Will probably manage. So far: \definepageinjection[chapter:start][ page=left, alternative=setups, setups=frontispiz, color=white, background=color, backgroundcolor=Eifel, ] \startsetups[frontispiz] \starttransparent[tlumi]% \externalfigure[\structureuservariable{image}][ width=\measure{MaxWidth}, ]% \stoptransparent% \stopsetups \setuphead[chapter][ page=right, style=\ChapterFont, beforesection={\pageinjection[chapter:start]}, command=\ChapterStart, before={\startcolumnset[Spalten]}, after={\vskip-\lineheight}, % fix column start inbetween=, aftersection={\stopcolumnset}, ] \startchapter[title={Prolog 2: Reiseführer}][ motto={(quotation.}}, % used in \ChapterStart image={00 Lavakeller Mendig g}, % wrong blank=2, ] Not a MWE, I know. Here’s a screenshot: https://yemaya.fiee.net/s/G2NcwE8qQrLAx8B (Funny, I never needed all of before, after, beforesection and aftersection so far.) The injection is a frame, that’s great, because I can set the background, and \externalfigure starts at (0,0). But it uses its own page size, I don’t understand why. I need the bleed/trim area. If I use \setlayer in the setup, the content gets placed on the next page, i.e. under the text. \structureuservariable{image} in the setup gets the value from the _next_ chapter. Maybe the approach in from the source with \dummyparameter\c!name would work better, but I don’t know how to transfer it. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Question about building an array of values with Lua
Hi Wolfgang, Thank you so much Fabrice Le jeu. 24 août 2023 à 19:46, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > Otared Kavian schrieb am 24.08.2023 um 12:50: > > > On 24 Aug 2023, at 06:03, Wolfgang Schuster < > wolfgang.schuster.li...@gmail.com> wrote: > > […] > > > I would drop the column check in this case. > > for i = 0,9 do > context.startxrow() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(math.mod(i*i,10)) > context.stopxcell() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(math.mod(2*i*i,10)) > context.stopxcell() > context.stopxrow() > end > > Wolfgang > > > Indeed this is much more elegant… It feels so good to be on this list and > learn from such insights :-) > > > We don't even need the math.mod function because Lua added with version > 5.1 a modulo operator, > the loop to create the row can now be changed to > > for i = 0,9 do > context.startxrow() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(i * i % 10) > context.stopxcell() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(2 * i * i % 10) > context.stopxcell() > context.stopxrow() > end > > Wolfgang > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Question about building an array of values with Lua
Otared Kavian schrieb am 24.08.2023 um 12:50: On 24 Aug 2023, at 06:03, Wolfgang Schuster <mailto:wolfgang.schuster.li...@gmail.com>> wrote: […] I would drop the column check in this case. for i = 0,9 do context.startxrow() context.startxcell() context(i) context.stopxcell() context.startxcell() context(math.mod(i*i,10)) context.stopxcell() context.startxcell() context(i) context.stopxcell() context.startxcell() context(math.mod(2*i*i,10)) context.stopxcell() context.stopxrow() end Wolfgang Indeed this is much more elegant… It feels so good to be on this list and learn from such insights :-) We don't even need the math.mod function because Lua added with version 5.1 a modulo operator, the loop to create the row can now be changed to for i = 0,9 do context.startxrow() context.startxcell() context(i) context.stopxcell() context.startxcell() context(i * i % 10) context.stopxcell() context.startxcell() context(i) context.stopxcell() context.startxcell() context(2 * i * i % 10) context.stopxcell() context.stopxrow() end Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Question about building an array of values with Lua
> On 24 Aug 2023, at 06:03, Wolfgang Schuster > wrote: >> […] > > I would drop the column check in this case. > > for i = 0,9 do > context.startxrow() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(math.mod(i*i,10)) > context.stopxcell() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(math.mod(2*i*i,10)) > context.stopxcell() > context.stopxrow() > end > > Wolfgang Indeed this is much more elegant… It feels so good to be on this list and learn from such insights :-) Best regards: Otared___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Question about building an array of values with Lua
Hi Otared and Wolgang, Thanks for the answers. In fact, being familiar with Python and not at all with Lua, I didn't have the reflex to think of using a mathematical function which gives the remainder in the Euclidean division by 10, it's strange !! Fabrice Le jeu. 24 août 2023 à 04:06, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > Otared Kavian schrieb am 24.08.2023 um 01:04: > > Hi Fabrice, > > As Wolfgang points out, it is indeed possible to fill-in your table with > Lua: maybe you were wondering how to fill the columns 2, 3 and 4. In this > case you need to use the Lua function math.mod as in the following, which > is a completed version of what Wolfgang sent: > > > I guess I completely missed the units digit part :) > > %% begin filling-with-lua.tex > \starttext > > \startluacode > context.startxtable{ align = "middle,lohi", bodyfont = "9pt", framecolor = > "black" } > context.startxrow{ background = "color", backgroundcolor = "lightgray" > } > context.startxcell{ nx = 4 } > context("Units digit of") > context.stopxcell() > context.stopxrow() > context.startxrow() > context.startxcell{ width = "1cm" } > context.im("a") > context.stopxcell() > context.startxcell{ width = "1cm" } > context.im("a^2") > context.stopxcell() > context.startxcell{ width = "1cm" } > context.im("b") > context.stopxcell() > context.startxcell{ width = "1cm" } > context.im("2b^2") > context.stopxcell() > context.stopxrow() > for i = 0,9 do > context.startxrow() > for j = 1,4 do > context.startxcell() > if j == 1 then > context(i) > elseif j == 2 then > context(math.mod(i*i,10)) > elseif j == 3 then > context(i) > else > context(math.mod(2*i*i,10)) > end > context.stopxcell() > end > context.stopxrow() > end > > > I would drop the column check in this case. > > for i = 0,9 do > context.startxrow() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(math.mod(i*i,10)) > context.stopxcell() > context.startxcell() > context(i) > context.stopxcell() > context.startxcell() > context(math.mod(2*i*i,10)) > context.stopxcell() > context.stopxrow() > end > > Wolfgang > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: Question about building an array of values with Lua
Otared Kavian schrieb am 24.08.2023 um 01:04: Hi Fabrice, As Wolfgang points out, it is indeed possible to fill-in your table with Lua: maybe you were wondering how to fill the columns 2, 3 and 4. In this case you need to use the Lua function math.mod as in the following, which is a completed version of what Wolfgang sent: I guess I completely missed the units digit part :) %% begin filling-with-lua.tex \starttext \startluacode context.startxtable{ align = "middle,lohi", bodyfont = "9pt", framecolor = "black" } context.startxrow{ background = "color", backgroundcolor = "lightgray" } context.startxcell{ nx = 4 } context("Units digit of") context.stopxcell() context.stopxrow() context.startxrow() context.startxcell{ width = "1cm" } context.im("a") context.stopxcell() context.startxcell{ width = "1cm" } context.im("a^2") context.stopxcell() context.startxcell{ width = "1cm" } context.im("b") context.stopxcell() context.startxcell{ width = "1cm" } context.im("2b^2") context.stopxcell() context.stopxrow() for i = 0,9 do context.startxrow() for j = 1,4 do context.startxcell() if j == 1 then context(i) elseif j == 2 then context(math.mod(i*i,10)) elseif j == 3 then context(i) else context(math.mod(2*i*i,10)) end context.stopxcell() end context.stopxrow() end I would drop the column check in this case. for i = 0,9 do context.startxrow() context.startxcell() context(i) context.stopxcell() context.startxcell() context(math.mod(i*i,10)) context.stopxcell() context.startxcell() context(i) context.stopxcell() context.startxcell() context(math.mod(2*i*i,10)) context.stopxcell() context.stopxrow() end Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: new upload
On 8/15/2023 9:27 PM, Pablo Rodriguez wrote: On 8/15/23 19:08, Hans Hagen wrote: [...] The units starting with 'u' are considered user units but be carefulk with other combinations as we have (and will have more) built into context ones, like pi : pi for Mikael ft : foot for Alan fs : (global body) font size tw : (layout) text width th : (layout) text height hs : (current) hsize vs : (current) vsize cd : (when set) column distance cw : (when set) column width cx : combination cell width uu : user unit (\METAFUN) Many thanks for the new release, Hans. I wonder whether we could have (current) frame width and height as unit. we can have fw fh fo lw (width height offset linewidth) but keep in mind that only properties that are set up have a meaningful value (so with autoheight it is zero) and then you realize that you are the one going to wikify it Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Re: new upload
On 8/15/23 19:08, Hans Hagen wrote: > [...] > The units starting with 'u' are considered user units but be carefulk > with other combinations as we have (and will have more) built into > context ones, like > > pi : pi for Mikael > ft : foot for Alan > fs : (global body) font size > tw : (layout) text width > th : (layout) text height > hs : (current) hsize > vs : (current) vsize > cd : (when set) column distance > cw : (when set) column width > cx : combination cell width > uu : user unit (\METAFUN) Many thanks for the new release, Hans. I wonder whether we could have (current) frame width and height as unit. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] new upload
Hi, I uploaded a new lmtx (some new - experimental - things will be explained after the ctx meeting), but there's one thing that is somewhat important. In addition to the built in units we can now have so called user units. There is some more info about this in the lowlevel-registers manual. One of the predefined units is 'uu' with an associated \ununit (dimension) variable and it's is also interfaced to metafun. That means that when you use uu in metapost graphics you have to make sure that you save the meaning and/or numeric uu now. The idea is that just as in mp one can say 20xx with xx being a (sort of) unit, one can do the same in tex. Think of \newdimension \MyUnitA \MyUnitA 1.23pt \pushoverloadmode % just in case \newuserunit\MyUnitA ua % binds the unit to the variable \popoverloadmode x\hskip 10ua\relax x The units starting with 'u' are considered user units but be carefulk with other combinations as we have (and will have more) built into context ones, like pi : pi for Mikael ft : foot for Alan fs : (global body) font size tw : (layout) text width th : (layout) text height hs : (current) hsize vs : (current) vsize cd : (when set) column distance cw : (when set) column width cx : combination cell width uu : user unit (\METAFUN) So Mikael can now have test \hskip 3pi\relax test and Alan can have \setuplayout [width=1ft] to be consistent with inches. The reason why we have this mechanism is that it provides a level of abstraction. It might evolve over time but don't expect the 600+ units possible to show up because one needs sensible shortcuts. Already built in unit always win and you cna only bind to already defined quantities. Here's one for those who want to go beyond the normal: \newdimension \FooA \FooA 1.23pt \newdimen \FooB \FooB 12.3pt \protected\def\FooC {\the\dimexpr\FooA +\FooB\relax} So you can now figure how 'cx' is defined in a dynamic way. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Parallel columns using start/stop setups
Two concurrent situations can happen, which I'd like to typeset as two parallel columns while keeping the overall page layout (i.e., headers, footers, margins, and such). current version: 2023.07.18 22:07 I'd like to find a way to set up start/stop environments, if possible, to come up with a general-purpose solution (i.e., the prose itself is not changed). Here are a few examples. In the first, a "concurrent" environment is created with two "timelines": % SOT \definestartstop[concurrent][ before={\startcolumns[n=2, align={verytolerant,stretch}, separator=rule]}, after=\stopcolumns, ] \definestartstop[timelinea][ after=\column, ] \definestartstop[timelineb][] \starttext \startconcurrent \starttimelinea \dorecurse{5}{\input ward} \stoptimelinea \starttimelineb \dorecurse{5}{\input knuth} \stoptimelineb \stopconcurrent \stoptext % EOT The ward and knuth texts end up in the same column because one is shorter than the other. Here's another attempt: % SOT \defineparagraphs[concurrent][n=2] \definestartstop[timelinea][ before=\concurrent, after=\concurrent, ] \definestartstop[timelineb][ before=\concurrent, ] \starttext \startconcurrent \starttimelinea \dorecurse{5}{\input ward} \stoptimelinea \starttimelineb \dorecurse{5}{\input knuth} \stoptimelineb \stopconcurrent \stoptext % EOT This loses much of the input text. Can this be accomplished using LMTX and what would be the best approach? Would this setupparagraphs, definecolumnset, synchronizestreams, or possibly incomplete/experimental functionality? Thank you! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Tabulate: Change cell orienation for individual cells?
Ok, if you use p for the column definition you can just use \setupalign on individual cells... %%% \starttext \starttabulate[|pA{verytolerant,extremestretch}|pA{verytolerant,extremestretch}|] \NC Heading flushleft \NC \setupalign[flushright] Heading flushright \NC \NR \NC \input ward \NC \input ward \NC \NR \stoptabulate \stoptext %%% Best, Denis Von: ntg-context Im Auftrag von Denis Maier via ntg-context Gesendet: Dienstag, 27. Juni 2023 10:56 An: ntg-context@ntg.nl Cc: Maier, Denis Christian (UB) Betreff: [NTG-context] Tabulate: Change cell orienation for individual cells? Sie erhalten nicht oft eine E-Mail von ntg-context@ntg.nl<mailto:ntg-context@ntg.nl>. Erfahren Sie, warum dies wichtig ist<https://aka.ms/LearnAboutSenderIdentification> Hi, is it possible to override the defined orienatation for a given cell ? Take this example from the wiki: %% \starttext \starttabulate[|l|c|r|] \NC this and that \NC left and right \NC here and there \NC \NR \NC such and so \NC up and down \NC on and on \NC \NR \stoptabulate \stoptext %% How can I change the alignment for a particular cell? Best, Denis ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] error in column sets
Am 19.06.23 um 21:59 schrieb Henning Hraban Ramm via ntg-context: In a minimal example like this: \setuppapersize[A5] \definecolumnset[TwoColumns][n=2] \starttext \startcolumnset [TwoColumns] \dorecurse{10}{\samplefile{knuth}} \stopcolumnset \stoptext … many columns start one line too low and overwrite their last line. ... Also I seem to remember that column sets would enforce grid mode, but they clearly don’t. If you enable \setuplayout[grid=yes], lines get placed correctly. Also floats work well (here and top). But some columnsetspans still disappear, and footnotes get overwritten. (I know, that tricky inset stuff…) Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] error in column sets
In a minimal example like this: \setuppapersize[A5] \definecolumnset[TwoColumns][n=2] \starttext \startcolumnset [TwoColumns] \dorecurse{10}{\samplefile{knuth}} \stopcolumnset \stoptext … many columns start one line too low and overwrite their last line. An extended example (nearly the same as in the manual) shows that some column set spans don’t appear: \showgrid\showframe \definecolumnset[Beispiel][n=3] \definecolumnsetspan[Zwei][n=2,color=blue] \definecolumnsetspan[Drei][n=3,color=red] \starttext \startcolumnset[Beispiel] \startcolumnsetspan[Drei]% this works {\bfd Überschrift} Anleser: \dorecurse{2}{#1: \samplefile{knuth}\par} \stoptitle \stopcolumnsetspan Zwischen: \samplefile{tufte}\par \startcolumnsetspan[Zwei]% This never shows up! Zwei: \dorecurse{2}{#1: \samplefile{lorem}\par} \stopcolumnsetspan Nach: \dorecurse{15}{#1: \samplefile{knuth}\par} \stopcolumnset \stoptext Also I seem to remember that column sets would enforce grid mode, but they clearly don’t. (BTW the old \startcolumns mode works better than I remembered.) Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Protect the lettrine
t; > \stoptext > > > > > > > > > > > > > > > > > > > > Best regards: Otared > > > > > > > > On 13 Jun 2023, at 04:43, Thangalin via ntg-context < > > ntg-context@ntg.nl> > > > > wrote: > > > > > > > > I'm using KeenWrite Themes (specifically, Boschet) to typeset a chapter > > > > wherein the first letter is a lettrine. When the first paragraph is too > > > > short, the second paragraph overlaps the lettrine. > > > > > > > > % SOT > > > > \setupinitial[n=2] > > > > > > > > \setuphead[chapter][ > > > > after={\placeinitial}, > > > > page=no, > > > > ] > > > > > > > > \starttext > > > > \chapter{one} > > > > Kermit Ruffins > > > > > > > > Meet me at the second line. > > > > > > > > \chapter{two} > > > > \input knuth > > > > > > > > Meet me at the second line. > > > > \stoptext > > > > % EOT > > > > > > > > Produces: https://i.stack.imgur.com/kNDqw.png > > > > > > > > How would you instruct ConTeXt to "protect" the lettrine such that > > > > regardless of whether the first paragraph spans multiple lines, a short > > > > first paragraph will still prevent the second paragraph from > > overlapping > > > > the lettrine? > > > > > > > > That is, the setups should work in both cases, without any knowledge > > about > > > > the first paragraph length being added between \starttext and > > \stoptext. > > > > > > > > ConTeXt LMTX version: 2023.06.04 18:58 > > > > > > > > Thank you! > > > > > > > > > > ___ > > > > If your question is of interest to others as well, please add an entry > > to > > > > the Wiki! > > > > > > > > maillist : ntg-context@ntg.nl / > > > > https://www.ntg.nl/mailman/listinfo/ntg-context > > > > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > > > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > > > wiki : https://contextgarden.net > > > > > > > > > > ___ > > > > > > > > > > > > Otared Kavian > > > > e-mail: ota...@gmail.com > > > > Phone: +33 6 88 26 70 95 > > > > > > > > > > > > > > > > > > > > > > > > > > ___ > > > > If your question is of interest to others as well, please add an entry > > to > > > > the Wiki! > > > > > > > > maillist : ntg-context@ntg.nl / > > > > https://www.ntg.nl/mailman/listinfo/ntg-context > > > > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > > > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > > > wiki : https://contextgarden.net > > > > > > > > > > ___ > > > > > > > > > > > ___ > > > If your question is of interest to others as well, please add an entry > > to the Wiki! > > > > > > maillist : ntg-context@ntg.nl / > > https://www.ntg.nl/mailman/listinfo/ntg-context > > > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > > wiki : https://contextgarden.net > > > > > ___ > > > > > > -- > > ... an anecdote from IBM's Yorktown Heights Research Center. When a > > programmer used his new computer terminal, all was fine when he was sitting > > down, but he couldn't log in to the system when he was standing up. That > > behavior was 100 percent repeatable: he could always log in when sitting > > and > > never when standing. > > > > Most of us just sit back and marvel at such a story; how could that > > terminal > > know
Re: [NTG-context] Protect the lettrine
gt; > > maillist : ntg-context@ntg.nl / > > > https://www.ntg.nl/mailman/listinfo/ntg-context > > > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > > wiki : https://contextgarden.net > > > > > > > ___ > > > > > > > > > Otared Kavian > > > e-mail: ota...@gmail.com > > > Phone: +33 6 88 26 70 95 > > > > > > > > > > > > > > > > > > > ___ > > > If your question is of interest to others as well, please add an entry > to > > > the Wiki! > > > > > > maillist : ntg-context@ntg.nl / > > > https://www.ntg.nl/mailman/listinfo/ntg-context > > > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > > wiki : https://contextgarden.net > > > > > > > ___ > > > > > > > ___ > > If your question is of interest to others as well, please add an entry > to the Wiki! > > > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > wiki : https://contextgarden.net > > > ___ > > > -- > ... an anecdote from IBM's Yorktown Heights Research Center. When a > programmer used his new computer terminal, all was fine when he was sitting > down, but he couldn't log in to the system when he was standing up. That > behavior was 100 percent repeatable: he could always log in when sitting > and > never when standing. > > Most of us just sit back and marvel at such a story; how could that > terminal > know whether the poor guy was sitting or standing? Good debuggers, though, > know that there has to be a reason. Electrical theories are the easiest to > hypothesize: was there a loose wire under the carpet, or problems with > static > electricity? But electrical problems are rarely consistently reproducible. > An alert IBMer finally noticed that the problem was in the terminal's > keyboard: the tops of two keys were switched. When the programmer was > seated > he was a touch typist and the problem went unnoticed, but when he stood he > was > led astray by hunting and pecking. > -- "Programming Pearls" column, by Jon Bentley in CACM > February 1985 > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Protect the lettrine
http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ -- ... an anecdote from IBM's Yorktown Heights Research Center. When a programmer used his new computer terminal, all was fine when he was sitting down, but he couldn't log in to the system when he was standing up. That behavior was 100 percent repeatable: he could always log in when sitting and never when standing. Most of us just sit back and marvel at such a story; how could that terminal know whether the poor guy was sitting or standing? Good debuggers, though, know that there has to be a reason. Electrical theories are the easiest to hypothesize: was there a loose wire under the carpet, or problems with static electricity? But electrical problems are rarely consistently reproducible. An alert IBMer finally noticed that the problem was in the terminal's keyboard: the tops of two keys were switched. When the programmer was seated he was a touch typist and the problem went unnoticed, but when he stood he was led astray by hunting and pecking. -- "Programming Pearls" column, by Jon Bentley in CACM February 1985 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Two columns of footnotes
Denis: Thanks, that is very helpful starting point which proves that it is possible! I have tried the suggestions there, but, so far: * I cannot adjust the gap ("distance" or "gutter") between the columns * It seems impossible to turn-on a column-separating ruled line * It would be useful to have a method for controlling orphan / widow behaviour (such that a footnote in the left column doesn't spill-over as just a single line into the 2nd column). Any comments or ideas? MG On 2023-05-16 00:46, Denis Maier via ntg-context wrote: > Technically it should be possible: > > https://wiki.contextgarden.net/Footnotes > > (see under footnote formatting). > > However, the example is not particularly pretty and the explanatory text > states there is a bug. > > Don't know if that is the current behavior or if this bug has been fixed. > > Best, > > Denis > > VON: ntg-context IM AUFTRAG VON lynx--- via > ntg-context > GESENDET: Dienstag, 16. Mai 2023 08:37 > AN: ntg-context@ntg.nl > CC: l...@polarcom.com > BETREFF: [NTG-context] Two columns of footnotes > > I own a commercially published book that has makes effective use of footnotes > that are arranged in two columns on each page. Does anybody know how this can > be set up within ConTeXt? > > MG > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > __ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] https://wiki.contextgarden.net/Enumerations problem
In https://wiki.contextgarden.net/Enumerations there is this example: % \setupwhitespace[big] \definesymbol[1][$\triangleright$] \startcolumns {\bf joinedup:}\par before \startitemize[joinedup] \item test \item test \stopitemize after \par {\bf nowhite:} \par before \startitemize[nowhite] \item test \item test \stopitemize after \par {\bf joinedup,nowhite:}\par before \startitemize[joinedup,nowhite] \item test \item test \stopitemize after \column {\bf joinedup,nowhite,before:} \par before \startitemize[joinedup,nowhite,before] \item test \item test \stopitemize after \par {\bf joinedup,nowhite,after:} \par before \startitemize[joinedup,nowhite,after] \item test \item test \stopitemize after \stopcolumns % In my test "joinedup" leaves whitespace before the first list item and after the last, but in the sample output there is no space. While someone (?) is thinking about that, my (extremely rudimentary!) tests also indicate that there is no need to use "joinedup" when you use "nowhite". Is this indeed the case (in which case the wiki page could use an edit) or are there case where both "joinedup" and "nowhite" are needed together (in which case the wiki page could stand a little more information). Thanks. Jim ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] English-Vietnamese facing pages
Thanks Peter. I took a look at your lua pages. I think I would get entirely lost with that code at this stage, and of course I am not considering (at least not for now) a two-column approach, but facing pages. But at least you achieved what you were trying to do at the time. Hopefully I will also! Julian On 3/4/23 20:55, Peter Münster via ntg-context wrote: On Mon, Apr 03 2023, jbf via ntg-context wrote: Q 1: Has anybody reading this actually produced a bilingual book (it doesn't have to be en-vn) with ConTeXt? Hi, Only some pages of a book: https://wiki.contextgarden.net/Catalogue_raisonné HTH, ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] natural table oddities
[This mail sat in my drafts folder for days; wanted to research more first, well…] Am 28.03.23 um 02:19 schrieb Bruce Horrocks: If you're asking for comments with a view to making changes then... I can’t make the changes myself, only suggest them to Hans. On 27 Mar 2023, at 15:03, Henning Hraban Ramm via ntg-context wrote: * If I format a column, e.g. \setupTABLE[c][-1][color=red], body and foot are formatted, but not the same column in header. I couldn’t find how to format columns in header. If you disregard the Wiki page instructions to use \bTH...\eTH then you can format the header using: \bTD ... \eTD but I'm not sure what the consequences might be, if any. You lose the default bold heading so maybe that's all /bTH.../eTH is adding? Yes, I also found that out – either I sent an incomplete email, or I forgot to add my later “research”. 🤔 TH (table header, not Taco or Tomáš 😉) adds a separation between header and body cells, but setting up "header" affects both TD and TH within TABLEhead. It would be nice to have a way of specifying the header explicitly. My suggestion would be to have: - \setupTABLE[r][head][...] affect just the header - \setupTABLE[r][next][...] affect the new page header - \setupTABLE[r][first|last|body][...] affect the first, or last, or only the body rows (i.e. not the header or footer) - \setupTABLE[r][foot][...] affect just the footer [r][last] (and [r][-1]) would represent the last body row (but not the footer row if one has been requested). I agree. ## Formatting * maxwidth doesn’t seem to have an effect, neither on the whole table nor on a column. * textwidth works only for the whole table. * width gets stretched if option=stretch; i.e. I can’t fix the width of single cells or columns. For me, \setupTABLE [c] [1] [width=3cm] fixes the width of column 1 and forces long text to wrap. But the width of a column is not fixed if you set option=stretch, then *all* columns are stretched, not only the undefined. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] natural table oddities
If you're asking for comments with a view to making changes then... > On 27 Mar 2023, at 15:03, Henning Hraban Ramm via ntg-context > wrote: > > I would be happy about some answers/comments. > Hraban > > Am 13.03.23 um 23:26 schrieb Henning Hraban Ramm: >> Working on the documentation for “natural tables” in my book I stumbled upon >> a few oddities/problems: >> ## Addressing cells: >> * There’s \setupTABLE[header], but not "footer" (or "section"); since we >> have TABLEhead and TABLEfoot, IMO "head" and "foot" would make sense. I'd be happy with that, especially as there is already headstyle and headcolor. >> * Row 1 is the first row of TABLEbody. I couldn’t find how to address the >> first line of TABLEbody. >> * If I format a column, e.g. \setupTABLE[c][-1][color=red], body and foot >> are formatted, but not the same column in header. I couldn’t find how to >> format columns in header. If you disregard the Wiki page instructions to use \bTH...\eTH then you can format the header using: \bTABLEhead \bTR \bTH Column 1 \eTH \bTD[color=blue] Column 2 \eTD \eTR \eTABLEhead but I'm not sure what the consequences might be, if any. You lose the default bold heading so maybe that's all /bTH.../eTH is adding? It would be nice to have a way of specifying the header explicitly. My suggestion would be to have: - \setupTABLE[r][head][...] affect just the header - \setupTABLE[r][next][...] affect the new page header - \setupTABLE[r][first|last|body][...] affect the first, or last, or only the body rows (i.e. not the header or footer) - \setupTABLE[r][foot][...] affect just the footer [r][last] (and [r][-1]) would represent the last body row (but not the footer row if one has been requested). Extending to the formatting of header/footer/next etc columns is not quite so neat as an extra parameter is required, e.g. [c][][head][...] to reference column n in the header. For consistency the syntax [c][][body][...] could be an option. >> * I don’t understand the addressing options "start" and "one". Me neither. :) >> ## Formatting >> * maxwidth doesn’t seem to have an effect, neither on the whole table nor on >> a column. >> * textwidth works only for the whole table. >> * width gets stretched if option=stretch; i.e. I can’t fix the width of >> single cells or columns. For me, \setupTABLE [c] [1] [width=3cm] fixes the width of column 1 and forces long text to wrap. I'm not sure what your \textwidth comment relates to because \setupTABLE [c] [1] [width=.2\textwidth] works as expected for me. >> ## Page breaking >> * What’s the difference between split=repeat and header=repeat ? \setupTABLE [split=repeat] % works as expected for me \setupTABLE [header=repeat] % doesn't work for me >> I’d like to know if there are misunderstandings / if the behavior is >> intentional. — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] natural table oddities
I would be happy about some answers/comments. Hraban Am 13.03.23 um 23:26 schrieb Henning Hraban Ramm: Working on the documentation for “natural tables” in my book I stumbled upon a few oddities/problems: ## Addressing cells: * There’s \setupTABLE[header], but not "footer" (or "section"); since we have TABLEhead and TABLEfoot, IMO "head" and "foot" would make sense. * Row 1 is the first row of TABLEbody. I couldn’t find how to address the first line of TABLEbody. * If I format a column, e.g. \setupTABLE[c][-1][color=red], body and foot are formatted, but not the same column in header. I couldn’t find how to format columns in header. * I don’t understand the addressing options "start" and "one". ## Formatting * maxwidth doesn’t seem to have an effect, neither on the whole table nor on a column. * textwidth works only for the whole table. * width gets stretched if option=stretch; i.e. I can’t fix the width of single cells or columns. ## Page breaking * What’s the difference between split=repeat and header=repeat ? I’d like to know if there are misunderstandings / if the behavior is intentional. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] \setupTABLE: framecolor
> On 25 Mar 2023, at 05:45, jbf via ntg-context wrote: > > Hi, I am struggling with the last row of a table which, according to its > author, should have a black bottomframe, but gray (I am using a defined > 'lightgray') for the sides. The first row has a black frame. All intermediate > rows have gray. > I have no difficulty achieving the first row, and the black bottomframe for > the last row, but I have been unable to get the last row sides to be gray. > Here is the current setups that I have: > \setupTABLE[frame=off] > \setupTABLE[row] [first] [topframe=on,bottomframe=on,style=bold] > \setupTABLE[row][2][topframe=on] > \setupTABLE[row][2][topframe=off,rightframe=on,leftframe=on,framecolor=lightgray] > \setupTABLE[row][3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21][frame=on, > framecolor=lightgray] > \setupTABLE[row] [last] [bottomframe=on,style=normal] > > My first row is fine and all but the topframe of row 2 is 'lightgray'; all > following rows are 'lightgray'. The last row (22) has a black bottomframe, > but how could I achieve 'lightgray' for rightframe, leftframe? If I add a new > setup e.g. > \setupTABLE[row][last][rightframe=on,leftframe=on,framecolor=lightgray] then > I lose the bottomframe in black. I have tried all kinds of combinations but > unsuccessfully. > Julian One way to achieve what you want is to have a dummy last row. \setupTABLE[frame=off] \setupTABLE[row] [first] [topframe=on,bottomframe=on,style=bold] \setupTABLE[row][2][topframe=on] \setupTABLE[row][2][topframe=off,rightframe=on,leftframe=on,framecolor=lightgray] \setupTABLE[row][3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22][frame=on, framecolor=lightgray] \setupTABLE[row] [last] [topframe=on,framecolor=black, height=0pt] \starttext \bTABLE \dorecurse{22}{ \bTR\bTD Row #1 column 1 \eTD\bTD Row #1 column 2 \eTD\eTR } % Dummy last row \bTR \eTR \eTABLE \stoptext — Bruce Horrocks Hampshire, UK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Bug in columns
Hi, There are some footnotes in my text. When I use \startcolumns...\stopcolumns, the locations of footnotes are not right. Please see the followging sample: \starttext If there is a footnote here\footnote{It's a footnote!}. \startcolumns[n=2] \input knuth \column \input knuth \stopcolumns The result is not right. \stoptext The result is attached. My lmtx version is 2023.03.10 12:18. foo.pdf <https://drive.google.com/file/d/1zSUTCVsssoET9Pr88f8VIzQGdMnnzpjg/view?usp=drive_web> -- Best regards, Li Yanrui ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] natural table oddities
Working on the documentation for “natural tables” I stumbled upon a few oddities/problems. I’d like to know if there are misunderstandings on my part or if the behavior is intentional. BTW enattab.pdf is missing in the LMTX distribution. ## Options * before/after/inbetween values don’t appear anywhere. * spaceinbetween should insert between rows, but nothing happens. * splitoffset doesn’t seem to change anything. * What’s samepage for? ## Addressing cells * It’s not possible to address single cells with \setupTABLE, or is it? * There’s \setupTABLE[header], but not "footer" (or "section"); since we have TABLEhead and TABLEfoot, IMO "head" and "foot" would make sense. * Row 1 is the first row of TABLEbody. I couldn’t find how to address the first line of TABLEbody. * Is it possible, and how, to use odd/even only for the body? * If I format a column, e.g. \setupTABLE[c][-1][color=red], body and foot are formatted, but not the same column in header. (I found out, if I use TD instead of TH in the header, it works.) * I don’t understand the addressing options "start" and "one". ## Formatting * maxwidth doesn’t seem to have an effect, neither on the whole table nor on a column. * textwidth works only for the whole table. * width gets stretched if option=stretch; i.e. you can’t fix the width of single cells or columns. ## Page breaking * What’s the difference between [split=repeat] and [split=yes,header=repeat], i.e. which sense makes the header option)? * Is there an option to repeat the footer (as the last line of each page)? (I’d imagine to use it in an invoice or similar calculation for a subtotal – that would imply some more magic…) Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] \setupparagraphs - can they run over two pages?
Yes, tabulate is a solution, though as I have just described for Denis who also responded to this issue, by some careful manipulation (which was possible for the circumstance I was dealing with) I simply noted where the page break occurred and started a new set of paragraphs after that. That was satisfactory in this case. Tabulate might have to be the solution for a different set of circumstances. Julian On 27/2/23 23:26, mf via ntg-context wrote: I would try \setuptabulate, \starttabulate ... \stoptabulate. It has some limitations (though Hans added some features recently), but it should work. Massi Il 24/02/23 06:41, jbf via ntg-context ha scritto: I have the following setup for side-by-side paras. \defineparagraphs[Two][n=2] \setupparagraphs[Two][1][width=.1\textwidth,style=\bfx,align=tolerant] \setupparagraphs[Two][2][width=.9\textwidth,style=normal,align=tolerant] My difficulty is that while there is only ever just a couple of numbers in the left-hand 'column', the right-hand 'column' may have several lengthy paragraphs. If I have one relatively short \startTwo followed by one that is much longer, it will be forced to start on the next page, leaving too much empty space on the previous page. It is probable that getting this environment to split across pages is not possible. I can try very different approaches (columns, tables) to solve my problem, but I thought I would at least ask first. Julian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] \setupparagraphs - can they run over two pages?
I would try \setuptabulate, \starttabulate ... \stoptabulate. It has some limitations (though Hans added some features recently), but it should work. Massi Il 24/02/23 06:41, jbf via ntg-context ha scritto: I have the following setup for side-by-side paras. \defineparagraphs[Two][n=2] \setupparagraphs[Two][1][width=.1\textwidth,style=\bfx,align=tolerant] \setupparagraphs[Two][2][width=.9\textwidth,style=normal,align=tolerant] My difficulty is that while there is only ever just a couple of numbers in the left-hand 'column', the right-hand 'column' may have several lengthy paragraphs. If I have one relatively short \startTwo followed by one that is much longer, it will be forced to start on the next page, leaving too much empty space on the previous page. It is probable that getting this environment to split across pages is not possible. I can try very different approaches (columns, tables) to solve my problem, but I thought I would at least ask first. Julian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] \setupparagraphs - can they run over two pages?
No, I don’t think that’s possible, at least it wasn’t last time I’ve checked : https://www.mail-archive.com/ntg-context@ntg.nl/msg102871.html Best, Denis Von: ntg-context Im Auftrag von jbf via ntg-context Gesendet: Freitag, 24. Februar 2023 06:42 An: mailing list for ConTeXt users Cc: jbf Betreff: [NTG-context] \setupparagraphs - can they run over two pages? I have the following setup for side-by-side paras. \defineparagraphs[Two][n=2] \setupparagraphs[Two][1][width=.1\textwidth,style=\bfx,align=tolerant] \setupparagraphs[Two][2][width=.9\textwidth,style=normal,align=tolerant] My difficulty is that while there is only ever just a couple of numbers in the left-hand 'column', the right-hand 'column' may have several lengthy paragraphs. If I have one relatively short \startTwo followed by one that is much longer, it will be forced to start on the next page, leaving too much empty space on the previous page. It is probable that getting this environment to split across pages is not possible. I can try very different approaches (columns, tables) to solve my problem, but I thought I would at least ask first. Julian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Aaligned numbers in a matrix?
On Mon, 27 Feb 2023, Bruce Horrocks via ntg-context wrote: > I'm using the following MWE to produce a matrix: > > \definemathmatrix[bmatrix] > [matrix:brackets] > [simplecommand=bmatrix] > \starttext > $ a \rightarrow > \bmatrix{1, 2, 3, 4; >2, 1, 4, 3; >3,-4, 1,-2; >4,-3, 2,-1} $ > \stoptext > > The columns with negative numbers in are centred and I would rather have them > right-aligned so that the digits stack up above each other and the negative > signs stick out to the left, so to speak. Is there an easy way to achieve > this? You can right align all columns, though I am not sure that this looks better, because column 2 and 3 now appear to be "too close". \definemathmatrix[bmatrix] [matrix:brackets] [align=all:right,simplecommand=bmatrix] \starttext $ a \rightarrow \bmatrix{1, 2, 3, 4; 2, 1, 4, 3; 3,-4, 1,-2; 4,-3, 2,-1} $ \stoptext Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] \setupparagraphs - can they run over two pages?
I have the following setup for side-by-side paras. \defineparagraphs[Two][n=2] \setupparagraphs[Two][1][width=.1\textwidth,style=\bfx,align=tolerant] \setupparagraphs[Two][2][width=.9\textwidth,style=normal,align=tolerant] My difficulty is that while there is only ever just a couple of numbers in the left-hand 'column', the right-hand 'column' may have several lengthy paragraphs. If I have one relatively short \startTwo followed by one that is much longer, it will be forced to start on the next page, leaving too much empty space on the previous page. It is probable that getting this environment to split across pages is not possible. I can try very different approaches (columns, tables) to solve my problem, but I thought I would at least ask first. Julian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Unexpected results with \xmlpos
Hi, I'm getting unexpected results for \xmlpos With the example below, I was expecting to get the following positions: 1 2 3 4 However the result is: 2 4 6 8, i.e. each time it's exactly the double. What am I missing? Background: I need to define column alignment based on the value of the element inside the colgroup, so I was thinking about something like this : \xmlmapvalue{colstyle}{dir: rtl}{align=righttolef } \xmlmapvalue{colstyle}{dir: ltr}{align=lefttoright} \startxmlsetups xml:table:colgroup:col \setupTABLE[c][\xmlpos{#1}][\xmlvalue{colstyle}{\xmlatt{#1}{style}}{}] \stopxmlsetups Best, Denis \startbuffer[test] a b c d a b c d \stopbuffer \startxmlsetups xml:test \xmlsetsetup{\xmldocument}{document}{xml:*} \xmlsetsetup{#1}{table-wrap}{xml:table-wrap} \xmlsetsetup{#1}{table}{xml:table} \stopxmlsetups \xmlregistersetup{xml:test} \startxmlsetups xml:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:table-wrap \startplacetable \xmlflush{#1} \stopplacetable \stopxmlsetups \startxmlsetups xml:table:colgroup %\xmlvalue{colstyle}{\xmlatt{#1}{style}}{} \xmlfilter {#1} {/col/command(xml:table:colgroup:col)} \stopxmlsetups \startxmlsetups xml:table:colgroup:col %\xmlvalue{colstyle}{\xmlatt{#1}{style}}{} \xmlpos {#1} \stopxmlsetups \startxmlsetups xml:table \xmlfilter {#1} {/colgroup/command(xml:table:colgroup)} \bTABLE \xmlfilter{#1}{/thead/command(xml:table:thead)} \xmlfilter{#1}{/tbody/command(xml:table:tbody)} \eTABLE \stopxmlsetups \startxmlsetups xml:table:thead \bTABLEhead \xmlfilter{#1}{/tr/command(xml:table:thead:tr)} \eTABLEhead \stopxmlsetups \startxmlsetups xml:table:thead:tr \bTR \xmlfilter{#1}{/th/command(xml:table:thead:tr:th)} \eTR \stopxmlsetups \startxmlsetups xml:table:thead:tr:th \bTH \xmlflush{#1} \eTH \stopxmlsetups \startxmlsetups xml:table:tbody \bTABLEbody\xmlfilter{#1}{/tr/command(xml:table:tbody:tr)}\eTABLEbody \stopxmlsetups \startxmlsetups xml:table:tbody:tr \bTR\xmlfilter{#1}{/td/command(xml:table:tbody:tr:td)}\eTR \stopxmlsetups \startxmlsetups xml:table:tbody:tr:td \bTC \xmlflush{#1} \eTC \stopxmlsetups \starttext \xmlprocessbuffer{test}{test}{} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] autospacing and colonequals (was Lucida-1.901 (2023-01-21) available)
Hi Hans and Mikael, Thank you both for your attention to my reply and the clarification and hints regarding the comman \colonequals and \setupmathematics[autospacing=yes] Indeed the command \colonequals give the precise expected alignment for the combination glyph « := ». Befors changing the combination « := » to \columnequals in my documents, I am wondering whether one could add a small lua code in order to make an automatic replacement at run time. Actually, since I don’t know of any other instance in which the combination « := » is used to mean something else, would it not be reasonnable to make « := » synonym to \colonequals? I played a little bit with \setupmathematics[autospacing=yes] and it seems to me that without this command one gets automatic spacing in math mode, while with the above command the spacing obeys what has been inserted in the source. Is this behaviour intended, or is there a mismatch between \setupmathematics[autospacing=yes] and \setupmathematics[autospacing=no] Best regards: Otared > On 26 Jan 2023, at 10:33, Hans Hagen via ntg-context <mailto:ntg-context@ntg.nl>> wrote: > > On 1/25/2023 6:24 PM, Mikael Sundqvist via ntg-context wrote: >> On Wed, Jan 25, 2023 at 11:02 AM Otared Kavian via ntg-context >> mailto:ntg-context@ntg.nl>> wrote: >>> >>> Hi, >>> >>> Thanks Hraban for the information and the link to the article by Hans and >>> Mikael about the math fonts in Lucida. >>> >>> I very much appreciated that article: one sees how the handling of almost >>> impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… >>> So a great thank you to Hans and Mikael for all this work! >>> >>> Regarding the details of vertical alignment in math, I wonder whether the >>> column « : » in front of the equal sign « = », in the combination « := » >>> (used to define for instance a new variable) should be alos centered around >>> the math axis, as explained in the article. For instance in the following >>> example >>> >>> \setupbodyfont[lucidaot,12pt] >>> \starttext >>> \startformula >>> f(x) := -(u|x) := - \langle u, x \rangle >>> \stopformula >>> \stopformula >>> \startformula >>> f : A \longrightarrow B >>> \stopformula >>> \stoptext >>> >>> it seems to me that the lower dot (or square…) in the semicolumn of the >>> first formula (in front of the equal sign) is lower than in the second >>> formula. >>> >>> Best regards: Otared >> Thank you for the kind words, Otared, >> Regarding the colons (and other symbols with "dots"), I would say it >> is still not optimal in Lucida (and difficult to make it "consistent", >> there are too many symbols that are at the moment different). But in >> your example you can use \colonequals and \colon if you prefer. They >> are centered around the math axis. >> Best, Mikael >> \setupbodyfont[lucidaot,12pt] >> \starttext >> \startformula >> f(x) := -(u|x) \colonequals - \langle u, x \rangle >> \stopformula >> \startformula >> f : A \longrightarrow B \breakhere >> f \colon A \longrightarrow B >> \stopformula >> \startformula >> \mathaxisbelow := \colonequals : \colon >> \stopformula >> \stoptext > There is a (experimental as we played with it and then got distracted) > feature that makes some symbols adapt to spacing in the input. > > \starttext > >\setupmathematics[autospacing=yes] > >\setupmathematics[collapsing=2] > >\im{A:B} and \im{A : B}\par >\im{A:=B} and \im{A := B}\par >\im{A\colonequals B} and \im{A {\colonequals} B}\par > > \stoptext > > the second line is not yet ok as collapsing the := (old feature) comes at the > wrong time when we do autospacing (something Mikasl and I now need to discuss > and test) > > This autospacing is part of some larger effort, for instance we can also auto > handle fences and so. All this relates to minimizing the input and make it a > bit more natural. Think (1,2) vb (1, 2) where we - due to the many more > classes that we have - want spacing to be right. > > All will be revealed in the upcoming releases and the upcoming 3145 page math > manual. > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> |
Re: [NTG-context] Lucida-1.901 (2023-01-21) available
On 1/25/2023 6:24 PM, Mikael Sundqvist via ntg-context wrote: On Wed, Jan 25, 2023 at 11:02 AM Otared Kavian via ntg-context wrote: Hi, Thanks Hraban for the information and the link to the article by Hans and Mikael about the math fonts in Lucida. I very much appreciated that article: one sees how the handling of almost impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… So a great thank you to Hans and Mikael for all this work! Regarding the details of vertical alignment in math, I wonder whether the column « : » in front of the equal sign « = », in the combination « := » (used to define for instance a new variable) should be alos centered around the math axis, as explained in the article. For instance in the following example \setupbodyfont[lucidaot,12pt] \starttext \startformula f(x) := -(u|x) := - \langle u, x \rangle \stopformula \stopformula \startformula f : A \longrightarrow B \stopformula \stoptext it seems to me that the lower dot (or square…) in the semicolumn of the first formula (in front of the equal sign) is lower than in the second formula. Best regards: Otared Thank you for the kind words, Otared, Regarding the colons (and other symbols with "dots"), I would say it is still not optimal in Lucida (and difficult to make it "consistent", there are too many symbols that are at the moment different). But in your example you can use \colonequals and \colon if you prefer. They are centered around the math axis. Best, Mikael \setupbodyfont[lucidaot,12pt] \starttext \startformula f(x) := -(u|x) \colonequals - \langle u, x \rangle \stopformula \startformula f : A \longrightarrow B \breakhere f \colon A \longrightarrow B \stopformula \startformula \mathaxisbelow := \colonequals : \colon \stopformula \stoptext There is a (experimental as we played with it and then got distracted) feature that makes some symbols adapt to spacing in the input. \starttext \setupmathematics[autospacing=yes] \setupmathematics[collapsing=2] \im{A:B} and \im{A : B}\par \im{A:=B} and \im{A := B}\par \im{A\colonequals B} and \im{A {\colonequals} B}\par \stoptext the second line is not yet ok as collapsing the := (old feature) comes at the wrong time when we do autospacing (something Mikasl and I now need to discuss and test) This autospacing is part of some larger effort, for instance we can also auto handle fences and so. All this relates to minimizing the input and make it a bit more natural. Think (1,2) vb (1, 2) where we - due to the many more classes that we have - want spacing to be right. All will be revealed in the upcoming releases and the upcoming 3145 page math manual. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Lucida-1.901 (2023-01-21) available
On Wed, Jan 25, 2023 at 11:02 AM Otared Kavian via ntg-context wrote: > > Hi, > > Thanks Hraban for the information and the link to the article by Hans and > Mikael about the math fonts in Lucida. > > I very much appreciated that article: one sees how the handling of almost > impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… So > a great thank you to Hans and Mikael for all this work! > > Regarding the details of vertical alignment in math, I wonder whether the > column « : » in front of the equal sign « = », in the combination « := » > (used to define for instance a new variable) should be alos centered around > the math axis, as explained in the article. For instance in the following > example > > \setupbodyfont[lucidaot,12pt] > \starttext > \startformula > f(x) := -(u|x) := - \langle u, x \rangle > \stopformula > \stopformula > \startformula > f : A \longrightarrow B > \stopformula > \stoptext > > it seems to me that the lower dot (or square…) in the semicolumn of the first > formula (in front of the equal sign) is lower than in the second formula. > > Best regards: Otared Thank you for the kind words, Otared, Regarding the colons (and other symbols with "dots"), I would say it is still not optimal in Lucida (and difficult to make it "consistent", there are too many symbols that are at the moment different). But in your example you can use \colonequals and \colon if you prefer. They are centered around the math axis. Best, Mikael \setupbodyfont[lucidaot,12pt] \starttext \startformula f(x) := -(u|x) \colonequals - \langle u, x \rangle \stopformula \startformula f : A \longrightarrow B \breakhere f \colon A \longrightarrow B \stopformula \startformula \mathaxisbelow := \colonequals : \colon \stopformula \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Lucida-1.901 (2023-01-21) available
Hi, Thanks Hraban for the information and the link to the article by Hans and Mikael about the math fonts in Lucida. I very much appreciated that article: one sees how the handling of almost impercebtile details in ConTeXt make us to adhere to and love LuaMetaTeX… So a great thank you to Hans and Mikael for all this work! Regarding the details of vertical alignment in math, I wonder whether the column « : » in front of the equal sign « = », in the combination « := » (used to define for instance a new variable) should be alos centered around the math axis, as explained in the article. For instance in the following example \setupbodyfont[lucidaot,12pt] \starttext \startformula f(x) := -(u|x) := - \langle u, x \rangle \stopformula \stopformula \startformula f : A \longrightarrow B \stopformula \stoptext it seems to me that the lower dot (or square…) in the semicolumn of the first formula (in front of the equal sign) is lower than in the second formula. Best regards: Otared > On 23 Jan 2023, at 09:39, Henning Hraban Ramm via ntg-context > wrote: > > https://tug.org/pipermail/lucida/2023-January/000921.html > > A new version (1.901) of the Lucida OpenType fonts from TUG is > available. As with previous updates, there's no additional charge if > you've already purchased licenses; you can use the same download > information sent to you at the time of purchase to get the new fonts. > (If you've lost the download info, you can email us at > lucida-admin at tug.org.) > > I will append the changes for this release. The same information is also > online at https://tug.org/store/lucida/NEWS.txt. > > To summarize, the most significant changes have been to the math fonts, > especially the regular-weight LucidaBrightMathOT. Many of these changes > were discussed in greater detail in the recent article about Lucida math > by Hans Hagen and Mikael Sundqvist: > https://tug.org/TUGboat/tb43-3/tb135hagen-lucida.pdf > > The four Lucida Sans fonts and the three specialized fonts (Blackletter, > Calligraphy, Handwriting) are not changed at all from the last release > (not even version numbers or dates). All other fonts were changed. > > On behalf of TUG, I thank Hans, Mikael, and Michael Sharpe, who among > them did essentially all of the technical font editing for this > release. And we must thank Chuck Bigelow and Kris Holmes (they approved > this release, as always), without whom nothing could be done. > > Bug reports and character/feature requests are welcome (email to this > list is best), though, as usual, we cannot promise any particular > timeline for the next release. > > Happy typesetting, > Karl [Berry] > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > ___ Otared Kavian e-mail: ota...@gmail.com Phone: +33 6 88 26 70 95 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] A new version of the PocketDiary module and a collection of examples for creating calenders
Hi everybody, I uploaded a new version of the PocketDiary module to the ConTeXt garden. The version 2.2 is providing the calendar functionality as it is presented in PocketMods (https://pocketmod.com/). It includes day, week, month and year tables. There are two variations of the outcome. The first is that the module creates a week calendar with eahc working day on one page and the weekend on one page. The other version allows to setup an individual setup of the pages. This module also comes with a couple of templates for general information keeping. The new version includes also sun and moon data calculations. The latest version now calculates the Daylight Saving Time automatically for America and Europe or none if desired. Next to this I uploaded a collection of calendars based on the PocketDiary module’s machinery. These calendars are typeset either as A6 or A5 sized pages printed on A4 paper and impositioned for making books.. There is also a photo-calender on A4 paper. Calendar types included are: year calendar with 1 day per page, year calendar with 1 week on two facing pages, a menu calendar and a sun and moon data calendar. Also included in this collection is a so called date-driven list generator. This allows to produce lists with any kind of date interval in days for any duration. It allows to adjust the number of columns in the list as well as changing the column heads to the requirements of the list. I hope that some of you might find this helpful. Kind regards Willi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Formula has excess vertical spacing when in two column itemize
Hi List, I am getting better at adjusting the space in enumerations, but I just put a formula inside an enumeration, and the formula’s vertical spacing became excessive. I’m not sure how the enumeration caused this problem. \starttext Evaluate the following derivatives. \startitemize[n, columns, two, nowhite, after] \item\hspace[big] $\frac{d}{dx} x^2$ This is where the solution should be. Text answers look fine, but formulas have too much space above, below and between lines\dots. \item\hspace[big] $\frac{d}{dx}\left( x^3 + 2x \right)$ \item\hspace[big] $\frac{d}{dx}\left( x^{-2} \right)$ \item\hspace[big] $\frac{d}{dt}\left( 4t^4 - 3t^{\onehalf} \right) $ \item\hspace[big] $\frac{d}{dt}( 9 - 3t )$ \startformula\startmathalignment \NC \frac{d}{dt}( 9 - 3t ) \NC= \frac{d}{dt} 9 - \frac{d}{dt} 3t \NR \NC \NC= 0 - 3\frac{d}{dt} t \NR \NC \NC= -3\cdot 1t^0 \NR \NC \NC= -3 \NR \stopmathalignment\stopformula \item\hspace[big] $\frac{d}{dp}\left( p^3 - 2p \right)$ \stopitemize \stoptext I’m also attaching a file with the above issue followed by the correct spacing in one-column for comparison. I’m using LMTX (today’s upload, ver: 2022.10.21 21:13 LMTX fmt: 2022.10.21) on an M1 Mac. Any ideas? Gavin TwoColumnProblems.pdf Description: Adobe PDF document TwoColumnProblems.tex Description: Binary data ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Floating Figure in framed-environment
Dear Uschi Thanks for the example. But unfortunately it behaves similiar. As soon as I want to place the figure to the right by using \placefigure [right]… with floating text to the left. The framed environment behaves strange, i.e. it seems to ignore the image. Just using a centered image works perfectly. I included everything in this code, to show exactly, what is not working. \starttext \framed[corner=round, rulethickness=2pt, width=\textwidth, align=flushleft, offset=1em,background=color,framecolor=black] {{\bf Box with centered image} \blank[medium] \input khatt-en \placefigure[none]{This is an example of a logo.}{\externalfigure[dummy]} } \blank[2cm] \framed[corner=round, rulethickness=2pt, width=\textwidth, align=flushleft, offset=1em,background=color,framecolor=black] {{\bf Faulty box with floating text, image to the right} \blank[medium] \placefigure[right, none]{This is an example of a logo.}{\externalfigure[dummy]} \input khatt-en } \blank[2cm] {\bf Floating text with image to the right, without box} \blank[medium] \placefigure[right, none]{This is an example of a logo.}{\externalfigure[dummy]} \input khatt-en \stoptext Any ideas? Thanks a lot in advance. > Am 19.10.2022 um 13:52 schrieb Ursula Hermann via ntg-context - ntg-context > at ntg.nl : > > Dear Oliver, > > maybe something like this? > This is my example: > \starttext > > \setuppapersize > [A5] > > \setupexternalfigures > [location=default] > > \setupindenting > [yes, small] > > \setupwhitespace > [small] > > \defineframedtext > [prettyblock] > [width=10cm, > indenting={yes, small}, > background=color, backgroundcolor=lightgreen, > foreground=color, foregroundcolor=black, > offset=2mm, > align=flushleft] > > \starttext > > \startprettyblock > \setupindenting[next] > The Earth, as a habitat for animal life, is in old age and has a fatal > illness. Several, in fact. > > It would be happening whether humans had ever evolved or not. > > \placefigure > [][fig:church] > {Stephanus Church.} > {\externalfigure[ma-cb-24][width=.4\textwidth]} > > \stopprettyblock > \setupindenting[next] > Below, we have two separate columns; but up here, for the nonce, we have but > the one. > > \startcolumns [n=2] > Text, text, text \dots > all in the first column > \column > Words, words, words \dots > all in the second column. > And look ye here! Even more words! > \stopcolumns > > \stoptext > > Many regards > Uschi > > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Oliver Sieber > via ntg-context > Gesendet: Mittwoch, 19. Oktober 2022 11:31 > An: ntg-context@ntg.nl > Cc: Oliver Sieber > Betreff: [NTG-context] Floating Figure in framed-environment > > Dear ConTeXt Users > > I am relatively new to context and I am suffering with a problem with the > framed environment. > > I want to use a framed textbox for Definitions in my script. I also want to > use floating figures. But this does not work and I haven’t found out why. > Maybe I totally use it the wrong way. I would appreciate if someone could > help me or has a tipp. > > Here is an example code, where the figure does not behave as expected, i.e. > the figure is behind the text: > > \starttext > \framed[corner=round, rulethickness=2pt, width=\textwidth, align=flushleft, > offset=1em,background=color,framecolor=black] > {{\bf Definition: Hello World} \blank[medium] > > \placefigure[right, none]{This is an example of a > logo.}{\externalfigure[dummy]} > > Carrot cake tiramisu lollipop dragée lollipop marshmallow carrot cake sweet > pastry. Tiramisu danish jelly tootsie roll tart gummi bears. Carrot cake > chupa chups cake wafer lemon drops lemon drops tiramisu. Chocolate lemon > drops sugar plum cheesecake jelly beans sugar plum. Tootsie roll cupcake > jujubes pie chocolate bar bear claw chupa chups shortbread. Candy candy canes > jelly-o jelly beans sugar plum muffin danish donut. Bonbon lemon drops powder > jujubes marshmallow biscuit halvah. Powder carrot cake caramels chocolate > cake carrot cake jelly-o. Topping danish tootsie roll gummi bears oat cake > jujubes. Sweet candy canes cotton candy pie topping. Jelly-o carrot cake ice > cream lemon drops macaroon gummies lemon drops tiramisu chocolate cake. > Cupcake sugar plum shortbread gummi bears tootsie roll. Chocolate cake sugar > plum macaroon candy canes chocolate bar donut cake icing tootsie roll. > } > \stoptext > > > Best regards > Oli > ___ > If your
Re: [NTG-context] Floating Figure in framed-environment
Dear Oliver, maybe something like this? This is my example: \starttext \setuppapersize [A5] \setupexternalfigures [location=default] \setupindenting [yes, small] \setupwhitespace [small] \defineframedtext [prettyblock] [width=10cm, indenting={yes, small}, background=color, backgroundcolor=lightgreen, foreground=color, foregroundcolor=black, offset=2mm, align=flushleft] \starttext \startprettyblock \setupindenting[next] The Earth, as a habitat for animal life, is in old age and has a fatal illness. Several, in fact. It would be happening whether humans had ever evolved or not. \placefigure [][fig:church] {Stephanus Church.} {\externalfigure[ma-cb-24][width=.4\textwidth]} \stopprettyblock \setupindenting[next] Below, we have two separate columns; but up here, for the nonce, we have but the one. \startcolumns [n=2] Text, text, text \dots all in the first column \column Words, words, words \dots all in the second column. And look ye here! Even more words! \stopcolumns \stoptext Many regards Uschi -Ursprüngliche Nachricht- Von: ntg-context Im Auftrag von Oliver Sieber via ntg-context Gesendet: Mittwoch, 19. Oktober 2022 11:31 An: ntg-context@ntg.nl Cc: Oliver Sieber Betreff: [NTG-context] Floating Figure in framed-environment Dear ConTeXt Users I am relatively new to context and I am suffering with a problem with the framed environment. I want to use a framed textbox for Definitions in my script. I also want to use floating figures. But this does not work and I haven’t found out why. Maybe I totally use it the wrong way. I would appreciate if someone could help me or has a tipp. Here is an example code, where the figure does not behave as expected, i.e. the figure is behind the text: \starttext \framed[corner=round, rulethickness=2pt, width=\textwidth, align=flushleft, offset=1em,background=color,framecolor=black] {{\bf Definition: Hello World} \blank[medium] \placefigure[right, none]{This is an example of a logo.}{\externalfigure[dummy]} Carrot cake tiramisu lollipop dragée lollipop marshmallow carrot cake sweet pastry. Tiramisu danish jelly tootsie roll tart gummi bears. Carrot cake chupa chups cake wafer lemon drops lemon drops tiramisu. Chocolate lemon drops sugar plum cheesecake jelly beans sugar plum. Tootsie roll cupcake jujubes pie chocolate bar bear claw chupa chups shortbread. Candy candy canes jelly-o jelly beans sugar plum muffin danish donut. Bonbon lemon drops powder jujubes marshmallow biscuit halvah. Powder carrot cake caramels chocolate cake carrot cake jelly-o. Topping danish tootsie roll gummi bears oat cake jujubes. Sweet candy canes cotton candy pie topping. Jelly-o carrot cake ice cream lemon drops macaroon gummies lemon drops tiramisu chocolate cake. Cupcake sugar plum shortbread gummi bears tootsie roll. Chocolate cake sugar plum macaroon candy canes chocolate bar donut cake icing tootsie roll. } \stoptext Best regards Oli ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How to make something appear to the right of every paragraph?
Hello Max, It is preferred if the solution is just three lines per paragraph, rather than some content parallel to the text...I'll be modifying whatever solution to fix a bunch of other situations (e.g. display a box next to each paragraph). --Joel On Monday, October 10, 2022 at 12:24:03 AM MDT, Max Chernoff wrote: Hi Joel, > I'd like to add some area for readers to write in the margins of some > text. This would leave three lines, like this to the right of the > text. Is it okay if there are rules continuously down the right column? If so, this is fairly simple to do with layers/backgrounds + MetaFun. If you want for there to be exactly three rules per paragraph, then that is more complicated. I can think of some bad solutions (\everypar, Lua callbacks), but I'll leave it to someone else to think of a good solution. Thanks, -- Max ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] How to make something appear to the right of every paragraph?
Hi Joel, > I'd like to add some area for readers to write in the margins of some > text. This would leave three lines, like this to the right of the > text. Is it okay if there are rules continuously down the right column? If so, this is fairly simple to do with layers/backgrounds + MetaFun. If you want for there to be exactly three rules per paragraph, then that is more complicated. I can think of some bad solutions (\everypar, Lua callbacks), but I'll leave it to someone else to think of a good solution. Thanks, -- Max ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] \startcolumnset ... \stopcolumnset is working.
Dear all, I didn’t test “\startcolumnset … \stopcolumnset” for some time, because I got error whenever I tested it under Mac OS Big Sur. However, two days ago, I tested it, and found that it was working. I install updated version today and run a test file again. Finally, I get an output without error! I don't know what is happened, but it is a good news. Here is a sample file which I simplified one that is given by one of the experts. Someone may modify it better. Thanks to ConTeXt team. Best regards, Dalyoung \startuseMPgraphic{squareBox} draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm; draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm; draw rightboundary OverlayBox shifted (1mm,0); draw leftboundary OverlayBox shifted (-1mm,0); \stopuseMPgraphic \defineoverlay [headerBox] [\useMPgraphic{squareBox}] \startuseMPgraphic{verticalrule3} draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: shifted(-2mm,0) fi ; draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: shifted(2mm,0) fi ; draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm; \stopuseMPgraphic \defineoverlay [verticalrule] [\useMPgraphic{verticalrule3}] \definecolumnset [exam] [n=2, background=verticalrule] \setuplayout[width=19cm, height=26cm, header=1cm, footer=.5cm,backspace=1cm] \setupheader[before=\vfil, after=\vfil] \setupbackgrounds[header][text][frame=off, background=headerBox, align=lohi]%topframe= \setupbackgrounds[footer][text][frame=off, background=screen] \define[3]\headTitle{\setupheadertexts[][\bf #1 \hfill #2 \hfill #3 \hfill ID: \hskip 2cm Name: \hskip 2cm]} \setupmathematics[autopunctuation=no, integral=nolimits] \setupbodyfont[rm,10pt] \setuppagenumbering[location=footer] \setupcolors[state=start] %\setupexternalfigure[directory={/Users/graph/Documents/figures,}] \headTitle{2021. 12. 12.}{Set Theory}{Final Exam} \starttext \startcolumnset[exam] \startitemize[n] \item The first problem. \column \item The second problem. \column \item The third problem. \column \item The third problem. \stopitemize \stopcolumnset \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate
> -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von Henning > Hraban Ramm via ntg-context > Gesendet: Freitag, 26. August 2022 23:27 > An: Denis Maier via ntg-context > Cc: Henning Hraban Ramm > Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas > via tabulate > > Am 26.08.22 um 22:00 schrieb Denis Maier via ntg-context: > > Hi, > > > > I need to typeset two poems side by side. Usually, I use the tabulate > > environment for typesetting parallel texts. However, for poems this > > does not quite work as tabulate does not seem to allow blanks between > > the stanzas. See MWE below. Am I missing someting? Is there a better > > way to achieve this? > > How about columnsets or paragraphs? > > \definecolumnset[Zwei][n=2] > \startcolumnset[Zwei] > \startlines > Starlight, star bright, > first star I see tonight; > \stoplines > \column > \startlines > I wish I may, I wish I might > have the wish I wish tonight. > \stoplines > \stopcolumnset > > > \defineparagraphs[Zwei][n=2] > \setupparagraphs[Zwei][1][ >width=.45\textwidth, distance=2em, >align={verytolerant,stretch}] > % width of 2nd column is calculated automatically > > \startZwei > ... > \nextZwei > ... > \stopZwei > > Ok, I've had a chance to look into this. Maybe I'm missing something, but paragraphs cannot be split across pages. Is that correct? That's a bit of a problem. As for columnsets, they seem to change the output routine for the entire page. Also not ideal in this case. Denis ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate
Thanks. I'll try that. But, iirc, these had some other drawbacks I'll check if it works for my use case. Is there a way to have blanks in the tabulate? Denis Von: ntg-context im Auftrag von Henning Hraban Ramm via ntg-context Gesendet: Freitag, 26. August 2022 23:26:56 An: Denis Maier via ntg-context Cc: Henning Hraban Ramm Betreff: Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate Am 26.08.22 um 22:00 schrieb Denis Maier via ntg-context: > Hi, > > I need to typeset two poems side by side. Usually, I use the tabulate > environment for typesetting parallel texts. However, for poems this does > not quite work as tabulate does not seem to allow blanks between the > stanzas. See MWE below. Am I missing someting? Is there a better way to > achieve this? How about columnsets or paragraphs? \definecolumnset[Zwei][n=2] \startcolumnset[Zwei] \startlines Starlight, star bright, first star I see tonight; \stoplines \column \startlines I wish I may, I wish I might have the wish I wish tonight. \stoplines \stopcolumnset \defineparagraphs[Zwei][n=2] \setupparagraphs[Zwei][1][ width=.45\textwidth, distance=2em, align={verytolerant,stretch}] % width of 2nd column is calculated automatically \startZwei ... \nextZwei ... \stopZwei Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Parallel texts: verse with blanks between stanzas via tabulate
Am 26.08.22 um 22:00 schrieb Denis Maier via ntg-context: Hi, I need to typeset two poems side by side. Usually, I use the tabulate environment for typesetting parallel texts. However, for poems this does not quite work as tabulate does not seem to allow blanks between the stanzas. See MWE below. Am I missing someting? Is there a better way to achieve this? How about columnsets or paragraphs? \definecolumnset[Zwei][n=2] \startcolumnset[Zwei] \startlines Starlight, star bright, first star I see tonight; \stoplines \column \startlines I wish I may, I wish I might have the wish I wish tonight. \stoplines \stopcolumnset \defineparagraphs[Zwei][n=2] \setupparagraphs[Zwei][1][ width=.45\textwidth, distance=2em, align={verytolerant,stretch}] % width of 2nd column is calculated automatically \startZwei ... \nextZwei ... \stopZwei Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Keep the right margin in [nothyphenated, flushleft] columns
Thank you, Denis. \setupalign[nothyphenated,flushleft,stretch] fixes the problem of overfull lines. Marcin sob., 13 sie 2022 o 00:17 Denis Maier via ntg-context napisał(a): > Also stretch might be useful as an additional option for align. > > Denis > > > Von: ntg-context im Auftrag von Aditya > Mahajan via ntg-context > Gesendet: Freitag, 12. August 2022 23:11:21 > An: Marcin Ciura via ntg-context > Cc: Aditya Mahajan > Betreff: Re: [NTG-context] Keep the right margin in [nothyphenated, > flushleft] columns > > On Fri, 12 Aug 2022, Marcin Ciura via ntg-context wrote: > > > Dear list, > > > > I am typesetting [nothyphenated,flushleft] text in two columns. Some > words > > stick through the right margin of the left column, sometimes even > > overlapping the right column. How can I make Context obey the right > margin? > > (Untested): Try adding 'tolerant' or 'verytolerant' to the align options. > > Aditya > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://www.ntg.nl/mailman/listinfo/ntg-context > webpage : https://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : https://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Keep the right margin in [nothyphenated, flushleft] columns
Also stretch might be useful as an additional option for align. Denis Von: ntg-context im Auftrag von Aditya Mahajan via ntg-context Gesendet: Freitag, 12. August 2022 23:11:21 An: Marcin Ciura via ntg-context Cc: Aditya Mahajan Betreff: Re: [NTG-context] Keep the right margin in [nothyphenated, flushleft] columns On Fri, 12 Aug 2022, Marcin Ciura via ntg-context wrote: > Dear list, > > I am typesetting [nothyphenated,flushleft] text in two columns. Some words > stick through the right margin of the left column, sometimes even > overlapping the right column. How can I make Context obey the right margin? (Untested): Try adding 'tolerant' or 'verytolerant' to the align options. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Keep the right margin in [nothyphenated, flushleft] columns
On Fri, 12 Aug 2022, Marcin Ciura via ntg-context wrote: > Dear list, > > I am typesetting [nothyphenated,flushleft] text in two columns. Some words > stick through the right margin of the left column, sometimes even > overlapping the right column. How can I make Context obey the right margin? (Untested): Try adding 'tolerant' or 'verytolerant' to the align options. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___