summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.pdfbin119454 -> 126706 bytes
-rw-r--r--Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex30
-rw-r--r--Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty29
3 files changed, 56 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.pdf b/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.pdf
index f6f8fb84d51..c7c8ffa56f1 100644
--- a/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.pdf
+++ b/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex b/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex
index 37c4c56edf8..706d2e6eac1 100644
--- a/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex
+++ b/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex
@@ -97,7 +97,7 @@
\begin{document}
-\def\PackageVersion{2022/05/22}
+\def\PackageVersion{2022/05/31}
\title{\createtheorempackage{}\\\smallskip\itshape Initializing theorem-like environments with multilingual support}
\author{Jinwen XU}
@@ -210,7 +210,7 @@ Supported keys are:
\item The style of the \textquote{crefname}, you can specify the font, text style, color, etc.
\item Synonymous names: \commandoption{crefname-style} \,$|$\, \commandoption{crefnamestyle}
\end{itemize}
- \item \commandoption{Crefname}
+ \item \commandoption{Crefname}\lstinline| = |\meta{configuration}
\begin{itemize}
\item The name for \lstinline|\Cref| the environment, its syntax is the same as that of \commandoption{crefname}.
\item Also supports the syntax of \lstinline|\Crefthename|.
@@ -263,6 +263,12 @@ Supported keys are:
\item Specifying the \lstinline|\theoremstyle| for the current environment.
\item Synonymous names: \commandoption{apply style} \,$|$\, \commandoption{apply-style} \,$|$\, \commandoption{applystyle}
\end{itemize}
+ \item \commandoption{qed} or \commandoption{qed}\lstinline| = |\meta{Q.E.D. symbol}
+ \begin{itemize}
+ \item Specifying the Q.E.D. symbol for the current environment.
+ \item Note that the Q.E.D. symbol has already been put in math mode. If you want regular text such as \textquote{Q.E.D.}, you need to write \commandoption{qed}\lstinline| = \mathrm{Q.E.D.}|.
+ \item Synonymous names: \commandoption{qed symbol} \,$|$\, \commandoption{qed-symbol} \,$|$\, \commandoption{qedsymbol}
+ \end{itemize}
\item \commandoption{parent counter}\lstinline| = |\meta{parent counter}
\begin{itemize}
\item Specifying the \meta{parent counter} for the current environment, \emph{i.e.}, numbering will restart whenever that sectional level is encountered.
@@ -325,6 +331,12 @@ Supported keys are:
\item Note that this configuration can overwrite those already specified in \lstinline|\NameTheorem|.
\item Synonymous names: \commandoption{name-style} \,$|$\, \commandoption{namestyle}
\end{itemize}
+ \item \commandoption{qed}\lstinline| = |\meta{Q.E.D. symbol}
+ \begin{itemize}
+ \item Specifying the Q.E.D. symbol for the current environment.
+ \item Note that this configuration only works if you have already enabled the Q.E.D. symbol during the creating phase of the corresponding environment.
+ \item Synonymous names: \commandoption{qed symbol} \,$|$\, \commandoption{qed-symbol} \,$|$\, \commandoption{qedsymbol}
+ \end{itemize}
\item \commandoption{parent counter}\lstinline| = |\meta{parent counter}
\begin{itemize}
\item Specifying the \meta{parent counter} for the current environment, \emph{i.e.}, numbering will restart whenever that sectional level is encountered.
@@ -445,12 +457,26 @@ This is the combination of the first two cases --- we need to create \texttt{ide
\smallskip
In each case, the two environments \texttt{idea} and \texttt{idea*} share the same set of names.
+\subsection{The \emph{proofless} version -- theorems with a Q.E.D. symbol}
+
+Sometimes you may encounter a theorem without a proof, in which case you might want a Q.E.D. symbol when the theorem is finished. This can be easily achieved via:
+\begin{code}
+\CreateTheorem { theorem } { (*\commandoption{create starred version}*) }
+\CreateTheorem { theorem+ } { (*\commandoption{copy existed}*) = theorem, (*\commandoption{qed}*) }
+\CreateTheorem { theorem+* } { (*\commandoption{copy existed}*) = theorem*, (*\commandoption{qed}*) }
+\end{code}
+
+The code above defines two new environments \lstinline|theorem+| and \lstinline|theorem+*| in addition to \lstinline|theorem| and \lstinline|theorem*|. The \lstinline|+| version behaves exactly the same as the usual version, except it has a Q.E.D. symbol.
+
+
+\bigskip
\section{Known issues}
\begin{itemize}
\item The current mechanism does not work well for German, a problem originated in the package \textsf{crefthe}. The author plans to adopt a more refined approach in a later version so as to support the various grammatical situations in German.
\item \createtheorempackage{} modifies some undocumented internal macros of \textsf{cleveref}, so the behaviour might not be stable if \textsf{cleveref} gets updated.
+ \item \createtheorempackage{} is not fully compatible with \textsf{thmtools}, especially its \texttt{autoref} module.
\item There may be inaccuracies in the translation of those preset names.
\end{itemize}
diff --git a/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty b/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty
index 8e9ab307ce5..c41908646c0 100644
--- a/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty
+++ b/Master/texmf-dist/tex/latex/create-theorem/create-theorem.sty
@@ -13,7 +13,7 @@
\RequirePackage{l3keys2e}
\ProvidesExplPackage
{create-theorem}
- {2022/05/22} {}
+ {2022/05/31} {}
{Initializing theorem-like environments with multilingual support}
\keys_define:nn { create-theorem }
@@ -39,6 +39,11 @@
}
\ProcessKeysOptions { create-theorem }
+\hook_gput_code:nnn { package/thmtools/after } { crthm }
+ {
+ \let\thmt@autorefsetup\relax
+ }
+
\RequirePackage { aliascnt }
\bool_if:NT \l__crthm_nameinlink_bool
@@ -657,6 +662,7 @@
\keys_set:nn { create-theorem-naming } { #2 }
}
+\cs_set_eq:NN \c_crthm_original_qedsymbol_tl \qedsymbol
\bool_new:N \l__crthm_creating_apply_style_bool
\tl_new:N \l__crthm_creating_apply_style_tl
@@ -691,6 +697,17 @@
, apply-style .value_required:n = true
, apply style .meta:n = { style = { #1 } }
, apply style .value_required:n = true
+ , qed .code:n = {
+ \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl /begin } { crthm } { \cs_set:Npn \qedsymbol { \ensuremath { #1 } } \pushQED{\qed} }
+ \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl /end } { crthm } { \popQED }
+ }
+ , qed .default:n = \c_crthm_original_qedsymbol_tl
+ , qed~symbol .meta:n = { qed = #1 }
+ , qed~symbol .default:n = \c_crthm_original_qedsymbol_tl
+ , qed-symbol .meta:n = { qed = #1 }
+ , qed-symbol .default:n = \c_crthm_original_qedsymbol_tl
+ , qed symbol .meta:n = { qed = #1 }
+ , qed symbol .default:n = \c_crthm_original_qedsymbol_tl
, numberless .bool_set:N = \l__crthm_creating_numberless_bool
, create~starred~version .bool_set:N = \l__crthm_creating_create_starred_bool
, create-starred-version .meta:n = { create~starred~version }
@@ -866,6 +883,16 @@
, name-style .value_required:n = true
, name style .meta:n = { name~style = { #1 } }
, name style .value_required:n = true
+ , qed .code:n = {
+ \exp_args:Nx \hook_gput_code:nnn { env/ \l__crthm_current_env_tl /begin } { crthm } { \cs_set:Npn \qedsymbol { \ensuremath { #1 } } }
+ }
+ , qed .default:n = \c_crthm_original_qedsymbol_tl
+ , qed~symbol .meta:n = { qed = #1 }
+ , qed~symbol .default:n = \c_crthm_original_qedsymbol_tl
+ , qed-symbol .meta:n = { qed = #1 }
+ , qed-symbol .default:n = \c_crthm_original_qedsymbol_tl
+ , qed symbol .meta:n = { qed = #1 }
+ , qed symbol .default:n = \c_crthm_original_qedsymbol_tl
, parent~counter .code:n = { \crthm_counter_within:en { \l__crthm_current_env_tl } { #1 } }
, parent~counter .value_required:n = true
, parent-counter .meta:n = { parent~counter = { #1 } }