From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/73005 Path: news.gmane.org!not-for-mail From: Peter Park Nelson Newsgroups: gmane.comp.tex.context Subject: Re: Columnset error with \setupheader[state=high] Date: Wed, 7 Dec 2011 17:36:52 -0600 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2102264945==" X-Trace: dough.gmane.org 1323301037 9210 80.91.229.12 (7 Dec 2011 23:37:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 7 Dec 2011 23:37:17 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Dec 08 00:37:10 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RYR30-0004zS-NR for gctc-ntg-context-518@m.gmane.org; Thu, 08 Dec 2011 00:37:10 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 145ADCB158; Thu, 8 Dec 2011 00:37:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id eDyRl6uYPQHk; Thu, 8 Dec 2011 00:37:07 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id E60D5CB145; Thu, 8 Dec 2011 00:37:06 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6D519CB145 for ; Thu, 8 Dec 2011 00:37:05 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 6lhAvbOdf1vw for ; Thu, 8 Dec 2011 00:36:53 +0100 (CET) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 9386FCB144 for ; Thu, 8 Dec 2011 00:36:53 +0100 (CET) Original-Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id pB7NaqUR012499 for ; Thu, 8 Dec 2011 00:36:52 +0100 Original-Received: by wgbds13 with SMTP id ds13so1759681wgb.2 for ; Wed, 07 Dec 2011 15:36:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=x5x2ImExImAStjW8w1vUB5YkbQCm+GA1eEDmxlrQJSs=; b=l5++GK1UrpVS2YtapUEV8qMZ2JqBuSCkkY22P1ReScjXGbfp/Hdl00ka3zu2mVx0dG eohM0kRiKpctcc2igzWf6sc9NvV124wvqaCpey3qNQvfAM0SUSyR5xfsMiC+ZyZaan+0 69k+KFEE+1kCHA+I64o5dv+vOZSXdux4ooVs4= Original-Received: by 10.227.207.82 with SMTP id fx18mr485261wbb.19.1323301012331; Wed, 07 Dec 2011 15:36:52 -0800 (PST) Original-Received: by 10.223.60.206 with HTTP; Wed, 7 Dec 2011 15:36:52 -0800 (PST) In-Reply-To: X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=74.125.82.45; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0eG6nAQSO - 826800ca34a8 - 20111208 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.219 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:73005 Archived-At: --===============2102264945== Content-Type: multipart/alternative; boundary=0015174c1734c55ec904b38906fa --0015174c1734c55ec904b38906fa Content-Type: text/plain; charset=ISO-8859-1 Those \unexpanded 's are not necessary, sorry. On Wed, Dec 7, 2011 at 4:42 PM, Peter Park Nelson < peter.park.nelson@gmail.com> wrote: > Update: > > I don't have a solution yet, but here is my attempt to figure out where > this problem comes from. I may be (probably am) wrong; I am new to ConTeXt > and not an expert on its internals. But I'll toss this out to see if anyone > is interested. > > When \startcolumnset is called, it seems to take a "snapshot" of the state > of the layout (via setuplayout). However, layout can change, even without > \setuplayout being explicitly called again, as in the case of header > state=high (which modifies the layout of the first page only). By visual > inspection, it looks like the columnset output routine continues to use the > page dimensions from the first page on subsequent pages. Since the first > page has no header space, height of the text box on the first page will be > larger than on subsequent pages. Therefore, applying the first page height > on subsequent pages will result in text that runs over the footer area. > > To see if a new call to \startcolumnset would fix things, I tried to find > a way to automatically do \startcolumnset again at the beginning of the > second page. A crude hack, using the startpostponing mechanism: > > \startpostponing[2] % do this block on the second page > \unexpanded\stopcolumnset\unexpanded\startcolumnset[name] % manually end > the current columnset and then start it again. > \stoppostponing > > This unfortunately results in a blank page after the first page; however, > the rest of the pages after that blank page have correct columnsets and > footers. > > So a real solution to this problem could perhaps be done in two different > ways -- the difference being where in the ConTeXt code it is implemented: > A. The columnset output routine "listens" for changes in the layout state > and reloads or adjusts itself when layout state changes; or, > B. Any change in layout state passed to the output routine triggers a > re-call of the \startcolumnset macro. > > These are probably oversimplified, but I hope someone who understands the > columnset output routine can see what I am trying to get at. > -- > Peter Park Nelson > peter.park.nelson@gmail.com > -- Peter Park Nelson peter.park.nelson@gmail.com --0015174c1734c55ec904b38906fa Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Those \unexpanded 's are not necessary, sorry.

On Wed, Dec 7, 2011 at 4:42 PM, Peter Park Nelson <peter.park.nelson@gm= ail.com> wrote:
Update:

I don't have a solution= yet, but here is my attempt to figure out where this problem comes from. I= may be (probably am) wrong; I am new to ConTeXt and not an expert on its i= nternals. But I'll toss this out to see if anyone is interested.

When \startcolumnset is called, it seems to take a "snapshot"= of the state of the layout (via setuplayout). However, layout can change, = even without \setuplayout being explicitly called again, as in the case of = header state=3Dhigh (which modifies the layout of=A0 the first page only). = By visual inspection, it looks like the columnset output routine continues = to use the page dimensions from the first page on subsequent pages. Since t= he first page has no header space, height of the text box on the first page= will be larger than on subsequent pages. Therefore, applying the first pag= e height on subsequent pages will result in text that runs over the footer = area.

To see if a new call to \startcolumnset would fix things, I tried to fi= nd a way to automatically do \startcolumnset again at the beginning of the = second page. A crude hack, using the startpostponing mechanism:

\startpostponing[2] % do this block on the second page
\unexpanded\stopc= olumnset\unexpanded\startcolumnset[name] % manually end the current columns= et and then start it again.
\stoppostponing

This unfortunately re= sults in a blank page after the first page; however, the rest of the pages = after that blank page have correct columnsets and footers.

So a real solution to this problem could perhaps be done in two differe= nt ways -- the difference being where in the ConTeXt code it is implemented= :
A. The columnset output routine "listens" for changes in the= layout state and reloads or adjusts itself when layout state changes; or, =
B. Any change in layout state passed to the output routine triggers a re-ca= ll of the \startcolumnset macro.

These are probably oversimplified,= but I hope someone who understands the columnset output routine can see wh= at I am trying to get at.
--
Peter Park Nelson
peter.park.nelson@gmail.com



--
Peter Park Nelso= n
peter.park.nelson@gmail= .com
--0015174c1734c55ec904b38906fa-- --===============2102264945== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============2102264945==--