-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdemo_external_appendix.tex
46 lines (37 loc) · 1.42 KB
/
demo_external_appendix.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
\documentclass{article}
\usepackage{amsmath}
\usepackage{xparse} % Not needed with recent LaTeX
\usepackage{amsthm}
% Create new theorems, or use ntheorem/thmtools/...
\newtheorem{thm}{Theorem}[section]
% Default uses autoref, but you can also use cleveref, see the documentation.
% Say to autoref that "thm" are Theorems.
\newcommand{\thmautorefname}{Theorem}
%% Load the library. createShortEnv automatically creates the shortcuts
%% thmE, theoremE, lemmaE, propositionE, corollaryE, proofE. See \newEndThm for more details.
%% The "external appendix" option is used to ensure theorem are restatable with the auxiliary file is
%% opened inside another file (do load the xr package for crossreferences)
\usepackage[createShortEnv,conf={external appendix}]{proof-at-the-end}
\usepackage{hyperref}
\usepackage{cleveref}
\begin{document}
\section{Theorems}\label{sec:theorems}
%% If you don't have any title, leave an empty bracket like \begin{thmE}[][end]
\begin{thmE}[My title][end, restate]
I am a theorem:
\begin{align}
1+1 &= 2 \label{eq:nontrivialfact}
\end{align}
\end{thmE}
\begin{proofE}
And I am a trivial proof: $1+1=2$.
\end{proofE}
\begin{thmE}[][all end]
I'm only in Appendix.
\end{thmE}
\begin{proofE}
Check the first file, you will see.
\end{proofE}
\section{Proofs}
In this document, we made the choice to display the appendix in another file. Compile \verb|demo_external_appendix_part2.tex| now ;)
\end{document}