summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.tex
blob: 98da0264470507e48b25e3132bb8c751fc472d85 (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
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
\documentclass[allowbf,puretext]{lebhart}

%%================================
%% Import toolkit
%%================================
\usepackage{ProjLib}
\usepackage{longtable}  % breakable tables
\usepackage{hologo}     % more TeX logo
\usepackage{multicol}
\setlength{\columnsep}{2em}
\setlength{\columnseprule}{.75pt}
\def\columnseprulecolor{\color{gray!55}}

\UseLanguage{English}

%%================================
%% For typesetting code
%%================================
\usepackage{listings}
\definecolor{lightergray}{gray}{0.99}
\lstset{language=[LaTeX]TeX,
    keywordstyle=\color{maintheme},
    basicstyle=\ttfamily,
    commentstyle=\color{forestgreen}\ttfamily,
    stringstyle=\rmfamily,
    showstringspaces=false,
    breaklines=true,
    frame=lines,
    backgroundcolor=\color{lightergray},
    flexiblecolumns=true,
    escapeinside={(*}{*)},
    % numbers=left,
    numberstyle=\scriptsize, stepnumber=1, numbersep=5pt,
    % firstnumber=last,
}
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
    {color,NameTheorem,CreateTheorem,proofideanameCN,proofideanameEN,proofideanameFR,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,PLdate,PJLdate,ProjLib,
    mathfrak,mf,frak,mfA,mathbb,bb,N,Z,Q,R,C,F,A,mathcal,mc,cal,mathscr,ms,scr,
    abs,norm,injection,surjection,bijection,legendre,tlegendre,dlegendre,pmod
    }
}
\lstnewenvironment{code}%
{\setkeys{lst}{columns=fullflexible,keepspaces=true}}{}
\lstnewenvironment{code*}%
{\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}}{}

