3

As default chapter looks like:

"Chapter 1"

I need it to be

"1 chapter"

How can I change number placement? I am using \documentclass[a4paper]{report}

  • 1
    Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – jub0bs Nov 7 '13 at 20:22
8

Using the default report document class, you can switch these entries around by updating \@makechapterhead - the macro responsible for setting the chapter heading in a numbered chapter. its default definition is

\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
        \huge\bfseries \@chapapp\space \thechapter
        \par\nobreak
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}

where \@chapapp\space \thechapter inserts Chapter <num>. Using etoolbox, we can patch this and swap them around:

enter image description here

\documentclass{report}
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\makeatletter
\patchcmd{\@makechapterhead}% <cmd>
  {\@chapapp\space \thechapter}% <search>
  {\thechapter\space \@chapapp}% <replace>
  {}{}% <success><failure>
%\renewcommand{\@chapapp}{chapter}% Chapter > chapter
\makeatother
\begin{document}
\chapter{A chapter}
\end{document}

For writing <num> chapter (instead of <num> Chapter), uncomment the \renewcommand that changes \@chapapp to chapter.

1

It is not clear in which places you want changes: only at the beginning or also in the other places (running heads, table of contents, etc.). If you additionaly do not want to change the inner chapter name, the solution may be as the following (both fragments of code extracted, one part changed):

\documentclass[a4paper]{report}

\begin{document}

%\chapter{First}

\makeatletter

\def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne
                         \refstepcounter{chapter}%
                         \typeout{\@chapapp\space\thechapter.}%
                         \addcontentsline{toc}{chapter}%
                                   {\protect\numberline{\thechapter}#1}%
                    \else
                      \addcontentsline{toc}{chapter}{#1}%
                    \fi
                    \chaptermark{#1}%
                    \addtocontents{lof}{\protect\addvspace{10\p@}}%
                    \addtocontents{lot}{\protect\addvspace{10\p@}}%
                    \if@twocolumn
                      \@topnewpage[\@makechapterhead{#2}]%
                    \else
                      \@makechapterhead{#2}%
                      \@afterheading
                    \fi}
\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
%        \huge\bfseries \@chapapp\space \thechapter
   \huge\bfseries  \thechapter\space\MakeLowercase{\@chapapp} % PS
        \par\nobreak
        \vskip 20\p@
    \fi
    \interlinepenalty\@M
    \Huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}

\makeatother

\chapter{Second}


\end{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.