On Tue, Aug 24, 2010 at 6:01 PM, Michael Goerz
go...@physik.fu-berlin.de wrote:
I'm trying to create a book where the front matter has no
headers/footers, except roman numeral page numbers at the top outside of the
page. The main matter should have Arabic numeral page numbers
(restarting with '1') at the top outside of each page, plus the name of
the book in the header of each even page and the name of the chapter in
the header of each odd page, with no footer. However, on the pages
where a new chapter starts (which is set to always be an odd page),
there should be no header, and the page number should appear centered
at the bottom of the page.
I'm quite confused about how to achieve this in ConTeXt.
An excerpt from the project structure is
./env.tex
./project.tex
./book/book.tex
./book/chapters/chapter1.tex
The following is a shortened excerpt from book.tex:
\startfrontmatter
\setuppagenumbering[state=stop] % nothing for now, should be roman page
% numbers later
\component book/frontmatter
% ToC ...
\stopfrontmatter
\startbodymatter
\setuppagenumber[number=1]
\setupheadertexts
[{Name of Chapter}] [{}]
[{}] [{Name of Book}]
\setuppagenumbering[
alternative=doublesided, % mirrored even/odd pages
location={header,margin},
style=small]
\component vol04_1/articles/azimov
\stopbodymatter
This leads to my first question: I generally try to keep all formatting
definitions in env.tex. However, it seems to me that since I want to have
different settings in the frontmatter compared to the mainmatter, I need to
put
the \setuppagenumbering and \setupheadertexts in book.tex, which slightly
bothers me. The way I intuitively feel it should work is that I would define
various headertexts and pagenumberings under some label in env.tex, and then
activate the different configurations in book.tex via that label. Is there
anything in ConTeXt that I may have overlooked that makes something like that
(centrally defining several alternative header/footer/pagenumber
configurations) possible?
Next, the problem of having a different header/footer/pagenumber on pages
where
a new chapter starts. In env.tex, I have
\setuphead[chapter][
page=mychapterpagebreak,
number=no,
alternative=c,
align={center, nothyphenated, verytolerant},
style={\switchtobodyfont[16pt]},
header=high,
footer=none,
]
This causes the chapter pages to have no header/footer/pagenumber at all,
which
is halfway what I want. But actually, I don't really understands why that
works
either. My understanding is that header=high means there should be no header
on the first page and the normal header on all subsequent pages. The way I've
set it up though, the page number is not really part of the header (it's
separately set up through \setuppagenumbering). So why does the page number
disappear as well? And, of course, the main question: How do I get the page
number centered in the bottom of that page? Again, I feel if there was some
way
to define different configurations for the header/footer/pagenumbers under
different labels, e.g. a label 'chapterfooter', it would then make sense to do
something like 'footer=chapterfooter', instead of 'footer=none'. But I guess
that's not the way it works -- so how *does* it work?
Digging deeper in the reference manual, it seems that
\definetext[chapter][footer][pagenumber]
together with
\setuphead[chapter][
page=mychapterpagebreak,
number=no,
alternative=c,
align={center, nothyphenated, verytolerant},
style={\switchtobodyfont[16pt]},
header=high,
footer=chapter,
]
is the answer.
Do I understand it correctly that
\definetext[chapter][footer]...
is exactly the same as
\setupfootertext...
but with the extra label chapter? So that would be exactly what my
intuition said should exist.
Can I only use the chapter label inside of \setuphead, like in the
above example, or could I also somehow use \definetext to setup
different headers/footers for the frontmatter/mainmatter, for example?
Thanks,
Michael
___
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
___