Text FormattingChapters without numbers have different header format

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
trout_dipladokis
Posts: 2
Joined: Thu Feb 04, 2010 9:43 am

Chapters without numbers have different header format

Post by trout_dipladokis »

Hi,

I'm wanting to add an unnumbered chapter, but the command \chapter*{} removes all the formatting I have for the chapter title. Any help would be very much appreciated.

The formatting I have for chapter headings is given below:


\newlength{\chaprule}
\setlength{\chaprule}{0.2mm} % Value controls thickness of rule above
% and below chapter heading
\newlength{\ATchapskip}
\setlength{\ATchapskip}{10\p@} % Value controls spacing of chapter title
% from top of page

\renewcommand{\@makechapterhead}[1]{% Takes one argument: chapter title
\vspace*{\ATchapskip}
\vskip 10\p@
\noindent\rule{\textwidth}{\chaprule}
\begin{flushright} % Right justify the text
\large\scshape{ \@chapapp\space \thechapter}\par
% Write the chpater title in larger text
\LARGE\scshape{ #1 }\par
\end{flushright}
\vskip 10\p@
\noindent\rule{\textwidth}{\chaprule}
\vskip 40\p@
\thispagestyle{plain} % Remove headers at start of chapter

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Chapters without numbers have different header format

Post by localghost »

Build a minimal working example (MWE) with your modifications to give us an idea of your intentions.


Best regards and welcome to the board
Thorsten¹
trout_dipladokis
Posts: 2
Joined: Thu Feb 04, 2010 9:43 am

Re: Chapters without numbers have different header format

Post by trout_dipladokis »

It's fine. I worked out where I went wrong. I didn't realize that modifying the macro "\@makechapterhead' only changed the format of numbered chapters, and that for unnumbered chapters you have to modify "\@makeschapterhead".

Cheers
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Chapters without numbers have different header format

Post by localghost »

Nevertheless this seems to be done easier with the titlesec package.
Post Reply