Am 04.07.2025 um 13:00 schrieb John Was:
Hello.
I'm still in the newbie category with ConTeXt, and am getting to grips
with bookmarking of PDFs for the first time ever. The following example
gives the correct hierarchy of subordinated bookmarks - part, chapter,
and section, each progressively indented in the bookmark column at the
left. However, I don't want the parts to have numbers at all, and I
want the chapters to be numbered 1, 2, etc. (not 1.1, 1.2, etc.). If I
ever go live with ConTeXt, the sections won't have any numbers at all
(and I can see how to set this up), but in this default example I would
like them also to shift up one decimal place: 1.1., not 1.1.1, and so
on. I'm guessing there's an option in \part that I should be invoking,
but I don't immediately see what that is (there doesn't seem to be a
\startpart...\stoppart to allow the relatively straightforward
customization that we get with chapters and sections). Here is the example:
1. Numbering
You can set the number range of a heading with the sectionsegments key.
%%%% begin example
\setuphead [part] [placehead=yes]
\setuphead [chapter] [sectionsegments=chapter]
\setuphead [section] [sectionsegments=chapter:section]
\starttext
\part{This is a \tex{part}}
\chapter{This is a \tex{chapter}}
\section{This is a \tex{section}}
\stoptext
%%%% end example
2. Header and footer
You can disable headers and footers on chapter etc. page with the header
and footer keys.
%%%% begin example
\setuphead [chapter] [header=empty]
\starttext
\chapter{This is a \tex{chapter}}
\stoptext
%%%% end example
3. Page break
You can control whether chapters etc. start on an odd, even etc. page
with the page key.
%%%% begin example
\setuphead [chapter] [page=odd]
\starttext
\dorecurse{2}{\chapter{Chapter \convertnumber{word}{#1}}}
\stoptext
%%%% end example
PS. Keep your examples minimal and focus on the problem.
Wolfgang
___________________________________________________________________________________
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
___________________________________________________________________________________