summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/create-theorem/create-theorem-doc.tex
blob: 37c4c56edf826cb0a54bab67d48a28b49b0a07f0 (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
%! TEX program = xelatex
\documentclass[classical]{einfart}

\usepackage{ProjLib}

%%================================
%% For typesetting code
%%================================
\usepackage{listings}
\usepackage{xcolor}
\usepackage{setspace}
\definecolor{code-main}{RGB}{70,130,180}
\definecolor{code-expl3}{RGB}{240,50,60}
\definecolor{code-option}{RGB}{40,110,20}
\definecolor{code-keys}{RGB}{100,130,150}
\definecolor{code-comment}{RGB}{20,120,80}
\definecolor{code-background}{gray}{0.99}
\lstset{
    language = [LaTeX]TeX,
    basicstyle = \ttfamily,
    keywordstyle = \color{code-main},
    commentstyle = \color{code-comment},
    showstringspaces = false,
    breaklines = true,
    frame = lines,
    backgroundcolor = \color{code-background},
    flexiblecolumns = true,
    escapeinside = {(*}{*)},
    alsoletter = {_,:},
    % numbers = left,
    % firstnumber = last,
    numberstyle = \scriptsize\ttfamily,
    stepnumber = 1,
    numbersep = 5pt,
}
\newcommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{% LaTeX2 commands
    classoffset = 0,
    texcsstyle =* \color{code-main},
    moretexcs =
      {
        cref,crefname,
        Cref,Crefname,
        crefformat,
        crefthe,crefthename,
        Crefthe,Crefthename,
        crefthemark,
        selectlanguage,
        theoremstyle,
        NameTheorem,
        CreateTheorem,
        SetTheorem,
      }
}
\lstset{% LaTeX3 commands
    classoffset = 1,
    texcsstyle =* \color{code-expl3},
    moretexcs =
      {
      }
}
\lstnewenvironment{code}{\setstretch{1.05}\LocallyStopLineNumbers}{\ResumeLineNumbers\vspace{-.3\baselineskip}\vspace{-.5\parskip}}
\lstnewenvironment{code*}{\setstretch{1.05}\lstset{numbers=left}\LocallyStopLineNumbers}{\ResumeLineNumbers\vspace{-.3\baselineskip}\vspace{-.5\parskip}}

\newcommand{\packageoption}[1]{\texttt{\textcolor{code-option}{#1}}}
\newcommand{\commandoption}[1]{\texttt{\textcolor{code-keys}{#1}}}

%%================================
%% tip
%%================================
\usepackage[many]{tcolorbox}
\newenvironment{tip}[1][Tip]
  {%
    \LocallyStopLineNumbers%
    \begin{tcolorbox}[breakable,
        enhanced,
        width = \textwidth,
        colback = paper, colbacktitle = paper,
        colframe = gray!50, boxrule=0.2mm,
        coltitle = black,
        fonttitle = \sffamily,
        attach boxed title to top left = {yshift=-\tcboxedtitleheight/2, xshift=.5cm},
        boxed title style = {boxrule=0pt, colframe=paper},
        before skip = 3mm,
        after skip = 3mm,
        top = 2.5mm,
        bottom = 1.5mm,
        title={\scshape\sffamily #1}]%
  }
  {%
    \end{tcolorbox}%
    \ResumeLineNumbers%
  }


\newcommand{\createtheorempackage}{\textsf{create-theorem}}

\begin{document}

\def\PackageVersion{2022/05/22}

\title{\createtheorempackage{}\\\smallskip\itshape Initializing theorem-like environments with multilingual support}
\author{Jinwen XU}
\thanks{Corresponding to: \texttt{\createtheorempackage{} \PackageVersion}}
\date{\TheDate{\PackageVersion}[only-year-month], in Paris}

\maketitle

\begin{abstract}
    \raggedleft
    The package \createtheorempackage{} provides commands for naming, initializing and configuring theorem-like environments. All of these commands have key-value based interface and \\are especially useful in multi-language documents, allowing the easy declaration of \\theorem-like environments that can automatically adapt to the language settings.
\end{abstract}

\vspace{-.5\baselineskip}

% \section*{Before everything}

% Make sure that the package \textsf{crefthe} is correctly installed. If you are using TeX Live 2022 or newer, or the newest version of MikTeX, then nothing needs to be worried.

\section{How to load it}

First, you need a backend to provide the command \lstinline|\newtheorem| with the usual behaviour, for example, \textsf{amsthm}. After that, you can simply load the current package with:

\begin{code}
\usepackage[(*\meta{options}*)]{create-theorem}
\end{code}

\begin{tip}
    Since \createtheorempackage{} uses \textsf{cleveref} internally, it should usually be placed near the last of your preamble --- notably, it needs to be loaded after \textsf{varioref} and \textsf{hyperref}.
\end{tip}

\medskip
It has the following options:
\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
    % \item \packageoption{draft} or \packageoption{fast}
    %     \begin{itemize}
    %         \item Fast mode. The functionality will be appropriately reduced to get faster compilation speed, recommended to use during the writing stage.
    %     \end{itemize}
    \item \packageoption{name as context}
        \begin{itemize}
            \item When referencing, the resulted names correspond to the current context. For example, the English names will be displayed when referencing a theorem-like environment in English context, no matter which linguistic context the original environment is in.
            \item Synonymous names: \packageoption{name-as-context} \,$|$\, \packageoption{nameascontext} \,$|$\, \packageoption{regionalref}
        \end{itemize}
    \item \packageoption{name as is}
        \begin{itemize}
            \item When referencing, the resulted names correspond to the contexts in which the corresponding environments appeared. For example, if the environment is written in an English context, then it shall always be the English names displayed when referencing it, regardless of the current linguistic context.
            \item Synonymous names: \packageoption{name-as-is} \,$|$\, \packageoption{nameasis} \,$|$\, \packageoption{originalref}
        \end{itemize}
    \item \packageoption{name in link}
        \begin{itemize}
            \item Include the names in the hyperlinks when referencing.
            \item Synonymous names: \packageoption{name-in-link} \,$|$\, \packageoption{nameinlink}
        \end{itemize}
    \item \packageoption{no preset names}
        \begin{itemize}
            \item Disable preset names. Use this option if you want to define you own name set.
            \item Synonymous names: \packageoption{no-preset-names} \,$|$\, \packageoption{nopresetnames}
        \end{itemize}
\end{itemize}

\section{How to use it}

\subsection[Naming theorem-like environments]{Naming theorem-like environments with \texttt{\textcolor{code-main}{\textbackslash NameTheorem}}}

The syntax of \lstinline|\NameTheorem| is as follows:
\begin{code}
\NameTheorem{(*\meta{name of environment}*)}{(*\meta{key-value configuration}*)}
\end{code}

Supported keys are:
\vspace{-.2\baselineskip}
\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
    \item \commandoption{heading}\lstinline| = |\meta{configuration}
        \begin{itemize}
            \item The heading of the environment, where \meta{configuration} can be:
            \begin{itemize}
                \item a single string in monolingual documents: \commandoption{heading}\lstinline| = |\meta{string};
                \item a key-value name list in multilingual documents:
\begin{code}
(*\commandoption{heading}*) = {
    (*\meta{language name}*) = (*\meta{string}*)
}
\end{code}
            \end{itemize}
        \end{itemize}
    \item \commandoption{heading style}\lstinline| = |\meta{style}
        \begin{itemize}
            \item The style of the heading, you can specify the font, text style, color, etc.
            \item Synonymous names: \commandoption{heading-style} \,$|$\, \commandoption{headingstyle}
        \end{itemize}
    \item \commandoption{crefname}\lstinline| = |\meta{configuration}
        \begin{itemize}
            \item The name for \lstinline|\cref| the environment, where \meta{configuration} can be:
            \begin{itemize}
                \item a single string in monolingual documents: \commandoption{crefname}\lstinline| = {name}{names}|;
                \item a key-value name list in multilingual documents:
\begin{code}
(*\commandoption{crefname}*) = {
    (*\meta{language name}*) = {(*\meta{singular name}*)}{(*\meta{plural name}*)}
}
\end{code}
            \end{itemize}
            \item Also supports the syntax of \lstinline|\crefthename|, thus you can assign names of the form:
\begin{code}
[(*\meta{singular definite article}*)]{(*\meta{singular name}*)}[(*\meta{plural definite article}*)]{(*\meta{plural name}*)}
\end{code}
        \end{itemize}
    \item \commandoption{crefname style}\lstinline| = |\meta{style}
        \begin{itemize}
            \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}
        \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|.
        \end{itemize}
    \item \commandoption{Crefname style}\lstinline| = |\meta{style}
        \begin{itemize}
            \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{numbering style}\lstinline| = |\meta{style}
        \begin{itemize}
            \item The style of numbering in the reference, you can specify the font, text style, color, etc.
            \item Synonymous names: \commandoption{numbering-style} \,$|$\, \commandoption{numberingstyle}
        \end{itemize}
    \item \commandoption{use name}\lstinline| = |\meta{list of existed environment(s) separated with semicolon \textquote{ ; }}
        \begin{itemize}
            \item Use the name(s) and style(s) of given environment(s). If there are multiple ones specified, the result would be a string combining the names, separated with \textquote{\texttt{-}}.
            \item Synonymous names: \commandoption{combined} \,$|$\, \commandoption{use-name} \,$|$\, \commandoption{usename}
        \end{itemize}
\end{itemize}

\vspace{-.3\baselineskip}
\begin{tip}
    You can also define the names within \lstinline|\CreateTheorem| while initializing the theorem-like environments. \lstinline|\NameTheorem| is especially useful for package or class authors who wish to preset suitable names (with styles) in their packages or classes.
\end{tip}


\subsection[Initializing theorem-like environments]{Initializing theorem-like environments with \texttt{\textcolor{code-main}{\textbackslash CreateTheorem}}}

The syntax of \lstinline|\CreateTheorem| is as follows:
\begin{code}
\CreateTheorem{(*\meta{list of the name of environments}*)}{(*\meta{key-value configuration}*)}
\end{code}

Supported keys are:
\vspace{-.2\baselineskip}
\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
    \item \commandoption{name}\lstinline| = |\meta{configuration} \quad or \quad \commandoption{name style}\lstinline| = |\meta{configuration}
        \begin{itemize}
            \item Setting the names. Same as \lstinline|\NameTheorem{|\meta{name of environment}\lstinline|}{|\meta{configuration}\lstinline|}|.
            \item Synonymous names: \commandoption{name-style} \,$|$\, \commandoption{namestyle}
        \end{itemize}
    \item \commandoption{use name}\lstinline| = |\meta{list of existed environment(s) separated with semicolon \textquote{ ; }}
        \begin{itemize}
            \item Using existed name(s). Same as in \lstinline|\NameTheorem|.
            \item Synonymous names: \commandoption{combined} \,$|$\, \commandoption{use-name} \,$|$\, \commandoption{usename}
        \end{itemize}
    \item \commandoption{style}\lstinline| = |\meta{theorem style}
        \begin{itemize}
            \item Specifying the \lstinline|\theoremstyle| for the current environment.
            \item Synonymous names: \commandoption{apply style} \,$|$\, \commandoption{apply-style} \,$|$\, \commandoption{applystyle}
        \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.
            \item Synonymous names: \commandoption{parent-counter} \,$|$\, \commandoption{parentcounter} \,$|$\, \\\phantom{Synonymous names: }\commandoption{number within} \,$|$\, \commandoption{number-within} \,$|$\, \commandoption{numberwithin}
        \end{itemize}
    \item \commandoption{shared counter}\lstinline| = |\meta{shared counter}
        \begin{itemize}
            \item Specifying the \meta{shared counter} for the current environment, \emph{i.e.}, numbering will progress sequentially for all theorem-like environments using this counter.
            \item Synonymous names: \commandoption{shared-counter} \,$|$\, \commandoption{sharedcounter} \,$|$\, \\\phantom{Synonymous names: }\commandoption{number like} \,$|$\, \commandoption{number-like} \,$|$\, \commandoption{numberlike}
        \end{itemize}
    \item \commandoption{numberless}
        \begin{itemize}
            \item Defining the current environment to be unnumbered.
        \end{itemize}
    \item \commandoption{create starred version}
        \begin{itemize}
            \item Defining a corresponding starred (unnumbered) version of the current environment.
            \item Synonymous names: \commandoption{create-starred-version} \,$|$\, \commandoption{createstarredversion} \,$|$\, \\\phantom{Synonymous names: }\commandoption{create numberless version} \,$|$\, \commandoption{create-numberless-version} \\\phantom{Synonymous names: }\,$|$ \commandoption{createnumberlessversion}
        \end{itemize}
    \item \commandoption{copy existed}\lstinline| = |\meta{existed environment}
        \begin{itemize}
            \item Defining the current environment to be the same as \meta{existed environment}.
            \item This key is usually useful in the following two situations:
                \begin{enumerate}
                    \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}{|\commandoption{copy \\existed} \lstinline|= theorem}|, one can then use the name \texttt{thm} to write theorems.
                    \item To remove the numbering of some environments. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}{|\commandoption{copy existed} \lstinline|= remark*}|.
                \end{enumerate}
            \item Synonymous names: \commandoption{copy-existed} \,$|$\, \commandoption{copyexisted}
        \end{itemize}
\end{itemize}

\begin{tip}
    The names for the following environments have been preset: \texttt{application}, \texttt{assertion}, \texttt{assumption}, \texttt{axiom}, \texttt{claim}, \texttt{conclusion}, \texttt{conjecture}, \texttt{construction}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{example}, \texttt{exercise}, \texttt{fact}, \texttt{hypothesis}, \texttt{lemma}, \texttt{notation}, \texttt{observation}, \texttt{postulate}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{recall}, \texttt{remark} and \texttt{theorem}. If you are fine with the preset names, then there is no need to specify the key \textquote{\commandoption{name}} while creating them, otherwise you shall have to use the package option \textquote{\packageoption{no preset names}} to disable the presets and then define your own ones.
\end{tip}

\medskip

Please note that, by default, an normal environment \meta{env} and its starred relative \meta{env}\texttt{*} do \emph{not} share the same set of names, for the sake of generality. However, with proper usage of \commandoption{create starred version} and \commandoption{copy existed}, you are already able to produce all of the following combinations that shares the same set of names: 1$)$ numbered \meta{env}, numbered \meta{env}\texttt{*} ; 2$)$ numbered \meta{env}, unnumbered \meta{env}\texttt{*} ; 3$)$ unnumbered \meta{env}, numbered \meta{env}\texttt{*} ; and 4$)$ unnumbered \meta{env}, unnumbered \meta{env}\texttt{*}. I left it as an easy exercise for you ;-)


\bigskip
\subsection[Configuring theorem-like environments]{Configuring theorem-like environments with \texttt{\textcolor{code-main}{\textbackslash SetTheorem}}}

The previous two commands are especially useful for package or class writers, while this one is more for the users. If you are not satisfied with preset name styles or numbering settings, then even after initializing the environments, you can still further configure them by means of \lstinline|\SetTheorem|, the syntax of which is as follows:

\begin{code}
\SetTheorem{(*\meta{list of the name of environments}*)}{(*\meta{key-value configuration}*)}
\end{code}

\begin{tip}
    \lstinline|\SetTheorem| should only be used in the preamble of your document.
\end{tip}

Supported keys are:
\vspace{-.2\baselineskip}
\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em]
    \item \commandoption{name}\lstinline| = |\meta{configuration} and \commandoption{name style}\lstinline| = |\meta{configuration}
        \begin{itemize}
            \item Same as \lstinline|\NameTheorem{|\meta{name of environment}\lstinline|}{|\meta{configuration}\lstinline|}|.
            \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{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.
            \item Note that this configuration can overwrite those already specified in \lstinline|\CreateTheorem|.
            \item Synonymous names: \commandoption{parent-counter} \,$|$\, \commandoption{parentcounter} \,$|$\, \\\phantom{Synonymous names: }\commandoption{number within} \,$|$\, \commandoption{number-within} \,$|$\, \commandoption{numberwithin}
        \end{itemize}
    \item \commandoption{shared counter}\lstinline| = |\meta{shared counter}
        \begin{itemize}
            \item Specifying the \meta{shared counter} for the current environment, \emph{i.e.}, numbering will progress sequentially for all theorem-like environments using this counter.
            \item Note that this configuration can overwrite those already specified in \lstinline|\CreateTheorem|.
            \item Synonymous names: \commandoption{shared-counter} \,$|$\, \commandoption{sharedcounter} \,$|$\, \\\phantom{Synonymous names: }\commandoption{number like} \,$|$\, \commandoption{number-like} \,$|$\, \commandoption{numberlike}
        \end{itemize}
\end{itemize}

\bigskip
\begin{center}
    \itshape
    If you're feeling confused, don't worry. Let's now take a look at some examples.
\end{center}


\section{Examples}

\subsection{The environment \texttt{idea}}

First, let's getting familiar with these two commands by creating the environment \texttt{idea}.

\begin{code}
\NameTheorem{idea}{
    (*\commandoption{heading}*)  = Idea,
    (*\commandoption{crefname}*) = {idea}{ideas},
    (*\commandoption{Crefname}*) = {Idea}{Ideas},
}
\CreateTheorem{idea}{ (*\commandoption{parent counter}*) = section }
\end{code}

or to do it in one turn:

\begin{code}
    \CreateTheorem{idea}{
        (*\commandoption{name}*) = {
            (*\commandoption{heading}*)  = Idea,
            (*\commandoption{crefname}*) = {idea}{ideas},
            (*\commandoption{Crefname}*) = {Idea}{Ideas},
        },
        (*\commandoption{parent counter}*) = section,
    }
\end{code}

\smallskip
This is not exciting at all. Now, let's say we are writing a bilingual note in English and French. (I shall omit the \lstinline|\NameTheorem| version and do it all at once in \lstinline|\CreateTheorem|.)

\begin{code}
\CreateTheorem{idea}{
    (*\commandoption{name}*) = {
        (*\commandoption{heading}*)  = { english = Idea,
                       french = Idée, },
        (*\commandoption{crefname}*) = { english = {idea}{ideas},
                       french = [l']{idée}[les]{idées}, },
        (*\commandoption{Crefname}*) = { english = {Idea}{Ideas},
                       french = [L']{idée}[Les]{idées}, },
    },
    (*\commandoption{parent counter}*) = section,
}
\end{code}

With this, if you use \lstinline|\selectlanguage{french}|, the \texttt{idea} environment shall be automatically displayed as \textquote{Idée}. And if you \lstinline|\crefthe| it, the definite article and the name showed up properly just as expected.

\medskip
Next we shall deal with the numbering problem. Let's continue to use this environment \texttt{idea} for demonstration -- suppose that we have set the names up with \lstinline|\NameTheorem|.

\subsection{Let's play with numbering}

Remember the exercise I left you in the previous section? Let's do it together now.

\subsubsection{Numbered \texttt{idea} and numbered \texttt{idea*}}

This is easy, \commandoption{copy existed} suffices:

\begin{code}
\CreateTheorem{idea}{(*\commandoption{parent counter}*) = section}
\CreateTheorem{idea*}{(*\commandoption{copy existed}*) = idea}
\end{code}

\subsubsection{Numbered \texttt{idea} and unnumbered \texttt{idea*}}

This is the easiest, \commandoption{create starred version} will do.

\begin{code}
\CreateTheorem{idea}{
    (*\commandoption{parent counter}*) = section,
    (*\commandoption{create starred version}*),
}
\end{code}

Notice that you cannot use \lstinline|\CreateTheorem{idea*}{|\commandoption{numberless}\lstinline|}| here, since we don't have names defined for \texttt{idea*}.

\subsubsection{Unnumbered \texttt{idea} and numbered \texttt{idea*}}

This is a bit tricky: by default we can only create numbered \texttt{idea} or unnumbered \texttt{idea*}, and the question is how to switch them. We shall need an intermediary.

\begin{code}
\CreateTheorem{idea}{(*\commandoption{create starred version}*)}
\CreateTheorem{idea-temp}{(*\commandoption{copy existed}*) = idea*}
\CreateTheorem{idea*}{(*\commandoption{copy existed}*) = idea}
\CreateTheorem{idea}{(*\commandoption{copy existed}*) = idea-temp}
\end{code}

\subsubsection{Unnumbered \texttt{idea} and unnumbered \texttt{idea*}}

This is the combination of the first two cases --- we need to create \texttt{idea*} first and then copy it to \texttt{idea}:

\begin{code}
\CreateTheorem{idea}{(*\commandoption{create starred version}*)}
\CreateTheorem{idea}{(*\commandoption{copy existed}*) = idea*}
\end{code}

\smallskip
In each case, the two environments \texttt{idea} and \texttt{idea*} share the same set of names.


\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 There may be inaccuracies in the translation of those preset names.
\end{itemize}

\medskip
If you run into any issues or have ideas for improvement, feel free to discuss on:
\begin{center}
    \url{https://github.com/Jinwen-XU/create-theorem/issues}
\end{center}
or email me via \href{mailto:ProjLib@outlook.com}{\texttt{ProjLib@outlook.com}}.

\end{document}