Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newlinetospace doesn't discard optional arg of \\ #85

Open
kberry opened this issue Jan 6, 2025 · 0 comments
Open

newlinetospace doesn't discard optional arg of \\ #85

kberry opened this issue Jan 6, 2025 · 0 comments

Comments

@kberry
Copy link

kberry commented Jan 6, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant