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
___________________________________________________________________________________

Reply via email to