付録のタイトルを「付録 X: 名前」にして、メモワールを使用して目次と本文に表示する

付録のタイトルを「付録 X: 名前」にして、メモワールを使用して目次と本文に表示する

私は学校で回想録の授業で長い論文を書こうとしています。付録のタイトルを「付録 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~} 

TOC の付録の文字の前に `Appendix ' と書きます。ただし、文書のテキストでこれを機能させる方法がわかりません。必要なことを行うために新しい chapterstyle を書いて tandh を置き換えることができるような気がします。ただし、その方法が本当にわからないので、考えすぎだといいのですが。

答え1

使用されている章スタイルでは、章番号にプレフィックスは追加されません。したがって、当然付録は追加されません。別の章スタイルを使用するか、2つの章スタイルを使用する必要があります。

\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

関連情報