titlesec
titlesec copied to clipboard
newlinetospace doesn't discard optional arg of \\
Following #81 ... I don't know if it's feasible, but newlinetospace doesn't discard the optional arg to \, which is not unusual to need in chapter titles.
\documentclass{book}
\usepackage[newlinetospace]{titlesec}
\titleclass{\chapter}{top}
%
\titleformat{\chapter}
[display]% shape
{\huge\rm}% format
{\thechapter}% label (.2)
{0\baselineskip}% sep between label and text (vertical because shape=display)
{}% before-code
%
\begin{document}
\tableofcontents
\chapter{The\\[-1pt]First Chapter}
Text of first chapter.
\newpage Second page of first chapter.
\end{document}
The output has literal text [-1pt] (or PT) in the toc and running head.
Just wanted to report ... --thanks, karl.