From: Bruce Horrocks <ntg@scorecrow.com>
To: ntg-context mailing list <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Use of marking
Date: Thu, 21 Mar 2024 15:34:54 +0000 [thread overview]
Message-ID: <663930A5-3EBE-490B-8EB9-B21C73F14579@scorecrow.com> (raw)
In-Reply-To: <CAGhDZhAyCS43G=tQZeJEd2SaAbig+YkhMS23Lsx-ryFGq2Z6eg@mail.gmail.com>
> On 20 Mar 2024, at 18:45, Andres Conrado Montoya <andresconrado@gmail.com> wrote:
>
> 2. As far as I have found, including the chapter/section number in the marking is not really a trivial task. I usually hack something using \headnumber and \getmarking, like so:
You can do the following:
\startsetups[doc:header]
\getmarking[chapternumber] \space - \space \getmarking[chapter]
\space :: \space
\getmarking[sectionnumber] \space - \space \getmarking[section]
\stopsetups
\setupheadertexts[\setup{doc:header}]
\starttext
\dorecurse{10}{
\startchapter[title={This is my chapter}]
This is a chapter\par \dorecurse{6}{\input knuth } \input math-kontinuitet-sv
\startsection[title={This is my section}]
This is a section\par \dorecurse{6}{\input knuth }\input math-kontinuitet-sv
\stopsection
\stopchapter
}
\stoptext
Caveat: it needs an if...then test around the section number for when a section hasn't started.
—
Bruce Horrocks
Hampshire, UK
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2024-03-21 15:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-20 7:18 [NTG-context] " Thomas Meyer
2024-03-20 8:09 ` [NTG-context] " Hraban Ramm
2024-03-20 11:18 ` Thomas Meyer
2024-03-20 14:22 ` Hraban Ramm
2024-03-20 18:45 ` Andres Conrado Montoya
2024-03-21 15:34 ` Bruce Horrocks [this message]
2024-03-21 18:00 ` Thomas Meyer
2024-03-22 17:23 ` Pablo Rodriguez via ntg-context
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=663930A5-3EBE-490B-8EB9-B21C73F14579@scorecrow.com \
--to=ntg@scorecrow.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).