summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-02-07 21:40:18 +0000
committerKarl Berry <karl@freefriends.org>2022-02-07 21:40:18 +0000
commita4c5c9826e217b374234a296a1c0c7fcfe91ef93 (patch)
tree36fa9fde52d3c3824e011caefb19770610a32ca6
parent088ca7f8f3fc260fc202e63151a4cd1d61db4046 (diff)
proof-at-the-end (7feb22)
git-svn-id: svn://tug.org/texlive/trunk@61933 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/proof-at-the-end/README.md82
-rw-r--r--Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end.pdfbin315974 -> 321713 bytes
-rw-r--r--Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.pdfbin121558 -> 121559 bytes
-rw-r--r--Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.tex26
-rw-r--r--Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.dtx318
-rw-r--r--Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.ins2
-rw-r--r--Master/texmf-dist/tex/latex/proof-at-the-end/proof-at-the-end.sty105
7 files changed, 450 insertions, 83 deletions
diff --git a/Master/texmf-dist/doc/latex/proof-at-the-end/README.md b/Master/texmf-dist/doc/latex/proof-at-the-end/README.md
index 5e7a2f9b957..9f27306c59a 100644
--- a/Master/texmf-dist/doc/latex/proof-at-the-end/README.md
+++ b/Master/texmf-dist/doc/latex/proof-at-the-end/README.md
@@ -7,17 +7,16 @@ WARNING: this package is definitely usable, but may not be as tested and stable
This package aims to provide a way to easily move proofs in the appendix. You can:
- Move proofs in different places/sections by giving different "categories" to the theorems
-- Create links from theorem to proof, and from proof to theorem
+- Create links from theorem to proof, and from proof to theorem (and configure the text)
- Restate the theorem in appendix (or before)
-- Keep the proof in the main body like normal theorems by just adding with just one keyword
+- Choose what you want to keep in the main text or in appendix (you can put in appendix either everything, just the proof, the theorem and the proof by keeping (or not) a copy in the body of the article...)
- Duplicate the proof in appendix and in the current section, practical to use synctex during the proof writting
-- Add comments that would appear only in the appendix (or in both body and appendix)
-- Move both the theorem and the proof completely in appendix
+- Add text that would appear only in the appendix (or in both body and appendix)
- Easily change the defaults, and create your own styles/environments
- Include sketch of proof in the main text, and full proof in appendix
- Change the text of the link, for example to translate into another language
- Have a nice environment-based commands in order to mimic the usual theorem/proof structure.
-
+- Separate the main article and the body in two documents (some journals may ask for a separate file for the appendix)
NB: This project is hosted on github at [https://github.com/leo-colisson/proof-at-the-end](https://github.com/leo-colisson/proof-at-the-end) . Feel free to contribute, report bugs, or read/copy-paste the documentation/examples from there.
@@ -223,7 +222,7 @@ An older version of the package explicitely loaded `hyperref` with no option, an
### Configuration and how to use and create styles ###
-You can very easily configure this package, and choose how each theorem/proof must be displayed by providing a value in `OPTIONS`. For example, if you would like to keep the proof of a theorem in the main text like any normal theorem, use the `normal` option:
+You can very easily configure this package, and choose how each theorem/proof must be displayed by providing a value in `OPTIONS`. For example, if you would like to keep the proof of a theorem in the main text like any normal theorem, use the `normal` option.
```latex
\begin{theoremEnd}[normal]{thm}[A title]
@@ -234,6 +233,26 @@ You can very easily configure this package, and choose how each theorem/proof mu
\end{proofEnd}
```
+If you loaded the package using `\usepackage[createShortEnv]{proof-at-the-end}` (starting from 2022/01/28), you also have preconfigured shortcuts for multiple environments, namely `proofE` (to replace `proof`), `thmE` (to replace `thm`), `theoremE` (to replace... ok you got the pattern), `lemmaE`, `propositionE`, `propertyE`, `factE` and `corollaryE`. This way, you can simplify the above as:
+```latex
+\begin{thmE}[A title][normal]
+ You can easily turn a theorem back into a normal theorem!
+\end{thmE}
+\begin{proofE}
+ And keep the proof with you!
+\end{proofE}
+```
+
+(You can of course remove the `[...]` containing the options and the title, however if you want to add options without any title, **make sure to use empty brackets for the title**, like `\begin{thmE}[][normal]`.
+
+Since 2022/01/28, you can also create new theorem environment that directly come with a preconfigured style (you may also find `\pratendSetLocal` useful if you want to change the style in a whole section). For instance to create a `thmNormal` environment having the `normal` option and a `thmSpecial` environment having the `all end, category=mySpecial` options, just do:
+```
+\newEndThm[normal]{thmNormal}{thm} % 'thm' is the name of the existing thm environment
+\newEndThm[all end, category=mySpecial]{thmSpecial}{thm}
+```
+
+This way, you can simply use `\begin{thmSpecial}[Special title] ... \end{thmSpecial}` to create a theorem going in the special category (see below). (you also have `\newEndProof[options]{newProofEnv}` to define new proofs, but it is less useful as options are typically given in the theorem).
+
The options are in fact a set of keys/values, thanks to `pgfkeys`. So you can combine them with comma separated list like that (order matters, as the right-most values may overwrite configuration set by left-most values):
```latex
@@ -274,6 +293,11 @@ Note however that for now it is *not* possible to use macros directly inside the
}
```
+or, for short (needs version > 2022/02/04):
+```latex
+\pratendSetGlobal{one big link="blabla"}
+```
+
and for local configuration:
```latex
\pgfkeys{/prAtEnd/local custom defaults/.style={
@@ -282,15 +306,11 @@ and for local configuration:
}
```
-Finally, it can be practical to define custom environments to avoid typing always `theoremEnd` using something like that (`thmE` is the shortcut environment to create, and `thm` is the old one):
-
+for short (needs version > 2022/02/04):
```latex
-\newEndThm[normal]{thmE}{thm}
-\newEndProof{proofE}
+\pratendSetLocal{category=greattheorem}
```
-By default, loading the package using the `createShortEnv` option automatically creates the shortcut environments `proofE` (to replace `proof`), `thmE` (to replace `thm`), `theoremE` (to replace... ok you got the pattern), `lemmaE` and `corollaryE`.
-
Then you can use like that:
```latex
@@ -316,7 +336,7 @@ Then you can use like that:
\end{proofE}
```
-Note also that it is also possible to give options to the `proofEnd` environment, but it is usually useless, as it will automatically pick the parameters from the last `theoremEnd` environment. However, if for some reasons you want to change the options of the proof only, you can do it, but do it as your own risks ;)
+Note also that it is possible to give options to the `proofEnd` environment, but it is usually useless, as it will automatically pick the parameters from the last `theoremEnd` environment. However, if for some reasons you want to change the options of the proof only, you can do it, but do it as your own risks ;)
### Usual styles ###
@@ -326,10 +346,10 @@ We predefined some pretty common styles/options. The full list is at the end of
- `category=yourowncategory`: change the category of the theorem (see next sub-section)
- `end`: put the proof in appendix
- `all end`: put both the theorem and the proof in appendix
-- `debug`: make sure the proof is written in the main text as well. Practical when you write the proof to be able to use synctex (if you use synctex with the proof in appendix, your will be unfortunately moved to a temporary file that this library is using... so **make sure you don't modify the files named like `prattheenddefaultcategory.tex` or all your changes will be lost at the next compilation**!).
+- `debug`: make sure the proof is written in the main text as well. Practical when you write the proof to be able to use synctex (if you use synctex with the proof in appendix, your will be unfortunately moved to a temporary file that this library is using... so **make sure you don't modify the files named like `*prattheenddefaultcategory.tex` or all your changes will be lost at the next compilation**!).
- `one big link`: if you prefer to have a single big link instead of two links (one for the proof, one for the page)
- `one big link translated=Your translation`: to change/translate the text of the link easily
-- `text link section`: put a link looking like "See proof in section XX."
+- `text link section`: put a link looking like "See proof in section XX.". You can use `text link=` to remove this link.
- `text link section full proof`: put a link looking like "See full proof in section XX."
- `text proof translated=Your translation`: to change/translate the text of the proof at the end easily
- `global custom defaults`: empty style that you can modify to change the configuration (globally)
@@ -438,6 +458,27 @@ You can include a sketch of proof in the main text by simply adding a proof in b
\end{proofEnd}
```
+### Split the article in two documents, one for the main body and one for the appendix ###
+
+Since 2022/02/04, it is possible to include the appendix in a separate file. Internally, this library creates a new file having the form `NAME_OF_FILE-pratendNAME_CATEGORY.tex` containing the proofs to include (then, `\printProofs` only input that file). You can input that file from other files if you want to separate the body from the proof, but it won't work if you have restate theorems. You should use the option `external appendix` (starting from version 2022/02/04) to restate appropriately the theorem:
+
+```latex
+\usepackage[createShortEnv,conf={external appendix}]{proof-at-the-end}
+```
+
+Then, compile your main file and create a new file for the appendix, load the theorems environments as for the main file, in the preambule load the `xr` package to properly have references (otherwise you won't have the appropriate number for the theorems) using something like:
+```
+\usepackage{xr}
+\externaldocument{name_of_main_file_without_extension}
+```
+
+and in this new document just add the appendix wherever you want:
+```latex
+\includeExternalAppendix{name_of_main_file_without_extension}
+```
+
+You can see an exemple in the github repository, with the two files `demo_external_appendix.tex` and `demo_external_appendix_part2.tex`. Whenever your proofs change in the main paper, make sure to compile first the main document (so that the auxiliary file gets updated), and then compile the appendix document. Note that you can still use `\printProofs` in the main document if you like (while writting your paper, it is certainly easier to keep the proofs and theorems in the same document).
+
## List of options ##
Here is the list of fundamental options supported. Most options have a `no` version, with `no ` written before. Note that you may prefer to use directly the alias/styles (see next paragraph) as the options listed here are quite fundamental and atomic.
@@ -455,6 +496,7 @@ Here is the list of fundamental options supported. Most options have a `no` vers
- `restate command`: name of a unique macro (without backslash) that will be defined as an alias to restate the theorem wherever you want
- `restated before`: if the theorems has been stated before (with `\theoremProofEndRestateBefore`), then we just need to put the restate command in place of the theorem, and enable this option
- `both`/`no both`: only for `\textInAppendix`, specifies that the text must be present in both the main text and the appendix.
+- `external appendix`: to ensure the appendix can be included in another file (see details above), starting from version 2022/02/04.
Here are all the alias/styles (you can create you own as well), they are practical to quickly define a behaviours, but are made of the basic options listed above:
@@ -473,6 +515,9 @@ Here are all the alias/styles (you can create you own as well), they are practic
- `default text link`: default text for the link to the proof, equivalent of `text link={See \hyperref[proof:prAtEnd\pratendcountercurrent]{proof} on page~\pageref{proof:prAtEnd\pratendcountercurrent}.}`
- `default text proof`: default text for the proof in appendix, equivalent of `text proof={Proof of \string\pratendRef{thm:prAtEnd\pratendcountercurrent}}`
- `text proof translated`: like `default text proof`, but takes one argument and use it instead of `Proof of`. Example: `text proof translated={Preuve du}`
+- `text link external appendix`: style used to configure the text to display when the appendix is in an external file. Defaults to `text link={The proof is in the appendix.}`.
+- `external appendix`: useful when the the proofs are moved in an external file (read more above). In particular, it will ensure that normal theorems are used instead of restate since restate does not work across files. This will also apply `text link external appendix` to change the text accordingly.
+- `only external appendix`: like `external appendix`, but without changing the text.
- `bare defaults`: default style that is loaded before anything else that configure by default a link to the proof, put the proof in appendix, use the category `defaultcategory`. It is an alias of `end, link to proof, no restate,category=defaultcategory, default text link,default text proof,restate command=pratenddummymacro`.
- `configuration options`: style that contains the options used to load the package. It is called right after `bare defaults`. Note that you cannot insert macro in the options, overwrite `global custom defaults` instead
- `global custom defaults`: empty style that you can overwrite to change the global defaults
@@ -528,6 +573,13 @@ In anycase, there exists some workarounds, some of the are for instance give in
## Changelog
+- 2022/02/07:
+ 1. [issue 2](https://github.com/leo-colisson/proof-at-the-end/issues/2) was not really solved in fact... Now, I use a more robust method to detect the current section: I write in an AUX file the label of the proof section. This way, I don't need anymore to use dirty tricks to recover the section label.
+ 2. Change the default text when the appendix is in an external file, and add options like `text link external appendix` to customize the text appearing when the appendix is in an external file. Of course, you can still change it using `text link` directly.
+- 2022/02/04:
+ 1. Add a way to put theorems in different files. (see `external appendix`)
+ 2. Change the path for auxiliary files (should be transparent for the user)
+ 3. Add commands to change local/global configuration easily (see `\pratendSetLocal`,`\pratendSetGlobal`)
- 2022/02/01:
1. Fix a typo when defining the shortcut for lemma
2. Add a shortcut for proposition
diff --git a/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end.pdf b/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end.pdf
index 7672d466314..2ab8e9e0675 100644
--- a/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end.pdf
+++ b/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.pdf b/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.pdf
index ac5ddf1d5c7..81acbaf753c 100644
--- a/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.pdf
+++ b/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.tex b/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.tex
index d4f59616c91..26b087cbea9 100644
--- a/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.tex
+++ b/Master/texmf-dist/doc/latex/proof-at-the-end/proof-at-the-end_demo.tex
@@ -5,12 +5,15 @@
\usepackage{verbatim}
% Load the package (put the proof-at-the-end.sty file in the working directory)
-\usepackage{proof-at-the-end} % with default options...
-% Or by putting in the 'conf' option the default configuration you want:
-%\usepackage[conf={normal, one big link}]{proof-at-the-end}
-%\usepackage[conf={normal, one big link=Goto proof}]{proof-at-the-end}
-%\usepackage[conf={one big link translated=Aller à la preuve page}]{proof-at-the-end}
-%\usepackage[conf={text link section}]{proof-at-the-end}
+% with default options and shortcuts for thmE/... WARNING: this requires a version above 2022/01/28.
+\usepackage[createShortEnv]{proof-at-the-end}
+% If you use cref, use instead:
+% \usepackage[createShortEnv,commandRef=Cref]{proof-at-the-end}
+% You can change the default options in the 'conf' option:
+%\usepackage[createShortEnv, conf={text link section}]{proof-at-the-end}
+%\usepackage[createShortEnv, conf={normal, one big link}]{proof-at-the-end}
+%\usepackage[createShortEnv, conf={normal, one big link=Goto proof}]{proof-at-the-end}
+%\usepackage[createShortEnv, conf={one big link translated=Aller à la preuve page}]{proof-at-the-end}
%%% If you want to use options with macros, you cannot
% use directly the package options, so just modify
@@ -40,16 +43,18 @@
\newtheorem*{lemma*}{Lemma}
\providecommand*\lemmaautorefname{Lemma}
-%% If you want you can define shortcuts:
+%% If you want you can define shortcuts to create new theorem.
+%% Since 2022/01/28, the option createShortEnv automatically defines
+%% shortcuts for thmE, theoremE, lemmaE...
+%% You can define new shortcuts using something like:
+%% \newEndThm[normal]{thmE}{thm}
+%% This is itself a shortcut for the rather length old way to define new theorem shorcuts, namely:
% And to define new shortcuts, in order to avoid typing:
% \NewDocumentEnvironment{thmE}{O{}O{}+b}{%
% \begin{theoremEnd}[normal,#2]{thm}[#1]%
% #3%
% \end{theoremEnd}%
% }{}
-% you can just type:
-\newEndThm[normal]{thmE}{thm}
-\newEndProof{proofE}
\usepackage{hyperref}
\begin{document}
@@ -132,6 +137,7 @@ You can also put comments that appear only in the appendix.
And also you can put both the theorem and the proof at the end, like for \autoref{thm:mytheoremattheend}!
+
\begin{theoremEnd}[all end]{thm}
\label{thm:mytheoremattheend}
$\delta = b^2-4ac$
diff --git a/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.dtx b/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.dtx
index d5f6ac4646c..8fee5c8ecdc 100644
--- a/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.dtx
+++ b/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.dtx
@@ -1,12 +1,12 @@
%\iffalse
% proof-at-the-end.dtx generated using makedtx version 1.2 (c) Nicola Talbot
% Command line args:
-% -author "Léo Colisson"
+% -doc "../doc/proof-at-the-end_doc.tex"
% -src "proof-at-the-end\.sty=>proof-at-the-end.sty"
+% -author "Léo Colisson"
% -dir "/home/leo/Documents/Informatique/Programmation/LaTeX/proof-at-the-end/"
-% -doc "../doc/proof-at-the-end_doc.tex"
% proof-at-the-end
-% Created on 2022/2/1 17:07
+% Created on 2022/2/7 18:01
%\fi
%\iffalse
%<*package>
@@ -169,20 +169,20 @@
% Move proofs in different places/sections by giving different
% ``categories'' to the theorems
%\item
-% Create links from theorem to proof, and from proof to theorem
+% Create links from theorem to proof, and from proof to theorem (and
+% configure the text)
%\item
% Restate the theorem in appendix (or before)
%\item
-% Keep the proof in the main body like normal theorems by just adding
-% with just one keyword
+% Choose what you want to keep in the main text or in appendix (you can
+% put in appendix either everything, just the proof, the theorem and the
+% proof by keeping (or not) a copy in the body of the article\ldots)
%\item
% Duplicate the proof in appendix and in the current section, practical
% to use synctex during the proof writting
%\item
-% Add comments that would appear only in the appendix (or in both body
-% and appendix)
-%\item
-% Move both the theorem and the proof completely in appendix
+% Add text that would appear only in the appendix (or in both body and
+% appendix)
%\item
% Easily change the defaults, and create your own styles/environments
%\item
@@ -193,6 +193,9 @@
%\item
% Have a nice environment-based commands in order to mimic the usual
% theorem/proof structure.
+%\item
+% Separate the main article and the body in two documents (some journals
+% may ask for a separate file for the appendix)
%\end{itemize}
%
%NB: This project is hosted on github at
@@ -529,7 +532,7 @@
%theorem/proof must be displayed by providing a value in
%\texttt{OPTIONS}. For example, if you would like to keep the proof of a
%theorem in the main text like any normal theorem, use the
-%\texttt{normal} option:
+%\texttt{normal} option.
%
%\begin{Shaded}
%\begin{Highlighting}[]
@@ -542,6 +545,52 @@
%\end{Highlighting}
%\end{Shaded}
%
+%If you loaded the package using
+%\texttt{\textbackslash{}usepackage{[}createShortEnv{]}\{proof-at-the-end\}}
+%(starting from 2022/01/28), you also have preconfigured shortcuts for
+%multiple environments, namely \texttt{proofE} (to replace
+%\texttt{proof}), \texttt{thmE} (to replace \texttt{thm}),
+%\texttt{theoremE} (to replace\ldots{} ok you got the pattern),
+%\texttt{lemmaE}, \texttt{propositionE}, \texttt{propertyE},
+%\texttt{factE} and \texttt{corollaryE}. This way, you can simplify the
+%above as:
+%
+%\begin{Shaded}
+%\begin{Highlighting}[]
+%\KeywordTok{\textbackslash{}begin}\NormalTok{\{}\ExtensionTok{thmE}\NormalTok{\}[A title][normal]}
+%\NormalTok{ You can easily turn a theorem back into a normal theorem!}
+%\KeywordTok{\textbackslash{}end}\NormalTok{\{}\ExtensionTok{thmE}\NormalTok{\}}
+%\KeywordTok{\textbackslash{}begin}\NormalTok{\{}\ExtensionTok{proofE}\NormalTok{\}}
+%\NormalTok{ And keep the proof with you!}
+%\KeywordTok{\textbackslash{}end}\NormalTok{\{}\ExtensionTok{proofE}\NormalTok{\}}
+%\end{Highlighting}
+%\end{Shaded}
+%
+%(You can of course remove the \texttt{{[}...{]}} containing the options
+%and the title, however if you want to add options without any title,
+%\textbf{make sure to use empty brackets for the title}, like
+%\texttt{\textbackslash{}begin\{thmE\}{[}{]}{[}normal{]}}.
+%
+%Since 2022/01/28, you can also create new theorem environment that
+%directly come with a preconfigured style (you may also find
+%\texttt{\textbackslash{}pratendSetLocal} useful if you want to change
+%the style in a whole section). For instance to create a
+%\texttt{thmNormal} environment having the \texttt{normal} option and a
+%\texttt{thmSpecial} environment having the
+%\texttt{all\ end,\ category=mySpecial} options, just do:
+%
+%\begin{verbatim}
+%\newEndThm[normal]{thmNormal}{thm} % 'thm' is the name of the existing thm environment
+%\newEndThm[all end, category=mySpecial]{thmSpecial}{thm}
+%\end{verbatim}
+%
+%This way, you can simply use
+%\texttt{\textbackslash{}begin\{thmSpecial\}{[}Special\ title{]}\ ...\ \textbackslash{}end\{thmSpecial\}}
+%to create a theorem going in the special category (see below). (you also
+%have \texttt{\textbackslash{}newEndProof{[}options{]}\{newProofEnv\}} to
+%define new proofs, but it is less useful as options are typically given
+%in the theorem).
+%
%The options are in fact a set of keys/values, thanks to
%\texttt{pgfkeys}. So you can combine them with comma separated list like
%that (order matters, as the right-most values may overwrite
@@ -600,6 +649,14 @@
%\end{Highlighting}
%\end{Shaded}
%
+%or, for short (needs version \textgreater{} 2022/02/04):
+%
+%\begin{Shaded}
+%\begin{Highlighting}[]
+%\FunctionTok{\textbackslash{}pratendSetGlobal}\NormalTok{\{one big link="blabla"\}}
+%\end{Highlighting}
+%\end{Shaded}
+%
%and for local configuration:
%
%\begin{Shaded}
@@ -611,24 +668,14 @@
%\end{Highlighting}
%\end{Shaded}
%
-%Finally, it can be practical to define custom environments to avoid
-%typing always \texttt{theoremEnd} using something like that
-%(\texttt{thmE} is the shortcut environment to create, and \texttt{thm}
-%is the old one):
+%for short (needs version \textgreater{} 2022/02/04):
%
%\begin{Shaded}
%\begin{Highlighting}[]
-%\FunctionTok{\textbackslash{}newEndThm}\NormalTok{[normal]\{thmE\}\{thm\}}
-%\FunctionTok{\textbackslash{}newEndProof}\NormalTok{\{proofE\}}
+%\FunctionTok{\textbackslash{}pratendSetLocal}\NormalTok{\{category=greattheorem\}}
%\end{Highlighting}
%\end{Shaded}
%
-%By default, loading the package using the \texttt{createShortEnv} option
-%automatically creates the shortcut environments \texttt{proofE} (to
-%replace \texttt{proof}), \texttt{thmE} (to replace \texttt{thm}),
-%\texttt{theoremE} (to replace\ldots{} ok you got the pattern),
-%\texttt{lemmaE} and \texttt{corollaryE}.
-%
%Then you can use like that:
%
%\begin{Shaded}
@@ -656,11 +703,11 @@
%\end{Highlighting}
%\end{Shaded}
%
-%Note also that it is also possible to give options to the
-%\texttt{proofEnd} environment, but it is usually useless, as it will
-%automatically pick the parameters from the last \texttt{theoremEnd}
-%environment. However, if for some reasons you want to change the options
-%of the proof only, you can do it, but do it as your own risks ;)
+%Note also that it is possible to give options to the \texttt{proofEnd}
+%environment, but it is usually useless, as it will automatically pick
+%the parameters from the last \texttt{theoremEnd} environment. However,
+%if for some reasons you want to change the options of the proof only,
+%you can do it, but do it as your own risks ;)
%
%\hypertarget{usual-styles}{%
%\subsection{Usual styles}\label{usual-styles}}
@@ -686,7 +733,7 @@
% you use synctex with the proof in appendix, your will be unfortunately
% moved to a temporary file that this library is using\ldots{} so
% \textbf{make sure you don't modify the files named like
-% \texttt{prattheenddefaultcategory.tex} or all your changes will be
+% \texttt{*prattheenddefaultcategory.tex} or all your changes will be
% lost at the next compilation}!).
%\item
% \texttt{one\ big\ link}: if you prefer to have a single big link
@@ -696,7 +743,7 @@
% change/translate the text of the link easily
%\item
% \texttt{text\ link\ section}: put a link looking like ``See proof in
-% section XX.''
+% section XX.''. You can use \texttt{text\ link=} to remove this link.
%\item
% \texttt{text\ link\ section\ full\ proof}: put a link looking like
% ``See full proof in section XX.''
@@ -863,6 +910,55 @@
%\end{Highlighting}
%\end{Shaded}
%
+%\hypertarget{split-the-article-in-two-documents-one-for-the-main-body-and-one-for-the-appendix}{%
+%\subsection{Split the article in two documents, one for the main body
+%and one for the
+%appendix}\label{split-the-article-in-two-documents-one-for-the-main-body-and-one-for-the-appendix}}
+%
+%Since 2022/02/04, it is possible to include the appendix in a separate
+%file. Internally, this library creates a new file having the form
+%\texttt{NAME\_OF\_FILE-pratendNAME\_CATEGORY.tex} containing the proofs
+%to include (then, \texttt{\textbackslash{}printProofs} only input that
+%file). You can input that file from other files if you want to separate
+%the body from the proof, but it won't work if you have restate theorems.
+%You should use the option \texttt{external\ appendix} (starting from
+%version 2022/02/04) to restate appropriately the theorem:
+%
+%\begin{Shaded}
+%\begin{Highlighting}[]
+%\BuiltInTok{\textbackslash{}usepackage}\NormalTok{[createShortEnv,conf=\{external appendix\}]\{}\ExtensionTok{proof{-}at{-}the{-}end}\NormalTok{\}}
+%\end{Highlighting}
+%\end{Shaded}
+%
+%Then, compile your main file and create a new file for the appendix,
+%load the theorems environments as for the main file, in the preambule
+%load the \texttt{xr} package to properly have references (otherwise you
+%won't have the appropriate number for the theorems) using something
+%like:
+%
+%\begin{verbatim}
+%\usepackage{xr}
+%\externaldocument{name_of_main_file_without_extension}
+%\end{verbatim}
+%
+%and in this new document just add the appendix wherever you want:
+%
+%\begin{Shaded}
+%\begin{Highlighting}[]
+%\FunctionTok{\textbackslash{}includeExternalAppendix}\NormalTok{\{name\_of\_main\_file\_without\_extension\}}
+%\end{Highlighting}
+%\end{Shaded}
+%
+%You can see an exemple in the github repository, with the two files
+%\texttt{demo\_external\_appendix.tex} and
+%\texttt{demo\_external\_appendix\_part2.tex}. Whenever your proofs
+%change in the main paper, make sure to compile first the main document
+%(so that the auxiliary file gets updated), and then compile the appendix
+%document. Note that you can still use
+%\texttt{\textbackslash{}printProofs} in the main document if you like
+%(while writting your paper, it is certainly easier to keep the proofs
+%and theorems in the same document).
+%
%\hypertarget{list-of-options}{%
%\section{List of options}\label{list-of-options}}
%
@@ -911,6 +1007,9 @@
% \texttt{both}/\texttt{no\ both}: only for
% \texttt{\textbackslash{}textInAppendix}, specifies that the text must
% be present in both the main text and the appendix.
+%\item
+% \texttt{external\ appendix}: to ensure the appendix can be included in
+% another file (see details above), starting from version 2022/02/04.
%\end{itemize}
%
%Here are all the alias/styles (you can create you own as well), they are
@@ -986,6 +1085,20 @@
% but takes one argument and use it instead of \texttt{Proof\ of}.
% Example: \texttt{text\ proof\ translated=\{Preuve\ du\}}
%\item
+% \texttt{text\ link\ external\ appendix}: style used to configure the
+% text to display when the appendix is in an external file. Defaults to
+% \texttt{text\ link=\{The\ proof\ is\ in\ the\ appendix.\}}.
+%\item
+% \texttt{external\ appendix}: useful when the the proofs are moved in
+% an external file (read more above). In particular, it will ensure that
+% normal theorems are used instead of restate since restate does not
+% work across files. This will also apply
+% \texttt{text\ link\ external\ appendix} to change the text
+% accordingly.
+%\item
+% \texttt{only\ external\ appendix}: like \texttt{external\ appendix},
+% but without changing the text.
+%\item
% \texttt{bare\ defaults}: default style that is loaded before anything
% else that configure by default a link to the proof, put the proof in
% appendix, use the category \texttt{defaultcategory}. It is an alias of
@@ -1126,6 +1239,41 @@
%\begin{itemize}
%\tightlist
%\item
+% 2022/02/07:
+%
+% \begin{enumerate}
+% \def\labelenumi{\arabic{enumi}.}
+% \tightlist
+% \item
+% \href{https://github.com/leo-colisson/proof-at-the-end/issues/2}{issue
+% 2} was not really solved in fact\ldots{} Now, I use a more robust
+% method to detect the current section: I write in an AUX file the
+% label of the proof section. This way, I don't need anymore to use
+% dirty tricks to recover the section label.
+% \item
+% Change the default text when the appendix is in an external file,
+% and add options like \texttt{text\ link\ external\ appendix} to
+% customize the text appearing when the appendix is in an external
+% file. Of course, you can still change it using \texttt{text\ link}
+% directly.
+% \end{enumerate}
+%\item
+% 2022/02/04:
+%
+% \begin{enumerate}
+% \def\labelenumi{\arabic{enumi}.}
+% \tightlist
+% \item
+% Add a way to put theorems in different files. (see
+% \texttt{external\ appendix})
+% \item
+% Change the path for auxiliary files (should be transparent for the
+% user)
+% \item
+% Add commands to change local/global configuration easily (see
+% \texttt{\textbackslash{}pratendSetLocal},\texttt{\textbackslash{}pratendSetGlobal})
+% \end{enumerate}
+%\item
% 2022/02/01:
%
% \begin{enumerate}
@@ -1208,7 +1356,7 @@
% \end{macrocode}
%\fi
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{proof-at-the-end}[2022/02/01 A package to move proofs in appendix]
+\ProvidesPackage{proof-at-the-end}[2022/02/07 A package to move proofs in appendix]
\RequirePackage{etoolbox}
\RequirePackage{thmtools}
@@ -1281,10 +1429,16 @@
\endgroup
}
+%% Get the prefix of the file, given the jobname.
+\NewDocumentCommand\pratendGeneratePrefixFile{m}{#1-pratend}
+
+\def\prefixPrAtEndFiles{\pratendGeneratePrefixFile{\jobname}}
+
+
%% This functions takes one input: the category (without .tex),
%% If it's the first time we write in this
%% category file, it "blanks" it.
-\def\prefixPrAtEndFiles{pratend}
+
\newcommand*\eraseIfNeeded[1]{%
% A macro 'pratendmacrocat{category}' is created to check
% if it's the first time we write in this category file.
@@ -1301,6 +1455,7 @@
\newif\ifproofhere
\newif\ifproofend
\newif\ifrestatethm
+\newif\ifexternalAppendix% True if the output file should me inputable in another file (using xr for crossref). Useful to remote restate.
\newif\iflinktoproof
\newif\ifboth
\newif\ifallattheend
@@ -1319,6 +1474,15 @@
proof end/.is if=proofend,
no proof end/.style={proof end=false},
%% Restate the theorem when using \printProofs
+ only external appendix/.is if=externalAppendix,
+ text link external appendix/.style={
+ text link={The proof is in the appendix.}
+ },
+ external appendix/.style={
+ only external appendix,
+ text link external appendix,
+ },
+ %% Restate the theorem when using \printProofs
restate/.is if=restatethm,
no restate/.style={restate=false},
%% Put a link to the proof after the theorem
@@ -1500,9 +1664,13 @@
%% Restate the theorem if needed in appendix.
%% As explained in https://github.com/leo-colisson/proof-at-the-end/issues/8
%% No need to restate of there is no proof at the end.
- \ifproofend %
- \ifrestatethm %
- \appendtofile{\prefixPrAtEndFiles\category.tex}{\string\prAtEndRestate\pratendcountercurrent*}%
+ \ifproofend%
+ \ifrestatethm%
+ \ifexternalAppendix% We write the full theorem, useful to compile in a separate file (use xr for references)
+ \appendtofile{\prefixPrAtEndFiles\category.tex}{\string\begingroup\string\renewcommand\string\the\detokenize{#2}{\string\ref{thm:prAtEnd\pratendcountercurrent}}\string\begin{\detokenize{#2}}[#3]\detokenize{#4}\string\end{\detokenize{#2}}\string\endgroup}%
+ \else%
+ \appendtofile{\prefixPrAtEndFiles\category.tex}{\string\prAtEndRestate\pratendcountercurrent*}%
+ \fi%
\fi%
\fi%
\fi%
@@ -1540,13 +1708,41 @@
\fi%
%% Write the proof at the end
\ifproofend%
+ \appendtofile{\prefixPrAtEndFiles\category.tex}{%
%% The label alone adds some space, see e.g.
%% https://tex.stackexchange.com/questions/600118/selectlanguage-in-the-middle-of-text-causes-extra-vertical-space/600142#600142
%% and https://tex.stackexchange.com/questions/600577/adding-a-label-between-two-proofs-adds-unwanted-space
%% The solution is to use \\Hy@SaveLastskip and \Hy@RestoreLastskip from hyperref
%% See also
%% https://tex.stackexchange.com/questions/553394/reliably-add-a-label-to-the-current-section-even-if-the-label-is-not-placed-rig/600847#600847
- \appendtofile{\prefixPrAtEndFiles\category.tex}{\string\makeatletter\string\Hy@SaveLastskip\string\pratendChangeCurrentLabel\string\label{proofsection:prAtEnd\pratendcountercurrent}\string\Hy@RestoreLastskip\string\makeatother\string\begin{proof}[\pratendtextproof]\string\phantomsection\string\label{proof:prAtEnd\pratendcountercurrent}\detokenize{#2}\string\end{proof}}%
+ \string\makeatletter\string\Hy@SaveLastskip%
+ %% This tries to recover the label of the current section... But it is very bad. I keep it only for backward compatibility. I tried to fix it by changing the value of \@counter, but it's not always working
+ %% as cref is not using it apparently, and it turns Appendix A into appendix a after using phantomsection.
+ %% https://github.com/leo-colisson/proof-at-the-end/issues/2
+ \string\label{proofsection:prAtEnd\pratendcountercurrent}% WARNING <-- do not use this label in new documents!
+ % the problem is that setting the \@currentlabel does not work for cref, and turns Appendix A
+ % into section A when a phantomsection lies in between (not sure why):
+ % https://github.com/leo-colisson/proof-at-the-end/issues/2
+ %% Now, we prefer a different method: instead we generate a single label per section, and we generate
+ %% a new macro in the aux file that will save this label, by creating one such macro per theorem.
+ %% This is basically doing something like \pratend@section@for@proofiii{prAtEnd:sectionlike3}
+ %% Note that I need sometimes 3 \string because I write two times: the first time I write in the FILE-pratendCATEGORY.tex
+ %% file, and this file will be in charge of writting into the .aux file.
+ \string\ifdefined\string\pratend@current@sectionlike@label% But before, we check if the section was defined, or the code may fail if no section are defined.
+ \string\immediate\string\write\string\@auxout{%
+ \string\string\string\gdef\string\string\string\pratend@section@for@proof\pratendcountercurrent{\string\pratend@current@sectionlike@label}%
+ }%
+ \string\fi
+ % See above
+ \string\Hy@RestoreLastskip\string\makeatother%
+ % We start the proof
+ \string\begin{proof}[\pratendtextproof]%
+ % We add a label to have a reference to the section
+ \string\phantomsection\string\label{proof:prAtEnd\pratendcountercurrent}%
+ % We add the proof
+ \detokenize{#2}%
+ % We end the proof
+ \string\end{proof}}%
\fi%
}{}
@@ -1594,7 +1790,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% We patch the \section, \subsection and \chapter commands to make sure that
% the text "See proof in Section XX" points to the appropriate section/subsection.
-% We basically maintain a counter counting how many time we saw a section/subsection/... and use it to label
+% We basically maintain a counter counting how many times we saw a section/subsection/... and use it to label
% directly the section afterwards.
\newcounter{pratend@counter@sectionlike}
%% Command to add after a label like "prAtEnd:sectionlike10". Useful to patch \section, \chapter...
@@ -1602,17 +1798,21 @@
%% First, we get the label
%% Cool explaination of expandafter, edef, noexpand:
%%% https://www.tug.org/TUGboat/tb09-1/tb20bechtolsheim.pdf
+ %% The label \pratend@current@sectionlike@label is used later.
\edef\pratend@current@sectionlike@label{prAtEnd:sectionlike\thepratend@counter@sectionlike}%
\expandafter\label{\pratend@current@sectionlike@label}%
- \let\pratend@sectionlike@stored@label\@currentlabel%
+ \stepcounter{pratend@counter@sectionlike}%
}%
-\NewDocumentCommand\pratendSectionlikeCref{}{%
- \pratendRef{proofsection:prAtEnd\pratendcountercurrent}%
-}
-\NewDocumentCommand\pratendChangeCurrentLabel{}{%
- \ifdefined\pratend@sectionlike@stored@label%
- \let\@currentlabel\pratend@sectionlike@stored@label%
+%% Returns the label of the section (in appendix) that contains the proof of the current theorem.
+%% The first time, it will return an empty label.
+\NewDocumentCommand\pratendLabelProofSection{}{%
+ \ifcsname pratend@section@for@proof\pratendcountercurrent\endcsname%
+ \csname pratend@section@for@proof\pratendcountercurrent\endcsname%
\fi%
+}%
+\NewDocumentCommand\pratendSectionlikeCref{}{%
+ % \pratendRef{proofsection:prAtEnd\pratendcountercurrent}% This is not robust enough. Lets change strategy.
+ \expandafter\pratendRef{\pratendLabelProofSection}
}
\ifpratendOptdisablePatchSection%
\else %
@@ -1641,6 +1841,7 @@
\csname \pratendOptcommandRef\endcsname{#1}%
}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Create automatically wrapper
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1695,8 +1896,37 @@
\newEndThm{theoremE}{theorem}
\newEndThm{corollaryE}{corollary}
\newEndThm{propositionE}{proposition}
+ \newEndThm{propertyE}{proposition}
+ \newEndThm{factE}{proposition}
\fi
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Create functions to easily overwrite defaults
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\NewDocumentCommand\pratendSetGlobal{m}{%
+ \pgfkeys{/prAtEnd/global custom defaults/.style={
+ #1
+ }%
+ }%
+}
+
+\NewDocumentCommand\pratendSetLocal{m}{%
+ \pgfkeys{/prAtEnd/local custom defaults/.style={
+ #1
+ }%
+ }%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Create functions to load the category file in another file (external bibliography)
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+% Takes an optional category, and the job name of the external file.
+\NewDocumentCommand\includeExternalAppendix{O{defaultcategory}m}{%
+ \expandafter\input{\pratendGeneratePrefixFile{#2}#1}
+}
+
\endinput
%\iffalse
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.ins b/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.ins
index 3ebaf4fd466..d3508956ecc 100644
--- a/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.ins
+++ b/Master/texmf-dist/source/latex/proof-at-the-end/proof-at-the-end.ins
@@ -1,4 +1,4 @@
-% proof-at-the-end.ins generated using makedtx version 1.2 2022/2/1 17:07
+% proof-at-the-end.ins generated using makedtx version 1.2 2022/2/7 18:01
\input docstrip
\preamble
diff --git a/Master/texmf-dist/tex/latex/proof-at-the-end/proof-at-the-end.sty b/Master/texmf-dist/tex/latex/proof-at-the-end/proof-at-the-end.sty
index 0a8180406d2..7e6015b4188 100644
--- a/Master/texmf-dist/tex/latex/proof-at-the-end/proof-at-the-end.sty
+++ b/Master/texmf-dist/tex/latex/proof-at-the-end/proof-at-the-end.sty
@@ -39,7 +39,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{proof-at-the-end}[2022/02/01 A package to move proofs in appendix]
+\ProvidesPackage{proof-at-the-end}[2022/02/07 A package to move proofs in appendix]
\RequirePackage{etoolbox}
\RequirePackage{thmtools}
@@ -107,10 +107,15 @@
\endgroup
}
+%% Get the prefix of the file, given the jobname.
+\NewDocumentCommand\pratendGeneratePrefixFile{m}{#1-pratend}
+
+\def\prefixPrAtEndFiles{\pratendGeneratePrefixFile{\jobname}}
+
%% This functions takes one input: the category (without .tex),
%% If it's the first time we write in this
%% category file, it "blanks" it.
-\def\prefixPrAtEndFiles{pratend}
+
\newcommand*\eraseIfNeeded[1]{%
% A macro 'pratendmacrocat{category}' is created to check
% if it's the first time we write in this category file.
@@ -127,6 +132,7 @@
\newif\ifproofhere
\newif\ifproofend
\newif\ifrestatethm
+\newif\ifexternalAppendix% True if the output file should me inputable in another file (using xr for crossref). Useful to remote restate.
\newif\iflinktoproof
\newif\ifboth
\newif\ifallattheend
@@ -145,6 +151,15 @@
proof end/.is if=proofend,
no proof end/.style={proof end=false},
%% Restate the theorem when using \printProofs
+ only external appendix/.is if=externalAppendix,
+ text link external appendix/.style={
+ text link={The proof is in the appendix.}
+ },
+ external appendix/.style={
+ only external appendix,
+ text link external appendix,
+ },
+ %% Restate the theorem when using \printProofs
restate/.is if=restatethm,
no restate/.style={restate=false},
%% Put a link to the proof after the theorem
@@ -326,9 +341,13 @@
%% Restate the theorem if needed in appendix.
%% As explained in https://github.com/leo-colisson/proof-at-the-end/issues/8
%% No need to restate of there is no proof at the end.
- \ifproofend %
- \ifrestatethm %
- \appendtofile{\prefixPrAtEndFiles\category.tex}{\string\prAtEndRestate\pratendcountercurrent*}%
+ \ifproofend%
+ \ifrestatethm%
+ \ifexternalAppendix% We write the full theorem, useful to compile in a separate file (use xr for references)
+ \appendtofile{\prefixPrAtEndFiles\category.tex}{\string\begingroup\string\renewcommand\string\the\detokenize{#2}{\string\ref{thm:prAtEnd\pratendcountercurrent}}\string\begin{\detokenize{#2}}[#3]\detokenize{#4}\string\end{\detokenize{#2}}\string\endgroup}%
+ \else%
+ \appendtofile{\prefixPrAtEndFiles\category.tex}{\string\prAtEndRestate\pratendcountercurrent*}%
+ \fi%
\fi%
\fi%
\fi%
@@ -366,13 +385,41 @@
\fi%
%% Write the proof at the end
\ifproofend%
+ \appendtofile{\prefixPrAtEndFiles\category.tex}{%
%% The label alone adds some space, see e.g.
%% https://tex.stackexchange.com/questions/600118/selectlanguage-in-the-middle-of-text-causes-extra-vertical-space/600142#600142
%% and https://tex.stackexchange.com/questions/600577/adding-a-label-between-two-proofs-adds-unwanted-space
%% The solution is to use \\Hy@SaveLastskip and \Hy@RestoreLastskip from hyperref
%% See also
%% https://tex.stackexchange.com/questions/553394/reliably-add-a-label-to-the-current-section-even-if-the-label-is-not-placed-rig/600847#600847
- \appendtofile{\prefixPrAtEndFiles\category.tex}{\string\makeatletter\string\Hy@SaveLastskip\string\pratendChangeCurrentLabel\string\label{proofsection:prAtEnd\pratendcountercurrent}\string\Hy@RestoreLastskip\string\makeatother\string\begin{proof}[\pratendtextproof]\string\phantomsection\string\label{proof:prAtEnd\pratendcountercurrent}\detokenize{#2}\string\end{proof}}%
+ \string\makeatletter\string\Hy@SaveLastskip%
+ %% This tries to recover the label of the current section... But it is very bad. I keep it only for backward compatibility. I tried to fix it by changing the value of \@counter, but it's not always working
+ %% as cref is not using it apparently, and it turns Appendix A into appendix a after using phantomsection.
+ %% https://github.com/leo-colisson/proof-at-the-end/issues/2
+ \string\label{proofsection:prAtEnd\pratendcountercurrent}% WARNING <-- do not use this label in new documents!
+ % the problem is that setting the \@currentlabel does not work for cref, and turns Appendix A
+ % into section A when a phantomsection lies in between (not sure why):
+ % https://github.com/leo-colisson/proof-at-the-end/issues/2
+ %% Now, we prefer a different method: instead we generate a single label per section, and we generate
+ %% a new macro in the aux file that will save this label, by creating one such macro per theorem.
+ %% This is basically doing something like \pratend@section@for@proofiii{prAtEnd:sectionlike3}
+ %% Note that I need sometimes 3 \string because I write two times: the first time I write in the FILE-pratendCATEGORY.tex
+ %% file, and this file will be in charge of writting into the .aux file.
+ \string\ifdefined\string\pratend@current@sectionlike@label% But before, we check if the section was defined, or the code may fail if no section are defined.
+ \string\immediate\string\write\string\@auxout{%
+ \string\string\string\gdef\string\string\string\pratend@section@for@proof\pratendcountercurrent{\string\pratend@current@sectionlike@label}%
+ }%
+ \string\fi
+ % See above
+ \string\Hy@RestoreLastskip\string\makeatother%
+ % We start the proof
+ \string\begin{proof}[\pratendtextproof]%
+ % We add a label to have a reference to the section
+ \string\phantomsection\string\label{proof:prAtEnd\pratendcountercurrent}%
+ % We add the proof
+ \detokenize{#2}%
+ % We end the proof
+ \string\end{proof}}%
\fi%
}{}
@@ -414,17 +461,21 @@
%% First, we get the label
%% Cool explaination of expandafter, edef, noexpand:
%%% https://www.tug.org/TUGboat/tb09-1/tb20bechtolsheim.pdf
+ %% The label \pratend@current@sectionlike@label is used later.
\edef\pratend@current@sectionlike@label{prAtEnd:sectionlike\thepratend@counter@sectionlike}%
\expandafter\label{\pratend@current@sectionlike@label}%
- \let\pratend@sectionlike@stored@label\@currentlabel%
+ \stepcounter{pratend@counter@sectionlike}%
}%
-\NewDocumentCommand\pratendSectionlikeCref{}{%
- \pratendRef{proofsection:prAtEnd\pratendcountercurrent}%
-}
-\NewDocumentCommand\pratendChangeCurrentLabel{}{%
- \ifdefined\pratend@sectionlike@stored@label%
- \let\@currentlabel\pratend@sectionlike@stored@label%
+%% Returns the label of the section (in appendix) that contains the proof of the current theorem.
+%% The first time, it will return an empty label.
+\NewDocumentCommand\pratendLabelProofSection{}{%
+ \ifcsname pratend@section@for@proof\pratendcountercurrent\endcsname%
+ \csname pratend@section@for@proof\pratendcountercurrent\endcsname%
\fi%
+}%
+\NewDocumentCommand\pratendSectionlikeCref{}{%
+ % \pratendRef{proofsection:prAtEnd\pratendcountercurrent}% This is not robust enough. Lets change strategy.
+ \expandafter\pratendRef{\pratendLabelProofSection}
}
\ifpratendOptdisablePatchSection%
\else %
@@ -493,8 +544,36 @@
\newEndThm{theoremE}{theorem}
\newEndThm{corollaryE}{corollary}
\newEndThm{propositionE}{proposition}
+ \newEndThm{propertyE}{proposition}
+ \newEndThm{factE}{proposition}
\fi
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Create functions to easily overwrite defaults
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\NewDocumentCommand\pratendSetGlobal{m}{%
+ \pgfkeys{/prAtEnd/global custom defaults/.style={
+ #1
+ }%
+ }%
+}
+
+\NewDocumentCommand\pratendSetLocal{m}{%
+ \pgfkeys{/prAtEnd/local custom defaults/.style={
+ #1
+ }%
+ }%
+}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% Create functions to load the category file in another file (external bibliography)
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+\NewDocumentCommand\includeExternalAppendix{O{defaultcategory}m}{%
+ \expandafter\input{\pratendGeneratePrefixFile{#2}#1}
+}
+
\endinput
%%
%% End of file `proof-at-the-end.sty'.