[NTG-context] underbraces get progressively more misaligned (w/ minimal example)
It does also depend on the width of the text because when I use 48pt in the example below the height of the brace is always the same but with 49pt the height increases after the first page. An experiment: width = 48.0719985pt height = 4.968pt (constant) width = 48.0719986pt height = unpredictable various values Best regards, Akira ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Creating PDF/A compliant files with mkiv
Dear all, With the precious help of Luigi Scarso I created a wiki page about how to create a PDF/A file with mkiv: http://wiki.contextgarden.net/PDF/A Please complete it or report any error in the instructions given there. Best regards: OK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] underbraces get progressively more misaligned (w/ minimal example)
On 7/4/2014 9:12 AM, Akira Kakuto wrote: It does also depend on the width of the text because when I use 48pt in the example below the height of the brace is always the same but with 49pt the height increases after the first page. An experiment: width = 48.0719985pt height = 4.968pt (constant) width = 48.0719986pt height = unpredictable various values So now we need to figure out where it comes from; maybe some math parameter get messed up ... it has to do with the mechanism that builds extensibles from snippets (begin - connector - middle - connector - end glyphs). Depending on the width this goes in steps: first fixed prebuild glyphs, later extensibles. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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 / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Placing (numbered) figures side-by-side
Hi, When placing figures side-by-side I usually use \placefigure[force][label]{}{\startcombination[2*1] {\externalfigure[A]}{Some description of A} {\externalfigure[B]}{Some description of B} \stopcombination} But this time I would like to get two separate figures with two separate titles: [figure][figure] Figure 1.1: Long description of A Figure 1.2: Long description of B with those long descriptions being justified (they split in multiple line already), not centered. What is the best way to achieve that? Thank you, Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] underbraces get progressively more misaligned (w/ minimal example)
On 7/4/2014 6:58 AM, Wolfgang Schuster wrote: Am 04.07.2014 um 00:51 schrieb Hans Hagen pra...@wxs.nl mailto:pra...@wxs.nl: On 7/4/2014 12:37 AM, Sanjoy Mahajan wrote: context --make does a --generate so you can skip that and the luatools run is not needed either (selfupdate is seldom needed too) So 'context --make' is all one needs? I'll update the wiki. we get a ..5pt height difference somewhere (nothing else different in a trace) smells like a luatex bug (testing that now) That is my suspicion as well. But I couldn't reproduce it with plain luatex. Though maybe I needed to use equation numbers, however that is done in plain tex (the context run doesn't show the problem without the \placeformula). I suspect some internal state is getting slightly corrupted and getting progressively worse with the 30,000 repetitions. here it happens after a pagebreak (a few lines overflow are ok) It does also depend on the width of the text because when I use 48pt in the example below the height of the brace is always the same but with 49pt the height increases after the first page. \starttext \dorecurse{100} {\startformula \mathord {%\setbox\scratchbox\mathstylehbox{\Umathaccent\fam\zerocountFE3DF{\hskip48pt}}% \setbox\scratchbox\mathstylehbox{\Umathaccent\fam\zerocountFE3DF{\hskip49pt}}% \the\userpageno:\the\ht\scratchbox}% \stopformula} \stoptext \starttext \dorecurse{1000} {\setbox\scratchbox\hbox{$\Umathaccent\fam\zerocountFE3DF{\hskip49pt}$}% \the\ht\scratchbox\par} \stoptext that was the one i used when seeing some trigger from the page break (the two at the top of page 2 are the overshoot before tex triggers the page) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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 / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] underbraces get progressively more misaligned (w/ minimal example)
Wolfgang Schuster schuster.wolfg...@gmail.com writes: It does also depend on the width of the text because when I use 48pt in the example below the height of the brace is always the same but with 49pt the height increases after the first page. An interesting bug. That's also consistent with my experiments, in which \underbrace{\hbox{ }}_{\rho} triggers the problem, but \underbrace{\hbox{}}_{\rho} does not. -Sanjoy ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Placing (numbered) figures side-by-side
Am 04.07.2014 um 10:21 schrieb Mojca Miklavec mojca.miklavec.li...@gmail.com: Hi, When placing figures side-by-side I usually use \placefigure[force][label]{}{\startcombination[2*1] {\externalfigure[A]}{Some description of A} {\externalfigure[B]}{Some description of B} \stopcombination} But this time I would like to get two separate figures with two separate titles: [figure][figure] Figure 1.1: Long description of A Figure 1.2: Long description of B with those long descriptions being justified (they split in multiple line already), not centered. What is the best way to achieve that? Use the floatcombination environment. \useMPlibrary[dum] \starttext \startplacefigure[location=nonumber] \startfloatcombination%[width=\textwidth,distance=0pt] \startplacefigure[title={Some description of A}] %\externalfigure[A][width=4cm] \framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[A][width=4cm]} \stopplacefigure \startplacefigure[title={Some description of B}] %\externalfigure[B][width=4cm] \framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[B][width=4cm]} \stopplacefigure \stopfloatcombination \stopplacefigure \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Placing (numbered) figures side-by-side
On Fri, Jul 4, 2014 at 4:13 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 04.07.2014 um 10:21 schrieb Mojca Miklavec mojca.miklavec.li...@gmail.com: Hi, When placing figures side-by-side I usually use \placefigure[force][label]{}{\startcombination[2*1] {\externalfigure[A]}{Some description of A} {\externalfigure[B]}{Some description of B} \stopcombination} But this time I would like to get two separate figures with two separate titles: [figure][figure] Figure 1.1: Long description of A Figure 1.2: Long description of B with those long descriptions being justified (they split in multiple line already), not centered. What is the best way to achieve that? Use the floatcombination environment. \useMPlibrary[dum] \starttext \startplacefigure[location=nonumber] \startfloatcombination%[width=\textwidth,distance=0pt] \startplacefigure[title={Some description of A}] %\externalfigure[A][width=4cm] \framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[A][width=4cm]} \stopplacefigure \startplacefigure[title={Some description of B}] %\externalfigure[B][width=4cm] \framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[B][width=4cm]} \stopplacefigure \stopfloatcombination \stopplacefigure \stoptext Thank you, but there are some serious problems with the layout. I managed to find some very dirty workaround, so I can get the desired effect, but nonetheless: - titles are wider than the figure, so titles from left and right overlap; what I ended up doing was \framed[frame=off,offset=none,width=.2\textwidth]{\externalfigure[cow][width=.4\textwidth]} - titles are of different length (and have a different number of lines), so I need to manually add \crlf in one of the titles to achieve equal height and proper alignment; - width=... and distance=... are weird; once I set some width, distance only shifts the right figure outside of the page margin Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Placing (numbered) figures side-by-side
On Fri, Jul 4, 2014 at 5:31 PM, Mojca Miklavec wrote: On Fri, Jul 4, 2014 at 4:13 PM, Wolfgang Schuster wrote: Am 04.07.2014 um 10:21 schrieb Mojca Miklavec : Hi, When placing figures side-by-side I usually use \placefigure[force][label]{}{\startcombination[2*1] {\externalfigure[A]}{Some description of A} {\externalfigure[B]}{Some description of B} \stopcombination} But this time I would like to get two separate figures with two separate titles: [figure][figure] Figure 1.1: Long description of A Figure 1.2: Long description of B with those long descriptions being justified (they split in multiple line already), not centered. What is the best way to achieve that? Use the floatcombination environment. \useMPlibrary[dum] \starttext \startplacefigure[location=nonumber] \startfloatcombination%[width=\textwidth,distance=0pt] \startplacefigure[title={Some description of A}] %\externalfigure[A][width=4cm] \framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[A][width=4cm]} \stopplacefigure \startplacefigure[title={Some description of B}] %\externalfigure[B][width=4cm] \framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[B][width=4cm]} \stopplacefigure \stopfloatcombination \stopplacefigure \stoptext Thank you, but there are some serious problems with the layout. I managed to find some very dirty workaround, so I can get the desired effect, but nonetheless: - titles are wider than the figure, so titles from left and right overlap; what I ended up doing was \framed[frame=off,offset=none,width=.2\textwidth]{\externalfigure[cow][width=.4\textwidth]} - titles are of different length (and have a different number of lines), so I need to manually add \crlf in one of the titles to achieve equal height and proper alignment; - width=... and distance=... are weird; once I set some width, distance only shifts the right figure outside of the page margin Here's an example: \starttext \startplacefigure[location=nonumber] \startfloatcombination[2*1] \startplacefigure[title={This is some text spanning two lines. Some text spanning two lines.}] \framed[width=.4\textwidth,height=3cm]{} \stopplacefigure \startplacefigure[title={This is some text spanning four lines. Some text spanning four lines. Some text spanning four lines. Some text spanning four lines.}] \framed[width=.4\textwidth,height=3cm]{} \stopplacefigure \stopfloatcombination \stopplacefigure \startplacefigure[location=nonumber] \startfloatcombination[width=\textwidth,distance=5cm] \startplacefigure[title={This is some text spanning two lines. Some text spanning two lines.}] \framed[width=.4\textwidth,height=3cm]{} \stopplacefigure \startplacefigure[title={This is some text spanning four lines. Some text spanning four lines. Some text spanning four lines. Some text spanning four lines.}] \framed[width=.4\textwidth,height=3cm]{} \stopplacefigure \stopfloatcombination \stopplacefigure \input tufte \stoptext Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Placing (numbered) figures side-by-side
Am 04.07.2014 um 17:31 schrieb Mojca Miklavec mojca.miklavec.li...@gmail.com: On Fri, Jul 4, 2014 at 4:13 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 04.07.2014 um 10:21 schrieb Mojca Miklavec mojca.miklavec.li...@gmail.com: Hi, When placing figures side-by-side I usually use \placefigure[force][label]{}{\startcombination[2*1] {\externalfigure[A]}{Some description of A} {\externalfigure[B]}{Some description of B} \stopcombination} But this time I would like to get two separate figures with two separate titles: [figure][figure] Figure 1.1: Long description of A Figure 1.2: Long description of B with those long descriptions being justified (they split in multiple line already), not centered. What is the best way to achieve that? Use the floatcombination environment. \useMPlibrary[dum] \starttext \startplacefigure[location=nonumber] \startfloatcombination%[width=\textwidth,distance=0pt] \startplacefigure[title={Some description of A}] %\externalfigure[A][width=4cm] \framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[A][width=4cm]} \stopplacefigure \startplacefigure[title={Some description of B}] %\externalfigure[B][width=4cm] \framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[B][width=4cm]} \stopplacefigure \stopfloatcombination \stopplacefigure \stoptext Thank you, but there are some serious problems with the layout. I managed to find some very dirty workaround, so I can get the desired effect, but nonetheless: - titles are wider than the figure, so titles from left and right overlap; what I ended up doing was \framed[frame=off,offset=none,width=.2\textwidth]{\externalfigure[cow][width=.4\textwidth]} - titles are of different length (and have a different number of lines), so I need to manually add \crlf in one of the titles to achieve equal height and proper alignment; - width=... and distance=... are weird; once I set some width, distance only shifts the right figure outside of the page margin The caption can be forced to the same width as the image with the \setupcaption command, the vertical alignment of the images/text can be controlled with the location key but you have to ensure both images have the same height. \useMPlibrary[dum] \starttext \startplacefigure[location=nonumber] \setupcaption[figure][width=max] \startfloatcombination[location=top] \startplacefigure[title={Some description of A which spans multiple lines}] \externalfigure[A][width=4cm] %\framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[A][width=4cm]} \stopplacefigure \startplacefigure[title={Some description of B}] \externalfigure[B][width=4cm] %\framed[frame=off,offset=none,width=.5\textwidth]{\externalfigure[B][width=4cm]} \stopplacefigure \stopfloatcombination \stopplacefigure \stoptext Wolfgang___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Placing (numbered) figures side-by-side
Am 04.07.2014 um 18:05 schrieb Mojca Miklavec mojca.miklavec.li...@gmail.com: My figures are of the same height, so location=top is OK. (Can one combine location=top with [3*1]“?) You can set the number of rows and columns with the nx and ny keys, e.g. \startfloatcombination[location=top,nx=3,ny=1] Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] underbraces get progressively more misaligned (w/ minimal example)
On 7/4/2014 11:34 AM, Sanjoy Mahajan wrote: Wolfgang Schuster schuster.wolfg...@gmail.com writes: It does also depend on the width of the text because when I use 48pt in the example below the height of the brace is always the same but with 49pt the height increases after the first page. An interesting bug. That's also consistent with my experiments, in which \underbrace{\hbox{ }}_{\rho} triggers the problem, but \underbrace{\hbox{}}_{\rho} does not. Hi Sanjoy, After a day of testing, tracing, wondering etc Luigi and I figured out what was the problem it tooks us lots of debug prints -). Indeed there is a bug in luatex. An extensible is made up of a sequence char skip 0pt- xpt char skip 0pt- xpt char skip 0pt- xpt char And the code that determines the height/depth took the dimensions of skips into the equation while in fact glue has no such dimensions (leaders that are a special kind of glue have dimensions). Not the first place one looks for such an issue. Probably a side effect of copying a function and patching part. So, some random value (not entirely random as it depends on what mem area the glue node is allocated from and that is kind of stable in a run) was added which results in the effects you noticed. Because it is stable within a run (same successive errors) it doesn't result in oscillating (too many runs due to differences in results) and this is probably why it went unnoticed so long. Interesting. (Normally the pseudo random ht/dp were small.) So, once this fix moves upstream you can check your suspicious cases. Luigi will push it in our experimental branch and I suppose that Taco will then push it into trunk and after that you can compile or wait till the garden carries it. Thanks for noticing! Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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 / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] ToC depth (and headers) per section block
How can I specify different section depths for different parts in a document in the TOC? That is, if the document structure is: Front Matter Body Matter Part 1 Chapter 1 Section 1 Chapter 2 Section 1 Section 2 Part 2 Chapter 1 Section 1 Section 2 Chapter 2 Section 1 Appendices Chapter 1 Section 1 Chapter 2 Section 1 Back Matter Notes Bibliography How can I generate chapter and section entriess in the TOC for Part 1, but chapter entries only (no section entries) for Part 2 and the Appendices. I currently do this by defining a new header equivalent to section and using that for Part 2 and Appendix sections. Since it is not included in the lists used by the contents combinedlist, it does not get set. Is this the best way to do this? If instead I want one depth for all body matter parts and a different depth for the appendices, is there a solution that could be keyed on system modes or on section blocks, thus moving all of the styling to the preamble (to use a LaTeX term)? I currently do that to support different header formats in the body matter and appendices, using the following method, but I suspect that there may be a more effective way to do that as well. \startsetups[Header] \startallmodes[print,*bodypart] {\color[PrintHeaderColor]{\PrintHeaderFont {\llap{\getmarking[chapternumber]~}\getmarking[chapter]}} \stopallmodes \startallmodes[print,*appendix] \color[PrintHeaderColor]{\PrintHeaderFont {\getmarking[chapter]}} \stopallmodes \stopsetups \setupheadertexts [] \setupheadertexts [\setups{Header}][][][\setups{Header}] Again, I prefer a method that can be implemented in the preamble. (MKIV only.) -- Rik Kabel ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___