In the same text as in previous question, I would like to have parts with names with linebreaks. Purpose of this new style is to avoid roman numbering of parts that happen on the same place (see difference between part called Jádro and part called Domowina I).
\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{Jádro \* --- \* Přijatá pozvánka}
\chapter{BBBBB}
\part{Domowina I}
\chapter{CCCCC}
\backmatter
% bibliography, glossary and index would go here.
\tableofcontents
\end{document}
However, those linebreaks appear also in table of contents.
\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{Jádro \* --- \* Přijatá pozvánka}
\chapter{BBBBB}
\part{Domowina I}
\chapter{CCCCC}
\backmatter
% bibliography, glossary and index would go here.
\tableofcontents
\end{document}
Is any way how to have part name with linebreaks - but avoid linebreaks in table of contents?
\partto define a different text for the ToC. – cabohah Apr 10 '23 at 14:07\part[Jádro --- Přijatá pozvánka]{Jádro \\* --- \\* Přijatá pozvánka}– samcarter_is_at_topanswers.xyz Apr 10 '23 at 14:13