summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.tex
blob: 04e39fbeea52aae1c3a26fcac5c60351a5f63aa6 (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
\documentclass[English,Chinese,French,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{Chinese}

%%================================
%% 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,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][提示]{%
    \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{\PJLtoolkit}{\mbox{\textsf{PJLtoolkit}}}
\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{} 工具集\\[.3\baselineskip]\normalsize 使用指南}
\author{许锦文}
\thanks{对应版本.~~\texttt{\ProjLib{}~2021/07/27}}
\email{\href{mailto:ProjLib@outlook.com}{ProjLib@outlook.com}}
\date{2021年7月,北京}

\maketitle

\begin{abstract}
    \ProjLib{} 工具集之设计目的为简化 \LaTeX{} 文档撰写前的准备工作。只需要加载 \ProjLibPackage{},多语言设置就已准备就绪,定理类环境已被设置好可供直接使用,并且引入了一系列辅助功能。
\end{abstract}

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

\medskip

\section*{开始之前}
\addcontentsline{toc}{section}{开始之前}

为了使用这套工具集,你需要:
\begin{itemize}
    \item 安装一个尽可能新版本的 TeX Live 或 MikTeX 套装,并确保 \texttt{projlib} 被正确安装在你的 \TeX 封装中。
    \item 熟悉 \LaTeX{} 的基本使用方式,并且知道如何用 \hologo{pdfLaTeX}、\hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 编译你的文档。
\end{itemize}

\section{简介}

\ProjLib{} 这一名称可以看成是英文 Project Library (项目库) 或法文 Projet Libre (自由项目) 的缩写 (作者更喜欢法文的全称)。其主要目的是提供多语言支持和带有智能引用的定理类环境。除此之外,还附加了一些额外功能,如支持作者附加信息、未完成标记、数学符号与捷径等。

\ProjLib{} 工具箱由主宏包 \ProjLibPackage{} 以及一系列由“PJL”缩写开头的内部组件构成。你可以通过下一节的使用实例来了解它的使用方式。

\section{使用示例}

\subsection{如何加载}

加载 \ProjLib{} 工具箱十分容易,只需要在导言部分加入这一行即可:

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

\begin{tip}[注意事项]
    由于其内部使用了 \textsf{cleveref},\ProjLibPackage{} 需要放在 \textsf{varioref}、\textsf{hyperref} 的后面。
\end{tip}

\subsection{一篇完整的文档示例}

首先来看一段完整的示例。

\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

如果你觉得这个例子有些复杂,不要担心。现在我们来一点点地观察这个例子。

\clearpage
\subsubsection{初始化部分}

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

在标准文档类中,通常只需简要设置页面尺寸、超链接,再载入 \ProjLibPackage{},即可直接开始写作。这里使用了 \ProjLibPackage{} 的 \texttt{palatino} 字体选项。关于 \ProjLibPackage{} 的所有可用选项,可以参阅下一节。

当然,你也可以使用 \textsf{amsart} 文档类,设置是相同的。

\subsubsection{设定语言}

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

这一行表明文档中将使用法语(如果你的文章中只出现英语,那么可以不需要设定语言)。你也可以在文章中间用同样的方式再次切换语言。支持的语言包括简体中文、繁体中文、日文、英语、法语、德语、西班牙语、葡萄牙语、巴西葡萄牙语、俄语\footnote{不过,你需要自行引入相应语言的支持与字体。例如,对于中文,你可能需要载入 \textsf{ctex} 宏包并设置字体。作为补充,你可以尝试作者的 \textsf{einfart} 或 \textsf{lebhart} 文档类,其中相应的设置都已经完成了,详细资料可以通过 \lstinline|texdoc minimalist| 或 \lstinline|texdoc colorist| 获知。}。

对于这一命令的详细说明以及更多相关命令,可以参考后面关于多语言支持的小节。

\subsubsection{标题与作者信息}

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

这一部分是标题和作者信息块。这个例子中给出的是最基本的形式,事实上你还可以这样写:
\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}