%%================================
%% tip
%%================================
\newenvironment{tip}[1][Tip]{%
    \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 = 0.3cm,
        after skip = 0.3cm,
        top = 3mm,
        bottom = 3mm,
        title={\scshape\sffamily #1}]%
}{\end{tcolorbox}}

%%================================
%% Names
%%================================
\providecommand{\ProjLibPackage}{\mbox{\textsf{ProjLib}}}
\providecommand{\PJLauthor}{\mbox{\textsf{PJLauthor}}}
\providecommand{\PJLdatePackage}{\mbox{\textsf{PJLdate}}}
\providecommand{\PJLdraft}{\mbox{\textsf{PJLdraft}}}
\providecommand{\PJLlang}{\mbox{\textsf{PJLlang}}}
\providecommand{\PJLlogo}{\mbox{\textsf{PJLlogo}}}
\providecommand{\PJLmath}{\mbox{\textsf{PJLmath}}}
\providecommand{\PJLpaper}{\mbox{\textsf{PJLpaper}}}
\providecommand{\PJLthm}{\mbox{\textsf{PJLthm}}}

%%================================
%% Main text
%%================================
\begin{document}

\title{\ProjLib{}~\,Toolkit\\[.3\baselineskip]\normalsize User Manual}
\author{Jinwen XU}
\thanks{Corresponding to: \texttt{\ProjLib{}~2021/12/16}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{December 2021, in Paris}

\maketitle

\begin{abstract}
    The \ProjLib{} toolkit is designed to simplify the preparation before writing \LaTeX{} documents. With the package \ProjLibPackage{} loaded, you no longer need to set up the theorem-like environments nor configure the appropriate multilingual settings. Additionally, a series of auxiliary functionalities are introduced.
\end{abstract}

\begin{multicols}{2}
    \small
    \tableofcontents
\end{multicols}

\medskip

\section*{Before you start}
\addcontentsline{toc}{section}{Before you start}

In order to use the toolkit, you need to:
\begin{itemize}
     \item install TeX Live or MikTeX of the latest possible version, and to make sure that \texttt{projlib} is correctly installed in your \TeX{} system.
     \item be familiar with the basic usage of \LaTeX{}, and to know how to compile your documents with \hologo{pdfLaTeX}, \hologo{XeLaTeX} or \hologo{LuaLaTeX}.
\end{itemize}

\section{Introduction}

The name \ProjLib{} can be regarded as the abbreviation of \emph{Project Library} in English or \emph{Projet Libre} in French (the author prefers the French interpretation). Its main purpose is to provide multi-language support and theorem-like environments with clever references. In addition, some additional features are provided, such as the enhanced author block, draft marks, mathematical symbols and shortcuts, etc.

The \ProjLib{} toolkit is composed of the main package \ProjLibPackage{} and a series of components whose names begin with the abbreviation "PJL". You can learn how to use it through the usage examples in the next section.

\section{Usage example}

\subsection{How to load it}

Just add the following line to your preamble:

\begin{code}
\usepackage{ProjLib}
\end{code}

\begin{tip}[Attention]
    Since \textsf{cleveref} is used internally, \ProjLibPackage{} needs to be placed after \textsf{varioref} and \textsf{hyperref}.
\end{tip}

\medskip
\subsection{Example - A complete document}

Let's first look at a complete document.

\begin{code*}
\documentclass{article}
\usepackage[a4paper,margin=.75in]{geometry}
\usepackage[hidelinks]{hyperref}
\usepackage[palatino]{ProjLib} % Load the toolkit and use font Palatino

\UseLanguage{French} % Use French from here

\begin{document}

\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
\date{\PLdate{2022-04-01}}

\maketitle

\begin{abstract}
    (*\meta{abstract text}*) \dnf<(*\meta{some hint}*)>
\end{abstract}

\section{Un théorème}

\begin{theorem}\label{thm:abc}
    Ceci est un théorème.
\end{theorem}

Référence du théorème: \cref{thm:abc} % It is recommended to use clever reference

\end{document}
\end{code*}

\bigskip

If you find it a little complicated, don't worry. Let's now look at this example piece by piece.

\clearpage
\subsubsection{Initialization}

\begin{code}
\documentclass{article}
\usepackage[a4paper,margin=.75in]{geometry}
\usepackage[hidelinks]{hyperref}
\usepackage[palatino]{ProjLib}
\end{code}

In standard classes, one usually only need to configure the page size, hyperlinks and load \ProjLibPackage{} before actually start writing the document. The font option \texttt{palatino} of \ProjLibPackage{} is used here. For all available options of \ProjLibPackage{}, please refer to the next section.

Of course, you can also use the document class \textsf{amsart}, the configurations are the same.

\subsubsection{Set the language}

\begin{code}
\UseLanguage{French}
\end{code}

This line indicates that French will be used in the document (by the way, if only English appears in your article, then there is no need to set the language). You can also switch the language in the same way later in the middle of the text. Supported languages include Simplified Chinese, Traditional Chinese, Japanese, English, French, German, Spanish, Portuguese, Brazilian Portuguese and Russian\footnote{However, you need to add the encoding support and fonts of the corresponding language by yourself. For example, for Chinese, you may need to load the \textsf{ctex} package and set the fonts. As a sidenote, you can try the author's document classes \textsf{einfart} or \textsf{lebhart}, in which the corresponding settings have been completed. For the details, run \lstinline|texdoc minimalist| or \lstinline|texdoc colorist| in the command line.}.

For detailed description of this command and more related commands, please refer to the section on the multi-language support.

\subsubsection{Title and author information}

\begin{code}
\title{(*\meta{title}*)}
\author{(*\meta{author}*)}
\date{\PLdate{2022-04-01}}
\end{code}

This part is the title and author information block. The example shows the most basic usage, but in fact, you can also write:
\begin{code}
\author{(*\meta{author 1}*)}
\address{(*\meta{address 1}*)}
\email{(*\meta{email 1}*)}
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
...
\end{code}

In addition, if the \AmS{} simulation is enabled, you can also write in the \AmS{} fashion (the original way still works). For this, you should add the package option \texttt{amsfashion}\footnote{Since this option modifies some internal macros of \LaTeX{}, it may conflict with some packages or document classes, and thus it is not enabled by default.}, \emph{i.e.}, the line that introduces \ProjLibPackage{} should be written as:
\begin{code}
\usepackage[amsfashion,palatino]{ProjLib}
\end{code}
And correspondingly, you will also be able to use these macros:
\begin{code}
\dedicatory{(*\meta{dedicatory}*)}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
\end{code}
In addition, you can also write the abstract before \lstinline|\maketitle|, as the way required in the \AmS{} classes:
\begin{code}
\begin{abstract}
    (*\meta{abstract text}*)
\end{abstract}
\maketitle
\end{code}

\subsubsection{Draft marks}
\begin{code}
\dnf<(*\meta{some hint}*)>
\end{code}
When you have some places that have not yet been finished yet, you can mark them with this command, which is especially useful during the draft stage.

\subsubsection{Theorem-like environments}
\begin{code}
\begin{theorem}\label{thm:abc}
    Ceci est un théorème.
\end{theorem}
Référence du théorème: \cref{thm:abc}
\end{code}

Commonly used theorem-like environments have been pre-defined. Also, when referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}} --- in this way, there is no need to explicitly write down the name of the corresponding environment every time.

\clearpage
\section{Options of the main package}

\ProjLibPackage{} offers the following options:
\begin{itemize}
    \item \texttt{draft} or \texttt{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 \texttt{palatino}, \texttt{times}, \texttt{garamond}, \texttt{noto}, \texttt{biolinum} ~$|$~ \texttt{useosf}
        \begin{itemize}
            \item Font options. As the names suggest, font with corresponding name will be loaded.
            \item The \texttt{useosf} option is used to enable the old-style figures.
        \end{itemize}
    \item \texttt{nothms}, \texttt{delaythms}, \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}, \texttt{complexname}, \texttt{simplename}, \texttt{regionalref}, \texttt{originalref}
        \begin{itemize}
            \item Options from the component \PJLthm{} used for setting theorem-like environments, please refer to the section on this package for details.
        \end{itemize}
    \item \texttt{author}
        \begin{itemize}
            \item Load the component \PJLauthor{} used to enhance the author information block. For more information about its functionality, see the section on this package.
        \end{itemize}
    \item \texttt{amsfashion}
        \begin{itemize}
            \item Allow the user to write document in the \AmS{} fashion. In the mean time, the option \texttt{author} will be automatically turned on.
        \end{itemize}
\end{itemize}
In addition, there are also some options of the components that should be passed as global options of your document class, such as the language options \texttt{EN} / \texttt{english} / \texttt{English}, \texttt{FR} / \texttt{french} / \texttt{French} etc.\,of \PJLlang{}, \\and \texttt{paperstyle}, \texttt{preview} of \PJLpaper{}. For more information, please refer to the corresponding sections.

\clearpage

\section{The components}

\subsection{Main functions}

\subsubsection{PJLlang: multi-language support}

\PJLlang{} offers multi-language support, including simplified Chinese, traditional Chinese, English, French, German, Japanese, and Russian (among them, Chinese, Japanese, and Russian require appropriate \TeX{} engines and fonts to support).

\medskip
\PJLlang{} provides language options. The names of these options have three types, which are abbreviations (such as \texttt{EN}), lowercase (such as \texttt{english}), and capital letters (such as \texttt{English}). For the option names of a specific language, please refer to \meta{language name} below. Among them, the first specified language \meta{first language} will be used as the default language, which is equivalent to specifying \lstinline|\UseLanguage{|\meta{first language}\lstinline|}| at the beginning of your document.

\begin{tip}
    It is recommended to use these language options and pass them as global options. In this way, only the specified languages are set, thus saving the \TeX{} memory and significantly improving the compilation speed.
\end{tip}

\medskip
The language can be selected by the following macros:

\begin{itemize}
    \item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}| is used to specify the language. The corresponding settings of the language will be applied after it. It can be used either in the preamble or in the main body. When no language is specified, ``English" is selected by default.
    \item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|, which uses the specified language settings to typeset \meta{content}. Compared with \lstinline|\UseLanguage|, it will not modify the line spacing, so line spacing would remain stable when CJK and Western texts are mixed.
