1

my code is like this:

\input{sections/Preface}\clearpage
\part{Problems}
\input{sections/Text1}\clearpage
\input{sections/Text2}\clearpage
\part{solutions}
\input{sections/sol1}\clearpage
\input{sections/sol2}\clearpage
\input{sections/sol3}\clearpage
\input{sections/sol4}\clearpage
\input{sections/Closingword}\clearpage

The things I would like to change:

  • Remove Numbering from Preface (Using section* in the file makes it disappear from the table of contents)
  • Restart Numbering whenever a new part starts (So Sol1 is numbered as #1 and not #3)
  • Remove numbering from the closingword and make it not included in the second part
  • On the PDF itself, Problems is written twice and I only want it one time there (Twice makes no sense to me and I don't know how to change it)

P.S. I'm not allowed to use any other documentclass as I'm given

Thanks in advance!

1

If you use \section* and you want it to appear to the table of contents, you can use the \addcontentsline command. Something like this:

\section*{Section 1}
\addcontentsline{toc}{section}{\protect\numberline{}Section 1}%

To restart the numbering of any part/section, you can use the set counter command:

\setcounter{section}{0}

It will reset the counter to 0, so when you start again, it will be 1.

|improve this answer|||||
  • 1
    Thanks, that solved everything! Also the partnaming displaying twice got fixed by that too! Just had to change it to part* to only display the text once. The problem here was that it disappeared from the TOC too. But with your line \addcontentsline I got it to be included by changing section to part. Thank you for your quick answer! – Eugen Eskuel Oct 28 '18 at 15:37

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.