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: stay on grid in double column
Date: Thu, 14 Aug 2008 22:30:18 +0200	[thread overview]
Message-ID: <48A495DA.3020200@wxs.nl> (raw)
In-Reply-To: <48A41115.7040709@jhnet.nl>

Jelle Huisman wrote:
> Jelle Huisman wrote:
>> Hi,
>>
>> I have text with a small intro section in a double column environment. 
>> The main text is set on a grid and the intro text is slightly off-grid 
>> with a \vskip -2pt before and a \vskip 2pt after the intro. As this 
>> sample shows this works fine, until the intro text is broken over two 
>> columns. In that case the last part of the intro starts on grid (in the 
>> second column) and the main text is moved off-grid and does not longer 
>> register with the main text in the first column :( [see example code].
>> Is there is way to detect and prevent this (automatically)? Can ConTeXt 
>> remember that it is setting some text \vskip-ped, while it is breaking 
>> the current paragraph over columns? (Basically I want to keep all the 
>> B's on the grid and all the A's \vskipped.)
> 
> Should I conclude that this is not possible?

ok, you suffered enough ... so, this is for your eyes only because 
otherwise i get complaints about a non documented feature: 
\synchronizegrid (we needed it once in a project; it worked ok there but 
was never tested being that which is why it's still on cont-new)

\definecolumnset[doublecolumn][n=2]
\setupcolumnset[doublecolumn][2][distance=5mm]
\setupbodyfont[12pt]
\setupinterlinespace[line=11pt]
\setuplayout[grid=yes]
\showgrid
\starttext
\startcolumnset[doublecolumn]
\ss \subject{Header}
\dorecurse {2} {
     \vskip -2pt
     This text is vskipped. A \dorecurse{40}{ aa aa}
     \vskip 2pt % intro text
     \synchronizegrid
     This text should stay on the grid. B \dorecurse{270}{ bb bb}} % main
     text should stay on grid
\stopcolumnset
\stoptext

the thing with grids is that one can make things work for most cases but 
normally doc are always more tricky

in mkiv i will add some more advanced grid support (i did some 
experiments last year .. no time now to finish that)



-----------------------------------------------------------------
                                           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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


  parent reply	other threads:[~2008-08-14 20:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-13 15:44 Jelle Huisman
2008-08-14 11:03 ` Jelle Huisman
2008-08-14 15:57   ` Taco Hoekwater
2008-08-14 20:30   ` Hans Hagen [this message]
2008-08-14 20:54     ` Jelle Huisman

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=48A495DA.3020200@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).