\end{itemize}

\medskip
\meta{language name} can be (it is not case sensitive, for example, \texttt{French} and \texttt{french} have the same effect):
\begin{itemize}
    \item Simplified Chinese: \texttt{CN}, \texttt{Chinese}, \texttt{SChinese} or \texttt{SimplifiedChinese}
    \item Traditional Chinese: \texttt{TC}, \texttt{TChinese} or \texttt{TraditionalChinese}
    \item English: \texttt{EN} or \texttt{English}
    \item French: \texttt{FR} or \texttt{French}
    \item German: \texttt{DE}, \texttt{German} or \texttt{ngerman}
    \item Italian: \texttt{IT} or \texttt{Italian}
    \item Portuguese: \texttt{PT} or \texttt{Portuguese}
    \item Portuguese (Brazilian): \texttt{BR} or \texttt{Brazilian}
    \item Spanish: \texttt{ES} or \texttt{Spanish}
    \item Japanese: \texttt{JP} or \texttt{Japanese}
    \item Russian: \texttt{RU} or \texttt{Russian}
\end{itemize}

\medskip
In addition, you can also add new settings to selected language:
\begin{itemize}
    \item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}|
    \begin{itemize}
        \item Add \meta{settings} to all supported languages.
    \end{itemize}
    \item \lstinline|\AddLanguageSetting(|\meta{language name}\lstinline|){|\meta{settings}\lstinline|}|
    \begin{itemize}
        \item Add \meta{settings} to the selected language \meta{language name}.
    \end{itemize}
