`apxproof` 包:如何与现有附录一起使用

`apxproof` 包:如何与现有附录一起使用

我有一份包含一些证明和一些自定义附录的文档。我想将证明延迟到附录,因此正在使用apxproof包。但是,apxproof似乎无法识别我有现有的附录(请参阅下面的 MWE)。我如何才能apxproof更新其命名以尊重现有附录?

\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}
\newtheorem{theorem}{Theorem}
\newtheoremrep{lemma}[theorem]{Lemma}

\title{Test}
\begin{document}
\maketitle
\tableofcontents

% main section
\section{Test}
Citing a paper \cite{lamport94}.
\begin{lemmarep}[Test]
  Test!
\end{lemmarep}
\begin{proof}
  Test!
\end{proof}
\begin{toappendix}
  \label{apx:delayed_proofs}
\end{toappendix}
Here's a reference to the \cref{apx:delayed_proofs}!

% references
\begin{thebibliography}{999}
  \bibitem{lamport94}
    Leslie Lamport,
    \emph{\LaTeX: A Document Preparation System}.
    Addison Wesley, Massachusetts,
    2nd Edition,
    1994.
\end{thebibliography}

% appendix section
\appendix
\appendixpage
\section{Test appendix}
Some writeup about something.

\end{document}

答案1

答案是这里

以下是一个例子

\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}
\renewcommand{\appendixprelim}{\onecolumn\appendix\appendixpage}
\newtheorem{theorem}{Theorem}
\newtheoremrep{lemma}[theorem]{Lemma}

\title{Test}
\begin{document}
\maketitle
\tableofcontents

% \begin{toappendix}
%   \label{apx:delayed_proofs}
% \end{toappendix}


% intro
\section{Intro}
\nosectionappendix

% main section
\section{Test 2}
\nosectionappendix

Citing a paper \cite{lamport94}.
\begin{lemmarep}[Test]
  Test!
\end{lemmarep}
\begin{proof}
  Test!
\end{proof}
Here's a reference to the \cref{apx:delayed_proofs}!

% references
\begin{thebibliography}{999}
  \bibitem{lamport94}
    Leslie Lamport,
    \emph{\LaTeX: A Document Preparation System}.
    Addison Wesley, Massachusetts,
    2nd Edition,
    1994.
\end{thebibliography}

% appendix section
% \appendix
% \appendixpage
\begin{toappendix}
  \label{apx:delayed_proofs}
  \section{My appendix}
  Some writeup about something.
\end{toappendix}
\end{document}

相关内容