diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/lshort-chinese/src/chap/chap.08.custom.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/lshort-chinese/src/chap/chap.08.custom.tex | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/Master/texmf-dist/doc/latex/lshort-chinese/src/chap/chap.08.custom.tex b/Master/texmf-dist/doc/latex/lshort-chinese/src/chap/chap.08.custom.tex index 98889ecfb29..bf0954a7073 100644 --- a/Master/texmf-dist/doc/latex/lshort-chinese/src/chap/chap.08.custom.tex +++ b/Master/texmf-dist/doc/latex/lshort-chinese/src/chap/chap.08.custom.tex @@ -112,7 +112,7 @@ My humble subjects \ldots 建立一个新的 \LaTeX\ 宏包来存放所有你自己定义的命令和环境, 然后在你的文档中使用 \cmd{use\-package} 命令来调用自定义的宏包。 -\begin{sourcecode}[htbp] +\begin{sourcecode}[htp] \begin{Verbatim} % Demo Package by Tobias Oetiker \ProvidesPackage{demopack} @@ -132,7 +132,7 @@ My humble subjects \ldots \cmd{ProvidesPackage}\marg{package name} \end{command} 这个命令应该放在你的宏包的最前面,并且一定要注意:\textbf{\Arg{package name} 需要和宏包的文件名一致。} -\cmd{Provides\-Package} 让 \LaTeX\ 记录宏包的名称,从而在你尝试再次调用同一个宏包的时候忽略后面的调用% +\cmd{Provides\-Package} 让 \LaTeX\ 记录宏包的名称,从而在 \cmd{usepackage} 命令再次调用同一个宏包的时候忽略之% \footnote{但如果你以\emph{不同的选项}多次引入宏包,则有可能会引起错误,见附录 \ref{sec:errors}。}。 源代码 \ref{code:package} 给出了一个小的宏包示例,其中包含了我们之前定义的一些命令。 @@ -167,14 +167,13 @@ My humble subjects \ldots \section{计数器}\label{sec:counters} \pinyinindex{jishuqi}{计数器} -我们早就见识到了 \LaTeX\ 对文档元素自动计数的能力:章节符号、列表、图表……它们都是依靠 \LaTeX\ 提供的“计数器”完成的。 +我们早就见识到了 \LaTeX\ 对文档元素自动计数的能力:章节符号、列表、图表……它们都是依靠 \LaTeX\ 提供的计数器功能完成的。 \subsection{定义和修改计数器}\label{subsec:count-defs} \cmdindex{newcounter} 定义一个计数器的方法为: \begin{command} -\cmd{newcounter}\marg{counter name} \\ \cmd{newcounter}\marg{counter name}\oarg{parent counter name} \end{command} @@ -203,18 +202,27 @@ My humble subjects \ldots \begin{table}[htp] \centering \caption{计数器输出格式相关命令。}\label{tbl:counter-commands} -\begin{tabular}{lp{12em}l} +\begin{tabular}{lp{22em}l} \hline \textbf{命令} & \textbf{样式} & \textbf{范围} \\ \hline \cmd{arabic} & 阿拉伯数字(默认) & \\ \cmd{alph} & 小写字母 & 限 0-26 \\ \cmd{Alph} & 大写字母 & 限 0-26 \\ - \cmd{roman} & 小写罗马数字 & 限正数 \\ - \cmd{Roman} & 大写罗马数字 & 限正数 \\ + \cmd{roman} & 小写罗马数字 & 限非负整数 \\ + \cmd{Roman} & 大写罗马数字 & 限非负整数 \\ \cmd{fnsymbol} & 一系列符号,用于 \cmd{thanks} 命令生成的脚注 & 限 0-9 \\ \hline \end{tabular} +\begin{quotation} +\small +\makeatletter +注:\cmd{fnsymbol} 使用的符号顺次为: +\@fnsymbol{1} \@fnsymbol{2} \@fnsymbol{3} +\@fnsymbol{4} \@fnsymbol{5} \@fnsymbol{6} +\@fnsymbol{7} \@fnsymbol{8} \@fnsymbol{9} +\makeatother +\end{quotation} \end{table} 计数器的输出格式还可以利用其它字符,甚至其它计数器的输出格式与之组合。如标准文档类里对 \cmd{sub\-section} 相关的计数器的输出格式的定义相当于: @@ -225,9 +233,9 @@ My humble subjects \ldots \subsection{\LaTeX\ 中的计数器}\label{subsec:latex-counts} \begin{itemize} - \item 我们当然早就意识到了,所有章节命令 \cmd{chapter}、\cmd{section} 等分别对应计数器 chapter、section 等等,而且有上下级的关系。 + \item 所有章节命令 \cmd{chapter}、\cmd{section} 等分别对应计数器 chapter、section 等等,而且有上下级的关系。 而计数器 part 是独立的。 - \item 有序列表 \env{enumerate} 的各级计数器为 enumi, enumii, enumiii, enumiv,也是有上下级的关系。 + \item 有序列表 \env{enumerate} 的各级计数器为 enumi, enumii, enumiii, enumiv,也有上下级的关系。 \item 图表浮动体的计数器就是 table 和 figure;公式的计数器为 equation。 这些计数器在 \cls{article} 文档类中是独立的,而在 \cls{book} 和 \cls{report} 中以 chapter 为上级计数器。 \item 页码、脚注的计数器分别是 page 和 footnote。 @@ -286,7 +294,7 @@ tocdepth 计数器控制目录的深度,如果章节的层级大于 tocdepth 大多数控制页面尺寸的长度参数在图 \ref{fig:layouts} 给出,此处不再赘述。 \end{itemize} -\begin{table}[htbp] +\begin{table}[htp] \centering \caption{\LaTeX\ 可定制的标题名称/前后缀。}\label{tbl:latex-settings-names} \small @@ -312,11 +320,11 @@ tocdepth 计数器控制目录的深度,如果章节的层级大于 tocdepth \end{tabular} \begin{quotation}\footnotesize% 注:形如“第 X 章”和“第 X 部分”的中文章节标题不能直接由修改本表的命令得到,需要使用 \pkg{titlesec} 等宏包定制。 -如果使用 \pkg{ctex} 宏包或文档类,那么标题默认被修改成“第 X 章”和“第 X 部分”的形式,本表中的其它标题也修改为中文标题。详见 \pkg{ctex} 宏包的帮助手册。 +如果使用 \pkg{ctex} 宏包或文档类,那么标题默认被修改成“第 X 章”和“第 X 部分”的形式,本表中的其它标题也修改为中文标题。详见 \pkg{ctex} 宏包的帮助文档。 \end{quotation} \end{table} -\begin{table}[htbp] +\begin{table}[htp] \centering \caption{\LaTeX\ 可定制的长度参数。}\label{tbl:latex-settings-lengths} \small |