\end{itemize}
For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make all German text displayed in orange (of course, one then need to add \lstinline|\AddLanguageSetting{\color{black}}| in order to correct the color of the text in other languages).

\subsubsection{PJLthm: theorem-like environments with clever reference and multilingual support}

\PJLthm{} offers the configuration of theorem-like environments. It has the following option:

\vspace{-.3\baselineskip}
\begin{itemize}
    \item \texttt{nothms}
    \begin{itemize}
        \item Theorem-like environments will not be defined. You may use this option if you wish to apply your own theorem styles.
    \end{itemize}
    \item \texttt{delaythms}
    \begin{itemize}
        \item Defer the definition of theorem-like environments to the end of the preamble. Use this option if you want the theorem-like environments to be numbered within a custom counter.
    \end{itemize}
    \item \texttt{nothmnum}, \texttt{thmnum} or \texttt{thmnum=}\meta{counter}
    \begin{itemize}
        \item Theorem-like environments will not be numbered / numbered in order 1, 2, 3... / numbered within \meta{counter}. Here, \meta{counter} should be a built-in counter (such as \texttt{subsection}) or a custom counter defined in the preamble (with the option \texttt{delaythms} enabled). If no option is used, they will be numbered within \texttt{chapter} (book) or \texttt{section} (article).
    \end{itemize}
    \item \texttt{complexname}, \texttt{simplename}
        \begin{itemize}
            \item Enabled the detailed preset (default) or the simple preset for names of theorem-like environments. The detailed version includes singular and plural forms, and, where possible, the definite articles; the simple version uses always the same word, without distinction between singular and plural forms.
        \end{itemize}
    \item \texttt{regionalref}, \texttt{originalref}
    \begin{itemize}
        \item When referencing, whether the name of the theorem-like environment changes with the current language. The default is \texttt{regionalref}, \emph{i.e.}, the name corresponding to the current language is used; for example, when referencing a theorem-like environment in English context, the names "Theorem, Definition..." will be used no matter which language context the original environment is in. If \texttt{originalref} is enabled, then the name will always remain the same as the original place; for example, when referencing a theorem written in the French context, even if one is currently in the English context, it will still be displayed as ``Théorème''.
        \item In \texttt{fast} mode, the option \texttt{originalref} will have no effect.
    \end{itemize}
