ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* grid snapping (mkiv)
@ 2009-11-19 13:37 Peter Rolf
  2009-11-19 22:29 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Rolf @ 2009-11-19 13:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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=,
  ]


The creation of a minimal example depends on the answer... :)

Greetings, Peter
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: grid snapping (mkiv)
  2009-11-19 13:37 grid snapping (mkiv) Peter Rolf
@ 2009-11-19 22:29 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2009-11-19 22:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-19 22:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-19 13:37 grid snapping (mkiv) Peter Rolf
2009-11-19 22:29 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).