
我正在嘗試為學校寫一篇大型論文,並且正在使用回憶錄課程。我需要將附錄命名為「附錄 A:MyFirstAppendix」。現在,它們顯示為“A:MyFirstAppendix”。這是一個最小的工作範例:
\documentclass[openany,letterpaper,11pt,oneside]{memoir}
\chapterstyle{tandh}
\begin{document}
\frontmatter
\tableofcontents*
\mainmatter
\chapter{Lorem ipsum}
I want this to say `1 Lorem ipsum'
\appendix
\chapter{MyFirstAppendix}
I want this to say `Appendix A: MyFirstAppendix'
\chapter{MySecondAppendix}
I want this to say `Appendix A: MySecondAppendix'
\end{document}
我確定我可以添加這個命令:
\renewcommand\cftappendixname{\appendixname~}
在目錄中附錄字母之前寫上「附錄」。但我不知道如何讓它在文件的文本中工作。我覺得我也許可以寫一個新的章節樣式來做我想做的事並取代 tandh?我真的不知道該怎麼做,所以我希望我想太多了。
答案1
所使用的章節樣式不會在章節編號中加上前綴。因此,當然沒有加入附錄。您需要不同的章節樣式或使用兩種章節樣式
\makeatletter
\makechapterstyle{tandhapp}{%
\setlength{\beforechapskip}{1\onelineskip}%
\setlength{\afterchapskip}{2\onelineskip \@plus .1\onelineskip
\@minus 0.167\onelineskip}%
\renewcommand*{\printchaptername}{}%
\renewcommand*{\chapternamenum}{}%
\renewcommand*{\chapnumfont}{\normalfont\huge\bfseries}%
\renewcommand*{\printchapternum}{\chapnumfont \@chapapp~\thechapter:\space}%
\renewcommand*{\afterchapternum}{}%
%%% \renewcommand*{\chaptitlefont}{\chapnumfont\raggedright}}
\renewcommand*{\chaptitlefont}{\chapnumfont\memRTLraggedright}}
\makeatother
啟動為
\appendix
\chapterstyle{tandhapp}
額外資訊:\@chapapp
是一個神奇的宏,\chaptername
除非\appendix
處於活動狀態,否則它會解析為\appendixname