ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Subject: Re: marking, headers and 2 columns
Date: Wed, 28 Apr 2004 20:14:48 +0200	[thread overview]
Message-ID: <6.0.1.1.2.20040428201149.07f98640@server-1> (raw)
In-Reply-To: <1082457768.4649.20.camel@phoebus.venus.bay>

At 12:42 20/04/2004, you wrote:
>Dear readers of this list,
>I would like to typeset a bible-text with ConTeXt. The header should
>print the first  and the last verse on that particular page. I used the
>commands \marking to mark the verses and \getmarking to setup the
>headers as shown in the excerpt below. This works correctly with a
>single column layout, but not in a two column layout. The last verse
>printed in the headers is not the correct one, the first or the second
>on the following page is given.
>Is there a work around for this problem? Many thanks in advance for
>helpful hints

i knew it was coming one day ....

add this to cont-new.tex:

\unprotect
     \letvalue{\??mk\??mk\v!kolom:\v!eerste }\getsplitfirstmark
     \letvalue{\??mk\??mk\v!kolom:\v!laatste}\getsplitbottommark
\protect

then this should work (unbalanced only,  and not yet in columnsets)

\definemarking[vers][]

\setupheadertexts[{\getmarking[vers][first] -- \getmarking[vers][column:last]}]

\starttext

\startcolumns[n=2,balance=no]

\dorecurse{10}{\expanded{\marking[vers]{\recurselevel}} 
\recurselevel:\dorecurse{4}{\input ward } \endgraf}

\stopcolumns

\stoptext

The following definition is nicer:

\setupheadertexts
   [\doiftext{\getmarking[vers][first]}
      {\doiftextelse{\getmarking[vers][column:last]}
         {\getmarking[vers][first] -- \getmarking[vers][column:last]}
         {\getmarking[vers][first]}}]

      reply	other threads:[~2004-04-28 18:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-20 10:42 Tobias Hilbricht
2004-04-28 18:14 ` 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=6.0.1.1.2.20040428201149.07f98640@server-1 \
    --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).