另外,如果开启 \AmS{} 风格,那么文章中还可以采用 \AmS{} 文档类的写法 (此时原始的写法也是成立的)。为此,引入 \ProjLibPackage{} 时应该加入 \texttt{amsfashion} 选项\footnote{由于这一选项会修改\LaTeX{} 的一些内部指令,有可能与一些宏包或文档类发生冲突,因此没有默认启用。}:
\begin{code}
\usepackage[amsfashion,palatino]{ProjLib}
\end{code}
而相应地,你也就可以使用这些命令:
\begin{code}
\dedicatory{(*\meta{dedicatory}*)}
\subjclass{*****}
\keywords{(*\meta{keywords}*)}
\end{code}
另外,这种情况下,也可以允许摘要出现在 \lstinline|\maketitle| 的前面,如同在 \AmS{} 文档类中所要求的那样:
\begin{code}
\begin{abstract}
    (*\meta{abstract text}*)
\end{abstract}
\maketitle
\end{code}

\subsubsection{未完成标记}
\begin{code}
\dnf<(*\meta{some hint}*)>
\end{code}
当你有一些地方尚未完成的时候,可以用这条指令标记出来,它在草稿阶段格外有用。

\subsubsection{定理类环境}
\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}

常见的定理类环境可以直接使用。在引用的时候,建议采用智能引用 \lstinline|\cref{|\meta{label}\lstinline|}|——这样就不必每次都写上相应环境的名称了。

\section{主宏包的选项}

\ProjLibPackage{} 提供下列选项以供选择:
\begin{itemize}
    \item \texttt{draft} 或 \texttt{fast}
        \begin{itemize}
            \item 快速模式。功能会适当缩减,但能够提高编译速度,建议在撰写阶段使用。
        \end{itemize}
    \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{biolinum} ~$|$~ \texttt{useosf}
        \begin{itemize}
            \item 字体选项。顾名思义,会加载相应名称的字体。
            \item \texttt{useosf} 选项用来启用“旧式”数字。
        \end{itemize}
    \item \texttt{nothms}、\texttt{nothmnum}、\texttt{regionalref}
        \begin{itemize}
            \item 来自用于设置定理类环境的组件 \PJLthm{} 的选项,详细信息请参阅有关这一宏包的小节。
        \end{itemize}
    \item \texttt{author}
        \begin{itemize}
            \item 加载用于增强作者信息块的组件 \PJLauthor{}。关于其详细功能,请参阅有关该宏包的小节。
        \end{itemize}
    \item \texttt{amsfashion}
        \begin{itemize}
            \item 允许 \AmS{} 文档类的写法。此时 \texttt{author} 选项会被自动开启。
        \end{itemize}
\end{itemize}
另外,还有一些组件的参数可以作为文档类的全局参数传递,例如 \texttt{EN} / \texttt{english} / \texttt{English}、\texttt{CN} / \texttt{chinese} / \texttt{Chinese} 等语言选项 (来自 \PJLlang{}),\texttt{paperstyle} 和 \texttt{preview} 等纸张选项 (来自 \PJLpaper{})。详细信息可以参阅对应的小节。

\clearpage

\section{具体组件}

\subsection{PJLauthor:增强的作者信息块}

\PJLauthor{} 提供了 \lstinline|\address|、\lstinline|\curraddr|、\lstinline|\email| 命令,并且允许输入多组用户信息。标准的输入方式是这样的:
\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}
其中 \lstinline|\address|、\lstinline|\curraddr|、\lstinline|\email| 的相互顺序是不重要的。

\medskip
另外,你可以通过选项 \texttt{amsfashion} 以使用 \AmS{} 方式写作。具体来说,效果为:
\begin{itemize}
    \item 提供 \lstinline|\dedicatory|、\lstinline|\keywords| 及 \lstinline|\subjclass| 命令
    \item \lstinline|\thanks| 可以写在 \lstinline|\author| 之外
    \item \lstinline|abstract| 环境可以放在 \lstinline|\maketitle| 的前面
\end{itemize}

\begin{tip}[注意]
    这些功能只在标准文档类中启用。在 \AmS{} 文档类中,\PJLauthor{} 不会起到任何效果。
\end{tip}

\subsection{PJLdate:智能日期处理}

\PJLdatePackage{} 提供了 \lstinline|\PLdate|\meta{yyyy-mm-dd} (或 \lstinline|\PJLdate|\meta{yyyy-mm-dd}) 命令,以将 \meta{yyyy-mm-dd} 转换为当前语言的日期格式显示。例如,在当前的中文语境下,\lstinline|\PLdate{2022-04-01}| 会被显示为“\PJLdate{2022-04-01}”,而在英文语境下则会被显示为“\UseOtherLanguage{English}{\PJLdate{2022-04-01}}”。

