ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: grid snapping (mkiv)
Date: Thu, 19 Nov 2009 23:29:41 +0100	[thread overview]
Message-ID: <4B05C6D5.3000709@wxs.nl> (raw)
In-Reply-To: <4B054A16.2030304@gmx.net>

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	other threads:[~2009-11-19 22:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-19 13:37 Peter Rolf
2009-11-19 22:29 ` Hans Hagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B05C6D5.3000709@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).