4

I made a book which is divided into parts, with \part{}. I want these parts to appear in the table of contents, but do not need them to appear within the document itself. I added \placehead=no to the \setuphead settings, which makes the title not appear, however, when \setuppagenumbering is set to alternative=doublesided, two completely empty pages are created.

\setuphead[part][number=no, placehead=no]
\setuplist[part][alternative=c]
\setuplist[title][alternative=c]
\setuppagenumbering [alternative=doublesided]
\starttext
    \definecombinedlist[content][part,chapter]
    \placecontent
    \part{Animals}
        \chapter{Birds}
        \chapter{Snails}
    \part{Plants}
        \chapter{Flowers}
        \chapter{Mushrooms}
\stoptext

The \part commands seem to be creating empty pages at page 2, 3, 8, and 9. Without the \part titles, these pages disappear.

How can I have parts in my document which are invisible, but not in the table of contents, and which also do not create blank pages in the document?

3

The page break is controlled independently by the page switch. The structure levels \part and \chapter default to the value right, which means in double-sided context that the respective headings are always located recto at the top, hence the extra blank page if the command is encountered on odd pages. (The page key inherits functionality from the \page macro.) To suppress the break you need to set it to no:

\setuphead[part][number=no, placehead=no, page=no]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.