关于如何选定语言,请参阅关于 \PJLlang{} 的小节。

\subsection{PJLdraft:未完成标记}

\PJLdraft{} 提供了下列命令:
\begin{itemize}\setstretch{1.15}
    \item \lstinline|\dnf| 或 \lstinline|\dnf<...>|。效果为:\dnf~或 \dnf<...>。\\其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\dnf}。
    \item \lstinline|\needgraph| 或 \lstinline|\needgraph<...>|。效果为:\needgraph~或 \needgraph<...>其提示文字与当前语言相对应,例如,在法语模式下将会显示为 \UseOtherLanguage{French}{\needgraph}
\end{itemize}

关于如何选定语言,请参阅关于 \PJLlang{} 的小节。

\subsection{PJLlang:多语言支持}

\PJLlang{} 提供了多语言支持,包括简体中文、繁体中文、英文、法文、德文、日文、俄文 (其中中文、日文、俄文需要相应的 \TeX{} 引擎与字体支持)。

\medskip
\PJLlang{} 提供语言选项,这些选项的名称有三种,分别是缩写(如 \texttt{EN})、小写(如 \texttt{english})、首字母大写(如 \texttt{English})。具体的选项名称可以参见下文的 \meta{language name}。其中,第一个指定的语言 \meta{first language} 会被作为默认语言,相当于在文档开头指定 \lstinline|\UseLanguage{|\meta{first language}\lstinline|}|。

\begin{tip}
    为了提高编译速度,建议使用语言选项,并将其作为全局参数传递。这样,只会对指定语言进行设置,节省了 \TeX{} 内存,从而能显著提高编译速度。
\end{tip}

\medskip
在文档中,可以通过下列命令来选定语言:
\begin{itemize}
    \item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}|,用于指定语言,在其后将使用对应的语言设定。
    \begin{itemize}
        \item 既可以用于导言部分,也可以用于正文部分。在不指定语言时,默认选定 “English”。
    \end{itemize}
    \item \lstinline|\UseOtherLanguage{|\meta{language name}\lstinline|}{|\meta{content}\lstinline|}|,用指定的语言的设定排版 \meta{content}。
    \begin{itemize}
        \item 相比较 \lstinline|\UseLanguage|,它不会对行距进行修改,因此中西文字混排时能够保持行距稳定。
    \end{itemize}
\end{itemize}

\medskip
\meta{language name} 有下列选择 (不区分大小写,如 \texttt{French} 或 \texttt{french} 均可):
\begin{itemize}\setstretch{1.15}
    \item 简体中文:\texttt{CN}、\texttt{Chinese}、\texttt{SChinese} 或 \texttt{SimplifiedChinese}
    \item 繁体中文:\texttt{TC}、\texttt{TChinese} 或 \texttt{TraditionalChinese}
    \item 英语:\texttt{EN} 或 \texttt{English}
    \item 法语:\texttt{FR} 或 \texttt{French}
    \item 德语:\texttt{DE}、\texttt{German} 或 \texttt{ngerman}
    \item 意大利语:\texttt{IT} 或 \texttt{Italian}
    \item 葡萄牙语:\texttt{PT} 或 \texttt{Portuguese}
    \item 巴西葡萄牙语:\texttt{BR} 或 \texttt{Brazilian}
    \item 西班牙语:\texttt{ES} 或 \texttt{Spanish}
    \item 日语:\texttt{JP} 或 \texttt{Japanese}
    \item 俄语:\texttt{RU} 或 \texttt{Russian}
\end{itemize}

\medskip
另外,还可以通过下面的方式来填加相应语言的设置:
\begin{itemize}
    \item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}|
    \begin{itemize}
        \item 向所有支持的语言增加设置 \meta{settings}。
    \end{itemize}
    \item \lstinline|\AddLanguageSetting(|\meta{language name}\lstinline|){|\meta{settings}\lstinline|}|
    \begin{itemize}
        \item 向指定的语言 \meta{language name} 增加设置 \meta{settings}。
    \end{itemize}