\end{itemize}

\medskip
Preset environments include: \texttt{assumption}, \texttt{axiom}, \texttt{conjecture}, \texttt{convention}, \texttt{corollary}, \texttt{definition}, \texttt{definition-proposition}, ~~\texttt{definition-theorem}, ~~\texttt{example}, ~~\texttt{exercise}, ~~\texttt{fact}, ~~\texttt{hypothesis}, ~~\texttt{lemma}, \\\texttt{notation}, \texttt{observation}, \texttt{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, and the corresponding unnumbered version with an asterisk \lstinline|*| in the name. The titles will change with the current language. For example, \texttt{theorem} will be displayed as ``Theorem" in English mode and ``Théorème" in French mode. For details on how to select a language, please refer to the section on \PJLlang{}.

\begin{tip}
    When referencing a theorem-like environment, it is recommended to use \lstinline|\cref{|\meta{label}\texttt{\}}. In this way, there is no need to explicitly write down the name of the corresponding environment every time.
\end{tip}

\bigskip
If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use. There are two ways for this:
\begin{itemize}
    \item Simple settings: \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
    \begin{itemize}
        \item This approach only sets one main name, the other names, such as those used for clever reference, are set to be the same (in particular, for clever reference, the singular and plural form will not be distinguished). When \meta{language name} is not specified, the name will be set for all supported languages. In addition, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}| has the same effect as \lstinline|\NameTheorem{envname}| .
    \end{itemize}
    \item Detailed settings (recommended):
\begin{code}
\NameTheorem{(*\meta{name of environment}*)}{
    (*\meta{language name 1}*)={
        name=(*\meta{Name}*),
        crefname={(*\meta{name}*)}{(*\meta{names}*)},
        Crefname={(*\meta{Name}*)}{(*\meta{Names}*)},
        autorefname=(*\meta{name}*),
        theoremheading=(*\meta{Name}*),
    },
    (*\meta{language name 2}*)={...},
}
\end{code}
or
\begin{code}
\NameTheorem[(*\meta{language name}*)]{(*\meta{name of environment}*)}{
    name=(*\meta{Name}*),
    crefname={(*\meta{name}*)}{(*\meta{names}*)},
    Crefname={(*\meta{Name}*)}{(*\meta{Names}*)},
    autorefname=(*\meta{name}*),
    theoremheading=(*\meta{Name}*),
}
\end{code}
        \begin{itemize}
            \item This approach sets all the names. When \meta{language name} is not specified, the full interface will be enabled; when it is specified, only the names of the corresponding language are set. Similarly, environments with or without asterisk share the same name, therefore, \lstinline|\NameTheorem{envname*}| has the same effect as \lstinline|\NameTheorem{envname}| .
        \end{itemize}
\end{itemize}

\begin{tip}
    In addition, you can also name a theorem-like environment while defining it, see the description of \lstinline|\CreateTheorem| later.
\end{tip}

And then define this environment in one of following five ways:
\vspace{-.3\baselineskip}
\begin{itemize}
    \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
        \begin{itemize}
            \item Define an unnumbered environment \meta{name of environment}
        \end{itemize}
    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
        \begin{itemize}
            \item Define a numbered environment \meta{name of environment}, numbered in order 1,2,3,\dots
        \end{itemize}
    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
        \begin{itemize}
            \item Define a numbered environment \meta{name of environment}, which shares the counter \meta{numbered like}
        \end{itemize}
    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
        \begin{itemize}
            \item Define a numbered environment \meta{name of environment}, numbered within the counter \meta{numbered within}
        \end{itemize}
    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|\\
    \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}(|\meta{existed environment}\lstinline|)|
        \begin{itemize}
            \item Identify \meta{name of environment} with \meta{existed environment} or \meta{existed environment}\lstinline|*|.
            \item This method is usually useful in the following two situations:
                \begin{enumerate}
                    \item To use a more concise name. For example, with \lstinline|\CreateTheorem{thm}(theorem)|, one can then use the name \texttt{thm} to write theorem.
                    \item To remove the numbering of some environments. For example, one can remove the numbering of the \texttt{remark} environment with \lstinline|\CreateTheorem{remark}(remark*)|.
                \end{enumerate}
        \end{itemize}
