4

For a system userguide, I have to follow a style guide.

This style guide imposes me to have :

  • Chapters title in TOC without number neither word 'chapter' (in TOC and in the text)
  • In the text I have to place a little symbol (marketing stuff) before the chapter name
  • Section without the chapter number (I tryed \renewcommand{\thechapter}{} but the result on the section is :

.1 Section 1

.2 Section 2

I think I need to redefinine the chapter command (or create a new one) but I don't know how to do it.

  • Are the chapters going to be numbered in the document and unnumbered in the ToC? Is the mentioned symbol going to appear in the document or only in the ToC entries? – Thorsten Donig Jul 22 '13 at 7:14
  • About the chapters, they will be unnumbered in the ToC and in the document. About the symbol it have to appears only in the document. The ToC just have to display the chapter name. – Romain Jul 22 '13 at 8:46
5

One option using titlesec to change the chapter title formatting, titletoc to change the format for chapter entries in the ToC. \renewcommand\thesection{\arabic{section}} redefines the representation for the section counter to suppress the chapter counter. I used \S as the symbol before the chapter title but any other symbol can be used instead.

\documentclass{book}
\usepackage{titlesec,titletoc}

\titleformat{\chapter}[display]
  {\normalfont\huge\bfseries}{}{0pt}{\Huge\S}
\titleformat{name=\chapter,numberless}[display]
  {\normalfont\huge\bfseries}{}{0pt}{\Huge}
\titlecontents{chapter}
  [0pt]{\addvspace{10pt}\bfseries}{}{}
  {\hfill\contentspage}
\renewcommand\thesection{\arabic{section}}

\begin{document}

\tableofcontents
\chapter{Test chapter one}
\section{Test section one one}
\section{Test section one two}
\chapter{Test chapter two}
\section{Test section two one}
\section{Test section two two}

\end{document}

An image of the ToC:

enter image description here

An image of a chapter and sections in the document:

enter image description here

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.