1

Edit (context added) In a personal class which makes use of titleps, I'd like to switch to titlesec for its \ifthesection feature. For backward compatibility, there shouldn't be any visual difference. But, as shown by the following MCEs, there is a vertical spacing discrepancy with \usepackage{titleps} vs \usepackage[pagestyles]{titlesec}. The tiny difference in the header is not a big deal but more important is the vertical shift of the text. How to get rid of it?

MCEs

\documentclass{book}
\usepackage{titleps}
\usepackage{blindtext}
\begin{document}
\Blinddocument
\end{document}

\documentclass{book}
\usepackage[pagestyles]{titlesec}
\usepackage{blindtext}
\begin{document}
\Blinddocument
\end{document}

Diff (thanks to diffpdf)

enter image description here

0
1

I made a few experiment. Instead of blindtext I used lipsum.

First file

\documentclass{book}
\usepackage{titleps}
\showoutput
\usepackage{lipsum}
\begin{document}
\chapter{Heading on level 0 (chapter)}
\lipsum
\end{document}

Second file

\documentclass{book}
\usepackage[pagestyles]{titlesec}
\usepackage{lipsum}
\showoutput
\begin{document}
\chapter{Heding on level 0 (chapter)}
\lipsum
\end{document}

Third file

\documentclass{book}
\usepackage{lipsum}
\showoutput
\begin{document}
\chapter{Heding on level 0 (chapter)}
\lipsum
\end{document}

Results

There is no difference in output between second and third. There is difference between first and second and the same differences appear between first and third.

What's happening?

If loaded alone, titleps patches \chapter and the other sectional titles. This is not needed if it is loaded along titlesec. This leads to small differences in how the chapter header is typeset.

2
  • The differences in how the chapter header is typeset are indeed small. But more annoying is the vertical shift of the following text. – Denis Bitouzé Jun 10 '20 at 16:00
  • 1
    @DenisBitouzé I guess some “whatsit” enters the scene when the title has more than one line. – egreg Jun 10 '20 at 16:14

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.