ラテックスの二重の虫垂

ラテックスの二重の虫垂

付録にタイトルが 2 つあるのには理由があるのでしょうか?

\documentclass[12pt,oneside]{report} 
\begin{document}

test 
\appendix 
\chapter{\textrm\bfseries Appendixtest2}\label{append}


\end{document}

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

付録のタイトルを(\section ではなく \chapter を使用)次の形式に強制できますか:

\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\huge}

答え1

(1)は\appendix タイトルを生成せず、\chapter「第1章」の代わりに「付録A」を印刷するように動作を変更するだけです。

(2) タイトルは1つだけであり、 によって生成され\chapter、 1行目に\chaptertitlename(付録)と\thechapter(A)が、もう1行に章の引数(付録テスト2)が含まれています。

(3)そのコマンドで章タイトルのフォーマットを強制することができます。\titleformatパッケージを使用してtitlesec:

\documentclass[12pt,oneside]{report} 
\usepackage{titlesec}
\titleformat{\chapter}[display]
{\normalfont\huge\bfseries}{\chaptertitlename\ \thechapter}{20pt}{\huge}
\begin{document}
\appendix 
\chapter{The title of the appendix}
\end{document} 

ただし、デフォルトの形式を強制的にデフォルトの形式に設定しようとしていることに注意してください。したがって、効果は見られません。

たとえば、1 行に 1 つのタイトルのみを使用するなど、他の形式を使用しても実際に機能していることがわかります。

ムウェ

\documentclass[12pt,oneside]{report} 
\usepackage{titlesec}
\titleformat{\chapter}{\Large}{\chaptertitlename\ \thechapter:}{1em}{\bfseries}
\begin{document}
\appendix 
\chapter{The title of the appendix}
\end{document}

または 2 行以上で...

ムウェ

\documentclass[12pt,oneside]{report} 
\usepackage{titlesec}
\titleformat{\chapter}{\huge}{\chaptertitlename\ \thechapter}{0pt}{\hrule\bigskip\hfill\bfseries\sffamily}
\begin{document}
\appendix 
\chapter{The title of the appendix}
\end{document}

あるいは、もう少しトリッキーな方法もあります:

ムウェ3

\documentclass[12pt,oneside]{report} 
\usepackage[explicit]{titlesec}
\titleformat{\chapter}{\Large}{}{1em}{\bfseries #1 (\chaptertitlename\  \thechapter)}
\begin{document}
\appendix 
\chapter{The title of the appendix}
\end{document}

関連情報