diff options
Diffstat (limited to 'macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex')
-rw-r--r-- | macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex | 125 |
1 files changed, 73 insertions, 52 deletions
diff --git a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex index 55e53b41af..c5140be7d8 100644 --- a/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex +++ b/macros/unicodetex/latex/lebhart/lebhart-doc-cn.tex @@ -16,38 +16,66 @@ %% 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, +\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, } -\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$} -\lstset{moretexcs=% - {part,parttext,chapter,section,subsection,subsubsection,frontmatter,mainmatter,backmatter,tableofcontents,href, - color,NameTheorem,CreateTheorem,cref,DNF,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,TheDate,ProjLib,qedhere - } +\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, + } } -\lstnewenvironment{code}% -{\setstretch{1.07}% -\setkeys{lst}{columns=fullflexible,keepspaces=true}% -}{} -\lstnewenvironment{code*}% -{\setstretch{1.07}% -\setkeys{lst}{numbers=left,columns=fullflexible,keepspaces=true}% -}{} +\lstset{% LaTeX3 commands + classoffset = 1, + texcsstyle =* \color{code-expl3}, + moretexcs = + { + } +} +\lstnewenvironment{code}{\setstretch{1.05}}{\vspace{-.3\baselineskip}\vspace{-.5\parskip}} +\lstnewenvironment{code*}{\setstretch{1.05}\lstset{numbers=left}}{\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 @@ -91,7 +119,7 @@ %%================================ \begin{document} -\def\PackageVersion{2022/06/16} +\def\PackageVersion{2022/09/03} \title{{\normalfont\bfseries\color{main-text}\lebhart{}}\\以多彩的方式排版你的文章} \author{许锦文} @@ -106,7 +134,7 @@ \lebhart{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。 - 这篇说明文档即是用 \lebhart{} 排版的 (使用了参数 \texttt{use boldface}),你可以把它看作一份简短的说明与演示。 + 这篇说明文档即是用 \lebhart{} 排版的 (使用了参数 \classoption{use boldface}),你可以把它看作一份简短的说明与演示。 \end{abstract} @@ -286,13 +314,6 @@ Référence du théorème: \cref{thm:abc} \end{tip} -\begin{tip} -如果你喜欢这个文档类,但又希望使用一种更加中规中矩的样式,那么不妨使用 \texttt{classical} 选项,就像这样: - -\begin{code} -\documentclass[classical]{lebhart} -\end{code} -\end{tip} \bigskip @@ -308,13 +329,13 @@ Référence du théorème: \cref{thm:abc} \lebhart{} 文档类有下面几个选项: -\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} @@ -326,35 +347,35 @@ 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 可选的纸张大小。默认的纸张大小为 8.5in $\times$ 11in。 \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{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 在 \classoption{fast} 模式下,\classoption{originalref} 将不起作用。 \end{itemize} \end{itemize} |