diff options
author | Karl Berry <karl@freefriends.org> | 2024-09-20 21:23:01 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-09-20 21:23:01 +0000 |
commit | a9cc08e03bd58b2de3a9f76514352321ada2b40d (patch) | |
tree | bdb524fe005ba7474ddba7e3efad20b71fd7f550 /Master/texmf-dist/doc | |
parent | 4b90f274480dd8c7f17554c1c892715373d9abfd (diff) |
keytheorems (20sep24)
git-svn-id: svn://tug.org/texlive/trunk@72331 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/keytheorems/CHANGELOG.md | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/keytheorems/README.md | 13 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdf | bin | 525658 -> 529999 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.tex | 80 |
4 files changed, 79 insertions, 21 deletions
diff --git a/Master/texmf-dist/doc/latex/keytheorems/CHANGELOG.md b/Master/texmf-dist/doc/latex/keytheorems/CHANGELOG.md index 053436ddb74..49285822408 100644 --- a/Master/texmf-dist/doc/latex/keytheorems/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/keytheorems/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog for keytheorems package +## [v0.1.3] +- add `noteseparator` key +- add `\IfRestatingT`, `\IfRestatingF` +- add `store*` key +- add Portuguese translations + ## [v0.1.2] - Move support for memoir and AMS classes to dedicated files - document `headformat` key @@ -14,5 +20,6 @@ ## 0.1.0 - 2024-09-04 - First release +[v0.1.3]: https://github.com/mbertucci47/keytheorems/compare/v0.1.2...v0.1.3 [v0.1.2]: https://github.com/mbertucci47/keytheorems/compare/v0.1.1...v0.1.2 [v0.1.1]: https://github.com/mbertucci47/keytheorems/compare/v0.1.0...v0.1.1
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/keytheorems/README.md b/Master/texmf-dist/doc/latex/keytheorems/README.md index baf8506c2df..bf344a5b240 100644 --- a/Master/texmf-dist/doc/latex/keytheorems/README.md +++ b/Master/texmf-dist/doc/latex/keytheorems/README.md @@ -94,7 +94,8 @@ Some of the code is a direct translation from thmtools but a few things are chan as in the former, `bodyfont` is `\normalfont`, not the default `\itshape`. This package keeps the defaults unless a key is specifically given. - There is no `restatable` environment except with package option `thmtools-compat`. Use the - `store` (alias `restate`) key. + `store` (alias `restate`) key. For counters and labels pointing to the restated theorem, + use `store*` (alias `restate*`). - Rather than `restate=foo` defining a command `\foo*`, theorems are retrieved with `\getkeytheorem{foo}`. For just the theorem body, use `\getkeytheorem[body]{foo}`. Also, this retrieval can happen even before the theorem is stated since keytheorems writes the contents @@ -107,12 +108,7 @@ Some of the code is a direct translation from thmtools but a few things are chan - With thmtools, the command `\newtheorem{<envname>}{<heading>}` is changed to behave like `\declaretheorem[name=<heading>]{<envname>}`. This is not the default here. Instead either only use the new interface or load the package with option `overload`. -- All new keys (see doc for descriptions): - - global (load-time or in `\keytheoremset`): `overload`, `thmtools-compat`, `store-all`, `restate-counters`, `continues-code`, `qed-symbol`, `auto-translate` - - keys for theorem envs: `note` (alias `name`), `short-note`, `continues*`, `store` (alias `restate`), `seq` - - declaring theorems (in `\newkeytheorem`): `tcolorbox`, `tcolorbox-no-titlebar` - - declaring styles (in `\newkeytheoremstyle`): `inherit-style` - - list of theorems (in `\keytheoremlistset` and `\listofkeytheorems`): `onlynumbered`, `seq`, `title-code`, `no-title`, `note-code`, `print-body`, `no-continues`, `no-chapter-skip`, `chapter-skip-length` +- Adds several new keys (see doc for details). ## thmtools issues resolved by keytheorems Issues from the thmtools [github page](https://github.com/muzimuzhi/thmtools), @@ -464,10 +460,9 @@ text - Clean up the code. Things are out of order, poorly named, etc. - Add more error messages. - thmtools features not yet implemented - - labels pointing to restated theorem, not original - real [`beamer`](https://ctan.org/pkg/beamer) support - certainly more -- For a complete list, see [`keytheorems-ideas.txt`](https://github.com/mbertucci47/keytheorems/blob/main/keytheorems-ideas.txt) +- For a complete list, see [`keytheorems-ideas.md`](https://github.com/mbertucci47/keytheorems/blob/main/keytheorems-ideas.md) ## Notes/issues on thmtools, not on Github diff --git a/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdf b/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdf Binary files differindex 79acb6371a3..bbcd528596e 100644 --- a/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdf +++ b/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.pdf diff --git a/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.tex b/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.tex index b285f5f8401..78b149fbac4 100644 --- a/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.tex +++ b/Master/texmf-dist/doc/latex/keytheorems/keytheorems-doc.tex @@ -20,7 +20,7 @@ \usepackage{cleveref} \usepackage{amssymb} -\def\version{0.1.2} +\def\version{0.1.3} \title{% \pkg{keytheorems} package \\[1ex] @@ -53,7 +53,17 @@ \newkeytheorem{remark}[style=remark] \tcbset{ defstyle/.style={arc=0mm,colback=blue!5!white,colframe=blue!75!black}, + thmstyle/.style={colback=green!5,colframe=green!35!black}, } +\newkeytheoremstyle{tcb-standard}{ + tcolorbox=thmstyle, + headpunct={}, + notebraces={}{}, + noteseparator={: }, + notefont=\bfseries, + bodyfont=\normalfont, + } +\newkeytheorem{mytheo}[name=My Theorem,style=tcb-standard] \newkeytheorem{corollary}[tcolorbox] \newkeytheorem{definition}[ style=definition, @@ -137,7 +147,7 @@ Several issues encountered with \pkg{thmtools} are avoided (see the README for a \section{Dependencies} -Without using the \refKey{tcolorbox} or \refKey{tcolorbox-no-titlebar} options, the package loads the \pkg{aliascnt}, \pkg{amsthm}, \pkg{refcount}, and \pkg{translations} packages. +Without using the \refKey{tcolorbox} or \refKey{tcolorbox-no-titlebar} options, the package loads the \pkg{aliascnt}, \pkg{amsthm}, \pkg{refcount}, \pkg{translations}, and \pkg{unique} packages. A \LaTeX{} kernel no older than 2023-06-01 is required; if older than 2024-06-01, \pkg{nameref} is required. \section{Global Options} @@ -198,7 +208,7 @@ This key does not reset the list, so you don't need to include |equation| in \me {initially \cs{GetTranslation}\ttbraces{keythms\string_continues}\cs{pageref}\ttbraces{\#1}} The code used to typeset the note produced by the \refKey{continues} key. If English or an unknown language is used, defaults to \texttt{continuing from p.}\cs{,}\cs{pageref}\ttbraces{\#1}. -Currently (likely inaccurate!) translations exist for French, German, Italian, and Spanish. +Currently (likely inaccurate!) translations exist for French, German, Italian, Portuguese, and Spanish. \end{docKey} \begin{docKey}{qed-symbol} @@ -304,10 +314,10 @@ The starred version also copies the theorem note, if it exists. \end{docKey} \begin{docKey}{store} - {=\meta{tag}} + {\sarg=\meta{tag}} {initially unset} -Alias \docAuxKey{restate}. -Stores the the theorem to be restated at any point in the document with \refCom{getkeytheorem}. +Alias \docAuxKey{restate}\sarg. +Stores the the theorem to be restated at any point in the document with \refCom{getkeytheorem}. With the starred version, counters and labels are taken from the copy called with \cs{getkeytheorem}, so in this case can only be restated once. This allows you, for example, to write all theorems and proofs in the appendix and call \cs{getkeytheorem} at the appropriate time mid-document. \begin{keythmscode}[] \begin{theorem}[store=blub] @@ -610,6 +620,33 @@ Some text \end{docKey} +\pkg{tcolorbox} offers its own comprehensive \texttt{theorems} library. If all of your theorems are to be tcolorboxes, I highly recommend using it instead of this package! However, if only some of your theorems will use a tcolorbox, you may want to replicate the styles of \cs{NewTcbTheorem}. Here is an example that emulates \pkg{tcolorbox}'s \texttt{standard} theorem style. + +\begin{tcbwritetemp} +\tcbset{ + thmstyle/.style={ + colback=green!5, + colframe=green!35!black}, + } +\newkeytheoremstyle{tcb-standard}{ + tcolorbox=thmstyle, + headpunct={}, + notebraces={}{}, + noteseparator={: }, + notefont=\bfseries, + bodyfont=\normalfont, + } +\newkeytheorem{mytheo}[ + name=My Theorem, + style=tcb-standard] +\end{tcbwritetemp} + +\begin{keythmscode}[withpreamble] +\begin{mytheo}[This is my title] +Some theorem text +\end{mytheo} +\end{keythmscode} + \section{Theorem Styles} \begin{docCommand}{newkeytheoremstyle} @@ -698,6 +735,12 @@ Alias \docAuxKey{headstyle}. Within \meta{code}, the commands \docAuxCommand{NAM \subsection{Keys added by \pkg{keytheorems}} +\begin{docKey}{noteseparator} + {=\meta{code}} + {initially \textvisiblespace} +The code inserted before the note, and printed only if there is a note. This is executed \emph{before} the font commands set by \refKey{notefont} take effect. +\end{docKey} + \begin{docKey}{inherit-style} {=\meta{style name}} {initially unset} @@ -712,7 +755,7 @@ At the start of the next run, this file is input at the beginning of the documen \begin{docCommand}{getkeytheorem} {\oarg{property}\marg{tag}} -Retrieves the theorem given the key |store=|\meta{tag}. +Retrieves the theorem given the key |store=|\meta{tag} or |store*=|\meta{tag}. An optional \meta{property} can be given to retrieve only the corresponding part of the theorem. Currently only the property |body| is implemented, which retrieves the (unformatted) body of the theorem. @@ -728,9 +771,22 @@ Fascinating example. \end{docCommand} -\begin{docCommand}{IfRestatingTF} - {\marg{true code}\marg{false code}} -Executes \meta{true code} if being retrieved with \refCom{getkeytheorem} and \meta{false code} if in the original theorem. +\begin{docCommands} + { + { + doc name = IfRestatingTF, + doc parameter=\marg{true code}\marg{false code} + }, + { + doc name = IfRestatingT, + doc parameter=\marg{true code} + }, + { + doc name = IfRestatingF, + doc parameter=\marg{false code} + } + } +Executes \meta{true code} if being retrieved with \refCom{getkeytheorem} and \meta{false code} if in the original theorem. This is reversed if \texttt{store*} is used. \begin{keythmscode}[] \begin{example}[store=hmm] @@ -742,7 +798,7 @@ example! \getkeytheorem{hmm} \end{keythmscode} -\end{docCommand} +\end{docCommands} \section{Listing Theorems} @@ -812,7 +868,7 @@ For the AMS classes, this is initially |1.5pc|. {=\meta{text}} {initially \cs{GetTranslation}\ttbraces{keythms\string_listof\string_title}} Defaults to ``List of Theorems'' if English or an unknown language is used. -Currently French, German, Italian, and Spanish have (likely inaccurate!) translations. +Currently French, German, Italian, Portuguese, and Spanish have (likely inaccurate!) translations. A translation can be added with a GitHub pull request or manually with \cs{DeclareTranslation}\marg{lang}\ttbraces{keythms\string_listof\string_title}\marg{text}. \end{docKey} |