summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/proof-at-the-end/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/proof-at-the-end/README.md')
-rw-r--r--Master/texmf-dist/doc/latex/proof-at-the-end/README.md82
1 files changed, 67 insertions, 15 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