2

I'm starting to get a little desperate. My first chapter has no number and I can't figure out why.

To get chapter numbers I used \setcounter{secnumdepth}{4} . This works perfectly for every chapter, except for the first. I haven't used anything other as for the other chapters.

\chapter{Test1} -> no Number -> "Test1"

 several sections and subsections

\chapter{Test2} -> Results in "1 Test2"

I tried

\chapter{Test}

some text

\chapter{Test1}

 several sections and subsections

\chapter{Test2}

and this resulted in Test and Test1 having no number and Test2 having again the number 1.

Any ideas would be greatly appreciated!

The same problem appears in the standard Tufte Sample Book (\documentclass{tufte-book}), which is available here. I removed the star from the Introduction chapter:

\chapter*{Introduction} -> \chapter{Introduction} 

and added \setcounter{secnumdepth}{4}. This yields chapter numbers for all chapters, except for the first one.

  • 3
    Please make your code compilable (if possible), or at least complete it with \documentclass{...}, the required \usepackage's, \begin{document}, and \end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. – Henri Menke Feb 12 '15 at 11:13
  • 1
    As Henri states, we need more information, with \documentclass{tufte-book}\setcounter{secnumdepth}{4}\begin{document}\chapter{Test}\chapter{Test2}\end{document} I get numbers on both chapters, so we need a minimal working example (MWE). – Torbjørn T. Feb 12 '15 at 11:25
  • Have you put \setcounter{secnumdepth}{4} before \begin{document} (in preamble)? – user11232 Feb 12 '15 at 11:26
  • @HarishKumar Yes I added it directly under \documentclass{tufte-book} . – jak Feb 12 '15 at 11:28
  • 1
    Is your first chapter before \mainmatter? – Torbjørn T. Feb 12 '15 at 11:31
9

I guess your first chapter is part of the frontmatter, i.e. it is placed between \frontmatter and \mainmatter. In the \frontmatter chapters are unnumbered, as demonstrated by this example:

\documentclass{tufte-book}
\setcounter{secnumdepth}{4}
\begin{document}
\frontmatter
  \chapter{Test}
\mainmatter
  \chapter{Test2}
\end{document}

Hence, just move your first chapter after \mainmatter to solve the issue.

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.