[Tex/LaTex] Section without a chapter number, in a chaptered document

chapters

I am using chapters. I want to include one section (a page or two) that does not have a chapter number, and that does not increment the chapter counter. I've tried includeing it, without using chapter, and the section didn't show up at all. How can I include a chapter-less section in a chaptered document?

Best Answer

For example, use \counterwithout{section}{chapter} to remove chapter counter output in front of the section number (this does remove the section counter also from the reset list!)

Later on, it's possible to use \counterwithin{section}{chapter} to restore the usual setup.

\documentclass{book}

\usepackage{chngcntr}

\begin{document}
\chapter{First}

\counterwithout{section}{chapter}

\section{Has no chapter number}
\section{Other section}


\counterwithin{section}{chapter}
\chapter{Second}

\section{Foo}
\end{document}

Here's a package-less approach, just using a redefinition of \thesection, but storing the original version before with \let\latexthesection\thesection.

\documentclass{book}

\let\latexthesection\thesection



\begin{document}
\chapter{First}

\renewcommand{\thesection}{\arabic{section}}

\section{Has no chapter number}
\section{Other section}


\renewcommand{\thesection}{\latexthesection}
\chapter{Second}

\section{Foo}
\end{document}

enter image description here

Update with Interlude headings

\documentclass{book}

\let\latexthesection\thesection

\usepackage{blindtext}

\begin{document}
\chapter{First}

\renewcommand{\thesection}{\arabic{section}}
\markboth{Interlude}{Interlude}
\section{Has no chapter number}
\section{Other section}

\renewcommand{\thesection}{\latexthesection}
\chapter{Second}

\section{Foo}

\blindtext[5]
\end{document}
Related Question