\end{itemize}

\begin{tip}
    This macro utilizes the feature of \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions.
\end{tip}

\bigskip
You can also name a theorem-like environment while defining it, by adding afterwards a group of parentheses containing the settings:
\begin{code}
\CreateTheorem{(*\meta{name of environment}*)}{
    (*\meta{language name 1}*)={
        name=(*\meta{Name}*),
        crefname={(*\meta{name}*)}{(*\meta{names}*)},
        Crefname={(*\meta{Name}*)}{(*\meta{Names}*)},
        autorefname=(*\meta{name}*),
        theoremheading=(*\meta{Name}*),
    },
    (*\meta{language name 2}*)={...},
}
\end{code}

\NameTheorem[EN]{proofidea}{Idea}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>

\bigskip
Here is an example. The following code:
\begin{code}
\NameTheorem[EN]{proofidea}{Idea}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>
\end{code}
defines an unnumbered environment \lstinline|proofidea*| and a numbered environment \lstinline|proofidea| (numbered within subsection) respectively. They can be used in English context. The effect is as follows (the actual style is related to the document class):

\begin{proofidea*}
    The \lstinline|proofidea*| environment.
\end{proofidea*}

\begin{proofidea}
    The \lstinline|proofidea| environment.
\end{proofidea}

\medskip
Of course, you can also use a set of more detailed name:
\begin{code}
\NameTheorem{proofidea}{
    EN = {
        name = Idea,
        crefname = {idea}{ideas},
        Crefname = {Idea}{Ideas},
    }
}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>
\end{code}
or set the names while defining them (for \lstinline|proofidea*| and \lstinline|proofidea|, set once suffices):
\begin{code}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>{
    EN = {
        name = Idea,
        crefname = {idea}{ideas},
        Crefname = {Idea}{Ideas},
    }
}
\end{code}


\subsection{Secondary functions}

\subsubsection{PJLauthor: enhanced author block}

\PJLauthor{} offers \lstinline|\address|, \lstinline|\curraddr| and \lstinline|\email|, and allows you to enter multiple groups of author information. The standard usage is like this:
\begin{code}
\author{(*\meta{author 1}*)}
\address{(*\meta{address 1}*)}
\email{(*\meta{email 1}*)}
\author{(*\meta{author 2}*)}
\address{(*\meta{address 2}*)}
\email{(*\meta{email 2}*)}
...
\end{code}
The mutual order of \lstinline|\address|, \lstinline|\curraddr| and \lstinline|\email| is not important.

\medskip
In addition, you can use the option \texttt{amsfashion} to enable the \AmS{} fashion. More specifically, the effect is:
\begin{itemize}
    \item Provides the macros \lstinline|\dedicatory|, \lstinline|\keywords| and \lstinline|\subjclass|;
    \item \lstinline|\thanks| can be written outside \lstinline|\author|;
    \item The \lstinline|abstract| environment can be placed before \lstinline|\maketitle|.
\end{itemize}

\begin{tip}[Attention]
    These modifications would only take place in standard classes. In the \AmS{} classes, \PJLauthor{} does not have any effect.
\end{tip}

\subsubsection{PJLdate: date-time processing}

\PJLdatePackage{} offers the macro \lstinline|\TheDate|\meta{yyyy-mm-dd} to convert \meta{yyyy-mm-dd} into the date format of the currently selected language. For example, in current English context, \lstinline|\TheDate{2022-04-01}| would become ``\TheDate{2022-04-01}'', while in French context as ``\UseOtherLanguage{French}{\TheDate{2022-04-01}}''.

