请参阅“apxproof”中的附录

请参阅“apxproof”中的附录

我在用防伪并希望引用重复/生成的附录。我尝试将以下行添加到我的序言中:

\usepackage[bibliography=common]{apxproof}
\renewcommand{\appendixprelim}{\clearpage\onecolumn\appendix\appendixpage\section{}\label{apx:delayed_proofs}}

然后通过引用附录\cref{apx:delayed_proofs},但\cref没有在超链接中提供“附录 A”的文本。

MWE 如下:

\documentclass[paper=letter,DIV=10]{scrartcl}

%
%%
%%% preamble
%%
%

%%% main packages
\usepackage{import}
\usepackage[utf8]{inputenc}
\usepackage{babel}% https://tex.stackexchange.com/questions/482222/automatically-use-german-style-french-quotes
\usepackage{geometry}
\usepackage[titletoc,title]{appendix}
\usepackage{xpatch}
\xpretocmd{\appendixpagename}{\sffamily}{}{}
\usepackage{amssymb,amsmath,amsthm,amsfonts,bm}
\usepackage{thmtools}
\usepackage{cleveref}

%%% appendix proofs
\usepackage[bibliography=common]{apxproof}
\renewcommand{\appendixprelim}{\clearpage\onecolumn\appendix\appendixpage\section{}\label{apx:delayed_proofs}}
\newtheorem{theorem}{Theorem}
\newtheoremrep{lemma}[theorem]{Lemma}

\title{Test}
\begin{document}
\maketitle
\tableofcontents
\section{Test}
\begin{lemmarep}[Test]
  Test!
\end{lemmarep}
\begin{proof}
  Test!
\end{proof}
Here's a reference to the \cref{apx:delayed_proofs}!
\end{document}

答案1

这很好用:

\documentclass{scrartcl}

\usepackage[titletoc,title]{appendix}
\usepackage{xpatch}
\xpretocmd{\appendixpagename}{\sffamily}{}{}
\usepackage{cleveref}

\usepackage[bibliography=common]{apxproof}
\renewcommand{\appendixprelim}{\clearpage\onecolumn\appendix\appendixpage}
\newtheorem{theorem}{Theorem}
\newtheoremrep{lemma}[theorem]{Lemma}

\title{Test}
\begin{document}
\maketitle
\tableofcontents
\section{Test}
\begin{lemmarep}[Test]
  Test!
\end{lemmarep}
\begin{toappendix}
  \label{apx:delayed_proofs}
\end{toappendix}
\begin{proof}
  Test!
\end{proof}
Here's a reference to the \cref{apx:delayed_proofs}!
\end{document}

相关内容