1

I have defined a specific format for Head Chapter

\def\@makechapterhead#1{
{\parindent \z@ \centering
    \normalfont
    \ifnum \c@secnumdepth >\m@ne
    \if@mainmatter
    \Large\bfseries \@chapapp\space \thechapter
    \par\nobreak
    %\vskip 20\p@
    \fi
    \fi
    \interlinepenalty\@M
    \Large \bfseries #1\par\nobreak
    \vskip 40\p@
    \thispagestyle{empty}
}}

But when I use chapter*{} command it is not used. How can avoid that?

  • Welcome to TeX.SX. For starred chapters, there is the macro \@makeschapterhead, they are unnumbered and do not need a number style definition. – Johannes_B Oct 15 '18 at 5:11
  • With titlesec, you might be able to define the chapterhead for both instances at once, but i do not like the package. – Johannes_B Oct 15 '18 at 5:12
0

\chapter's title/heading is set with \@makechapterhead while \chapter*'s title/heading is set with \@makeschapterhead. So, in order to maintain the same flavour of content you've defined, copy the definition and remove the parts about setting the label Chapter X:

enter image description here

\documentclass{book}

\makeatletter
\def\@makechapterhead#1{
{\parindent \z@ \centering
    \normalfont
    \ifnum \c@secnumdepth >\m@ne
    \if@mainmatter
    \Large\bfseries \@chapapp\space \thechapter
    \par\nobreak
    %\vskip 20\p@
    \fi
    \fi
    \interlinepenalty\@M
    \Large \bfseries #1\par\nobreak
    \vskip 40\p@
    \thispagestyle{empty}
}}

\def\@makeschapterhead#1{
{\parindent \z@ \centering
    \normalfont
    %\ifnum \c@secnumdepth >\m@ne
    %\if@mainmatter
    %\Large\bfseries \@chapapp\space \thechapter
    %\par\nobreak
    %%\vskip 20\p@
    %\fi
    %\fi
    %\interlinepenalty\@M
    \Large \bfseries #1\par\nobreak
    \vskip 40\p@
    \thispagestyle{empty}
}}
\makeatother

\begin{document}

\chapter{A chapter}

\chapter*{Another chapter}

\end{document}

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.