For details on how to select a language, please refer to the section on \PJLlang{}.

\subsubsection{PJLdraft: draft marks}

\PJLdraft{} offers the following macros:
\begin{itemize}
    \item \lstinline|\dnf| or \lstinline|\dnf<...>|. The effect is: \dnf~ or \dnf<...>. \\The prompt text changes according to the current language. For example, it will be displayed as \UseOtherLanguage{French}{\dnf} in French mode.
    \item \lstinline|\needgraph| or \lstinline|\needgraph<...>|. The effect is: \needgraph or \needgraph<...>The prompt text changes according to the current language. For example, in French mode, it will be displayed as \UseOtherLanguage{French}{\needgraph}
\end{itemize}

For details on how to select a language, please refer to the section on \PJLlang{}.

\subsubsection{PJLlogo: the logo \texorpdfstring{\ProjLib}{ProjLib}}

\PJLlogo{} offers the macro \lstinline|\ProjLib| to draw the logo, which looks like \ProjLib{}. It is similar to ordinary text macros and can be used with different font size macros:

\begin{center}
    \begin{tabular}{ll}
        \lstinline|\tiny|:& {\tiny\ProjLib}\\
        \lstinline|\scriptsize|:& {\scriptsize\ProjLib}\\
        \lstinline|\footnotesize|:& {\footnotesize\ProjLib}\\
        \lstinline|\normalsize|:& {\normalsize\ProjLib}\\
        \lstinline|\large|:& {\large\ProjLib}\\
        \lstinline|\Large|:& {\Large\ProjLib}\\
        \lstinline|\LARGE|:& {\LARGE\ProjLib}\\
        \lstinline|\huge|:& {\huge\ProjLib}\\
        \lstinline|\Huge|:& {\Huge\ProjLib}
    \end{tabular}
\end{center}

\medskip
\subsubsection{PJLmath: math symbols and shortcuts}

\PJLmath{} offers the following shortcuts:
\begin{enumerate}[label=\roman*)]
    \item \lstinline|\mathfrak{|$\cdot$\lstinline|}| $\longrightarrow$ \lstinline|\mf|$\cdot$ or \lstinline|\frak|$\cdot$ . For example, \lstinline|\mfA| (or \lstinline|\mf{A}|) has the same effect as \lstinline|\mathfrak{A}|. This works for both upper and lower case, producing:
    \begin{align*}
        \mfa\mfb\mfc\mfd\mfe\mff\mfg\mfh\mfi\mfj\mfk\mfl\mfm\mfn&\mfo\mfp\mfq\mfr\mfs\mft\mfu\mfv\mfw\mfx\mfy\mfz\\
        \mfA\mfB\mfC\mfD\mfE\mfF\mfG\mfH\mfI\mfJ\mfK\mfL\mfM\mfN&\mfO\mfP\mfQ\mfR\mfS\mfT\mfU\mfV\mfW\mfX\mfY\mfZ
    \end{align*}
    \item \lstinline|\mathbb{|$\cdot$\lstinline|}| \( \longrightarrow \) \lstinline|\bb|$\cdot$ . This only works for uppercase alphabet and the number \( 1 \).
    \begin{equation*}
        \bbA\bbB\bbC\bbD\bbE\bbF\bbG\bbH\bbI\bbJ\bbK\bbL\bbM\bbN\bbO\bbP\bbQ\bbR\bbS\bbT\bbU\bbV\bbW\bbX\bbY\bbZ\bb1
    \end{equation*}
    There are also special command for well-known algebraic structures: \lstinline|\N|, \lstinline|\Z|, \lstinline|\Q|, \lstinline|\R|, \lstinline|\C|, \lstinline|\F|, \lstinline|\A|.
    \[
        \N\Z\Q\R\C\F\A
    \]
    \item \lstinline|\mathcal{|$\cdot$\lstinline|}| \( \longrightarrow \) \lstinline|\mc|$\cdot$ or \lstinline|\cal|$\cdot$ . This only works for uppercase alphabet.
    \begin{equation*}
        \mcA\mcB\mcC\mcD\mcE\mcF\mcG\mcH\mcI\mcJ\mcK\mcL\mcM\mcN\mcO\mcP\mcQ\mcR\mcS\mcT\mcU\mcV\mcW\mcX\mcY\mcZ
    \end{equation*}
    \item \lstinline|\mathscr{|$\cdot$\lstinline|}| \( \longrightarrow \) \lstinline|\ms|$\cdot$ or \lstinline|\scr|$\cdot$ . This only works for uppercase alphabet.
    \begin{equation*}
        \msA\msB\msC\msD\msE\msF\msG\msH\msI\msJ\msK\msL\msM\msN\msO\msP\msQ\msR\msS\msT\msU\msV\msW\msX\msY\msZ
    \end{equation*}
