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
% strut            enlarge by ht/dp (default)
% first            align to top line
% last             align to bottom line
% mindepth         round depth down
% maxdepth         round depth up
% minheight        round height down
% maxheight        round 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
___________________________________________________________________________________

Reply via email to