\end{itemize}
例如,\lstinline|\AddLanguageSetting(German){\color{orange}}| 可以让所有德语以橙色显示(当然,还需要再加上 \lstinline|\AddLanguageSetting{\color{black}}| 来修正其他语言的颜色)。

\clearpage
\subsection{PJLlogo:\texorpdfstring{\ProjLib{} 图标}{ProjLib 图标}}

\PJLlogo{} 提供了 \lstinline|\ProjLib| 命令用于绘制 Logo,效果为:\ProjLib{}。它与普通的文字指令效果类似,可以用于不同的字号:

\vspace{-0.5\baselineskip}
\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}

\subsection{PJLmath:数学符号与捷径}

\PJLmath{} 提供下列捷径:
\begin{enumerate}[label=\roman*)]
    \item \lstinline|\mathfrak{|$\cdot$\lstinline|}| $\longrightarrow$ \lstinline|\mf|$\cdot$ 或 \lstinline|\frak|$\cdot$。例如,\lstinline|\mfA| (或 \lstinline|\mf{A}|) 与 \lstinline|\mathfrak{A}| 效果相同. 这对大写、小写字母都有效:\vspace{-\baselineskip}
    \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$。这只针对大写字母或数字 \( 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*}
    对于常见的代数结构有这些特殊命令:\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$ 或 \lstinline|\cal|$\cdot$。这只针对大写字母。
    \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$ 或 \lstinline|\scr|$\cdot$。这只针对大写字母。
    \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}

另外,\PJLmath{} 还提供了一些 \LaTeX 中未自带的符号。

\begin{longtable}[l]{ p{4cm} p{6cm} p{6cm} }
\lstinline|\abs| & \lstinline|\abs{a}| $\rightarrow \abs{a}$ & 绝对值符号 \\
\lstinline|\norm| & \lstinline|\norm{a}| $\rightarrow \norm{a}$ & 范数符号 \\
\lstinline|\injection| & \lstinline|\injection| $\rightarrow ~\injection$ & 表示单射的箭头符号 \\
\lstinline|\surjection| & \lstinline|\surjection| $\rightarrow ~\surjection$ & 表示满射的箭头符号 \\
\lstinline|\bijection| & \lstinline|\bijection| $\rightarrow ~\bijection$ & 表示双射的箭头符号 \\
\end{longtable}

\clearpage
\subsection{PJLpaper:纸张设置}

\PJLpaper{} 主要用于调节纸张颜色。它支持下列选项:

\begin{itemize}
    \item \texttt{paperstyle = \meta{paper style name}}
        \begin{itemize}
            \item 设定纸张色彩样式。\meta{paper style name} 可供选择的选项有:\texttt{yellow}、\texttt{dark} 与 \texttt{nord}。
        \end{itemize}
    \item \texttt{yellowpaper}、\texttt{darkpaper}、\texttt{nordpaper}
        \begin{itemize}
            \item 设定纸张色彩样式。效果与相应名称的 \texttt{paperstyle} 相同。
        \end{itemize}
    \item \texttt{preview}
        \begin{itemize}
            \item 预览模式,将会把 pdf 文件的白边去掉以方便阅读。
        \end{itemize}
\end{itemize}

为了使用的方便,建议把这些选项作为文档类的全局参数,这样对于文档的纸张设定一目了然。

\subsection{PJLthm:带有智能引用与多语言支持的定理类环境}

\PJLthm{} 提供定理类环境的设置。它支持下列选项:
\begin{itemize}
    \item \texttt{nothms}
    \begin{itemize}
        \item 不设定定理类环境。如果你希望使用自己的定理样式,可以使用这一选项。
    \end{itemize}
    \item \texttt{nothmnum}
    \begin{itemize}
        \item 使定理类环境均不编号。
    \end{itemize}
    \item \texttt{regionalref}
    \begin{itemize}
        \item 在智能引用时,定理类环境的名称随当前语言而变化(默认情况下,引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem)。在 \texttt{fast} 模式下,这一选项默认启用。
    \end{itemize}
\end{itemize}

预设的定理类环境包括:\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},以及相应带有星号 \lstinline|*| 的无编号版本。它们在显示时会依据当前语言而变化,例如在中文语境下 \texttt{theorem} 会显示为“定理”,而在英文语境下则会显示为“Theorem”。关于如何选定语言,请参阅关于 \PJLlang{} 的小节。

