0

I am writing PhD thesis and I have some guidelines put forth by the university that I must conform to. I have mostly nailed it using the memoir package by following the thesis example memoir provides. Please note, I don't have the option of changing these guidelines. Also the university does provides a template but it is quite old and redefines stuff like \year which breaks compatibility with a lot of packages.

One area I could use help with is in the Chapter styling. I have a specific amount of space I need before and after and the entire thing needs to be on one line. It should look like for example "1.0 Introduction" all on one line (centered and bolded).

I have achieved this with the following.

\renewcommand{\chapterheadstart}{} 
\renewcommand{\afterchapternum}{}
\renewcommand{\chapnamefont}{\centering\bfseries} 
\renewcommand{\chaptitlefont}{\centering\bfseries}
\renewcommand{\chapnumfont}{\centering\bfseries}
\renewcommand{\chaptername}{}
\renewcommand{\chapternamenum}[1]{#1.0\space\space\space\space}

which yields

enter image description here

However this seems to mess up the Appendix numbering which now looks like

enter image description here

I would prefer it to say "Appendix A Supplemental" without the .0.

I'd appreciate any advice on how this could be achieved. If my attempt at chapter styling could be done better I'd appreciate any feedback there as well.

Here is a MWE.

\documentclass[11pt,letterpaper,oneside]{memoir}

\usepackage{lipsum}

% ================ % Chapter Styling % ================ \renewcommand{\chapterheadstart}{} \renewcommand{\afterchapternum}{} \renewcommand{\chapnamefont}{\centering\bfseries} \renewcommand{\chaptitlefont}{\centering\bfseries} \renewcommand{\chapnumfont}{\centering\bfseries} \renewcommand{\chaptername}{} \renewcommand{\chapternamenum}[1]{#1.0\space\space\space\space} % ================

\begin{document}

\mainmatter \chapter{Introduction} \lipsum[1] \appendix \chapter{Supplemental} \lipsum[1]

\end{document}

Nukesub
  • 607

1 Answers1

0

Try this code.

memories uses \ifanappendix to test if the number is an appendix.

a

\documentclass[11pt,letterpaper,oneside]{memoir}

\usepackage{lipsum}

% ================ % Chapter Styling % ================ \renewcommand{\chapterheadstart}{} \renewcommand{\afterchapternum}{} \renewcommand{\chapnamefont}{\centering\bfseries} \renewcommand{\chaptitlefont}{\centering\bfseries} \renewcommand{\chapnumfont}{\centering\bfseries} \renewcommand{\chaptername}{} \renewcommand{\chapternamenum}[1]{\ifanappendix \space #1\else #1.0\fi} % changed <<<<<<<<<< \renewcommand*{\afterchapternum}{\space\space\space\space}% added <<<<<<<<<<<< % ================

\begin{document}

\mainmatter
\chapter{Introduction}
\lipsum[1]
\chapter{Another chapter}
\lipsum[1]
\appendix
\chapter{Supplemental}
\lipsum[1]
\chapter{Extra Supplement}
\lipsum[1]

\end{document}

Simon Dispa
  • 39,141
  • Thank you! One question though, why did you use \renewcommand* instead of \renewcommand? – Nukesub Jun 25 '23 at 18:31
  • @Nukesub It probably won't make any difference in this case, but see [https://tex.stackexchange.com/a/1054/161015]. I assume that memoir uses \renewcommand* in its code for the same reason. – Simon Dispa Jun 25 '23 at 23:46