From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/12485 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: Gridsetting Date: Sun, 15 Jun 2003 22:40:13 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <5.2.0.9.1.20030615200550.02710188@localhost> References: <20030614094151.27963.47244.Mailman@ref.ntg.nl> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Trace: main.gmane.org 1055711869 8781 80.91.224.249 (15 Jun 2003 21:17:49 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 15 Jun 2003 21:17:49 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sun Jun 15 23:17:46 2003 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19ResV-0002HF-00 for ; Sun, 15 Jun 2003 23:17:31 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 22E1310B54; Sun, 15 Jun 2003 23:20:12 +0200 (MEST) Original-Received: from mail.solcon.nl (mail.solcon.nl [212.45.33.11]) by ref.ntg.nl (Postfix) with ESMTP id 7E62B10ABC for ; Sun, 15 Jun 2003 23:05:04 +0200 (MEST) Original-Received: from server-1.pragma-net.nl (wc-58016.solcon.nl [212.45.58.16]) by mail.solcon.nl (8.12.9/SQL-8.12.9-10/8.12.5) with ESMTP id h5FL4t5u018347 for ; Sun, 15 Jun 2003 23:04:55 +0200 Original-Received: from laptop-3.wxs.nl (server-1.pragma-net.nl [10.100.1.1] (may be forged)) by server-1.pragma-net.nl (8.12.3/8.12.2) with ESMTP id h5FL4k0k001047 for ; Sun, 15 Jun 2003 23:05:00 +0200 X-Sender: hagen-mail@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Original-To: ntg-context@ntg.nl In-Reply-To: <5.1.0.14.2.20030614133416.00c73a00@pop.onlinehome.de> X-RAVMilter-Version: 8.4.1(snapshot 20020919) (mail.solcon.nl) Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:12485 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:12485 At 14:55 14/06/2003 +0200, Matthias Vogel wrote: >normaltext text text text text text text text text texttext text >text texttext texttext texttext texttext texttext text >---in 9dd, line: 10dd >text text text texttext texttext texttext texttext text >text texttext texttext texttext texttext texttext text > >\startcitation > >smalltext text text texttext texttext texttext texttext text >text text text texttext texttext texttext texttext text >---text in 8dd, line: 9dd >text texttext texttext texttext texttext texttext text > >\stopcitation > >normaltext text text texttext texttext texttext texttext text >text texttext texttext texttext texttext texttext text >---in 9dd line 10dd >text texttext texttext texttext texttext texttext text... > >we are loosing the grid because of the smaller lineskip >in citation. I would like to modify the definition of >citation (and other stuff, that causes deviations from the >grid (headings)) in a way that the following text will >adjust to the grit again. Is that possible? As far >as I can see "\moveongrid" does not work in cases like >the given example. ah ... grid and automated typesetting ... only to be used by those who are aware of the problems -) one wat of dealing with this is: \snaptogrid\vbox\bgroup your smaller text \egroup but this does not break across pages. One way out is the following (put the macro defs in your local cont-new.tex) \unprotect \newcounter\currentgridsync \def\gridsynctag{grs:\currentgridsync} \def\synchronizegrid {\doglobal\increment\currentgridsync \par\prevdepth\zeropoint \nointerlineskip \hpos\gridsynctag{\strut}\par \vskip-\lineheight \nointerlineskip % top of text \scratchdimen\MPy{\v!tekst:\MPp\gridsynctag}% \advance\scratchdimen\MPh{\v!tekst:\MPp\gridsynctag}% % move to first baseline \advance\scratchdimen-\topskip % subtract wrong baseline \advance\scratchdimen-\MPy\gridsynctag % get minimal number of lines \advance\scratchdimen\lineheight \getnoflines\scratchdimen % calculate difference \advance\scratchdimen-\noflines\lineheight\relax \scratchdimen-\scratchdimen \ifdim\scratchdimen>\zeropoint \nointerlineskip \advance\scratchdimen-\lineheight \vskip\scratchdimen \strut \par \fi} \protect % test \setuplayout[grid=yes,lines=42] \showgrid \showstruts \starttext \input tufte \snaptogrid\vbox{\switchtobodyfont[small] \input tufte \par} \input tufte {\switchtobodyfont[small] \input tufte \par} \synchronizegrid \input tufte \stoptext beware: this is tricky and if it starts oscillating, try to force page breaks here and there Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma@wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf -------------------------------------------------------------------------