付録に記載されている章の見出し

付録に記載されている章の見出し

私は\fancyhdr見出しとレポートのパッケージをドキュメントクラスとして使用しています。サンプルコードは以下にあります。

\documentclass[a4paper,11pt]{report} 
\usepackage[toc,page]{appendix}
\usepackage{fancyhdr}


\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{\chaptername
\ \thechapter.\ #1}{}}
\fancyhf{}
\fancyhead[LE,LO]{\slshape \leftmark}
\rhead{\thepage}
\cfoot{}

\begin{document}
\pagenumbering{arabic}

\input{chap_01}
\input{chap_02}
\input{chap_03}

\begin{appendices}

\input{Appendix_01}
\end{appendices}
\end{document}

今はすべて動作しているようですが、付録ページでは次のようなメッセージが表示されます: ここに画像の説明を入力してください

章の代わりに「付録 A. パラメータ定義」としたいと思います。

提案はありますか?

答え1

単に線を引くだけで

\renewcommand\chaptername{Appendix}

線のすぐ後

\begin{appendices}

ここに画像の説明を入力してください

サンプルドキュメント:

\documentclass[a4paper,11pt]{report}
\usepackage[toc,page]{appendix}
\usepackage{fancyhdr}


\pagestyle{fancy}
\renewcommand{\chaptermark}[1]{%
\markboth{\chaptername
\ \thechapter.\ #1}{}}
\fancyhf{}
\fancyhead[LE,LO]{\slshape \leftmark}
\rhead{\thepage}
\cfoot{}

\begin{document}
\pagenumbering{arabic}

\begin{appendices}

\renewcommand\chaptername{Appendix}

\chapter{Parameter Definition}
\newpage
\setcounter{page}{35}
some text
\end{appendices}
\end{document} 

答え2

\chapternameLaTeX にはすでにと を切り替えるメソッドがあります\appendixname。コマンドは\@chapapp通常 に展開されますが、の後\chapternameを意味するように再定義されます。\appendixname\appendix

あなたの例から不要なものを削除しました。

\documentclass[a4paper,11pt]{report}

\usepackage{kantlipsum} % just for the example

\usepackage[toc,page]{appendix}
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\slshape \leftmark}
\fancyhead[R]{\thepage}
\makeatletter % necessary for using \@chapapp
\renewcommand{\chaptermark}[1]{%
  \markboth{\@chapapp\ \thechapter.\ #1}{}}
\makeatother

\begin{document}
\pagenumbering{arabic}

\chapter{One}
\kant

\chapter{Two}
\kant


\begin{appendices}

\chapter{Again}
\kant

\end{appendices}
\end{document}

ここに画像の説明を入力してください

関連情報