ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Peter Park Nelson <peter.park.nelson@gmail.com>
To: ntg-context@ntg.nl
Subject: Columnset error with \setupheader[state=high]
Date: Wed, 7 Dec 2011 16:42:02 -0600	[thread overview]
Message-ID: <CAGfkPGkaDmobz+ZsJ2omVU0wEJzjsjvbkK5d6ENdGWYWRP5BNw@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 2048 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 2225 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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:[~2011-12-07 22:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07 22:42 Peter Park Nelson [this message]
2011-12-07 23:36 ` Peter Park Nelson
  -- strict thread matches above, loose matches on Subject: below --
2011-12-07  5:31 Peter Park Nelson
2011-12-09 16:24 ` Hans Hagen

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=CAGfkPGkaDmobz+ZsJ2omVU0wEJzjsjvbkK5d6ENdGWYWRP5BNw@mail.gmail.com \
    --to=peter.park.nelson@gmail.com \
    --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).