Skip to content

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

Description

@kberry

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions