Cleveref는 IEEEtran에 정의된 선택적 인수로 \appendix를 중단합니다.

Cleveref는 IEEEtran에 정의된 선택적 인수로 \appendix를 중단합니다.

제목이 모든 것을 말해 주는 것 같아요. 이 MWE를 포함하면 cleveref출력 모양이 다음과 같이 변경됩니다.

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

이를 방지할 수 있는 옵션이 있나요? 설명서를 보았지만 cleveref아직 아무것도 찾지 못했습니다.

답변1

나는 이 문제가 내 웹 사이트에서 제공되는 시험판 버전(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}

여기에 이미지 설명을 입력하세요

관련 정보