* Chapter-Names and Section-Names in Header don't work as expected
@ 2013-05-31 13:31 Thomas Friedrich
2013-05-31 15:35 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Friedrich @ 2013-05-31 13:31 UTC (permalink / raw)
To: ntg-context
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?
Thank you for your help!
Thomas
PS. I am using mkii, I belive, (texexec ...)
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Chapter-Names and Section-Names in Header don't work as expected
2013-05-31 13:31 Chapter-Names and Section-Names in Header don't work as expected Thomas Friedrich
@ 2013-05-31 15:35 ` Wolfgang Schuster
2013-07-15 10:17 ` Thomas Friedrich
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2013-05-31 15:35 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Chapter-Names and Section-Names in Header don't work as expected
2013-05-31 15:35 ` Wolfgang Schuster
@ 2013-07-15 10:17 ` Thomas Friedrich
2013-07-15 13:35 ` Wolfgang Schuster
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Friedrich @ 2013-07-15 10:17 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Chapter-Names and Section-Names in Header don't work as expected
2013-07-15 10:17 ` Thomas Friedrich
@ 2013-07-15 13:35 ` Wolfgang Schuster
2013-07-15 14:23 ` Thomas Friedrich
0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2013-07-15 13:35 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 15.07.2013 um 12:17 schrieb Thomas Friedrich <friedrich@statistik.tu-dortmund.de>:
> 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]
\setupheadertexts
[{\getmarking[sectionnumber]~\getmarking[section]}]
[pagenumber]
[pagenumber]
[{\getmarking[chapternumber]~\getmarking[chapter]}]
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Chapter-Names and Section-Names in Header don't work as expected
2013-07-15 13:35 ` Wolfgang Schuster
@ 2013-07-15 14:23 ` Thomas Friedrich
2013-07-15 14:33 ` Wolfgang Schuster
2013-07-15 14:33 ` Aditya Mahajan
0 siblings, 2 replies; 8+ messages in thread
From: Thomas Friedrich @ 2013-07-15 14:23 UTC (permalink / raw)
To: mailing list for ConTeXt users
Does the job. I also realised that \setupheader[][style=small] doesn't
have an effect, too. So, I am using
\setupheadertexts
[{\tfx{\getmarking[sectionnumber].~\getmarking[section]}}]
[{\tfx\pagenumber}]
[{\tfx\pagenumber}]
[{\tfx{\getmarking[chapternumber].~\getmarking[chapter]}}]
now. Thank you, Wolfgang.
Thomas
2013/7/15 Wolfgang Schuster <schuster.wolfgang@gmail.com>:
>
> Am 15.07.2013 um 12:17 schrieb Thomas Friedrich <friedrich@statistik.tu-dortmund.de>:
>
>> 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]
>
> \setupheadertexts
> [{\getmarking[sectionnumber]~\getmarking[section]}]
> [pagenumber]
> [pagenumber]
> [{\getmarking[chapternumber]~\getmarking[chapter]}]
>
> 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
> ___________________________________________________________________________________
--
Thomas Friedrich
Fakultät Statistik
Technische Universität Dortmund
44221 Dortmund
Telefon: 0231 755 - 3116
FAX: 0231 755 - 5304
E-Mail: friedrich@statistik.tu-dortmund.de
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Chapter-Names and Section-Names in Header don't work as expected
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
1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Schuster @ 2013-07-15 14:33 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 15.07.2013 um 16:23 schrieb Thomas Friedrich <friedrich@statistik.tu-dortmund.de>:
> Does the job. I also realised that \setupheader[][style=small] doesn't
> have an effect, too. So, I am using
Use \setupheader[style=small]. Empty arguments can be problematic because
some commands do different things depending on the number of arguments.
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Chapter-Names and Section-Names in Header don't work as expected
2013-07-15 14:23 ` Thomas Friedrich
2013-07-15 14:33 ` Wolfgang Schuster
@ 2013-07-15 14:33 ` Aditya Mahajan
1 sibling, 0 replies; 8+ messages in thread
From: Aditya Mahajan @ 2013-07-15 14:33 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Jul 15, 2013, at 10:23 AM, Thomas Friedrich <friedrich@statistik.tu-dortmund.de> wrote:
> Does the job. I also realised that \setupheader[][style=small] doesn't
> have an effect, too. So, I am using
>
\setupheader[style=small]
Aditya
> \setupheadertexts
> [{\tfx{\getmarking[sectionnumber].~\getmarking[section]}}]
> [{\tfx\pagenumber}]
> [{\tfx\pagenumber}]
> [{\tfx{\getmarking[chapternumber].~\getmarking[chapter]}}]
>
> now. Thank you, Wolfgang.
>
> Thomas
>
>
>
> 2013/7/15 Wolfgang Schuster <schuster.wolfgang@gmail.com>:
>>
>> Am 15.07.2013 um 12:17 schrieb Thomas Friedrich <friedrich@statistik.tu-dortmund.de>:
>>
>>> 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]
>>
>> \setupheadertexts
>> [{\getmarking[sectionnumber]~\getmarking[section]}]
>> [pagenumber]
>> [pagenumber]
>> [{\getmarking[chapternumber]~\getmarking[chapter]}]
>>
>> 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
>> ___________________________________________________________________________________
>
>
>
> --
> Thomas Friedrich
> Fakultät Statistik
> Technische Universität Dortmund
> 44221 Dortmund
> Telefon: 0231 755 - 3116
> FAX: 0231 755 - 5304
> E-Mail: friedrich@statistik.tu-dortmund.de
> ___________________________________________________________________________________
> 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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Chapter-Names and Section-Names in Header don't work as expected
2013-07-15 14:33 ` Wolfgang Schuster
@ 2013-07-15 15:02 ` Thomas Friedrich
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Friedrich @ 2013-07-15 15:02 UTC (permalink / raw)
To: mailing list for ConTeXt users
Ah, cool, thanks, I really had no idea, this would be the problem.
I had a look at
http://wiki.contextgarden.net/Command/setupheader
and, thus, thought that I would need to put the 'style=small'
statement in a second pair of squared brackets.
Cheers,
Thomas
2013/7/15 Wolfgang Schuster <schuster.wolfgang@gmail.com>:
>
> Am 15.07.2013 um 16:23 schrieb Thomas Friedrich <friedrich@statistik.tu-dortmund.de>:
>
>> Does the job. I also realised that \setupheader[][style=small] doesn't
>> have an effect, too. So, I am using
>
> Use \setupheader[style=small]. Empty arguments can be problematic because
> some commands do different things depending on the number of arguments.
>
> 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
> ___________________________________________________________________________________
--
Thomas Friedrich
Fakultät Statistik
Technische Universität Dortmund
44221 Dortmund
Telefon: 0231 755 - 3116
FAX: 0231 755 - 5304
E-Mail: friedrich@statistik.tu-dortmund.de
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-07-15 15:02 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-31 13:31 Chapter-Names and Section-Names in Header don't work as expected Thomas Friedrich
2013-05-31 15:35 ` Wolfgang Schuster
2013-07-15 10:17 ` Thomas Friedrich
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
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).