3

My document has parts and *parts. I redefined the \part to print only a decorated number, that's working fine. Now I need \part* to print a decoration using the same style as \part. \part*{} ships out an empty page, which makes sense because it must not have a line for a part number. I can more or less do it by hand, using \clearpage and putting just the decoration on the page. But then both the horizontal and the vertical alignment of the decorations come out different to the part page layout. How can I make \part* print my decoration on the part page?

Note: I don't have a table of contents, so that's not a concern.

\documentclass[open=any]{scrbook}
\usepackage{adforn}
\usepackage{graphicx}
\usepackage{lipsum}

\renewcommand*{\thepart}{\arabic{part}}
\renewcommand*{\partformat}{\adforn{21}~\thepart~\adforn{49}}
\renewcommand*{\partpagestyle}{empty}

\begin{document}
\part{}
\lipsum

\clearpage
\begin{centering}
\vspace*{\fill}
\Huge\adforn{21}\adforn{11}\adforn{49}
\vfill
\end{centering}
\clearpage

\lipsum

\part*{}

\lipsum

\end{document}
4

You can local redefine \partformat to print\adforn{11} instead of the part number. Then use \part{} and correct the part counter by adding -1.

\documentclass[open=any]{scrbook}
\usepackage{adforn}
\usepackage{graphicx}
\usepackage{blindtext}

\renewcommand*{\thepart}{\arabic{part}}
\renewcommand*{\partformat}{\adforn{21}~\thepart~\adforn{49}}
\renewcommand*{\partpagestyle}{empty}

\newcommand*{\decoratedpage}{%
  {\renewcommand*{\partformat}{\adforn{21}~\adforn{11}~\adforn{49}}
  \part{}
  \addtocounter{part}{-1}}%
}

\begin{document}
\tableofcontents
\part{}
\blinddocument

\decoratedpage
\blinddocument

\part{}
\blinddocument
\end{document}

There is no problem with a possible table of contents: because of the empty argument \part{} will not get an automatic entry.

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.