0

I have following curious problem with unnumbered part (\part*{}).


All chapters are unnumbered (they have own names, so numbering is a bit useless; and also, I don't know how to avoid prefix Chapter ... from chapter name) and additional adding to TOC runs well.

\chapter*{Nové místo}
\addcontentsline{toc}{chapter}{Nové místo}

TOC calls correct page number of chapter's beginning.


Chapters are arranged to parts. Three parts, containing the story, are numbered.

\part{Vetřelci}
\part{Domowina I}
\part{Stvoření světa}

They look in menu like that: Correct part page numbering

But currently the fourth part is unnumbered - because it contains list of important characters from story and brief informations about them and some other similar informations.

\part*{Dodatky}
\addcontentsline{toc}{part}{Dodatky}

Problem is, that TOC calls incorrect page of part beginning. Instead number of page where part name really stands, it calls number of page of the first chapter inside of this part.

So, in TOC is one page called twice - even if part name stands solo on page. And chapter begins on next page. Like that: Wrong part page numbering


Minimal Working Exemple

\documentclass[b5paper,10pt,twoside,openany]{book}
\usepackage[czech]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}

\begin{document}
\pagenumbering{roman} 
\pagestyle{plain}

\author{Václav Macůrek}
\title{Vzpomínky na Kouzelný svět}
\date{nikdy}

\maketitle

\mainmatter
\pagenumbering{arabic}
\part{Vetřelci}
\chapter{AAAAA}
\part{Domowina I}
\chapter{BBBBB}
\part{Stvoření světa}
\chapter{CCCCC}

\backmatter
% bibliography, glossary and index would go here.

\part*{Dodatky}
\addcontentsline{toc}{part}{Dodatky}


\chapter*{Nové místo}
\addcontentsline{toc}{chapter}{Nové místo}
\tableofcontents

\end{document}

The unnumbered part "Dodatky" is on page 7: enter image description here

But on page 8 in the Table of contents: enter image description here

If I replace book class with scrbook class (to allow using of \addpart for unnumbered part called Dodatky), many (mostly bold, as I saw) texts use different (very ugly) font than I set. And also, page numbers are on left or right side of page instead center (that was my option).

8
  • Please modify your code so it can be compilable. We don't have the externals tex files Verelci etc. For example, replace \include{./TeX_files/Vetrelci} by \part{Vetřelci}. You can also delete some package calls, for exemple graphicx isn't used here. So you provide a MWE, minimal working exemple (tex.meta.stackexchange.com/q/228), and this helps us to help you. Also, you have two times the page 2 in your document, I suggest you to add \pagenumbering{roman} right after \begin{document}, and \pagenumbering{arabic} right after \mainmatter.
    – quark67
    Feb 17, 2023 at 23:42
  • It is possible to have a chapter number and not show it. Feb 18, 2023 at 14:59
  • @WillieWong: I use (correct) order: \part -> \chapter -> \section -> \pargraph. I paid attention to avoid wrong order. And package titlesec doesn't meet my needs.
    – Václav
    Feb 18, 2023 at 19:37
  • @quark67: Thanks for hint about pagenumbering. Package graphicx: you may see it unused, but without it, design is broken. MWE: thanks, I will try to add some images of it.
    – Václav
    Feb 18, 2023 at 19:59
  • 2
    @Václav: For your part numbering issue, use \cleardoublepage \addcontentsline{toc}{part}{Dodatky}\part*{Dodatky}.
    – Werner
    Feb 18, 2023 at 21:22

1 Answer 1

3

You can set secnumdepth to -2, so also parts are unnumbered. No * necessary in \backmatter.

(The book class doesn't really expect that \part is used in \backmatter.)

\documentclass[b5paper,10pt,twoside,openany]{book}
\usepackage[czech]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{graphicx}

\begin{document}
\pagenumbering{roman} 
\pagestyle{plain}

\author{Václav Macůrek}
\title{Vzpomínky na Kouzelný svět}
\date{nikdy}

\maketitle

\mainmatter
%\pagenumbering{arabic} % unnecessary
\part{Vetřelci}
\chapter{AAAAA}
\part{Domowina I}
\chapter{BBBBB}
\part{Stvoření světa}
\chapter{CCCCC}

\backmatter
\setcounter{secnumdepth}{-2}
% bibliography, glossary and index would go here.

\part{Dodatky}


\chapter{Nové místo}

\tableofcontents

\end{document}

enter image description here

Note that \mainmatter does \pagenumbering{arabic}, so it's not necessary to repeat the instruction.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .