
私はelsarticle
ドキュメントクラスを使用しています。付録は 1 つしかないので、「付録」の後の文字「A」を削除したいと思います。残念ながら、 と書くと\section*{Appendix title}
、方程式の番号が消えてしまいます。
MWE は次のとおりです。
\documentclass[authoryear,preprint,review,12pt]{elsarticle}
\usepackage[english]{babel}
\begin{document}
bla bla bla
\appendix
\section*{Appendix title}
\begin{equation}
3+3 = 6
\end{equation}
\end{document}
答え1
A.1
付録の方程式に、、などのように番号を付けたいとお考えだと思います。A.2
その場合は、\appendix
指示を削除し、代わりに次の指示を挿入することをお勧めします。
\setcounter{equation}{0}
\renewcommand\theequation{A.\arabic{equation}}
に続く\section*{Appendix Title}
。
補遺:elsarticle
ドキュメント クラスは LaTeX の\appendix
マクロを誤った方法で変更します。具体的には、\appendix
マクロの変更には次の命令が含まれます。
\gdef\thesection{\appendixname\@Alph\c@section}%
この場合、「付録」という単語とセクションカウンタ(「A」、「B」など)の間にスペースは残りません。正しい指示は次のようになります。
\gdef\thesection{\appendixname\ \@Alph\c@section}%
elsarticle
さらに悪いことに、ドキュメントクラスが採用しているアプローチ、つまり\appendixname
内部を含めるというアプローチは、 (パッケージから)または(パッケージから)\thesection
を使用してドキュメントの付録部分の番号付きセクションへの相互参照を作成しようとすると、深刻な問題に遭遇します。この問題を回避するには、たとえば、投稿に対する回答を参照してください。\autoref
hyperref
\cref
cleveref
「A Appendix」ではなく「Appendix A」とするこれらの考え方をドキュメント クラスに適用するとelsarticle
、次のコードをプリアンブルに追加するのがよいと思われます。
\usepackage{etoolbox}
\makeatletter
\def\@seccntformat#1{\@ifundefined{#1@cntformat}%
{\csname the#1\endcsname.\hskip0.5em} % default
{\csname #1@cntformat\endcsname}% enable individual control
}
\patchcmd{\appendix}{\appendixname}{}{}{}
\appto{\appendix}{%
\newcommand{\section@cntformat}{\appendixname\ \thesection.\hskip0.5em}}
\makeatother