cleveref は IEEEtran で定義されたオプション引数で \appendix を分割します。

cleveref は IEEEtran で定義されたオプション引数で \appendix を分割します。

タイトルがすべてを物語っていると思います。cleverefこの MWE を含めると、出力の見た目が変わります。

\documentclass{IEEEtran}
% \usepackage{cleveref}
\begin{document}
    \appendix[Appendix headline]
\end{document}

それを防ぐオプションはありますか?cleverefマニュアルを見ましたが、まだ何も見つかりません。

答え1

これは、私の Web サイトから入手できるプレリリース バージョン (0.21) では修正されていると思いますが、以前のプレリリース (0.20) でも修正されている可能性があります。http://www.dr-qubit.org/latex.html

少なくとも、MWE は cleveref の有無にかかわらず同一の出力を生成します。

答え2

\appendix最も速くて簡単な方法は、ロード前にの意味を保存しcleveref、パッケージをロードした後にそれを復元することです。

\documentclass{IEEEtran}
\let\ieeeappendix\appendix
\usepackage{cleveref}
\let\appendix\ieeeappendix

\begin{document}
\appendix[Appendix headline]
\end{document}

ただし、これにより の機能が制限される可能性があることに注意してくださいcleveref

答え3

と のより堅牢なバージョンを使用して、IEEEtranの定義を維持する機会を提供します。\appendix\AtBeginDocument{...}\appendix

コード内でIEEEtranが使用されるため、がこの情報を保存するので、ではなく が常に報告します。代わりに を使用してください。\refstepcounter{section}\appendix\labelcleverefSectionAppendix\label[appendix]{foo}

\documentclass{IEEEtran}

\usepackage{letltxmacro}

\usepackage{xparse}

\makeatletter
\LetLtxMacro\ieeetran@appendix\appendix
\AtBeginDocument{%
\RenewDocumentCommand{\appendix}{o}{%
  \IfValueTF{#1}{%
    \ieeetran@appendix[#1]%
  }{%
    \ieeetran@appendix%
  }%
}
}
\makeatother

\usepackage{cleveref}

\begin{document}
See \Cref{appone}

\appendix \label[appendix]{appone}

\appendix[Appendix headline] \label{apptwo}
\end{document}

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

関連情報