\end{enumerate}

In addition, \PJLmath{} also provides some math symbols that are not by default included in \LaTeX{}.

\begin{longtable}[l]{ p{4cm} p{6cm} p{6cm}}
\lstinline|\abs| & \lstinline|\abs{a}| $\rightarrow \abs{a}$ & absolute value symbol \\
\lstinline|\norm| & \lstinline|\norm{a}| $\rightarrow \norm{a}$ & norm symbol \\
\lstinline|\injection| & \lstinline|\injection| $\rightarrow ~\injection$ & arrow symbol for injection \\
\lstinline|\surjection| & \lstinline|\surjection| $\rightarrow ~\surjection$ & arrow symbol for surjection \\
\lstinline|\bijection| & \lstinline|\bijection| $\rightarrow ~\bijection$ & arrow symbol for bijection \\
\end{longtable}

These shortcuts and symbols are defined in such a way that they will not conflict with existing or user-defined commands. Thus, even if you do not use these shortcuts or symbols, there is no need to worry that their existence will bring errors.

\subsubsection{PJLpaper: paper configuration}

\PJLpaper{} is mainly used to adjust the paper color. It has the following options:

\vspace{-.3\baselineskip}
\begin{itemize}
    \item \texttt{paperstyle = \meta{paper style name}}
        \begin{itemize}
            \item Set the paper color style. The options available for \meta{paper style name} are: \texttt{yellow}, \texttt{dark} and \texttt{nord}.
        \end{itemize}
    \item \texttt{yellowpaper}, \texttt{darkpaper}, \texttt{nordpaper}
        \begin{itemize}
            \item Same as \texttt{paperstyle} with the corresponding \meta{paper style name} specified.
        \end{itemize}
    \item \texttt{preview}
        \begin{itemize}
            \item Preview mode. Crop the white edges of pdf file for the convenience of reading.
        \end{itemize}
\end{itemize}
\vspace{-.3\baselineskip}

It is recommended to use them as global options of the document class. In this way, the paper settings would be clear at a glance.

\clearpage

\section{Known issues}

\begin{itemize}[itemsep=.6em]
    \item \PJLauthor{} is still in its preliminary stage, its effect is not as good as the relatively mature \textsf{authblk}.
    \item \PJLlang{}: It is still quite problematic with the configuration of \textsf{polyglossia}, so main features are implemented through \textsf{babel} for now.
    \item \PJLpaper{}: the \texttt{preview} option is mainly implemented with the help of package \textsf{geometry}, so it does not work quite as well in the \textsc{\textsf{Koma}} document classes.
    \item \PJLthm{}: The numbering and theorem-style settings of the theorem-like environments cannot be accessed by the user at present.
    \item \PJLthm{}: The localization of \textsf{cleveref} is not yet complete for all supported languages of \PJLlang{}, especially for Chinese, Japanese and Russian.
    \item Error handling mechanism is incomplete: no corresponding error prompt when some problems occur.
    \item There are still many things that can be optimized in the code. Some takes too long to run, especially the setup of theorem-like environments in \PJLthm{}.
\end{itemize}

\end{document}
\endinput
%%
%% End of file `ProjLib-doc-en.tex'.