
私は本当に 20 ~ 30 分ほど探し続けましたが、望みのものが見つかりませんでした。それはとても簡単です。
私はarticleクラスを使っていますが、付録のタイトルが
付録 A: {タイトルを挿入}
今使っているのは
\documentclass[a4,12pt]{article}
\usepackage[titletoc,toc,title]{appendix}
\begin{document}
<main body of text>
\begin{appendices}
\section{Magnetic flux tubes}
Bunch of text
\end{appendices}
しかし、私は付録のタイトルとしてそれを取得し続けます。
A. 磁束管。
付録 A: 磁束管と表示させるにはどうすればよいですか。
また、理想的には付録のタイトルのサイズを変更したいと思います。
編集:私の問題は、ファイルのプリアンブルにこれがあることです
\usepackage{titlesec}
\usepackage{secdot}\sectiondot{subsection}\sectiondot{subsubsection}
%\renewcommand{\thesubsection}{\normalfont\arabic{section}.\arabic{subsection}}
\titleformat{\section}{\bf}{\thesection .}{0.5em}{}
\titleformat{\subsection}{\normalfont \it}{\thesubsection .}{0.5em}{}
\titleformat{\subsubsection}{\normalfont \it}{\thesubsubsection .}{0.6em}{}
私はこれを使用して、ドキュメントのタイトルを希望どおりに表示しようとしていますが、残念ながら、これらの新しいコマンドは付録セクションに渡ってしまいます。付録のみのタイトル形式を元に戻す方法はありますか?
答え1
\titleformat
付録の直前にもう一度使用して、必要な書式を設定することができます。
\documentclass{article}
\usepackage{titlesec}
\usepackage[titletoc,toc,title]{appendix}
\titleformat{\section}{\bfseries}{\thesection.}{0.5em}{}
\titleformat{\subsection}{\normalfont\itshape}{\thesubsection.}{0.5em}{}
\titleformat{\subsubsection}{\normalfont\itshape}{\thesubsubsection.}{0.6em}{}
\begin{document}
\section{A regular section}
\titleformat{\section}{\large\bfseries}{\appendixname~\thesection .}{0.5em}{}
\begin{appendices}
\section{Magnetic flux tubes}
Bunch of text
\end{appendices}
\end{document}
セクションの元の書式を復元し、「付録」という単語と番号の後のドットを追加するには、
\titleformat{\section}{\normalfont\Large\bfseries}{\appendixname~\thesection.}{1em}{}
2 文字のフォント コマンド ( \it
、\bf
など) は古い TeX コマンドであり、最近の LaTeX ドキュメントでは使用すべきではありません。代わりに\itshape
、を使用してください\bfseries
。
答え2
これでうまくいくと思います。私のマスター コードは次のようになります。
\documentclass[10pt,twoside,a4paper]{report}
\usepackage[pdftex]{graphicx}
\begin{document}
\include{Introduction}
\include{Theory}
\renewcommand{\chaptername}{Appendix} % To change title from chapter to Appendix
\appendix
\renewcommand{\thepage}{\thechapter.\arabic{page}} % This to change the page numebering format for the Appendices
\setcounter{page}{1}
\include{FluxCalc}
\include{ForceFieldCalc}
\end{document}
私は、\include{}
章と付録ごとに個別の .tex ファイルを呼び出しています。メインのコードがずっとすっきりするので、この方法の方が気に入っています。ここでは、introduction、theory、FluxCalc (この場合は付録 A)、ForceFieldCalc (この場合は付録 B) の 4 つの .tex ファイルを呼び出しています。出力 PDF には、下の図に示すように 4 ページあります。