0

When using the titlesec package to modify the layout of the chapter title, I get the error: Missing number, treated as zero., in the section title.

I use the following code to perform this action:

\usepackage{titlesec, blindtext, color}
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp\textcolor{gray75}{|}\hsp}{0pt}{\Huge\bfseries}

throwing error in the first section within the first chapter.

Error Errorr

The only way I have found to avoid generating an error is to remove this design. But I require to place this.

epR8GaYuh
  • 2,432
  • Please provide a complete minimal working example (MWE) of your current code which reproduces the mentioned problem. – epR8GaYuh Jun 23 '21 at 05:58
  • For now I would say: where does the second bracket after the label come from? And: it is not wise to name a label sec:1.1, because you will make mistakes when you put a new section before it in future (take a word from the section title instead). Third: maybe the point in the label causes the mistake. Fourth: otherwise indeed provide for an MWE. – C. Peters Jun 23 '21 at 10:18

0 Answers0