diff options
Diffstat (limited to 'macros/latex/contrib/projlib')
-rw-r--r-- | macros/latex/contrib/projlib/ProjLib-doc-cn.pdf | bin | 223464 -> 226031 bytes | |||
-rw-r--r-- | macros/latex/contrib/projlib/ProjLib-doc-cn.tex | 83 | ||||
-rw-r--r-- | macros/latex/contrib/projlib/ProjLib-doc-en.pdf | bin | 143184 -> 142661 bytes | |||
-rw-r--r-- | macros/latex/contrib/projlib/ProjLib-doc-en.tex | 92 | ||||
-rw-r--r-- | macros/latex/contrib/projlib/ProjLib.dtx | 574 | ||||
-rw-r--r-- | macros/latex/contrib/projlib/README.md | 19 |
6 files changed, 520 insertions, 248 deletions
diff --git a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf Binary files differindex 5de46fbd21..0e513e7abd 100644 --- a/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf +++ b/macros/latex/contrib/projlib/ProjLib-doc-cn.pdf diff --git a/macros/latex/contrib/projlib/ProjLib-doc-cn.tex b/macros/latex/contrib/projlib/ProjLib-doc-cn.tex index 32adbf5a85..dfc162bea3 100644 --- a/macros/latex/contrib/projlib/ProjLib-doc-cn.tex +++ b/macros/latex/contrib/projlib/ProjLib-doc-cn.tex @@ -1,5 +1,5 @@ %! TEX program = xelatex -\documentclass[allowbf]{lebhart} +\documentclass[allowbf,regionalref]{lebhart} %%================================ %% 引入工具集 @@ -39,23 +39,23 @@ {\setkeys{lst}{columns=fullflexible,keepspaces=true}}{} %%================================ -%% remind +%% tip %%================================ -\newenvironment{remind}[1][提示]{% +\newenvironment{tip}[1][提示]{% \begin{tcolorbox}[breakable, enhanced, width = \textwidth, - colback = white, colbacktitle = paper, + colback = paper, colbacktitle = paper, colframe = gray!50, boxrule=0.2mm, coltitle = black, fonttitle = \sffamily, - attach boxed title to top left = {yshift=-\tcboxedtitleheight/2, xshift=\tcboxedtitlewidth/4}, + 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={\sffamily #1}]% + title={\scshape\sffamily #1}]% }{\end{tcolorbox}} %%================================ @@ -78,8 +78,8 @@ \title{\ProjLib{} 工具集\\[.3\baselineskip]\normalsize 使用指南} \author{许锦文} -\thanks{对应版本.~~\texttt{\ProjLib{}~2021/05/25}} -\date{2021年5月,北京} +\thanks{对应版本.~~\texttt{\ProjLib{}~2021/06/07}} +\date{2021年6月,北京} \maketitle @@ -99,9 +99,9 @@ \usepackage{PJLtoolkit} \end{code} -\begin{remind}[注意事项] +\begin{tip}[注意事项] 由于其内部使用了 \textsf{cleveref},\PJLtoolkit{} 需要放在 \textsf{varioref}、\textsf{hyperref} 的后面。 -\end{remind} +\end{tip} \medskip \subsection{选项} @@ -162,14 +162,14 @@ \subsection{PJLdate} -\PJLdatestr{} 提供了 \lstinline|\PJLdate|\meta{yyyy-mm-dd} 命令,以将 \meta{yyyy-mm-dd} 转换为对应语言的日期格式显示。例如,在当前的中文语境下,\lstinline|\PJLdate{2022-04-01}| 会被显示为:\PJLdate{2022-04-01}。 +\PJLdatestr{} 提供了 \lstinline|\PJLdate|\meta{yyyy-mm-dd} 命令,以将 \meta{yyyy-mm-dd} 转换为当前语言的日期格式显示。例如,在当前的中文语境下,\lstinline|\PJLdate{2022-04-01}| 会被显示为“\PJLdate{2022-04-01}”,而在英文语境下则会被显示为“\UseOtherLanguage{English}{\PJLdate{2022-04-01}}”。 关于如何选定语言,请参阅关于 \PJLlang{} 的小节。 \subsection{PJLdraft} \PJLdraft{} 提供了下列命令: -\begin{itemize} +\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} @@ -191,14 +191,18 @@ \end{itemize} \meta{language name} 有下列选择 (不区分大小写,如 \texttt{French} 或 \texttt{french} 均可): -\begin{itemize} +\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{JP} 或 \texttt{Japanese} - \item 俄文:\texttt{RU} 或 \texttt{Russian} + \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} 另外,还可以通过下面的方式来填加相应语言的设置: @@ -229,18 +233,23 @@ % \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} + +\vspace{-0.5\baselineskip} +% \begin{longtable}{ll} +\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} +% \end{longtable} \subsection{PJLpaper} @@ -277,11 +286,11 @@ \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{} 的小节。 +预设的定理类环境包括:\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{remind} +\begin{tip} 在引用定理类环境时,建议使用智能引用 \lstinline|\cref{|\meta{label}\lstinline|}|。这样就不必每次都写上相应环境的名称了。 -\end{remind} +\end{tip} \medskip % 若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称 \lstinline|\|\meta{name of environment}\meta{language abbr},其中 \meta{language abbr} 是语言的简写,分别为: @@ -292,9 +301,9 @@ % \texttt{FR} & 法文 & &\\ % \end{longtable} -% \begin{remind} +% \begin{tip} % 如果要定义名称后带有星号 \lstinline|*| 的环境,那么在上面的 \meta{name of environment} 中不用写星号。 -% \end{remind} +% \end{tip} 若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称: \vspace{-.15\baselineskip}% \begin{itemize} @@ -334,9 +343,9 @@ \end{itemize} \end{itemize} -\begin{remind} +\begin{tip} 其内部使用了 \textsf{amsthm},因此传统的 \texttt{theoremstyle} 对其也是适用的,只需在相关定义前标明即可。 -\end{remind} +\end{tip} % \def\proofideanameCN{思路} \NameTheorem[CN]{proofidea}{思路} diff --git a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf Binary files differindex d040c9b903..cce553440a 100644 --- a/macros/latex/contrib/projlib/ProjLib-doc-en.pdf +++ b/macros/latex/contrib/projlib/ProjLib-doc-en.pdf diff --git a/macros/latex/contrib/projlib/ProjLib-doc-en.tex b/macros/latex/contrib/projlib/ProjLib-doc-en.tex index dd1cff3759..4cbffde7fa 100644 --- a/macros/latex/contrib/projlib/ProjLib-doc-en.tex +++ b/macros/latex/contrib/projlib/ProjLib-doc-en.tex @@ -1,5 +1,5 @@ %! TEX program = xelatex -\documentclass[allowbf]{lebhart} +\documentclass[allowbf,regionalref]{lebhart} %%================================ %% Import toolkit @@ -37,17 +37,17 @@ {\setkeys{lst}{columns=fullflexible,keepspaces=true}}{} %%================================ -%% remind +%% tip %%================================ -\newenvironment{remind}[1][Remind]{% +\newenvironment{tip}[1][Tip]{% \begin{tcolorbox}[breakable, enhanced, width = \textwidth, - colback = white, colbacktitle = paper, + colback = paper, colbacktitle = paper, colframe = gray!50, boxrule=0.2mm, coltitle = black, fonttitle = \sffamily, - attach boxed title to top left = {yshift=-\tcboxedtitleheight/2, xshift=\tcboxedtitlewidth/4}, + 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, @@ -74,10 +74,10 @@ %%================================ \begin{document} -\title{\ProjLib{}~~Toolkit\\[.3\baselineskip]\normalsize User Manual} +\title{\ProjLib{}~\,Toolkit\\[.3\baselineskip]\normalsize User Manual} \author{Jinwen Xu} -\thanks{Corresponding to: \texttt{\ProjLib{}~2021/05/25}} -\date{May 2021, Beijing} +\thanks{Corresponding to: \texttt{\ProjLib{}~2021/06/07}} +\date{June 2021, Beijing} \maketitle @@ -97,9 +97,9 @@ Just add the following line to your preamble: \usepackage{PJLtoolkit} \end{code} -\begin{remind}[Attention] +\begin{tip}[Attention] Since \textsf{cleveref} is used internally, \PJLtoolkit{} needs to be placed after \textsf{varioref} and \textsf{hyperref}. -\end{remind} +\end{tip} \medskip \subsection{Options} @@ -160,7 +160,7 @@ The mutual order of \lstinline|\address|, \lstinline|\curraddr| and \lstinline|\ \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}. +\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}'', while in French context as ``\UseOtherLanguage{French}{\PJLdate{2022-04-01}}''. For details on how to select a language, please refer to the section on \PJLlang{}. @@ -190,11 +190,15 @@ For details on how to select a language, please refer to the section on \PJLlang \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 +% \medskip In addition, you can also add new settings to selected language: \begin{itemize} \item \lstinline|\AddLanguageSetting{|\meta{settings}\lstinline|}| @@ -223,24 +227,30 @@ For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make al % \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} +% \bigskip + +% \begin{longtable}{ll} +\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} +% \end{longtable} \clearpage \subsection{PJLpaper} \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} @@ -248,20 +258,22 @@ For example, \lstinline|\AddLanguageSetting(German){\color{orange}}| can make al \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. + \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 pass these options as global options of the document class. In this way, the paper settings would be clear at a glance. +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. \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} @@ -273,11 +285,11 @@ It is recommended to pass these options as global options of the document class. \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{}. +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{remind} - 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. -\end{remind} +\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} \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: @@ -289,18 +301,18 @@ Preset environments include: \texttt{assumption}, \texttt{axiom}, \texttt{conjec % \texttt{FR} & French & &\\ % \end{longtable} -% \begin{remind} +% \begin{tip} % 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} +% \end{tip} If you need to define a new theorem-like environment, you must first define the name of the environment in the language to use: \begin{itemize} \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}| \end{itemize} For \meta{language name}, please refer to the section on \PJLlang{}. 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}{...}| . - -\clearpage% \medskip +\medskip 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} @@ -330,9 +342,9 @@ And then define this environment in one of following five ways: \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} +\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} % \def\proofideanameEN{Idea} \NameTheorem[EN]{proofidea}{Idea} @@ -361,13 +373,13 @@ defines an unnumbered environment \lstinline|proofidea*| and a numbered environm \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 \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 The error handling mechanism is incomplete: there is 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 definition of theorem-like environments in \PJLthm{}. + \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} diff --git a/macros/latex/contrib/projlib/ProjLib.dtx b/macros/latex/contrib/projlib/ProjLib.dtx index de0b0f23b7..5abd7bf8b5 100644 --- a/macros/latex/contrib/projlib/ProjLib.dtx +++ b/macros/latex/contrib/projlib/ProjLib.dtx @@ -18,47 +18,47 @@ % %<*PJLamssim> \ProvidesPackage{PJLamssim} - [2021/05/25 Simulate some features of amsart] + [2021/06/07 Simulate some features of amsart] %</PJLamssim> % %<*PJLauthor> \ProvidesPackage{PJLauthor} - [2021/05/25 Enhanced author information block] + [2021/06/07 Enhanced author information block] %</PJLauthor> % %<*PJLdate> \ProvidesPackage{PJLdate} - [2021/05/25 Convert yyyy-mm-dd to normal datetime format] + [2021/06/07 Convert yyyy-mm-dd to normal datetime format] %</PJLdate> % %<*PJLdraft> \ProvidesPackage{PJLdraft} - [2021/05/25 Some useful macros for the draft stage] + [2021/06/07 Some useful macros for the draft stage] %</PJLdraft> % %<*PJLlang> \ProvidesPackage{PJLlang} - [2021/05/25 Multi-language configuration] + [2021/06/07 Multi-language configuration] %</PJLlang> % %<*PJLlogo> \ProvidesPackage{PJLlogo} - [2021/05/25 The ProjLib logo] + [2021/06/07 The ProjLib logo] %</PJLlogo> % %<*PJLpaper> \ProvidesPackage{PJLpaper} - [2021/05/25 Paper style configuration] + [2021/06/07 Paper style configuration] %</PJLpaper> % %<*PJLthm> \ProvidesPackage{PJLthm} - [2021/05/25 Theorem setup and configuration] + [2021/06/07 Theorem setup and configuration] %</PJLthm> % %<*PJLtoolkit> \ProvidesPackage{PJLtoolkit} - [2021/05/25 Collective interface of ProjLib Toolkit] + [2021/06/07 Collective interface of ProjLib Toolkit] %</PJLtoolkit> % \RequirePackage{kvoptions} @@ -76,6 +76,10 @@ \def\keywordsnameEN{\textsc{Key words and phrases}} \def\keywordsnameFR{\textsc{Mots et phrases clés}} \def\keywordsnameDE{\textsc{Schlüsselwörter und Phrasen}} +\def\keywordsnameIT{\textsc{Parole e frasi chiave}} +\def\keywordsnamePT{\textsc{Palavras e frases chave}} +\def\keywordsnameBR{\textsc{Palavras e frases chave}} +\def\keywordsnameES{\textsc{Palabras y frases clave}} \def\keywordsnameCN{关键词} \def\keywordsnameTC{關鍵詞} \def\keywordsnameJP{キーワード} @@ -374,6 +378,14 @@ \def\needgraphTextFR{Il manque une image ici} \def\dnfTextDE{Nicht beendet} \def\needgraphTextDE{Benötigen Sie ein Bild} +\def\dnfTextIT{Per essere finito} +\def\needgraphTextIT{Manca un'immagine qui} +\def\dnfTextPT{Não terminou} +\def\needgraphTextPT{Precisa de uma foto aqui} +\def\dnfTextBR{Não terminou} +\def\needgraphTextBR{Precisa de uma foto aqui} +\def\dnfTextES{Estar terminado} +\def\needgraphTextES{Falta una imagen aquí} \def\dnfTextCN{这里尚未完成} \def\needgraphTextCN{这里需要一张图片} \def\dnfTextTC{這裡尚未完成} @@ -434,6 +446,10 @@ \newcommand\englishABBR{EN} \newcommand\frenchABBR{FR} \newcommand\ngermanABBR{DE} +\newcommand\italianABBR{IT} +\newcommand\portugueseABBR{PT} +\newcommand\brazilianABBR{BR} +\newcommand\spanishABBR{ES} \newcommand\chineseABBR{CN} \newcommand\tchineseABBR{TC} \newcommand\japaneseABBR{JP} @@ -452,6 +468,7 @@ \setotherlanguage{ngerman} \setotherlanguage{spanish} \setotherlanguage{portuguese} + \setotherlanguage[variant=brazilian]{portuguese} \setotherlanguage{italian} \ifPDFTeX\else \setotherlanguage{russian} @@ -463,7 +480,7 @@ \ifPDFTeX\else \PassOptionsToPackage{japanese,russian}{babel} \fi - \PassOptionsToPackage{italian,portuguese,brazilian,spanish.noquoting,ngerman,french,english,shorthands=off}{babel} + \PassOptionsToPackage{italian,portuguese,brazilian,spanish,es-notilde,es-noquoting,ngerman,french,english,shorthands=off}{babel} \PassOptionsToPackage{italian,brazilian,spanish,ngerman,french,english}{cleveref} \RequirePackage{babel} \frenchsetup{PartNameFull=false} @@ -521,6 +538,18 @@ \newcommand{\PJLlang@langconfig@german}{% \selectlanguage{ngerman}% } +\newcommand{\PJLlang@langconfig@italian}{% + \selectlanguage{italian}% +} +\newcommand{\PJLlang@langconfig@portuguese}{% + \selectlanguage{portuguese}% +} +\newcommand{\PJLlang@langconfig@brazilian}{% + \selectlanguage{brazilian}% +} +\newcommand{\PJLlang@langconfig@spanish}{% + \selectlanguage{spanish}% +} \newcommand{\PJLlang@langconfig@russian}{% \selectlanguage{russian}% } @@ -546,6 +575,14 @@ {french}{\gappto{\PJLlang@langconfig@french}{#2}}% {de}{\gappto{\PJLlang@langconfig@german}{#2}}% {ngerman}{\gappto{\PJLlang@langconfig@german}{#2}}% + {it}{\gappto{\PJLlang@langconfig@italian}{#2}}% + {italian}{\gappto{\PJLlang@langconfig@italian}{#2}}% + {pt}{\gappto{\PJLlang@langconfig@portuguese}{#2}}% + {portuguese}{\gappto{\PJLlang@langconfig@portuguese}{#2}}% + {br}{\gappto{\PJLlang@langconfig@brazilian}{#2}}% + {brazilian}{\gappto{\PJLlang@langconfig@brazilian}{#2}}% + {es}{\gappto{\PJLlang@langconfig@spanish}{#2}}% + {spanish}{\gappto{\PJLlang@langconfig@spanish}{#2}}% {german}{\gappto{\PJLlang@langconfig@german}{#2}}% {ru}{\gappto{\PJLlang@langconfig@russian}{#2}}% {russian}{\gappto{\PJLlang@langconfig@russian}{#2}}% @@ -579,6 +616,14 @@ {de}{\PJL@config@linespacing\PJLlang@langconfig@german}% {ngerman}{\PJL@config@linespacing\PJLlang@langconfig@german}% {german}{\PJL@config@linespacing\PJLlang@langconfig@german}% + {it}{\PJL@config@linespacing\PJLlang@langconfig@italian}% + {italian}{\PJL@config@linespacing\PJLlang@langconfig@italian}% + {pt}{\PJL@config@linespacing\PJLlang@langconfig@portuguese}% + {portuguese}{\PJL@config@linespacing\PJLlang@langconfig@portuguese}% + {br}{\PJL@config@linespacing\PJLlang@langconfig@brazilian}% + {brazilian}{\PJL@config@linespacing\PJLlang@langconfig@brazilian}% + {es}{\PJL@config@linespacing\PJLlang@langconfig@spanish}% + {spanish}{\PJL@config@linespacing\PJLlang@langconfig@spanish}% {ru}{\PJL@config@linespacing\PJLlang@langconfig@russian}% {russian}{\PJL@config@linespacing\PJLlang@langconfig@russian}% }% @@ -610,6 +655,14 @@ {de}{\PJLlang@langconfig@german}% {ngerman}{\PJLlang@langconfig@german}% {german}{\PJLlang@langconfig@german}% + {it}{\PJLlang@langconfig@italian}% + {italian}{\PJLlang@langconfig@italian}% + {pt}{\PJLlang@langconfig@portuguese}% + {portuguese}{\PJLlang@langconfig@portuguese}% + {br}{\PJLlang@langconfig@brazilian}% + {brazilian}{\PJLlang@langconfig@brazilian}% + {es}{\PJLlang@langconfig@spanish}% + {spanish}{\PJLlang@langconfig@spanish}% {ru}{\PJLlang@langconfig@russian}% {russian}{\PJLlang@langconfig@russian}% }% @@ -747,9 +800,13 @@ prefix = @PJLthm@ } \DeclareBoolOption[false]{nothms} +\DeclareBoolOption[false]{draft} \DeclareBoolOption[false]{fast} \DeclareBoolOption[false]{regionalref} \ProcessKeyvalOptions*\relax +\if@PJLthm@draft + \@PJLthm@fasttrue +\fi \if@PJLthm@fast \@PJLthm@regionalreftrue \fi @@ -784,6 +841,14 @@ {de}{\def\PJL@temp@abbr{DE}}% {ngerman}{\def\PJL@temp@abbr{DE}}% {german}{\def\PJL@temp@abbr{DE}}% + {it}{\def\PJL@temp@abbr{IT}}% + {italian}{\def\PJL@temp@abbr{IT}}% + {pt}{\def\PJL@temp@abbr{PT}}% + {portuguese}{\def\PJL@temp@abbr{PT}}% + {br}{\def\PJL@temp@abbr{BR}}% + {brazilian}{\def\PJL@temp@abbr{BR}}% + {es}{\def\PJL@temp@abbr{ES}}% + {spanish}{\def\PJL@temp@abbr{ES}}% {ru}{\def\PJL@temp@abbr{RU}}% {russian}{\def\PJL@temp@abbr{RU}}% }% @@ -792,6 +857,10 @@ \expandafter\def\csname\PJLthm@temp nameEN\endcsname{#3}% \expandafter\def\csname\PJLthm@temp nameFR\endcsname{#3}% \expandafter\def\csname\PJLthm@temp nameDE\endcsname{#3}% + \expandafter\def\csname\PJLthm@temp nameIT\endcsname{#3}% + \expandafter\def\csname\PJLthm@temp namePT\endcsname{#3}% + \expandafter\def\csname\PJLthm@temp nameBR\endcsname{#3}% + \expandafter\def\csname\PJLthm@temp nameES\endcsname{#3}% \expandafter\def\csname\PJLthm@temp nameCN\endcsname{#3}% \expandafter\def\csname\PJLthm@temp nameTC\endcsname{#3}% \expandafter\def\csname\PJLthm@temp nameJP\endcsname{#3}% @@ -878,12 +947,25 @@ }% \else \NewDocumentCommand{\InnerCreateTheorem}{mmmod<>d()}{% -% #1 = star or no star -% #2 = name of environment -% #3 = emptiness or star to append to name of environment -% #4 = numbered like -% #5 = numbered within -% #6 = existed environment +% #1 = Tokens denoting an xparse-boolean value; +% value "true" -> the call was \CreateTheorem*{...}... +% value "false" -> the call was \CreateTheorem{...}... +% This indicates whether the "starred" variant or the +% "unstarred" variant of \CreateTheorem was called. +% #2 = Name of environment to define. One trailing +% star is removed from the environment-name provided +% to \CreateTheorem if that environment-name has +% trailing stars. +% #3 = If the environment-name provided to \CreateTheorem has +% trailing stars: A star (*). +% If the environment-name provided to \CreateTheorem has +% no trailing stars: Empty/no tokens at all. +% #4 = numbered like=name of counter like which the environment +% shall be numbered. +% #5 = numbered within=name of counter which is superordinate +% to the environment's counter and whose stepping resets +% the environment's counter. +% #6 = existed environment name (the environment to copy) \IfBooleanTF{#1}{% \IfValueTF{#4} {\@firstoftwo} @@ -898,7 +980,14 @@ {\string\CreateTheorem\space syntax error\on@line}{% You cannot call the starred variant with optional argument,\MessageBreak nor call the unstarred variant with several optional arguments.}% - {}% + {% + Allowed usage:\MessageBreak\MessageBreak + \CreateTheorem*{(name of environment)}\MessageBreak + \CreateTheorem{(name of environment)}\MessageBreak + \CreateTheorem{(name of environment)}[(numbered like)]\MessageBreak + \CreateTheorem{(name of environment)}<(numbered within)>\MessageBreak + \CreateTheorem{(name of environment)}((existed environment))\MessageBreak + }% }{% \IfValueTF{#6}{% \IfBooleanTF{#1}{% @@ -912,13 +1001,28 @@ } }{% \IfBooleanTF{#1}{% - \newtheorem*{#2EN#3}{\csname#2nameEN\endcsname} - \newtheorem*{#2FR#3}{\csname#2nameFR\endcsname} - \newtheorem*{#2DE#3}{\csname#2nameDE\endcsname} - \newtheorem*{#2CN#3}{\csname#2nameCN\endcsname} - \newtheorem*{#2TC#3}{\csname#2nameTC\endcsname} - \newtheorem*{#2JP#3}{\csname#2nameJP\endcsname} - \newtheorem*{#2RU#3}{\csname#2nameRU\endcsname} +% \newtheorem*{#2EN#3}{\csname#2nameEN\endcsname}% +% \newtheorem*{#2FR#3}{\csname#2nameFR\endcsname}% +% \newtheorem*{#2DE#3}{\csname#2nameDE\endcsname}% +% \newtheorem*{#2IT#3}{\csname#2nameIT\endcsname}% +% \newtheorem*{#2PT#3}{\csname#2namePT\endcsname}% +% \newtheorem*{#2BR#3}{\csname#2nameBR\endcsname}% +% \newtheorem*{#2ES#3}{\csname#2nameES\endcsname}% +% \newtheorem*{#2CN#3}{\csname#2nameCN\endcsname}% +% \newtheorem*{#2TC#3}{\csname#2nameTC\endcsname}% +% \newtheorem*{#2JP#3}{\csname#2nameJP\endcsname}% +% \newtheorem*{#2RU#3}{\csname#2nameRU\endcsname}% + \expandafter\PassFirstToSecond\expandafter{\csname#2nameEN\endcsname}{\newtheorem*{#2EN#3}}% + \expandafter\PassFirstToSecond\expandafter{\csname#2nameFR\endcsname}{\newtheorem*{#2FR#3}}% + \expandafter\PassFirstToSecond\expandafter{\csname#2nameDE\endcsname}{\newtheorem*{#2DE#3}}% + \expandafter\PassFirstToSecond\expandafter{\csname#2nameIT\endcsname}{\newtheorem*{#2IT#3}}% + \expandafter\PassFirstToSecond\expandafter{\csname#2namePT\endcsname}{\newtheorem*{#2PT#3}}% + \expandafter\PassFirstToSecond\expandafter{\csname#2nameBR\endcsname}{\newtheorem*{#2BR#3}}% + \expandafter\PassFirstToSecond\expandafter{\csname#2nameES\endcsname}{\newtheorem*{#2ES#3}}% + \expandafter\PassFirstToSecond\expandafter{\csname#2nameCN\endcsname}{\newtheorem*{#2CN#3}}% + \expandafter\PassFirstToSecond\expandafter{\csname#2nameTC\endcsname}{\newtheorem*{#2TC#3}}% + \expandafter\PassFirstToSecond\expandafter{\csname#2nameJP\endcsname}{\newtheorem*{#2JP#3}}% + \expandafter\PassFirstToSecond\expandafter{\csname#2nameRU\endcsname}{\newtheorem*{#2RU#3}}% }{% \IfValueTF{#5}{% \newcounter{#2#3}[{#5}]% @@ -934,6 +1038,10 @@ \CreateTheoremNumberedLikeAliasCounter{#2}{EN}{#3}% \CreateTheoremNumberedLikeAliasCounter{#2}{FR}{#3}% \CreateTheoremNumberedLikeAliasCounter{#2}{DE}{#3}% + \CreateTheoremNumberedLikeAliasCounter{#2}{IT}{#3}% + \CreateTheoremNumberedLikeAliasCounter{#2}{PT}{#3}% + \CreateTheoremNumberedLikeAliasCounter{#2}{BR}{#3}% + \CreateTheoremNumberedLikeAliasCounter{#2}{ES}{#3}% \CreateTheoremNumberedLikeAliasCounter{#2}{CN}{#3}% \CreateTheoremNumberedLikeAliasCounter{#2}{TC}{#3}% \CreateTheoremNumberedLikeAliasCounter{#2}{JP}{#3}% @@ -948,180 +1056,290 @@ }% \NewDocumentCommand{\CreateTheoremNumberedLikeAliasCounter}{mmm}{% \newaliascnt{#1#2#3}{#1#3}% - \newtheorem{#1#2#3}[{#1#2#3}]{\csname#1name#2\endcsname}% +% \newtheorem{#1#2#3}[{#1#2#3}]{\csname#1name#2\endcsname}% + \expandafter\PassFirstToSecond\expandafter{\csname#1name#2\endcsname}{\newtheorem{#1#2#3}[{#1#2#3}]}% \aliascntresetthe{#1#2#3}% - \crefname{#1#2#3}% - {\csname#1name#2\endcsname}% - {\csname#1name#2\endcsname}% - \Crefname{#1#2#3}% - {\csname#1name#2\endcsname}% - {\csname#1name#2\endcsname}% +% \crefname{#1#2#3}% +% {\csname#1name#2\endcsname}% +% {\csname#1name#2\endcsname}% +% \Crefname{#1#2#3}% +% {\csname#1name#2\endcsname}% +% {\csname#1name#2\endcsname}% + \expandafter\PassFirstToSecond\expandafter{\csname#1name#2\endcsname}% + {% + \expandafter\PassFirstToSecond\expandafter{\csname#1name#2\endcsname}% + {\crefname{#1#2#3}}% + }% + \expandafter\PassFirstToSecond\expandafter{\csname#1name#2\endcsname}% + {% + \expandafter\PassFirstToSecond\expandafter{\csname#1name#2\endcsname}% + {\Crefname{#1#2#3}}% + }% }% \fi %% English theorems names -\def\theoremnameEN{Theorem} -\def\lemmanameEN{Lemma} -\def\propositionnameEN{Proposition} -\def\corollarynameEN{Corollary} -\def\propertynameEN{Property} -\def\factnameEN{Fact} -\def\conjecturenameEN{Conjecture} -\def\definitionnameEN{Definition} -\def\axiomnameEN{Axiom} -\def\assumptionnameEN{Assumption} -\def\conventionnameEN{Convention} -\def\hypothesisnameEN{Hypothesis} -\def\notationnameEN{Notation} -\def\examplenameEN{Example} -\def\problemnameEN{Problem} -\def\questionnameEN{Question} -\def\exercisenameEN{Exercise} -\def\remarknameEN{Remark} +\def\theoremnameEN{{Theorem}} +\def\lemmanameEN{{Lemma}} +\def\propositionnameEN{{Proposition}} +\def\corollarynameEN{{Corollary}} +\def\propertynameEN{{Property}} +\def\factnameEN{{Fact}} +\def\conjecturenameEN{{Conjecture}} +\def\definitionnameEN{{Definition}} +\def\axiomnameEN{{Axiom}} +\def\assumptionnameEN{{Assumption}} +\def\conventionnameEN{{Convention}} +\def\hypothesisnameEN{{Hypothesis}} +\def\notationnameEN{{Notation}} +\def\examplenameEN{{Example}} +\def\problemnameEN{{Problem}} +\def\questionnameEN{{Question}} +\def\exercisenameEN{{Exercise}} +\def\remarknameEN{{Remark}} +\def\observationnameEN{{Observation}} \expandafter\def\csname definition-propositionnameEN\endcsname{\definitionnameEN-\propositionnameEN} \expandafter\def\csname definition-theoremnameEN\endcsname{\definitionnameEN-\theoremnameEN} %% French theorems names -\def\theoremnameFR{Théorème} -\def\lemmanameFR{Lemme} -\def\propositionnameFR{Proposition} -\def\corollarynameFR{Corollaire} -\def\propertynameFR{Propriété} -\def\factnameFR{Fait} -\def\conjecturenameFR{Conjecture} -\def\definitionnameFR{Définition} -\def\axiomnameFR{Axiome} -\def\assumptionnameFR{Supposition} -\def\conventionnameFR{Convention} -\def\hypothesisnameFR{Hypothèse} -\def\notationnameFR{Notation} -\def\examplenameFR{Exemple} -\def\problemnameFR{Problème} -\def\questionnameFR{Question} -\def\exercisenameFR{Exercice} -\def\remarknameFR{Remarque} +\def\theoremnameFR{{Théorème}} +\def\lemmanameFR{{Lemme}} +\def\propositionnameFR{{Proposition}} +\def\corollarynameFR{{Corollaire}} +\def\propertynameFR{{Propriété}} +\def\factnameFR{{Fait}} +\def\conjecturenameFR{{Conjecture}} +\def\definitionnameFR{{Définition}} +\def\axiomnameFR{{Axiome}} +\def\assumptionnameFR{{Supposition}} +\def\conventionnameFR{{Convention}} +\def\hypothesisnameFR{{Hypothèse}} +\def\notationnameFR{{Notation}} +\def\examplenameFR{{Exemple}} +\def\problemnameFR{{Problème}} +\def\questionnameFR{{Question}} +\def\exercisenameFR{{Exercice}} +\def\remarknameFR{{Remarque}} +\def\observationnameFR{{Observation}} \expandafter\def\csname definition-propositionnameFR\endcsname{\definitionnameFR-\propositionnameFR} \expandafter\def\csname definition-theoremnameFR\endcsname{\definitionnameFR-\theoremnameFR} %% German theorems names -\def\theoremnameDE{Satz} -\def\lemmanameDE{Lemma} -\def\propositionnameDE{Proposition} -\def\corollarynameDE{Korollar} -\def\propertynameDE{Eigenschaft} -\def\factnameDE{Fakt} -\def\conjecturenameDE{Vermutung} -\def\definitionnameDE{Definition} -\def\axiomnameDE{Axiom} -\def\assumptionnameDE{Annahme} -\def\conventionnameDE{Konvention} -\def\hypothesisnameDE{Hypothese} -\def\notationnameDE{Notation} -\def\examplenameDE{Beispiel} -\def\problemnameDE{Problem} -\def\questionnameDE{Frage} -\def\exercisenameDE{Übung} -\def\remarknameDE{Bemerkung} +\def\theoremnameDE{{Satz}} +\def\lemmanameDE{{Lemma}} +\def\propositionnameDE{{Proposition}} +\def\corollarynameDE{{Korollar}} +\def\propertynameDE{{Eigenschaft}} +\def\factnameDE{{Fakt}} +\def\conjecturenameDE{{Vermutung}} +\def\definitionnameDE{{Definition}} +\def\axiomnameDE{{Axiom}} +\def\assumptionnameDE{{Annahme}} +\def\conventionnameDE{{Konvention}} +\def\hypothesisnameDE{{Hypothese}} +\def\notationnameDE{{Notation}} +\def\examplenameDE{{Beispiel}} +\def\problemnameDE{{Problem}} +\def\questionnameDE{{Frage}} +\def\exercisenameDE{{Übung}} +\def\remarknameDE{{Bemerkung}} +\def\observationnameDE{{Beobachtung}} \expandafter\def\csname definition-propositionnameDE\endcsname{\definitionnameDE-\propositionnameDE} \expandafter\def\csname definition-theoremnameDE\endcsname{\definitionnameDE-\theoremnameDE} +%% Italian theorems names +\def\theoremnameIT{{Teorema}} +\def\lemmanameIT{{Lemma}} +\def\propositionnameIT{{Proposizione}} +\def\corollarynameIT{{Corollario}} +\def\propertynameIT{{Proprietà}} +\def\factnameIT{{Fatto}} +\def\conjecturenameIT{{Congettura}} +\def\definitionnameIT{{Definizione}} +\def\axiomnameIT{{Assioma}} +\def\assumptionnameIT{{Supposizione}} +\def\conventionnameIT{{Convenzione}} +\def\hypothesisnameIT{{Ipotesi}} +\def\notationnameIT{{Notazione}} +\def\examplenameIT{{Esempio}} +\def\problemnameIT{{Problema}} +\def\questionnameIT{{Domanda}} +\def\exercisenameIT{{Esercizio}} +\def\remarknameIT{{Nota}} +\def\observationnameIT{{Osservazione}} +\expandafter\def\csname definition-propositionnameIT\endcsname{\definitionnameIT-\propositionnameIT} +\expandafter\def\csname definition-theoremnameIT\endcsname{\definitionnameIT-\theoremnameIT} + +%% Portuguese theorems names +\def\theoremnamePT{{Teorema}} +\def\lemmanamePT{{Lema}} +\def\propositionnamePT{{Proposição}} +\def\corollarynamePT{{Corolário}} +\def\propertynamePT{{Propriedade}} +\def\factnamePT{{Facto}} +\def\conjecturenamePT{{Conjetura}} +\def\definitionnamePT{{Definição}} +\def\axiomnamePT{{Axioma}} +\def\assumptionnamePT{{Suposição}} +\def\conventionnamePT{{Convenção}} +\def\hypothesisnamePT{{Hipótese}} +\def\notationnamePT{{Notação}} +\def\examplenamePT{{Exemplo}} +\def\problemnamePT{{Problema}} +\def\questionnamePT{{Pergunta}} +\def\exercisenamePT{{Exercício}} +\def\remarknamePT{{Comentário}} +\def\observationnamePT{{Observação}} +\expandafter\def\csname definition-propositionnamePT\endcsname{\definitionnamePT-\propositionnamePT} +\expandafter\def\csname definition-theoremnamePT\endcsname{\definitionnamePT-\theoremnamePT} + +%% Brazilian theorems names +\def\theoremnameBR{{Teorema}} +\def\lemmanameBR{{Lema}} +\def\propositionnameBR{{Proposição}} +\def\corollarynameBR{{Corolário}} +\def\propertynameBR{{Propriedade}} +\def\factnameBR{{Facto}} +\def\conjecturenameBR{{Conjetura}} +\def\definitionnameBR{{Definição}} +\def\axiomnameBR{{Axioma}} +\def\assumptionnameBR{{Suposição}} +\def\conventionnameBR{{Convenção}} +\def\hypothesisnameBR{{Hipótese}} +\def\notationnameBR{{Notação}} +\def\examplenameBR{{Exemplo}} +\def\problemnameBR{{Problema}} +\def\questionnameBR{{Pergunta}} +\def\exercisenameBR{{Exercício}} +\def\remarknameBR{{Comentário}} +\def\observationnameBR{{Observação}} +\expandafter\def\csname definition-propositionnameBR\endcsname{\definitionnameBR-\propositionnameBR} +\expandafter\def\csname definition-theoremnameBR\endcsname{\definitionnameBR-\theoremnameBR} + +%% Spanish theorems names +\def\theoremnameES{{Teorema}} +\def\lemmanameES{{Lema}} +\def\propositionnameES{{Proposición}} +\def\corollarynameES{{Corolario}} +\def\propertynameES{{Propiedad}} +\def\factnameES{{Hecho}} +\def\conjecturenameES{{Conjetura}} +\def\definitionnameES{{Definición}} +\def\axiomnameES{{Axioma}} +\def\assumptionnameES{{Suposición}} +\def\conventionnameES{{Convención}} +\def\hypothesisnameES{{Hipótesis}} +\def\notationnameES{{Notación}} +\def\examplenameES{{Ejemplo}} +\def\problemnameES{{Problema}} +\def\questionnameES{{Pregunta}} +\def\exercisenameES{{Ejercicio}} +\def\remarknameES{{Comentario}} +\def\observationnameES{{Observación}} +\expandafter\def\csname definition-propositionnameES\endcsname{\definitionnameES-\propositionnameES} +\expandafter\def\csname definition-theoremnameES\endcsname{\definitionnameES-\theoremnameES} + %% Chinese theorems names -\def\theoremnameCN{定理} -\def\lemmanameCN{引理} -\def\propositionnameCN{命题} -\def\corollarynameCN{推论} -\def\propertynameCN{性质} -\def\factnameCN{事实} -\def\conjecturenameCN{猜想} -\def\definitionnameCN{定义} -\def\axiomnameCN{公理} -\def\assumptionnameCN{假设} -\def\conventionnameCN{约定} -\def\hypothesisnameCN{假设} -\def\notationnameCN{记号} -\def\examplenameCN{例} -\def\problemnameCN{问题} -\def\questionnameCN{问题} -\def\exercisenameCN{练习} -\def\remarknameCN{备注} +\def\theoremnameCN{{定理}} +\def\lemmanameCN{{引理}} +\def\propositionnameCN{{命题}} +\def\corollarynameCN{{推论}} +\def\propertynameCN{{性质}} +\def\factnameCN{{事实}} +\def\conjecturenameCN{{猜想}} +\def\definitionnameCN{{定义}} +\def\axiomnameCN{{公理}} +\def\assumptionnameCN{{假设}} +\def\conventionnameCN{{约定}} +\def\hypothesisnameCN{{假设}} +\def\notationnameCN{{记号}} +\def\examplenameCN{{例}} +\def\problemnameCN{{问题}} +\def\questionnameCN{{问题}} +\def\exercisenameCN{{练习}} +\def\remarknameCN{{备注}} +\def\observationnameCN{{观察}} \expandafter\def\csname definition-propositionnameCN\endcsname{\definitionnameCN-\propositionnameCN} \expandafter\def\csname definition-theoremnameCN\endcsname{\definitionnameCN-\theoremnameCN} -\def\theoremnameTC{定理} -\def\lemmanameTC{引理} -\def\propositionnameTC{命題} -\def\corollarynameTC{推論} -\def\propertynameTC{性質} -\def\factnameTC{事實} -\def\conjecturenameTC{猜想} -\def\definitionnameTC{定義} -\def\axiomnameTC{公理} -\def\assumptionnameTC{假設} -\def\conventionnameTC{約定} -\def\hypothesisnameTC{假設} -\def\notationnameTC{記號} -\def\examplenameTC{例} -\def\problemnameTC{問題} -\def\questionnameTC{問題} -\def\exercisenameTC{練習} -\def\remarknameTC{備註} +\def\theoremnameTC{{定理}} +\def\lemmanameTC{{引理}} +\def\propositionnameTC{{命題}} +\def\corollarynameTC{{推論}} +\def\propertynameTC{{性質}} +\def\factnameTC{{事實}} +\def\conjecturenameTC{{猜想}} +\def\definitionnameTC{{定義}} +\def\axiomnameTC{{公理}} +\def\assumptionnameTC{{假設}} +\def\conventionnameTC{{約定}} +\def\hypothesisnameTC{{假設}} +\def\notationnameTC{{記號}} +\def\examplenameTC{{例}} +\def\problemnameTC{{問題}} +\def\questionnameTC{{問題}} +\def\exercisenameTC{{練習}} +\def\remarknameTC{{備註}} +\def\observationnameTC{{觀察}} \expandafter\def\csname definition-propositionnameTC\endcsname{\definitionnameTC-\propositionnameTC} \expandafter\def\csname definition-theoremnameTC\endcsname{\definitionnameTC-\theoremnameTC} %% Japanese theorems names -\def\theoremnameJP{定理} -\def\lemmanameJP{補題} -\def\propositionnameJP{命題} -\def\corollarynameJP{系} -\def\propertynameJP{性質} -\def\factnameJP{事実} -\def\conjecturenameJP{予想} -\def\definitionnameJP{定義} -\def\axiomnameJP{公理} -\def\assumptionnameJP{仮定} -\def\conventionnameJP{慣例} -\def\hypothesisnameJP{仮設} -\def\notationnameJP{記法} -\def\examplenameJP{例} -\def\problemnameJP{問題} -\def\questionnameJP{問題} -\def\exercisenameJP{練習} -\def\remarknameJP{注釈} +\def\theoremnameJP{{定理}} +\def\lemmanameJP{{補題}} +\def\propositionnameJP{{命題}} +\def\corollarynameJP{{系}} +\def\propertynameJP{{性質}} +\def\factnameJP{{事実}} +\def\conjecturenameJP{{予想}} +\def\definitionnameJP{{定義}} +\def\axiomnameJP{{公理}} +\def\assumptionnameJP{{仮定}} +\def\conventionnameJP{{慣例}} +\def\hypothesisnameJP{{仮設}} +\def\notationnameJP{{記法}} +\def\examplenameJP{{例}} +\def\problemnameJP{{問題}} +\def\questionnameJP{{問題}} +\def\exercisenameJP{{練習}} +\def\remarknameJP{{注釈}} +\def\observationnameJP{{観察}} \expandafter\def\csname definition-propositionnameJP\endcsname{\definitionnameJP-\propositionnameJP} \expandafter\def\csname definition-theoremnameJP\endcsname{\definitionnameJP-\theoremnameJP} %% Russian theorems names -\def\theoremnameRU{Теорема} % Теоре́ма -\def\lemmanameRU{Лемма} % Ле́мма -\def\propositionnameRU{Предложение} % Предложе́ние -\def\corollarynameRU{Следствие} % Сле́дствие -\def\propertynameRU{Имущество} % Иму́щество -\def\factnameRU{Факт} -\def\conjecturenameRU{Гипотеза} % Гипо́теза -\def\definitionnameRU{Определение} % Определе́ние -\def\axiomnameRU{Аксиома} % Аксио́ма -\def\assumptionnameRU{Предположение} % Предположе́ние -\def\conventionnameRU{Конвенция} % Конве́нция -\def\hypothesisnameRU{Гипотеза} % Гипо́теза -\def\notationnameRU{Нотация} % Нота́ция -\def\examplenameRU{Пример} % Приме́р -\def\problemnameRU{Проблема} % Пробле́ма -\def\questionnameRU{Вопрос} % Вопро́с -\def\exercisenameRU{Упражнение} % Упражне́ние -\def\remarknameRU{Замечание} % Замеча́ние +\def\theoremnameRU{{Теорема}} % Теоре́ма +\def\lemmanameRU{{Лемма}} % Ле́мма +\def\propositionnameRU{{Предложение}} % Предложе́ние +\def\corollarynameRU{{Следствие}} % Сле́дствие +\def\propertynameRU{{Имущество}} % Иму́щество +\def\factnameRU{{Факт}} +\def\conjecturenameRU{{Гипотеза}} % Гипо́теза +\def\definitionnameRU{{Определение}} % Определе́ние +\def\axiomnameRU{{Аксиома}} % Аксио́ма +\def\assumptionnameRU{{Предположение}} % Предположе́ние +\def\conventionnameRU{{Конвенция}} % Конве́нция +\def\hypothesisnameRU{{Гипотеза}} % Гипо́теза +\def\notationnameRU{{Нотация}} % Нота́ция +\def\examplenameRU{{Пример}} % Приме́р +\def\problemnameRU{{Проблема}} % Пробле́ма +\def\questionnameRU{{Вопрос}} % Вопро́с +\def\exercisenameRU{{Упражнение}} % Упражне́ние +\def\remarknameRU{{Замечание}} % Замеча́ние +\def\observationnameRU{{Наблюдение}} % Наблюде́ние \expandafter\def\csname definition-propositionnameRU\endcsname{\definitionnameRU-\propositionnameRU} \expandafter\def\csname definition-theoremnameRU\endcsname{\definitionnameRU-\theoremnameRU} \newif\ifPJLthm@IsBook -\ifdefined\chapter\PJLthm@IsBooktrue\else\PJLthm@IsBookfalse\fi -\if@PJLthm@nothms\else +\ifdefined\c@chapter\PJLthm@IsBooktrue\else\PJLthm@IsBookfalse\fi %% Theorem environments \ifbool{PJLthm@IsBook}{ - \newaliascnt{highest}{chapter} + \newaliascnt{PJLthm@highest}{chapter} }{ - \newaliascnt{highest}{section} + \newaliascnt{PJLthm@highest}{section} } -\CreateTheorem{theorem}<highest> +\if@PJLthm@nothms\else +\CreateTheorem{theorem}<PJLthm@highest> \CreateTheorem{lemma}[theorem] \CreateTheorem{proposition}[theorem] \CreateTheorem{corollary}[theorem] @@ -1163,11 +1381,14 @@ \CreateTheorem*{exercise*} \theoremstyle{remark} -\CreateTheorem{remark}<highest> +\CreateTheorem{remark}<PJLthm@highest> \CreateTheorem*{remark*} -\numberwithin{equation}{highest} +\CreateTheorem{observation}<PJLthm@highest> +\CreateTheorem*{observation*} \fi +\numberwithin{equation}{PJLthm@highest} + % Some localization of cref \gappto{\PJLlang@langconfig@chinese}{% \crefname{equation}{式}{式}% @@ -1178,7 +1399,7 @@ \Crefname{figure}{图}{图}% \Crefname{table}{表}{表}% \Crefname{appendix}{附录}{附录}% - \def\crefpairconjunction{~和~}% + \def\crefpairconjunction{、}% \def\crefmiddleconjunction{、}% \def\creflastconjunction{~和~}% \def\crefpairgroupconjunction{~和~}% @@ -1195,7 +1416,7 @@ \Crefname{figure}{圖}{圖}% \Crefname{table}{表}{表}% \Crefname{appendix}{附錄}{附錄}% - \def\crefpairconjunction{~與~}% + \def\crefpairconjunction{、}% \def\crefmiddleconjunction{、}% \def\creflastconjunction{~與~}% \def\crefpairgroupconjunction{~與~}% @@ -1237,6 +1458,23 @@ \def\creflastgroupconjunction{~и~}% \def\crefrangeconjunction{~\textasciitilde~}% } +\gappto{\PJLlang@langconfig@portuguese}{% + \crefname{equation}{eq.}{eqs.}% + \crefname{figure}{fig.}{figs.}% + \crefname{table}{tabela}{tabelas}% + \crefname{appendix}{apêndice}{apêndices}% + \Crefname{equation}{Eq.}{Eqs.}% + \Crefname{figure}{Fig.}{Figs.}% + \Crefname{table}{Tabela}{Tabelas}% + \Crefname{appendix}{Apêndice}{Apêndices}% + \def\crefpairconjunction{ e\nobreakspace}% + \def\crefmiddleconjunction{, }% + \def\creflastconjunction{ e\nobreakspace}% + \def\crefpairgroupconjunction{ e\nobreakspace}% + \def\crefmiddlegroupconjunction{, }% + \def\creflastgroupconjunction{ e\nobreakspace}% + \def\crefrangeconjunction{ a\nobreakspace}% +} %</PJLthm> % %<*PJLtoolkit> @@ -1316,6 +1554,7 @@ \if@PJLtoolkit@garamond \RequirePackage{amssymb} + \PassOptionsToPackage{lining}{ebgaramond} \RequirePackage{ebgaramond-maths} \RequirePackage{ebgaramond} % \RequirePackage{garamondlibre} @@ -1324,7 +1563,7 @@ \if@PJLtoolkit@biolinum \RequirePackage{amssymb} - \RequirePackage{mathpazo} + % \RequirePackage{mathpazo} % \RequirePackage[sansmath]{libertinust1math} \ifPDFTeX \RequirePackage{biolinum} @@ -1338,6 +1577,7 @@ BoldItalicFont = LinBiolinum_RBO.otf ] \fi \PJLsetlinespacing{\setstretch{1.05}} + \RequirePackage[italic,defaultmathsizes]{mathastext} \fi \fi diff --git a/macros/latex/contrib/projlib/README.md b/macros/latex/contrib/projlib/README.md index d88d15a875..59d887b3be 100644 --- a/macros/latex/contrib/projlib/README.md +++ b/macros/latex/contrib/projlib/README.md @@ -2,8 +2,13 @@ # 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. +> **ProjLib** can be interpreted as "***Proj**ect **Lib**rary*" in English, but I prefer the French interpretation "***Proj**et **Lib**re*". +## Introduction + +`ProjLib` is 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. + +The collection includes: 1. `PJLamssim.sty` - Simulate some features of `amsart` in the standard classes 1. `PJLauthor.sty` @@ -16,7 +21,7 @@ A collection of tools that help you write LaTeX document. With `PJLtoolkit` load 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* + - Currently support Chinese (simplified and traditional), English, French, German, Italien, Japanese, Portuguese (European and Brazilian), Russian and Spanish 1. `PJLlogo.sty` - Draw the ProjLib logo 1. `PJLpaper.sty` @@ -24,14 +29,20 @@ A collection of tools that help you write LaTeX document. With `PJLtoolkit` load 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. + - Preset environments include: `assumption`, `axiom`, `conjecture`, `convention`, `corollary`, `definition`, `definition-proposition`, `definition-theorem`, `example`, `exercise`, `fact`, `hypothesis`, `lemma`, `notation`, `observation`, `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: +## How to get these files +You can get the `.sty` files mentioned above simply by compiling `ProjLib.ins`: +``` +latex ProjLib.ins +``` + +## An example ```latex \documentclass{amsart} \usepackage[a4paper,margin=.75in]{geometry} |