diff options
author | Karl Berry <karl@freefriends.org> | 2021-05-19 20:01:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-05-19 20:01:31 +0000 |
commit | 7ab648a536bdf717c5cdd8b1a4914cb3c4b4cee4 (patch) | |
tree | 9d0d8e4fdae6586557b5a9d72b0942ec9d7b0818 /Master/texmf-dist/doc | |
parent | cc53a2c30201f9ac5454b948e94340a692aa3ebe (diff) |
projlib (19may21)
git-svn-id: svn://tug.org/texlive/trunk@59271 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/projlib/LICENSE | 416 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.pdf | bin | 0 -> 222025 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.tex | 452 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.pdf | bin | 0 -> 145010 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.tex | 450 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/projlib/README.md | 81 |
6 files changed, 1399 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/projlib/LICENSE b/Master/texmf-dist/doc/latex/projlib/LICENSE new file mode 100644 index 00000000000..22443139013 --- /dev/null +++ b/Master/texmf-dist/doc/latex/projlib/LICENSE @@ -0,0 +1,416 @@ +The LaTeX Project Public License +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- + +LPPL Version 1.3c 2008-05-04 + +Copyright 1999 2002-2008 LaTeX3 Project + Everyone is allowed to distribute verbatim copies of this + license document, but modification of it is not allowed. + + +PREAMBLE +======== + +The LaTeX Project Public License (LPPL) is the primary license under +which the LaTeX kernel and the base LaTeX packages are distributed. + +You may use this license for any work of which you hold the copyright +and which you wish to distribute. This license may be particularly +suitable if your work is TeX-related (such as a LaTeX package), but +it is written in such a way that you can use it even if your work is +unrelated to TeX. + +The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', +below, gives instructions, examples, and recommendations for authors +who are considering distributing their works under this license. + +This license gives conditions under which a work may be distributed +and modified, as well as conditions under which modified versions of +that work may be distributed. + +We, the LaTeX3 Project, believe that the conditions below give you +the freedom to make and distribute modified versions of your work +that conform with whatever technical specifications you wish while +maintaining the availability, integrity, and reliability of +that work. If you do not see how to achieve your goal while +meeting these conditions, then read the document `cfgguide.tex' +and `modguide.tex' in the base LaTeX distribution for suggestions. + + +DEFINITIONS +=========== + +In this license document the following terms are used: + + `Work' + Any work being distributed under this License. + + `Derived Work' + Any work that under any applicable law is derived from the Work. + + `Modification' + Any procedure that produces a Derived Work under any applicable + law -- for example, the production of a file containing an + original file associated with the Work or a significant portion of + such a file, either verbatim or with modifications and/or + translated into another language. + + `Modify' + To apply any procedure that produces a Derived Work under any + applicable law. + + `Distribution' + Making copies of the Work available from one person to another, in + whole or in part. Distribution includes (but is not limited to) + making any electronic components of the Work accessible by + file transfer protocols such as FTP or HTTP or by shared file + systems such as Sun's Network File System (NFS). + + `Compiled Work' + A version of the Work that has been processed into a form where it + is directly usable on a computer system. This processing may + include using installation facilities provided by the Work, + transformations of the Work, copying of components of the Work, or + other activities. Note that modification of any installation + facilities provided by the Work constitutes modification of the Work. + + `Current Maintainer' + A person or persons nominated as such within the Work. If there is + no such explicit nomination then it is the `Copyright Holder' under + any applicable law. + + `Base Interpreter' + A program or process that is normally needed for running or + interpreting a part or the whole of the Work. + + A Base Interpreter may depend on external components but these + are not considered part of the Base Interpreter provided that each + external component clearly identifies itself whenever it is used + interactively. Unless explicitly specified when applying the + license to the Work, the only applicable Base Interpreter is a + `LaTeX-Format' or in the case of files belonging to the + `LaTeX-format' a program implementing the `TeX language'. + + + +CONDITIONS ON DISTRIBUTION AND MODIFICATION +=========================================== + +1. Activities other than distribution and/or modification of the Work +are not covered by this license; they are outside its scope. In +particular, the act of running the Work is not restricted and no +requirements are made concerning any offers of support for the Work. + +2. You may distribute a complete, unmodified copy of the Work as you +received it. Distribution of only part of the Work is considered +modification of the Work, and no right to distribute such a Derived +Work may be assumed under the terms of this clause. + +3. You may distribute a Compiled Work that has been generated from a +complete, unmodified copy of the Work as distributed under Clause 2 +above, as long as that Compiled Work is distributed in such a way that +the recipients may install the Compiled Work on their system exactly +as it would have been installed if they generated a Compiled Work +directly from the Work. + +4. If you are the Current Maintainer of the Work, you may, without +restriction, modify the Work, thus creating a Derived Work. You may +also distribute the Derived Work without restriction, including +Compiled Works generated from the Derived Work. Derived Works +distributed in this manner by the Current Maintainer are considered to +be updated versions of the Work. + +5. If you are not the Current Maintainer of the Work, you may modify +your copy of the Work, thus creating a Derived Work based on the Work, +and compile this Derived Work, thus creating a Compiled Work based on +the Derived Work. + +6. If you are not the Current Maintainer of the Work, you may +distribute a Derived Work provided the following conditions are met +for every component of the Work unless that component clearly states +in the copyright notice that it is exempt from that condition. Only +the Current Maintainer is allowed to add such statements of exemption +to a component of the Work. + + a. If a component of this Derived Work can be a direct replacement + for a component of the Work when that component is used with the + Base Interpreter, then, wherever this component of the Work + identifies itself to the user when used interactively with that + Base Interpreter, the replacement component of this Derived Work + clearly and unambiguously identifies itself as a modified version + of this component to the user when used interactively with that + Base Interpreter. + + b. Every component of the Derived Work contains prominent notices + detailing the nature of the changes to that component, or a + prominent reference to another file that is distributed as part + of the Derived Work and that contains a complete and accurate log + of the changes. + + c. No information in the Derived Work implies that any persons, + including (but not limited to) the authors of the original version + of the Work, provide any support, including (but not limited to) + the reporting and handling of errors, to recipients of the + Derived Work unless those persons have stated explicitly that + they do provide such support for the Derived Work. + + d. You distribute at least one of the following with the Derived Work: + + 1. A complete, unmodified copy of the Work; + if your distribution of a modified component is made by + offering access to copy the modified component from a + designated place, then offering equivalent access to copy + the Work from the same or some similar place meets this + condition, even though third parties are not compelled to + copy the Work along with the modified component; + + 2. Information that is sufficient to obtain a complete, + unmodified copy of the Work. + +7. If you are not the Current Maintainer of the Work, you may +distribute a Compiled Work generated from a Derived Work, as long as +the Derived Work is distributed to all recipients of the Compiled +Work, and as long as the conditions of Clause 6, above, are met with +regard to the Derived Work. + +8. The conditions above are not intended to prohibit, and hence do not +apply to, the modification, by any method, of any component so that it +becomes identical to an updated version of that component of the Work as +it is distributed by the Current Maintainer under Clause 4, above. + +9. Distribution of the Work or any Derived Work in an alternative +format, where the Work or that Derived Work (in whole or in part) is +then produced by applying some process to that format, does not relax or +nullify any sections of this license as they pertain to the results of +applying that process. + +10. a. A Derived Work may be distributed under a different license + provided that license itself honors the conditions listed in + Clause 6 above, in regard to the Work, though it does not have + to honor the rest of the conditions in this license. + + b. If a Derived Work is distributed under a different license, that + Derived Work must provide sufficient documentation as part of + itself to allow each recipient of that Derived Work to honor the + restrictions in Clause 6 above, concerning changes from the Work. + +11. This license places no restrictions on works that are unrelated to +the Work, nor does this license place any restrictions on aggregating +such works with the Work by any means. + +12. Nothing in this license is intended to, or may be used to, prevent +complete compliance by all parties with all applicable laws. + + +NO WARRANTY +=========== + +There is no warranty for the Work. Except when otherwise stated in +writing, the Copyright Holder provides the Work `as is', without +warranty of any kind, either expressed or implied, including, but not +limited to, the implied warranties of merchantability and fitness for a +particular purpose. The entire risk as to the quality and performance +of the Work is with you. Should the Work prove defective, you assume +the cost of all necessary servicing, repair, or correction. + +In no event unless required by applicable law or agreed to in writing +will The Copyright Holder, or any author named in the components of the +Work, or any other party who may distribute and/or modify the Work as +permitted above, be liable to you for damages, including any general, +special, incidental or consequential damages arising out of any use of +the Work or out of inability to use the Work (including, but not limited +to, loss of data, data being rendered inaccurate, or losses sustained by +anyone as a result of any failure of the Work to operate with any other +programs), even if the Copyright Holder or said author or said other +party has been advised of the possibility of such damages. + + +MAINTENANCE OF THE WORK +======================= + +The Work has the status `author-maintained' if the Copyright Holder +explicitly and prominently states near the primary copyright notice in +the Work that the Work can only be maintained by the Copyright Holder +or simply that it is `author-maintained'. + +The Work has the status `maintained' if there is a Current Maintainer +who has indicated in the Work that they are willing to receive error +reports for the Work (for example, by supplying a valid e-mail +address). It is not required for the Current Maintainer to acknowledge +or act upon these error reports. + +The Work changes from status `maintained' to `unmaintained' if there +is no Current Maintainer, or the person stated to be Current +Maintainer of the work cannot be reached through the indicated means +of communication for a period of six months, and there are no other +significant signs of active maintenance. + +You can become the Current Maintainer of the Work by agreement with +any existing Current Maintainer to take over this role. + +If the Work is unmaintained, you can become the Current Maintainer of +the Work through the following steps: + + 1. Make a reasonable attempt to trace the Current Maintainer (and + the Copyright Holder, if the two differ) through the means of + an Internet or similar search. + + 2. If this search is successful, then enquire whether the Work + is still maintained. + + a. If it is being maintained, then ask the Current Maintainer + to update their communication data within one month. + + b. If the search is unsuccessful or no action to resume active + maintenance is taken by the Current Maintainer, then announce + within the pertinent community your intention to take over + maintenance. (If the Work is a LaTeX work, this could be + done, for example, by posting to comp.text.tex.) + + 3a. If the Current Maintainer is reachable and agrees to pass + maintenance of the Work to you, then this takes effect + immediately upon announcement. + + b. If the Current Maintainer is not reachable and the Copyright + Holder agrees that maintenance of the Work be passed to you, + then this takes effect immediately upon announcement. + + 4. If you make an `intention announcement' as described in 2b. above + and after three months your intention is challenged neither by + the Current Maintainer nor by the Copyright Holder nor by other + people, then you may arrange for the Work to be changed so as + to name you as the (new) Current Maintainer. + + 5. If the previously unreachable Current Maintainer becomes + reachable once more within three months of a change completed + under the terms of 3b) or 4), then that Current Maintainer must + become or remain the Current Maintainer upon request provided + they then update their communication data within one month. + +A change in the Current Maintainer does not, of itself, alter the fact +that the Work is distributed under the LPPL license. + +If you become the Current Maintainer of the Work, you should +immediately provide, within the Work, a prominent and unambiguous +statement of your status as Current Maintainer. You should also +announce your new status to the same pertinent community as +in 2b) above. + + +WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE +====================================================== + +This section contains important instructions, examples, and +recommendations for authors who are considering distributing their +works under this license. These authors are addressed as `you' in +this section. + +Choosing This License or Another License +---------------------------------------- + +If for any part of your work you want or need to use *distribution* +conditions that differ significantly from those in this license, then +do not refer to this license anywhere in your work but, instead, +distribute your work under a different license. You may use the text +of this license as a model for your own license, but your license +should not refer to the LPPL or otherwise give the impression that +your work is distributed under the LPPL. + +The document `modguide.tex' in the base LaTeX distribution explains +the motivation behind the conditions of this license. It explains, +for example, why distributing LaTeX under the GNU General Public +License (GPL) was considered inappropriate. Even if your work is +unrelated to LaTeX, the discussion in `modguide.tex' may still be +relevant, and authors intending to distribute their works under any +license are encouraged to read it. + +A Recommendation on Modification Without Distribution +----------------------------------------------------- + +It is wise never to modify a component of the Work, even for your own +personal use, without also meeting the above conditions for +distributing the modified component. While you might intend that such +modifications will never be distributed, often this will happen by +accident -- you may forget that you have modified that component; or +it may not occur to you when allowing others to access the modified +version that you are thus distributing it and violating the conditions +of this license in ways that could have legal implications and, worse, +cause problems for the community. It is therefore usually in your +best interest to keep your copy of the Work identical with the public +one. Many works provide ways to control the behavior of that work +without altering any of its licensed components. + +How to Use This License +----------------------- + +To use this license, place in each of the components of your work both +an explicit copyright notice including your name and the year the work +was authored and/or last substantially modified. Include also a +statement that the distribution and/or modification of that +component is constrained by the conditions in this license. + +Here is an example of such a notice and statement: + + %% pig.dtx + %% Copyright 2005 M. Y. Name + % + % This work may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.3 + % of this license or (at your option) any later version. + % The latest version of this license is in + % http://www.latex-project.org/lppl.txt + % and version 1.3 or later is part of all distributions of LaTeX + % version 2005/12/01 or later. + % + % This work has the LPPL maintenance status `maintained'. + % + % The Current Maintainer of this work is M. Y. Name. + % + % This work consists of the files pig.dtx and pig.ins + % and the derived file pig.sty. + +Given such a notice and statement in a file, the conditions +given in this license document would apply, with the `Work' referring +to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being +generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' +referring to any `LaTeX-Format', and both `Copyright Holder' and +`Current Maintainer' referring to the person `M. Y. Name'. + +If you do not want the Maintenance section of LPPL to apply to your +Work, change `maintained' above into `author-maintained'. +However, we recommend that you use `maintained', as the Maintenance +section was added in order to ensure that your Work remains useful to +the community even when you can no longer maintain and support it +yourself. + +Derived Works That Are Not Replacements +--------------------------------------- + +Several clauses of the LPPL specify means to provide reliability and +stability for the user community. They therefore concern themselves +with the case that a Derived Work is intended to be used as a +(compatible or incompatible) replacement of the original Work. If +this is not the case (e.g., if a few lines of code are reused for a +completely different task), then clauses 6b and 6d shall not apply. + + +Important Recommendations +------------------------- + + Defining What Constitutes the Work + + The LPPL requires that distributions of the Work contain all the + files of the Work. It is therefore important that you provide a + way for the licensee to determine which files constitute the Work. + This could, for example, be achieved by explicitly listing all the + files of the Work near the copyright notice of each file or by + using a line such as: + + % This work consists of all files listed in manifest.txt. + + in that place. In the absence of an unequivocal list it might be + impossible for the licensee to determine what is considered by you + to comprise the Work and, in such a case, the licensee would be + entitled to make reasonable conjectures as to which files comprise + the Work. + diff --git a/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.pdf b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.pdf Binary files differnew file mode 100644 index 00000000000..760b4b99c8c --- /dev/null +++ b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.pdf diff --git a/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.tex b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.tex new file mode 100644 index 00000000000..dfbedaf7269 --- /dev/null +++ b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-cn.tex @@ -0,0 +1,452 @@ +%! TEX program = xelatex +\documentclass[allowbf]{lebhart} + +%%================================ +%% 引入工具集 +%%================================ +\usepackage{PJLtoolkit} +\usepackage{longtable} % breakable tables +\usepackage{hologo} % more TeX logo + +\UseLanguage{Chinese} + +%%================================ +%% 排版代码 +%%================================ +\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,CreateTheorem,proofideanameCN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PJLdate,ProjLib + } +} +\lstnewenvironment{code}% +{\setkeys{lst}{columns=fullflexible,keepspaces=true}}{} + +%%================================ +%% remind +%%================================ +\newenvironment{remind}[1][提示]{% + \begin{tcolorbox}[breakable, + enhanced, + width = \textwidth, + colback = white, colbacktitle = paper, + colframe = gray!50, boxrule=0.2mm, + coltitle = black, + fonttitle = \sffamily, + attach boxed title to top left = {yshift=-\tcboxedtitleheight/2, xshift=\tcboxedtitlewidth/4}, + boxed title style = {boxrule=0pt, colframe=paper}, + before skip = 0.3cm, + after skip = 0.3cm, + top = 3mm, + bottom = 3mm, + title={\sffamily #1}]% +}{\end{tcolorbox}} + +%%================================ +%% 名称 +%%================================ +\providecommand{\PJLtoolkit}{\textsf{PJLtoolkit}} +\providecommand{\PJLamssim}{\textsf{PJLamssim}} +\providecommand{\PJLauthor}{\textsf{PJLauthor}} +\providecommand{\PJLdatestr}{\textsf{PJLdate}} +\providecommand{\PJLdraft}{\textsf{PJLdraft}} +\providecommand{\PJLlang}{\textsf{PJLlang}} +\providecommand{\PJLlogo}{\textsf{PJLlogo}} +\providecommand{\PJLpaper}{\textsf{PJLpaper}} +\providecommand{\PJLthm}{\textsf{PJLthm}} + +%%================================ +%% 正文 +%%================================ +\begin{document} + +\title{\ProjLib{} 工具集\\[.3\baselineskip]\normalsize 使用指南} +\author{许锦文} +\thanks{对应版本.~~\texttt{\ProjLib{}~2021/05/19}} +\date{2021年5月,北京} + +\maketitle + +\begin{abstract} + \ProjLib{} 工具集之设计目的为简化 \LaTeX{} 文档撰写前的准备工作。只需要加载 \PJLtoolkit{},多语言设置就已准备就绪,定理类环境已被设置好可供直接使用,并且引入了一系列辅助功能。 +\end{abstract} + +% \tableofcontents + +\section{PJLtoolkit} + +\subsection{如何加载} + +只需要在导言部分加入这一行即可: + +\begin{code} + \usepackage{PJLtoolkit} +\end{code} + +\begin{remind}[注意事项] + 由于其内部使用了 \textsf{cleveref},\PJLtoolkit{} 需要放在 \textsf{varioref}、\textsf{hyperref} 的后面。 +\end{remind} +\medskip + +\subsection{选项} + +\PJLtoolkit{} 提供下列选项以供选择: +\begin{itemize} + \item \texttt{draft} 或 \texttt{fast} + \begin{itemize} + \item 快速模式。功能会适当缩减,但能够提高编译速度,建议在撰写阶段使用。 + \end{itemize} + \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{biolinum} + \begin{itemize} + \item 字体选项。顾名思义,会加载相应名称的字体。 + \end{itemize} + \item \texttt{author} + \begin{itemize} + \item 加载 \PJLauthor{}。关于其详细功能,请参阅有关这一宏包的小节。 + \end{itemize} + \item \texttt{amssim} + \begin{itemize} + \item 加载 \PJLamssim{}。关于其详细功能,请参阅有关这一宏包的小节。 + \end{itemize} + \item \texttt{nothms} + \begin{itemize} + \item 不设定定理类环境。如果你希望使用自己的定理样式,可以使用这一选项。 + \end{itemize} +\end{itemize} +另外,还有一些组件的参数可以作为文档类的全局参数传递,例如 \PJLpaper{} 的 \texttt{paperstyle} 和 \texttt{preview} 等。详细信息可以参阅对应的小节。 + +\section{具体组件} + +\subsection{PJLamssim} + +\PJLamssim{} 用于模拟 \textsf{amsart} 文档类的部分功能,包括: +\begin{itemize} + \item \lstinline|\address|、\lstinline|\curraddr|、\lstinline|\email|、\lstinline|\dedicatory| 命令 (前三者由 \PJLauthor{} 提供) + \item \lstinline|\keywords| 命令 + \item \lstinline|\subjclass| 命令 + \item \lstinline|\thanks| 可以写在 \lstinline|\author| 之外 + \item \lstinline|abstract| 环境可以放在 \lstinline|\maketitle| 的前面 +\end{itemize} + +这些功能只在标准文档类中启用。在 \AmS{} 文档类中,\PJLamssim{} 不会起到任何效果。 + +\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| 的相互顺序是不重要的。 + +\subsection{PJLdate} + +\PJLdatestr{} 提供了 \lstinline|\PJLdate|\meta{yyyy-mm-dd} 命令,以将 \meta{yyyy-mm-dd} 转换为对应语言的日期格式显示。例如,在当前的中文语境下,\lstinline|\PJLdate{2022-04-01}| 会被显示为:\PJLdate{2022-04-01}。 + +关于如何选定语言,请参阅关于 \PJLlang{} 的小节。 + +\subsection{PJLdraft} + +\PJLdraft{} 提供了下列命令: +\begin{itemize} + \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{} 引擎与字体支持)。可以通过下列命令来选定语言: +\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} + +\meta{language name} 有下列选择: +\begin{itemize} + \item 简体中文:\texttt{Chinese}、\texttt{chinese}、\texttt{SChinese}、\texttt{schinese}、\texttt{SimplifiedChinese} 或 \texttt{simplifiedchinese} + \item 繁体中文:\texttt{TChinese}、\texttt{tchinese}、\texttt{TraditionalChinese} 或 \texttt{traditionalchinese} + \item 英文:\texttt{English} 或 \texttt{english} + \item 法文:\texttt{French} 或 \texttt{french} + \item 德文:\texttt{German}、\texttt{german} 或 \texttt{ngerman} + \item 日文:\texttt{Japanese} 或 \texttt{japanese} + \item 俄文:\texttt{Russian} 或 \texttt{russian} +\end{itemize} + +另外,还可以通过下面的方式来填加相应语言的设置: +\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}}| 来修正其他语言的颜色)。 + + +\subsection{PJLlogo} + +\PJLlogo{} 提供了 \lstinline|\ProjLib| 命令用于绘制 Logo,效果为:\ProjLib{}。它与普通的文字指令效果类似,可以用于不同的字号: +% \begin{itemize} +% \item \lstinline|\tiny|:\quad {\tiny\ProjLib} +% \item \lstinline|\scriptsize|:\quad {\scriptsize\ProjLib} +% \item \lstinline|\footnotesize|:\quad {\footnotesize\ProjLib} +% \item \lstinline|\normalsize|:\quad {\normalsize\ProjLib} +% \item \lstinline|\large|:\quad {\large\ProjLib} +% \item \lstinline|\Large|:\quad {\Large\ProjLib} +% \item \lstinline|\LARGE|:\quad {\LARGE\ProjLib} +% \item \lstinline|\huge|:\quad {\huge\ProjLib} +% \item \lstinline|\Huge|:\quad {\Huge\ProjLib} +% \end{itemize} +% \vspace{-0.5\baselineskip} +\begin{longtable}{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{longtable} + +\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} +\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{problem}、\texttt{property}、\texttt{proposition}、\texttt{question}、\texttt{remark}、\texttt{theorem},以及相应的带有星号 \lstinline|*| 的无编号版本。这些定理类环境在显示时会依据当前语言而相应变化,例如在中文模式下 \texttt{theorem} 会显示为“定理”,而在英文模式下则会显示为“Theorem”。关于如何选定语言,请参阅关于 \PJLlang{} 的小节。 + +在引用定理类环境时,建议使用智能引用 \lstinline|\cref{|\meta{label}\lstinline|}|。这样就不必每次都写上相应环境的名称了。 + +\medskip +若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称 \lstinline|\|\meta{name of environment}\meta{language abbr},其中 \meta{language abbr} 是语言的简写,分别为: +\begin{longtable}{ll|ll} + \texttt{CN} & 简体中文 & \texttt{DE} & 德文\\ + \texttt{TC} & 繁体中文 & \texttt{JP} & 日文\\ + \texttt{EN} & 英文 & \texttt{RU} & 俄文\\ + \texttt{FR} & 法文 & &\\ +\end{longtable} + +\begin{remind} + 如果要定义名称后带有星号 \lstinline|*| 的环境,那么在上面的 \meta{name of environment} 中不用写星号。 +\end{remind} + +然后用下面五种方式之一定义这一环境: +\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{remind} + 其内部使用了 \textsf{amsthm},因此传统的 \texttt{theoremstyle} 对其也是适用的,只需在相关定义前标明即可。 +\end{remind} + +\def\proofideanameCN{思路} +\CreateTheorem*{proofidea*} +\CreateTheorem{proofidea}<subsection> + +\bigskip +下面提供一个例子。这三行代码: +\begin{code} + \def\proofideanameCN{思路} + \CreateTheorem*{proofidea*} + \CreateTheorem{proofidea}<subsection> +\end{code} +可以分别定义不编号的环境 \lstinline|proofidea*| 和编号的环境 \lstinline|proofidea| (在 subsection 内编号),它们支持在简体中文语境中使用,效果如下所示 (具体样式与所在的文档类有关) : + +\begin{proofidea*} + \lstinline|proofidea*| 环境。 +\end{proofidea*} + +\begin{proofidea} + \lstinline|proofidea| 环境。 +\end{proofidea} + + +\bigskip +\section{目前存在的问题} + +\begin{itemize}[itemsep=1em] + \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} + + +\clearpage +\section{使用示例} + +\subsection{标准文档类} + +在标准文档类中,通常只需简要设置页面尺寸、超链接,再载入 \PJLtoolkit{},即可直接开始写作。下面是一段完整的示例。 + +\begin{code} +\documentclass{article} +\usepackage[a4paper,margin=.75in]{geometry} +\usepackage[hidelinks]{hyperref} +\usepackage[palatino]{PJLtoolkit} % Load the toolkit and use font Palatino + +\UseLanguage{French} % Use French from here + +\begin{document} + +\title{Le Titre} +\author{Auteur} +\date{\PJLdate{2022-04-01}} + +\maketitle + +\begin{abstract} + Ceci est un résumé. \dnf<Plus de contenu est nécessaire.> +\end{abstract} + +\section{Un théorème} + +%% Theorem-like environments can be used directly +\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 +如果使用了 \PJLamssim{},那么文章中就可以采用 \AmS{} 文档类的写法 (当然,此时原始的写法也是成立的,因此始终添加 \texttt{amssim} 这一参数通常是没有问题的)。此时上文引入 \PJLtoolkit{} 的那一行应该写为: +\begin{code} +\usepackage[amssim,palatino]{PJLtoolkit} +\end{code} + +\clearpage +\subsection{\texorpdfstring{\AmS{}}{AMS} 文档类} + +在 \AmS{} 文档类中,通常只需简要设置页面尺寸、超链接,再载入 \PJLtoolkit{},即可直接开始写作。下面是一段完整的示例。 +\begin{code} +\documentclass{amsart} +\usepackage[a4paper,margin=.75in]{geometry} +\usepackage[hidelinks]{hyperref} +\usepackage[palatino]{PJLtoolkit} % Load the toolkit and use font Palatino + +\UseLanguage{French} % Use French from here + +\begin{document} + +\title{Le Titre} +\author{Auteur 1} +\address{Adresse 1} +\email{\href{Courriel 1}{Courriel 1}} +\author{Auteur 1} +\address{Adresse 1} +\email{\href{Courriel 2}{Courriel 2}} +\date{\PJLdate{2022-04-01}} +\subjclass{*****} +\keywords{...} + +\begin{abstract} + Ceci est un résumé. \dnf<Plus de contenu est nécessaire.> +\end{abstract} + +\maketitle + +\section{Première section} + +%% Theorem-like environments can be used directly +\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} + + +\end{document} diff --git a/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.pdf b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.pdf Binary files differnew file mode 100644 index 00000000000..9f651971aa8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.pdf diff --git a/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.tex b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.tex new file mode 100644 index 00000000000..82a1aeda3b6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/projlib/ProjLib-doc-en.tex @@ -0,0 +1,450 @@ +%! TEX program = xelatex +\documentclass[allowbf]{lebhart} + +%%================================ +%% Import toolkit +%%================================ +\usepackage{PJLtoolkit} +\usepackage{longtable} % breakable tables +\usepackage{hologo} % more TeX logo + +%%================================ +%% For typestting 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,CreateTheorem,proofideanameEN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PJLdate,ProjLib + } +} +\lstnewenvironment{code}% +{\setkeys{lst}{columns=fullflexible,keepspaces=true}}{} + +%%================================ +%% remind +%%================================ +\newenvironment{remind}[1][Remind]{% + \begin{tcolorbox}[breakable, + enhanced, + width = \textwidth, + colback = white, colbacktitle = paper, + colframe = gray!50, boxrule=0.2mm, + coltitle = black, + fonttitle = \sffamily, + attach boxed title to top left = {yshift=-\tcboxedtitleheight/2, xshift=\tcboxedtitlewidth/4}, + 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}} + +%%================================ +%% 名称 +%%================================ +\providecommand{\PJLtoolkit}{\textsf{PJLtoolkit}} +\providecommand{\PJLamssim}{\textsf{PJLamssim}} +\providecommand{\PJLauthor}{\textsf{PJLauthor}} +\providecommand{\PJLdatestr}{\textsf{PJLdate}} +\providecommand{\PJLdraft}{\textsf{PJLdraft}} +\providecommand{\PJLlang}{\textsf{PJLlang}} +\providecommand{\PJLlogo}{\textsf{PJLlogo}} +\providecommand{\PJLpaper}{\textsf{PJLpaper}} +\providecommand{\PJLthm}{\textsf{PJLthm}} + +%%================================ +%% 正文 +%%================================ +\begin{document} + +\title{\ProjLib{}~~Toolkit\\[.3\baselineskip]\normalsize User Manual} +\author{Jinwen Xu} +\thanks{Corresponding to: \texttt{\ProjLib{}~2021/05/19}} +\date{May 2021, Beijing} + +\maketitle + +\begin{abstract} + The \ProjLib{} toolkit is designed to simplify the preparation before writing \LaTeX{} documents. With \PJLtoolkit{} loaded, you no longer need to set up the theorem-like environments nor configure the appropriate multilingual settings. Additionally, a series of auxiliary functionalities have been introduced. +\end{abstract} + +% \tableofcontents + +\section{PJLtoolkit} + +\subsection{How to load it} + +Just add the following line to your preamble: + +\begin{code} + \usepackage{PJLtoolkit} +\end{code} + +\begin{remind}[Attention] + Since \textsf{cleveref} is used internally, \PJLtoolkit{} needs to be placed after \textsf{varioref} and \textsf{hyperref}. +\end{remind} +\medskip + +\subsection{Options} + +\PJLtoolkit{} offers the following options: +\begin{itemize} + \item \texttt{draft} or \texttt{fast} + \begin{itemize} + \item Fast mode. The functionality is appropriately reduced to get faster compilation speed, recommended to use during the writing phase. + \end{itemize} + \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{biolinum} + \begin{itemize} + \item Font options. As the name suggest, font with corresponding name will be loaded. + \end{itemize} + \item \texttt{author} + \begin{itemize} + \item Load \PJLauthor{}. For more information about its functionality, see the section on this package. + \end{itemize} + \item \texttt{amssim} + \begin{itemize} + \item Load \PJLamssim{}. For more information about its functionality, see the section on this package. + \end{itemize} + \item \texttt{nothms} + \begin{itemize} + \item The theorem-like environments will not be defined. You should use this option if you wish to apply your own theorem styles. + \end{itemize} +\end{itemize} +In addition, there are also some options of the components that can (and should) be passed as global options of the document class, such as \texttt{paperstyle} and \texttt{preview} of \PJLpaper{}. For more information, please refer to the corresponding section. + +\section{The components} + +\subsection{PJLamssim} + +\PJLamssim{} is used to simulate some features of the \textsf{amsart} class in a standard class, including: +\begin{itemize} + \item \lstinline|\address|, \lstinline|\curraddr|, \lstinline|\email| and \lstinline|\dedicatory| macro(the first three are provided by \PJLauthor{}) + \item \lstinline|\keywords| macro + \item \lstinline|\subjclass| macro + \item \lstinline|\thanks| can be written outside \lstinline|\author| + \item The \lstinline|abstract| environment can be placed before \lstinline|\maketitle| +\end{itemize} + +These modifications would only take place in standard classes. In the \AmS{} classes, \PJLamssim{} does not have any effect. + +\subsection{PJLauthor} + +\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. + +\subsection{PJLdate} + +\PJLdatestr{} offers the \lstinline|\PJLdate|\meta{yyyy-mm-dd} macro to convert \meta{yyyy-mm-dd} into the date format of the currently selected language. For example, in current English context, \lstinline|\PJLdate{2022-04-01}| would become: \PJLdate{2022-04-01}. + +For details on how to select a language, please refer to the section on \PJLlang{}. + +\subsection{PJLdraft} + +\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{}. + +\subsection{PJLlang} + +\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). 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 setting 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} + +\meta{language name} can be: +\begin{itemize} + \item Simplified Chinese: \texttt{Chinese}, \texttt{chinese}, \texttt{SChinese}, \texttt{schinese}, \texttt{SimplifiedChinese} or \texttt{simplifiedchinese} + \item Traditional Chinese: \texttt{TChinese}, \texttt{tchinese}, \texttt{TraditionalChinese} or \texttt{traditionalchinese} + \item English: \texttt{English} or \texttt{english} + \item French: \texttt{French} or \texttt{french} + \item German: \texttt{German}, \texttt{german} or \texttt{ngerman} + \item Japanese: \texttt{Japanese} or \texttt{japanese} + \item Russian: \texttt{Russian} 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). + + +\subsection{PJLlogo} + +\PJLlogo{} offers the \lstinline|\ProjLib| macro 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{itemize} +% \item \lstinline|\tiny|:\quad {\tiny\ProjLib} +% \item \lstinline|\scriptsize|:\quad {\scriptsize\ProjLib} +% \item \lstinline|\footnotesize|:\quad {\footnotesize\ProjLib} +% \item \lstinline|\normalsize|:\quad {\normalsize\ProjLib} +% \item \lstinline|\large|:\quad {\large\ProjLib} +% \item \lstinline|\Large|:\quad {\Large\ProjLib} +% \item \lstinline|\LARGE|:\quad {\LARGE\ProjLib} +% \item \lstinline|\huge|:\quad {\huge\ProjLib} +% \item \lstinline|\Huge|:\quad {\Huge\ProjLib} +% \end{itemize} +\bigskip +\begin{longtable}{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{longtable} + +\clearpage +\subsection{PJLpaper} + +\PJLpaper{} is mainly used to adjust the paper color. It has the following options: + +\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 Set the paper color style. The effect is the 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} + +It is recommended to pass these options as global options of the document class. In this way, the paper settings would be clear at a glance. + +\subsection{PJLthm} + +\PJLthm{} offers the configuration of theorem-like environments. It has the following option: +% \vspace{-.3\baselineskip} +\begin{itemize} + \item \texttt{nothms} + \begin{itemize} + \item The theorem-like environments will not be defined. You should use this option if you wish to apply your own theorem styles. + \end{itemize} +\end{itemize} + +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{problem}, \texttt{property}, \texttt{proposition}, \texttt{question}, \texttt{remark}, \texttt{theorem}, and the corresponding unnumbered version with an asterisk \lstinline|*| in the name. The display of these environments will change according to 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{}. + +When referencing a theorem-like environment, it is recommended to use smart reference \lstinline|\cref{|\meta{label}\texttt{\}}. In this way, there is no need to explicitly write down the name of the corresponding environment every time. + +\medskip +If you need to define a new theorem-like environment, you must first define the name of the environment in the language used: \lstinline|\|\meta{name of environment}\meta{language abbr}, where \meta{language abbr} is the abbreviation of language, which can be: +% \vspace{-.5\baselineskip} +\begin{longtable}{ll|ll} + \texttt{CN} & Simplified Chinese & \texttt{DE} & German\\ + \texttt{TC} & Traditional Chinese & \texttt{JP} & Japanese\\ + \texttt{EN} & English & \texttt{RU} & Russian\\ + \texttt{FR} & French & &\\ +\end{longtable} + +\begin{remind} + If you want to define an environment with an asterisk \lstinline|*| after the name, you don't need to write an asterisk in the \meta{name of environment} above. See the example below. +\end{remind} + +\medskip +And then define this environment in one of following five ways: +\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{remind} + It uses \textsf{amsthm} internally, so the traditional \texttt{theoremstyle} is also applicable to it. One only needs declare the style before the relevant definitions. +\end{remind} + +\def\proofideanameEN{Idea} +\CreateTheorem*{proofidea*} +\CreateTheorem{proofidea}<subsection> + +\bigskip +Here is an example. The following code: +\begin{code} + \def\proofideanameEN{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 +\section{Known issues} + +\begin{itemize}[itemsep=.6em] + \item \PJLauthor{} is still in its preliminary stage, and thus its effect is still not as good as the relatively mature \textsf{authblk} in some aspects. + \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 The error handling mechanism is incomplete: there is no corresponding error prompt when some problems occur. + \item There are many things that can be optimized in the code. Some codes take too long to run, especially the definition of theorem-like environments in \PJLthm{}. +\end{itemize} + + +\clearpage +\section{Usage example} + +\subsection{Standard classes} + +In standard classes, one usually only need to configure the page size, hyperlinks and load \PJLtoolkit{} before actually start writing the document. Below is a complete example. + +\begin{code} +\documentclass{article} +\usepackage[a4paper,margin=.75in]{geometry} +\usepackage[hidelinks]{hyperref} +\usepackage[palatino]{PJLtoolkit} % Load the toolkit and use font Palatino + +\UseLanguage{French} % Use French from here + +\begin{document} + +\title{Le Titre} +\author{Auteur} +\date{\PJLdate{2022-04-01}} + +\maketitle + +\begin{abstract} + Ceci est un résumé. \dnf<Plus de contenu est nécessaire.> +\end{abstract} + +\section{Un théorème} + +%% Theorem-like environments can be used directly +\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 \PJLamssim{} is loaded, then one can adopt the \AmS{} writing style in the document (of course, the original way is also valid, so always adding the option \texttt{amssim} usually does not cause problems). This way, the line that introduces \PJLtoolkit{} should be written as: +\begin{code} +\usepackage[amssim,palatino]{PJLtoolkit} +\end{code} + +\clearpage +\subsection{The \texorpdfstring{\AmS{}}{AMS} classes} + +In \AmS{} classes, one usually only need to configure the page size, hyperlinks and load \PJLtoolkit{} before actually start writing the document. Below is a complete example. +\begin{code} +\documentclass{amsart} +\usepackage[a4paper,margin=.75in]{geometry} +\usepackage[hidelinks]{hyperref} +\usepackage[palatino]{PJLtoolkit} % Load the toolkit and use font Palatino + +\UseLanguage{French} % Use French from here + +\begin{document} + +\title{Le Titre} +\author{Auteur 1} +\address{Adresse 1} +\email{\href{Courriel 1}{Courriel 1}} +\author{Auteur 1} +\address{Adresse 1} +\email{\href{Courriel 2}{Courriel 2}} +\date{\PJLdate{2022-04-01}} +\subjclass{*****} +\keywords{...} + +\begin{abstract} + Ceci est un résumé. \dnf<Plus de contenu est nécessaire.> +\end{abstract} + +\maketitle + +\section{Première section} + +%% Theorem-like environments can be used directly +\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} + + +\end{document} diff --git a/Master/texmf-dist/doc/latex/projlib/README.md b/Master/texmf-dist/doc/latex/projlib/README.md new file mode 100644 index 00000000000..d88d15a8750 --- /dev/null +++ b/Master/texmf-dist/doc/latex/projlib/README.md @@ -0,0 +1,81 @@ +<!-- Copyright (C) 2021 by Jinwen XU --> + +# ProjLib Toolkit + +A collection of tools that help you write LaTeX document. With `PJLtoolkit` loaded, you no longer need to set up the theorem-like environments nor to manually configure the appropriate multilingual settings. In addition, a series of auxiliary functionalities are introduced. + +1. `PJLamssim.sty` + - Simulate some features of `amsart` in the standard classes +1. `PJLauthor.sty` + - Enhanced author information block + - Offers `\address`, `\curraddr` and `\email` +1. `PJLdate.sty` + - Offers a macro `\PJLdate` to convert `yyyy-mm-dd` to normal datetime format, with multi-language support +1. `PJLdraft.sty` + - Useful macros during the draft stage: `\dnf` and `\needgraph`, with multi-language support +1. `PJLlang.sty` + - Multi-language configuration based on `babel` or `polyglossia` + - Offers `\UseLanguage`, `\UseOtherLanguage` and `\AddLanguageSetting` + - Currently support Chinese (simplified and traditional), English, French, German, Japanese and Russian, *more to be added* +1. `PJLlogo.sty` + - Draw the ProjLib logo +1. `PJLpaper.sty` + - Paper style configuration: yellow theme, dark theme and nord theme +1. `PJLthm.sty` + - Theorem setup and configuration + - Offers a macro `\CreateTheorem` for creating theorem-like environments with multi-language support + - Preset environments include: `assumption`, `axiom`, `conjecture`, `convention`, `corollary`, `definition`, `definition-proposition`, `definition-theorem`, `example`, `exercise`, `fact`, `hypothesis`, `lemma`, `notation`, `problem`, `property`, `proposition`, `question`, `remark`, `theorem`, and the corresponding unnumbered version with an asterisk `*` in the name. +1. `PJLtoolkit.sty`, *the all-in-one solution* + - A collective interface of ProjLib Toolkit, loading all the packages above + - Provide some pre-defined font configuration + +> Since `PJLthm.sty` (and thus `PJLtoolkit.sty`) uses `cleveref`, it should be loaded after `varioref` and `hyperref`. + +Demonstration: +```latex +\documentclass{amsart} +\usepackage[a4paper,margin=.75in]{geometry} +\usepackage[hidelinks]{hyperref} +\usepackage[palatino]{PJLtoolkit} + +%% You can also comment the above lines and try the following (require xelatex or lualatex): +% \documentclass[a4paper,allowbf]{lebhart} +% \usepackage{PJLtoolkit} + +%% Using \UseLanguage to select language, by default "English" is selected +\UseLanguage{French} % Use French from here + +\begin{document} + +\title{Le Titre} +\author{Auteur 1} +\address{Adresse 1} +\email{\href{Courriel 1}{Courriel 1}} +\author{Auteur 1} +\address{Adresse 1} +\email{\href{Courriel 2}{Courriel 2}} +\date{\PJLdate{2022-04-01}} +\subjclass{*****} +\keywords{...} + +\begin{abstract} + Ceci est un résumé. \dnf<Plus de contenu est nécessaire.> +\end{abstract} + +\maketitle + +\section{Un théorème} + +%% Theorem-like environments can be used directly +\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} +``` + +# License + +This work is released under the LaTeX Project Public License, v1.3c or later. |