Re: [NTG-context] Linespacing in TOC
On 2013-11-23 Jan Tosovsky wrote: On 2013-11-22 Hans Hagen wrote: On 11/22/2013 9:44 PM, Jan Tosovsky wrote: On 2013-11-20 Hans Hagen wrote: On 11/19/2013 11:48 PM, Jan Tosovsky wrote: I'd like to tweak a default TOC linespacing... \title{Table of Contents} \start \setupinterlinespace[line=0.8ex] \placecontent \stop But as I found, any value below 2.8ex causes interline inconsistencies when special cases appears, see the extreme below: \starttext \start \setupinterlinespace[line=1.0ex] \placecontent \stop \chapter{}. % line without descenders \chapter{}. % line with descenders \chapter{}. % the result is an inconsistent baseline \stoptext Is there any remedy for this? Can I fix the baseline distance somehow? \definegridsnapping[crap] [fit,0.2] \setuplayout[grid=crap] This helps! But... it breaks something else :-( I've finally found an acceptable solution. During my tests I found a crucial difference between: \setupinterlinespace[line=2.0ex] and \setupinterlinespace[0.25] The latter sets the baseline distance correctly even without that problematic snapping to the grid! All lines in my book have a certain (default) linespacing. TOC entries are rendered (by default) using bigger linespacing. Btw, is there any option to override a default (huge) TOC linespacing? I still consider my solution rather a hack. Regards, Jan ___ 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] Linespacing in TOC
On 11/23/2013 12:16 PM, Jan Tosovsky wrote: On 2013-11-23 Jan Tosovsky wrote: On 2013-11-22 Hans Hagen wrote: On 11/22/2013 9:44 PM, Jan Tosovsky wrote: On 2013-11-20 Hans Hagen wrote: On 11/19/2013 11:48 PM, Jan Tosovsky wrote: I'd like to tweak a default TOC linespacing... \title{Table of Contents} \start \setupinterlinespace[line=0.8ex] \placecontent \stop But as I found, any value below 2.8ex causes interline inconsistencies when special cases appears, see the extreme below: \starttext \start \setupinterlinespace[line=1.0ex] \placecontent \stop \chapter{}. % line without descenders \chapter{}. % line with descenders \chapter{}. % the result is an inconsistent baseline \stoptext Is there any remedy for this? Can I fix the baseline distance somehow? \definegridsnapping[crap] [fit,0.2] \setuplayout[grid=crap] This helps! But... it breaks something else :-( I've finally found an acceptable solution. During my tests I found a crucial difference between: \setupinterlinespace[line=2.0ex] and \setupinterlinespace[0.25] The latter sets the baseline distance correctly even without that problematic snapping to the grid! All lines in my book have a certain (default) linespacing. TOC entries are rendered (by default) using bigger linespacing. Btw, is there any option to override a default (huge) TOC linespacing? I still consider my solution rather a hack. just set 'before' and 'after' normally linespacing in the toc is the same as in the rest of the document unless one has assigned to before/after -- - 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] Linespacing in TOC
On 2013-11-23 Hans Hagen wrote: On 11/23/2013 12:16 PM, Jan Tosovsky wrote: On 2013-11-23 Jan Tosovsky wrote: On 2013-11-22 Hans Hagen wrote: On 11/22/2013 9:44 PM, Jan Tosovsky wrote: On 2013-11-20 Hans Hagen wrote: On 11/19/2013 11:48 PM, Jan Tosovsky wrote: I'd like to tweak a default TOC linespacing... \title{Table of Contents} \start \setupinterlinespace[line=0.8ex] \placecontent \stop But as I found, any value below 2.8ex causes interline inconsistencies when special cases appears, see the extreme below: \starttext \start \setupinterlinespace[line=1.0ex] \placecontent \stop \chapter{}. % line without descenders \chapter{}. % line with descenders \chapter{}. % the result is an inconsistent baseline \stoptext Is there any remedy for this? Can I fix the baseline distance somehow? \definegridsnapping[crap] [fit,0.2] \setuplayout[grid=crap] This helps! But... it breaks something else :-( I've finally found an acceptable solution. During my tests I found a crucial difference between: \setupinterlinespace[line=2.0ex] and \setupinterlinespace[0.25] The latter sets the baseline distance correctly even without that problematic snapping to the grid! All lines in my book have a certain (default) linespacing. TOC entries are rendered (by default) using bigger linespacing. Btw, is there any option to override a default (huge) TOC linespacing? I still consider my solution rather a hack. just set 'before' and 'after' Ok. I haven't realize that. normally linespacing in the toc is the same as in the rest of the document unless one has assigned to before/after This example shows different behaviour: \showgrid \starttext \start \placecontent \stop \chapter{}Foo Bar \chapter{}. \chapter{}. \stoptext On my computer the TOC linespacing is almost twice as big as that in the paragraph. Jan ___ 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] Linespacing in TOC
On 11/23/2013 1:44 PM, Jan Tosovsky wrote: On 2013-11-23 Hans Hagen wrote: On 11/23/2013 12:16 PM, Jan Tosovsky wrote: On 2013-11-23 Jan Tosovsky wrote: On 2013-11-22 Hans Hagen wrote: On 11/22/2013 9:44 PM, Jan Tosovsky wrote: On 2013-11-20 Hans Hagen wrote: On 11/19/2013 11:48 PM, Jan Tosovsky wrote: I'd like to tweak a default TOC linespacing... \title{Table of Contents} \start \setupinterlinespace[line=0.8ex] \placecontent \stop But as I found, any value below 2.8ex causes interline inconsistencies when special cases appears, see the extreme below: \starttext \start \setupinterlinespace[line=1.0ex] \placecontent \stop \chapter{}. % line without descenders \chapter{}. % line with descenders \chapter{}. % the result is an inconsistent baseline \stoptext Is there any remedy for this? Can I fix the baseline distance somehow? \definegridsnapping[crap] [fit,0.2] \setuplayout[grid=crap] This helps! But... it breaks something else :-( I've finally found an acceptable solution. During my tests I found a crucial difference between: \setupinterlinespace[line=2.0ex] and \setupinterlinespace[0.25] The latter sets the baseline distance correctly even without that problematic snapping to the grid! All lines in my book have a certain (default) linespacing. TOC entries are rendered (by default) using bigger linespacing. Btw, is there any option to override a default (huge) TOC linespacing? I still consider my solution rather a hack. just set 'before' and 'after' Ok. I haven't realize that. normally linespacing in the toc is the same as in the rest of the document unless one has assigned to before/after This example shows different behaviour: \showgrid \starttext \start \placecontent \stop \chapter{}Foo Bar \chapter{}. \chapter{}. \stoptext On my computer the TOC linespacing is almost twice as big as that in the paragraph. if the grid is on that can indeed be the case but only if there are lines with lineheight so that's why you can use less strict options (older mails) 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] Linespacing in TOC
On 11/22/2013 9:44 PM, Jan Tosovsky wrote: On 2013-11-20 Hans Hagen wrote: On 11/19/2013 11:48 PM, Jan Tosovsky wrote: I'd like to tweak a default TOC linespacing... I've 'invented' this: \setupcombinedlist[content][list=chapter, alternative=c] \starttext \title{Table of Contents} \setupinterlinespace[line=0.8ex] % too small, just for testing \placecontent \setupinterlinespace[line=2.75ex] %\setupinterlinespace[reset] \startfrontmatter \chapter{Intro}text text text \startfrontmatter \startbodymatter \chapter{Chapter}text \stopbodymatter \startbackmatter \chapter{Appendix}text \stopbackmatter \stoptext I cannot use simply the \completecontent command as the linespacing is effective already between the title and the first entry line... so I am splitting the title and the rest and set the linespacing just before list rendering. Finally I am resetting the value manually. Are there better ways to tweak linespacing in TOC ? \title{Table of Contents} \start \setupinterlinespace[line=0.8ex] % too small, just for testing \placecontent \stop Thanks for the hint. But as I found, any value below 2.8ex causes interline inconsistencies when special cases appears, see the extreme below: \starttext \start \setupinterlinespace[line=1.0ex] \placecontent \stop \chapter{}. % line without descenders precedes a line without ascenders \chapter{}. % line with descenders is followed with a line with ascenders \chapter{}. % the result is an inconsistent baseline distance \stoptext Is there any remedy for this? Can I fix the baseline distance somehow? I have such cases in my TOC :-( (but not so extreme as here) \definegridsnapping[crap] [fit,0.2] \setuplayout[grid=crap] but if you really need that kind of tweaks you might consider using a better font: if interlinespace is too small you will never get nice results you can try to play with the h/d ratio: \setupinterlinespace[line=2.8ex,height=0.8,depth=0.2] \showstruts \strut x \setupinterlinespace[line=2.8ex,height=0.7,depth=0.3] \showstruts \strut x or you can plug in a command (in the toc handler) that puts each line in a box with manipulated dimensions 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] Linespacing in TOC
On 2013-11-22 Hans Hagen wrote: On 11/22/2013 9:44 PM, Jan Tosovsky wrote: On 2013-11-20 Hans Hagen wrote: On 11/19/2013 11:48 PM, Jan Tosovsky wrote: I'd like to tweak a default TOC linespacing... \title{Table of Contents} \start \setupinterlinespace[line=0.8ex] % too small, just for testing \placecontent \stop But as I found, any value below 2.8ex causes interline inconsistencies when special cases appears, see the extreme below: \starttext \start \setupinterlinespace[line=1.0ex] \placecontent \stop \chapter{}. % line without descenders precedes a line without ascenders \chapter{}. % line with descenders is followed with a line with ascenders \chapter{}. % the result is an inconsistent baseline distance \stoptext Is there any remedy for this? Can I fix the baseline distance somehow? \definegridsnapping[crap] [fit,0.2] \setuplayout[grid=crap] This helps! But... it breaks something else :-( I am confused a bit. What exactly the linespacing is doing? It can set the baseline distance (line=...), but it is not handled correctly? Is that snapping a workaround for this deficiency of a standard solution? All lines in my book have a certain (default) linespacing. TOC entries are rendered (by default) using bigger linespacing. I just wanted to make that TOC distance smaller a bit. Is this really the only solution? \definegridsnapping[crap] [fit] % what was that magic number 0.2 ? \setuplayout[grid=crap] \start \setupinterlinespace[line=2.2ex] \placecontent \stop It works. But that snapping is set globally and it breaks whitespace handling in other parts of my document... It even produces widows/orphans what I haven't seen before. Just smaller gap between TOC lines, just that ;-) Thanks in advance, Jan ___ 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] [beta] grid head
On 14-7-2011 10:49, Philipp Gesang wrote: Hi Hans, the new beta appears to modify the behaviour of long headings on the grid. In the following example the chapter head moves up into the page header which it did not prior to the update (cf. mkii’s behaviour): forget about mkii, we have a new and different mechanism \setuplayout[grid=yes] \showgrid % tolerant] \showgrid \setuppapersize[S6][S6] \starttext \setuphead[chapter][after=] \definegridsnapping[MyOne] [global,strut] \definegridsnapping[MyTwo] [local,strut] \definegridsnapping[MyThree][global,strut,top:3] \definegridsnapping[MyThree][local,strut,top:3] \setuphead[chapter][grid=MyOne] \startchapter[title={Global, Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyTwo] \startchapter[title={Local, Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyThree] \startchapter[title={Global, Strut, 3 Top Lines}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyFour] \startchapter[title={Local, Strut, 3 Top Lines}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyOne] \startchapter[title={Global,\\Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyTwo] \startchapter[title={Local,\\Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyThree] \startchapter[title={Global, Strut,\\3 Top Lines}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyFour] \startchapter[title={Local, Strut,\\3 Top Lines}] test \par test \par test \stopchapter \stoptext the question is, what are reasonable defaults (many more structural elements will have a grid key) 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] [beta] grid head
\definegridsnapping[MyOne] [global,strut] \definegridsnapping[MyTwo] [local,strut] \definegridsnapping[MyThree][global,strut,top:3] \definegridsnapping[MyThree][local,strut,top:3] Should'nt the last one be MyFour? ___ 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] [beta] grid head
On 2011-07-14 11:29:29, Hans Hagen wrote: On 14-7-2011 10:49, Philipp Gesang wrote: Hi Hans, the new beta appears to modify the behaviour of long headings on the grid. In the following example the chapter head moves up into the page header which it did not prior to the update (cf. mkii’s behaviour): forget about mkii, we have a new and different mechanism Ok, thanks for the info. I’ll update my layouts then. (Btw is this new functionality described in „Layouts in Context“? I didn’t yet receive my copy and when it arrives, unfortunately, I won’t be able to look into it for another month :(. Just want to know whether I’ll miss something that important during my time away.) Best regards, Philipp \setuplayout[grid=yes] \showgrid % tolerant] \showgrid \setuppapersize[S6][S6] \starttext \setuphead[chapter][after=] \definegridsnapping[MyOne] [global,strut] \definegridsnapping[MyTwo] [local,strut] \definegridsnapping[MyThree][global,strut,top:3] \definegridsnapping[MyThree][local,strut,top:3] \setuphead[chapter][grid=MyOne] \startchapter[title={Global, Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyTwo] \startchapter[title={Local, Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyThree] \startchapter[title={Global, Strut, 3 Top Lines}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyFour] \startchapter[title={Local, Strut, 3 Top Lines}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyOne] \startchapter[title={Global,\\Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyTwo] \startchapter[title={Local,\\Strut}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyThree] \startchapter[title={Global, Strut,\\3 Top Lines}] test \par test \par test \stopchapter \setuphead[chapter][grid=MyFour] \startchapter[title={Local, Strut,\\3 Top Lines}] test \par test \par test \stopchapter \stoptext the question is, what are reasonable defaults (many more structural elements will have a grid key) 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 ___ pgpGHdPUMbJET.pgp Description: PGP signature ___ 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] gridsnapping question
Hello, I've another grid question: What is the goal of all the grid options? It seems that neither the head nor the following text is aligned to the grid. I've adapted the grid-001-example. \setuppapersize[A5][A5] \setuplayout[grid=tolerant] \setupbodyfont[palatino] \def\ChapterTest#1% {\setuphead[chapter][grid={#1}] \startchapter[title={Test: #1}] test \par test \par test \stopchapter \startchapter[title={Test: #1\\test\\test}] test \par test \par test \stopchapter} \definegridsnapping[whatever][strut,offset:-2pt] \definegridsnapping[chapter] [mindepth,maxheight,local] \starttext \showgrid % \showbaselinecorrection \title{Test: no grid option} test \par test \par test \processcommalist [strut, {local,strut}, {strut,top:3}, normal, bottom, both, broad, fit, first, last, high, low, line, halfline, max, min, none, whatever, chapter] \ChapterTest \stoptext Greeting Andreas ___ 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] grid=verytolerant causes overlapping
Am 11.02.2011 um 15:32 schrieb luigi scarso: There is no grid option “verytolerant”. true, the same with \setuplayout[grid=ztolerant] If I recall correctly there a way to see the in the log. Depends on the commands, sometimes the value is checked but no with gridsnapping. The “yes” value is defined as \definegridsnapping[yes][maxheight,maxdepth,strut] and you enable with with “grid=yes” a where context tests if “yes” is a predefined lists but “grid={maxheight,maxdepth,strut}” is also valid and in this case context defined a dummy list which is passed to lua. The same happens with “verytolerant”, context creates a dummy list and use ”verytolerant” as value for this list. 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] grid=verytolerant causes overlapping
Am 11.02.2011 um 15:55 schrieb Wolfgang Schuster: Am 11.02.2011 um 15:32 schrieb luigi scarso: There is no grid option “verytolerant”. true, the same with \setuplayout[grid=ztolerant] If I recall correctly there a way to see the in the log. Depends on the commands, sometimes the value is checked but no with gridsnapping. The “yes” value is defined as \definegridsnapping[yes][maxheight,maxdepth,strut] and you enable with with “grid=yes” a where context tests if “yes” is a predefined lists but “grid={maxheight,maxdepth,strut}” is also valid and in this case context defined a dummy list which is passed to lua. The same happens with “verytolerant”, context creates a dummy list and use ”verytolerant” as value for this list. Thank you Wolfgang! Now I've defined verytolerant in order to get some fractions on grid. \definegridsnapping[verytolerant][maxdepth:1.6,maxheight:1.4,strut] \setuplayout[grid=verytolerant] % \setuplayout[grid=tolerant] \setupbodyfont[palatino] \starttext test\crlf $b = \frac p q$\crlf test \stoptext Andreas ___ 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] caught in the grid
Am 12.08.2010 um 00:31 schrieb Hans Hagen: On 11-8-2010 9:49, Steffen Wolfrum wrote: Hi, as there is no setup for paragraphs (see thread before), I really don' know how to come out of this trap: I need a tight interlinespace for the normal body text, but no lunatic headings!! Have a look, please: I have no time now. I will document the grid snapper once I've finished the (still somewhat experimental) mechanism. OK. ... Just to avoid basic mistakes: What is right syntax (direct/indirect)? The results differ (see below) ... Steffen \definegridsnapping[MyGrid][no] %\setuplayout[grid=no] % - alternative a \setuplayout[grid=MyGrid] % - alternative b \showgrid \setuphead[chapter] \starttext \chapter{one} \input tufte \chapter{one\\two}\input tufte \chapter{one\\two\\three} \input tufte \stoptext ___ 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] caught in the grid
You can play with embedding \section inside \start and \stoplinecorrection to get rid of overlapping, but I'm not sure if it's the right thing to do. Piotr 2010/8/12 Steffen Wolfrum cont...@st.estfiles.de: Am 12.08.2010 um 00:31 schrieb Hans Hagen: On 11-8-2010 9:49, Steffen Wolfrum wrote: Hi, as there is no setup for paragraphs (see thread before), I really don' know how to come out of this trap: I need a tight interlinespace for the normal body text, but no lunatic headings!! Have a look, please: I have no time now. I will document the grid snapper once I've finished the (still somewhat experimental) mechanism. OK. ... Just to avoid basic mistakes: What is right syntax (direct/indirect)? The results differ (see below) ... Steffen \definegridsnapping[MyGrid] [no] %\setuplayout[grid=no] % - alternative a \setuplayout[grid=MyGrid] % - alternative b \showgrid \setuphead[chapter] \starttext \chapter{one} \input tufte \chapter{one\\two} \input tufte \chapter{one\\two\\three} \input tufte \stoptext ___ 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 ___ -- http://okle.pl ___ 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] caught in the grid
This can only be used in single, controlled situations. Look what happens when the section is to be placed at top of page: \definegridsnapping[MyGrid] [off] \showframe \starttext \setuplayout[grid=MyGrid] \switchtobodyfont[42pt] \setupinterlinespace[line=30pt] Big text\crlf written in\crlf three row \startlinecorrection \section{One\\Two\\Three} \stoplinecorrection Big text\crlf written in\crlf three row Big text\crlf written in\crlf three row \startlinecorrection \section{One\\Two\\Three} \stoplinecorrection Big text\crlf written in\crlf three row \stoptext Steffen Am 12.08.2010 um 12:30 schrieb Piotr Kopszak: You can play with embedding \section inside \start and \stoplinecorrection to get rid of overlapping, but I'm not sure if it's the right thing to do. Piotr 2010/8/12 Steffen Wolfrum cont...@st.estfiles.de: Am 12.08.2010 um 00:31 schrieb Hans Hagen: On 11-8-2010 9:49, Steffen Wolfrum wrote: Hi, as there is no setup for paragraphs (see thread before), I really don' know how to come out of this trap: I need a tight interlinespace for the normal body text, but no lunatic headings!! Have a look, please: I have no time now. I will document the grid snapper once I've finished the (still somewhat experimental) mechanism. OK. ... Just to avoid basic mistakes: What is right syntax (direct/indirect)? The results differ (see below) ... Steffen \definegridsnapping[MyGrid][no] %\setuplayout[grid=no] % - alternative a \setuplayout[grid=MyGrid] % - alternative b \showgrid \setuphead[chapter] \starttext \chapter{one} \input tufte \chapter{one\\two}\input tufte \chapter{one\\two\\three} \input tufte \stoptext ___ 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 ___ -- http://okle.pl ___ 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 ___ ___ 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] caught in the grid
Hi, as there is no setup for paragraphs (see thread before), I really don' know how to come out of this trap: I need a tight interlinespace for the normal body text, but no lunatic headings!! Have a look, please: \definegridsnapping[MyGrid] [off]% broad/both/bold/local fit for the text \starttext \setuplayout[grid=MyGrid] \switchtobodyfont[42pt] \setupinterlinespace[line=30pt] \lineskiplimit-\maxdimen Big text\crlf written in\crlf three row \section{One\\Two\\Three} Big text\crlf written in\crlf three row \stoptext Literally the whole day I tried various grid key combinations ... for setuplayout and setuphead ... in vain. I am going crazy! Steffen ___ 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] hack needed (MkIV)
On 6-8-2010 8:22, Steffen Wolfrum wrote: Am 06.08.2010 um 19:40 schrieb Hans Hagen: On 6-8-2010 7:01, Steffen Wolfrum wrote: Could you give an example on this (thresholds for ht and dp), please? % none don't enlarge % halfline enlarge by halfline/halfline This I know, only I don't understand the syntax ;o) Is this 0.8 the threshold you mentioned ... \definegridsnapping[\v!strict] [\v!maxdepth:0.8,\v!maxheight:0.8,\v!strut] or 0.8 in here ... \definegridsnapping[\v!broad][\v!maxheight,\v!maxdepth,\v!strut,0.8] Or is the second kind of abbreviation for the first? indeed in mkii we had all kind of keywords, here we have sets that provide more control And even more interesting: what does local do, I mean really? % localuse local interline space Do I have local interline space in my example? normally grids will obey the global settings, local settings can be handy when building boxes with different spacing that then are snapped globally as a whole (section heads already have a grid key for local settings and more constructs will have them0 - 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] hack needed (MkIV)
On 6-8-2010 10:44, Steffen Wolfrum wrote: before coming to Brejlov I am just about to clean all my open threads regarding transition MkII-MkIV. One thing is still unanswered - related to grid mode: In MkII the example below rendered the same with or without grid mode. Now in MkIV the lineskiplimit is overruled by grid mode. forget about comparing to mkii .. a completely different mechanism and behaviour will not be mkii compatible (different kind of control) But as I still have to use grid, and yet have to make sure that character clashes don't disturb the consistent interlinespace, I have a problem. in grid mode interlinespace is ignores Looking through spac-ver.mkiv gave me the impression that lineskip related code is quite ... precarious. But maybe an unofficial hack is doable? no hack needed \enabletrackers[nodes.vsnapping] \starttext % see spac-ver.mkiv: \definegridsnapping \switchtobodyfont[42pt] \setupinterlinespace[line=30pt] Big text\par written in\par three row \setuplayout[grid=strict] \setupinterlinespace[line=30pt] Big text\par written in\par three row \stoptext with 'yes' the line gets snapped to fit an extra line when too high (ht/dp ratio) and your first line is larger than the second and third (try {yes,line} so see a variant). 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] hack needed (MkIV)
Am 06.08.2010 um 13:18 schrieb Hans Hagen: On 6-8-2010 10:44, Steffen Wolfrum wrote: before coming to Brejlov I am just about to clean all my open threads regarding transition MkII-MkIV. One thing is still unanswered - related to grid mode: In MkII the example below rendered the same with or without grid mode. Now in MkIV the lineskiplimit is overruled by grid mode. forget about comparing to mkii .. a completely different mechanism and behaviour will not be mkii compatible (different kind of control) But as I still have to use grid, and yet have to make sure that character clashes don't disturb the consistent interlinespace, I have a problem. in grid mode interlinespace is ignores Looking through spac-ver.mkiv gave me the impression that lineskip related code is quite ... precarious. But maybe an unofficial hack is doable? no hack needed \enabletrackers[nodes.vsnapping] \starttext % see spac-ver.mkiv: \definegridsnapping \switchtobodyfont[42pt] \setupinterlinespace[line=30pt] Big text\par written in\par three row \setuplayout[grid=strict] \setupinterlinespace[line=30pt] Big text\par written in\par three row \stoptext with 'yes' the line gets snapped to fit an extra line when too high (ht/dp ratio) and your first line is larger than the second and third (try {yes,line} so see a variant). sorry, but this is not what is needed (see attached pdf, please) this tight interlinespace is not possible in MkIV when grid mode is on? Steffen grid_on.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 / 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] hack needed (MkIV)
On 6-8-2010 7:01, Steffen Wolfrum wrote: Could you give an example on this (thresholds for ht and dp), please? % none don't enlarge % halfline enlarge by halfline/halfline % line enlarge by line/line % strutenlarge by ht/dp (default) % firstalign to top line % last align to bottom line % mindepth round depth down % maxdepth round depth up % minheightround height down % maxheightround height up % localuse local interline space % shift:-3tp vertical shift within box %D We're not downward compatible with \MKII ! \definegridsnapping[\v!normal] [\v!maxheight,\v!maxdepth,\v!strut] \definegridsnapping[\v!standard] [\v!maxheight,\v!maxdepth,\v!strut] \definegridsnapping[\v!yes] [\v!maxheight,\v!maxdepth,\v!strut] \definegridsnapping[\v!strict] [\v!maxdepth:0.8,\v!maxheight:0.8,\v!strut] \definegridsnapping[\v!tolerant] [\v!maxdepth:1.2,\v!maxheight:1.2,\v!strut] \definegridsnapping[\v!top] [\v!minheight,\v!maxdepth,\v!strut] \definegridsnapping[\v!bottom] [\v!maxheight,\v!mindepth,\v!strut] \definegridsnapping[\v!both] [\v!minheight,\v!mindepth,\v!strut] \definegridsnapping[\v!broad][\v!maxheight,\v!maxdepth,\v!strut,0.8] % maybe 0.85 \definegridsnapping[\v!fit] [\v!maxheight,\v!maxdepth,\v!strut,1.2] % tight 0.15 \definegridsnapping[\v!first][\v!first] \definegridsnapping[\v!last] [\v!last] \definegridsnapping[\v!high] [\v!minheight,\v!maxdepth,\v!none] \definegridsnapping[\v!low] [\v!maxheight,\v!mindepth,\v!none] \definegridsnapping[\v!line] [\v!line] \definegridsnapping[\v!strut][\v!strut] \definegridsnapping[\v!max] [\v!maxdepth,\v!maxheight,\v!strut] \definegridsnapping[\v!min] [\v!mindepth,\v!minheight,\v!strut] - 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] hack needed (MkIV)
Am 06.08.2010 um 19:40 schrieb Hans Hagen: On 6-8-2010 7:01, Steffen Wolfrum wrote: Could you give an example on this (thresholds for ht and dp), please? % none don't enlarge % halfline enlarge by halfline/halfline ... This I know, only I don't understand the syntax ;o) Is this 0.8 the threshold you mentioned ... \definegridsnapping[\v!strict] [\v!maxdepth:0.8,\v!maxheight:0.8,\v!strut] or 0.8 in here ... \definegridsnapping[\v!broad][\v!maxheight,\v!maxdepth,\v!strut,0.8] Or is the second kind of abbreviation for the first? And even more interesting: what does local do, I mean really? % localuse local interline space Do I have local interline space in my example? Why does it work the way I wanted it to do??? \usetypescript[postscript] \definetypeface[postscript][rm][serif][times][default] \setupbodyfont[postscript,30pt]\setupinterlinespace[line=10pt] \setuplayout[grid=local] \starttext \input tufte \par \stoptext Steffen ___ 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] 10+ reasons why I still use MKII
Am 2010-05-13 um 23:09 schrieb Hans Hagen: I recall trying grid a while ago but it didn't work, looks like I have to set \setuplayout[grid=force]. for sure there are bugs as it needs much testing but we have predefined grid setups: % none don't enlarge % halfline enlarge by halfline/halfline % line enlarge by line/line % strutenlarge by ht/dp (default) % firstalign to top line % last align to bottom line % mindepth round depth down % maxdepth round depth up % minheightround height down % maxheightround height up % localuse local interline space % shift:-3tp vertical shift within box \definegridsnapping[normal] [maxheight,maxdepth,strut] \definegridsnapping[standard] [maxheight,maxdepth,strut] \definegridsnapping[yes] [maxheight,maxdepth,strut] \definegridsnapping[strict] [\v!maxdepth:0.8,maxheight:0.8,strut] \definegridsnapping[tolerant] [\v!maxdepth:1.2,maxheight:1.2,strut] \definegridsnapping[top] [minheight,maxdepth,strut] \definegridsnapping[bottom] [maxheight,mindepth,strut] \definegridsnapping[both] [minheight,mindepth,strut] \definegridsnapping[broad][maxheight,maxdepth,strut,0.8] \definegridsnapping[fit] [maxheight,maxdepth,strut,1.2] \definegridsnapping[first][first] \definegridsnapping[last] [last] \definegridsnapping[high] [minheight,maxdepth,none] \definegridsnapping[low] [maxheight,mindepth,none] \definegridsnapping[line] [line] \definegridsnapping[strut][strut] \definegridsnapping[max] [maxdepth,maxheight,strut] \definegridsnapping[min] [mindepth,minheight,strut] eventually an structural elements will have a grid key wikified: http://wiki.contextgarden.net/Reference/en/setuplayout Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ 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] 10+ reasons why I still use MKII
On 13-5-2010 7:08, Khaled Hosny wrote: On Thu, May 13, 2010 at 05:00:01PM +0200, Hans Hagen wrote: On 13-5-2010 4:32, Khaled Hosny wrote: On Thu, May 13, 2010 at 04:16:12PM +0200, Hans Hagen wrote: On 13-5-2010 3:42, Mojca Miklavec wrote: \startyoumayignorethis The only thing that really bothers me are so much different vertical differences which show up in almost every document I ever write. MKIV consistently takes more vertical space, so no matter what document I try to recompile, it always ends up with more pages (and some weird page breaks) when processing it with MKIV. \startcantresistmode the lineheight relates to the ex height and as in mkiv we don't have the tfm limitations (those 16 values of ht dp) we have slightly different spacing Something I find very annoying is variable interline spacing, if I've, for example, a line with some Arabic words vocalized I get some times too much white space above it that it almost looks like an empty line. It makes the page look like crap. Is there a way to force fixed interline spacing? turn turn grid on .. but even then, we need some nice heuristic for determing the right ht/dp ratio for arabic (can be set up) I recall trying grid a while ago but it didn't work, looks like I have to set \setuplayout[grid=force]. for sure there are bugs as it needs much testing but we have predefined grid setups: % none don't enlarge % halfline enlarge by halfline/halfline % line enlarge by line/line % strutenlarge by ht/dp (default) % firstalign to top line % last align to bottom line % mindepth round depth down % maxdepth round depth up % minheightround height down % maxheightround height up % localuse local interline space % shift:-3tp vertical shift within box \definegridsnapping[normal] [maxheight,maxdepth,strut] \definegridsnapping[standard] [maxheight,maxdepth,strut] \definegridsnapping[yes] [maxheight,maxdepth,strut] \definegridsnapping[strict] [\v!maxdepth:0.8,maxheight:0.8,strut] \definegridsnapping[tolerant] [\v!maxdepth:1.2,maxheight:1.2,strut] \definegridsnapping[top] [minheight,maxdepth,strut] \definegridsnapping[bottom] [maxheight,mindepth,strut] \definegridsnapping[both] [minheight,mindepth,strut] \definegridsnapping[broad][maxheight,maxdepth,strut,0.8] \definegridsnapping[fit] [maxheight,maxdepth,strut,1.2] \definegridsnapping[first][first] \definegridsnapping[last] [last] \definegridsnapping[high] [minheight,maxdepth,none] \definegridsnapping[low] [maxheight,mindepth,none] \definegridsnapping[line] [line] \definegridsnapping[strut][strut] \definegridsnapping[max] [maxdepth,maxheight,strut] \definegridsnapping[min] [mindepth,minheight,strut] eventually an structural elements will have a grid key 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] the grid (MkIV)
On 19-4-2010 1:37, Steffen Wolfrum wrote: Hi, how can I exclude a section head from grid? Just compare setuplayout with grid=yes/no. Is there a solution? \showgrid \starttext \setuplayout[grid=yes]% [grid=no] \setuphead[chapter][grid=none] \chapter{one} \page \chapter{one\\line} \page \chapter{one\\line\\line} \stoptext how about \setuplayout[grid=yes] \showgrid \definegridsnapping[chapter][mindepth,maxheight,local] \setuphead[chapter][grid=chapter,alternative=top] \starttext \chapter{one} \input tufte \chapter{one\\two}\input tufte \chapter{one\\two\\three} \input tufte \stoptext - 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] how to set \lineskiplimit-\maxdimen
Am 11.03.2010 13:05, schrieb Steffen Wolfrum: Am 11.03.2010 um 12:50 schrieb Peter Rolf: Am 11.03.2010 12:09, schrieb Steffen Wolfrum: Hi, controlling the lineskip in the old-fashoined way \lineskiplimit-\maxdimen doesn' work in mkiv anymore! Please have a look at the example below. Attached you may find the resulting PDFs, set with mkii resp. mkiv. Steffen --- \usetypescript[postscript] \definetypeface[postscript][rm][serif][times][default] \setupbodyfont[postscript,20pt]\setupinterlinespace[line=12pt]\lineskiplimit-\maxdimen \setuplayout[grid=tolerant] \definestartstop[quotetest] [before={\startnarrower\switchtobodyfont[8pt]\setupinterlinespace[line=7pt]\lineskiplimit-\maxdimen},after=\stopnarrower] Hi Steffen, this works, but the \startlocal...\stoplocal combination is not used very often in 'the source' (so there must be a better way). \definestartstop[quotetest] [before={\startnarrower\startlocal\switchtobodyfont[8pt]\setupinterlinespace[line=16pt]\setupwhitespace[0pt]\setupindenting[0em,yes]},after=\stoplocal\stopnarrower] best wishes, Peter Hi Peter, it looks like you answered to thread how to setup local interlinespace ;o) my attempt to make this list a little more chaotic ;) Yes, this works now. But this ... \setupinterlinespace[line=7pt]\lineskiplimit-\maxdimen} ... does not work as it worked in mkii. Just set line=8pt and run mkiv, next set line=7pt and run mkiv. See the problem?! yes, i see it. the interlineskip with line=7pt is bigger than the one with line=8pt. i looked for the definition of \lineskiplimit at http://www.tug.org/utilities/plain/cseq.html#lineskiplimit-rp [..] IF the glue specified by \baselineskip brings two adjacent boxes in a vertical list closer together than \lineskiplimit, then \lineskip glue is placed between the boxes [78]. -- \def\checkgridsnapping {\lineskip\ifgridsnapping\zeropoint\else\normallineskip\fi} so setting this value while using grid make not much sense. took me some time (also grid beginner), but i guess the attached example is a starting point. oh, and thanks to Wolfgang for his much nicer code (assimilated). Peter \usetypescript[postscript] \definetypeface[postscript][rm][serif][times][default] \setupbodyfont[postscript,20pt] %\definegridsnapping[verytolerant] [maxdepth:1.3,maxheight:1.3,strut] %\setuplayout[grid=verytolerant] \setuplayout[grid=tolerant] \definedelimitedtext [quotetest] [leftmargin=standard, before={\startgridcorrection\blank[medium]\switchtobodyfont[8pt]\setupinterlinespace[line=8pt]\setupwhitespace[none]}, after={\blank[medium]\stopgridcorrection}, grid=tolerant, indenting=no] \starttext \showframe \showstruts \showgrid \input tufte \par \startquotetest \input tufte \par \stopquotetest \stoptext ___ 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] MkIV grid ?
On 17-2-2010 10:58, Steffen Wolfrum wrote: Hi, I have seen Hans' reply to Peter Rolf from Nov. 19th 2009 on grid snapping (mkiv). What has changed since then? Is there some more info somewhere? I am missing my MkII optimized section setting, like ... grid={page,3.5pt,fit,low} i have no time not to explain it but the system is somewhat different than in mkii % \installsnapvalues{loose} {\v!maxdepth:0.8,\v!maxheight:0.8,\v!strut} % \installsnapvalues{normal}{\v!maxdepth:1.0,\v!maxheight:1.0,\v!strut} % \installsnapvalues{tight} {\v!maxdepth:1.2,\v!maxheight:1.2,\v!strut} % none don't enlarge % halfline enlarge by halfline/halfline % line enlarge by line/line % strutenlarge by ht/dp (default) % firstalign to top line % last align to bottom line % mindepth round depth down % maxdepth round depth up % minheightround height down % maxheightround height up %D We're not downward compatible with \MKII ! \definegridsnapping[\v!normal] [\v!maxheight,\v!maxdepth,\v!strut] \definegridsnapping[\v!standard] [\v!maxheight,\v!maxdepth,\v!strut] \definegridsnapping[\v!yes] [\v!maxheight,\v!maxdepth,\v!strut] \definegridsnapping[\v!strict] [\v!maxdepth:0.8,\v!maxheight:0.8,\v!strut] \definegridsnapping[\v!tolerant] [\v!maxdepth:1.2,\v!maxheight:1.2,\v!strut] \definegridsnapping[\v!top] [\v!minheight,\v!maxdepth,\v!strut] \definegridsnapping[\v!bottom] [\v!maxheight,\v!mindepth,\v!strut] \definegridsnapping[\v!both] [\v!minheight,\v!mindepth,\v!strut] \definegridsnapping[\v!broad][\v!maxheight,\v!maxdepth,\v!strut,0.8] % maybe 0.85 \definegridsnapping[\v!fit] [\v!maxheight,\v!maxdepth,\v!strut,1.2] % tight 0.15 \definegridsnapping[\v!first][\v!first] \definegridsnapping[\v!last] [\v!last] \definegridsnapping[\v!high] [\v!minheight,\v!maxdepth,\v!none] \definegridsnapping[\v!low] [\v!maxheight,\v!mindepth,\v!none] \definegridsnapping[\v!line] [\v!line] \definegridsnapping[\v!strut][\v!strut] \definegridsnapping[\v!max] [\v!maxdepth,\v!maxheight,\v!strut] \definegridsnapping[\v!min] [\v!mindepth,\v!minheight,\v!strut] in one (experimental) style i use: % none will effectively smash the box to one line (zero inner) but is the same as strut as outer will snap % however you can use {none,top:3} to move it down 3 lines then % {local,strut} will use the style related settings and move one line down because the font is larger \setuphead [chapter] [grid=strut] \setuphead [section] [grid=strut] most structure components will get a grid key and these are normally local the bottomline is that you snap up/down, within certain rounding specs, and add/subtract/distribute extra lineheights to the ht/dp's of the gridded material Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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] grid snapping (mkiv)
Peter Rolf wrote: Hi, is the 'grid={line,??pt}' functionality already implemented in mkiv? I use it in a multicolumn environment and all I get is snapping to the 'full' baseline. \setuphead[section] [%style={\SectionHeaderFont}, style={\switchtobodyfont[12.3pt]\ss\bf\setupinterlinespace}, % grid={high}, % ok grid={line,3pt}, % snaps to 'second' baseline after=, ] grid support is partially reimplemented and will differ in some aspects from mkii i have no time now to discuss it in detail (will probably explain a few things in a chapter of hybrid.pdf or the style manual) we have now grid definitions, with predefined: \definegridsnapping[normal] [maxheight,maxdepth,strut] \definegridsnapping[standard] [maxheight,maxdepth,strut] \definegridsnapping[yes] [maxheight,maxdepth,strut] \definegridsnapping[strict] [maxdepth:0.8,maxheight:0.8,strut] \definegridsnapping[tolerant] [maxdepth:1.2,maxheight:1.2,strut] \definegridsnapping[top] [minheight,maxdepth,strut] \definegridsnapping[bottom] [maxheight,mindepth,strut] \definegridsnapping[both] [minheight,mindepth,strut] \definegridsnapping[broad][maxheight,maxdepth,strut,0.8] \definegridsnapping[fit] [maxheight,maxdepth,strut,1.2] \definegridsnapping[first][first] \definegridsnapping[last] [last] \definegridsnapping[high] [minheight,maxdepth,none] \definegridsnapping[low] [maxheight,mindepth,none] \definegridsnapping[line] [line] \definegridsnapping[strut][strut] \definegridsnapping[max] [maxdepth,maxheight,strut] \definegridsnapping[min] [mindepth,minheight,strut] so we have height/depth snapping, tolerance factors, strut or line based distribution, and some more; also there will be more strategies, like \setuplayout[grid=tolerant] \showgrid most structural elements will have a grid key (if it makes sense) \setuphead[chapter][grid=strut] \startchapter[title={Test: strut}] test \par test \par test \stopchapter \setuphead[chapter][grid={local,strut}] \startchapter[title={Test: local,strut}] test \par test \par test \stopchapter \setuphead[chapter][grid={strut,top:3}] \startchapter[title={Test: strut,top:3}] test \par test \par test \stopchapter multi columns are not touched yet (i will do that as soon as we've opened up a it more of tex in luatex) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 ___