1

I'm trying to write some notes and I changed the \chapter layout in a separate cls class file:

\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{myclass}
\LoadClassWithOptions{book}


\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\RequirePackage{lmodern}
\RequirePackage{amsfonts}
\RequirePackage{amssymb}
\RequirePackage{eucal}
\RequirePackage[tracking=true,spacing=true,kerning=true]{microtype}
\microtypecontext{spacing=nonfrench}
\SetTracking{encoding=*,shape=sc}{0}


%this is my attempt to change chapter layout
\def\@makechapterhead#1{%
\begin{list}{}{%
\setlength{\leftmargin}{\parindent}%
\setlength{\rightmargin}{0pt}%
\setlength{\labelwidth}{0pt}%
\setlength{\labelsep}{0pt}%
\setlength{\itemindent}{0pt}%
\setlength{\listparindent}{0pt}%
\fontsize{13.5pt}{14.5pt}%
\usefont{T1}{cmbright}{m}{n}%
\raggedright%
}%
\item%
\thechapter\par\vskip 23.5pt plus 12pt minus 6.5pt%
#1\par\vskip -6pt\hrulefill
\end{list}%
\vskip 12.7mm plus 4mm minus 4mm}


% some packages
\RequirePackage{tikz}
\RequirePackage{amsmath}
\RequirePackage{mathdots}
\RequirePackage{bigdelim}
\RequirePackage{graphicx}
\RequirePackage{multirow}
\RequirePackage{threeparttable}
\RequirePackage{marginnote}
\RequirePackage{chappg}

after reading the book.cls user manual the code above was the best I could do. The problem is that this code do not change the layout of \chapter*. Here is an example

\documentclass{myclass}

\begin{document}

\chapter{Blah}
blah blah blah

\chapter*{Foo}
blah blah blah

\end{document}

which produces enter image description here for \chapter{Blah}, and this enter image description here for \chapter*{Foo}. So I want to know how can I change the layout for \chapter*

Thanks in advance

  • 1
    just do the same with \@makeschapterhead (note the s) – David Carlisle Jun 11 '18 at 22:05
  • @DavidCarlisle simple and accurate! thanks a lot. – Luis Turcio Jun 11 '18 at 22:20
1

Just do the same with \@makeschapterhead (note the s)

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.