\begin{tip}
    在引用定理类环境时,建议使用智能引用 \lstinline|\cref{|\meta{label}\lstinline|}|。这样就不必每次都写上相应环境的名称了。
\end{tip}

\medskip

若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称:
\vspace{-.15\baselineskip}%
\begin{itemize}
    \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
\end{itemize}
\vspace{-.15\baselineskip}%
其中,\meta{language name} 可参阅关于 \PJLlang{} 的小节。当不指定 \meta{language name}时,则会将该名称设置为所有支持语言下的名称。另外,带星号与不带星号的同名环境共用一个名称,因此 \lstinline|\NameTheorem{envname*}{...}| 与 \lstinline|\NameTheorem{envname}{...}| 效果相同。

\clearpage
然后用下面五种方式之一定义这一环境:
\begin{itemize}
    \item \lstinline|\CreateTheorem*{|\meta{name of environment}\lstinline|}|
        \begin{itemize}
            \item 定义不编号的环境 \meta{name of environment}
        \end{itemize}
    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}|
        \begin{itemize}
            \item 定义编号环境 \meta{name of environment},按顺序编号
        \end{itemize}
    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}[|\meta{numbered like}\lstinline|]|
        \begin{itemize}
            \item 定义编号环境 \meta{name of environment},与 \meta{numbered like} 计数器共用编号
        \end{itemize}
    \item \lstinline|\CreateTheorem{|\meta{name of environment}\lstinline|}<|\meta{numbered within}\lstinline|>|
        \begin{itemize}
            \item 定义编号环境 \meta{name of environment},在 \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 将 \meta{name of environment} 与 \meta{existed environment} 或 \meta{existed environment}\lstinline|*| 等同。
            \item 这种方式通常在两种情况下比较有用:
                \begin{enumerate}
                    \item 希望定义更简洁的名称。例如,使用 \lstinline|\CreateTheorem{thm}(theorem)|,便可以直接用名称 \texttt{thm} 来撰写定理。
                    \item 希望去除某些环境的编号。例如,使用 \lstinline|\CreateTheorem{remark}(remark*)|,便可以去除 \texttt{remark} 环境的编号。
                \end{enumerate}
        \end{itemize}
\end{itemize}

\begin{tip}
    其内部使用了 \textsf{amsthm},因此传统的 \texttt{theoremstyle} 对其也是适用的,只需在相关定义前标明即可。
\end{tip}

\NameTheorem[CN]{proofidea}{思路}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<subsection>

\bigskip
下面提供一个例子。这三行代码:
\begin{code}
  \NameTheorem[CN]{proofidea}{思路}
  \CreateTheorem*{proofidea*}
  \CreateTheorem{proofidea}<subsection>
\end{code}
可以分别定义不编号的环境 \lstinline|proofidea*| 和编号的环境 \lstinline|proofidea| (在 subsection 内编号),它们支持在简体中文语境中使用,效果如下所示 (具体样式与所在的文档类有关) :

\begin{proofidea*}
    \lstinline|proofidea*| 环境。
\end{proofidea*}

\begin{proofidea}
    \lstinline|proofidea| 环境。
\end{proofidea}

\clearpage

\section{目前存在的问题}

\begin{itemize}[itemsep=.6em]
    \item \PJLauthor{} 仍然处于初步阶段,在很多方面还远远比不上相对成熟的 \textsf{authblk}。
    \item \PJLlang{}:针对 \textsf{polyglossia} 的设置仍然存在许多问题,因此现在主要功能都是通过 \textsf{babel} 实现的。
    \item \PJLpaper{} 的 \texttt{preview} 功能主要是通过 \textsf{geometry} 宏包实现的,因此在 \textsc{\textsf{Koma}} 文档类中效果不好。
    \item \PJLthm{} 对于定理类环境的编号与样式设定目前还无法由用户更改。
    \item \PJLthm{}:智能引用针对所有 \PJLlang{} 已支持语言的本地化尚不完整,主要是中文、日文与俄文。
    \item 错误处理功能不完善,在出现一些问题时没有相应的错误提示。
    \item 代码中仍有许多可优化之处,有些部分耗时过长,特别是 \PJLthm{} 对定理类环境的定义。
\end{itemize}

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