6

Using XeLaTeX and Book package.

I'd like to remove "part #" and "section #" from the \part and \section titles, thus keeping the part and section titles only. How can I accomplish this?

Thanks in advance for any help.

  • 1
    the class book has no leading section for \section. I suppose you mean "chapter". – user2478 Jun 6 '12 at 6:36
  • If you want that no sectional unit is numbered, then say \setcounter{secnumdepth}{-2} before \begin{document}. Otherwise, please state better your problem. Welcome to TeX.SX! – egreg Jun 6 '12 at 9:31
  • Since you have a response below that seems to answer your question, please consider marking it as ‘Accepted’ by clicking on the tickmark below its vote count (see How do you accept an answer?). If it does not answer your question, feel free to add some more information. – brian-ammon Dec 1 '12 at 22:59
10

Confer the Wikibooks article on Section numbering:

“To get an unnumbered section heading which does not go into the Table of Contents, follow the command name with an asterisk before the opening curly brace: \subsection*{Introduction}. […] If you want the unnumbered section to be in the table of contents anyway, use the \addcontentsline command like this:

\section*{Introduction}
\addcontentsline{toc}{section}{Introduction}

[…]”

For more info (PDF bookmarks for the unnumbered chapters, clearing the page after \chapters) please see the Wikibooks article.

1

Another way, to suppress in the whole document parts and chapters names and/or numbers (like Part I, and Chapter 2) is to actually change it to nothing on the preamble:

\renewcommand{\partname}{}
\renewcommand{\thepart}{}
\renewcommand{\chaptername}{}
\renewcommand{\thechapter}{}

NOTE:

If you are a babel or polyglossia user the above code is useless for the \partname and similars, instead you'd have to use:

\addto\captionsLANGUAGE{\renewcommand{\partname}{}
                        \renewcommand{\chaptername}{}} 
\renewcommand{\thepart}{}
\renewcommand{\thechapter}{}

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.