summaryrefslogtreecommitdiff
path: root/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex')
-rw-r--r--macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex101
1 files changed, 55 insertions, 46 deletions
diff --git a/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex b/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex
index 0a16c1d99b..2261d59a63 100644
--- a/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex
+++ b/macros/unicodetex/latex/simplivre/simplivre-doc-cn.tex
@@ -1,5 +1,8 @@
%! TEX program = xelatex
-\documentclass{simplivre}
+\documentclass[puretext]{simplivre}
+
+\CreateTheorem{definition}<highest>
+\CreateTheorem{theorem}<highest>
\linenumbers % 开启行号
@@ -36,8 +39,8 @@
}
\providecommand{\meta}[1]{$\langle${\normalfont\itshape#1}$\rangle$}
\lstset{moretexcs=%
- {linenumbers,nolinenumbers,part,chapter,section,subsection,
- color,CreateTheorem,proofideanameCN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PJLdate,ProjLib,parttext
+ {linenumbers,nolinenumbers,part,chapter,section,subsection,href,
+ color,NameTheorem,CreateTheorem,proofideanameCN,cref,dnf,needgraph,UseLanguage,UseOtherLanguage,AddLanguageSetting,maketitle,address,curraddr,email,keywords,subjclass,thanks,dedicatory,PJLdate,ProjLib,parttext
}
}
\lstnewenvironment{code}%
@@ -47,10 +50,10 @@
{\ResumeLineNumbers}
%%================================
-%% remind
+%% tip
%%================================
\usepackage[many]{tcolorbox}
-\newenvironment{remind}[1][提示]{%
+\newenvironment{tip}[1][提示]{%
\LocallyStopLineNumbers%
\begin{tcolorbox}[breakable,
enhanced,
@@ -86,9 +89,9 @@
%%================================
\begin{document}
-% \title{\simplivre{},以极简主义风格排版你的图书\thanks{对应版本. \texttt{\simplivre{} 2021/05/23}}}
+% \title{\simplivre{},以极简主义风格排版你的图书\thanks{对应版本. \texttt{\simplivre{} 2021/06/07}}}
% \author{许锦文}
-% \date{2021年5月,北京}
+% \date{2021年6月,北京}
% \maketitle
@@ -99,9 +102,9 @@
\fill [cyan!90!black] ($(current page.south west)+(0,7)$) rectangle ($(current page.north west)+(21,-7)$);
\fill [yellow] (current page.south west) rectangle ($(current page.north west)+(3,0)$);
\node[text width=10cm] at ($(current page.north west)+(8.5,-6)$) {\huge\ProjLib};
- \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-9)$) {\textcolor{white}{\sffamily\simplivre{}\\\hspace*{-.05em}以极简主义风格排版你的图书\\[10pt]\tiny 对应版本. \texttt{\simplivre{} 2021/05/23}}};
+ \node[text width=6cm,text height=3.5cm,scale=2.5] at ($(current page.north west)+(11,-9)$) {\textcolor{white}{\sffamily\simplivre{}\\\hspace*{-.05em}以极简主义风格排版你的图书\\[10pt]\tiny 对应版本. \texttt{\simplivre{} 2021/06/07}}};
\node at ($(current page.south)+(1.5,3)$) {\fontsize{16pt}{0pt}\selectfont\textcolor{gray}{许锦文}};
- \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{2021年5月,北京}};
+ \node at ($(current page.south)+(1.5,2)$) {\fontsize{12pt}{0pt}\selectfont\textcolor{gray}{2021年6月,北京}};
\end{tikzpicture}%
\end{titlepage}%
\cleardoublepage%
@@ -110,14 +113,14 @@
\simplivre{} 是 \minimalist{} 文档类系列的成员之一,其名称取自于法文的 simple (“简约”),以及 livre (“书”),由二者组合而成。整个 \minimalist{} 系列包含用于排版文章的 \minimart{}、\einfart{} 以及用于排版书的 \minimbook{}、\simplivre{}。我设计这一系列的初衷是为了撰写草稿与笔记,使之看上去简朴而不简陋。
-\simplivre{} 支持英文、法文、德文、中文、日文、俄文六种语言,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
+\simplivre{} 支持英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文,并且同一篇文档中这些语言可以很好地协调。由于采用了自定义字体,需要用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎进行编译。
这篇说明文档即是用 \simplivre{} 排版的,你可以把它看作一份简短的说明与演示。
\bigskip
-\begin{remind}
+\begin{tip}
多语言支持、定理类环境、未完成标记等功能是由 \ProjLib{} 工具箱提供的,这里只给出了将其与本文档类搭配使用的要点。如需获取更详细的信息,可以参阅 \ProjLib{} 的说明文档。
-\end{remind}
+\end{tip}
\tableofcontents
@@ -138,9 +141,9 @@
即可使用 \simplivre{} 文档类。
-\begin{remind}[请注意]
+\begin{tip}[请注意]
要使用 \hologo{XeLaTeX} 或 \hologo{LuaLaTeX} 引擎才能编译。
-\end{remind}
+\end{tip}
\section{选项}
@@ -160,6 +163,10 @@
\begin{itemize}
\item 可选的纸张大小。默认的纸张大小为 7in $\times$ 10in。
\end{itemize}
+ \item \texttt{palatino}、\texttt{times}、\texttt{garamond}、\texttt{biolinum}
+ \begin{itemize}
+ \item 字体选项。顾名思义,会加载相应名称的字体。
+ \end{itemize}
\item \texttt{allowbf}
\begin{itemize}
\item 允许加粗。启用这一选项时,题目、各级标题、定理类环境名称会被加粗。
@@ -170,12 +177,12 @@
\end{itemize}
\end{itemize}
-\begin{remind}
+\begin{tip}
\begin{itemize}
\item 在文章的撰写阶段,建议使用 \verb|fast| 选项以加快编译速度,改善写作时的流畅程度。在最后,可以把 \verb|fast| 标记去除,从而得到正式的版本。使用 \verb|fast| 模式时会有“DRAFT”字样的水印,以提示目前处于草稿阶段。
\item 如果你喜欢更加传统的样式,\texttt{allowbf} + \texttt{classical} 是一个不错的搭配。
\end{itemize}
-\end{remind}
+\end{tip}
\bigskip
另外,排版图书时常用的 \texttt{oneside}、\texttt{twoside} 选项也是可以使用的。默认采用双页排版。
@@ -183,13 +190,13 @@
\chapter{关于文档类中使用的字体}
\simplivre{} 默认使用 Palatino Linotype 作为英文字体,方正悠宋、悠黑GBK作为中文字体,并部分使用了 Neo Euler 作为数学字体。其中,Neo Euler可以在 \url{https://github.com/khaledhosny/euler-otf} 下载。其他字体不是免费字体,需要自行购买使用。可以在方正字库网站查询详细资料:\url{https://www.foundertype.com}。
-\begin{remind}[字体演示]
+\begin{tip}[字体演示]
\begin{itemize}
\item English main font. \textsf{English sans serif font}. \texttt{English typewriter font}.
\item 中文主要字体,\textsf{中文无衬线字体}
\item 数学示例: \( \alpha, \beta, \gamma, \delta, 1,2,3,4, a,b,c,d \), \[\mathrm{li}(x)\coloneqq \int_2^{\infty} \frac{1}{\log t}\,\mathrm{d}t \]
\end{itemize}
-\end{remind}
+\end{tip}
\bigskip
在没有安装相应的字体时,将采用TeX Live中自带的字体来代替,效果可能会有所折扣。
@@ -197,11 +204,13 @@
\chapter{使用说明}
+\vspace{-\baselineskip}
+
接下来介绍的许多功能是由 \ProjLib{} 工具箱提供的。这里只介绍了基本使用方法,更多细节可以直接参阅其用户文档。
\section{语言设置}
-\simplivre{} 提供了多语言支持,包括简体中文、繁体中文、英文、法文、德文、日文、俄文。可以通过下列命令来选定语言:
+\simplivre{} 提供了多语言支持,包括英语、法语、德语、意大利语、葡萄牙语、巴西葡萄牙语、西班牙语、简体中文、繁体中文、日文、俄文。可以通过下列命令来选定语言:
\begin{itemize}
\item \lstinline|\UseLanguage{|\meta{language name}\lstinline|}|,用于指定语言,在其后将使用对应的语言设定。
\begin{itemize}
@@ -213,15 +222,19 @@
\end{itemize}
\end{itemize}
-\meta{language name} 有下列选择:
+\meta{language name} 有下列选择 (不区分大小写,如 \texttt{French} 或 \texttt{french} 均可):
\begin{itemize}
- \item 简体中文:\texttt{Chinese}、\texttt{chinese}、\texttt{SChinese}、\texttt{schinese}、\texttt{SimplifiedChinese} \\\hspace*{5em}或 \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}
+ \item 简体中文:\texttt{CN}、\texttt{Chinese}、\texttt{SChinese} 或 \texttt{SimplifiedChinese}
+ \item 繁体中文:\texttt{TC}、\texttt{TChinese} 或 \texttt{TraditionalChinese}
+ \item 英文:\texttt{EN} 或 \texttt{English}
+ \item 法文:\texttt{FR} 或 \texttt{French}
+ \item 德文:\texttt{DE}、\texttt{German} 或 \texttt{ngerman}
+ \item 意大利语:\texttt{IT} 或 \texttt{Italian}
+ \item 葡萄牙语:\texttt{PT} 或 \texttt{Portuguese}
+ \item 巴西葡萄牙语:\texttt{BR} 或 \texttt{Brazilian}
+ \item 西班牙语:\texttt{ES} 或 \texttt{Spanish}
+ \item 日文:\texttt{JP} 或 \texttt{Japanese}
+ \item 俄文:\texttt{RU} 或 \texttt{Russian}
\end{itemize}
另外,还可以通过下面的方式来填加相应语言的设置:
@@ -243,11 +256,11 @@
定义、定理等环境已经被预定义,可以直接使用。
具体来说,预设的定理类环境包括:
-\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{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|*| 的无编号版本。
在引用定理类环境时,建议使用智能引用 \lstinline|\cref{|\meta{label}\lstinline|}|。这样就不必每次都写上相应环境的名称了。
-\begin{remind}[例子]
+\begin{tip}[例子]
\begin{code}
\begin{definition}[奇异物品] \label{def: strange} ...
\end{code}
@@ -266,25 +279,20 @@
\end{theorem}
默认情况下,引用时,定理的名称总是与定理所在区域的语言匹配,例如,上面的定义在现在的英文模式下依然显示为中文:\cref{def: strange} 和 \cref{thm}。如果在引用时想让定理的名称与当前语境相匹配,可以在全局选项中加入 \texttt{regionalref}。
-\end{remind}
+\end{tip}
\UseLanguage{Chinese}
\section{定义新的定理型环境}
-若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称 \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}
-
-\vspace{-0.3\baselineskip}
-\begin{remind}
- 如果要定义名称后带有星号 \lstinline|*| 的环境,那么在上面的 \meta{name of environment} 中不用写星号。
-\end{remind}
+若需要定义新的定理类环境,首先要定义这个环境在所用语言下的名称:
+% \vspace{-.15\baselineskip}%
+\begin{itemize}
+ \item \lstinline|\NameTheorem[|\meta{language name}\lstinline|]{|\meta{name of environment}\lstinline|}{|\meta{name string}\lstinline|}|
+\end{itemize}
+% \vspace{-.15\baselineskip}%
+其中,\meta{language name} 可参阅关于语言设置的小节。当不指定 \meta{language name}时,则会将该名称设置为所有支持语言下的名称。另外,带星号与不带星号的同名环境共用一个名称,因此 \lstinline|\NameTheorem{envname*}{...}| 与 \lstinline|\NameTheorem{envname}{...}| 效果相同。
然后用下面五种方式之一定义这一环境:
\begin{itemize}
@@ -316,11 +324,12 @@
\end{itemize}
\end{itemize}
-\begin{remind}
+\begin{tip}
其内部使用了 \textsf{amsthm},因此传统的 \texttt{theoremstyle} 对其也是适用的,只需在相关定义前标明即可。
-\end{remind}
+\end{tip}
-\def\proofideanameCN{思路}
+% \def\proofideanameCN{思路}
+\NameTheorem[CN]{proofidea}{思路}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<section>
@@ -328,7 +337,7 @@
下面提供一个例子。这三行代码:
\begin{code}
- \def\proofideanameCN{思路}
+ \NameTheorem[CN]{proofidea}{思路}
\CreateTheorem*{proofidea*}
\CreateTheorem{proofidea}<section>
\end{code}