ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Thomas Friedrich <friedrich@statistik.tu-dortmund.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Chapter-Names and Section-Names in Header don't work as expected
Date: Mon, 15 Jul 2013 12:17:59 +0200	[thread overview]
Message-ID: <CA+cORN8zCDqWjDHrOiYTUPvHTZYn=Gwi5oR=Cg1uaZ3AZC6=wg@mail.gmail.com> (raw)
In-Reply-To: <E69AE456-2C4D-4195-98E0-3332CA724533@gmail.com>

Hello everybody,

learning my lesson for asking questions only with a minimal example
attached, please have a look at the following code

~~~ snip ~~~
\setuphead[chapter][page=yes,header=empty]
\setuppagenumbering[start=start,alternative=doublesided,location=]
\setupheader[][style=small]
\setupheadertexts[section][pagenumber][pagenumber][chapter]

\starttext
\chapter{Anfang}
\section{Eins}
\input knuth \input knuth \input knuth
\section{Zwei}
\input knuth \input knuth \input knuth
\section{Drei}
\input knuth \input knuth \input knuth
\chapter{Mitte}
\section{Eins}
\input knuth \input knuth \input knuth
\section{Zwei}
\input knuth \input knuth \input knuth
\section{Drei}
\input knuth \input knuth \input knuth
\section{Vier}
\input knuth \input knuth \input knuth
\chapter{Ende}
\section{Eins}
\input knuth \input knuth \input knuth
\section{Zwei}
\input knuth \input knuth \input knuth
\section{Drei}
\input knuth \input knuth \input knuth
\stoptext
~~~ snip ~~~

How can I get the chapter number and section number to also appear in
the header in front of the respected chapter title and chapter number?
I couldn't find the answer in the online documentation.

Thank you for your help.

Thomas






2013/5/31 Wolfgang Schuster <schuster.wolfgang@gmail.com>:
>
> Am 31.05.2013 um 15:31 schrieb Thomas Friedrich <friedrich@statistik.tu-dortmund.de>:
>
>> Hello,
>>
>> I would like to put the \chapter and \section names, including their
>> respected numbers, in the header of my document, in small script and
>> separated from the main text by a horizontal line, the width of
>> \textwidth. On uneven pages the chapter-names, on even pages the
>> section names. Reading the manual (4.16 Headers and Footers), I
>> thought this should work:
>>
>> \setuppagenumbering[start=start,alternative=doublesided,location=]
>> \setupheader[][style=small,after=\hrule]
>> \setupheadertexts[section][pagenumber][pagenumber][chapter]
>>
>> Problems: 1) the mark "chapter" does not work. The section title
>> appears but not the chapter title.
>> 2) The chapter-number and the section-number don't appear in the header.
>> 3) \hrule draws a line from the very left to the very right of the page.
>>
>> My Questions: i) What is the "mark-mechanism" that is mentioned in the
>> manual (couldn't find any information about that).
>> ii) Why does chapter not work?
>> iii) \hrule is probably not the best command here?
>>
>> I found the following somewhere in the web:
>>
>> \setupheadertexts[{\tfx\fetchmark[section][first]}][][][{\tfx\fetchmark[chapter][current]}]
>>
>> which gives me indeed the chapter-name.  Why "current" instead of
>> "first"? What do I have to add to get the numbers?
>
> It does help when you can show us a minimal example for your document.
>
> Wolfgang
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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:[~2013-07-15 10:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-31 13:31 Thomas Friedrich
2013-05-31 15:35 ` Wolfgang Schuster
2013-07-15 10:17   ` Thomas Friedrich [this message]
2013-07-15 13:35     ` Wolfgang Schuster
2013-07-15 14:23       ` Thomas Friedrich
2013-07-15 14:33         ` Wolfgang Schuster
2013-07-15 15:02           ` Thomas Friedrich
2013-07-15 14:33         ` Aditya Mahajan

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='CA+cORN8zCDqWjDHrOiYTUPvHTZYn=Gwi5oR=Cg1uaZ3AZC6=wg@mail.gmail.com' \
    --to=friedrich@statistik.tu-dortmund.de \
    --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).