diff options
Diffstat (limited to 'macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex')
-rw-r--r-- | macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex | 147 |
1 files changed, 86 insertions, 61 deletions
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex b/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex index e49bd7a2b0..4a91ad2308 100644 --- a/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex +++ b/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex @@ -9,8 +9,6 @@ \usepackage{longtable} % breakable tables \usepackage{hologo} % more TeX logo -\usepackage{relsize} - \usepackage{blindtext} \UseLanguage{Chinese} @@ -19,46 +17,73 @@ %% For typesetting code %%================================ \usepackage{listings} -\definecolor{maintheme}{RGB}{70,130,180} -\definecolor{forestgreen}{RGB}{21,122,81} -\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=% - {linenumbers,nolinenumbers,part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href, - color,NameTheorem,CreateTheorem,cref,DNF,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere - } +\usepackage{xcolor} +\usepackage{setspace} +\definecolor{code-main}{RGB}{70,130,180} +\definecolor{code-expl3}{RGB}{240,50,60} +\definecolor{code-option}{RGB}{40,110,20} +\definecolor{code-keys}{RGB}{100,130,150} +\definecolor{code-comment}{RGB}{20,120,80} +\definecolor{code-background}{gray}{0.99} +\lstset{ + language = [LaTeX]TeX, + basicstyle = \ttfamily, + keywordstyle = \color{code-main}, + commentstyle = \color{code-comment}, + showstringspaces = false, + breaklines = true, + frame = lines, + backgroundcolor = \color{code-background}, + flexiblecolumns = true, + escapeinside = {(*}{*)}, + alsoletter = {_,:}, + % numbers = left, + % firstnumber = last, + numberstyle = \scriptsize\ttfamily, + stepnumber = 1, + numbersep = 5pt, } -\lstnewenvironment{code}% -{\setstretch{1.07}\LocallyStopLineNumbers% -\setkeys{lst}{columns=fullflexible,keepspaces=true}% +\newcommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$} +\lstset{% LaTeX2 commands + classoffset = 0, + texcsstyle =* \color{code-main}, + moretexcs = + { + linenumbers,nolinenumbers, + part,parttext,chapter,section,subsection,subsubsection, + frontmatter,mainmatter,backmatter, + tableofcontents, + href, + color, + NameTheorem,CreateTheorem, + cref, + ProjLib, + DNF, + UseLanguage,UseOtherLanguage,AddLanguageSetting, + maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate, + qedhere, + } } -{\ResumeLineNumbers} -\lstnewenvironment{code*}% -{\setstretch{1.07}\LocallyStopLineNumbers% -\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}% +\lstset{% LaTeX3 commands + classoffset = 1, + texcsstyle =* \color{code-expl3}, + moretexcs = + { + } } -{\ResumeLineNumbers} +\lstnewenvironment{code}{\setstretch{1.05}\LocallyStopLineNumbers}{\ResumeLineNumbers\vspace{-.3\baselineskip}\vspace{-.5\parskip}} +\lstnewenvironment{code*}{\setstretch{1.05}\lstset{numbers=left}\LocallyStopLineNumbers}{\ResumeLineNumbers\vspace{-.3\baselineskip}\vspace{-.5\parskip}} + +\newcommand{\classoption}[1]{\texttt{\textcolor{code-option}{#1}}} +\newcommand{\packageoption}[1]{\texttt{\textcolor{code-option}{#1}}} +\newcommand{\commandoption}[1]{\texttt{\textcolor{code-keys}{#1}}} %%================================ %% tip %%================================ \usepackage[many]{tcolorbox} -\newenvironment{tip}[1][提示]{% +\newenvironment{tip}[1][提示] + {% \LocallyStopLineNumbers% \begin{tcolorbox}[breakable, enhanced, @@ -69,12 +94,16 @@ fonttitle = \sffamily, attach boxed title to top left = {yshift=-\tcboxedtitleheight/2, xshift=.5cm}, boxed title style = {boxrule=0pt, colframe=paper}, - before skip = 0.3cm, - after skip = 0.3cm, - top = 3mm, - bottom = 3mm, + before skip = 3mm, + after skip = 3mm, + top = 2.5mm, + bottom = 1.5mm, title={\scshape\sffamily #1}]% -}{\end{tcolorbox}\ResumeLineNumbers} + } + {% + \end{tcolorbox}% + \ResumeLineNumbers% + } %%================================ %% Names @@ -97,7 +126,7 @@ %%================================ \begin{document} -\def\PackageVersion{2022/06/16} +\def\PackageVersion{2022/09/03} \frontmatter \LocallyStopLineNumbers @@ -122,17 +151,13 @@ \simplivre{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。 -这篇说明文档即是用 \simplivre{} 排版的 (使用了参数 \texttt{use boldface}),你可以把它看作一份简短的说明与演示。 +这篇说明文档即是用 \simplivre{} 排版的 (使用了参数 \classoption{use boldface}),你可以把它看作一份简短的说明与演示。 \bigskip \begin{tip} 多语言支持、定理类环境、未完成标记等功能是由 \ProjLib{} 工具箱提供的,这里只给出了将其与本文档类搭配使用的要点。如需获取更详细的信息,可以参阅 \ProjLib{} 的说明文档。 \end{tip} -\begin{tip} - This documentation has not been fully up-to-date with the new \texttt{expl3} version of this class series. Some options or commands introduced here might be obsolete. -\end{tip} - \tableofcontents \mainmatter @@ -275,13 +300,13 @@ Référence du théorème: \cref{thm:abc} \simplivre{} 文档类有下面几个选项: -\begin{itemize} - \item 语言选项 \texttt{EN} / \texttt{english} / \texttt{English}、\texttt{FR} / \texttt{french} / \texttt{French},等等 +\begin{itemize}[label=,leftmargin=1.25em,itemindent=-1.25em] + \item 语言选项 \classoption{EN} / \classoption{english} / \classoption{English}、\classoption{FR} / \classoption{french} / \classoption{French},等等 \begin{itemize} \item 具体选项名称可参见下一节的 \meta{language name}。第一个指定的语言将作为默认语言。 \item 语言选项不是必需的,其主要用途是提高编译速度。不添加语言选项时效果是一样的,只是会更慢一些。 \end{itemize} - \item \texttt{draft} 或 \texttt{fast} + \item \classoption{draft} 或 \classoption{fast} \begin{itemize} \item 你可以使用选项 \verb|fast| 来启用快速但略微粗糙的样式,主要区别是: \begin{itemize} @@ -293,47 +318,47 @@ Référence du théorème: \cref{thm:abc} \begin{tip} 在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅度。使用 \verb|fast| 模式时会有“DRAFT”字样的水印,以提示目前处于草稿阶段。 \end{tip} - \item \texttt{a4paper} 或 \texttt{b5paper} + \item \classoption{a4paper} 或 \classoption{b5paper} \begin{itemize} \item 可选的纸张大小。默认的纸张大小为 7in $\times$ 10in。 \end{itemize} - \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{noto}、\texttt{biolinum} ~$|$~ \texttt{useosf} + \item \classoption{palatino}、\classoption{times}、\classoption{garamond}、\classoption{noto}、\classoption{biolinum} ~$|$~ \classoption{useosf} \begin{itemize} \item 字体选项。顾名思义,会加载相应名称的字体。 - \item \texttt{useosf} 选项用来启用“旧式”数字。 + \item \classoption{useosf} 选项用来启用“旧式”数字。 \end{itemize} - \item \texttt{use boldface} + \item \classoption{use boldface} \begin{itemize} \item 允许加粗。启用这一选项时,题目、各级标题、定理类环境名称会被加粗。 \end{itemize} - \item \texttt{classical} + \item \classoption{classical} \begin{itemize} \item 经典模式。使用这一选项时,将会启用较为古色古香的风格,如同当前的这篇说明文档一样。 \end{itemize} - \item \texttt{useindent} + \item \classoption{useindent} \begin{itemize} \item 采用段首缩进而不是段间间距。 \end{itemize} - \item \texttt{runin} + \item \classoption{runin} \begin{itemize} \item \lstinline|\subsubsection| 采用 ``runin'' 风格。 \end{itemize} - \item \texttt{nothms} + \item \classoption{nothms} \begin{itemize} \item 纯文本模式,不加载定理类环境。 \end{itemize} - \item \texttt{nothmnum}、\texttt{thmnum} 或 \texttt{thmnum=}\meta{counter} + \item \classoption{nothmnum}、\classoption{thmnum} 或 \classoption{thmnum=}\meta{counter} \begin{itemize} \item 定理类环境均不编号 / 按照 1、2、3 顺序编号 / 在 \meta{counter} 内编号。在没有使用任何选项的情况下将按照 \texttt{chapter} (书) 或 \texttt{section} (文章) 编号。 \end{itemize} - \item \texttt{regionalref}、\texttt{originalref} + \item \classoption{regionalref}、\classoption{originalref} \begin{itemize} - \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \texttt{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \texttt{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。 - \item 在 \texttt{fast} 模式下,\texttt{originalref} 将不起作用。 + \item 在智能引用时,定理类环境的名称是否随当前语言而变化。默认为 \classoption{regionalref},即引用时采用当前语言对应的名称;例如,在中文语境中引用定理类环境时,无论原环境处在什么语境中,都将使用名称“定理、定义……”。若启用 \classoption{originalref},则引用时会始终采用定理类环境所处语境下的名称;例如,在英文语境中书写的定理,即使稍后在中文语境下引用时,仍将显示为 Theorem。 + \item 在 \texttt{fast} 模式下,\classoption{originalref} 将不起作用。 \end{itemize} \end{itemize} \bigskip -另外,排版图书时常用的 \texttt{oneside}、\texttt{twoside} 选项也是可以使用的。默认采用双页排版。 +另外,排版图书时常用的 \classoption{oneside}、\classoption{twoside} 选项也是可以使用的。默认采用双页排版。 \LevelOneTitle{具体说明} |