diff options
author | Karl Berry <karl@freefriends.org> | 2014-11-13 23:53:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-11-13 23:53:39 +0000 |
commit | e0056016e425d97e79d80fdee01acf4cd84c1d8d (patch) | |
tree | c6024370d669e546e6c66fca1784ec0a980e8694 /Master/texmf-dist/doc/plain | |
parent | c3397e2195329b400975b069f1f6e3b2092f84a8 (diff) |
impatient-cn (13nov14)
git-svn-id: svn://tug.org/texlive/trunk@35576 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/plain')
30 files changed, 41492 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/plain/impatient-cn/Makefile b/Master/texmf-dist/doc/plain/impatient-cn/Makefile new file mode 100644 index 00000000000..63c0d7841ce --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/Makefile @@ -0,0 +1,15 @@ +# public domain +all: book.dvi book.pdf #book.html + +book.dvi: fdl.tex preface.tex + tex '\nonstopmode\input book' +book.pdf: fdl.tex preface.tex + pdftex '\nonstopmode\input book' +book.html: + httex book.tex + +dist: all + rm -f x.tex + tar czf impatient.tgz Makefile README *.icn \ + *.tex book.aux book.idx book.toc book.ccs book.sdx \ + book.dvi book.pdf diff --git a/Master/texmf-dist/doc/plain/impatient-cn/backm.tex b/Master/texmf-dist/doc/plain/impatient-cn/backm.tex new file mode 100644 index 00000000000..4bb2ff27170 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/backm.tex @@ -0,0 +1,97 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. +% +% Backmatter. + +\input macros + +\ifcompletebook + \noheadlinetrue\pagebreak + \ifodd\pageno\else \noheadlinetrue\pagebreak \fi +\fi + +\edgetabsfalse + +% About the authors. +% +\backsinkage +%\leftline{\sectionfonts About the authors} +\bookmark{1}{作者简介}% +\leftline{\sectionfonts 作者简介} +\vskip\belowsectionskip + +\noindent Paul W. Abrahams, Sc.D., CCP, is a consulting computer +scientist and a past president of the Association for Computing +Machinery. His specialties are programming languages, software systems +design and implementation, and technical writing. He received his +doctorate from the Massachusetts Institute of Technology in 1963 in +mathematics, studying artificial intelligence under Marvin Minsky and +John McCarthy. He is one of the designers of the first {\sc LISP} +system and the designer of the {\sc CIMS PL/I} system, developed when he +was a professor at New York University. More recently, he has designed +{\sc SPLASH}, a Systems Programming LAnguage for Software Hackers. Paul +resides in Deerfield, Massachusetts, where he writes, hacks, hikes, +hunts wild mushrooms, and listens to classical music. + +Kathryn A. Hargreaves received her M.S. degree in computer science from +the University of Massachusetts, Boston, in August 1989. Her +specialities are digital typography and human vision. She developed a +set of programs to produce high-quality, freely distributable digital +type for the Free Software Foundation and also worked with +Robert~A. Morris as an Adjunct Research Associate. In 1986 she completed +the Reentry Program in Computer Science for Women and Minorities at the +University of California at Berkeley, where she also worked in the \TeX\ +research group under Michael Harrison. She has studied letterform design +with Don Adleta, Andr\'e G\"urtler, and Christian Mengelt at the Rhode +Island School of Design. A journeyman typographer, she has worked at +Headliners\slash Identicolor, San Francisco, and Future Studio, Los +Angeles, two leading typographical firms. She also holds an M.F.A. in +Painting\slash Sculpture\slash Graphic Arts from the University of +California at Los Angeles. Kathy paints watercolors, designs +letterforms, plays piano, and reads feminist film criticism. + +Like Kathy, Karl Berry received his M.S. degree in computer science from +the University of Massachusetts, Boston, in August 1989. He also +worked for the Free Software Foundation, did research with Morris, +and has studied with Adleta, G\"urtler, and Mengelt. He has been +working with \TeX\ since 1983 and has installed and maintained the \TeX\ +system at a number of universities. He was the maintainer of the Web2c +system developed by Tim Morgan for a number of years, among other \TeX\ +projects. He became the president of the \TeX\ Users Group in 2003. + +\noheadlinetrue\pagebreak + + +% Colophon. +% +\backsinkage +%\leftline{\sectionfonts Colophon} +\bookmark{1}{书尾}% +\leftline{\sectionfonts 书尾} +\vskip\belowsectionskip + +\noindent This book was composed using \TeX\ (of course), developed by +Donald~E. Knuth. The main text is set in Computer Modern, also designed +by Knuth. The heads of the original book were set in Zapf Humanist (the +Bitstream version of Optima), designed by Hermann Zapf. + +The paper was Amherst Ultra Matte 45 lb. The printing and binding were +done by Arcadia Graphics-Halliday. The phototypeset output was produced +at Type 2000,~Inc., in Mill Valley, California. Proofs were made on an +Apple LaserWriter Plus and on a Hewlett Packard LaserJet~II\null. + +Cross-referencing, indexing, and the table of contents were done +mechanically, using the macros of \chapterref{eplain} together with +additional macros custom-written for this book. The production of the +index was supported by an additional program written in Icon. + + +\noheadlinetrue +\iftrue + \pagebreak + \printconceptpage +\fi + +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/book.tex b/Master/texmf-dist/doc/plain/impatient-cn/book.tex new file mode 100644 index 00000000000..2077adb081a --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/book.tex @@ -0,0 +1,63 @@ +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +% Top-level control. +% +\input macros +% Here we override part of the configuration +% since we're doing a full run. +\rewritetocfiletrue % always do a table of contents +\xrefwarningtrue +\completebooktrue +\edgetabsfalse +\includeartwork{0cover} +\input frontm +% (not for web) +\edgetabstrue +\settabdepth{\bigtab} +\includeartwork{0watchrock} +\input usebook +\includeartwork{ch01-usingbook} +\input usingtex +\includeartwork{ch02-usingtex} +\input examples +\includeartwork{ch03-examples} +\nextedgetab +\input concepts +\includeartwork{ch04-concepts} +\nextedgetab +\settabdepth{\smalltab} +\input paras +\includeartwork{ch05-para} +\nextedgetab +\input pages +\includeartwork{ch06-pages} +\nextedgetab +\input modes +\includeartwork{ch07-horizvert} +\nextedgetab +\input math +\includeartwork{ch08-math} +\nextedgetab +\input genops +\includeartwork{ch09-general} +\nextedgetab +\settabdepth{\bigtab} +\input tips +\includeartwork{ch10-tips} +\input errors +\includeartwork{ch11-errors} +\input usermacs +\includeartwork{ch12-compendium} +\nextedgetab +\input capsule +\includeartwork{ch13-summary} +\nextedgetab +\backmatter +\input fdl +\input index +\edgetabsfalse +\input backm + +\bye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/capsule.tex b/Master/texmf-dist/doc/plain/impatient-cn/capsule.tex new file mode 100644 index 00000000000..e9a0cdb0460 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/capsule.tex @@ -0,0 +1,2000 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\chapter{Capsule summary \linebreak of commands} +\chapter{命令速查表} + +\chapterdef{capsule} + +%This section contains one-line descriptions of the primitive \TeX\ +%commands and the \TeX\ commands defined in \plainTeX. These include both +%control sequences and +%special characters. +%We've omitted those commands that are only intended for internal use +%in the +%\plainTeX\ definition (\knuth{Appendix~B}). +%Note that ordinary characters +%such as `|a|' or `|6|' are also commands, and indeed the most common +%ones \seeconcept{character}. +这一章将简单地描述原始的 \TeX\ 与 \plainTeX\ 中定义的命令,包括控制序列与特殊字符。 +我们忽略了那些只在 \plainTeX\ 定义内部使用的命令。需要注意的是,普通字符, +如 `|a|' 或 `|6|' 也是命令,并且是最常见的命令\seeconcept{字符}。 + +%To keep the descriptions brief, we've adopted +%certain conventions: +为了保持描述的简洁,我们采用如下惯例。 + +\ulist + +%\li An asterisk in front of a command indicates that the command is primitive, +%^^{primitive//command} i.e., built into the \TeX\ computer program +%\seeconcept{primitive}. +\li 命令前面的星号表明该命令是原始的^^{原始的//原始命令}, +即内建于 \TeX\ 计算程序中的命令\seeconcept{原始的}。 + +%\li The words ``music'', ``punctuation'', ``function'', +%``symbol'', ``relation'', ``delimiter'', or ``operator'' in a command +%description imply that the command is only legal in math modes. +\li 在命令描述中出现“音乐”、“标点”、“函数”、“符号”、“关系”、 +“定界符”、“运算符”,则暗示该命令只在数学模式中有效。 + +%\li The verb ``display'' applies to information +%that \TeX\ sends to the ^{log file}, unless otherwise indicated. If +%|\tracingonline| is positive, \TeX\ also sends that output to the +%terminal. We use the noun ``display'' to refer to math displays (see +%\xref{display math}), i.e., material between |$$|'s. +\li 除非有其它说明,“显示”一词应用于 \TeX\ 发送至^{日志文件}中的信息。 +如果 |\tracingonline| 是正值,\TeX\ 也会将其发送至终端。 +我们使用名词“陈列”表示陈列公式(参见\xref{陈列公式}),即在 |$$| 之间的内容。 + +%\li The phrase ``produce $x$'' indicates that the command will typeset +%$x$ and put the result in a box. +%We sometimes omit ``produce'' when the omission is unlikely to +%cause confusion. For example, we describe |\alpha| as ``math Greek +%letter $\alpha$'', not ``produce the math Greek letter $\alpha$''. +\li 短语“输出 $x$”表明指定命令将对 $x$ 进行排版,并将结果放在盒子中。 +在不会引起歧义的情况下,我们有时会省略“输出”一词。 +比如,我们对 |\alpha| 的描述是“数学希腊字母 $\alpha$”,而不是“输出数学希腊字母 $\alpha$”。 +%\margin{Remove explanations of ``space'' and ``glue''} +\margin{去掉了对 ``space'' 和 ``glue'' 的解释} + +\endulist + +\begincapsum + +\writeidxfalse +{\catcode `@ = \letter +%\caplineout {\\\visiblespace} {interword space}*{\@space}}% +\caplineout {\\\visiblespace} {字间间隔}*{\@space}}% + {\catcode `\ =\other\ctsidxref{ }} +%\capcs ! {negative thin space for math}{}{\@shriek} +\capcs ! {数学中的负的细小间隔}{}{\@shriek} +%\capcs " {umlaut accent for text, as in \"o}{}{\@quote} +\capcs " {文本中的元音变音符,比如 \"o 中那样}{}{\@quote} +%\capactwo # {introduce a macro parameter, or indicate where the text of +% an entry goes in an alignment preamble}{}{@msharp:@asharp} +\capactwo # {引入宏参数,或在对齐导言中指示文本条目的位置}{}{@msharp:@asharp} +%\capcs # {produce \# character from current font}{}{\@pound} +\capcs # {从当前字体中输出 \# 字符}{}{\@pound} +%\capac $ {begin or end a math formula}{}{mathform} +\capac $ {开始或结束数学公式}{}{mathform} +%\capcs $ {produce \$ character from current font}{}{\@bucks} +\capcs $ {从当前字体中输出 \$ 字符}{}{\@bucks} +%\capac % {begin a comment}*{comments} +\capac % {开始注释}*{comments} +%\capcs % {produce \% character from current font}{}{\@percent} +\capcs % {从当前字体中输出 \% 字符}{}{\@percent} +%\capac & {separate templates and entries in an alignment}{}{@and} +\capac & {在对齐中分隔模板与条目}{}{@and} +%\capcs & {produce \& character from current font}{}{\@and} +\capcs & {从当前字体中输出 \& 字符}{}{\@and} +%\capac ' {prime symbol for math, as in $p'$}{}{@prime} +\capac ' {数学中的素数符号,比如 $p'$ 中那样}{}{@prime} +%\capcs ' {acute accent for text, as in \'e}{}{\@prime} +\capcs ' {文本中的尖音符,比如 \'e 中那样}{}{\@prime} +%\capcs * {multiplication symbol that allows a line break}{}{\@star} +\capcs * {允许断行的乘号}{}{\@star} +%\capcs + {begin tabbed line}{}{\@plus} +\capcs + {开始制表符行}{}{\@plus} +%\capcs , {thin space for math}{}{\@comma} +\capcs , {数学中的细小间隔}{}{\@comma} +%\capcs - {specify a legal hyphenation point}*{\@minus} +\capcs - {指定合法的断字点}*{\@minus} +%\capcs . {dot accent for text, as in \.n}{}{\@dot} +\capcs . {文本中的点重音符,比如 \.n 中那样}{}{\@dot} +%\capcs / {italic correction for the previous character}*{\@slash} +\capcs / {对之前字符的斜体校正}*{\@slash} +%\capcs ; {thick space for math}{}{\@semi} +\capcs ; {数学中的较大间隔}{}{\@semi} +%\capcs = {macron accent for text, as in \=r}{}{\@equal} +\capcs = {文本中的长音符号,比如 \=r 中那样}{}{\@equal} +%\capac \ {begin a control sequence}*{@backslash} +\capac \ {开始控制序列}*{@backslash} +%\capcs > {medium space for math}{}{\@greater} +\capcs > {数学中的中等间隔}{}{\@greater} +%\capac ^ {produce a specified subformula as a superscript}{}{@hat} +\capac ^ {以上标形式输出指定的子公式}{}{@hat} +%\capcs ^ {circumflex accent for text, as in \^o}{}{\@hat} +\capcs ^ {文本中的抑扬符号,比如 \^o 中那样}{}{\@hat} +{\catcode `@ = \letter +%\caplineout {\twocarets L}{equivalent to the |\\par| primitive} +% {}{\@par}\ttidxref{^^L} +\caplineout {\twocarets L}{等同于原始的 |\\par|}{}{\@par}\ttidxref{^^L} +%\caplineout {\twocarets M}{an end-of-line}*{@newline}\ttidxref{^^M} +\caplineout {\twocarets M}{行结束标志}*{@newline}\ttidxref{^^M} +}% +%\capac _ {produce a specified subformula as a subscript}{}{@underscore} +\capac _ {以下标形式输出指定的子公式}{}{@underscore} +%\capcs _ {underscore: \_}{}{\@underscore} +\capcs _ {底线:\_}{}{\@underscore} +%x \capac ` {in a \<number> context, \ascii\ code for character that follows}*{@lquote} +%\capcs ` {grave accent for text, as in \`e}{}{\@lquote} +\capcs ` {文本中的抑音符,比如 \`e 中那样}{}{\@lquote} +%\capac { {start a group}{}{@lbrace} +\capac { {开始编组}{}{@lbrace} +%\capcs { {left brace delimiter for math: $\{$}{}{\@lbrace} +\capcs { {数学中的左大括号定界符:$\{$}{}{\@lbrace} +%\capcs | {parallel lines for math: $\Vert$}{}{\@bar} +\capcs | {数学中的平行线:$\Vert$}{}{\@bar} +%\capac } {end a group}{}{@rbrace} +\capac } {结束编组}{}{@rbrace} +%\capcs } {right brace delimiter for math: $\}$}{}{\@rbrace} +\capcs } {数学中的右大括号定界符:$\}$}{}{\@rbrace} +%\capac ~ {interword space at which a line will not break}{}{@not} +\capac ~ {字间间隔,该处不能断行}{}{@not} +%\capcs ~ {tilde accent for text, as in \~a}{}{\@not} +\capcs ~ {文本中的颚化符,比如 \~a 中那样}{}{\@not} +\writeidxtrue +\bookmark{2}{从A到G}% +%\capcs aa {Scandinavian letter: \aa}{}{} +\capcs aa {斯堪的纳维亚字母: \aa}{}{} +%\capcs AA {Scandinavian letter: \AA}{}{} +\capcs AA {斯堪的纳维亚字母:\AA}{}{} +%\capcs above {produce a fraction with a bar of specified thickness}*{} +\capcs above {输出带有指定厚度横线的分式}*{} +%\capcs abovedisplayshortskip {glue \TeX\ inserts before a display when the +% previous line fits in the display's indentation, by +% default 0\pt\ plus 3\pt}*{} +\capcs abovedisplayshortskip {当前一行可以放在陈列公式的缩进部分时, +\TeX\ 在陈列公式之前插入的粘连,其默认值是 0\pt\ plus 3\pt}*{} +%\capcs abovedisplayskip {glue \TeX\ inserts before a display when the previous +% line doesn't fit in the display's indentation, by default 12\pt\ +% plus 3\pt\ minus 9\pt}*{} +\capcs abovedisplayskip {当前一行不能放在陈列公式的缩进部分时, +\TeX\ 在陈列公式之前插入的粘连,其默认值是 12\pt\ plus 3\pt\ minus 9\pt}*{} +%\capcs abovewithdelims {produce a fraction with a bar of specified thickness +% and surrounded by specified delimiters}*{} +\capcs abovewithdelims {输出带有指定厚度横线且被指定定界符围绕的分式}*{} +%\capcs accent {put specified accent over the next character}*{} +\capcs accent {将指定重间符加在后接字符之上}*{} +%\capcs active {category code for active characters, viz., the number $13$}{}{} +\capcs active {活动字符的类别码,即数字 $13$}{}{} +%\capcs acute {acute accent for math, as in $\acute x$}{}{} +\capcs acute {数学中的尖音符,比如 $\acute x$ 中那样}{}{} +%\capcs adjdemerits {additional demerits for a line break which would result in +% adjacent lines with incompatible word spacing, by default~10000}*{} +\capcs adjdemerits {对造成相邻行单词间距不相容的断行附加的额外缺陷,其默认值为 10000}*{} +%\capcs advance {add a number to a |\\count| register}*{} +\capcs advance {向 |\\count| 寄存器增加一个数}*{} +%\capcs advancepageno {if |\\pageno| is positive, add one; +% if it's negative, subtract one}{}{} +\capcs advancepageno {如果 |\\pageno| 为正值,加一;如果为负值,减一}{}{} +%\capcs ae {\ae\ ligature}{}{} +\capcs ae {\ae\ 连字}{}{} +%\capcs AE {\AE\ ligature}{}{} +\capcs AE {\AE\ 连字}{}{} +%\capcs afterassignment {wait to expand the following token until +% the next assignment is done}*{} +\capcs afterassignment {直到下一赋值完成后才扩展随后的记号}*{} +%\capcs aftergroup {wait to expand the following token until the end +% of the current group}*{} +\capcs aftergroup {直到当前编组结束后才扩展随后的记号}*{} +%\capcs aleph {only Hebrew letter for math: $\aleph$}{}{} +\capcs aleph {数学中唯一的希伯来字母:$\aleph$}{}{} +%\capcstwo allowbreak {do |\\penalty0|, i.e., allow a line or page break +% where one could not ordinarily occur}{}{hallowbreak:vallowbreak} +\capcstwo allowbreak {执行 |\\penalty0|,即在通常不能断行或分页的地方允许断行或分页}{}{hallowbreak:vallowbreak} +%\capcs alpha {math Greek letter $\alpha$}{}{} +\capcs alpha {数学希腊字母 $\alpha$}{}{} +%\capcs amalg {amalgamation operator: $\amalg$}{}{} +\capcs amalg {合并运算符:$\amalg$}{}{} +%\capcs angle {angle symbol: $\angle$}{}{} +\capcs angle {角度符号:$\angle$}{}{} +%\capcs approx {approximation relation: $\approx$}{}{} +\capcs approx {近似关系:$\approx$}{}{} +%\capcs arccos {arc cosine function: $\arccos$}{}{} +\capcs arccos {反余弦函数:$\arccos$}{}{} +%\capcs arcsin {arc sine function: $\arcsin$}{}{} +\capcs arcsin {反正弦函数:$\arcsin$}{}{} +%\capcs arctan {arc tangent function: $\arctan$}{}{} +\capcs arctan {反正切函数:$\arctan$}{}{} +%\capcs arg {argument (phase) function: $\arg$}{}{} +\capcs arg {辐角(相位)函数:$\arg$}{}{} +%\capcs arrowvert {vertical portion of an extensible double arrow}{}{} +\capcs arrowvert {可延长的双箭头的竖直部分}{}{} +%\capcs Arrowvert {vertical portion of an extensible single arrow}{}{} +\capcs Arrowvert {可延长的单箭头的竖直部分}{}{} +%\capcs ast {asterisk operator: $\ast$}{}{} +\capcs ast {星号运算符:$\ast$}{}{} +%\capcs asymp {asymptote relation: $\asymp$}{}{} +\capcs asymp {渐近关系:$\asymp$}{}{} +%\capcs atop {produce a fraction without a fraction bar}*{} +\capcs atop {输出没有横线的分式}*{} +%\capcs atopwithdelims {produce a fraction without a fraction bar and +% surrounded by specified delimiters}*{} +\capcs atopwithdelims {输出没有横线且被指定定界符围绕的分式}*{} +%\capcs b {bar-under accent for math, as in $\b x$}{}{} +\capcs b {数学中下横线重音符,比如 $\b x$ 中那样}{}{} +%\capcs backslash {backslash symbol: $\backslash$}{}{} +\capcs backslash {反斜线符号:$\backslash$}{}{} +%\capcs badness {the badness of the glue setting in the last box +% made}*{} +\capcs badness {在上一个生成的盒子中设定的粘连的劣度}*{} +%\capcs bar {bar accent for math, as in $\bar x$}{}{} +\capcs bar {数学中横线重音符,比如 $\bar x$ 中那样}{}{} +%\capcs baselineskip {glue for the normal vertical distance from one baseline +% to the next, by default 12\pt}*{} +\capcs baselineskip {从一基线到另一基线的正常竖直距离的粘连,其默认值是 12\pt}*{} +%\capcs batchmode {don't stop at errors and don't output to terminal}*{} +\capcs batchmode {不在错误处停下,也不向终端输出}*{} +%\capcs begingroup {start a group to be ended by |\\endgroup|}*{} +\capcs begingroup {开始由 |\\endgroup| 结束的编组}*{} +%\capcs beginsection {begin a major subdivision of a document}{}% +% {\@beginsection} +\capcs beginsection {开始文档的一个主要部分}{}{\@beginsection} +%\capcs belowdisplayshortskip {glue \TeX\ inserts after a display when the +% previous line fits in the display's indentation, +% by default 7\pt\ plus 0.3\pt\ minus 4\pt}*{} +\capcs belowdisplayshortskip {当前一行可以放在陈列公式的缩进部分时, +\TeX\ 在陈列公式之后插入的粘连,其默认值是 7\pt\ plus 0.3\pt\ minus 4\pt}*{} +%\capcs belowdisplayskip {glue \TeX\ inserts after a display when the previous +% line doesn't fit in the display's indentation, +% by default 12\pt\ plus 3\pt\ minus 9\pt}*{} +\capcs belowdisplayskip {当前一行不能放在陈列公式的缩进部分时, +\TeX\ 在陈列公式之后插入的粘连,其默认值是 12\pt\ plus 3\pt\ minus 9\pt}*{} +%\capcs beta {math Greek letter $\beta$}{}{} +\capcs beta {数学希腊字母 $\beta$}{}{} +%\capcs bf {use boldface, i.e., do |\\tenbf\\fam=\\bffam|}{}{} +\capcs bf {使用粗体,即执行 |\\tenbf\\fam=\\bffam|}{}{} +%\capcs bffam {boldface family for math}{}{} +\capcs bffam {数学中的粗体字族}{}{} +%\capcs bgroup {implicit beginning-of-group character}{}{} +\capcs bgroup {隐式编组开始字符}{}{} +%\capcs big {make the specified delimiter larger than an ordinary one, but +% still small enough for text}{}{} +\capcs big {使得指定定界符大于正常大小,但对于文本依旧足够小}{}{} +%\capcs Big {make the specified delimiter about 11.5\pt\ tall}{}{} +\capcs Big {使得指定定界符约 11.5\pt 高}{}{} +%\capcs bigbreak {indicate desirable page break with |\\penalty-200| +% and produce |\\bigskipamount| glue}{}{} +\capcs bigbreak {用 |\\penalty-200| 给出合适分页点, + 并生成大小为 |\\bigskipamount| 的粘连}{}{} +%\capcs bigcap {large cap operator (no, it doesn't produce a large +% capital letter!): $\bigcap$}{}{} +\capcs bigcap {大的求交运算符(它不是用来输出大写字母的!):$\bigcap$}{}{} +%\capcs bigcirc {large circle operator: $\bigcirc$}{}{} +\capcs bigcirc {大的圆圈运算符:$\bigcirc$}{}{} +%\capcs bigcup {large cup operator: $\bigcup$}{}{} +\capcs bigcup {大的求并运算符:$\bigcup$}{}{} +%\capcs bigg {make the specified delimiter about 14.5\pt\ tall}{}{} +\capcs bigg {使得指定定界符高度约 14.5\pt}{}{} +%\capcs Bigg {make specified delimiter about 17.5\pt\ tall}{}{} +\capcs Bigg {使得指定定界符高度约 17.5\pt}{}{} +%\capcs biggl {sized like |\\bigg|, but spaced as an opening}{}{} +\capcs biggl {大小与 |\\bigg| 一样,但间隔与开符号一样}{}{} +%\capcs Biggl {sized like |\\Bigg|, but spaced as an opening}{}{} +\capcs Biggl {大小与 |\\Bigg| 一样,但间隔与开符号一样}{}{} +%\capcs biggm {sized like |\\bigg|, but spaced as a relation}{}{} +\capcs biggm {大小与 |\\bigg| 一样,但间隔与关系符号一样}{}{} +%\capcs Biggm {sized like |\\Bigg|, but spaced as a relation}{}{} +\capcs Biggm {大小与 |\\Bigg|一样,但间隔与关系符号一样}{}{} +%\capcs biggr {sized like |\\bigg|, but spaced as a closing}{}{} +\capcs biggr {大小与 |\\bigg| 一样,但间隔与闭符号一样}{}{} +%\capcs Biggr {sized like |\\Bigg|, but spaced as a closing}{}{} +\capcs Biggr {大小与 |\\Bigg| 一样,但间隔与闭符号一样}{}{} +%\capcs bigl {sized like |\\big|, but spaced as an opening}{}{} +\capcs bigl {大小与 |\\big| 一样,但间隔与开符号一样}{}{} +%\capcs Bigl {sized like |\\Big|, but spaced as an opening}{}{} +\capcs Bigl {大小与 |\\Big| 一样,但间隔与开符号一样}{}{} +%\capcs bigm {sized like |\\big|, but spaced as a relation}{}{} +\capcs bigm {大小与 |\\big|一样,但间隔与关系符号一样}{}{} +%\capcs Bigm {sized like |\\Big|, but spaced as a relation}{}{} +\capcs Bigm {大小与 |\\Big|一样,但间隔与关系符号一样}{}{} +%\capcs bigodot {large circled dot operator: $\bigodot$}{}{} +\capcs bigodot {大的圆圈点运算符:$\bigodot$}{}{} +%\capcs bigoplus {large circled plus operator: $\bigoplus$}{}{} +\capcs bigoplus {大的圆圈加号运算符:$\bigoplus$}{}{} +%\capcs bigotimes {large circled times operator: $\bigotimes$}{}{} +\capcs bigotimes {大的圆圈乘号运算符:$\bigotimes$}{}{} +%\capcs bigr {sized like |\\big|, but spaced as a closing}{}{} +\capcs bigr {大小与 |\\big| 一样,但间隔与闭符号一样}{}{} +%\capcs Bigr {sized like |\\Big|, but spaced as a closing}{}{} +\capcs Bigr {大小与 |\\Big| 一样,但间隔与闭符号一样}{}{} +%\capcs bigskip {produce |\\bigskipamount| glue}{}{} +\capcs bigskip {输出 |\\bigskipamount| 粘连}{}{} +%\capcs bigskipamount {glue for a big vertical skip, by default 12\pt\ +% plus 4\pt\ minus 4\pt}{}{} +\capcs bigskipamount {用于大的竖直间距的粘连,其默认值为 12\pt\ plus 4\pt\ minus 4\pt}{}{} +%\capcs bigsqcup {large square cup operator: $\bigsqcup$}{}{} +\capcs bigsqcup {大的方形求并运算符:$\bigsqcup$}{}{} +%\capcs bigtriangledown {triangle operator pointing downward: +% $\bigtriangledown$}{}{} +\capcs bigtriangledown {向下的三角运算符:$\bigtriangledown$}{}{} +%\capcs bigtriangleup {triangle operator pointing upward: $\bigtriangleup$}{}{} +\capcs bigtriangleup {向上的三角运算符:$\bigtriangleup$}{}{} +%\capcs biguplus {large cupped plus operator: $\biguplus$}{}{} +\capcs biguplus {大的求并的加法运算符:$\biguplus$}{}{} +%\capcs bigvee {large logical ``or'' operator: $\bigvee$}{}{} +\capcs bigvee {大的逻辑“或”运算符:$\bigvee$}{}{} +%\capcs bigwedge {large logical ``and'' operator: $\bigwedge$}{}{} +\capcs bigwedge {大的逻辑“和”运算符:$\bigwedge$}{}{} +%\capcs binoppenalty {additional penalty for breaking after a binary math +% operator, by default~700}*{} +\capcs binoppenalty {一个二元数学运算符后断行或分页的额外惩罚,默认值是 700}*{} +%\capcs bmod {modulus operator, as in $n \bmod 2$}{}{} +\capcs bmod {模运算符,比如 $n \bmod 2$ 中那样}{}{} +%\capcs bordermatrix {produce matrix with labelled rows and columns}{}{} +\capcs bordermatrix {带有行和列标志的矩阵}{}{} +%\capcs bot {lattice bottom symbol: $\bot$}{}{} +\capcs bot {格底符号:$\bot$}{}{} +%\capcs botmark {the last mark item on the page just boxed}*{} +\capcs botmark {在刚放入盒子的页面内的最后一个标记项}*{} +%\capcs bowtie {bowtie relation: $\bowtie$}{}{} +\capcs bowtie {领结关系:$\bowtie$}{}{} +%\capcs box {append the box in a specified box register +% to the current list, and void the register}*{} +\capcs box {将一指定的盒子寄存器中的盒子附加到当前列表中,并使寄存器失效}*{} +%\capcs boxmaxdepth {maximum depth of vboxes, by default |\\maxdimen|}*{} +\capcs boxmaxdepth {vbox 的最大深度,其默认值是 |\\maxdimen|}*{} +%\capcs brace {|\char36 n\\brace k\char36| produces +% braced notation: $n \brace k$}{}{} +\capcs brace {|\char36 n\\brace k\char36| 输出带有一对大括号的标记:$n \brace k$}{}{} +%\capcs bracevert {vertical portion of extensible large brace}{}{} +\capcs bracevert {可延长的大括号的竖直部分}{}{} +%\capcs brack {|\char36 n\\brack k\char36| produces bracketed notation: $n \brack k$}{}{} +\capcs brack {|\char36 n\\brack k\char36| 输出带有一对方括号的标记:$n \brack k$}{}{} +%\capcstwo break {do |\\penalty-10000|, i.e., force a line or page +% break}{}{hbreak:vbreak} +\capcstwo break {执行 |\\penalty-10000|,即强制断行或分页}{}{hbreak:vbreak} +%\capcs breve {breve accent for math, as in $\breve x$}{}{} +\capcs breve {数学中的短音重音符,象 $\breve x$ 中一样}{}{} +%\capcs brokenpenalty {penalty for line break at a discretionary item, by +% default~100}*{} +\capcs brokenpenalty {在自定项目处断行的惩罚,默认值是 100}*{} +%\capcs buildrel {produce specified formula over the specified relation}{}{} +\capcs buildrel {在一指定关系上方输出指定公式}{}{} +%\capcs bullet {bullet operation: $\bullet$}{}{} +\capcs bullet {圆点运算符:$\bullet$}{}{} +%\capcs bye {|\\vfill| the last page with blank space, |\\supereject| it, +% and |\\end| the job}{}{\@bye} +\capcs bye {用空白间隔 |\\vfill| 最后一页,|\\supereject| 它,并且 |\\end| 作业}{}{\@bye} +%\capcs c {cedilla accent for text, as in \c c}{}{} +\capcs c {文本中的变音符号重音符,比如 \c c 中那样}{}{} +%\capcs cal {use calligraphic font for uppercase letters in math, +% as in $\cal XYZ$}{}{} +\capcs cal {数学中,对于大写字母使用书法字体,比如 $\cal XYZ$ 中那样}{}{} +%\capcs cap {cap operator: $\cap$}{}{} +\capcs cap {交集运算符:$\cap$}{}{} +%\capcs cases {produce cases for math, as in $\bigl\{{\cdots\atop\cdots}$}{}{} +\capcs cases {输出数学中的条件式,比如 $\bigl\{{\cdots\atop\cdots}$ 中那样}{}{} +%\capcs catcode {the category code of a specified character}*{} +\capcs catcode {指定字符的类别码}*{} +%\capcs cdot {centered dot operator: $\cdot$}{}{} +\capcs cdot {居中点操作符:$\cdot$}{}{} +%\capcs cdotp {centered dot punctuation: $\cdotp$}{}{} +\capcs cdotp {居中句号:$\cdotp$}{}{} +%\capcs cdots {centered dots for math: $\cdots$}{}{} +\capcs cdots {数学中的居中多点:$\cdots$}{}{} +%\capcs centerline {produce line with its text centered}{}{} +\capcs centerline {输出文字居中的行}{}{} +%\capcs char {produce the character from the current font with the specified +% code}*{} +\capcs char {从当前字体中输出指定编码的字符}*{} +%\capcs chardef {define a specified control sequence to be a character's +% code, a number between 0 and $255$}*{} +\capcs chardef {定义指定控制序列,使之成为 0 至 $255$ 之间的字符编码}*{} +%\capcs check {check accent for math, as in $\check x$}{}{} +\capcs check {数学中的抑制重音符,比如 $\check x$ 中那样}{}{} +%\capcs chi {math Greek letter $\chi$}{}{} +\capcs chi {数学希腊字母 $\chi$}{}{} +%\capcs choose {|\char36 n\\choose k\char36| produces combinatorial notation: +% $n \choose k$}{}{} +\capcs choose {|\char36 n\\choose k\char36| 输出组合标记:$n \choose k$}{}{} +%\capcs circ {circle operation: $\circ$}{}{} +\capcs circ {圆圈操作符:$\circ$}{}{} +%\capcs cleaders {produce leaders with half of leftover space before +% the first box, and half after the last}*{} +\capcs cleaders {输出在第一盒子之前和最后一个盒子之后保留一半剩余空间的指引线}*{} +%\capcs cleartabs {clear all the tabs for tabbing alignments}{}{} +\capcs cleartabs {为制表阵列清除所有的制表符}{}{} +%\capcs closein {close a specified input stream}*{} +\capcs closein {关闭指定的输入流}*{} +%\capcs closeout {close a specified output stream}*{} +\capcs closeout {关闭指定的输出流}*{} +%\capcs clubpenalty {additional penalty for a single line remaining before +% a page break, by default~150}*{} +\capcs clubpenalty {对分页前剩余单行的额外惩罚,默认值为 150}*{} +%\capcs clubsuit {club suit symbol: $\clubsuit$}{}{} +\capcs clubsuit {梅花花色符号:$\clubsuit$}{}{} +%\capcs colon {colon punctation symbol for math: $:$}{}{} +\capcs colon {数学中的分号:$:$}{}{} +%\capcs cong {congruence relation: $\cong$}{}{} +\capcs cong {全等关系:$\cong$}{}{} +%\capcs coprod {coproduct operator: $\coprod$}{}{} +\capcs coprod {上积运算符:$\coprod$}{}{} +%\capcs copy {like |\\box|, but don't void the register}*{} +\capcs copy {与 |\\box| 一样,但不会使寄存器失效}*{} +%\capcs copyright {copyright mark: \copyright}{}{} +\capcs copyright {版权符号:\copyright}{}{} +%\capcs cos {cosine function: $\cos$}{}{} +\capcs cos {余弦函数:$\cos$}{}{} +%\capcs cosh {hyperbolic cosine function: $\cosh$}{}{} +\capcs cosh {双曲余弦函数:$\cosh$}{}{} +%\capcs cot {cotangent function : $\cot$}{}{} +\capcs cot {余切函数:$\cot$}{}{} +%\capcs coth {hyperbolic cotangent function: $\coth$}{}{} +\capcs coth {双曲余切函数:$\coth$}{}{} +%\capcs count {the specified integer register}*{} +\capcs count {指定的整数寄存器}*{} +%\capcs countdef {define a specified control sequence to be a number +% corresponding to a |\\count| register}*{} +\capcs countdef {定义指定的控制序列,使之成为与 |\\count| 寄存器相对应的数值}*{} +%\capcs cr {end a row (or column) within an alignment}*{} +\capcs cr {在对齐中结束一行(或一列)}*{} +%\capcs crcr {does nothing if the last command was |\\cr| or |\\noalign|; +% otherwise, equivalent to |\\cr|}*{} +\capcs crcr {如果最后一个命令是 |\\cr| 或 |\\noalign|,则什么也不做;否则等同于 |\\cr|}*{} +%\capcs csc {cosecant function: $\csc$}{}{} +\capcs csc {余割函数:$\csc$}{}{} +%\capcs csname {start a control sequence name to be ended by |\\endcsname|}*{} +\capcs csname {开始一个以 |\\endcsname| 结束的控制序列命名}*{} +%\capcs cup {cup operator: $\cup$}{}{} +\capcs cup {求并运算符:$\cup$}{}{} +%\capcs d {underdot accent for text, as in \d r}{}{} +\capcs d {文本中底点重音符,比如 \d r 中那样}{}{} +%\capcs dag {dagger symbol for text: \dag}{}{} +\capcs dag {文本中的剑形符号:\dag}{}{} +%\capcs dagger {dagger operator for math: $\dagger$}{}{} +\capcs dagger {数学中的剑形运算符:$\dagger$}{}{} +%\capcs dashv {right turnstile relation: $\dashv$}{}{} +\capcs dashv {右十字转门关系:$\dashv$}{}{} +%\capcs day {current day of the month, as a number}*{} +\capcs day {月份中的当天,作为一个数字}*{} +%\capcs ddag {double dagger symbol for text: \ddag}{}{} +\capcs ddag {文本中的双剑形符号:\ddag}{}{} +%\capcs ddagger {double dagger operator for math: $\ddagger$}{}{} +\capcs ddagger {数学中的双剑形运算符:$\ddagger$}{}{} +%\capcs ddot {double dot accent for math: $\ddot x$}{}{} +\capcs ddot {数学中的双点重音符:$\ddot x$}{}{} +%\capcs ddots {diagonal dots for math: \smash{$\ddots$}}{}{} +\capcs ddots {数学中的斜多点:\smash{$\ddots$}}{}{} +%\capcs deadcycles {number of |\\output| initiations since the last +% |\\shipout|}*{} +\capcs deadcycles {自从最后 |\\shipout| 后的 |\\output| 初始化数值}*{} +%\capcs def {define a control sequence to be a macro}*{} +\capcs def {字义一个控制序列,使之成为宏}*{} +%\capcs defaulthyphenchar {default hyphenation character code}*{} +\capcs defaulthyphenchar {默认断字字符代码}*{} +%\capcs defaultskewchar {default accent skewing character code}*{} +\capcs defaultskewchar {默认重音符偏移字符代码}*{} +%\capcs deg {degree function: $\deg$}{}{} +\capcs deg {角度函数:$\deg$}{}{} +%\capcs delcode {the delimiter code of a specified character}*{} +\capcs delcode {指定字符的定界符代码}*{} +%\capcs delimiter {produce a specified delimiter}*{} +\capcs delimiter {输出指定的定界符}*{} +%\capcs delimiterfactor {1000 times the ratio of the minimum size of a +% delimiter to the size that would completely cover the formula, by +% default~901}*{} +\capcs delimiterfactor {1000 乘以定界符的最小尺寸与完成覆盖公式的尺寸的比例1000,其默认值为 901}*{} +%\capcs delimitershortfall {minimum difference between formula height and +% delimiter height, by default 5\pt}*{} +\capcs delimitershortfall {公式高度与分界符高度之间的最小差异,默认值为 5\pt}*{} +%\capcs delta {math Greek letter $\delta$}{}{} +\capcs delta {数学希腊字母 $\delta$}{}{} +%\capcs Delta {math Greek letter $\Delta$}{}{} +\capcs Delta {数学希腊字母 $\Delta$}{}{} +%\capcs det {determinant function: $\det$}{}{} +\capcs det {行列式函数:$\det$}{}{} +%\capcs diamond {diamond operator: $\diamond$}{}{} +\capcs diamond {菱形运算符:$\diamond$}{}{} +%\capcs diamondsuit {diamond suit symbol: $\diamondsuit$}{}{} +\capcs diamondsuit {方块花色符号:$\diamondsuit$}{}{} +%\capcs dim {dimension function: $\dim$}{}{} +\capcs dim {维度函数:$\dim$}{}{} +%\capcs dimen {the specified dimension register}*{} +\capcs dimen {指定尺寸寄存器}*{} +%\capcs dimendef {define a specified control sequence to be a number +% corresponding to a |\\dimen| register}*{} +\capcs dimendef {定义指定控制序列,使之成为对应于 |\\dimen| 寄存器的一个数值}*{} +%\capcs discretionary {specify three texts, the first two for before and +% after a line break, the third for no line break}*{} +\capcs discretionary {指定三个文本,前两个分别用在分行前后,第三个为不分行时用}*{} +%\capcs displayindent {\TeX\ sets this to the indentation of a display}*{} +\capcs displayindent {\TeX\ 设定该值为陈列公式的缩进量}*{} +%\capcs displaylimits {place limits above and below operators only in display +% styles}*{} +\capcs displaylimits {只在陈列样式中,将极限放在运算符的上或下}*{} +%\capcs displaylines {produce specified multiline display with each +% line centered}{}{} +\capcs displaylines {输出指定的每行居中的多行显示陈列公式}{}{} +%\capcs displaystyle {use displaystyle size in a formula}*{} +\capcs displaystyle {在公式中使用陈列样式尺寸}*{} +%\capcs displaywidowpenalty {penalty for a single line beginning a page +% just before a display, by default~50}*{} +\capcs displaywidowpenalty {在一页开始处单行位于陈列公式前的惩罚,默认值为 50}*{} +%\capcs displaywidth {\TeX\ sets this to the width of a display}*{} +\capcs displaywidth {\TeX\ 该定该值为陈列公式的宽度}*{} +%\capcs div {division operator: $\div$}{}{} +\capcs div {除号运算符:$\div$}{}{} +%\capcs divide {divide a specified |\\count| register by a specified integer}*{} +\capcs divide {用指定的 |\\count| 寄存器除以指定的整数}*{} +%\capcs dot {dot accent for math, as in $\dot x$}{}{} +\capcs dot {数学中的点重音符,比如 $\dot x$ 中那样}{}{} +%\capcs doteq {dotted equality relation: $\doteq$}{}{} +\capcs doteq {点等于关系:$\doteq$}{}{} +%\capcs dotfill {fill enclosing horizontal space with dots}{}{} +\capcs dotfill {用点填充闭合的水平间隔}{}{} +%\capcs dots {ellipsis for sequences: $x_1$, \dots, $x_n$}{}{} +\capcs dots {序列的省略号:$x_1$, \dots, $x_n$}{}{} +%\capcs doublehyphendemerits {demerits for two consecutive lines ending +% with hyphens, by default~10000}*{} +\capcs doublehyphendemerits {连续以连字号结束行的处罚,默认为 10000}*{} +%\capcs downarrow {relation: $\downarrow$}{}{} +\capcs downarrow {关系:$\downarrow$}{}{} +%\capcs Downarrow {relation: $\Downarrow$}{}{} +\capcs Downarrow {关系:$\Downarrow$}{}{} +%\capcs downbracefill {fill enclosing hbox with a downwards facing brace: +% \hbox to 3.5em{\downbracefill}}{}{} +\capcs downbracefill {用开口向下的大括号填充闭合的 hbox:\hbox to 3.5em{\downbracefill}}{}{} +%\capcs dp {the depth of the box in a specified box register}*{} +\capcs dp {指定盒子寄存器中的盒子的深度}*{} +%\capcs dump {end the job and produce a format file}*{} +\capcs dump {结束作业,并产生格式文件}*{} +%\capcs edef {define a control sequence to be a macro, immediately expanding the +% replacement text}*{} +\capcs edef {定义一个控制序列,使之成为宏,立即展开替换文本}*{} +%\capcs egroup {implicit end-of-group character}{}{} +\capcs egroup {隐式编组结束字符}{}{} +%\capcs eject {end current paragraph and force a page break, +% stretching out current page}{}{} +\capcs eject {结束当前段落,并强制分页,伸展当前页}{}{} +%\capcs ell {script letter for math: $\ell$}{}{} +\capcs ell {数学中的草书字母:$\ell$}{}{} +%\capcs else {false or default case alternative for a conditional}*{\@else} +\capcs else {条件式的错误或默认情况下的替换}*{\@else} +%\capcs emergencystretch {additional stretch added to every line if +% |\\tol\-er\-ance| is not satisfied}*{} +\capcs emergencystretch {如果 |\\tol\-er\-ance| 没有得到满足时,加到每行上的额外的伸展}*{} +%\capcs empty {macro that expands to nothing}{}{} +\capcs empty {不作任何扩展的宏}{}{} +%\capcs emptyset {empty set symbol: $\emptyset$}{}{} +\capcs emptyset {空集符号:$\emptyset$}{}{} +%\capcs end {|\\output| the last page and end the job}*{} +\capcs end {|\\output| 最后一页,并且结束作业}*{} +%\capcs endcsname {end a control sequence name started by +% |\\csname|}*{} +\capcs endcsname {结束以 |\\csname| 开始的控制序列名称}*{} +%\capcs endgraf {equivalent to the |\\par| primitive}{}{} +\capcs endgraf {等同于原始的 |\\par|}{}{} +%\capcs endgroup {end a group started by |\\begingroup|}*{} +\capcs endgroup {结束以 |\\begingroup| 开始的编组}*{} +%\capcs endinput {terminate input from the current file}*{} +\capcs endinput {结束从当前文件中的输入}*{} +%\capcs endinsert {end insertion}{}{} +\capcs endinsert {结束插入}{}{} +%\capcs endline {equivalent to the |\\cr| primitive}{}{} +\capcs endline {等同于原始的 |\\cr|}{}{} +%\capcs endlinechar {character \TeX\ inserts at the end of each input +% line, by default |\twocarets M|}*{} +\capcs endlinechar {\TeX\ 在每个输入行结尾插入的字符,默认为 |\twocarets M|}*{} +%\capcs enskip {horizontal glue with width \frac1/2\em}{}{} +\capcs enskip {宽度为 \frac1/2\em 的水平粘连}{}{} +%\capcs enspace {kern \frac1/2\em}{}{} +\capcs enspace {\frac1/2\em 紧排}{}{} +%\capcs epsilon {math Greek letter $\epsilon$}{}{} +\capcs epsilon {数学希腊字母 $\epsilon$}{}{} +%\capcs eqalign {produce specified multiline display whose indicated parts +% are vertically aligned}{}{} +\capcs eqalign {输出指定的多行显示陈列公式,其指定部分是竖直对齐的}{}{} +%\capcs eqalignno {produce specified multiline display +% with equation numbers whose indicated parts are vertically aligned}{}{} +\capcs eqalignno {输出带有公式编号的多行陈列公式,其指定部分是竖直对齐的}{}{} +%\capcs eqno {put a specified equation number on the right of a display}*{} +\capcs eqno {放指定的公式编号放在陈列公式的右侧}*{} +%\capcs equiv {equivalence relation: $\equiv$}{}{} +\capcs equiv {等价关系:$\equiv$}{}{} +%\capcs errhelp {token list whose expansion \TeX\ displays when the user asks +% for help in response to an |\\errmessage|}*{} +\capcs errhelp {当用户在面对 |\\errmessage| 寻求帮助时,\TeX\ 展开并显示的记号列}*{} +%\capcs errmessage {give specified error message}*{} +\capcs errmessage {给出指定的错误信息}*{} +%\capcs errorcontextlines {the number of lines of context \TeX\ +% displays at an error, by default~5}*{} +\capcs errorcontextlines {\TeX\ 遇到错误时显示的双行信息的数目,默认值为 5}*{} +%\capcs errorstopmode {stop for interaction at error messages}*{} +\capcs errorstopmode {在错误信息处停下来等待交互过程}*{} +%\capcs escapechar {character with which \TeX\ precedes control sequence +% names that are displayed}*{} +\capcs escapechar {\TeX\ 显示控制序列名称时的前导字符}*{} +%\capcs eta {math Greek letter $\eta$}{}{} +\capcs eta {数学希腊字母 $\eta$}{}{} +%\capcs everycr {token list \TeX\ expands after a |\\cr|, or a |\\crcr| +% not following |\\cr| or |\\noalign|}*{} +\capcs everycr {在 |\\cr| 后,或者在非 |\\cr| 或 |\\noalign| 后的 |\\crcr| 后 \TeX\ 展开的记号列表}*{} +%\capcs everydisplay {token list \TeX\ expands when a math display begins}*{} +\capcs everydisplay {任一陈列公式开始时,\TeX\ 展开的记号列表}*{} +%\capcs everyhbox {token list \TeX\ expands when an hbox begins}*{} +\capcs everyhbox {任一水平盒子开始时,\TeX\ 展开的记号列表}*{} +%\capcs everyjob {token list \TeX\ expands when a job begins}*{} +\capcs everyjob {任一作业开始时,\TeX\ 展开的记号列表}*{} +%\capcs everymath {token list \TeX\ expands when text math mode +% begins}*{} +\capcs everymath {当文本数学模式开始时,\TeX\ 展开的记号列表}*{} +%\capcs everypar {token list \TeX\ expands when a paragraph begins}*{} +\capcs everypar {任一段落开始时,\TeX\ 展开的记号列表}*{} +%\capcs everyvbox {token list \TeX\ expands when a vbox begins }*{} +\capcs everyvbox {任一竖直盒子开始时,\TeX\ 展开的记号列表}*{} +%\capcs exhyphenpenalty {additional penalty for a line break after +% an explicit hyphen, by default~50}*{} +\capcs exhyphenpenalty {在一显式连字号之后断行的额外惩罚,默认值为 50}*{} +%\capcs exists {``there exists'' symbol: $\exists$}{}{} +\capcs exists {“那些存在”符号:$\exists$}{}{} +%\capcs exp {exponential function: $\exp$}{}{} +\capcs exp {指数函数:$\exp$}{}{} +%\capcs expandafter {expand the next token only after expanding the token +% following it}*{} +\capcs expandafter {只有在展开了下一个记号之后的记号后才展开它}*{} +%\capcs fam {font family \TeX\ uses for characters with class seven +% (i.e., variables) in math}*{} +\capcs fam {在数学公式中,\TeX\ 用于第 $7$ 类(即变量)字符的字体族}*{} +%\capcs fi {end a conditional}*{\@fi} +\capcs fi {结束一个条件表达式}*{\@fi} +%\capcs filbreak {force a page break unless the text up to another |\\filbreak| +% also fits on the page}{}{} +\capcs filbreak {强制分页,除非文本达到别一个 |\\filbreak| 时仍适合于本页}{}{} +%\capcs finalhyphendemerits {penalty for the second to last line breaking at a +% hyphen, by default~5000}*{} +\capcs finalhyphendemerits {对第二到最后一个在连字号处断行的惩罚,默认值为 5000}*{} +%\capcs firstmark {first mark item on the page just boxed}*{} +\capcs firstmark {刚处于盒子内的页面的第一个标记项}*{} +%\capcs fivebf {use $5$-point bold font, |cmbx5|}{}{} +\capcs fivebf {使用 $5$-pt 粗字体,|cmbx5|}{}{} +%\capcs fivei {use $5$-point math italic font, |cmmi5|}{}{} +\capcs fivei {使用 $5$-pt 数学斜体,|cmmi5|}{}{} +%\capcs fiverm {use $5$-point roman font, |cmr5|}{}{} +\capcs fiverm {使用 $5$-pt 罗马字体,|cmr5|}{}{} +%\capcs fivesy {use $5$-point symbol font, |cmsy5|}{}{} +\capcs fivesy {使用 $5$-pt 符号字体,|cmsy5|}{}{} +%\capcs flat {flat symbol for music: $\flat$}{}{} +\capcs flat {音乐中的降调符号:$\flat$}{}{} +%\capcs floatingpenalty {penalty for insertions that are split across +% pages, by default~0}*{} +\capcs floatingpenalty {对跨页分裂插入的惩罚,默认值为 0}*{} +%\capcs fmtname {name of the current format}{}{} +\capcs fmtname {当前格式文件的名称}{}{} +%\capcs fmtversion {version number of the current format}{}{} +\capcs fmtversion {当前格式文件的版本号}{}{} +%\capcs folio {produce |\\pageno| as characters; +% in roman numerals if it's negative}{}{} +\capcs folio {以字符输出 |\\pageno|;如果负值,则输出罗马数字}{}{} +%\capcs font {define a specified control sequence to select a font}*{} +\capcs font {定义指定的控制序列用于选择字体}*{} +%\capcs fontdimen {a specified parameter of a specified font}*{} +\capcs fontdimen {指定字体的指定参数}*{} +%\capcs fontname {produce the filename of a specified font as characters}*{} +\capcs fontname {以字符形式输出指定字体的名称}*{} +%\capcs footline {token list that produces line at the bottom of each page}{}{} +\capcs footline {在每页底部输出线的记号列表}{}{} +%\capcs footnote {produce a specified footnote +% with a specified reference mark}{}{} +\capcs footnote {输出带有指定参考标记的指定脚注}{}{} +%\capcs forall {``for all'' symbol: $\forall$}{}{} +\capcs forall {“全部”符号:$\forall$}{}{} +%\capcs frenchspacing {make interword spacing independent of punctuation}{}{} +\capcs frenchspacing {使得字间距不依赖于标点符号}{}{} +%\capcs frown {frown relation: $\frown$}{}{} +\capcs frown {frown 关系:$\frown$}{}{} +%\capcs futurelet {assign the third following token to a specified control +% sequence, then expand the second following token}*{} +\capcs futurelet {将其后第三个记号赋给指定的控制序列,随后展开其后第二个记号}*{} +%\capcs gamma {math Greek letter $\gamma$}{}{} +\capcs gamma {数学希腊字母 $\gamma$}{}{} +%\capcs Gamma {math Greek letter $\Gamma$}{}{} +\capcs Gamma {数学希腊字母 $\Gamma$}{}{} +%\capcs gcd {greatest common denominator function: $\gcd$}{}{} +\capcs gcd {最大公分母函数:$\gcd$}{}{} +%\capcs gdef {equivalent to |\\global\\def|, i.e., globally define a macro}*{} +\capcs gdef {等同于 |\\global\\def|,即定义全局宏}*{} +%\capcs ge {greater than or equal relation: $\ge$}{}{} +\capcs ge {大于或等于关系:$\ge$}{}{} +%\capcs geq {equivalent to |\\ge|}{}{} +\capcs geq {等同于 |\\ge|}{}{} +%\capcs gets {gets relation: $\gets$}{}{} +\capcs gets {获得关系:$\gets$}{}{} +%\capcs gg {much greater than relation: $\gg$}{}{} +\capcs gg {远大于关系:$\gg$}{}{} +%\capcs global {make the following definition global}*{} +\capcs global {使得随后的定义全局化}*{} +%\capcs globaldefs {overrides |\\global| prefixes on assignments}*{} +\capcs globaldefs {忽略附加于赋值前面的 |\\global|}*{} +%\capcs goodbreak {indicate desirable page break with |\\penalty-500|}{}{} +\capcs goodbreak {表示采用 |\\penalty-500| 的期望的分页}{}{} +%\capcs grave {grave accent for math, as in $\grave x$}{}{} +\capcs grave {数学中的抑间符重音符,比如 $\grave x$ 中那样}{}{} +\bookmark{2}{从H到N}% +%\capcs H {Hungarian umlaut accent for text, as in \H o}{}{} +\capcs H {文本中匈牙利元音变量重音符,比如 \H o 中那样}{}{} +%\capcs halign {align text in columns}*{} +\capcs halign {在列中对齐文本}*{} +%\capcs hang {indent the current paragraph by |\\parindent|}{}{} +\capcs hang {当前段落缩进 |\\parindent|}{}{} +%\capcs hangafter {starting line number for hanging indentation}*{} +\capcs hangafter {悬挂缩进开始的行数}*{} +%\capcs hangindent {space for hanging indentation}*{} +\capcs hangindent {悬挂缩进的间隔}*{} +%\capcs hat {hat accent for math, as in $\hat x$}{}{} +\capcs hat {数学中的帽子重音符,比如 $\hat x$ 中那样}{}{} +%\capcs hbadness {badness threshold for reporting underfull or overfull +% hboxes, by default 1000}*{} +\capcs hbadness {报告未满或过满水平盒子的劣度的阈值,默认值为 1000}*{} +%\capcs hbar {math symbol: $\hbar$}{}{} +\capcs hbar {数学符号:$\hbar$}{}{} +%\capcs hbox {produce a specified hbox}*{} +\capcs hbox {产生指定的 hbox}*{} +%\capcs headline {token list that produces the line at the +% top of every page}{}{} +\capcs headline {在每页顶部输出线的记号列表}{}{} +%\capcs heartsuit {heart suit symbol: $\heartsuit$}{}{} +\capcs heartsuit {心形花色符号:$\heartsuit$}{}{} +%\capcs hfil {produce infinitely stretchable horizontal glue}*{} +\capcs hfil {输出无限可扩展水平粘连}*{} +%\capcs hfill {produce horizontal glue even more infinitely stretchable +% than that produced by |\\hfil|}*{} +\capcs hfill {输出比 |\\hfil| 更加无限扩展的水平粘连}*{} +%\capcs hfilneg {produce infinitely negative stretchable horizontal glue}*{} +\capcs hfilneg {输出无限负扩展的水平粘连}*{} +%\capcs hfuzz {space threshold for reporting overfull hboxes, by default +% 0.1\pt}*{} +\capcs hfuzz {报告过满 hbox 的间隔阈值,其默认值为 0.1\pt}*{} +%\capcs hglue {produce horizontal glue that doesn't disappear at line +% breaks}{}{} +\capcs hglue {输出在断行时不会消失的水平粘连}{}{} +%\capcs hidewidth {ignore width of an entry in an alignment, so that it +% extends out from its box in the direction of the |\\hidewidth|}{}{} +\capcs hidewidth {在对齐中忽略一个条目的宽度,以致于它可以在 |\\hidewidth| 的方向上扩展到盒子外面}{}{} +%\capcs hoffset {page offset relative to one inch from the paper's left edge}*{} +\capcs hoffset {从纸张的左边界相对于一英寸的页面偏移量}*{} +%\capcs holdinginserts {if positive, do not remove insertions from the +% current page}*{} +\capcs holdinginserts {如果是正值,将不从当前页中移去插入}*{} +%\capcs hom {homology function: $\hom$}{}{} +\capcs hom {同调函数:$\hom$}{}{} +%\capcs hookleftarrow {relation: $\hookleftarrow$}{}{} +\capcs hookleftarrow {关系:$\hookleftarrow$}{}{} +%\capcs hookrightarrow {relation: $\hookrightarrow$}{}{} +\capcs hookrightarrow {关系:$\hookrightarrow$}{}{} +%\capcs hphantom {produce an invisible formula with zero height and depth but +% natural width}{}{} +\capcs hphantom {产生一个具有自然宽度,但高度与深度均为零的不可见公式}{}{} +%\capcs hrule {produce a horizontal rule; legal only in vertical modes}*{} +\capcs hrule {产生一个水平标线,只能用于竖直模式中}*{} +%\capcs hrulefill {fill enclosing space with a horizontal rule}{}{} +\capcs hrulefill {使用水平标线填充闭合间隔}{}{} +%\capcs hsize {line length, by default 6.5\thinspace in}*{} +\capcs hsize {行的长度,默认值为 6.5\thinspace in}*{} +%\capcs hskip {produce specified horizontal glue}*{} +\capcs hskip {输出指定的水平粘连}*{} +%\capcs hss {produce horizontal glue that is infinitely stretchable and +% infinitely shrinkable}*{} +\capcs hss {输出可无限扩展和收缩的水平粘连}*{} +%\capcs ht {the height of the box in a specified box register}*{} +\capcs ht {在指定盒子寄存器中盒子的高度}*{} +%\capcs hyphenation {add specified words to the +% hyphenation exception dictionary}*{} +\capcs hyphenation {向断字例外字典中加入指定的词}*{} +%\capcs hyphenchar {the hyphenation character in a specified font}*{} +\capcs hyphenchar {在指定字体中的连字号}*{} +%\capcs hyphenpenalty {additional penalty for a line break at a hyphen, by +% default~50}*{} +\capcs hyphenpenalty {在连字号处断行的额外惩罚,默认值为 50}*{} +%\capcs i {dotless letter `\i' for use with accents}{}{} +\capcs i {与重音符一起使用的无点的字母 `\i'}{}{} +%\capcs ialign {start an |\\halign| with the |\\tabskip| glue zero and +% |\\everycr| empty}{}{} +\capcs ialign {开始一个 |\\tabskip| 粘连为零且 |\\everycr| 为空的 |\\halign|}{}{} +%\capcs if {test if two specified tokens have the same character code}*{\@if} +\capcs if {判断两个指定的记号是否具有相同的字符代码}*{\@if} +%\capcs ifcase {expand case $n$ for specified value $n$}*{\@ifcase} +\capcs ifcase {对于指定的数值 $n$ 展开第 $n$ 种情形}*{\@ifcase} +%\capcs ifcat {test if two specified tokens have the same category +% code}*{\@ifcat} +\capcs ifcat {判断两个指定的记号是否具有相同的类别码}*{\@ifcat} +%\capcs ifdim {test for a specified relationship between two specified +% dimensions}*{\@ifdim} +\capcs ifdim {为了指定的关系在两个指定尺寸之间判断}*{\@ifdim} +%\capcs ifeof {test for being at the end of a specified file}*{\@ifeof} +\capcs ifeof {判断是否处在指定文件的结尾处}*{\@ifeof} +%\capcs iff {if and only if relation: $\iff$}{}{} +\capcs iff {当且仅当关系:$\iff$}{}{} +%\capcs iffalse {test that is always false}*{\@iffalse} +\capcs iffalse {判断某种情况总是错误的}*{\@iffalse} +%\capcs ifhbox {test if a specified box register contains an hbox}*{\@ifhbox} +\capcs ifhbox {判断指定的盒子寄存器是否包含 hbox}*{\@ifhbox} +%\capcs ifhmode {test if \TeX\ is in a horizontal mode}*{\@ifhmode} +\capcs ifhmode {判断 \TeX\ 是否处于水平模式中}*{\@ifhmode} +%\capcs ifinner {test if \TeX\ is in an internal mode}*{\@ifinner} +\capcs ifinner {判断 \TeX\ 是否处于内部模式中}*{\@ifinner} +%\capcs ifmmode {test if \TeX\ is in a math mode}*{\@ifmmode} +\capcs ifmmode {判断 \TeX\ 是否处于数学模式中}*{\@ifmmode} +%\capcs ifnum {test for a specified relationship +% between two specified numbers}*{\@ifnum} +\capcs ifnum {为了指定关系在两个指定数值之间判断}*{\@ifnum} +%\capcs ifodd {test if a specified number is odd}*{\@ifodd} +\capcs ifodd {判断指定数值是否是奇数}*{\@ifodd} +%\capcs iftrue {test that is always true}*{\@iftrue} +\capcs iftrue {判断某种情况总是正错的}*{\@iftrue} +%\capcs ifvbox {test if a specified box register contains a vbox}*{\@ifvbox} +\capcs ifvbox {判断指定的盒子寄存器是否包含 vbox}*{\@ifvbox} +%\capcs ifvmode {test if \TeX\ is in a vertical mode}*{\@ifvmode} +\capcs ifvmode {判断 \TeX\ 是否处于竖直模式中}*{\@ifvmode} +%\capcs ifvoid {test if a specified box register is void}*{\@ifvoid} +\capcs ifvoid {判断指定盒子寄存器是否是无效的}*{\@ifvoid} +%\capcs ifx {test if two tokens are the same, or if +% two macros have the same top-level definition}*{\@ifx} +\capcs ifx {判断两个记号是否是相同的,或两个宏是否具有相同的顶级定义}*{\@ifx} +%\capcs ignorespaces {ignore any following space tokens}*{} +\capcs ignorespaces {忽略任何接随其后的间隔记号}*{} +%\capcs Im {complex imaginary part symbol: $\Im$}{}{} +\capcs Im {复数虚部符号:$\Im$}{}{} +%\capcs imath {dotless letter `$\imath$' for use with math accents}{}{} +\capcs imath {与数学重间符一起使用的无点的字符 `$\imath$'}{}{} +%\capcs immediate {perform the specified file operation without delay}*{} +\capcs immediate {不作延迟地进行特定的文件操作}*{} +%\capcs in {containment relation: $\in$}{}{} +\capcs in {属于关系:$\in$}{}{} +%\capcs indent {produce an empty box of width |\\parindent| and enter +% horizontal mode}*{} +\capcs indent {输出一个宽度为 |\\parindent| 的空盒子,并进入水平模式}*{} +%\capcs inf {inferior function: $\inf$}{}{} +\capcs inf {下限函数:$\inf$}{}{} +%\capcs infty {infinity symbol: $\infty$}{}{} +\capcs infty {无限符号:$\infty$}{}{} +%\capcs input {begin to read from a specified file}*{} +\capcs input {从指定文件开始读入}*{} +%\capcs inputlineno {the current line number of the current input file}*{} +\capcs inputlineno {当前输入文件的当前行号}*{} +%\capcs insert {produce an insertion of a specified class}*{} +\capcs insert {输出指定类别的插入}*{} +%\capcs insertpenalties {sum of penalties due to insertions}*{} +\capcs insertpenalties {因为插入造成的惩罚之和}*{} +%\capcs int {integral symbol: $\int$}{}{} +\capcs int {积分符号:$\int$}{}{} +%\capcs interlinepenalty {additional penalty for a page break +% between lines of a paragraph, by default~0}*{} +\capcs interlinepenalty {段落的行间分页时的额外惩罚,默认值为 0}*{} +%\capcs iota {math Greek letter $\iota$}{}{} +\capcs iota {数学希腊字母 $\iota$}{}{} +%\capcs it {use italics, i.e., do |\\tenit\\fam=\\itfam|}{}{} +\capcs it {使用斜体,即执行 |\\tenit\\fam=\\itfam|}{}{} +%\capcs item {begin a paragraph with hanging indentation of |\\parindent| +% and preceded by a specified label}{}{} +\capcs item {开始一个段落,采用 |\\parindent| 悬挂缩进,且其前放置指定的标签}{}{} +%\capcs itemitem {like |\\item|, but with indentation of |2\\parindent|}{}{} +\capcs itemitem {与 |\\item| 一样,但缩进为 |2\\parindent|}{}{} +%\capcs itfam {italic family for math}{}{} +\capcs itfam {数学中的斜体字族}{}{} +%\capcs j {dotless letter `\j', for use with accents}{}{} +\capcs j {与重音符一起使用的无点字符 `\j'}{}{} +%\capcs jmath {dotless letter `$\jmath$' for use with math accents}{}{} +\capcs jmath {与数学重音符一起使用的无点字符 `$\jmath$'}{}{} +%\capcs jobname {base name of the file with which \TeX\ was invoked}*{} +\capcs jobname {引发 \TeX\ 执行的文件的基本名称}*{} +%\capcs jot {unit of measure for opening up displays}{}{} +\capcs jot {用于分开陈列公式的度量单位}{}{} +%\capcs kappa {math Greek letter $\kappa$}{}{} +\capcs kappa {数学希腊字母 $\kappa$}{}{} +%\capcs ker {kernel function: $\ker$}{}{} +\capcs ker {核函数:$\ker$}{}{} +%\capcs kern {produce a specified amount of space at which +% a break is not allowed}*{} +\capcs kern {输出指定量的间隔,在此位置不允许断行}*{} +%\capcs l {Polish letter: \l}{}{} +\capcs l {波兰字符:\l}{}{} +%\capcs L {Polish letter: \L}{}{} +\capcs L {波兰字符:\L}{}{} +%\capcs lambda {math Greek letter $\lambda$}{}{} +\capcs lambda {数学希腊字母 $\lambda$}{}{} +%\capcs Lambda {math Greek letter $\Lambda$}{}{} +\capcs Lambda {数学希腊字母 $\Lambda$}{}{} +%\capcs land {logical ``and'' operator: $\land$}{}{} +\capcs land {逻辑“和”运算符:$\land$}{}{} +%\capcs langle {left angle delimiter: $\langle$}{}{} +\capcs langle {左角度分界符:$\langle$}{}{} +%\capcs language {the current set of hyphenation patterns}*{} +\capcs language {断字模式的当前设置}*{} +%\capcs lastbox {retrieve and remove the last item from the current list, if +% it's a box}*{} +\capcs lastbox {如果是一个盒子,获取并移除当前列表中的最后一项}*{} +%\capcs lastkern {retrieve the last item from the current list, if it's a +% kern}*{} +\capcs lastkern {如果是一个紧排,获取当前列表中的最后一项}*{} +%\capcs lastpenalty {retrieve the last item from the current list, if it's a +% penalty}*{} +\capcs lastpenalty {如果是一个惩罚,获取当前列表中的最后一项}*{} +%\capcs lastskip {retrieve the last item from the current list, if it's +% glue}*{} +\capcs lastskip {如果是一个粘连,获取当前列表中的最后一项}*{} +%\capcs lbrace {left brace delimiter: $\lbrace$}{}{} +\capcs lbrace {左大括号定界符:$\lbrace$}{}{} +%\capcs lbrack {left bracket delimiter: $\lbrack$}{}{} +\capcs lbrack {左方括号定界符:$\lbrack$}{}{} +%\capcs lccode {the character code for the lowercase form of a letter}*{} +\capcs lccode {小写字母的字符代码}*{} +%\capcs lceil {left ceiling delimiter: $\lceil$}{}{} +\capcs lceil {左上限定界符:$\lceil$}{}{} +%\capcs ldotp {dot on baseline as punctuation: $\ldotp$}{}{} +\capcs ldotp {作为标点符号,位于基线上的点:$\ldotp$}{}{} +%\capcs ldots {dots on baseline for math: $\ldots$}{}{} +\capcs ldots {数学中位于基线上的多点:$\ldots$}{}{} +%\capcs le {less than or equal relation: $\le$}{}{} +\capcs le {小于或等于关系:$\le$}{}{} +%\capcs leaders {fill a specified horizontal or vertical space by repeating a +% specified box or rule}*{} +\capcs leaders {使用重复的指定的盒子或标线对指定水平或竖直间隔填充}*{} +%\capcs left {produce the specified delimiter, sizing it to cover the +% following subformula ended by |\\right|}*{} +\capcs left {输出大小覆盖随后的子公式,由 |\\right| 结束的指定的分界符}*{} +%\capcs leftarrow {relation: $\leftarrow$}{}{} +\capcs leftarrow {关系:$\leftarrow$}{}{} +%\capcs Leftarrow {relation: $\Leftarrow$}{}{} +\capcs Leftarrow {关系:$\Leftarrow$}{}{} +%\capcs leftarrowfill {fill enclosing hbox with a |\\leftarrow|: +% \hbox to 3.5em{\leftarrowfill}}{}{} +\capcs leftarrowfill {使用 |\\leftarrow| 填充闭合的 hbox:\hbox to 3.5em{\leftarrowfill}}{}{} +%\capcs leftharpoondown {relation: $\leftharpoondown$}{}{} +\capcs leftharpoondown {关系:$\leftharpoondown$}{}{} +%\capcs leftharpoonup {relation: $\leftharpoonup$}{}{} +\capcs leftharpoonup {关系:$\leftharpoonup$}{}{} +%\capcs lefthyphenmin {size of the smallest word fragment \TeX\ allows +% before a hyphen at the beginning of a word, by default~2}*{} +\capcs lefthyphenmin {\TeX\ 允许在一个词开始处插入连字号的最小词片段的大小,默认值为 2}*{} +%\capcs leftline {produce line with its text pushed to left margin}{}{} +\capcs leftline {输出文字靠左边界的行}{}{} +%\capcs leftrightarrow {relation: $\leftrightarrow$}{}{} +\capcs leftrightarrow {关系:$\leftrightarrow$}{}{} +%\capcs Leftrightarrow {relation: $\Leftrightarrow$}{}{} +\capcs Leftrightarrow {关系:$\Leftrightarrow$}{}{} +%\capcs leftskip {glue \TeX\ inserts at the left of each line}*{} +\capcs leftskip {\TeX\ 在每行左侧插入的粘连}*{} +%\capcs leq {equivalent to |\\le|}{}{} +\capcs leq {等同于 |\\le|}{}{} +%\capcs leqalignno {produce specified multiline display with equation numbers +% on the left whose indicated parts are vertically aligned}{}{} +\capcs leqalignno {生成公式编号在左侧,且指定部分竖直对齐的多行陈列公式}{}{} +%\capcs leqno {put a specified equation number on the left of a display}*{} +\capcs leqno {在陈列公式的左侧放置指定的公式编号}*{} +%\capcs let {define a control sequence to be the next token}*{} +\capcs let {定义控制序列为随后的记号}*{} +%\capcs lfloor {left floor delimiter: $\lfloor$}{}{} +\capcs lfloor {左下限分界符:$\lfloor$}{}{} +%\capcs lg {logarithm function: $\lg$}{}{} +\capcs lg {对数函数:$\lg$}{}{} +%\capcs lgroup {left group delimiter (the smallest size is shown here): +% $\Big\lgroup$}{}{} +\capcs lgroup {左编组定界符(这里显示的是最小尺寸的):$\Big\lgroup$}{}{} +%\capcs lim {limit function: $\lim$}{}{} +\capcs lim {极限函数:$\lim$}{}{} +%\capcs liminf {inferior limit function: $\liminf$}{}{} +\capcs liminf {下极限函数:$\liminf$}{}{} +%\capcs limits {place superscript above and subscript below a +% large operator}*{} +\capcs limits {在一个大的运算符的上下放置上标和下标}*{} +%\capcs limsup {superior limit function: $\limsup$}{}{} +\capcs limsup {上极限函数:$\limsup$}{}{} +%\capcs line {produce a justified line of type}{}{} +\capcs line {输出两端对齐的行}{}{} +%\capcs linepenalty {penalty for line breaking added to each line, +% by default~10}*{} +\capcs linepenalty {对加到每一行的断行的惩罚,默认值为 10}*{} +%\capcs lineskip {vertical glue from one baseline to the next if the +% lines are closer together than |\\lineskiplimit|, by default 1\pt}*{} +\capcs lineskip {如果行之间的距离小于|\\lineskiplimit| 时,从一个基线到另一个基线的竖直粘连,默认值为 1\pt}*{} +%\capcs lineskiplimit {threshold for using |\\lineskip| instead of +% |\\base\-line\-skip|, by default 0\pt}*{} +\capcs lineskiplimit {采用 |\\lineskip| 而不是 |\\base\-line\-skip| 的阈值,默认值为 0\pt}*{} +%\capcs ll {much less than relation: $\ll$}{}{} +\capcs ll {远小于关系:$\ll$}{}{} +%\capcs llap {produce text (with no width) extending to the left +% of the current position}{}{} +\capcs llap {输出向当前位置左侧伸展的(没有宽度的)文本}{}{} +%\capcs lmoustache {top half of a large brace: $\big\lmoustache$}{}{} +\capcs lmoustache {大的大括号的上半部分:$\big\lmoustache$}{}{} +%\capcs ln {natural logarithm function: $\ln$}{}{} +\capcs ln {自然对数函数:$\ln$}{}{} +%\capcs lnot {logical ``not'' symbol: $\lnot$}{}{} +\capcs lnot {逻辑“非”符号:$\lnot$}{}{} +%\capcs log {logarithm function: $\log$}{}{} +\capcs log {对数函数:$\log$}{}{} +%\capcs long {allow |\\par| tokens in the argument(s) of +% the following definition}*{} +\capcs long {在随后的定义中允许在参数中使用 |\\par| 记号}*{} +%\capcs longleftarrow {relation: $\longleftarrow$}{}{} +\capcs longleftarrow {关系:$\longleftarrow$}{}{} +%\capcs Longleftarrow {relation: $\Longleftarrow$}{}{} +\capcs Longleftarrow {关系:$\Longleftarrow$}{}{} +%\capcs longleftrightarrow {relation: $\longleftrightarrow$}{}{} +\capcs longleftrightarrow {关系:$\longleftrightarrow$}{}{} +%\capcs Longleftrightarrow {relation: $\Longleftrightarrow$}{}{} +\capcs Longleftrightarrow {关系:$\Longleftrightarrow$}{}{} +%\capcs longmapsto {relation: $\longmapsto$}{}{} +\capcs longmapsto {关系:$\longmapsto$}{}{} +%\capcs longrightarrow {relation: $\longrightarrow$}{}{} +\capcs longrightarrow {关系:$\longrightarrow$}{}{} +%\capcs Longrightarrow {relation: $\Longrightarrow$}{}{} +\capcs Longrightarrow {关系:$\Longrightarrow$}{}{} +%\capcs loop {start a loop to be ended by |\\repeat|}{}{} +\capcs loop {开始一个由 |\\repeat| 结束的循环}{}{} +%\capcs looseness {difference between the number of lines you want a +% paragraph to be relative to the optimal number}*{} +\capcs looseness {一个段落你希望的行数与最优值之间的差异}*{} +%\capcs lor {logical ``or'' operator: $\lor$}{}{} +\capcs lor {逻辑“或”运算符:$\lor$}{}{} +%\capcs lower {lower a specified box by a specified amount}*{} +\capcs lower {降低指定盒子指定的数值}*{} +%\capcs lowercase {convert uppercase letters in the specified text +% to lowercase}*{} +\capcs lowercase {将指定文字中的大写字母转化为小写字母}*{} +%\capcs lq {left quote character for text: \lq}{}{} +\capcs lq {文本中的左引号字符:\lq}{}{} +%\capcs mag {$1000$ times the ratio for enlarging all dimensions}*{} +\capcs mag {放大所有尺寸的比例 $1000$ 倍}*{} +%\capcs magnification {like |\\mag|, but don't enlarge the page size}{}{} +\capcs magnification {与 |\\mag| 一样,但不放大页面尺寸}{}{} +%\capcs magstep {$1000 \cdot 1.2^n$ for a specified $n$}{}{} +\capcs magstep {对于指定的 $n$ 得到 $1000 \cdot 1.2^n$}{}{} +%\capcs magstephalf {$1000\cdot\sqrt{1.2}$}{}{} +\capcs magstephalf {$1000\cdot\sqrt{1.2}$}{}{} +%\capcs mapsto {relation: $\mapsto$}{}{} +\capcs mapsto {关系:$\mapsto$}{}{} +%\capcs mark {produce a mark item with a specified text}*{} +\capcs mark {产生采用指定文的标记项目}*{} +%\capcs mathaccent {put specified math accent over the next character}*{} +\capcs mathaccent {在接紧的字符上放置指定的数学重音符}*{} +%\capcs mathbin {space a specified subformula as a binary operator}*{} +\capcs mathbin {像二元运算符那样分隔指定的子公式}*{} +%\capcs mathchar {produce the math character with the specified mathcode}*{} +\capcs mathchar {输出带有指定数学代码的数学字符}*{} +%\capcs mathchardef {define a specified control sequence to be a mathcode, +% a number between 0 and $2^{15}-1$}*{} +\capcs mathchardef {定义指定的控制序列,使之位于 0 至 $2^{15}-1$ 之间的数学代码}*{} +%\capcs mathchoice {select one of four specified math subformulas +% depending on the current style}*{} +\capcs mathchoice {根据当前的样式从四个指定的数学子公式中选择一个}*{} +%\capcs mathclose {space a specified subformula as a closing delimiter}*{} +\capcs mathclose {像闭合分界符那样分隔指定的子公式}*{} +%\capcs mathcode {the mathcode of a specified character}*{} +\capcs mathcode {指定字符的数学代码}*{} +%\capcs mathinner {space a specified subformula as an inner formula, e.g., a +% fraction}*{} +\capcs mathinner {像行间分式那样分隔指定的子公式}*{} +%\capcs mathop {space a specified subformula as a large math operator}*{} +\capcs mathop {像大数学运算符那样分隔指定的子公式}*{} +%\capcs mathopen {space a specified subformula as an opening delimiter}*{} +\capcs mathopen {像开放分界符那样分隔指定的子公式}*{} +%\capcs mathord {space a specified subformula as an ordinary character}*{} +\capcs mathord {像普通字符那样分隔指定子公式}*{} +%\capcs mathpalette {produce a |\\mathchoice| which expands a specified +% control sequence depending on the current style}{}{} +\capcs mathpalette {输出根据当前样式展开指定的控制序列的 |\\mathchoice|}{}{} +%\capcs mathpunct {space a specified subformula as punctuation}*{} +\capcs mathpunct {像标点符号那样分隔指定子公式}*{} +%\capcs mathrel {space a specified subformula as a relation}*{} +\capcs mathrel {像关系那样分隔指定子公式}*{} +%\capcs mathstrut {produce an invisible box with the height and depth of a +% left parenthesis and no width}{}{} +\capcs mathstrut {输出深度与高度与左圆括号一致,但宽度为零的不可见盒子}{}{} +%\capcs mathsurround {space \TeX\ kerns before and after math in text}*{} +\capcs mathsurround {文本中,在数学公式前后分隔 \TeX\ 紧排}*{} +%\capcs matrix {produce a specified matrix}{}{} +\capcs matrix {输出指定矩阵}{}{} +%\capcs max {maximum function: $\max$}{}{} +\capcs max {最大化函数:$\max$}{}{} +%\capcs maxdeadcycles {value of |\\deadcycles| at which \TeX\ complains, +% and then uses its own output routine, by default~25}*{} +\capcs maxdeadcycles {\TeX\ 给出警告,并使用其自身的输出程序 |\\deadcycles| 的值默认值为 25}*{} +%\capcs maxdepth {maximum depth of the bottom box on a page, +% by default 4\pt}*{} +\capcs maxdepth {页面上底边盒子的最大深度,默认值为 4\pt}*{} +%\capcs maxdimen {largest dimension acceptable to \TeX}{}{} +\capcs maxdimen {\TeX\ 可接受的最大尺寸}{}{} +%\capcs meaning {produce the human-understandable meaning of a specified +% token as characters}*{} +\capcs meaning {以字符形式输出人类能理解的指定记号的意义}*{} +%\capcs medbreak {indicate desirable page +% break with |\\penalty-100| and produce |\\medskipamount| glue}{}{} +\capcs medbreak {指定使用 |\\penalty-100| 进行期望分页,并输出 |\\medskipamount| 粘连}{}{} +%\capcs medmuskip {glue for a medium math space, by default 4\mud\ plus 2\mud\ +% minus 4\mud}*{} +\capcs medmuskip {中等数学间隔的粘连,默认值为 4\mud\ plus 2\mud\ minus 4\mud}*{} +%\capcs medskip {produce |\\medskipamount| glue}{}{} +\capcs medskip {输出 |\\medskipamount| 粘连}{}{} +%\capcs medskipamount {glue for a medium vertical skip, by default 6\pt +% plus 2\pt\ minus 2\pt}{}{} +\capcs medskipamount {中等竖直间隔的粘连,默认值为 6\pt plus 2\pt\ minus 2\pt}{}{} +%\capcs message {show expansion of the specified text on the terminal}*{} +\capcs message {展开并显示指定文本到终端上}*{} +%\capcs mid {middle relation: $\mid$}{}{} +\capcs mid {中项关系:$\mid$}{}{} +%\capcs midinsert {produce the specified text at the current position if +% possible, otherwise at the top of the next page}{}{} +\capcs midinsert {如果可以有,在当前位置输出指定文本,否则在下一页的顶部}{}{} +%\capcs min {minimum function: $\min$}{}{} +\capcs min {最小化函数:$\min$}{}{} +%\capcs mit {use math italics, i.e., do |\\fam=1|}{}{} +\capcs mit {使用数学斜体,即执行 |\\fam=1|}{}{} +%\capcs mkern {produce a specified kern in units of |mu| for math}*{} +\capcs mkern {数学中以 |mu| 为单位输出指定的紧排}*{} +%\capcs models {models relation: $\models$}{}{} +\capcs models {模关系:$\models$}{}{} +%\capcs month {current month, as a number}*{} +\capcs month {数字形式的当前月份}*{} +%\capcs moveleft {move a specified box left by a specified space; legal +% only in vertical modes}*{} +\capcs moveleft {将指定盒子向左移动指定间隔;只有竖直模式中有效}*{} +%\capcs moveright {move a specified box right by a specified space; legal +% only in vertical modes}*{} +\capcs moveright {将指定盒子向右移动指定间隔;只有竖直模式中有效}*{} +%\capcs mp {minus and plus operator: $\mp$}{}{} +\capcs mp {减号与加号运算符:$\mp$}{}{} +%\capcs mskip {produce specified glue in units of |mu| for math}*{} +\capcs mskip {数学中以|mu| 为单位输出指定的粘连}*{} +%\capcs mu {math Greek letter $\mu$}{}{} +\capcs mu {数学希腊字母 $\mu$}{}{} +%\capcs multiply {multiply a specified |\\count| register by a specified +% integer}*{} +\capcs multiply {将指定 |\\count| 寄存器乘以指定整数}*{} +%\capcs multispan {make next alignment entry span a specified number of +% columns (or rows)}{}{} +\capcs multispan {使得紧接着的对齐条目跨越指定数目的列(或行)}{}{} +%\capcs muskip {the specified muglue register}*{} +\capcs muskip {指定的数学粘连寄存器}*{} +%\capcs muskipdef {define a specified control sequence to be a number +% corresponding to a |\\muskip| register}*{} +\capcs muskipdef {定义指定的控制序列为一个与 |\\muskip| 寄存器对应的数值}*{} +%\capcs nabla {backwards difference symbol: $\nabla$}{}{} +\capcs nabla {相反的微分符号:$\nabla$}{}{} +%\capcs narrower {make both left and right margins narrower by +% |\\parindent|}{}{} +\capcs narrower {使得左右边界都变窄 |\\parindent|}{}{} +%\capcs natural {natural symbol for music: $\natural$}{}{} +\capcs natural {音乐中的本位符号:$\natural$}{}{} +%\capcs nearrow {northeast arrow relation: $\nearrow$}{}{} +\capcs nearrow {东北箭头关系:$\nearrow$}{}{} +%\capcs ne {not equal relation: $\ne$}{}{} +\capcs ne {不等于关系:$\ne$}{}{} +%\capcs neg {logical ``not'' symbol: $\neg$}{}{} +\capcs neg {逻辑“非”符号:$\neg$}{}{} +%\capcs negthinspace {kern $-\frac1/6$\em}{}{} +\capcs negthinspace {$-\frac1/6$\em 紧排}{}{} +%\capcs neq {not equal relation: $\neq$}{}{} +\capcs neq {不等于关系:$\neq$}{}{} +%\capcs newbox {reserve and name a |\\box| register}{}{\@newbox} +\capcs newbox {保留并命名 |\\box| 寄存器}{}{\@newbox} +%\capcs newcount {reserve and name a |\\count| register}{}{\@newcount} +\capcs newcount {保留并命名 |\\count| 寄存器}{}{\@newcount} +%\capcs newdimen {reserve and name a |\\dimen| register}{}{\@newdimen} +\capcs newdimen {保留并命名 |\\dimen| 寄存器}{}{\@newdimen} +%\capcs newfam {reserve and name a math family}{}{\@newfam} +\capcs newfam {保留并命名数学字体族}{}{\@newfam} +%\capcs newhelp {name a specified help message}{}{\@newhelp} +\capcs newhelp {命名指定的帮助信息}{}{\@newhelp} +%\capcs newif {define a new conditional with the specified name}{}{\@newif} +\capcs newif {用指定名称定义新的条件式}{}{\@newif} +%\capcs newinsert {name an insertion class, and reserve a +% corresponding |\\box|, |\\count|, |\\dimen|, and |\\skip| registers} +% {}{\@newinsert} +\capcs newinsert {命名插入类,并保留相应的 |\\box|、|\\count|、|\\dimen|和|\\skip| 寄存器}{}{\@newinsert} +%\capcs newlanguage {reserve and name a |\\language|}{}{\@newlanguage} +\capcs newlanguage {保留并命名 |\\language|}{}{\@newlanguage} +%\capcs newlinechar {end-of-line character for |\\write|, etc.}*{} +\capcs newlinechar {给 |\\write| 等的行结束字符}*{} +%\capcs newmuskip {reserve and name a |\\muskip| register}{}{\@newmuskip} +\capcs newmuskip {保留并命名 |\\muskip| 寄存器}{}{\@newmuskip} +%\capcs newread {reserve and name an input stream}{}{\@newread} +\capcs newread {保留并命名输入流}{}{\@newread} +%\capcs newskip {reserve and name a |\\skip| register}{}{\@newskip} +\capcs newskip {保留并命名 |\\skip| 寄存器}{}{\@newskip} +%\capcs newtoks {reserve and name a |\\toks| register}{}{\@newtoks} +\capcs newtoks {保留并命名 |\\toks| 寄存器}{}{\@newtoks} +%\capcs newwrite {reserve and name an output stream}{}{\@newwrite} +\capcs newwrite {保留并命名输出流}{}{\@newwrite} +%\capcs ni {``reverse in'' relation: $\ni$}{}{} +\capcs ni {“反向属于”关系:$\ni$}{}{} +%\capcs noalign {insert material between rows (or columns) of an +% alignment}*{} +\capcs noalign {在对齐的行(或列)插入其它内容}*{} +%\capcs noboundary {inhibit ligatures or kerns involving the current font's +% |boundarychar|}*{} +\capcs noboundary {禁止使用当前字体的边界字符进行连字或紧排}*{} +%\capcstwo nobreak {do |\\penalty10000|, i.e., +% inhibit a line or page break}{}{hnobreak:vnobreak} +\capcstwo nobreak {执行 |\\penalty10000|,即禁止断行或分页}{}{hnobreak:vnobreak} +%\capcs noexpand {suppress expansion of the next token}*{} +\capcs noexpand {抑制下一个记号的展开}*{} +%\capcs noindent {enter horizontal mode without indenting the paragraph}*{} +\capcs noindent {进入不缩进段落的水平模式}*{} +%\capcs nointerlineskip {inhibit interline glue before the next line}{}{} +\capcs nointerlineskip {在下一行前禁止行内粘连}{}{} +%\capcs nolimits {place superscript and subscript after large operators}*{} +\capcs nolimits {将上下标放在大的运算符之后}*{} +%\capcs nonfrenchspacing {make interword spacing depend on punctuation}{}{} +\capcs nonfrenchspacing {使字间间隔依赖于标点符号}{}{} +%\capcs nonscript {inhibit any following glue or kern when +% in script and scriptscript styles}*{} +\capcs nonscript {在上下标或次上下标样式中禁止任何随后的粘连或紧排}*{} +%\capcs nonstopmode {don't stop at errors, even those about missing files}*{} +\capcs nonstopmode {不在任何错误处停下,即使是有关缺失文件的错误}*{} +%\capcs nopagenumbers {inhibit printing of page numbers, i.e., do +% |\\footline = {\\hfil}|}{}{} +\capcs nopagenumbers {禁止打印出页码,即执行 |\\footline = {\\hfil}|}{}{} +%\capcs normalbaselines {set |\\baselineskip|, |\\line\-skip|, and +% |\\line\-skip\-limit| to the normal values for the current type size}{}{} +\capcs normalbaselines {将 |\\baselineskip|、|\\line\-skip| 和 |\\line\-skip\-limit| 设为当前字体大小的正常值}{}{} +%\capcs normalbaselineskip {value of |\\baselineskip| for the +% current type size}{}{} +\capcs normalbaselineskip {针对当前字体大小的 |\\baselineskip| 值}{}{} +%\capcs normalbottom {make the bottom margin be the same from page to page}{}{} +\capcs normalbottom {使得底边距从一页到另一页是相同的}{}{} +%\capcs normallineskip {value of |\\lineskip| for the current type +% size}{}{} +\capcs normallineskip {针对当前字体大小的 |\\lineskip| 值}{}{} +%\capcs normallineskiplimit {value of |\\lineskiplimit| for the +% current type size}{}{} +\capcs normallineskiplimit {针对当前字体大小的 |\\lineskiplimit| 值}{}{} +%\capcs not {a slash with zero width for constructing negations of math +% relations, as in $\not=$}{}{} +\capcs not {宽度为零的斜杠,用于构建数学关系的否定形式,比如 $\not=$ 中那样}{}{} +%\capcs notin {noninclusion relation: $\notin$}{}{} +\capcs notin {非包含关系:$\notin$}{}{} +%\capcs nu {math Greek letter $\nu$}{}{} +\capcs nu {数学希腊字母 $\nu$}{}{} +%\capcs null {expands to an empty hbox}{}{} +\capcs null {展开为空的 hbox}{}{} +%\capcs nulldelimiterspace {space produced by a null delimiter, by +% default 1.2\pt}*{} +\capcs nulldelimiterspace {由空的定界符产生的间隔,默认值为 1.2\pt}*{} +%\capcs nullfont {primitive font with no characters in it}*{} +\capcs nullfont {没有字符的原始字体}*{} +%\capcs number {produce a specified number as characters}*{} +\capcs number {以字符形式输出指定的数值}*{} +%\capcs nwarrow {northwest arrow relation: $\nwarrow$}{}{} +\capcs nwarrow {西北箭头关系:$\nwarrow$}{}{} +\bookmark{2}{从O到T}% +%\capcs o {Danish letter: \o}{}{} +\capcs o {丹麦语字母:\o}{}{} +%\capcs O {Danish letter: \O}{}{} +\capcs O {丹麦语字母:\O}{}{} +%\capcs obeylines {make each end-of-line in the input file +% equivalent to |\\par|}{}{} +\capcs obeylines {使得输入文件中的每个行结束符号等同于 |\\par|}{}{} +%\capcs obeyspaces {produce space in the output for each space character in the +% input}{}{} +\capcs obeyspaces {对于输入中的每个间隔字符在输出文件中输出间隔}{}{} +%\capcs odot {centered dot operation: $\odot$}{}{} +\capcs odot {居中的点运算符:$\odot$}{}{} +%\capcs oe {\oe\ ligature}{}{} +\capcs oe {\oe\ 连字}{}{} +%\capcs OE {\OE\ ligature}{}{} +\capcs OE {\OE\ 连字}{}{} +%\capcs offinterlineskip {inhibit interline glue from now on}{}{} +\capcs offinterlineskip {从现在开始禁止行间粘连}{}{} +%\capcs oint {contour integral operator: $\oint$}{}{} +\capcs oint {围线积分运算符:$\oint$}{}{} +%\capcs oldstyle {use old style digits: {\oldstyle1234567890}}{}{} +\capcs oldstyle {使用古体数字:{\oldstyle1234567890}}{}{} +%\capcs omega {math Greek letter $\omega$}{}{} +\capcs omega {数学希腊字母 $\omega$}{}{} +%\capcs Omega {math Greek letter $\Omega$}{}{} +\capcs Omega {数学希腊字母 $\Omega$}{}{} +%\capcs ominus {circled minus operator: $\ominus$}{}{} +\capcs ominus {圈减号运算符:$\ominus$}{}{} +%\capcs omit {skip a column's (or row's) template in an alignment}*{} +\capcs omit {在对齐中忽略列的(或行的)模板}*{} +%\capcs openin {prepare a specified input stream to read from a file}*{} +\capcs openin {准备指定的输入流以从文件中读入}*{} +%\capcs openout {prepare a specified output stream to write to a file}*{} +\capcs openout {准备指定的输出流以向文件中写入}*{} +%\capcs openup {increase |\\baselineskip|, |\\lineskip|, and +% |\\lineskiplimit| by a specified amount}{}{} +\capcs openup {使 |\\baselineskip|、|\\lineskip| 和 |\\lineskiplimit| 增加指定的量}{}{} +%\capcs oplus {circled plus operator: $\oplus$}{}{} +\capcs oplus {圈加号运算符:$\oplus$}{}{} +%\capcs or {separate the cases of an |\\ifcase|}*{\@or} +\capcs or {用于分隔 |\\ifcase| 的情形}*{\@or} +%\capcs oslash {circled slash operator: $\oslash$}{}{} +\capcs oslash {圈斜线运算符:$\oslash$}{}{} +%\capcs otimes {circled times operator: $\otimes$}{}{} +\capcs otimes {圈乘号运算符:$\otimes$}{}{} +%\capcs outer {make the following macro definition illegal in contexts in +% which tokens are absorbed at high speed}*{} +\capcs outer {使得随后的宏定义在以高速读入的记号情形下无效}*{} +%\capcs output {token list \TeX\ expands when it finds a page break}*{} +\capcs output {当遇到分页时 \TeX\ 展开的记号列表}*{} +%\capcs outputpenalty {if the page break occurred at a penalty, the value +% of that penalty; otherwise zero}*{} +\capcs outputpenalty {如果分页发生于惩罚处,则为惩罚的值,否则为零}*{} +%\capcs over {produce a fraction with a bar of default thickness}*{} +\capcs over {输出一个带有默认厚度横线的分式}*{} +%\capcs overbrace {produce a brace covering the top of a formula, +% as in $\overbrace{h+w}{}$}{}{} +\capcs overbrace {输出一个覆盖于公式顶部的大括号,比如 $\overbrace{h+w}{}$ 中那样}{}{} +%\capcs overfullrule {width of the rule appended to an overfull box}*{} +\capcs overfullrule {附加于过满盒子的标线的宽度}*{} +%\capcs overleftarrow {produce a left arrow covering the top of +% a formula, as in $\overleftarrow{r+a}$}{}{} +\capcs overleftarrow {输出一个覆盖于公式顶部的向左的箭头,比如 $\overleftarrow{r+a}$ 中那样}{}{} +%\capcs overline {produce a line covering the top of a formula, +% as in $\overline{2b}$}*{} +\capcs overline {输出一个覆盖于公式顶部的直线,比如 $\overline{2b}$ 中那样}*{} +%\capcs overrightarrow {produce a right arrow covering the top of a +% formula, as in $\overrightarrow{i+t}$}{}{} +\capcs overrightarrow {输出一个覆盖于公式顶部的向右的箭头,比如 $\overrightarrow{i+t}$ 中那样}{}{} +%\capcs overwithdelims {produce a fraction with a bar of the default thickness +% and surrounded by specified delimiters}*{} +\capcs overwithdelims {输出一个带有默认厚度横线,且被指定分界符包围的分式}*{} +%\capcs owns {owns relation: $\owns$}{}{} +\capcs owns {固有关系:$\owns$}{}{} +%\capcs P {paragraph character for text: \P}{}{} +\capcs P {文本中的段落字符:\P}{}{} +%\capcs pagedepth {\TeX\ sets this to the current depth of the current +% page}*{} +\capcs pagedepth {\TeX\ 将其设置为当前页的尖前深度}*{} +%\capcs pagefilllstretch {\TeX\ sets this to the amount of |filll| stretch on +% the current page}*{} +\capcs pagefilllstretch {\TeX\ 将其设置为在当前页的 |filll| 扩展量}*{} +%\capcs pagefillstretch {\TeX\ sets this to the amount of |fill| stretch on +% the current page}*{} +\capcs pagefillstretch {\TeX\ 将其设置为在当前页的 |fill| 扩展量}*{} +%\capcs pagefilstretch {\TeX\ sets this to the amount of |fil| stretch on the +% current page}*{} +\capcs pagefilstretch {\TeX\ 将其设置为在当前页的 |fil| 扩展量}*{} +%\capcs pagegoal {\TeX\ sets this to the desired height for the current page +% (i.e., |\\vsize| when the first box is put on the page)}*{} +\capcs pagegoal {\TeX\ 将其设置为当前页的期望高度(即 |\\vsize|,当第一个盒被放在该页时)}*{} +%\capcs pageinsert {produce the specified text on the following page, and use up +% the full page}{}{} +\capcs pageinsert {在随后的页面输出指定的文本,并用完整页}{}{} +%\capcs pageno {the register |\\count0|, which contains the +% (possibly negative) page number}{}{} +\capcs pageno {|\\count0| 寄存器,它包括(可能是负的)页码}{}{} +%\capcs pageshrink {\TeX\ sets this to the total amount of shrinkability +% on the current page}*{} +\capcs pageshrink {\TeX\ 将其设置为在当前页面总的可收缩量}*{} +%\capcs pagestretch {\TeX\ sets this to the total amount of stretchability +% on the current page}*{} +\capcs pagestretch {\TeX\ 将其设置为在当前页面总的可伸展量}*{} +%\capcs pagetotal {\TeX\ sets this to the natural height of the current +% page}*{} +\capcs pagetotal {\TeX\ 将其设置为当前页的自然高度}*{} +%\capcs par {finish paragraph and terminate horizontal mode}*{\@par} +\capcs par {结束段落并结束水平模式}*{\@par} +%\capcs parallel {parallel relation: $\parallel$}{}{} +\capcs parallel {平行关系:$\parallel$}{}{} +%\capcs parfillskip {horizontal glue \TeX\ inserts at the end of a +% paragraph}*{} +\capcs parfillskip {\TeX\ 在段落结束处插入的水平粘连}*{} +%\capcs parindent {horizontal space \TeX\ inserts at the start of a +% paragraph}*{} +\capcs parindent {\TeX\ 在段落开始处插入的水平间距}*{} +%\capcs parshape {specify the width and length of each line +% in the next paragraph}*{} +\capcs parshape {指定下一段落中每行的宽度与长度}*{} +%\capcs parskip {vertical glue \TeX\ inserts before a paragraph}*{} +\capcs parskip {\TeX\ 在段落前插入的竖直粘连}*{} +%\capcs partial {partial derivative symbol: $\partial$}{}{} +\capcs partial {偏微分符号:$\partial$}{}{} +%\capcs pausing {if positive, stop after reading each line of input for a +% possible replacement}*{} +\capcs pausing {如果是正值,在读入每一行后停下来以便进行可能的替换}*{} +%\capcstwo penalty {produce penalty (or bonus, if negative) for breaking +% line or page here}*{hpenalty:vpenalty} +\capcstwo penalty {输出在此处断行或分页的惩罚(或奖励,如果是负值)}*{hpenalty:vpenalty} +%\capcs perp {perpendicular relation: $\perp$}{}{} +\capcs perp {垂直关系:$\perp$}{}{} +%\capcs phantom {produce an invisible formula with the +% dimensions of a specified subformula}{}{} +\capcs phantom {输出指定子公式大小的不可见公式}{}{} +%\capcs phi {math Greek letter $\phi$}{}{} +\capcs phi {数学希腊字母 $\phi$}{}{} +%\capcs Phi {math Greek letter $\Phi$}{}{} +\capcs Phi {数学希腊字母 $\Phi$}{}{} +%\capcs pi {math Greek letter $\pi$}{}{} +\capcs pi {数学希腊字母 $\pi$}{}{} +%\capcs Pi {math Greek letter $\Pi$}{}{} +\capcs Pi {数学希腊字母 $\Pi$}{}{} +%\capcs plainoutput {\plainTeX's |\\output| routine}{}{} +\capcs plainoutput {\plainTeX 的 |\\output| 程序}{}{} +%\capcs pm {plus and minus operator: $\pm$}{}{} +\capcs pm {加减运算符:$\pm$}{}{} +%\capcs pmatrix {produce a parenthesized matrix}{}{} +\capcs pmatrix {输出带圆括号的矩阵}{}{} +%\capcs pmod {parenthesized modulus notation to put at the end of a formula, as +% in $x \equiv y+1 \pmod 2$}{}{} +\capcs pmod {放置于公式结尾处的带圆括号的模数标记,比如 $x \equiv y+1 \pmod 2$ 中那样}{}{} +%\capcs postdisplaypenalty {additional penalty for a line break +% just after a display, by default~0}*{} +\capcs postdisplaypenalty {恰好在显示陈列公式之后的断行的额外惩罚,其默认值为 0}*{} +%\capcs Pr {probability function: $\Pr$}{}{} +\capcs Pr {概率函数:$\Pr$}{}{} +%\capcs prec {precedes relation: $\prec$}{}{} +\capcs prec {优先关系:$\prec$}{}{} +%\capcs preceq {precedes or equals relation: $\preceq$}{}{} +\capcs preceq {优先或等于关系:$\preceq$}{}{} +%\capcs predisplaypenalty {additional penalty for a line break just +% before a display, by default~0}*{} +\capcs predisplaypenalty {恰好在陈列公式之前断行的额外惩罚,其默认值为 0}*{} +%\capcs predisplaysize {\TeX\ sets this to the width of the +% line preceding a display}*{} +\capcs predisplaysize {\TeX\ 将其设置为显示陈列公式之前的行的宽度}*{} +%\capcs pretolerance {badness tolerance for line breaks without +% hyphenation, by default~100}*{} +\capcs pretolerance {不断字断行时劣度的容许值,默认值为 100}*{} +%\capcs prevdepth {depth of the last nonrule box on the +% current vertical list}*{} +\capcs prevdepth {在当前竖直列表中最后一个非标线盒子的深度}*{} +%\capcs prevgraf {\TeX\ sets this to the number +% of lines in the paragraph so far (in horizontal mode) +% or in the previous paragraph (in vertical mode)}*{} +\capcs prevgraf {\TeX\ 将其设置为当前段落(水平模式下)或前一段落(竖直模式下)的行数}*{} +%\capcs prime {prime math symbol, as in $r^\prime$}{}{} +\capcs prime {质数数学符号,比如 $r^\prime$ 中那样}{}{} +%\capcs proclaim {begin a theorem, lemma, hypothesis, $\ldots$}{}{\@proclaim} +\capcs proclaim {开始定理、引理、假设 $\ldots$}{}{\@proclaim} +%\capcs prod {large product operator: $\prod$}{}{} +\capcs prod {大的乘积运算符:$\prod$}{}{} +%\capcs propto {proportional to relation: $\propto$}{}{} +\capcs propto {比例关系:$\propto$}{}{} +%\capcs psi {math Greek letter $\psi$}{}{} +\capcs psi {数学希腊字母 $\psi$}{}{} +%\capcs Psi {math Greek letter $\Psi$}{}{} +\capcs Psi {数学希腊字母 $\Psi$}{}{} +%\capcs qquad {produce horizontal glue with width 2\em}{}{} +\capcs qquad {输出宽度为 2\em 的水平粘连}{}{} +%\capcs quad {produce horizontal glue with width 1\em}{}{} +\capcs quad {输出宽度为 1\em 的水平粘连}{}{} +%\capcs radical {produce a specified radical symbol}*{} +\capcs radical {输出指定根号符号}*{} +%\capcs raggedbottom {allow the bottom margin to vary from page to page}{}{} +\capcs raggedbottom {允许底边距在页与页间变化}{}{} +%\capcs raggedright {allow the right margin to vary from line to line}{}{} +\capcs raggedright {允许右边距在行与行间变化}{}{} +%\capcs raise {raise a specified box by a specified amount}*{} +\capcs raise {将指定盒子升高指定的量}*{} +%\capcs rangle {right angle delimiter: $\rangle$}{}{} +\capcs rangle {右角度分界符:$\rangle$}{}{} +%\capcs rbrace {right brace delimiter: $\rbrace$}{}{} +\capcs rbrace {右大括号分界符$\rbrace$}{}{} +%\capcs rbrack {right bracket delimiter: $\rbrack$}{}{} +\capcs rbrack {右方括号分界符:$\rbrack$}{}{} +%\capcs rceil {right ceiling delimiter: $\rceil$}{}{} +\capcs rceil {右上限分界符:$\rceil$}{}{} +%\capcs Re {complex real part symbol: $\Re$}{}{} +\capcs Re {复数实数部分符号:$\Re$}{}{} +%\capcs read {read a line from a specified input stream}*{} +\capcs read {从指定输入流中读入行}*{} +%\capcs relax {do nothing}*{} +\capcs relax {什么也不做}*{} +%\capcs relpenalty {additional penalty for breaking after a relation, +% by default~500}*{} +\capcs relpenalty {在关系后的断行或分页的额外惩罚,默认值为 500}*{} +%\capcs repeat {end a loop started with |\\loop|}{}{\@repeat} +\capcs repeat {结束一个以 |\\loop| 开始的循环}{}{\@repeat} +%\capcs rfloor {right floor delimiter: $\rfloor$}{}{} +\capcs rfloor {右下限分界符:$\rfloor$}{}{} +%\capcs rgroup {right group delimiter (the smallest size is shown here): +% $\Big\rgroup$}{}{} +\capcs rgroup {右编组定界符(这里显示的是最小尺寸的):$\Big\rgroup$}{}{} +%\capcs rho {math Greek letter $\rho$}{}{} +\capcs rho {数学希腊字母 $\rho$}{}{} +%\capcs right {produce the specified delimiter at the right end of a +% subformula started with |\\left|}*{} +\capcs right {在子公式右侧输出由 |\\left| 开始的指定的分界符}*{} +%\capcs rightarrow {relation: $\rightarrow$}{}{} +\capcs rightarrow {关系:$\rightarrow$}{}{} +%\capcs Rightarrow {relation: $\Rightarrow$}{}{} +\capcs Rightarrow {关系:$\Rightarrow$}{}{} +%\capcs rightarrowfill {fill enclosing hbox with a |\\rightarrow|: +% \hbox to 3.5em{\rightarrowfill}}{}{} +\capcs rightarrowfill {使用 |\\rightarrow| 填充所在的水平盒子:\hbox to 3.5em{\rightarrowfill}}{}{} +%\capcs rightharpoondown {relation: $\rightharpoondown$}{}{} +\capcs rightharpoondown {关系:$\rightharpoondown$}{}{} +%\capcs rightharpoonup {relation: $\rightharpoonup$}{}{} +\capcs rightharpoonup {关系:$\rightharpoonup$}{}{} +%\capcs rightleftharpoons {relation: $\rightleftharpoons$}{}{} +\capcs rightleftharpoons {关系:$\rightleftharpoons$}{}{} +%\capcs rightline {produce line with its text pushed to right margin}{}{} +\capcs rightline {输出文字靠右边界的行}{}{} +%\capcs rightskip {glue \TeX\ inserts at the right of each line}*{} +\capcs rightskip {\TeX\ 在每行右侧插入的粘连}*{} +%\capcs righthyphenmin {size of the smallest word fragment \TeX\ allows +% after a hyphen at the end of a word, by default~3}*{} +\capcs righthyphenmin {\TeX\ 允许的单词结尾在连字号之后的最小片断的大小,默认值为 3}*{} +%\capcs rlap {produce text (with no width) extending to the right +% of the current position}{}{} +\capcs rlap {在当前位置的右侧输出(没有宽度的)文本}{}{} +%\capcs rm {use roman type, i.e., do |\\tenrm\\fam=0|}{}{} +\capcs rm {使用罗马体,即很执行 |\\tenrm\\fam=0|}{}{} +%\capcs rmoustache {bottom half of a large brace: $\big\rmoustache$}{}{} +\capcs rmoustache {大的大括号的下半部分:$\big\rmoustache$}{}{} +%\capcs romannumeral {produce the lowercase roman numeral representation of a +% specified number as characters}{}{} +\capcs romannumeral {以字符的形式输出指定数值的小写罗马数值表示}{}{} +%\capcs root {produce a specified root of a specified subformula, as in +% $\root 3 \of 2$}{}{} +\capcs root {输出一指定子公式的指定根,比如 $\root 3 \of 2$ 中那样}{}{} +%\capcs rq {right quote character for text: \rq}{}{} +\capcs rq {文本中的右引号:\rq}{}{} +%\capcs S {section character for text: \S}{}{} +\capcs S {文本中的小节字符:\S}{}{} +%\capcs sb {implicit subscript character}{}{} +\capcs sb {隐式下标字符}{}{} +%\capcs scriptfont {the script style font in a specified math family}*{} +\capcs scriptfont {在指定数学字体族中的上下标样式字体}*{} +%\capcs scriptscriptfont {the scriptscript style font in a specified +% math family}*{} +\capcs scriptscriptfont {在指定数学字体族中的次上下标样式字体}*{} +%\capcs scriptscriptstyle {use scriptscriptstyle size in a formula}*{} +\capcs scriptscriptstyle {在公式中使用次上下标样式尺寸}*{} +%\capcs scriptspace {additional space \TeX\ kerns after a subscript or +% superscript, by default 0.5\pt}*{} +\capcs scriptspace {\TeX\ 在下标或上标之后加入的额外的紧排,默认值为 0.5\pt}*{} +%\capcs scriptstyle {use scriptstyle size in a formula}*{} +\capcs scriptstyle {在公式中使用上下标样式尺寸}*{} +%\capcs scrollmode {don't stop at most errors, but do stop at errors +% about missing files}*{} +\capcs scrollmode {不在任何错误处停下,但在缺失文件错误处停下}*{} +%\capcs searrow {southeast arrow relation: $\searrow$}{}{} +\capcs searrow {东南箭头关系:$\searrow$}{}{} +%\capcs sec {secant function: $\sec$}{}{} +\capcs sec {正切函数:$\sec$}{}{} +%\capcs setbox {define a specified box register to be a box}*{} +\capcs setbox {定义指定的盒子寄存器使之成为盒子}*{} +%\capcs setlanguage {change to a specified set of hyphenation rules, but +% don't change |\\language|}{*}{} +\capcs setlanguage {改变到断字规则的指定集合,但不改变 |\\language|}{*}{} +%\capcs setminus {set difference operator: $\setminus$}{}{} +\capcs setminus {差集运算符:$\setminus$}{}{} +%\capcs settabs {define the tabs for a tabbing alignment}{}{} +\capcs settabs {为制表符对齐定义制表符}{}{} +%\capcs sevenbf {use $7$-point bold font, |cmbx7|}{}{} +\capcs sevenbf {使用 $7$-pt 粗字体,|cmbx7|}{}{} +%\capcs seveni {use $7$-point math italic font, |cmmi5|}{}{} +\capcs seveni {使用 $7$-pt 数学斜体,|cmmi7|}{}{} +%\capcs sevenrm {use $7$-point roman font, |cmr7|}{}{} +\capcs sevenrm {使用 $7$-pt 罗马字体,|cmr7|}{}{} +%\capcs sevensy {use $7$-point symbol font, |cmsy7|}{}{} +\capcs sevensy {使用 $7$-pt 符号字体,|cmsy7|}{}{} +%\capcs sfcode {the space factor code of a specified character}*{} +\capcs sfcode {指定字符的间隔系数}*{} +%\capcs sharp {sharp symbol for music: $\sharp$}{}{} +\capcs sharp {音乐中的升半间符:$\sharp$}{}{} +%\capcs shipout {output a box to the |.dvi| file}*{} +\capcs shipout {向 |.dvi| 文件输出盒子}*{} +%\capcs show {show, in the log and +% on the terminal, the meaning of a specified token}*{} +\capcs show {在日志文件中和终端上显示指定记号的意义}*{} +%\capcs showbox {display the contents of a specified box register}*{} +\capcs showbox {显示指定盒子寄存器的内容}*{} +%\capcs showboxbreadth {maximum number of items shown on each nesting +% level, by default~5}*{} +\capcs showboxbreadth {在每个嵌套层次上显示的项目的最大数量,默认值为 5}*{} +%\capcs showboxdepth {maximum nesting level shown, by default~3}*{} +\capcs showboxdepth {显示的最大嵌套层次,默认值为 3}*{} +%\capcs showhyphens {show, in the log +% and on the terminal, hyphenations in the specified text}{}{} +\capcs showhyphens {在日志文件中和终端上显示指定文本的断字}{}{} +%\capcs showlists {display all lists being worked on}*{} +\capcs showlists {显示所有正被影响的列表}*{} +%\capcs showthe {show, in the log +% and on the terminal, what |\\the| would produce}*{} +\capcs showthe {在日志文件中和终端上显示 |\\the| 将要输出的内容}*{} +%\capcs sigma {math Greek letter $\sigma$}{}{} +\capcs sigma {数学希腊字母 $\sigma$}{}{} +%\capcs Sigma {math Greek letter $\Sigma$}{}{} +\capcs Sigma {数学希腊字母 $\Sigma$}{}{} +%\capcs sim {similarity relation: $\sim$}{}{} +\capcs sim {相似关系:$\sim$}{}{} +%\capcs simeq {similar or equal relation: $\simeq$}{}{} +\capcs simeq {相似或等于关系:$\simeq$}{}{} +%\capcs sin {sine function: $\sin$}{}{} +\capcs sin {正弦函数:$\sin$}{}{} +%\capcs sinh {hyperbolic sine function: $\sinh$}{}{} +\capcs sinh {双曲正弦函数:$\sinh$}{}{} +%\capcs skew {shift a specified accent by a specified amount +% on a specified accented character}{}{} +\capcs skew {将指定字符的重音符偏移指定的量}{}{} +%\capcs skewchar {character in a specified font used for positioning accents}*{} +\capcs skewchar {指定字体中用于定位重音符的字符}*{} +%\capcs skip {the specified glue register}*{} +\capcs skip {指定的粘连寄存器}*{} +%\capcs skipdef {define a specified control sequence to be a number +% corresponding to a |\\skip| register}*{} +\capcs skipdef {定义指定的控制序列使之成为与 |\\skip| 寄存器对应的数值}*{} +%\capcs sl {use slanted type, i.e., do |\\tensl\\fam=\\slfam|}{}{} +\capcs sl {使用倾斜的字体,即执行 |\\tensl\\fam=\\slfam|}{}{} +%\capcs slash {\slash\ character that allows a line break}{}{} +\capcs slash {允许断行的 \slash\ 字符}{}{} +%\capcs slfam {slanted family for math}{}{} +\capcs slfam {数学中的倾斜字体族}{}{} +%\capcs smallbreak {indicate somewhat desirable page break +% with |\\penalty-50| and produce |\\smallskipamount| glue}{}{} +\capcs smallbreak {指示一些期望 |\\penalty-50| 分页,并输出 |\\smallskipamount| 粘连}{}{} +%\capcs smallint {small integral symbol: $\smallint$}{}{} +\capcs smallint {小的积分符号:$\smallint$}{}{} +%\capcs smallskip {produce |\\smallskipamount| glue}{}{} +\capcs smallskip {输出 |\\smallskipamount| 粘连}{}{} +%\capcs smallskipamount {glue for a small vertical skip, by default 3\pt\ +% plus 1\pt\ minus 1\pt}{}{} +\capcs smallskipamount {小的竖直间距的粘连,默认值为 3\pt\ plus 1\pt\ minus 1\pt}{}{} +%\capcs smash {produce formula with zero height and depth}{}{} +\capcs smash {输出高度与浓度均为零的公式}{}{} +%\capcs smile {smile relation: $\smile$}{}{} +\capcs smile {微笑关系:$\smile$}{}{} +%\capcs sp {implicit superscript character}{}{} +\capcs sp {隐式上标字符}{}{} +%\capcs space {produce normal interword glue}{}{} +\capcs space {输出正常的字间粘连}{}{} +%\capcs spacefactor {modifies stretch and shrink of interword glue +% if not 1000}*{} +\capcs spacefactor {修改字间粘连的伸展量与收缩量,如果不是 1000}*{} +%\capcs spaceskip {if nonzero and |\\spacefactor|${}<2000$, overrides +% the normal interword glue}*{} +\capcs spaceskip {如果非零且 |\\spacefactor|${}<2000$,抑制正常的字间粘连}*{} +%\capcs spadesuit {spade suit symbol: $\spadesuit$}{}{} +\capcs spadesuit {黑桃花色符号:$\spadesuit$}{}{} +%\capcs span {either combine entries in an alignment body or expand tokens in a +% preamble}*{} +\capcs span {在对齐主体中合并条目或在导言中展开记号}*{} +%\capcs special {write tokens to the |.dvi| file to be interpreted by a +% DVI-reading program}*{} +\capcs special {将记号写入 |.dvi| 文件,以便 DVI 浏览程序解释}*{} +%\capcs splitbotmark {last mark item in a box resulting from |\\vsplit|}*{} +\capcs splitbotmark {盒子中来自于 |\\vsplit| 的最后一个标记项目}*{} +%\capcs splitfirstmark {first mark item in a box resulting from +% |\\vsplit|}*{} +\capcs splitfirstmark {盒子中来自于 |\\vsplit| 的第一个标记项目}*{} +%\capcs splitmaxdepth {maximum depth of a box resulting from |\\vsplit|}*{} +\capcs splitmaxdepth {来自于 |\\vsplit| 的盒子的最大深度}*{} +%\capcs splittopskip {glue \TeX\ inserts at the top of a box resulting from +% |\\vsplit|}*{} +\capcs splittopskip {\TeX\ 在来自于 |\\vsplit| 的盒子的顶部插入的粘连}*{} +%\capcs sqcap {square cap operator: $\sqcap$}{}{} +\capcs sqcap {方形求交运算符:$\sqcap$}{}{} +%\capcs sqcup {square cup operator: $\sqcup$}{}{} +\capcs sqcup {方形求并运算符:$\sqcup$}{}{} +%\capcs sqrt {produce square root of a subformula, as in $\sqrt 2$}{}{} +\capcs sqrt {输出字公式的平方根,比如 $\sqrt 2$ 中那样}{}{} +%\capcs sqsubseteq {square subset or equal relation: $\sqsubseteq$}{}{} +\capcs sqsubseteq {方形子集或等于关系:$\sqsubseteq$}{}{} +%\capcs sqsupseteq {square superset or equal relation: $\sqsupseteq$}{}{} +\capcs sqsupseteq {方形超集或等于关系:$\sqsupseteq$}{}{} +%\capcs ss {German letter: \ss}{}{} +\capcs ss {德语字符:\ss}{}{} +%\capcs star {star operator: $\star$}{}{} +\capcs star {星形运算符:$\star$}{}{} +%\capcs string {produce a specified token, most commonly a control +% sequence, as characters}*{} +\capcs string {以字符输出指定的记号,通常为控制序列}*{} +%\capcs strut {box with zero width, but height and depth of a standard +% line, from baseline to baseline, in the current font}{}{} +\capcs strut {在当前字体中,从基线到基线,宽度为零,但高度与深度为标准行的盒子}{}{} +%\capcs subset {subset relation: $\subset$}{}{} +\capcs subset {子集关系:$\subset$}{}{} +%\capcs subseteq {subset or equal relation: $\subseteq$}{}{} +\capcs subseteq {子集或相等关系:$\subseteq$}{}{} +%\capcs succ {successor relation: $\succ$}{}{} +\capcs succ {后继关系:$\succ$}{}{} +%\capcs succeq {successor or equal relation: $\succeq$}{}{} +\capcs succeq {后继或相等关系:$\succeq$}{}{} +%\capcs sum {large summation operator: $\sum$}{}{} +\capcs sum {大的求和运算符:$\sum$}{}{} +%\capcs sup {superior function: $\sup$}{}{} +\capcs sup {上限函数:$\sup$}{}{} +%\capcs supereject {force a page break, and output all insertions}{}{} +\capcs supereject {强制分页,并输出所有的插入}{}{} +%\capcs supset {superset relation: $\supset$}{}{} +\capcs supset {超集关系:$\supset$}{}{} +%\capcs supseteq {superset or equal relation: $\supseteq$}{}{} +\capcs supseteq {超集或相等关系:$\supseteq$}{}{} +%\capcs surd {surd symbol: $\surd$}{}{} +\capcs surd {无理数符号:$\surd$}{}{} +%\capcs swarrow {southwest arrow relation: $\swarrow$}{}{} +\capcs swarrow {西南箭头关系:$\swarrow$}{}{} +%\capcs t {tie-after accent for text, as in \t uu}{}{} +\capcs t {文本中的后向连接线重音符 \t uu}{}{} +%\capcs tabalign {equivalent to |\\+|, except it's not |\\outer|}{}{} +\capcs tabalign {等同于 |\\+|,除了它不是 |\\outer|}{}{} +%\capcs tabskip {glue between columns (or rows) of an alignment}*{} +\capcs tabskip {对齐中列(或行)之间的粘连}*{} +%\capcs tan {tangent function: $\tan$}{}{} +\capcs tan {正切函数:$\tan$}{}{} +%\capcs tanh {hyperbolic tangent function: $\tanh$}{}{} +\capcs tanh {双曲正切函数:$\tanh$}{}{} +%\capcs tau {math Greek letter $\tau$}{}{} +\capcs tau {数学希腊字母$\tau$}{}{} +%\capcs tenbf {use $10$-point bold font, |cmbx10|}{}{} +\capcs tenbf {使用 $10$-pt 粗字体,|cmbx10|}{}{} +%\capcs tenex {use $10$-point math extension font, |cmex10|}{}{} +\capcs tenex {使用 $10$-pt 数学扩展字体,|cmex10|}{}{} +%\capcs teni {use $10$-point math italic font, |cmmi10|}{}{} +\capcs teni {使用 $10$-pt 数学斜体,|cmmi10|}{}{} +%\capcs tenit {use $10$-point text italic font, |cmti10|}{}{} +\capcs tenit {使用 $10$-pt 文本斜体,|cmti10|}{}{} +%\capcs tenrm {use $10$-point roman text font, |cmr10|}{}{} +\capcs tenrm {使用 $10$-pt 罗马字体,|cmr10|}{}{} +%\capcs tensl {use $10$-point slanted roman font, |cmsl10|}{}{} +\capcs tensl {使用 $10$-pt 倾斜罗马字体,|cmsl10|}{}{} +%\capcs tensy {use $10$-point math symbol font, |cmsy10|}{}{} +\capcs tensy {使用 $10$-pt 数学符号字体,|cmsy10|}{}{} +%\capcs tentt {use $10$-point typewriter font, |cmtt10|}{}{} +\capcs tentt {使用 $10$-pt 打字机字体,|cmtt10|}{}{} +%\capcs TeX {produce the \TeX\ logo}{}{} +\capcs TeX {输出 \TeX\ 标志}{}{} +%\capcs textfont {the text style font in a specified math family}*{} +\capcs textfont {在指定数学字体家族中的文本样式}*{} +%\capcs textindent {like |\\item|, but doesn't do hanging indentation}{}{} +\capcs textindent {与 |\\item| 一样,但不进行悬挂缩进}{}{} +%\capcs textstyle {use textstyle size in a formula}*{} +\capcs textstyle {在公式中使用文本样式尺寸}*{} +%\capcs the {give the value of a specified token}*{} +\capcs the {给出指定记号的值}*{} +%\capcs theta {math Greek letter $\theta$}{}{} +\capcs theta {数学希腊字母 $\theta$}{}{} +%\capcs Theta {math Greek letter $\Theta$}{}{} +\capcs Theta {数学希腊字母 $\Theta$}{}{} +%\capcs thickmuskip {glue for a thick math space, by default 5\mud\ plus 5\mud}*{} +\capcs thickmuskip {较大数学间隔所有的粘连,默认值为 5\mud\ plus 5\mud}*{} +%\capcs thinmuskip {glue for a thin math space, by default 3\mud}*{} +\capcs thinmuskip {较小数学间隔所有的粘连,默认值为 3\mud}*{} +%\capcs thinspace {kern \frac1/6\em}{}{} +\capcs thinspace {\frac1/6\em 紧排}{}{} +%\capcs tilde {tilde accent for math, as in $\tilde x$}{}{} +\capcs tilde {数学中的否定号重音符,比如 $\tilde x$ 中那样}{}{} +%\capcs time {the time of day, in minutes since midnight}*{} +\capcs time {当天的时间,从子夜来自的分钟数}*{} +%\capcs times {times operator: $\times$}{}{} +\capcs times {乘号运算符:$\times$}{}{} +%\capcs toks {the specified token register}*{} +\capcs toks {指定的记号寄存器}*{} +%\capcs toksdef {define a specified control sequence to be a number +% corresponding to a |\\toks| register}*{} +\capcs toksdef {定一指定的控制序列使之成为与 |\\toks| 寄存器相对应的数值}*{} +%\capcs tolerance {badness tolerance for line breaks with hyphenation}*{} +\capcs tolerance {带断字断行时劣度的容许值}*{} +%\margin{{\tt\\topglue} command added; recent addition to \TeX} +\margin{加入命令 {\tt\\topglue},新近加入 \TeX} +%\capcs to {mapping relation: $\to$}{}{} +\capcs to {映射关系:$\to$}{}{} +%\capcs top {lattice top symbol: $\top$}{}{} +\capcs top {lattice top symbol: $\top$}{}{} +%\capcs topglue {produce specified vertical glue at the +% top of a page}{}{} +\capcs topglue {在页面的顶部输出指定的竖直粘连}{}{} +\capcs topinsert {在页面顶部输出指定的文本}{}{} +%\capcs topmark {|\\botmark| before the current page was boxed}*{} +\capcs topmark {放入盒子中的在当前页之前的 |\\botmark|}*{} +%\capcs topskip {glue between the headline and the first line of text +% on a page, by default 10\pt}*{} +\capcs topskip {页眉线与同页上第一行文本之间的粘连,默认值为 10\pt}*{} +%\capcs tracingall {turn on maximal tracing}{}{} +\capcs tracingall {打开最大跟踪}{}{} +%\capcs tracingcommands {display execution of commands}*{} +\capcs tracingcommands {显示命令的执行}*{} +%\capcs tracinglostchars {display characters that are asked for, but not +% defined}*{} +\capcs tracinglostchars {显示被请求的字符,但不是被定义的}*{} +%\capcs tracingmacros {display macro expansions}*{} +\capcs tracingmacros {显示宏展开}*{} +%\capcs tracingonline {show diagnostic output on the terminal as well as in +% the log file}*{} +\capcs tracingonline {在终端及日志文件中显示诊断输出}*{} +%\capcs tracingoutput {display contents of shipped-out boxes}*{} +\capcs tracingoutput {显示输出的盒子的内容}*{} +%\capcs tracingpages {display page break calculations}*{} +\capcs tracingpages {显示分页计算}*{} +%\capcs tracingparagraphs {display line break calculations}*{} +\capcs tracingparagraphs {显示断行计算}*{} +%\capcs tracingrestores {display values restored at the end +% of a group}*{} +\capcs tracingrestores {显示在编组结束处保存的值}*{} +%\capcs tracingstats {display memory usage statistics}*{} +\capcs tracingstats {显示内存使用统计}*{} +%\capcs triangle {triangle symbol: $\triangle$}{}{} +\capcs triangle {三角符号:$\triangle$}{}{} +%\capcs triangleleft {left triangle operator: $\triangleleft$}{}{} +\capcs triangleleft {左三角运算符:$\triangleleft$}{}{} +%\capcs triangleright {right triangle operator: $\triangleright$}{}{} +\capcs triangleright {右三角运算符:$\triangleright$}{}{} +%\capcs tt {use typewriter type, i.e., do |\\tentt\\fam=\\ttfam|}{}{} +\capcs tt {使用打字机字体,即执行 |\\tentt\\fam=\\ttfam|}{}{} +%\capcs ttfam {typewriter family for math}{}{} +\capcs ttfam {数学中的打字机字体族}{}{} +%\capcs ttraggedright {use typewriter type and allow right margins of +% paragraphs to vary from line to line}{}{} +\capcs ttraggedright {使用打字机字体,并允许段落右边界从一行到另一行不同}{}{} +\bookmark{2}{从U到Z}% +%\capcs u {breve accent for text, as in \u r}{}{} +\capcs u {文本中的短音重音符,比如 \u r 中那样}{}{} +%\capcs uccode {the character code for the uppercase form of a letter}*{} +\capcs uccode {一个字母的大小字母的字符代码}*{} +%\capcs uchyph {if positive, consider hyphenating words that start with a +% capital letter}*{} +\capcs uchyph {如果是正值,考虑对大写字母开始的词断词}*{} +%\capcs underbar {underline the specified text without avoiding +% any descenders, as in \underbar{fog}}{}{} +\capcs underbar {不用避免任何下行字母的情况下对指定文本划下划线,比如 \underbar{fog} 中那样}{}{} +%\capcs underbrace {produce a brace covering the bottom of a formula, as in +% $\underbrace{x+x}{}$}{}{} +\capcs underbrace {输出一个覆盖公式底部的大括号,比如 $\underbrace{x+x}{}$ 中那样}{}{} +%\capcs underline {underline a math formula below the descenders, as in +% $\underline{x+y}$}*{} +\capcs underline {在下行字母之下对数学公式划下划线,比如 $\underline{x+y}$ 中那样}*{} +%\capcs unhbox {append the contents of the box +% in a specified box +% register to the current list, and void the register; legal only in +% horizontal modes}*{} +\capcs unhbox {将指定盒子寄存器中盒子的内容随加到当前列表中,并使寄存器失效;只在水平模式中有效。}*{} +%\capcs unhcopy {like |\\unhbox|, but doesn't void the register}*{} +\capcs unhcopy {与 |\\unhbox| 一样,但不使寄存器失效}*{} +%\capcs unkern {if the last item on the current list is a kern, remove it}*{} +\capcs unkern {如果当前列表的最后一项是紧排,删除它}*{} +%\capcs unpenalty {if the last item on the current list is a penalty, remove +% it}*{} +\capcs unpenalty {如果当前列表的最后一项是惩罚,删除它}*{} +%\capcs unskip {if the last item on the current list is glue, remove it}*{} +\capcs unskip {如果当前列表的最后一项是粘连,删除它}*{} +%\capcs unvbox {append the contents of the box +% in a specified box +% register to the current list, and void the register; legal only in +% vertical modes}*{} +\capcs unvbox {将指定盒子寄存器中盒子的内容随加到当前列表中,并使寄存器失效;只在竖直模式中有效。}*{} +%\capcs unvcopy {like |\\unvbox|, but doesn't void the register}*{} +\capcs unvcopy {与 |\\unvbox| 一样,但不使寄存器失效}*{} +%\capcs uparrow {relation: $\uparrow$}{}{} +\capcs uparrow {关系:$\uparrow$}{}{} +%\capcs Uparrow {relation: $\Uparrow$}{}{} +\capcs Uparrow {关系:$\Uparrow$}{}{} +%\capcs upbracefill {fill enclosing hbox with an upwards facing brace: +% \hbox to 3.5em{\upbracefill}}{}{} +\capcs upbracefill {使用向上开口的大括号填充闭合的 hbox:\hbox to 3.5em{\upbracefill}}{}{} +%\capcs updownarrow {relation: $\updownarrow$}{}{} +\capcs updownarrow {关系:$\updownarrow$}{}{} +%\capcs Updownarrow {relation: $\Updownarrow$}{}{} +\capcs Updownarrow {关系:$\Updownarrow$}{}{} +%\capcs uplus {cupped plus operator: $\uplus$}{}{} +\capcs uplus {并加号运算符:$\uplus$}{}{} +%\capcs uppercase {convert lowercase letters in the specified text +% to uppercase}*{} +\capcs uppercase {将指定文本中的小写字母转换为大写字母}*{} +%\capcs upsilon {math Greek letter $\upsilon$}{}{} +\capcs upsilon {数学希腊字母 $\upsilon$}{}{} +%\capcs Upsilon {math Greek letter $\Upsilon$}{}{} +\capcs Upsilon {数学希腊字母 $\Upsilon$}{}{} +%\capcs v {check accent for text, as in \v o}{}{} +\capcs v {文本中的抑制重音符,比如 \v o 中那样}{}{} +%\capcs vadjust {produce vertical mode material after the current line}*{} +\capcs vadjust {在当前行后输出竖直模式内容}*{} +%\capcs valign {align text in rows}*{} +\capcs valign {在行中对齐文本}*{} +%\capcs varepsilon {variant math Greek letter $\varepsilon$}{}{} +\capcs varepsilon {异体的数学希腊字母 $\varepsilon$}{}{} +%\capcs varphi {variant math Greek letter $\varphi$}{}{} +\capcs varphi {异体的数学希腊字母 $\varphi$}{}{} +%\capcs varpi {variant math Greek letter $\varpi$}{}{} +\capcs varpi {异体的数学希腊字母 $\varpi$}{}{} +%\capcs varrho {variant math Greek letter $\varrho$}{}{} +\capcs varrho {异体的数学希腊字母 $\varrho$}{}{} +%\capcs varsigma {variant Greek letter $\varsigma$}{}{} +\capcs varsigma {异体的数学希腊字母 $\varsigma$}{}{} +%\capcs vartheta {variant math Greek letter $\vartheta$}{}{} +\capcs vartheta {异体的数学希腊字母 $\vartheta$}{}{} +%\capcs vbadness {badness threshold for reporting underfull or overfull +% vboxes, by default~1000}*{} +\capcs vbadness {报告未满或过满竖直盒子使用的劣度阈值,默认值为 1000}*{} +%\capcs vbox {produce a vbox whose baseline is that of the bottom box +% enclosed}*{} +\capcs vbox {输出竖直盒子,其基线是闭合的底下盒子的基线}*{} +%\capcs vcenter {center the specified text on the math axis}*{} +\capcs vcenter {在数学轴上居中指定文本}*{} +%\capcs vdash {left turnstile symbol: $\vdash$}{}{} +\capcs vdash {左十字转门符号: $\vdash$}{}{} +%\capcs vdots {vertical dots for math: \smash{$\vdots$}}{}{} +\capcs vdots {数学的竖直多点:\smash{$\vdots$}}{}{} +%\capcs vec {vector accent for math, as in $\vec x$}{}{} +\capcs vec {数学中的矢量重音符,比如 $\vec x$ 中那样}{}{} +%\capcs vee {logical ``or'' operator: $\vee$}{}{} +\capcs vee {逻辑“或”运算符:$\vee$}{}{} +%\capcs vert {bar relation: $\vert$}{}{} +\capcs vert {横线关关系:$\vert$}{}{} +%\capcs Vert {double bar relation: $\Vert$}{}{} +\capcs Vert {双横线关系:$\Vert$}{}{} +%\capcs vfil {produce infinitely stretchable vertical glue}*{} +\capcs vfil {输出无限可扩展的竖直粘连}*{} +%\capcs vfill {produce even more infinitely stretchable vertical glue +%than that produced by |\\vfil|}*{} +\capcs vfill {输出比 |\\vfil| 更加无限可扩展的竖直粘连}*{} +%\capcs vfilneg {produce infinitely negative stretchable vertical glue}*{} +\capcs vfilneg {输出无限负向可扩展的竖直粘连}*{} +%\capcs vfootnote {produce a specified footnote with a specified +% reference mark, but don't produce the reference mark in the text}{}{} +\capcs vfootnote {输出带有指定参考标记的指定脚注,但在文本中不输出参考标记}{}{} +%\capcs vfuzz {space threshold for reporting overfull vboxes, by default +% 0.1\pt}*{} +\capcs vfuzz {报告过满 vbox 的间隔阈值,默认值为 0.1\pt}*{} +%\capcs vglue {produce specified vertical glue +% that doesn't disappear at page breaks}{}{} +\capcs vglue {输出在分页时不消失的指定的竖直粘连}{}{} +%\capcs voffset {vertical offset relative to one inch from the +% paper's top edge}*{} +\capcs voffset {从页面顶部开始的相对于一英寸的竖直偏移}*{} +%\capcs vphantom {produce an invisible formula with zero width but natural +% height and depth}{}{} +\capcs vphantom {输出宽度为零,但具有自然高度与深度的不可见公式}{}{} +%\capcs vrule {produce a vertical rule; legal only in horizontal modes}*{} +\capcs vrule {输出竖直标线;只在水平模式下有效}*{} +%\capcs vsize {page height, by default 8.9\thinspace in}*{} +\capcs vsize {页面高度,默认值为 8.9\thinspace in}*{} +%\capcs vskip {produce specified vertical glue}*{} +\capcs vskip {输出指定的竖直粘连}*{} +%\capcs vsplit {break the contents of a specified box +% register to the specified height}*{} +\capcs vsplit {将指定的盒子寄存器的内容分隔为指定的高度}*{} +%\capcs vss {produce vertical glue that is infinitely stretchable and +% infinitely shrinkable}*{} +\capcs vss {输出可无限扩展与收缩的竖直粘连}*{} +%\capcs vtop {produce a vbox whose baseline is that of the top box enclosed}*{} +\capcs vtop {输出竖直盒子,它的基线是闭合的顶部盒子的基线}*{} +%\capcs wd {the width of the box in a specified box register}*{} +\capcs wd {指定盒子寄存器中盒子的宽度}*{} +%\capcs wedge {logical ``and'' operator: $\wedge$}{}{} +\capcs wedge {逻辑“和”运算符:$\wedge$}{}{} +%\capcs widehat {math accent, as in $\widehat {y+z+a}$}{}{} +\capcs widehat {数学重音符,比如 $\widehat {y+z+a}$ 中那样}{}{} +%\capcs widetilde {math accent $\widetilde {b+c+d}$}{}{} +\capcs widetilde {数学重音符,比如 $\widetilde {b+c+d}$ 中那样}{}{} +%\capcs widowpenalty {penalty for a single line beginning a page, +% by default~150}*{} +\capcs widowpenalty {开始新页的单行的惩罚,默认为 150}*{} +%\capcs wlog {|\\write| the specified token list in the log file}{}{} +\capcs wlog {在日志文件中 |\\write| 指定的记号列表}{}{} +%\capcs wp {Weierstra\ss\ `p' symbol: $\wp$}{}{} +\capcs wp {Weierstra\ss\ `p' 符号:$\wp$}{}{} +%\capcs wr {wreath product operator: $\wr$}{}{} +\capcs wr {圈积运算符:$\wr$}{}{} +%\capcs write {write a line to a specified output stream}*{} +\capcs write {将一行写入指定的输出流}*{} +%\capcs xdef {equivalent to |\\global\\edef|, i.e., globally define a +% macro, immediately expanding the replacement text}*{} +\capcs xdef {等同于 |\\global\\edef|,即,定义全局宏,立即展开替换文本}*{} +%\capcs xi {math Greek letter $\xi$}{}{} +\capcs xi {数学希腊字母 $\xi$}{}{} +%\capcs Xi {math Greek letter $\Xi$}{}{} +\capcs Xi {数学希腊字母 $\Xi$}{}{} +%\capcs xleaders {produce leaders with leftover space distributed equally +% between the leader boxes}*{} +\capcs xleaders {输出剩余空白均匀分布于指引线盒子之间的指引线}*{} +%\capcs xspaceskip {if nonzero and |\\spacefactor|${}\ge2000$, +% overrides the normal interword glue}*{} +\capcs xspaceskip {如果非零,且 |\\spacefactor|${}\ge2000$,覆盖正常的字间粘连}*{} +%\capcs year {the current year, as a number}*{} +\capcs year {以数值形式输出当前年份}*{} +%\capcs zeta {math Greek letter $\zeta$}{}{} +\capcs zeta {数学希腊字母 $\zeta$}{}{} + +\endcapsum +\endchapter +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/cnbook.pdf b/Master/texmf-dist/doc/plain/impatient-cn/cnbook.pdf Binary files differnew file mode 100644 index 00000000000..fe6861f3327 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/cnbook.pdf diff --git a/Master/texmf-dist/doc/plain/impatient-cn/concepts.tex b/Master/texmf-dist/doc/plain/impatient-cn/concepts.tex new file mode 100644 index 00000000000..aafc46e7330 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/concepts.tex @@ -0,0 +1,6635 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\chapter{Concepts} +\chapter{概念} + +\chapterdef{concepts} + +%This part of the book contains definitions and explanations of +%the concepts that we use in describing \TeX. +%The concepts include both +%technical terms that we use in explaining the commands and +%important topics that don't fit elsewhere in the book. +本书的这部分包含了使用 \TeX\ 时所需要了解的概念。 +它包括我们在解释命令时所使用的技术词汇以及重点内容, +这些内容并不适合放在本书的其它地方。 + +%The concepts are arranged alphabetically. +%The inside back cover of the book contains a complete list of +%concepts and the pages on which they are explained. +%We suggest that you make a copy of the inside back cover and keep it nearby +%so that you'll be able to identify and look up an unfamiliar +%concept immediately. +%As far as possible, we've kept our terminology consistent with that of +%\texbook.\idxref{\texbook} +这些概念使用英文字母顺序进行排列, +书背内页包含了一份详细的在此提及的概念列表,以及他们被提及时所在的页数。 +我们建议你把书背内页复印下来,放在旁边, +这样你就能在遇到不熟悉的概念时马上查找到它们。 +我们尽可能地使用和 \texbook\ 相一致的术语。\idxref{\texbook} + +\beginconcepts + +\bookmark{2}{以A开头} +%\conceptindex{active characters} +%\concept {active character} +\conceptindex{活动字符} +\concept {活动字符} + +%An \defterm{active character} is a \refterm{character} +%that has a definition, e.g., a macro definition, associated with it. +%^^{macros//named by active characters} +%You can think of an active character as a special kind of control sequence. +%When \TeX\ encounters an active character, it +%executes the definition associated with the character. +%If \TeX\ encounters an active character that does not have +%an associated definition, it will complain about an +%undefined control sequence. +\defterm{活动字符}(active character)是一个有定义的\refterm{字符}。 +比如一个活动字符可能表示着一个宏定义。 +^^{宏//由活动字符命名} +你可以把活动字符理解为一种控制序列。 +当 \TeX\ 碰到了一个活动字符,它就执行这个字符所表示的定义。 +如果 \TeX\ 碰到的活动字符并没有表示一个定义, +则它会报错说这是一个没有定义的控制序列。 + +%An active character has a \refterm{category code} of $13$ (the value +%of ^|\active|). +%To define an active character, you should first +%use the ^|\catcode| command +%\ctsref{\catcode} to make it active +%and then provide the definition of the character, using +%a command such as |\def|, |\let|, or |\chardef|. +%The definition of an active character has the same form as +%the definition of a \refterm{control sequence}. +%^^{category codes//of active characters} +%If you try to define the macro for an active character +%before you make the character active, \TeX\ will complain about a +%missing control sequence. +一个活动字符的\refterm{类别码}为 $13$ (^|\active|的值)。 +当你定义一个活动字符时, +你必须先使用 ^|\catcode| 命令 \ctsref{\catcode} 来使这个字符活动, +然后再使用类似 |\def|,|\let| 或者 |\chardef| 之类的命令指定这个字符的定义。 +定义活动字符和定义\refterm{控制序列}所使用的方法是相同的。 +^^{类别码//活动字符的类别码} +如因你尝试先对字符指定定义后把它设置成活动的, +\TeX\ 会报错说这是一个不明的控制序列。 + +%For example, the tilde character (|~|) is defined as an active character +%in \plainTeX. It +%produces a space between two words but links those words so that +%\TeX\ will not turn the space into a \refterm{line break}. +%\refterm{\PlainTeX:\plainTeX} defines `|~|' by the commands: +比如,在 \PlainTeX\ 中,波浪号 (|~|) 被定义成一个活动字符。 +它可以在所连接的两个单词当中产生一个空格,并且不让 \TeX\ 把这个空格转为 \refterm{断行}。 +\refterm{\PlainTeX:\plainTeX} 通过以下方式来定义 `|~|': + +\csdisplay +\catcode `~ = \active \def~{\penalty10000\!visiblespace} +| +%(The |\penalty| inhibits a line break and the `|\!visiblespace|' +%inserts a space.) +(这里的 |\penalty| 可以阻止断行,`|\!visiblespace|' 可以插入一个空格。) +\endconcept + + +%\conceptindex{alignments} +%\concept alignment +\conceptindex{阵列} +\concept 阵列 + +%\bix^^{tables} +%An \defterm{alignment} is a construct for aligning material, such as a +%table, in columns or rows. To form an alignment you need to +%(a)~describe the layout of the columns or rows and (b)~tell \TeX\ what +%material goes into the columns or rows. A tabbing alignment or a +%horizontal alignment is organized as a sequence of rows; a vertical +%alignment is organized as a sequence of columns. We first describe +%tabbing and horizontal alignments and then more briefly describe +%vertical alignments. +\bix^^{表格} +\defterm{阵列}(alignment)是一个把素材有序排印的结构, +就如一张有行有列的表格。当你需要构造一个阵列时, +你要 (a)~描述行和列的布局,并且 (b)~告诉 \TeX\ 各行或各列中的内容。 +制表阵列和水平阵列是由一系列的行组成;竖直阵列则由一系列的列组成。 +我们首先讲述制表阵列和水平阵列,然后简要地介绍一下竖直阵列。 + +%Tabbing alignments are defined by \plainTeX. They are simpler but less +%flexible than horizontal alignments. Tabbing and horizontal alignments +%differ principally in how you describe their layouts. +制表阵列是在 \PlainTeX\ 中定义的。它很简单,因此不如水平阵列那样灵活。 +制表阵列和水平阵列的主要区别在于你如何定义它们的布局。 + +\bix^^|\settabs| +\bix\ifoldeplain\ctsidxref{+}\fi +\bix\ctsidxref{cr} + +%To construct a tabbing alignment you first issue a |\settabs| command +%\ctsref{\settabs} that specifies how \TeX\ should divide the available +%horizontal space into columns. Then you provide a sequence of rows for +%the table. Each row consists of a |\+| control sequence \ctsref{\@plus} +%followed by a list of ``entries'', i.e., row\slash column intersections. +%^^{entry (column or row)} +%Adjacent entries in a row are separated by an ampersand (|&|). +%\xrdef{@and} +%\ttidxref{&} +%The end of a row is indicated by ^|\cr| after its +%last entry. +%If a row has fewer entries than there are columns in the alignment, +%\TeX\ effectively fills out the row with blank entries. +要构造一个制表阵列,你首先需要用 |\settabs| 命令 +\ctsref{\settabs} 确定 \TeX\ 如何将可用空白水平地分为多列。 +然后你就可以逐行地填充表格的各行。 +每行由控制序列|\+|\ctsref{\@plus}及其后的一排用 |&| 隔开的“条目”组成% +^^{条目(在行或列中)} +\xrdef{@and} +\ifoldeplain\ttidxref{&}\fi +(条目是行和列的交叉部分),并以 ^|\cr| 结束。 +如果某行的条目数目比该阵列的列数少,\TeX\ 就用空白条目填充它们。 + +%As long as it's preceded by a |\settabs| command, you can put a row of a +%tabbing alignment anywhere in your document. In particular, you can put +%other things between the rows of a tabbing alignment or describe several +%tabbing alignments with a single |\settabs|. Here's an example of a +%tabbing alignment: +你可以将制表阵列的行放在文档的任何地方,只要前面有 |\settabs| 命令。 +特别地,你可以在制表阵列的各行之间添加其他内容, +或者用同一个 |\settabs| 描述多个制表阵列。 +这里有一个制表阵列的例子: + +%\xrdef{tabbedexample}\csdisplay +%{\hsize = 1.7 in \settabs 2 \columns +%\+cattle&herd\cr +%\+fish&school\cr +%\+lions&pride\cr} +%| +%The |\settabs 2 \columns| command in this example \ctsref{\settabs} +%tells \TeX\ to produce two equally wide columns. +%The line length is $1.7$ inches. +%The typeset alignment looks like this: +\xrdef{tabbedexample}\csdisplay +{\hsize = 1.7 in \settabs 2 \columns +\+cattle&herd\cr +\+fish&school\cr +\+lions&pride\cr} +| +这个例子中的 |\settabs 2 \columns| 命令\ctsref{\settabs}% +让 \TeX\ 生成总宽度为 $1.7$ 英寸的等宽两列。 +所排版出的阵列如下: + +%{\def\+{\tabalign}% so it isn't \outer. +%\vdisplay{% +%\hsize 1.7 in \settabs 2 \columns +%\+cattle&herd\cr +%\+fish&school\cr +%\+lions&pride\cr} +%}% +{\def\+{\tabalign}% so it isn't \outer. +\vdisplay{% +\hsize 1.7 in \settabs 2 \columns +\+cattle&herd\cr +\+fish&school\cr +\+lions&pride\cr} +}% + +%\margin{Missing explanation added here.} +%There's another form of tabbing alignment in which you specify the column +%widths with a template. The column widths in the template +%determine the column widths in the rest of the alignment: +%\csdisplay +%{\settabs\+cattle\quad&school\cr +%\+cattle&herd\cr +%\+fish&school\cr +%\+lions&pride\cr} +%| +%Here's the result: +%{\def\+{\tabalign}% so it isn't \outer. +%\vdisplay{% +%\settabs\+cattle\quad&school\cr +%\+cattle&herd\cr +%\+fish&school\cr +%\+lions&pride\cr} +%}% +\margin{Missing explanation added here.} +制表阵列还有另一种用模板指明各列宽度的用法。 +模板的各列宽度决定了该阵列其后的各列宽度: +\csdisplay +{\settabs\+cattle\quad&school\cr +\+cattle&herd\cr +\+fish&school\cr +\+lions&pride\cr} +| +这是上面例子生成的结果: +{\def\+{\tabalign}% so it isn't \outer. +\vdisplay{% +\settabs\+cattle\quad&school\cr +\+cattle&herd\cr +\+fish&school\cr +\+lions&pride\cr} +}% + +\eix^^|\settabs| +\eix\ifoldeplain\ctsidxref{+}\fi +\bix^^|\halign| +%Horizontal alignments are constructed with |\halign| \ctsref\halign. +%\TeX\ adjusts the column widths of a horizontal alignment according to +%what is in the columns. When \TeX\ encounters the |\halign| command +%that begins a horizontal alignment, it first examines all the rows of +%the alignment to see how wide the entries are. It then sets each column +%width to accommodate the widest entry in that column. +水平阵列用 |\halign| \ctsref\halign 命令构造。 +\TeX\ 将根据各列内容调整水平阵列的列宽。 +当 \TeX\ 碰到 |\halign| 命令要开始一个水平阵列时, +它首先检查该阵列的各行,看看各条目都有多宽。 +然后设定各列宽度以容纳该列中最宽的条目。 + +%A horizontal alignment governed by |\halign| consists of a +%``\pix^{preamble}'' that indicates the row layout followed by the rows +%themselves. +%\ulist +%\li The preamble consists of a sequence of \pix^{template}s, one for each +%column. The template for a column specifies how the text for that +%column should be typeset. Each template must include a single |#| +%character +%\ttidxref{#}\xrdef{@asharp} +%to indicate where \TeX\ should substitute the text of an entry into the +%template. The templates are separated by ampersands (|&|), \ttidxref{&} +%and the end of the preamble is indicated by |\cr|. By providing an +%appropriate template you can obtain effects such as centering a column, +%left or right justifying a column, or setting a column in a particular +%\refterm{font}. +由 |\halign| 命令构造的水平阵列包含一个“\pix^{导言}”, +该导言说明了随后各行的布局。 +\ulist +\li 导言由一系列\pix^{模板}组成,一个模板对应一列, +指明该列的文本应该如何排版。 +每个模板中都必须包含一个|#|字符, +\ifoldeplain\ttidxref{#}\fi\xrdef{@asharp} +用于给出 \TeX\ 将条目的文本放入模板的位置。 +各个模板之间用 |&| 分隔,\ifoldeplain\ttidxref{&}\fi 并以 |\cr| 结束该导言。 +利用合适的模板你可以让某列居中,左对齐或右对齐, +或者使用某个特定的\refterm{字体}。 + +%\li The rows have the same form as in a tabbing alignment, except that +%you omit the |\+| at the beginning of each row. +%As before, entries are separated by |&| and the end of the row +%is indicated by |\cr|. +%\TeX\ treats each entry as a +%\refterm{group}, so any +%font-setting command or other \refterm{assignment} +%in a column template is in effect only for the entries in that column. +%\endulist +%\noindent The preamble and the rows must all be enclosed in the braces +%that follow |\halign|. Each |\halign| alignment must include +%its own preamble. +\li 除了要省略各行开头的 |\+|,各行的写法都和制表阵列一样: +一行的各条目之间用 |&| 分隔,并以 |\cr| 结束该行。 +\TeX\ 将各个条目都看作一个\refterm{编组}, +因此对某列模板的字体设定或其他\refterm{赋值}都只对该列各个条目有效。 +\endulist +\noindent 导言和各行都必须放在 |\halign| 后的花括号里面。 +每个 |\halign| 阵列都必须包含各自的导言。 + +%For example, the horizontal alignment: +%\csdisplay +%\tabskip=2pc +%\halign{\hfil#\hfil &\hfil#\hfil &\hfil#\hfil \cr +% &&\it Table\cr +%\noalign{\kern -2pt} +% \it Creature&\it Victual&\it Position\cr +%\noalign{\kern 2pt} +% Alice&crumpet&left\cr +% Dormouse&muffin&middle\cr +% Hatter&tea&right\cr} +%| +例如,下面这个水平阵列: +\csdisplay +\tabskip=2pc +\halign{\hfil#\hfil &\hfil#\hfil &\hfil#\hfil \cr + &&\it Table\cr +\noalign{\kern -2pt} + \it Creature&\it Victual&\it Position\cr +\noalign{\kern 2pt} + Alice&crumpet&left\cr + Dormouse&muffin&middle\cr + Hatter&tea&right\cr} +| + +%\noindent produces the result: +\noindent 生成下面的结果: + +%\xrdef{halignexample} +%\vdisplay{% +%\tabskip=2pc \halign{\hfil#\hfil &\hfil#\hfil &\hfil#\hfil \cr +% &&\it Table\cr +%\noalign{\kern -2pt} +% \it Creature&\it Victual&\it Position\cr +%\noalign{\kern 2pt} +% Alice&crumpet&left\cr +% Dormouse&muffin&middle\cr +% Hatter&tea&right\cr} +%}% +%\noindent The ^|\tabskip| \ctsref{\tabskip} in this example +%tells \TeX\ to insert |2pc| of +%\refterm{glue} between the columns. +%The ^|\noalign| \ctsref{\noalign} commands tell \TeX\ to insert +%\refterm{vertical mode} material between two rows. +%In this example we've +%used |\noalign| to produce some extra space between the title rows and +%the data rows, and also to bring ``Table'' and ``Position'' closer together. +%(You can also use |\noalign| before the first row or after the +%last row.) +%\eix^^|\halign| +\xrdef{halignexample} +\vdisplay{% +\tabskip=2pc \halign{\hfil#\hfil &\hfil#\hfil &\hfil#\hfil \cr + &&\it Table\cr +\noalign{\kern -2pt} + \it Creature&\it Victual&\it Position\cr +\noalign{\kern 2pt} + Alice&crumpet&left\cr + Dormouse&muffin&middle\cr + Hatter&tea&right\cr} +}% +\noindent 这个例子中的 ^|\tabskip| \ctsref{\tabskip} +命令让 \TeX\ 在各列间插入 |2pc| 的\refterm{粘连}。 +^|\noalign| \ctsref{\noalign} 命令% +让 \TeX\ 在两行间插入\refterm{竖直模式}素材。 +在此例子中我们用 |\noalign| 生成标题行和数据行之间的额外间距, +还让“Table”和“Position”紧挨在一起。% +(在首行之前或者末行之后你同样可以使用 |\noalign| 命令。) +\eix^^|\halign| + +%You can construct a vertical alignment with the ^|\valign| command +%\ctsref{\valign}. A vertical alignment is organized as a series of +%columns rather than as a series of rows. A vertical alignment follows +%the same rules as a horizontal alignment except that the roles of rows +%and columns are interchanged. For example, the vertical alignment: +用 ^|\valign| 命令 +\ctsref{\valign}可以构造一个竖直阵列。 +竖直阵列按照列而不按照行组织。 +它遵循和水平阵列相同的法则, +只是此时行和列的地位交换了。 +例如,下面的竖直阵列: + +%\csdisplay +%{\hsize=0.6in \parindent=0pt +%\valign{#\strut&#\strut&#\strut\cr +% one&two&three\cr +% four&five&six\cr +% seven&eight&nine\cr +% ten&eleven\cr}} +%| +%\noindent yields: +%\vdisplay{% +%{\hsize=0.6in \parindent=\listleftindent % Because lists and displays +% % are not indented just by \parindent. +%\valign{#\strut&#\strut&#\strut\cr +% one&two&three\cr +% four&five&six\cr +% seven&eight&nine\cr +% ten&eleven\cr}} +%} +%The ^|\strut| commands \ctsref{\strut} +%in the template are necessary to get the entries in each row +%to line up properly, i.e., to have a common \refterm{baseline}, +%and to keep the distance between baselines uniform. +%\eix\ctsidxref{cr} +%\eix^^{tables} +\csdisplay +{\hsize=0.6in \parindent=0pt +\valign{#\strut&#\strut&#\strut\cr + one&two&three\cr + four&five&six\cr + seven&eight&nine\cr + ten&eleven\cr}} +| +\noindent 得到的结果为: +\vdisplay{% +{\hsize=0.6in \parindent=\listleftindent % Because lists and displays + % are not indented just by \parindent. +\valign{#\strut&#\strut&#\strut\cr + one&two&three\cr + four&five&six\cr + seven&eight&nine\cr + ten&eleven\cr}} +} +模板中的 ^|\strut| 命令 \ctsref{\strut} 是必不可少的, +因为它让一行的各条目合适地排成一行, +即让它们有共同的\refterm{基线},并让基线间的距离保持一致。 +\eix\ctsidxref{cr} +\eix^^{表格} + +\endconcept + + +\concept{\anatomy} + +%\texbook\ describes the way that {\TeX} processes its input in terms of \TeX's +%``digestive tract''---its ``^{eyes}'', ``^{mouth}'', +%``^{gullet}'', ``^{stomach}'', and ``^{intestines}''. Knowing how this +%processing works can be helpful when you're trying to understand subtle +%aspects of \TeX's behavior as it's digesting a document. +\texbook\ 将 {\TeX} 处理输入的过程用 \TeX\ 的“消化道”来描述, +包括“^{眼睛}”,“^{嘴巴}”,“^{食道}”,“^{胃}” 和“^{肠道}”。 +知道这个处理过程如何运转,将有助于你理解\TeX\ 消化文档时的行为细节。 + +\ulist + +%\li Using its ``\pix^{eyes}'', \TeX\ reads \refterm{characters:character} from +%^{input files} and passes them to its mouth. Since an input file +%can contain ^|\input| commands \ctsref{\input}, +%\TeX\ can in effect ``shift its gaze'' from one file to another. +\li 使用“\pix^{眼睛}”,\TeX\ 从^{输入文件}中读取\refterm{字符}并传给它的嘴巴。 +由于输入文件中可能包含 ^|\input| 命令\ctsref{\input}, +\TeX\ 实际上能够从一个文件“转移视线”到另一个文件。 + +%\li Using its ``\pix^{mouth}'', {\TeX} assembles the characters into +%\refterm{tokens:token} and passes them to its gullet. +%Each token is either a \refterm{control sequence} or a single +%character. A control sequence always starts with an \refterm{escape +%character}. Note that spaces and ends-of-line are characters in their +%own right, although \TeX\ compresses a sequence of input spaces into a single +%space token. See \knuth{pages~46--47} for the rules by which \TeX\ assembles +%characters into tokens. +%^^{tokens//assembled from characters} +\li 使用“\pix^{嘴巴}”,{\TeX} 将字符组合为\refterm{记号}并传给它的食道。 +每个记号要么是一个\refterm{控制序列}要么是单个字符, +其中控制序列总是以\refterm{转义符}开始。 +注意空格符以及行尾符自身也是字符, +只是 \TeX\ 将输入中的多个空格合并为一个空格记号。 +在\knuth{第~46--47~页} +中介绍了 \TeX\ 将字符组合为记号的规则。 +^^{记号//将字符组合为记号} + +%\li Using its ``\pix^{gullet}'', {\TeX} expands any macros, conditionals, and +%^^{macros//expanded in \TeX's stomach} +%^^{tokens//passed to \TeX's stomach} +%similar constructs that it finds (see \knuth{pages~212--216}) and passes +%the resulting sequence of \refterm{tokens:token} +%to \TeX's stomach. Expanding one token +%may yield other tokens that in turn need to be expanded. {\TeX} carries +%out this expansion from left to right unless the order is modified by +%a command such as |\expandafter| \ctsref{\expandafter}. +%In other words, \TeX's gullet always expands the leftmost un\-ex\-panded +%token that it has not yet sent to \TeX's stomach. +\li 使用“\pix^{食道}”,{\TeX} 展开任何宏、条件句, +^^{宏//在 \TeX\ 的胃展开} +^^{记号//传给 \TeX\ 的胃} +以及它找到的类似结构(见\knuth{第~212--216~页}, +并将得到的一系列\refterm{记号}传给 \TeX\ 的胃。 +展开一个记号也许会得到本身也需要展开的其他记号。 +{\TeX} 按照从左到右的顺序执行记号展开, +除非你用类似 |\expandafter| \ctsref{\expandafter} 的命令改变其顺序。 +换言之,\TeX\ 的食道总是展开未送入胃中的记号中最左边的未展开记号。 + +%\li Using its ``\pix^{stomach}'', {\TeX} processes the tokens in +%groups. +%Each group contains a primitive command followed by its arguments, if any. +%Most of the commands are of the ``typeset this character'' variety, +%so their groups consist of just one token. +%Obeying the instructions given by the commands, +%\TeX's stomach assembles larger and larger +%units, starting with +%characters and ending with pages, +%and passes the pages to \TeX's intestines. +%^^{pages//assembled in \TeX's stomach} +%\TeX's stomach handles the tasks of \refterm{line break}ing---% +%^^{line breaking} +%i.e., breaking each paragraph into a sequence of lines---% +%and of \refterm{page break}ing---i.e., breaking a continuous sequence of lines +%and other vertical mode material +%into pages. +\li 使用“\pix^{胃}”,{\TeX} 一组一组地处理记号。 +每个分组里面包含一个原始命令及可能跟随着的命令参量。 +大多数命令属于“排版此字符”这种,因此它们的分组中仅包含一个记号。 +按照命令的指示, +\TeX\ 的胃从字符到页面逐步组装出越来越大的部件, +并将生成的页面传给 \TeX\ 的肠道。 +^^{页面//在 \TeX\ 的胃中组装} +\TeX\ 的胃执行\refterm{断行}任务% +^^{断行} +——即将每个段落分为若干行, +以及\refterm{分页}任务% +——即将连续若干行和其他竖直模式素材分为多个页面。 + +%\li Using its ``\pix^{intestines}'', \TeX\ transforms the pages produced by its +%stomach into a form intended for processing +%by other programs. It then sends the transformed output to the +%\dvifile. +%^^{\dvifile//created by \TeX's intestines} +\li 使用“\pix^{肠道}”,\TeX\ 将它的胃生成的页面转换为适合其他程序处理的形式, +并将转换出的结果送到 \dvifile 。 +^^{\dvifile//由 \TeX\ 的肠道生成} + +\endulist + +%Most of the time you can think of the processes that take place in \TeX's +%eyes, mouth, gullet, stomach, and intestines +%as happening one after the other. But the +%truth of the matter is that commands executed in \TeX's stomach can +%influence the earlier stages of digestion. For instance, when \TeX's stomach +%encounters the |\input| command \ctsref{\input}, +%its eyes start reading from a different +%file; when \TeX's stomach encounters a |\catcode| command +% \ctsref{\catcode} specifying a category code +%for a character $c$, the interpretation of $c$ by \TeX's mouth is affected. +%And when +%\TeX's stomach encounters a \refterm{macro} definition, the expansions carried +%out in \TeX's gullet are affected. +多数时候你都可以认为在 \TeX\ 的眼睛,嘴巴,食道, +胃和肠道中的操作是一个接一个进行的。 +但事实真相是,在 \TeX\ 的胃中执行的命令可能会影响前面步骤的消化过程。 +举例来说,当 \TeX\ 的胃碰到 |\input| 命令\ctsref{\input}时, +它的眼睛将开始读取另一个文件; +当 \TeX\ 的胃碰到指定字符$c$的类别码的 |\catcode| 命令\ctsref{\catcode}时, +\TeX\ 的嘴巴对 $c$ 的解释就会受影响; +而当 \TeX\ 的胃碰到\refterm{宏}定义时, +在 \TeX\ 的食道进行的宏展开也会受到影响。 + +%You can understand how the processes interact by imagining that each +%process eagerly gobbles up the output of its predecessor as soon as it +%becomes available. For instance, once \TeX's stomach has seen +%the last character of the filename in an |\input| command, \TeX's gaze +%immediately shifts to the first character of the specified input file. +%\endconcept +为更好地理解各个器官的相互影响,你可以把各个器官都想象为急性子, +前任器官一有输出,后面的器官就急切地吞食该输出。 +比如,\TeX\ 的胃一看到 |\input| 命令的文件名的最后一个字符, +它的眼睛就立即转移视线到所指定输入文件的第一个字符。 +\endconcept + +%\pagebreak +%\conceptindex{arguments} +%\concept argument +\conceptindex{参量} +\concept 参量 + +%^^{commands//arguments of} +%An \defterm{argument} contains text that is passed to a +%\refterm{command}. +%The arguments of a command complete the description of what +%the command is supposed to do. +%The command can either be a \refterm{primitive} command or a +%\refterm{macro}. +^^{命令//命令的参量} +命令的\defterm{参量}(argument)包含传递给\refterm{命令}的文本, +它补全了该命令正常运行所需的信息。 +这里的命令可以是\refterm{原始命令}或者\refterm{宏}. + +%Each primitive command ^^{primitive//command} +%has its own convention about the form of its +%arguments. For instance, the sequence of \refterm{tokens:token}: +原始命令^^{原始的//原始命令}的参量有各自规定的形式。 +例如,下面的一系列\refterm{记号}: + +%\csdisplay +%\hskip 3pc plus 1em +%| +%consists of the command `|\hskip|' and the arguments +%`|3pc plus 1em|'. But if you were to write: +\csdisplay +\hskip 3pc plus 1em +| +由 `|\hskip|' 命令及其参量 `|3pc plus 1em|' 组成。 +但若你这样写: + +%\csdisplay +%\count11 3pc plus 1em +%| +%you'd get an entirely different effect. +%\TeX\ would treat `|\count11|' as a command with argument `|3|', +%followed by the ordinary text tokens `|pc plus 1em|' +%(because count registers expect a number to be assigned to them)% +%---probably not what +%you intended. The effect of the command, by the way, would be to +%assign $3$ to count register $11$ (see the discussion of ^|\count|, +%\xref\count). +\csdisplay +\count11 3pc plus 1em +| +你将得到完全不同的结果。 +\TeX\ 将认为 `|\count11|' 为命令,其参量为`|3|', +而后面的 `|pc plus 1em|' 是普通的文本记号% +(因为计数寄存器要求一个整数值作为参量)——这多半不是你想要的。 +顺便说一下,该命令将给第$11$号计数寄存器赋值$3$ +(见 ^|\count| 这里的讨论,\xref\count )。 + +%Macros, on the other hand, all follow the same convention +%for their arguments. +%^^{macros//arguments of} +%Each argument passed to a macro +%corresponds to a \refterm{parameter} +%^^{parameters//and arguments} +%in the definition of that +%macro. ^^{macros//parameters of} +%A macro parameter is either ``delimited'' or ``undelimited''. +%The macro definition determines the number and nature of the macro parameters +%and therefore the number and nature of the macro arguments. +另一方面,所有宏都遵循相同的参量约定。 +^^{宏//宏的参量} +传递给宏的每个参量都对应宏定义中的一个\refterm{参数}。 +^^{参数//与参量对应}^^{宏//宏的参数} +宏的参数可以是“定界的”或是“非定界的”。 +在宏的定义中确定了宏参数的个数和类型, +从而确定了宏参量的个数和类型。 + +%The difference between a delimited argument and an undelimited argument +%lies in the way that \TeX\ decides where the argument ends. +%^^{delimited arguments} +%^^{undelimited arguments} +%\ulist +%\li A delimited argument consists of the tokens +%from the start of the argument up to, but not including, the +%particular sequence of tokens that serves as the delimiter for that argument. +%The delimiter is specified in the macro definition. Thus you +%supply a delimited argument to a macro by writing the argument itself +%followed by the delimiter. A delimited argument can be empty, i.e., have +%no text at all in it. Any braces in a delimited argument must be paired +%properly, i.e., every left brace must have a corresponding right brace +%and vice versa. +定界参量和非定界参量的区别在于, +\TeX\ 用不同方式确定该参量的结束位置。 +^^{定界参量} +^^{非定界参量} +\ulist +\li 定界参量由该参量开始处和作为该参量定界子的特定记号序列之间的所有记号组成, +但不包含该定界子序列。其中的定界子是在宏的定义中规定的。 +因此要给出定界参量,你需要写上该参量并在其后加上定界子。 +定界参量也可以是空的,即不包含任何文本。 +定界参量里面的任何花括号都必须配好对, +即每个左花括号必须有对应的右花括号,反之亦然。 + +%\li An undelimited argument consists of a single token or a sequence of +%tokens enclosed in braces, like this: +%`|{Here is {the} text.}|'. Despite appearances, the outer braces don't +%form a \refterm{group}---\TeX\ uses them only to determine what the +%argument is. Any inner braces, such as the ones around `|the|', must be +%paired properly. If you make a mistake and put in too many right +%braces, \TeX\ will complain about an unexpected right brace. \TeX\ will +%also complain if you put in too many left braces, but you'll probably +%get \emph{that} complaint long after the place where you intended to +%end the argument (see \xref{mismatched}). +%\endulist +%\noindent +%See \conceptcit{macro} for more information +%about parameters and arguments. You'll find the precise rules pertaining +%to delimited and undelimited arguments in \knuth{pages~203--204}. +%\endconcept +\li 非定界参量由单个记号或者包含在花括号的一系列记号组成, +比如`|{Here is {the} text.}|'。 +外面的一对花括号,虽然看起来像,实际上并不组成一个\refterm{编组}% +——\TeX\ 只是用它们确定参量的范围。 +而参量内部的花括号,比如`|the|'两边的,必须正确配对。 +若你误将太多右花括号放在里面, +\TeX\ 将报错说有多余的右花括号。 +若左花括号太多,\TeX\ 同样会报错; +但\emph{这个错误}可能出现在该参量所期望的结束位置之后很远的地方 +(见 \xref{mismatched})。 +\endulist +\noindent +请参阅\conceptcit{宏}这里的更多关于参数和参量的内容。 +在\knuth{第~203--204~页}你能找到定界参量和非定界参量的精确规则。 +\endconcept + + +\concept{ASCII} + +%\defterm{\ascii} is the abbreviation of ``American Standard Code for +%Information Interchange''. There are $256$ \ascii\ +%^{characters}, each with its own code number, but +%the meanings of only the first~$128$ have been standardized. You can +%find these meanings in an \ascii\ ``code table'' such as the one on +%\knuth{page~367}. Characters $32$--$126$ are ``printable characters'', +%^^{printable characters} such as letters, numbers, and punctuation +%marks. The remaining characters are ``^{control characters}'' that are +%typically used (in the computer industry, not in \TeX) to control +%input\slash output and data communications devices. For instance, +%\ascii\ code $84$ corresponds to the letter `T', while \ascii\ +%code~$12$ corresponds to the ``form feed'' function (interpreted by most +%printers as ``start a new page''). Although the \ascii\ standard +%specifies meanings for the control characters, many manufacturers of +%equipment such as modems and printers have used the control characters +%for purposes other than the standard ones. +\defterm{\ascii} 是“美国信息交换标准编码”(American Standard Code for +Information Interchange)的缩写。总共有 $256$ 个 \ascii\ ^{字符}, +每个都有自己的编码,但只有前面 $128$ 个是标准编码。 +在 \ascii\ “编码表”,比如\knuth{第~367~页}里面,你可以找到这些编码的含义。 +编码在 $32$--$126$ 之间的字符为“可打印字符^^{可打印字符}”, +比如字母,数字和标点符号。 +其余字符为“^{控制字符}”,通常用于(在计算机工业中,而不是 \TeX\ 中) +控制输入\slash 输出和数据交换设备。 +比如,\ascii\ 码 $84$ 对应于字符`T', +而 \ascii\ 码 $12$ 对应于“换页”功能(大多数打印机都将它解释为“开始新页”)。 +虽然 \ascii\ 标准指定了控制字符的含义, +但很多设备,比如调制解调器和打印机,都将控制字符用于标准规定之外的目的。 + +%The meaning of a +%character in \TeX\ is usually consistent with its meaning in standard \ascii, +%and \refterm{fonts:font} that contain \ascii\ +%printable characters usually have those characters in the same positions as +%their \ascii\ counterparts. +%But some fonts, notably those used for math, replace the \ascii\ +%printable characters by other characters unrelated to the \ascii\ characters. +%For instance, the Computer Modern math font +%^^{Computer Modern fonts} +%|cmsy10| has the math symbol +%`{$\forall$}' in place of the \ascii\ digit `8'. +\TeX\ 中字符的含义通常和标准 \ascii 中的含义一致。 +而且在包含 \ascii\ 可打印字符的\refterm{字体}中, +这些字符所在的位置也和 \ascii\ 中的一样。 +但有些字体,特别是数学字体, +将 \ascii\ 可打印字符替换为与 \ascii\ 无关的字符。 +比如,计算机现代数学字体 ^^{计算机现代字体} |cmsy10| +在 \ascii\ 数字 `8' 的位置上是数学符号 `{$\forall$}'。 + +\endconcept + +%\conceptindex{assignments} +%\concept assignment +\conceptindex{赋值} +\concept 赋值 + +%An \defterm{assignment} is a construct that tells \TeX\ to assign a +%value to a register, +%^^{registers//assignment to} +%to one of its internal +%\refterm{parameters:parameter}, +%^^{parameters//assignments to} +%to an entry in one of its internal tables, +%or to a \refterm{control sequence}. Some examples of assignments are: +\defterm{赋值}(assignment)是一种为 \TeX\ 的寄存器, +内部\refterm{参数},内部表格项,或者\refterm{控制序列}分配值的结构。 +^^{寄存器//给寄存器赋值}^^{参数//给参数赋值} +赋值的一些例子如下: + +\csdisplay +\tolerance = 2000 +\advance\count12 by 17 +\lineskip = 4pt plus 2pt +\everycr = {\hskip 3pt \relax} +\catcode\`@ = 11 +\let\graf = \par +\font\myfont = cmbx12 +| + +%The first assignment indicates that \TeX\ should assign the numeric value +%|2000| to the numeric parameter |\tolerance|, i.e., make the value of +%|\tolerance| be $2000$. The other assignments are similar. The `|=|' +%and the spaces are optional, so you could also write the first +%assignment more tersely as: +第一个赋值要求 \TeX\ 分配数值 |2000| 给数值参数 |\tolerance|, +即让 |\tolerance| 的值等于 $2000$。其他赋值类似。 +赋值中的 `|=|' 和空格是可省略的, +因此你也可以把第一个赋值改写为下面更紧凑的形式: + +\csdisplay +\tolerance2000 +| + +%See \knuth{pages~276--277} for the detailed syntax of assignments. +%\endconcept +在 \knuth{第~276--277~页}中对赋值语法有详细介绍。 +\endconcept + + +\bookmark{2}{以B开头} +%\concept badness +\concept 劣度 + +%The \defterm{badness} of a line is a measure of how far the interword +%spaces ^^{interword spacing} +%in the line deviate from their natural values, +%i.e., the values specified in the \refterm{fonts:font} used in the line. +%The greater the +%deviation, the greater the badness. Similarly, the badness of a page is +%a measure of how far the spaces between the boxes that +%make up the page deviate from their ideal values. (Ordinarily, most of these +%boxes are single lines of paragraphs.) +文本行的\defterm{劣度}(badness)值测量该行的字间隔偏离它们的自然值多远, +^^{单词间距} +其中自然值就是文本行所用\refterm{字体}中指定的值。 +偏离越大,劣度就越大。类似地,页面的劣度测量页面盒子的间隔偏离它们的理想值多远。% +(一般地,这些盒子大多数是段落的文本行。) + +%More precisely, the badness +%is a measure of how much the \refterm{glue} associated with these spaces needs +%to stretch or shrink to fill the line or page exactly. +%\TeX\ computes the badness as approximately $100$ +%times the cube of the ratio by which it must stretch or shrink the glue +%in order to compose a line or a page of the required size. +%^^{line breaks//badness for}^^{page breaks//badness for} +%For example, stretching the glue by twice its stated stretch yields a ratio of +%$2$ and a badness of $800$; stretching it by half its stated stretch yields +%a ratio of $.5$ and a badness of $13$. +%\TeX\ treats a badness greater than $10000$ as +%equal to $10000$. +更准确地说,劣度测量这些间隔对应的\refterm{粘连}要伸缩多少才能正好填满文本行或页面。 +\TeX\ 让劣度近似等于,为组成所需尺寸的行或页,粘连必须伸缩的比例的立方的 $100$ 倍。 +^^{断行//断行的劣度}^^{分页//分页的劣度} +例如,粘连伸长了给定伸长量的两倍得到的比例为 $2$ 而劣度为 $800$; +粘连伸长了给定伸长量的一半得到的比例为 $.5$ 而劣度为 $13$。 +\TeX\ 将超过 $10000$ 的劣度视为等于 $10000$。 + +%\TeX\ uses the badness of a line when it's breaking a paragraph into lines +%\seeconcept{line break}. It uses this information in two stages: +\TeX\ 分段为行时使用行劣度\seeconcept{断行点}。 +它在下面两个步骤中使用行劣度: + +%\olist +%\li When \TeX\ is choosing line breaks, +%it will eventually accept lines whose badness is less than or equal to +%the value of |\tolerance| (\xref \tolerance). If \TeX\ cannot avoid setting +%a line whose badness exceeds this +%value, it will set it as an underfull or overfull \refterm{hbox}. +%\TeX\ will set +%an overfull or underfull hbox only as a last resort, i.e., only if there's no +%other way to break the paragraph into lines. +%\li Assuming that all lines are tolerably bad, \TeX\ uses the badness of lines +%in order to evaluate the different ways of breaking the paragraph into lines. +%During this evaluation it associates ``demerits'' with each potential line. +%The badness increases the number of \refterm{demerits}. +%\TeX\ then +%breaks the paragraph into lines in a way that minimizes the +%total demerits for the paragraph. +%Most +%often \TeX\ arranges the paragraph in a way that minimizes the badness of the +%worst line. See \knuth{pages~97--98} for the details of how \TeX\ +%breaks a paragraph into lines. +%\endolist +\olist +\li 在选择断行点时,\TeX\ 要求各行劣度小于或等于 |\tolerance| 值(\xref \tolerance )。 +如果不得不放置一个劣度超过此值的行,\TeX\ 将把它设定为未满或过满\refterm{水平盒子}。 +\TeX\ 仅在万不得已时才会放置未满或过满水平盒子,即仅在没有其他方法分段为行时。 +\li 假设各行都相当糟糕,\TeX\ 用行劣度评价不同的分段为行方式。 +在评价过程中它对每个可能的行结合一个``缺陷''。劣度会增加\refterm{缺陷}值。 +然后 \TeX\ 选择让段落总缺陷最小的方式来分段为行。 +在多数情况下,\TeX\ 使用让最糟糕行的劣度最小的方式安排段落。 +请参阅\knuth{第~97--98~页}中 \TeX\ 如何分段为行的细节。 +\endolist + +%\TeX's procedure for assembling a sequence of lines and other vertical +%mode material into pages is similar to its procedure for line breaking. +%However, assembling pages is +%not as complicated because \TeX\ only considers one page at a time +%when it looks for page breaks. +%Thus the only decision it must make is where to end the current page. +%In contrast, when \TeX\ is choosing line breaks it +%considers several of them simultaneously. +%(Most word processors choose line breaks one at a time, +%and thus don't do as good a job at it as \TeX\ does.) +%See \knuth{pages~111--113} for the details of how \TeX\ chooses its +%page breaks. +%\endconcept +\TeX 将一系列文本行和其他竖直模式素材组装为页面的过程与断行的过程类似。 +但是组装页面没那么复杂,这是由于 \TeX\ 寻找分页点时每次只考虑一个页面, +因此只需要决定在哪里结束当前页面。 +与此相反,当选择断行点时 \TeX\ 要同时考虑多行。% +(大多数文字处理器每次只选择一个断行点,因而断行做得不如 \TeX\ 。)% +请参阅\knuth{第~111--113~页}中 \TeX\ 如何选择分页点的细节。 +\endconcept + + +%\conceptindex{baselines} +%\concept baseline +\concept 基线 + +%The \defterm{baseline} of a \refterm{box} is an imaginary line that runs +%across the box. +%^^{boxes//baselines of} +%When \TeX\ is +%assembling the boxes of a \refterm{horizontal list} into a larger box, +%it lines up the boxes in the list so that their baselines coincide. +%As an analogy, think of writing on a pad of ruled paper. Each letter +%that you write has +%an implicit baseline. +%In order to line up the letters horizontally, +%you place them on the pad so that their baselines +%agree with the light guidelines that are printed on the pad. +盒子的\defterm{基线}(baseline)是一条想象中的横穿盒子的线。 +^^{盒子//盒子的基线} +在将\refterm{水平列表}的盒子组装为更大的盒子时, +\TeX\ 将列表中各盒子对齐,以让它们的基线重合。 +打个比方,想象你在标线本上写字,你所写的每个字母都有一条隐含基线。 +为让各字母水平对齐,你会让它们的基线和本子上印刷的浅色提示线重合。 + +%A box can and often does extend below its baseline. +%For instance, the letter `g' extends below the baseline of its box because +%it has a descender (the bottom loop of the `g'). +%\endconcept +盒子可以而且也经常会延伸到基线下边。 +比如,字母 `g' 就延伸到其盒子的基线下边,因为它有一个降部(`g' 底部弯曲部分)。 +\endconcept + + +%\conceptindex{boxes} +%\concept box +\concept 盒子 + +%A \defterm{box} is a rectangle of material to be typeset. A single +%\refterm{character} is a box by itself, +%and an entire page is also a box. +%\TeX\ forms a page as a nest of boxes within boxes within boxes. The +%outermost box is the page itself, the innermost boxes are mostly +%single characters, and single lines are boxes that are +%somewhere in the middle. +\defterm{盒子}(box)是要排版的矩阵素材。 +单个\refterm{字符}自身就是一个盒子,整个页面同样也是一个盒子。 +\TeX\ 用盒子套盒子套盒子以形成页面。最外层盒子就是页面自身, +最内层盒子多半是单个字符,而单个文本行的盒子在中间某个地方。 + +%\TeX\ carries out most of its box-building activities implicitly as it +%constructs paragraphs and pages. +%You can construct boxes explicitly +%using a number of \TeX\ \refterm{commands}, notably +%^|\hbox| \ctsref{\hbox}, +%^|\vbox| \ctsref{\vbox}, and +%^|\vtop| \ctsref{\vtop}. +%The ^|\hbox| command +%constructs a box by appending smaller boxes horizontally from left to right; +%it operates on a \refterm{horizontal list} and yields +%an \refterm{hbox} ^^{hboxes} (horizontal box). +%^^{horizontal lists} +%The ^|\vbox| and |\vtop| commands +%construct a box by appending smaller boxes vertically from top to bottom; +%^^{vboxes} +%they operate on a \refterm{vertical list} +%and yield a \refterm{vbox} ^^{vboxes} (vertical box). +%^^{vertical lists} +%These horizontal and vertical lists can include not just smaller boxes but +%several other kinds of entities as well, e.g., \refterm{glue} and +%kerns. +%^^{kerns//as list items} +\TeX\ 在构造段落和页面时隐式执行大多数盒子构建活动。 +利用一些 \TeX\ \refterm{命令},比如 ^|\hbox|\ctsref{\hbox}、 +^|\vbox|\ctsref{\vbox}和 ^|\vtop|\ctsref{\vtop},你可以显式构造盒子。 +^|\hbox| 命令通过从左到右水平添加较小的盒子构造一个盒子; +它对一个\refterm{水平列表}进行操作以生成一个\refterm{水平盒子}^^{水平盒子}(horizontal box)。 +^^{水平列表} +^|\vbox| 和 |\vtop| 命令通过从上到下竖直添加较小的盒子构造一个盒子; +它们对一个\refterm{竖直列表}进行操作以生成一个\refterm{竖直盒子}^^{竖直盒子}(vertical box)。 +^^{竖直列表} +这些水平列表和竖直列表不仅可以包含较小的盒子, +还可以包含其他几种实体,比如\refterm{粘连}和紧排。 +^^{紧排//作为列表项目} + +%A box has \refterm{height}, \refterm{depth}, and \refterm{width}, +%^^{height} ^^{depth} ^^{width} +%like this: +%\vdisplay{\offinterlineskip\sevenrm +% \halign{#&#&\kern3pt \hfil#\hfil\cr +% &\hrulefill\cr +% &\vrule +% \vtop to .7in{\vss \hbox to .9in{\hss baseline\hss}\vskip4pt}% +% \vrule +% &\labelledheight{.7in}{height}\cr +% % +% \vbox to 0pt{ +% \vss +% \hbox{reference point \hbox to 15pt{\rightarrowfill}% +% \hskip3pt}% +% \kern-4.5pt}&{\box\refpoint}\hrulefill\cr +% % +% \omit +% &\vrule\hfil\vrule +% &\labelledheight{.4in}{depth}\cr +% % +% &\hrulefill\cr +% % +% \noalign{\vskip3pt}% +% &\leftarrowfill { width }\rightarrowfill\cr +%}} +盒子有\refterm{高度}、\refterm{深度}和\refterm{宽度}, +^^{高度} ^^{深度} ^^{宽度} +如下所示 +\vdisplay{\offinterlineskip\sevenrm + \halign{#&#&\kern3pt \hfil#\hfil\cr + &\hrulefill\cr + &\vrule + \vtop to .7in{\vss \hbox to .9in{\hss baseline\hss}\vskip4pt}% + \vrule + &\labelledheight{.7in}{height}\cr + % + \vbox to 0pt{ + \vss + \hbox{reference point \hbox to 15pt{\rightarrowfill}% + \hskip3pt}% + \kern-4.5pt}&{\box\refpoint}\hrulefill\cr + % + \omit + &\vrule\hfil\vrule + &\labelledheight{.4in}{depth}\cr + % + &\hrulefill\cr + % + \noalign{\vskip3pt}% + &\leftarrowfill { width }\rightarrowfill\cr +}} + +%^^{baselines} +%The \refterm{baseline} is like one of +%the light guidelines on a pad of ruled paper. +%The boxes for letters such as `g' +%extend below the baseline; the boxes for letters such as `h' don't. +%The height of a box is the distance that the box extends above its +%baseline, while its depth is the distance that it extends below its +%baseline. \bix^^{reference point} +%The \minref{reference point} +%of a box is the place where its baseline intersects its left edge. +^^{基线} +\refterm{基线}(baseline)如同标线本上的浅色提示线。 +像 `g' 这样的字母盒子延伸到基线下边;而像 `h' 这样的字母盒子却不会。 +盒子的高度是盒子在基线上边的延伸距离,而它的深度是在基线下边的延伸距离。 +\bix^^{基准点} +盒子的\minref{基准点}(reference point)是它的基线与左边缘的交点。 + +%{\tighten +%\TeX\ builds an hbox $H$ from a horizontal list by assuming +%a reference point for $H$ and then appending the items in the list to $H$ +%one by one from left to right. +%Each box in the list is placed so that its baseline coincides with the +%baseline of $H$\kern-2pt, +%i.e., the component boxes are lined up horizontally.% +%\footnote{If a box is moved up or down with ^|\raise| or +%^|\lower|, \TeX\ uses its reference point before the move when +%placing it.} +%The height of $H$ is the +%height of the tallest box in the list, and the depth of $H$ is the depth +%of the deepest box in the list. +%The width of $H$ is the sum of the +%widths of all the items in the list. +%If any of these items are \refterm{glue} and \TeX\ needs to stretch or shrink +%the glue, +%the width of $H$ will be larger or smaller accordingly. +%See \knuth{page~77} for the~details. +%\par} +在从水平列表构建水平盒子 $H$ 时,\TeX\ 先设定 $H$ 的基准点, +然后从左到右逐个添加列表中的项目到 $H$ 中。 +列表中的每个盒子按照其基线与 $H$ 的基线重合的方式放置, +即让组成盒子水平排成一排。% +\footnote{若盒子被 ^|\raise| 或 ^|\lower| 升高或降低了, +\TeX\ 放置时使用它移动之前的基准点。} +$H$ 的高度等于列表中最高盒子的高度,而深度等于列表中最深盒子的深度。 +$H$ 的宽度等于列表中所有项目的宽度之和。 +如果这些项目中有的是\refterm{粘连},\TeX\ 需要伸缩粘连, +从而 $H$ 的宽度将相应地变大或变小。请参阅\knuth{第~77~页}的细节描述。 + +%Similarly, \TeX\ builds a vbox $V$ from a vertical list by assuming a +%temporary reference point for $V$ and then appending the items in the +%list to $V$ one by one from top to bottom. Each box in the list is +%placed so that its reference point is lined up vertically with the +%reference point of \Vperiod.\footnote{If a box is moved left or right with +%^|\moveleft| or ^|\moveright|, \TeX\ uses its reference point before the +%move when placing it.} As each box other than the first one is added to +%\Vcomma, \TeX\ puts \minref{interline glue} just above it. (This +%^{interline glue} has no analogue for hboxes.) The width of $V$ is the +%width of the widest box in the list, and the vertical extent (height +%plus depth) of $V$ is the sum of the vertical extents of all the +%items in the list. +类似地,在从竖直列表构建竖直盒子 $V$ 时,\TeX\ 先设定 $H$ 的临时基准点, +然后从上到下逐个添加列表中的项目到 $V$ 中。 +列表中的每个盒子按照其基准点与 $V$ 的基准点竖直对齐的方式放置。% +\footnote{如果盒子被 ^|\moveleft| 或 ^|\moveright| 左移或右移了, +\TeX\ 放置时使用它移动之前的基准点。} +在第一个除外的每个盒子加到 $V$ 时,\TeX\ 在它之前放置\minref{行间粘连}。% +(在水平盒子中没有和^{行间粘连}对应的东西。)% +$V$ 的宽度等于列表中最宽盒子的宽度, +而 $V$ 的竖直长度(高度加深度)等于列表中所有项目的竖直长度之和。 + +%\bix^^|\vbox| +%\bix^^|\vtop| +%The difference between |\vbox| and |\vtop| is in how they partition +%the vertical extent of $V$ into a height and a depth. +%Choosing the reference point of $V$ determines that partition. +%\ulist +%\li For |\vbox|, \TeX\ places the reference point on a horizontal line +%with the reference point of the last component box +%or rule of \Vcomma, except +%that if the last box (or rule) is followed by glue or a kern, \TeX\ places the +%reference point at the very bottom of \Vperiod.% +%\footnote{The depth is limited by +%the parameter ^|\boxmaxdepth| \ctsref{\boxmaxdepth}.} +\bix^^|\vbox| +\bix^^|\vtop| +|\vbox| 和 |\vtop| 的区别在于它们如何将 $V$ 的竖直长度划分为高度和深度。 +选定了 $V$ 的基准点就决定了划分方式。 +\ulist +\li 对于 |\vbox|,\TeX\ 将基准点放在 $V$ 的最后一个组成盒子或标线的基准点所在的水平线上, +除非最后一个盒子(或标线)之后还有粘连或紧排,此时 \TeX\ 将基准点放在 $V$ 的最底端。 +\footnote{深度还受 ^|\boxmaxdepth| 参数\ctsref{\boxmaxdepth}限制。} + +%\li For |\vtop|, \TeX\ places the reference point on a horizontal line +%with the reference point of the first component box or rule of \Vcomma, +%except that if the first box (or rule) +%is preceded by glue or a kern, \TeX\ places +%the reference point at the very top of \Vperiod. +\li 对于 |\vtop|,\TeX\ 将基准点放在 $V$ 的第一个组成盒子或标线的基准点所在的水平线上, +除非第一个盒子(或标线)之前还有粘连或紧排,此时 \TeX\ 将基准点放在 $V$ 的最顶端。 + +%\endulist +%\noindent +%Roughly speaking, then, |\vbox| puts the reference point near the bottom +%of the vbox and |\vtop| puts it near the top. +%When you want to align a +%row of vboxes so that their tops line up horizontally, +%you should usually use |\vtop| rather than |\vbox|. +%See \knuth{pages~78 and 80--81} for the +%details of how \TeX\ builds vboxes. +%\eix^^|\vbox| +%\eix^^|\vtop| +%\eix^^{reference point} +\endulist +\noindent +粗略地说,|\vbox| 将基准点放在靠近竖直盒子底部处,而|\vtop| 将基准点放在靠近顶部处。 +在你想对齐一行竖直盒子,让它们的顶部水平排成一排时,你通常应该使用 |\vtop| 而不是 |\vbox|。 +请参阅\knuth{第~78 和 80--81~页}中 \TeX\ 如何构建竖直盒子的详细信息。 +\eix^^|\vbox| +\eix^^|\vtop| +\eix^^{基准点} + +%You have quite a lot of freedom in constructing boxes. The typeset +%material in a box can extend beyond the boundaries of the box as it does +%for some letters (mostly italic or slanted ones). The component boxes +%of a larger box can overlap. A box can have negative width, depth, or +%height, though boxes like that are not often needed. +在构造盒子时你有极大的自由度。盒子中排版的素材可以超出盒子的边界, +就像某些字母那样(多半是那些意大利体或斜体字母)。 +大盒子的组成盒子可以相互重叠。 +盒子可以有负的宽度、深度或高度,尽管这种盒子不常用到。 + +%You can save a box in a box \refterm{register} and retrieve it later. +%Before using a box register, +%^^{box registers} +%you should reserve it and give it a name +%with the ^|\newbox| command \ctsref{\@newbox}. See +%\conceptcit{register} for more information about box +%registers. +%\endconcept +你可以把一个盒子保存在盒子\refterm{寄存器}中并在稍后取回它。 +在使用盒子寄存器之前, +^^{盒子寄存器} +你应当用 ^|\newbox| 命令\ctsref{\@newbox}预留它并给它命名。 +请参阅\conceptcit{寄存器}中的关于盒子寄存器的更多信息。 +\endconcept + +\bookmark{2}{以C开头} +%\conceptindex{category codes} +%\concept {category code} +\conceptindex{类别码} +\concept {类别码} + +%The \defterm{category code} of a \refterm{character} determines that +%character's role in \TeX. +%^^{characters//category code of} +%For instance, \TeX\ assigns a certain role to +%letters, another to space characters, and so forth. \TeX\ attaches a +%code to each character that it reads. When \TeX\ reads the +%letter `|r|', for example, it ordinarily +%attaches the category code $11$ (letter) +%to it. For simple \TeX\ applications you won't need to worry about +%category codes, but they become important when you are trying to achieve +%special effects. +字符的\defterm{类别码}(category code)决定它在 \TeX\ 中扮演的角色。 +^^{字符//字符的类别码} +例如,\TeX\ 赋予某个角色给字母,另一个角色给空格符,诸如此类。 +\TeX\ 给读到的每个字符都附加一个代码。 +例如,\TeX\ 读到字母 `|r|' 时附加类别码 $11$(字母符)给它。 +在简单地使用 \TeX\ 时你无需考虑到类别码, +但当你试图达到特别效果时它们就变得很重要。 + +%Category codes apply only to characters that \TeX\ reads from input +%files. Once a character has gotten past \TeX's ^{gullet} +%\seeconcept{\anatomy} and been interpreted, its category code no +%longer matters. A character that you produce with the ^|\char| command +%\ctsref{\char} does not have a category code because |\char| +%is an instruction to \TeX\ to produce a certain character in a certain +%\refterm{font}. For instance, the ^{\ascii} code for `|\|' +%(the usual escape character) is $92$. If +%you type `|\char92 grok|', it is \emph{not} equivalent to |\grok|. +%Instead it tells \TeX\ to +%typeset `$c$grok', where $c$ is the character in position $92$ +%of the code table for the current font. +类别码只附加到 \TeX\ 从输入文件中读取的字符中。 +只要字符到达 \TeX\ 的^{食道}\seeconcept{\anatomy}并被解释完,它的类别码就不再改变。 +用 ^|\char| 命令\ctsref{\char}生成的字符没有类别码, +因为 |\char| 命令是一个让 \TeX\ 生成特定\refterm{字体}中的某个特定字符的指令。 +例如,`|\|'(通常的转义字符)的^{\ascii} 码是 $92$。 +如果你键入 `|\char92 grok|',却\emph{并不}等同于 |\grok|。 +实际上它让 \TeX\ 排版出 `$c$grok',其中 $c$ 是当前字体的编码表中位置为 $92$ 的字符。 + +%You can use the ^|\catcode| command \ctsref{\catcode} to reassign the +%category code of any character. By changing category codes you can +%change the roles of various characters. For instance, if you type +%`|\catcode`\@ = 11|', the category code of the at sign (|@|) will be set +%to ``letter''. You then can use `|@|' in the name of a control +%sequence. +你可以用 ^|\catcode| 命令\ctsref{\catcode}重新设定任何字符的类别码。 +改变了类别码就改变了各种字符所扮演的角色。 +例如,如果你键入 `|\catcode`\@ = 11|',|@| 符号的类别码就被设定为“字母符”。 +这样你就可以在控制序列名称中使用 `|@|' 。 + +%Here is a list of the category codes as they're defined in +%\refterm{\plainTeX} (see \xref{twocarets} for an explanation of +%the |^^| notation), +%together with the characters in each category: +这里给出\refterm{\plainTeX} 定义的类别码列表,以及每个类别中的字符(\xref{twocarets}有|^^|记法的解释): + +%\xrdef{catcodes} +%\vskip\abovedisplayskip +%%k \vskip 0pt plus 2pt % to fix bad page break +%{%k \interlinepenalty = 10000 +%\halign{\indent\hfil\strut#&\qquad#\hfil\cr +%\it Code&\it Meaning\cr +%\noalign{\vskip\tinyskipamount} +%0&Escape character \quad |\| ^^{escape character//category code of} +% {\recat!ttidxref[\//category code of]] +% \cr +%1&Beginning of group \quad |{| ^^{groups} +% {\recat!ttidxref[{//category code of]] +% \cr +%2&End of group \quad |}| +% {\recat!ttidxref[}//category code of]] +% \cr +%3&Math shift \quad |$| ^^{math shift} +% {\recat!ttidxref[$//category code of]] +% \cr +%4&Alignment tab \quad |&| ^^{tabs} ^^{alignments//tab character for} +% \ttidxref{&//category code of} \cr +%5&End of line \quad |^^M| \tequiv \ascii\ \asciichar{return} +% ^^{end of line} \ttidxref{^^M//category code of}\cr +%6&Macro parameter \quad |#| +% ^^{macros//parameters of} +% ^^{parameters//indicated by \b\tt\#\e} +% \ttidxref{#//category code of} \cr +%7&Superscript \quad |^| and |^^K| ^^{superscripts} +% \ttidxref{^^K} +% \ttidxref{^//category code of} \cr +%8&Subscript \quad |_| and |^^A| ^^{subscripts} +% \ttidxref{^^A} +% \ttidxref{_//category code of} \cr +%9&Ignored character \quad |^^@| \tequiv \ascii\ \asciichar{null} +% ^^{ignored characters} \indexchar ^^@ \cr +%10&Space \quad \visiblespace\ and |^^I| \tequiv \ascii\ +% \asciichar{horizontal\ tab} +% ^^{horizontal tab} +% ^^{space characters//category code of} \indexchar ^^I +% {\recat!ttidxref[ ]] +% \cr +%11&Letter \quad |A| \dots |Z| and |a| \dots |z| ^^{letter}\cr +%12&Other character \quad (everything not listed above or below) +% ^^{other characters}\cr +%13&Active character \quad |~| and |^^L| \tequiv\ascii\ \asciichar{form\ feed} +% ^^{active characters} ^^{form feed} \indexchar ~ \indexchar ^^L \cr +%14&Comment character \quad |%| ^^{comments} +% {\recat!ttidxref[%//category code of]] +% \cr +%15&Invalid character \quad |^^?| \tequiv \ascii\ \asciichar{delete} +% ^^{invalid character} \indexchar ^^? \cr +%}} +%\vskip\belowdisplayskip +%%k \vskip 0pt plus 2pt % to fix bad page break +\xrdef{catcodes} +\vskip\abovedisplayskip +%k \vskip 0pt plus 2pt % to fix bad page break +{%k \interlinepenalty = 10000 +\halign{\indent\hfil\strut#&\qquad#\hfil&\qquad#\hfil\cr +\it 编码&\it 意义&\it 字符\cr +\noalign{\vskip\tinyskipamount} +0&转义符 & |\| ^^{转义符//转义符的类别码} + %{\recat!ttidxref[\//其类别码]] + \cr +1&编组开始符& |{| ^^{编组} + %{\recat!ttidxref[{//其类别码]] + \cr +2&编组结束符& |}| + %{\recat!ttidxref[}//其类别码]] + \cr +3&数学环境符& |$| ^^{数学开关} + %{\recat!ttidxref[$//其类别码]] + \cr +4&阵列制表符& |&| ^^{制表} ^^{阵列//阵列的制表符} + \ifoldeplain\ttidxref{&//其类别码}\fi \cr +5&行结束符 & |^^M| \tequiv \ascii\ \asciichar{return} + ^^{行结束符} \ifoldeplain\ttidxref{^^M//其类别码}\fi\cr +6&宏参数符 & |#| + ^^{宏//宏的参数} + ^^{参数//用 \b\tt\#\e 指明} + \ifoldeplain\ttidxref{#//其类别码}\fi \cr +7&上标符 & |^| 和 |^^K| ^^{上标} + \ttidxref{^^K} + \ifoldeplain\ttidxref{^//其类别码}\fi \cr +8&下标符 & |_| 和 |^^A| ^^{下标} + \ttidxref{^^A} + \ifoldeplain\ttidxref{_//其类别码}\fi \cr +9&可忽略符 & |^^@| \tequiv \ascii\ \asciichar{null} + ^^{可忽略符} \indexchar ^^@ \cr +10&空格符 & \visiblespace\ 和 |^^I| \tequiv \ascii\ + \asciichar{horizontal\ tab} + ^^{水平制表符} + ^^{空格符//其类别码} \indexchar ^^I + %{\recat!ttidxref[ ]] + \cr +11&字母符 & |A| \dots |Z| 和 |a| \dots |z| ^^{字母}\cr +12&其他字符 &(不属于其他类别的字符) + ^^{其他字符}\cr +13&活动字符 & |~| 和 |^^L| \tequiv\ascii\ \asciichar{form\ feed} + ^^{活动字符} ^^{换页符} \indexchar ~ \indexchar ^^L \cr +14&注释符 & |%| ^^{注释} + %{\recat!ttidxref[%//其类别码]] + \cr +15&无效字符 & |^^?| \tequiv \ascii\ \asciichar{delete} + ^^{无效字符} \indexchar ^^? \cr +}} +\vskip\belowdisplayskip +%k \vskip 0pt plus 2pt % to fix bad page break + +%\noindent Except for categories $11$--$13$, +%all the characters in a particular category produce the same effect. +%\margin{Misleading material removed.} +%For instance, suppose +%that you type: +%\csdisplay +%\catcode`\[ = 1 \catcode`\] = 2 +%| +%Then the left and right bracket characters become +%beginning-of-group and end-of-group characters equivalent to +%the left and right brace characters. With these definitions `|[a b]|' +%is a valid group, and so are \hbox{`|[a b}|'} and~\hbox{`|{a b]|'}. +\noindent 除了第 $11$--$13$ 类别,一个类别中的所有字符产生的效果都相同。 +\margin{Misleading material removed.} +例如,假设你键入: +\csdisplay +\catcode`\[ = 1 \catcode`\] = 2 +| +则左方括号和右方括号分别就变成编组开始符和编组结束符,即它们分别和左花括号和右花括号等价。 +在这些定义之下,`|[a b]|' 是一个有效的编组,\hbox{`|[a b}|'} 和 \hbox{`|{a b]|'} 同样也是。 + +%The characters in categories $11$ (letter) and $12$ +%(other character) act as \refterm{commands:command} +%that mean +%``produce a \refterm{box} containing this character +%typeset in the current font''. +%The only distinction between letters and ``other'' characters is +%that letters can appear in \refterm{control word}s but +%``other'' characters~can't. +类别为 $11$(字母符)或 $12$(其他字符)的字符成为一个\refterm{命令}, +它表示“用当前字体排版这个字符并放在一个\refterm{盒子}中”。 +字母符和“其他字符”的惟一区别是,字母符可以出现在\refterm{控制词}中而“其他字符”不能。 + +%A character in category $13$ (active) acts like a control sequence +%all by itself. \TeX\ complains if it encounters an active character that +%doesn't have a definition associated with it. +%^^{active characters} +类别为 $13$(活动字符)的字符单独作为控制序列。 +如果 \TeX\ 碰到一个未定义的活动字符,它将会报错。 +^^{活动字符} + +%If \TeX\ encounters an ^{invalid character} (category $15$) +%in your input, it will complain about it. +如果 \TeX\ 在输入中碰到一个^{无效字符}(类别为$15$),它也会报错。 + +%The `|^^K|' and `|^^A|' characters have been included in categories +%$8$ (subscript) and $9$ (superscript), even though these meanings +%don't follow the standard \refterm{\ascii} interpretation. +%That's because some keyboards, notably some at Stanford +%University where \TeX\ originated, +%have down arrow and up arrow keys that generate these characters. +%\ttidxref{^^A} +%\ttidxref{^^K} +字符 `|^^K|' 和 `|^^A|' 被包含在类别$7$(上标符)和 $8$(下标符)中, +即使它们的意义并不符合标准\refterm{\ascii} 中的解释。 +这是因为某些键盘,尤其是 \TeX\ 起源地哈佛大学的键盘,用上方向键和下方向键生成这两个字符。 +\ttidxref{^^A} +\ttidxref{^^K} + +%There's a subtle point about the way \TeX\ assigns category codes that +%can trip you up if you're not aware of it. \TeX\ sometimes needs to +%look at a character twice as it does its initial scan: first to find the +%end of some preceding construct, e.g., a control sequence, and later to +%turn that character into a token. \TeX\ doesn't assign the category +%code until its \emph{second} look at the character. For example: +在 \TeX\ 分配类别码的方式中有个细微之处,如果没注意到它你就会犯错误。 +\TeX\ 在初步扫描时有时候需要查看一个字符两次: +第一次找到前面的控制序列等结构的结束位置,第二次才将该字符转换为记号。 +\TeX\ 在\emph{第二次}查看该字符时才会给它分配类别码。例如: + +%\csdisplay +%\def\foo{\catcode`\$ = 11 }% Make $ be a letter. +%\foo$ % Produces a `$'. +%\foo$ % Undefined control sequence `foo$'. +%| +%\noindent +%This bit of \TeX\ code produces `\$' in the typeset output. When +%\TeX\ first sees the `|$|' on the second line, +%it's looking for the end of a control sequence name. Since +%the `|$|' isn't yet a letter, it marks the end of `|\foo|'. Next, +%\TeX\ expands the `|\foo|' macro and changes the category code of `|$|' +%to $11$ (letter). Then \TeX\ reads the `|$|' ``for real''. Since +%`|$|' is now a letter, \TeX\ produces a box +%containing the `|$|' character in the current font. +%When \TeX\ sees the third line, it treats `|$|' as a letter and thus +%considers it to be part of the control sequence name. +%As a result it complains about an undefined control sequence |\foo$|. +\csdisplay +\def\foo{\catcode`\$ = 11 } % 将 $ 变成字母符。 +\foo$ % 生成一个 `$'。 +\foo$ % 未定义的控制序列 `foo$'。 +| +\noindent +这段 \TeX\ 代码在输出中生成 `\$'。 +在第二行,当 \TeX\ 首次查看 `|$|' 时,它是在寻找控制序列名称的结束位置。 +由于 `|$|' 还不是字母符,它表示 `|\foo|' 已结束。 +接下来,\TeX\ 展开 `|\foo|' 宏并将 `|$|' 的类别码改为 $11$(字母符)。 +然后 \TeX\ 才“真正地”读取 `|$|'。 +由于 `|$|' 已经是字母符,\TeX\ 用当前字体生成包含 `|$|' 的盒子。 +当 \TeX\ 看到第三行时,它将 `|$|' 视为字母符,因此认为它是控制序列名称的一部分。 +结果它抱怨 |\foo$| 是一个未定义的控制序列。 + +%\TeX\ behaves this way even when the terminating character is an +%end of line. For example, suppose that the macro |\fum| activates the +%end-of-line character. Then if |\fum| appears on a line $\ell$ by +%itself, \TeX\ will first interpret the end of line of $\ell$ as +%the end of the |\fum| control sequence and then will \emph{reinterpret} +%the end of line of $\ell$ as an active character. +%\endconcept +即使当结束符号是行尾符时,\TeX\ 也是这样处理的。 +举个例子,假设你用 |\fum| 宏激活行尾符。 +那么,如果 |\fum| 单独出现在第 $\ell$ 行中, +\TeX\ 将首先将第$\ell$行的行尾符解释为 |\fum| 控制序列的结束, +然后将该行尾符\emph{重新解释}为活动字符。 +\endconcept + + +%\conceptindex{characters} +%\concept character +\concept 字符 + +%{\tighten +%\TeX\ works with \defterm{字符} in two contexts: +%as input characters, which it reads, and as output characters, +%which it typesets. +%\TeX\ transforms most input characters +%into the output characters that depict them. +%For example, it normally +%transforms the input letter `|h|' into the letter `h' typeset in the current +%font. +%That is not the case, however, for an input character such as `|$|' that has a +%special meaning. +%\par} +\TeX\ 在两个方面用到\defterm{字符}(character): +作为读取的输入字符,以及作为排版的输出字符。 +\TeX\ 将大多数输入字符转变成输出字符以显示它们。 +例如,它通常将输入字母 `|h|' 转换为用当前字体排版的字母 `h'。 +但是,对于类似 `|$|' 这些有特别意义的字符,却不是这么回事。 + +%\TeX\ gets its input characters by reading them from input files (or from your +%terminal) and by expanding \refterm{macros:macro}. These are the +%\emph{only} ways that \TeX\ can acquire an input character. +%Each input character has a code number corresponding to its position in the +%\refterm{\ascii} code table. ^^{\ascii} +%For instance, the letter `|T|' has \ascii\ code~$84$. +\TeX\ 通过读取输入文件(或终端)和展开\refterm{宏}得到输入字符。 +它们是 \TeX\ 获取输入字符的\emph{仅有的}途径。 +每个输入字符有一个编码,它表示该字符在\refterm{\ascii} 码表的位置。 +^^{\ascii} +例如,字母 `|T|' 的 \ascii\ 编码为 $84$。 + +%When \TeX\ reads +%a character, it attaches a \refterm{category code} +%^^{category codes//attached during input} +%to it. The category code affects how \TeX\ interprets the +%character once it has been read in. \TeX\ determines +%(and remembers) the category codes of the characters in a macro when it +%reads the macro's definition. As \TeX\ reads characters with its eyes +%\seeconcept{\anatomy} it does some ``filtering'', +%such as condensing +%sequences of spaces to a single space. See \knuth{pages~46--48} for the +%details of this filtering. +在读取字符时,\TeX\ 给它附加一个\refterm{类别码}。 +^^{类别码//在读取时附加} +类别码影响 \TeX\ 读取字符时对该字符的解释。 +在读取宏定义时,\TeX\ 判定(并记住)宏里面的字符的类别码。 +在用它的眼睛读取字符时\seeconcept{\anatomy},\TeX\ 执行一些“过滤”, +比如将连续多个空格压缩为一个。在\knuth{第~46--48~页}中描述了过滤的细节。 + +%The \ascii\ +%``^{control characters}'' have codes $0$--$31$ and $127$--$255$. +%They either don't +%show up or cause strange behavior on most terminals if you try to +%display them. Nonetheless they are sometimes needed in \TeX\ input, +%so \TeX\ has a special notation for them. +%\xrdef{twocarets} +%If you type `|^^|$c$', where $c$ is any character, you get the character +%whose \ascii\ code is either $64$ greater or $64$ less than $c$'s +%\ascii\ code. The largest acceptable code value using this notation +%is $127$, so the notation is unambiguous. +%Three particularly common instances of this +%notation are `|^^M|' (the \ascii\ \asciichar{return} character), +%`|^^J|' (the \ascii\ \asciichar{line\ feed} character) and `|^^I|' +%(the \ascii\ \asciichar{horizontal\ tab} character). +%\ttidxref{^^M}\ttidxref{^^J}\ttidxref{^^I} +\ascii{}“^{控制字符}”的编码为 $0$--$31$ 和 $127$--$255$。 +倘若你试图在终端中显示它们,在多数终端中它们将显示不出来或导致奇怪行为。 +即便如此,有时候它们还是需要在 \TeX\ 输入中出现, +因此对这些字符 \TeX\ 给出了一种特别的表示法。 +\xrdef{twocarets} +如果你键入 `|^^|$c$',其中 $c$ 为任何字符, +你将得到一个比 $c$ 的\ascii\ 码大 $64$ 或小 $64$ 的字符。 +这种表示法得到的编码不能超过 $127$,因此它是无歧义的。 +这种表示法的三个最常见例子是 `|^^M|'(\ascii\ \asciichar{return}字符), +`|^^J|'(\ascii\ \asciichar{line\ feed}字符)和 +`|^^I|'(\ascii\ \asciichar{horizontal\ tab}字符)。 +\ttidxref{^^M}\ttidxref{^^J}\ttidxref{^^I} + +%{\tighten +%\TeX\ also has another notation for indicating \ascii\ code values +%that works for all character codes from $0$ to $255$. +%\xrdef{hexchars} +%If you type `|^^|$xy$', where $x$ +%and $y$ are any of the ^{hexadecimal digit}s `|0123456789abcdef|', +%you get the single character with the specified code. +%(Lowercase letters are required here.) +%\TeX\ opts for the ``hexadecimal digits'' +%interpretation whenever it has a choice, so you must not follow a character +%like `|^^a|' with a lowercase hexadecimal digit---if you do, you'll get the +%wrong interpretation. +%If you need to use this +%notation you'll find it handy to have a table of \ascii\ codes. +%\par} +\TeX\ 还有另一种指明 \ascii\ 编码的表示法,它能够表示从 $0$ 到 $255$ 的所有字符。 +\xrdef{hexchars} +如果你键入 `|^^|$xy$',其中 $x$ 和 $y$ 是任何^{十六进制数字} `|0123456789abcdef|', +你就得到该编码对应的字符(这里只能使用小写字符。) +\TeX\ 优先选择“十六进制数字”这种解释, +因此在类似 `|^^a|' 的字符后面不要跟着一个小写十六进制数字——这样将会得到错误的解释。 +在需要使用这种表示法时,你会发现有个\ascii\ 编码表更方便些。 + +%An output character is a character to be typeset. +%A command for producing an output character has the meaning +%``Produce a \refterm{box} containing +%character number $n$ from the current \refterm{font}'', +%where $n$ is determined by the command. +%\TeX\ produces your typeset document by combining such boxes with +%other typographical \hbox{elements} and arranging them +%on the page. +输出字符就是待排版的字符。生成输出字符的命令有这样的意义: +“生成一个包含当前\refterm{字体}第$n$个字符的盒子”,其中$n$由该命令给出。 +\TeX\ 将这些盒子和其他排版\hbox{元素}组合起来并在页面上排好,以生成你排版的文档。 + +%An input character whose category code is $11$ (^{letter}) or $12$ (other) +%^^{other characters} +%acts as a command to produce the corresponding output character. In +%addition you can get \TeX\ to produce character $n$ by issuing the +%command `|\char |$n$' \ctsref{\char}, ^^|\char| where $n$ is a +%\refterm{number} between $0$ and $255$. The commands `|h|', +%|\char`h|, and |\char104| all have the same effect. ($104$ is the +%\ascii\ code for `h'.) +类别码为 $11$(^{字母})或 $12$(其他)^^{其他字符}的输入字符, +是一个生成对应输出字符的命令。 +另外,你也可以用 `|\char |$n$'\ctsref{\char}^^|\char| 让 \TeX\ 生成字符 $n$, +其中$n$是介于$0$和$255$之间的\refterm{数}。 +命令 `|h|',|\char`h| 和 |\char104| 的结果相同($104$ 是`h' 的\ascii\ 编码。) + +\endconcept + + +%\concept class +\concept 类 + +%The \defterm{class} of a \refterm{character} specifies that character's +%role in math formulas. The class of a character is encoded in its +%\refterm{mathcode}. ^^{mathcodes//class encoded in} For example, the +%equals sign `|=|' is in class $3$ (Relation). \TeX\ uses its knowledge +%of character classes to decide how much space to put between different +%components of a math formula. \margin{clarifying material added} For +%example, here's a math formula shown first as \TeX\ normally prints it +%and then with the class of each character randomly changed: +%$$\strut a+(b-a)=a \qquad +% \mathopen{a}\mathord{+}\mathrel{(}\mathclose{b}\mathclose{-} +% \mathop{a}\mathopen{)}\mathord{=}\mathopen{a}$$ +\refterm{字符}所属的\defterm{类}(class)指明该字符在数学公式中的角色。 +字符的类记录在它的\refterm{数学码}中。^^{数学码//数学码中的类} +例如,等号 `|=|' 属于第 $3$ 类(关系符号)。 +\TeX\ 利用字符类的知识确定数学公式的各部分的间隔的大小。 +\margin{clarifying material added} +例如,下面这个公式首先用正常方式显示,然后用随机修改各字符类的方式显示: +$$\strut a+(b-a)=a \qquad + \mathopen{a}\mathord{+}\mathrel{(}\mathclose{b}\mathclose{-} + \mathop{a}\mathopen{)}\mathord{=}\mathopen{a}$$ + +%See \xrefpg\mathord\ of this book for a list of the classes and +%\knuth{page~154} for their meanings. +参见本书\xrefpg\mathord 中各种类的列表, +以及\knuth{第~154~页}中各种类的含义。 + +\endconcept + + +%\conceptindex{commands} +%\concept command +\concept 命令 + +%A \defterm{command} instructs \TeX\ to carry out a certain action. +%Every \refterm{token} that reaches \TeX's stomach \seeconcept{\anatomy} +%acts as a command, except for those that are parts of arguments to +%other commands (see below). +%^^{tokens//as commands} +%A command can be invoked by a +%\refterm{control sequence}, by an \refterm{active character}, or by an +%ordinary character. It might seem odd that \TeX\ treats an ordinary +%character as a command, but in fact that's what it does: +%when \TeX\ sees +%an ordinary character +%it constructs a \refterm{box} containing that character typeset in +%the current font. +\defterm{命令}(command)指导 \TeX\ 执行某种动作。 +到达\TeX\ 的胃\seeconcept{\anatomy}的每个\refterm{记号}都作为一个命令, +那些作为其他命令的参量(见下面)的记号除外。 +^^{记号//作为命令} +命令可以由\refterm{控制序列},由\refterm{活动字符},或者由普通字符产生。 +\TeX\ 将普通字符视为命令这事看来有些奇怪,但实际上它是这样做的: +当 \TeX\ 看到一个普通字符时,它构造一个用当前字体排版该字符的\refterm{盒子}。 + +%A command can have arguments. +%The arguments of a command are single tokens or +%groups of tokens that complete the description of what +%the command is supposed to do. +%For example, the command `|\vskip 1in|' tells \TeX\ to skip +%$1$ inch vertically. It has an argument `|1in|', +%which consists of three tokens. +%The description of what |\vskip| is supposed to do would be incomplete +%without specifying how far it is supposed to skip. +%The tokens in the arguments to a command are not themselves considered +%to be commands. +命令可以有参量。命令的参量为单个记号或一组记号, +它们完成对命令该如何执行的说明。 +例如,命令 `|\vskip 1in|' 告诉 \TeX\ 竖直跳过 $1$ 英寸。 +它有一个参量 `|1in|' 包含三个记号。 +如果不指明跳过的距离,对 |\vskip| 如何执行的说明就是不完整的。 +这些出现在命令参量中的记号不被看成命令。 + +%Some examples of different kinds of \TeX\ commands are: +%\ulist\compact +%\li Ordinary characters, such as `|W|', which instructs \TeX\ +%to produce a box containing a typeset `W' +%\li Font-setting commands, +%such as |\bf|, which begins boldface type +%\li Accents, such as |\`|, which produces a grave accent as in `\`e' +%\li Special symbols and ligatures, such as |\P| (\P) and |\ae| (\ae) +%\li Parameters, such as |\parskip|, the amount of glue that +%\TeX\ puts between paragraphs +%\li Math symbols, such as |\alpha| ($\alpha$) and |\in| ($\in$) +%\li Math operators, such as |\over|, which produces a fraction +%\endulist +%\endconcept +各种类型的 \TeX\ 命令的一些例子如下: +\ulist\compact +\li 普通字符,比如 `|W|' 指导 \TeX\ 生成包含排版好的 `W' 的盒子 +\li 字体设置命令,比如 |\bf| 开始粗体形式 +\li 重音符,比如 |\`| 生成一个如同 `\`e' 的钝音符 +\li 特殊符号和连写,比如 |\P|(\P )和 |\ae|(\ae ) +\li 参数,比如 |\parskip| 说明 \TeX\ 在段落间添加的粘连的大小 +\li 数学符号,比如 |\alpha|($\alpha$)和 |\in|($\in$) +\li 数学运算符,比如 |\over| 生成一个分式 +\endulist +\endconcept + + +%\conceptindex{conditional tests} +%\concept {conditional test} +\concept {条件测试} + +%A \defterm{conditional test} is a command that tests whether or not a certain +%condition is true and +%causes \TeX\ either to expand or to skip some text, depending on +%the outcome. +%The general form of a conditional test is either: +%\display{ +%{\tt \\if}$\alpha$\<true text>{\tt \\else}\<false text>{\tt \\fi}} +%^^|\else|^^|\fi| +%\noindent or:\hfil\ +%\display{ +%{\tt \\if}$\alpha$\<true text>{\tt \\fi}} +%\noindent where $\alpha$ specifies the particular test. +%For example, |\ifvmode| tests the condition that \TeX\ +%is currently in a \refterm{vertical mode}. +%If the condition is true, \TeX\ expands \<true text>. +%If the condition is false, \TeX\ expands \<false text> (if it's present). +%Conditional tests are interpreted in \TeX's gullet +%\seeconcept{\anatomy}, so any expandable \minref{token}s in +%the interpreted text are expanded after the test has been resolved. +%The +%various conditional tests are explained in \headcit{Conditional tests}% +%{conds}. +% +%\endconcept +\defterm{条件测试}(conditional test)是一个命令,它测试某个条件是否成立, +并依此让 \TeX\ 展开或忽略某些文本。条件测试的一般形式是: +\display{ +{\tt \\if}$\alpha$\<true text>{\tt \\else}\<false text>{\tt \\fi}} +^^|\else|^^|\fi| +\noindent 或者:\hfil\ +\display{ +{\tt \\if}$\alpha$\<true text>{\tt \\fi}} +\noindent 其中 $\alpha$ 指定某个特定的测试。 +例如,|\ifvmode| 测试 \TeX\ 是否位于\refterm{竖直模式}中。 +如果条件成立,\TeX\ 展开 \<true text>。 +如果条件不成立,\TeX\ 展开 \<false text>(如果它存在)。 +条件测试在 \TeX\ 的食道\seeconcept{\anatomy}中解释, +因此在解释出的文本中,任何可展开\minref{记号}都被展开了。 +在\headcit{条件测试}{conds}中解释了各种条件测试。 +\endconcept + + +%\conceptindex{control sequences} +%\concept{control sequence} +\concept{控制序列} + +%A \defterm{control sequence} is a name for a \TeX\ \refterm{command}. +%A control sequence always starts with an ^{escape character}, usually +%a backslash (|\|). +%\indexchar \ +%A control sequence takes one of two forms: +\defterm{控制序列}(control sequence)是 \TeX\ \refterm{命令}的名称。 +控制序列总是以^{转义符}开头,即以反斜杠(|\|)开头。 +\indexchar \ +控制序列必为如下两种形式中的一种: + +%\ulist +% +%\li A \refterm{control word} is a control sequence consisting of an +%\refterm{escape character} followed by one or more letters. +%^^{control words} +%The control +%word ends when \TeX\ sees a nonletter. For instance, when \TeX\ reads +%`\hbox{|\hfill!visiblespace,!visiblespace!.the|}', it sees six +%\refterm{tokens:token}: +%the control sequence `|\hfill|', comma, space, `|t|', `|h|', `|e|'. The +%space after `|\hfill|' ends the control sequence and +%is absorbed by \TeX\ when it scans the control sequence. +%(For the text `|\hfill,!visiblespace!.the|', on the other hand, +%the comma both ends the control sequence and counts as a character in its +%own right.) +\ulist +\li \refterm{控制词}是由\refterm{转义符}紧跟一个或多个字母组成的控制序列。 +^^{控制词} +控制词在 \TeX\ 碰到非字母符时结束。 +例如,当 \TeX\ 读取 `\hbox{|\hfill!visiblespace,!visiblespace!.the|}' 时, +它看到六个\refterm{记号}:控制序列 `|\hfill|'、逗号、空格、`|t|'、`|h|'、`|e|'。 +在 \TeX\ 扫描控制序列时,`|\hfill|'之后的空格结束该控制序列并被吸收掉。% +(另一方面,对于 `|\hfill,!visiblespace!.the|', +逗号不仅结束控制序列,而且自身也算作一个字符。) +%\li A \refterm{control symbol} +%^^{control symbols} +%is a control sequence consisting of an +%^{escape character} followed by any character other than a letter---% +%even a space or an end of line. +%A control symbol is self-delimited, i.e., \TeX\ knows where it ends without +%having to look at what character comes after it. +%The character after a control symbol is never absorbed by +%the control symbol. +%\endulist +%\noindent See \xrefpg{spaces} for more information about spaces after control +%sequences. +\li \refterm{控制符}是由^{转义符}紧跟单个非字母符组成的控制序列% +——非字母符也可以是空格符或者行尾符。 +^^{控制符} +控制符是自定界的,即 \TeX\ 无需读取后面的字符就知道它在哪里结束。 +控制符之后的字符永远不会被吸收掉。 +\endulist +\noindent 你可以参考\xrefpg{spaces},其中有对控制序列后的空格的介绍。 + +%\TeX\ provides a great many predefined control sequences. The +%\refterm{primitive} control sequences are built into the \TeX\ computer +%program and thus are available in all forms of \TeX. +%^^{primitive//control sequence} +%Other +%predefined control sequences are provided by \refterm{\plainTeX}, the +%form of \TeX\ described in this book. +\TeX\ 提供了许多预定义的控制序列。 +\refterm{原始的}控制序列内建于 \TeX\ 程序中,因此可以在各种 \TeX\ 形式中使用。 +^^{原始的//原始控制序列} +其他预定义的控制序列由\refterm{\plainTeX}(即本书描述的 \TeX\ 形式)提供。 + +%You can augment the predefined control sequences with ones of your own, +%using commands such as ^|\def| and ^|\let| to define them. +%\chapterref{eplain} of this book contains a +%collection of control sequence definitions that you may find +%useful. In addition, your computing facility may +%be able to provide a collection of +%locally developed \TeX\ macros. +%\endconcept +你可以用自己的控制序列扩充预定义的控制序列,只需用 ^|\def| 和 ^|\let| 等命令定义它们。 +本书\chapterref{eplain}包含了一批实用的控制序列定义。 +此外,你的计算设备也可能提供一批本地开发的 \TeX\ 宏。 +\endconcept + + +%\conceptindex{control symbols} +%\concept{control symbol} +\concept{控制符} + +%A \defterm{control symbol} is a \refterm{control sequence} that consists +%of an \refterm{escape character} followed by any character other than a +%letter---even a space or end of line. +%^^{escape character} +%\endconcept +\defterm{控制符}(control symbol)是由\refterm{转义符}紧跟单个非字母符组成的% +\refterm{控制序列}——非字母符也可以是空格符或者行尾符。 +^^{转义符} +\endconcept + + +%\conceptindex{control words} +%\concept{control word} +\concept{控制词} + +%A \defterm{control word} is a \refterm{control sequence} that consists +%of an \refterm{escape character} followed by one or more +%letters.\footnote{A ``letter'' here has the strict meaning of a +%character with category code $11$.} +%\TeX\ +%ignores any spaces or ends-of-line that follow a control word, except to +%note that they end the control word. +%^^{escape character} +%\endconcept +\defterm{控制词}(control word)是由\refterm{转义符}紧跟一个或多个字母 +组成的\refterm{控制序列}。\footnote{其中“字母”的确切含义是指类别码为 $11$ 的字符。} +\TeX\ 忽略控制词之后的空格符或行尾符,仅仅用它们表示控制词的结束。 +^^{转义符} +\endconcept + + +\bookmark{2}{以D开头} +%\concept {decimal constant} +\concept {小数} + +见\conceptcit{数}。 +\endconcept + + +%\conceptindex{delimiters} +%\concept delimiter +\concept 定界符 + +%A \defterm{delimiter} is a character +%that is intended to be used as +%a visible boundary of a math formula. +%The essential property of a delimiter is that \TeX\ can adjust +%its size according +%to the vertical size (\refterm{height} plus \refterm{depth}) +%of the subformula. +%However, \TeX\ performs the adjustment only if the delimiter +%appears in a ``delimiter context'', namely, as an argument to +%one of the commands ^|\left|, +%^|\right|, +%|\over!-with!-delims|, +%|\atop!-with!-delims|, +%or |\above!-with!-delims| +%^^|\overwithdelims| +%^^|\atopwithdelims| +%^^|abovewithdelims| +%\margin{Footnote deleted} +%(see \pp\xrefn{\overwithdelims},~\xrefn{\left}). +%The delimiter contexts also include any \refterm{argument} +%to a \refterm{macro} that uses the argument in a delimiter context. +\defterm{定界符}(delimiter)是一个作为数学公式的可见边界的字符。 +\TeX\ 可以根据子公式的竖直尺寸(\refterm{高度}加\refterm{深度})调整定界符大小, +这就是定界符的本质特性。 +然而,要让 \TeX\ 对定界符作调整,定界符必须出现在“定界环境”中, +即作为 ^|\left|、^|\right|、|\overwithdelims|、|\atopwithdelims|或 |\abovewithdelims|% +(见\xrefn{\overwithdelims},\xrefn{\left}页)这些命令之一的参量。 +^^|\overwithdelims| +^^|\atopwithdelims| +^^|\abovewithdelims| +\margin{Footnote deleted} +定界环境也包括在定界环境中使用参量的\refterm{宏}的任何\refterm{参量}。 + +%For example, the left and right +%parentheses are delimiters. +%If you use ^{parentheses} in a delimiter context +%around a formula, \TeX\ makes the parentheses big +%enough to enclose the \refterm{box} that contains the formula (as long as the +%\refterm{fonts:font} you're using have big enough parentheses). +%For example: +%\csdisplay +%$$ \left( a \over b \right) $$ +%| +%yields: +%\centereddisplays $$\left (a \over b \right ) $$ +%Here \TeX\ has made the parentheses big enough to accommodate the fraction. +%But if you write, instead: +%\csdisplay +%$$({a \over b})$$ +%| +%you'll get: +%$$({a \over b})$$ +%Since the parentheses aren't in a delimiter context, +%they are \emph{not} enlarged. +举例说,左圆括号和右圆括号是定界符。 +如果你在定界环境中用^{圆括号}围住一个公式, +\TeX\ 将增加圆括号的大小以让它们框住包含该公式的\refterm{盒子}% +(只要你所使用的\refterm{字体}有足够大的圆括号)。 +例如: +\csdisplay +$$ \left( a \over b \right) $$ +| +得到下面的结果: +\centereddisplays $$\left (a \over b \right ) $$ +这里 \TeX\ 已经调整了圆括号的大小以框住分数。 +但是如果你改为这样写: +\csdisplay +$$({a \over b})$$ +| +将会得到下面的结果: +$$({a \over b})$$ +由于圆括号不在定界环境中,\TeX\ \emph{不会}增加它们的大小。 + +%Delimiters come in pairs: +%an opening delimiter at the left of the subformula +%and a closing delimiter at its right. +%You can explicitly choose a larger height for a +%delimiter with the commands ^|\bigl|, ^|\bigr|, and their +%relatives \ctsref{\bigl}.\footnote +%{\PlainTeX\ defines the various |\big| commands by using |\left| and |\right| +%to provide a delimiter context. It sets the size by +%constructing an empty formula with the desired height.} +%For instance, in order to get the +%displayed formula: +%$$\bigl(f(x) - x \bigr) \bigl(f(y) - y \bigr)$$ +定界符必须成对出现:一个开定界符放在子公式左边, +另一个闭定界符放在子公式右边。 +你可以用 ^|\bigl|,^|\bigr| 及其他相关命令\ctsref{\bigl}直接选择较大号的定界符。 +\footnote +{\PlainTeX\ 定义了各种 |\big| 命令,其中用 |\left| 和 |\right| 提供定界环境。 +它通过构造所需尺寸的空公式来设定尺寸。} +例如,要得到下面的陈列公式: +$$\bigl(f(x) - x \bigr) \bigl(f(y) - y \bigr)$$ + +%\noindent in which the outer parentheses are a little bigger than the inner +%ones, you should write: +\noindent 其中外层的圆括号比内层的稍微大一点,你应该这样写: + +%\csdisplay +%$$\bigl( f(x) - x \bigr) \bigl( f(y) - y \bigr)$$ +%| +\csdisplay +$$\bigl( f(x) - x \bigr) \bigl( f(y) - y \bigr)$$ +| + +%The $22$ \plainTeX\ delimiters, shown at their normal size, are: +%\display{% +%$( \>) \>[ \>] \>\{ \>\} +%\>\lfloor \>\rfloor \>\lceil \>\rceil +%\>\langle \>\rangle \>/ \>\backslash +%\>\vert \>\Vert +%\>\uparrow \>\downarrow \>\updownarrow +%\>\Uparrow \>\Downarrow \>\Updownarrow$} +%^^|)| ^^|)| ^^|[| ^^|]| ^^|\lbrack| ^^|\rbrack| +%^^|\{| ^^|\}| ^^|\lbrace| ^^|\rbrace| +%^^|\lfloor| ^^|\rfloor| ^^|\lceil| ^^|\rceil| +%^^|\langle| ^^|\rangle| ^^|/| ^^|\backslash| +%^^|\vert| ^^|\Vert| +%^^|\uparrow| ^^|\downarrow| ^^|\updownarrow| +%^^|\Uparrow| ^^|\Downarrow| ^^|\Updownarrow| +%\noindent +%Here they are at the largest size provided explicitly by \plainTeX\ +% (the |\Biggl|, |\Biggr|, etc., versions): +%\nobreak\vskip .5\abovedisplayskip +%\display{% +%$\Biggl( \>\Biggr) \>\Biggl[ \>\Biggr] +%\>\Biggl\{ \>\Biggr\} \>\Biggl\lfloor \>\Biggr\rfloor +%\>\Biggl\lceil \>\Biggr\rceil +%\>\Biggl\langle \>\Biggr\rangle +%\>\Biggm/ \>\Biggm\backslash +%\>\Biggm\vert \>\Biggm\Vert +%\>\Biggm\uparrow \>\Biggm\downarrow \>\Biggm\updownarrow +%\>\Biggm\Uparrow \>\Biggm\Downarrow \>\Biggm\Updownarrow$} +%\vskip .5\belowdisplayskip +%\noindent +%The delimiters (except for `|(|', `|)|', and +%`|/|') +%are among the symbols listed on +%pages~\xrefn{\lbrace}--\xrefn{\Uparrow}. +%They are listed in one place on \knuth{page~146}. +\PlainTeX\ 中有 $22$ 个定界符,用它们的自然尺寸显示如下: +\display{% +$( \>) \>[ \>] \>\{ \>\} +\>\lfloor \>\rfloor \>\lceil \>\rceil +\>\langle \>\rangle \>/ \>\backslash +\>\vert \>\Vert +\>\uparrow \>\downarrow \>\updownarrow +\>\Uparrow \>\Downarrow \>\Updownarrow$} +\ifoldeplain ^^|(| ^^|)| ^^|[| ^^|]| ^^|\{| ^^|\}| ^^|/| ^^|\backslash| \fi +^^|\lbrack| ^^|\rbrack| ^^|\lbrace| ^^|\rbrace| +^^|\lfloor| ^^|\rfloor| ^^|\lceil| ^^|\rceil| +^^|\langle| ^^|\rangle| ^^|\vert| ^^|\Vert| +^^|\uparrow| ^^|\downarrow| ^^|\updownarrow| +^^|\Uparrow| ^^|\Downarrow| ^^|\Updownarrow| +\noindent +而用 \plainTeX\ 提供的最大尺寸(|\Biggl|,|\Biggr| 形式)显示如下: +\nobreak\vskip .5\abovedisplayskip +\display{% +$\Biggl( \>\Biggr) \>\Biggl[ \>\Biggr] +\>\Biggl\{ \>\Biggr\} \>\Biggl\lfloor \>\Biggr\rfloor +\>\Biggl\lceil \>\Biggr\rceil +\>\Biggl\langle \>\Biggr\rangle +\>\Biggm/ \>\Biggm\backslash +\>\Biggm\vert \>\Biggm\Vert +\>\Biggm\uparrow \>\Biggm\downarrow \>\Biggm\updownarrow +\>\Biggm\Uparrow \>\Biggm\Downarrow \>\Biggm\Updownarrow$} +\vskip .5\belowdisplayskip +\noindent +这些定界符(`|(|',`|)|' 和 `|/|' 除外)都出现在% +第~\xrefn{\lbrace}--\xrefn{\Uparrow}页的符号列表中。 +它们也都出现在\knuth{第~146~页}的列表中。 + +%A delimiter can belong to any class. +%^^{class//of a delimiter} +%For a delimiter that you enlarge with +%|\bigl|, |\bigr|, etc., the class is determined by the command: +%``opener'' for |l|-commands, ``closer'' for |r|-commands, +%``relation'' for |m|-commands, and ``ordinary symbol'' for |g|-commands, +%e.g., |\Big|. +定界符可以属于任何类。 +^^{类//定界符的类} +对于用 |\bigl| 和 |\bigr| 等命令增加大小的定界符,它所属的类由该命令决定: +|l|-命令属于“开符号”,|r|-命令属于“闭符号”, +|m|-命令属于“关系符号”,|g|-命令比如 |\Big| 属于“普通符号”。 + +%You can obtain a delimiter in two different ways: +%\olist +%\li You can make a character be a delimiter by assigning it a +%nonnegative delimiter code +%\bix^^{delimiter codes} +%(see below) with the ^|\delcode| command (\xref\delcode). +%Thereafter the character acts as a delimiter whenever you use it in a +%delimiter context.\footnote{% +%It's possible to use a character with a nonnegative delimiter code in +%a context where it isn't a delimiter. In this case \TeX\ doesn't perform the +%search; instead it just uses the character in the ordinary way +%(see \knuth{page~156}).} +%\li You can produce a delimiter explicitly with the ^|\delimiter| command +%(\xref\delimiter), in analogy to the way that you can produce an ordinary +%character with the |\char| command or a math character with the |\mathchar| +%command. +%The |\delimiter| command uses the same delimiter codes that are used in a +%|\delcode| table entry, but with an extra digit in front to indicate a +%class. +%It's rare to use |\delimiter| outside of a macro definition. +%\endolist +你可以用两种不同方法得到一个定界符: +\olist +\li 通过用 ^|\delcode| 命令(\xref\delcode )给一个字符赋予非负定界码(见下面), +\bix^^{定界码} +你可以将这个字符变成定界符。 +这样,如果你在定界环境中使用这个字符,它就和定界符一样。\footnote{% +在非定界环境中使用定界码非负的字符也是可以的。 +此时 \TeX\ 将不会执行搜索,而仅仅以普通方式使用该字符(见\knuth{第~156~页})。} +\li 你可以用 ^|\delimiter| 命令(\xref\delimiter )直接生成一个定界符, +这与你用 |\char| 命令生成一个普通字符或者用 |\mathchar| 命令生成一个数学字符类似。 +|\delimiter| 命令使用的定界码和 |\delcode| 表格项用到的一样, +但前面多了一个数字用于标示所属的类。 +除了在宏定义中,其他地方很少用到 |\delimiter| 命令。 +\endolist + +%A delimiter code tells +%\TeX\ how to search for an appropriate output character to represent +%a delimiter. +%The rules for this search are rather complicated +%(see \knuth{pages~156 and 442}). +%A complete understanding of these rules requires knowing +%about the organization of font ^{metrics file}s, a topic that is not just beyond +%the scope of this book but beyond the scope of \texbook\ as well. +定界码(delimiter code)告诉 \TeX\ 如何搜索合适的输出字符来表示一个定界符。 +这些搜索规则相当复杂(见\knuth{第~156 和 442~页}。 +要完全理解这些规则需要熟悉字体^{度量文件}的结构, +而这个主题不仅超出本书范围,也超出 \texbook\ 的范围。 + +%In essence the search works like this. The delimiter code specifies a +%``small'' output character and a ``large'' output character by +%providing a \refterm{font} position and a font \refterm{family} for each +%(see \xref\delcode). +%Using this information, \TeX\ can find (or construct) +%larger and larger versions of the delimiter. \TeX\ first tries +%different sizes (from small to large) +%of the ``small'' character in the ``small'' font +%and then +%different sizes (also from small to large) +%of the ``large'' character in the ``large'' font, +%seeking one whose height plus depth is sufficiently large. +%If none of the characters it finds are large +%enough, it uses the largest one that it finds. +%It's possible that +%the small character, the large character, or both have been left unspecified +%(indicated by a zero in the appropriate part of the delimiter code). +%If only one character +%has been specified, \TeX\ uses that one. If neither has been specified, +%it replaces the delimiter by a space of width ^|\nulldelimiterspace|. +%\eix^^{delimiter codes} +本质上搜索过程是这样运行的。定界码给出了字体\refterm{族}和\refterm{字体}位置, +从而指定了一个“小号”输出字符和一个“大号”输出字符(见\xref\delcode )。 +利用这些信息,\TeX\ 能够找到(或者构造)定界符的越来越大的版本。 +\TeX\ 首先尝试“小号”字体的“小号”字符的不同尺寸(从小到大), +然后是“大号”字体的“大号”字符的不同尺寸(同样是从小到大), +寻找一个高度加上深度足够大的字符。 +如果所找到的字符都不够大,它就用最大那个。 +也有可能小号字符或大号字符,或两者都没指定(即定界码的对应部分为零)。 +如果只指定了一个字符,\TeX\ 使用那一个。如果两个字符都没指定, +它就将定界符替换为宽度为 ^|\nulldelimiterspace| 间隔。 +\eix^^{定界码} + +\endconcept + + +%\concept demerits +\concept 缺陷 + +%\TeX\ uses \refterm{demerits} as a measure of how undesirable a line is +%when it's breaking a paragraph into lines \seeconcept{line break}. +%^^{line breaks//demerits for} +%The demerits of a line are affected both by the \refterm{badness} of the line +%and by \refterm{penalties:penalty} associated with the line. +%^^{badness} +%\TeX's goal in choosing a particular arrangement of lines is to minimize the +%total demerits for the paragraph, which it computes by adding up the demerits +%for the individual lines. +%See \knuth{pages~97--98} for the details of how \TeX\ +%breaks a paragraph into lines. +%\TeX\ does not use demerits when it's choosing page breaks; instead, it uses +%a similar measure known as the ``cost'' of a particular page break. +%\endconcept +\TeX\ 用\refterm{缺陷}(demerits)度量它分段为行时文本行的不良度\seeconcept{断行点}。 +^^{断行//断行的缺陷} +文本行的缺陷同时受该行的\refterm{劣度}和它带有的\refterm{惩罚}影响。 +^^{劣度} +\TeX\ 的目标是合理地分配各行文本,以让段落的总缺陷最小, +其中总缺陷由各行的缺陷加起来。 +参见 \knuth{第~97--98~页}以了解 \TeX\ 分段为行的细节。 +\TeX\ 选择分页点时不使用缺陷;它使用的是被称为分页“代价”的类似概念。 +\endconcept + + +%\concept depth +\concept 深度 + +%^^{boxes//depth of} +%The \defterm{depth} of a \refterm{box} is the distance that the box extends +%below its \refterm{baseline}. +%\endconcept +^^{盒子//盒子的深度} +盒子的\defterm{深度}(depth)是盒子在\refterm{基线}之下的距离。 +\endconcept + + +%\conceptindex{dimensions} +%\concept dimension +\conceptindex{尺寸} +\concept 尺寸 + +%A \defterm{dimension} specifies a distance, that is, a linear measure of +%space. You use dimensions to specify sizes of things, such as the length +%of a line. Printers in English-speaking countries traditionally measure +%distance in points and picas, while printers in continental Europe +%traditionally measure distance in did\^ot points and ciceros. You can +%use these units or others, such as inches, that may be more +%familiar to you. The font-independent +%^{units of measure} that \TeX\ understands are: +\defterm{尺寸}(dimension)指定了一个距离,即对空间的长度测量。 +你用尺寸指定事物的大小,比如文本行的长度。 +英语国家的打印机习惯用点(point)和派卡(pica)来测量距离, +而欧洲大陆的打印机习惯用迪多点( did\^ot points)和西塞罗(cicero)。 +你可以使用这些单位,或者其他你更熟悉的单位,比如英寸。 +\TeX\ 能够识别的与字体无关的^{度量单位}有如下这些: + +%\xrdef{dimdefs} +%\nobreak\vskip\abovedisplayskip +%\halign{\indent\hfil\tt #\qquad&#\hfil\cr +%pt&^{point} (72.27 points = 1 inch)\cr +%pc&^{pica} (1 pica = 12 points)\cr +%bp&big point (72 big points = 1 inch)\cr +%in&^{inch}\cr +%cm&^{centimeter} (2.54 centimeters = 1 inch)\cr +%mm&^{millimeter} (10 millimeters = 1 centimeter)\cr +%dd&^{\didotpt} (1157 {\didotpt}s = 1238 points)\cr +%cc&^{cicero} (1 cicero = 12 {\didotpt}s)\cr +%sp&^{scaled point} (65536 scaled points = 1 point)\cr +%} +%\vskip\belowdisplayskip +\xrdef{dimdefs} +\nobreak\vskip\abovedisplayskip +\halign{\indent\hfil\tt #\qquad&#\ \hfil&#\qquad\hfil&#\hfil\cr +pt& point & ^{点} & 72.27 points = 1 inch\cr +pc& pica & ^{派卡} &1 pica = 12 points\cr +bp& big point & ^{大点} & 72 big points = 1 inch\cr +in& inch & ^{英寸} &\cr +cm& centimeter & ^{厘米} & 2.54 centimeters = 1 inch\cr +mm& millimeter & ^{毫米} & 10 millimeters = 1 centimeter\cr +dd& \didotpt & ^{迪多点} & 1157 {\didotpt}s = 1238 points\cr +cc& cicero & ^{西塞罗} & 1 cicero = 12 {\didotpt}s\cr +sp& scaled point & ^{缩点} & 65536 scaled points = 1 point\cr +} +\vskip\belowdisplayskip + +%Two additional units of measure are associated with every font: `^|ex|', +%a vertical measure usually about the height of the letter `x' +%in the font, and `^|em|', a +%horizontal measure usually equal to the point size of the font and +%about the width of the letter `M' in the font. Finally, +%\TeX\ provides three ``infinite'' units of measure: `^|fil|', `^|fill|', and +%`^|filll|', in increasing order of~strength. +还有两个与字体相关的度量单位: +`^|ex|' 是一个纵向尺寸,通常与字体中字母 `x' 的高度相关; +`^|em|' 是一个横向尺寸,通常等于字体的大小,与字体中字母 `M' 的宽度相关。 +最后,\TeX\ 还提供了三个“无限的”度量单位:`^|fil|',`^|fill|' 和 `^|filll|', +它们的强度的阶依次增大。 + +%A dimension is written as a ^{factor}, i.e, a multiplier, +%followed by a unit of measure. +%^^{units of measure} +%The factor can be either a whole \refterm{number} or +%a \refterm{decimal constant} containing a decimal point +%or decimal comma. +%The factor can be preceded by a plus or minus sign, so a dimension +%can be positive or negative. +%^^{dimensions//negative} +%The unit of measure must be there, even if the number is +%zero. Spaces between the number and the unit of measure are permitted +%but not required. You'll find a precise definition of a +%dimension on \knuth{page~270}. Here are some examples of dimensions: +尺寸可以用一个^{因子},即乘数,后面加上度量单位来表示。 +^^{度量单位} +因子可以是一个整\refterm{数},或是一个带有小数点或小数逗号的\refterm{小数}。 +因子之前可以带有加号或减号,因此尺寸可正可负。 +^^{尺寸//负尺寸} +即使数值为零,度量单位也必须写上。数值和度量单位之间可以有也可以没有空格。 +在\knuth{第~270~页}中有尺寸的精确定义。下面这些是尺寸的例子: + +%\csdisplay +%5.9in 0pt -2,5 pc 2fil +%| +%The last of these represents a first-order infinite distance. +\csdisplay +5.9in 0pt -2,5 pc 2fil +| +其中最后一个尺寸表示一个一阶无限距离。 + +%An infinite distance outweighs any finite distance or any weaker infinite +%distance. If you add |10in| to |.001fil|, you get |.001fil|; if you add +%|2fil| to |-1fill| you get |-1fill|; and so forth. +%\TeX\ accepts infinite distances +%only when you are specifying the \refterm{stretch} and \refterm{shrink} +%of \refterm{glue}. +无限距离远远大于任何有限距离或者任何低阶的无限距离。 +如果你给 |.001fil| 加上 |10in|,你得到 |.001fil|; +如果你给 |-1fill| 加上 |2fil|,你得到 |-1fill|,依此类推。 +只有在指定\refterm{粘连}的\refterm{伸长量}和\refterm{收缩量}时, +才可以使用无限距离。 + +%\TeX\ multiplies all dimensions in your document by a +%\refterm{magnification} factor $f/1000$, +%where $f$ is the value of the ^|\mag| parameter. +%^^{magnification} +%Since the default value of +%|\mag| is $1000$, the normal case is that your document is +%typeset just as specified. You can specify a dimension as it will be +%measured in the final document independent of magnification by putting +%`|true|' in front of the unit. For instance, `|\kern 8 true pt|' +%produces a kern of $8$ points whatever the magnification. +%\endconcept +\TeX\ 对文档中的所有尺寸都乘以一个\refterm{放大率}因子$f/1000$, +其中 $f$ 是 ^|\mag| 参数的值。 +^^{放大率} +由于 |\mag| 的默认值为 $1000$,在一般情形下文档是照常排版的。 +你可以指定一个与放大率无关的最终文档尺寸, +只要在度量单位前加上 `|true|'。 +例如,`|\kern 8 true pt|' 生成了一个与放大率无关的 $8$ 点大小的紧排。 +\endconcept + + +%\concept {display math} +\concept {陈列公式} + +%The term \defterm{display math} refers to a math formula that \TeX\ +%places on a line by itself with extra space above and below +%so as to set it off from the surrounding text. +%A display math formula is enclosed by `|$$|'s. +%\ttidxref{$$} +%\TeX\ reads display math in display math \refterm{mode}. +%\endconcept +\defterm{陈列公式}(display math)表示在单独一行显示的公式; +\TeX 在陈列公式上边和下边添加额外间隔,以隔开周围文本。 +陈列公式两边用 `|$$|' 括起来。 +\ifoldeplain\ttidxref{$$}\fi +\TeX\ 在陈列数学\refterm{模式}中读取陈列公式。 +\endconcept + + +\bookmark{2}{以E开头} +%\concept{escape character} +\concept{转义符} + +%An \defterm{escape character} introduces a control sequence. The escape +%character in \refterm{\plainTeX} is the backslash (|\|). +%\indexchar \ +%You can change the escape character from $c_1$ to $c_2$ +%by reassigning the category codes of $c_1$ and $c_2$ +%with the ^|\catcode| command \ctsref{\catcode}. +%You can also define additional escape characters similarly. +%If you want to typeset material containing literal escape characters, you must +%either +%(a) define a control sequence that stands for the printed escape character or +%(b) temporarily +%disable the escape character by changing its category code, using the +%method shown on \xrefpg{verbatim}. The definition: +\defterm{转义符}(escape character)引入一个控制序列。 +\refterm{\PlainTeX} 的转义符是反斜杠(|\|)。 +\indexchar \ +利用 ^|\catcode| 命令\ctsref{\catcode}重新定义 $c_1$ 和 $c_2$ 的类别码, +你可以将转义符从 $c_1$ 改为 $c_2$。类似地你可以定义额外的转义符。 +如果你想排版包含字面转义符的材料,你必须或者 +(a) 定义一个表示打印转义符的控制序列,或者 +(b) 使用\xrefpg{verbatim}介绍的方法,改变转义符的类别码以临时取消转义。 +% 译注:这里给出的页码似乎有误。 +下述定义: + +%\csdisplay +%\def\\{$\backslash$} +%| +%is one way of creating a control sequence that stands for `$\backslash$' +%(a backslash typeset in a math font). +\csdisplay +\def\\{$\backslash$} +| +是一种生成表示 `$\backslash$' 的控制序列的方法(用数学字体排版反斜杠)。 + +%You can use the ^|\escapechar| parameter \ctsref{\escapechar} to specify +%how the escape character is represented in synthesized control sequences, +%e.g., those created by |\string| and |\message|. +% +%\endconcept +对于合成控制序列,比如那些由 |\string| 和 |\message| 生成的控制序列, +你可以用 ^|\escapechar| 参数\ctsref{\escapechar}指定其中的转义符用哪个字符表示。 +\endconcept + + +\bookmark{2}{以F开头} +%\concept family +\concept 族 + +%A \defterm{family} is a group of three related \refterm{fonts:font} used +%when \TeX\ is in \refterm{math mode}. +%^^{fonts//families of} +%Outside of math mode, families +%have no effect. The three fonts in a family are used for normal symbols +%(\refterm{text size}), subscripts and superscripts (\refterm{script +%size}), and sub-subscripts, super-superscripts, etc.\ +%(\refterm{scriptscript size}). +%^^{text size} +%^^{script size} +%^^{scriptscript size} +%For example, the numeral `|2|' set in +%these three fonts would give you `$2$', `$\scriptstyle 2$', and +%`$\scriptscriptstyle 2$' (in \plainTeX). +%Ordinarily you would set up the +%three fonts in a family as different point sizes of the same typeface, +%but nothing prevents you from using different typefaces for the three +%fonts as well or using the same font twice in a family. +\defterm{族}(family)是用于\refterm{数学模式}的,由三个相关\refterm{字体}组成的集合。 +^^{字体//字体族} +在数学模式之外,族没有任何作用。 +一个族的三个字体分别用于正常符号(\refterm{文本尺寸}), +上标和下标(\refterm{标号尺寸}),以及次上标和次下标等(\refterm{小标号尺寸})。 +^^{文本尺寸} +^^{标号尺寸} +^^{小标号尺寸} +例如,数字 `|2|' 用这三个字体分别显示为 `$2$'、`$\scriptstyle 2$' 和 +`$\scriptscriptstyle 2$'(在 \plainTeX\ 中)。 +通常你会将一个族的三个字体设定为相同字型且不同点数, +但没人阻止你将这三个字体也设定为不同字型,或者将其中两个字体设定为完全一样。 + +%{\tighten +%\TeX\ provides for up to sixteen families, numbered $0$--$15$. For +%example, family $0$ in \refterm{\plainTeX} consists of $10$-point roman +%for text, $7$-point roman for script, and $5$-point roman for +%scriptscript. +%^^{\plainTeX//font families in} +%\PlainTeX\ also defines family $1$ to consist of math +%italic fonts and reserves families $2$ and $3$ for ^{special symbols} and +%^{math extensions} respectively.\footnote{Families $2$ and $3$ are special +%in that their font metric files must include parameters for math +%spacing.} If you need to define a family for yourself, you should use +%the ^|\newfam| command \ctsref{\@newfam} to get the number of a family that +%isn't in use, and the ^|\textfont|, ^|\scriptfont|, +%and ^|\scriptscriptfont| commands \ctsref{\scriptscriptfont} +%to assign fonts to that family. +%\par} +% +%\endconcept +\TeX\ 提供多达十六个字体族,它们用 $0$--$15$ 编号。 +比如在\refterm{\plainTeX} 中,第 $0$ 族由用于文本尺寸的 $10$ 点罗马字体, +用于标号尺寸的 $7$ 点罗马字体,以及用于小标号尺寸的 $5$ 点罗马字体组成。 +^^{\plainTeX//其中的字体族} +\PlainTeX\ 还将第 $1$ 族定义为由数学意大利字体组成, +并将第 $2$ 族和第 $3$ 族分别保留给^{特殊符号}和^{数学扩展符号}。 +\footnote{第 $2$ 族和第 $3$ 族的特殊之处在于,它们的字体度量文件必须包含数学间隔参数。} +\footnote{译注:第 $4$--$7$ 族分别定义为 |\itfam|、|\slfam|、|\bffam| 和 |\ttfam|。} +如果你需要自己定义字体族,你应该使用 ^|\newfam| 命令\ctsref{\@newfam}获取未使用的族编号, +再用 ^|\textfont|、^|\scriptfont| 和 ^|\scriptscriptfont| +命令\ctsref{\scriptscriptfont}分别设定该族的各个字体。 +\endconcept + + +%\conceptindex{files} +%\concept file +\concept 文件 + +%A \defterm{file} is a stream of information that \TeX\ interprets or +%creates. Files are managed by the ^{operating system} that supervises your +%\TeX\ run. \TeX\ deals with files in four different contexts: +%\olist +%\li A ``^{source file}'' is one that \TeX\ reads with its ``eyes'' +%\seeconcept{\anatomy} and interprets according to its ordinary rules. +%Your primary input file---the one you specify after `|**|' or +%on the command line when +%you invoke \TeX---is a source file, and so is any file that you call for +%with an ^|\input| command \ctsref \input. +\defterm{文件}(file)是 \TeX\ 解释或者创建的信息流。 +文件由监督 \TeX\ 运行的^{操作系统}管理。 +\TeX\ 在四种不同的背景中用到文件: +\olist +\li “^{源码文件}”是 \TeX\ “眼睛”读取\seeconcept{\anatomy},并根据它的一般法则解释的文件。 +你的主要输入文件——即调用 \TeX\ 时在 `|**|' 之后或者在命令行中指定的文件% +——是一个源码文件,你用 ^|\input|命令\ctsref \input 请求的任何文件同样也是。 + +%\li A ``^{result file}'' is one that contains the results of +%running \TeX. A \TeX\ run creates two result files: the +%\dvifile\ and the log file. +%^^{\dvifile//as a result file} +%^^{log file//as a result file} +%The \dvifile\ contains the information needed to print your document; +%the +%log file contains a record of what happened during the run, including any +%error messages that \TeX\ generated. +%If your primary source file is named +%|screed.tex|, your \dvifile\ and log file will be named |screed.dvi| +%and |screed.log|.\footnote{This is the usual convention, but +%particular implementations of \TeX\ are free to change it.} +\li “^{结果文件}”是包含 \TeX\ 运行结果的文件。 +\TeX\ 运行后产生两个结果文件:\dvifile 和日志文件。 +^^{\dvifile//作为结果文件} +^^{日志文件//作为结果文件} +\dvifile 包含打印文档所需的信息,而日志文件包含运行记录,包括 \TeX\ 生成的任何错误信息。 +若主要输入文件的名称是 |screed.tex|,则 \dvifile 和日志文件的名称分别是 +|screed.dvi| 和 |screed.log|。\footnote{这是通常的约定, +但特定的 \TeX\ 实现可以自由地修改它。} + +%\li To read from a file with the ^|\read| +%command \ctsref{\read} you need to associate the file with an input stream. +%^^{input streams//reading with \b\tt\\read\e} +%You can have up to $16$ input streams active +%at once, numbered $0$--$15$. +%The |\read| command reads a single line and makes it the value of a +%designated \refterm{control sequence}, so reading with +%|\read| is very different from reading with ^|\input| (which brings in an +%entire file). +%\TeX\ takes any input stream number not between +%$0$ and $15$ to refer to the terminal, +%so `|\read16|', say, reads the next line that you type at the terminal. +\li 要用 ^|\read| 命令\ctsref{\read}读取一个文件,你需要将这个文件和一个输入流关联起来。 +^^{输入流//用 \b\tt\\read\e 读取} +你最多可以有 $16$ 个同时活动的输入流,它们以 $0$--$15$ 编号。 +|\read| 命令读取一行并把它作为指定\refterm{控制序列}的值, +因此用 |\read| 读取和用 ^|\input| 读取是大不相同的(后者读入整个文件)。 +\TeX\ 将编号不在 $0$ 和 $15$ 之间的输入流视为终端, +因此,比如说 `|\read16|',将读取你在终端中键入的下一行文本。 + +%\li To write to a file with the |\write| +%command \ctsref \write\ you need to associate the file +%with an output stream. +%^^|\write//output stream for| +%^^{output streams} +%You can have up to $16$ output streams active +%at once, numbered $0$--$15$. +%Input and output streams are independent. +%Anything sent to an output stream with a negative number goes to the log +%file; anything sent to an output stream with a number greater than $15$ +%goes both to the log file and to the terminal. +%Thus `|\write16|', say, writes a line on the terminal and also sends +%that line +%to the log~file. +% +%\endolist +\li 要用 |\write| 命令\ctsref \write 写入一个文件,你需要将这个文件和一个输出流关联起来。 +^^|\write//用于输出流| +^^{输出流} +你最多可以有 $16$ 个同时活动的输出流,它们以 $0$--$15$ 编号。输入流和输出流是相互独立的。 +任何送到编号为负数的输出流的东西,将被写到日志文件中; +而任何送到编号大于 $15$ 的输出流的东西,将同时被写到日志文件和终端中。 +因此,比如说 `|\write16|',将在终端中写上一行文本并将它送到日志文件中。 +\endolist + +%You must open a stream file before you can use it. +%An input stream file is opened with an ^|\openin| +%command \ctsref \openin\ and an output stream file is opened with an +%^|\openout| command \ctsref\openout. +%For tidiness +%you should close a stream file when you're done with it, although +%\TeX\ will do that at the end of the run if you don't. +%The two commands for closing a stream file are ^|\closein| \ctsref\closein\ +%and ^|\closeout| \ctsref\closeout. +%An advantage of closing a stream when +%you're done with it is that you can then reuse the stream for a different file. +%Doing this can be essential when you're reading a long sequence of files. +在使用流文件之前,你必须先打开它。输入流文件用 ^|\openin| 命令\ctsref \openin 打开, +而输出流文件用 ^|\openout| 命令\ctsref\openout 打开。 +为保持整洁,你应该在完成后关闭流文件; +然而即使你不这么做,\TeX\ 在运行结束时也会帮你关闭它。 +用于关闭流文件的两个命令分别是 ^|\closein|\ctsref\closein 和 ^|\closeout|\ctsref{\closeout}。 +在完成后关闭流文件的优点是,你可以把它重新用到另一个文件去。 +在读取一长串文件时,这样做是很有必要的。 + +%Although you can assign numbers yourself to input and output streams, +%it's better to do it with the ^|\newread| and +%^|\newwrite| \ctsref{\@newwrite} commands. +%You can have more than one stream associated with a particular file, +%but you'll get (probably undiagnosed) garbage unless all of the streams +%are input streams. Associating more than one stream with an input file +%can be useful when you want to use the same input file for two different +%purposes. +虽然你可以自己给输入流和输出流编号, +但最好还是用 ^|\newread| 和 ^|\newwrite|\ctsref{\@newwrite}命令处理流编号。 +一个特定文件可以关联到多个流, +但除非所有流都是输入流,否则你将会得到(也许是原因不明的)垃圾。 +当你想把同个输入文件用于两个不同目的时,一个输入文件关联多个流就很有用。 + +%\TeX\ ordinarily defers the actions of opening, writing to, or closing +%an output stream until it ships out a page with ^|\shipout| +%(see \knuth{page~227} +%for the details). This behavior applies even to messages written to the +%terminal with |\write|. But you can get \TeX\ to perform an action +%on an output stream immediately by preceding the action command with +%^|\immediate| \ctsref\immediate. For example: +%\csdisplay +%\immediate\write16{Do not pass GO!! Do not collect $200!!} +%| +%\endconcept +一般地,\TeX\ 会推迟输出流的打开、写入和关闭操作, +直到它用 ^|\shipout|送出一个页面(详情可见\knuth{第~227~页}。 +甚至用 |\write| 输出消息到终端时也是这样的。 +然而,通过在操作命令之前加上 ^|\immediate|\ctsref\immediate , +你可以让 \TeX\ 立即执行输出流操作。比如: +\csdisplay +\immediate\write16{Do not pass GO!! Do not collect $200!!} +| +\endconcept + + +%\conceptindex{file names} +%\concept {file name} +\concept {文件名} + +%A \defterm{file name} names a +%\refterm{file} that is known to the ^{operating system} +%that in turn +%supervises your \TeX\ run. The syntax of a file name does \emph{not} +%follow the usual rules of \TeX\ syntax, and in fact it is different +%in different implementations of \TeX. +%In particular, most \TeX\ implementations consider a file name to be +%terminated by a blank or an end of line. Thus \TeX\ is likely to +%misinterpret `|{\input chapter2}|' +%by taking the right brace as part of the file name. +%As a general rule, you should follow a file name by a blank or the +%end of the line as in `|{\input chapter2!visiblespace}|'. +\defterm{文件名}(file name)是\refterm{文件}在监督 \TeX\ 运行的^{操作系统}中的名称。 +文件名的语法\emph{并不}遵循 \TeX\ 语法的一般规则, +而且实际上在不同的 \TeX\ 实现中它们各不相同。 +特别地,大多数 \TeX\ 实现都认为文件名在空格符或行尾符处结束。 +因此 \TeX\ 有可能曲解 `|{\input chapter2}|',将右括号视为名称的一部分。 +一般来说,你应该在文件名后面添加一个空格符或行尾符, +就像 `|{\input chapter2!visiblespace}|' 这样。 + +\endconcept + + +%\eject +%\conceptindex{fonts} +%\concept font +\concept 字体 + +%A \defterm{font} in \TeX\ is a collection of up to $256$ output +%characters, usually having the same typeface design, style (roman, +%italic, bold, condensed, etc.), +%and point size.\footnote{\PlainTeX\ uses a special +%font for constructing ^{math symbols} in which the characters have +%different sizes. Other special fonts are often useful for applications +%such as typesetting ^{logos}.} The ^{Computer Modern fonts} that +%generally come with \TeX\ have only $128$ characters. The colophon on +%the last page of this book describes the typefaces that we used to set +%this book. +在 \TeX\ 中,\defterm{字体}(font)是由不超过 $256$ 个输出字符组成的集合, +这些字符通常有相同的设计、样式(罗马体、意大利体、粗体、窄体等)和点数。 +\footnote{\PlainTeX\ 用于构造^{数学符号}的特殊字体包含点数不同的字符。 +在排版^{标识}(logo)等应用中也经常使用其他的特殊字体。} +\TeX\ 自带的^{计算机现代字体}一般只有 $128$ 个字符。 +在本书最后面的书尾页中描述了排版本书所用的字体。 + +%For instance, here is the alphabet in the Palatino Roman $10$ point font: +%^^{Palatino fonts} +%\vskip\abovedisplayskip{\narrower\tenpal +%\noindent ABCDEFGHIJKLMNOPQRSTUVWXYZ\hfil\break +%abcdefghijklmnopqrstuvwxyz\par +%}\vskip\belowdisplayskip +%\noindent +%And here it is in the Computer Modern Bold Extended $12$ +%point font: +%^^{Computer Modern fonts} +%\vskip\abovedisplayskip{\narrower\font\twelvebf=cmbx12\twelvebf +%\noindent ABCDEFGHIJKLMNOPQRSTUVWXYZ\hfil\break +%abcdefghijklmnopqrstuvwxyz\par +%}\vskip\belowdisplayskip +%The characters in a font are numbered. +%The numbering usually agrees with the ^{\ascii} numbering +%for those characters that exist in the \ascii\ character set. +%The code table for each font indicates what the character +%with code $n$ looks like in that font. +%Some fonts, such as the ones used for mathematical symbols, have no +%letters at all in them. You can produce a \refterm{box} containing the +%character numbered $n$, typeset in the current font, by writing `|\char |$n$' +% \ctsref{\char}. +举个例子,这里是 $10$ 点 Palatino 罗马字体的字母表: +^^{Palatino 字体} +\vskip\abovedisplayskip{\narrower\tenpal +\noindent ABCDEFGHIJKLMNOPQRSTUVWXYZ\hfil\break +abcdefghijklmnopqrstuvwxyz\par +}\vskip\belowdisplayskip +\noindent +而这里是 $12$ 点计算机现代粗体扩展字体的字母表: +^^{计算机现代字体} +\vskip\abovedisplayskip{\narrower\font\twelvebf=cmbx12\twelvebf +\noindent ABCDEFGHIJKLMNOPQRSTUVWXYZ\hfil\break +abcdefghijklmnopqrstuvwxyz\par +}\vskip\belowdisplayskip +字体中的字符都是编好号的。对于在 \ascii\ 字符表中存在的字符, +它们的编号一般与其 ^{\ascii} 编码一致。 +每个字体的编码表指明该字体的第 $n$ 个字符是怎样的。 +有些字体,比如那些用于数学符号的字体,根本不包含任何字母字符。 +你可以用 `|\char |$n$'\ctsref{\char}生成包含第 $n$ 个字符的盒子, +该字符用当前字体排版。 + +%In order to use a font in your document, +%you must first name it with a control sequence and load it. Thereafter you +%can select it by typing +%that control sequence whenever you want to use it. +%\PlainTeX\ provides a number of fonts that are already named and~loaded. +要在文档中使用某个字体,你必须先用控制序列给它命名再载入它。 +此后,在需要用到它的地方,你就可以键入该控制序列来选择它。 +\PlainTeX\ 提供了若干已经命名和载入的字体。 + +%You name and load a font as a single operation, using a +%command such as `|\font\twelvebf=cmbx12|'. Here `|\twelvebf|' is the +%control sequence that you use to name the font +%and `|cmbx12|' identifies the font metrics file +%|cmbx12.tfm| +%in your computer's file system. +%You then can start to use the font by typing +%`|\twelvebf|'. After that, the font will be in effect until +%either (a)~you select another font or (b)~you terminate the +%\refterm{group}, if any, in which you started the +%font. For example, the input: +你可以用像 `|\font\twelvebf=cmbx12|' 这样的命令在同一个操作中命名并载入字体。 +这里的 `|\twelvebf|' 是用于命名该字体的控制序列, +而 `|cmbx12|' 表示计算机文件系统中的字体度量文件 |cmbx12.tfm|。 +现在你可以通过键入 `|\twelvebf|' 开始使用这个字体。 +在此之后,这个字体将一直生效,直到 +(a)~你选择了另一个字体,或者 (b)~你结束了\refterm{编组}, +如果在开始字体时就位于这个编组中。例如下面的输入: + +%\csdisplay +%{\twelvebf white rabbits like carrots} +%| +%will cause the |cmbx12| font to be in effect just for the +%text `|white rabbits like carrots|'. +\csdisplay +{\twelvebf white rabbits like carrots} +| +将使得 |cmbx12| 字体只对文本 `|white rabbits like carrots|' 生效。 + +%You can use \TeX\ with fonts other than +%Computer Modern (look at the example on \xrefpg{palatino} and +%at the page headers). +%The files for such fonts need to be +%installed in your computer's file system in a place where \TeX\ can find +%them. \TeX\ and its companion programs generally need two files for each font: +%one to give its metrics (|cmbx12.tfm|, +%^^{\tfmfile} +%for example) and another to +%give the shape of the characters (|cmbx12.pk|, for example). +%\TeX\ itself uses only the metrics +%file. Another program, the device driver, +%^^{device drivers} +%converts the \dvifile\ +%^^{\dvifile//converted by driver} +%produced by \TeX\ to a form that your printer +%or other output device can handle. The driver +%uses the shape file (if it exists). +在 \TeX\ 中你可以使用与计算机现代不同的字体(见\xrefpg{palatino}的例子以及页眉)。 +这些字体的文件需要安装在计算机文件系统的某个 \TeX\ 能找到的位置中。 +对每个字体,\TeX\ 及相关程序一般需要两个文件: +一个给出各字符的度量(比如 |cmbx12.tfm|), +^^{\tfmfile} +另一个给出各字符的形状(比如 |cmbx12.pk|)。 +\TeX\ 本身仅用到度量文件。另一个程序,设备驱动程序, +^^{设备驱动} +把 \TeX\ 生成的 \dvifile 转换为能被打印机或其他输出设备处理的格式。 +^^{\dvifile//由驱动程序转换} +设备驱动程序要用到形状文件(如果该文件存在)。 + +%The font metrics file contains the information that \TeX\ needs in +%order to allocate space for each typeset character. +%Thus it includes the size of each character, the ligatures and +%kerns that pertain to sequences of adjacent characters, and so on. +%What the metrics file +%\emph{doesn't} include is any information about the shapes +%of the characters in the font. +字体度量文件包含 \TeX\ 对每个排版字符所分配空间的信息。 +即它包含各个字符的尺寸,对相邻字符的连字和紧排,等等。 +字体度量文件\emph{并不}包含关于其字符的形状的任何信息。 + +%{\tighten +%The shape (pixel) file \xrdef{shape} +%^^{pixel file}^^{shape file} +%may be in any of several +%formats. The extension part of the name (the part after the dot) +%tells the driver which format the shape file is in. For example, +%|cmbx12.pk| ^^{\pkfile} might be the shape file for font |cmbx12| in +%packed format, while |cmbx12.gf| ^^{\gffile} might be the shape file +%for font |cmbx12| in generic font format. +%A shape file may not be needed for a font that's resident in your +%output device. +%\par} +{\tighten +形状(像素)文件\xrdef{shape}可以有多种格式。 +^^{像素文件}^^{轮廓文件} +文件的扩展名(点号之后部分)告诉驱动文件该形状文件的格式。 +例如,|cmbx12| 字体的形状文件 可以是压缩格式的 |cmbx12.pk| ^^{\pkfile}, +也可以是一般格式的 |cmbx12.gf| ^^{\gffile}。 +对存在于输出设备中的字体,其形状文件也许不是必需的。 +\par} + +\endconcept + + +%\conceptindex{footers} +%\concept footer +\concept 页脚 + +%A \defterm{footer} is material that \TeX\ puts at the bottom of every page, +%below the text of that page. +%The default footer in \plainTeX\ is a centered page number. +%Ordinarily a footer consists of a single line, which you can set by +%assigning a token list to ^|\footline| \ctsref\footline. +%See \xrefpg{bighead} for a method of producing multiline footers. +\defterm{页脚}(footer)是放在每个页面底部,位于正文之下的素材。 +在 \plainTeX\ 中默认页脚是居中的页码。通常页脚只包含一行文本, +你可以通过给 ^|\footline|\ctsref\footline 指定一个记号列来设定页脚。 +请参阅\xrefpg{bighead}中介绍的生成多行页脚的方法。 + +\endconcept + +%k \vskip 0pt plus 2pt % to solve page break problem + +%\concept {format file} +\concept {格式文件} + +%{\tighten +%A \defterm{format file} is a file that contains an image of +%\TeX's memory in a form in which it can be reloaded quickly. +%A format file can be created with the ^|\dump| command \ctsref\dump. +%The image contains a complete record +%of the definitions (of \refterm{fonts:font}, \refterm{macros:macro}, etc.) +%that were present when the dump took place. +%By using ^|virtex|, a special ``virgin'' form of \TeX, +%you can then reload the format file at high speed and +%continue in the same state that \TeX\ was in at the time of the dump. +%The advantage of a format file over an ordinary input +%file containing the same information is that \TeX\ can load it much +%faster. +%\par} +\defterm{格式文件}(format file)是一个包含 \TeX\ 的内存映像的文件, +该文件以一种能够快速重新载入的形式存储。 +格式文件可以用 ^|\dump| 命令\ctsref\dump 建立。 +映像文件包含转储发生时存在的(\refterm{字体}和\refterm{宏}等)定义的完整记录。 +然后利用 ^|virtex|,\TeX\ 的一种特别的“原生”形式, +你可以快速地重新载入该格式文件,并从 \TeX\ 转储时所在的状态中继续。 +相对于包含相同信息的普通输入文件,格式文件的优点是 \TeX\ 能够更快地载入它。 + +%Format files can only be created by ^|initex|, another special +%form of \TeX\ intended just for that purpose. +%Neither |virtex| nor |initex| has any +%facilities other than the primitives built into the +%\TeX\ program itself. +格式文件仅可以用 ^|initex| 建立,|initex| 是专用于此目的的另一种 \TeX\ 形式。 +除了内建于 \TeX\ 本身的原始命令,|virtex| 和 |initex| 均不包含其他任何命令。 + +%A ^{preloaded} form of \TeX\ is one that has a format file already +%loaded and is ready to accept user input. +%The form of \TeX\ that's called |tex| +%often has the \plainTeX\ definitions preloaded. +%(\PlainTeX\ is ordinarily available in two other forms as well: +%as a format file and as a \TeX\ source file. +%In some environments, |tex| is equivalent to calling |virtex| +%and then loading |plain|.) +%Creating preloaded forms of \TeX\ requires a special program; +%it cannot be done using only the facilities of \TeX\ itself. +\TeX\ 的^{预载入}形式是一种已载入某个格式文件 ,并准备接收用户输入的形式。 +称为 |tex| 的 \TeX\ 形式通常都预载入了 \plainTeX\ 定义。% +(\PlainTeX\ 通常还以另外两种形式出现:作为格式文件与作为\TeX\ 源码文件。 +在某些环境中,|tex| 等价于调用 |virtex| 然后载入 |plain|。)% +仅仅用 \TeX\ 本身无法建立 \TeX\ 的预载入形式,它需要一个特别的程序。 + +\endconcept + +\bookmark{2}{以G开头} +%\concept global +\concept 全局的 + +%A \defterm{global} definition is effective +%until the end of the +%document or until it is overridden by another definition, +%even when it occurs within a \refterm{group}. +%Thus a global definition is unaffected by group boundaries. +%You can make any definition global by prefixing it with the |\global| +%command \ctsref{\global} unless ^|\globaldefs| \ctsref\globaldefs{} +%is negative. +%^^|\global| +一个\defterm{全局的}(global)定义在文档结束前始终有效, +即使它出现在一个\refterm{编组}里面(除非它被其他定义覆盖)。 +即全局定义不受编组范围的影响。 +要让任何定义成为全局的,你可以在它前面加上 |\global| 命令\ctsref{\global}, +除非 ^|\globaldefs|\ctsref\globaldefs{} 为负值。 +^^|\global| + +%There's a special way of making a \refterm{macro} definition global. +%^^{macros//global} +%Normally you define a macro using either the |\def| command +%or the |\edef| command \ctsref{\edef}. +%^^|\edef//making global| +%^^|\def//making global| +%If you use |\gdef| or |\xdef| +%instead of |\def| and |\edef| respectively, the macro definition will +%be global. That is, `^|\gdef|' is equivalent to `|\global\def|' and +%`^|\xdef|' is equivalent to `|\global\edef|'. +%\endconcept +还有种特殊方法将一个\refterm{宏}定义为全局的。 +^^{宏//全局宏} +通常你用 |\def| 命令或者 |\edef| 命令\ctsref{\edef}来定义一个宏。 +^^|\edef//变成全局的| +^^|\def//变成全局的| +如果你将 |\def| 和 |\edef| 分别换为 |\gdef| 和 |\xdef|, +这个宏定义就会是全局的。也就是说,`^|\gdef|'等价于`|\global\def|', +而`^|\xdef|'等价于`|\global\edef|'。 +\endconcept + + +%\concept glue +\concept 粘连 + +%\bix^^{stretch} +%\bix^^{shrink} +%\defterm{Glue} is blank space that can stretch or shrink. +%Glue gives \TeX\ the flexibility that it needs in order to produce +%handsome +%documents. Glue comes in two flavors: horizontal glue and vertical glue. +%Horizontal glue occurs within \refterm{horizontal lists:horizontal list}, +%while vertical glue occurs within \refterm{vertical lists:vertical list}. +%^^{horizontal lists} +%^^{vertical lists} +%You +%can produce a glue item either implicitly, e.g., with an interword space, or +%explicitly, e.g., with the ^|\hskip| command. +%^^{spaces//interword} +%\TeX\ itself produces many glue +%items as it typesets your document. +%We'll just describe horizontal glue---vertical glue is analogous. +\bix^^{伸长量} +\bix^^{收缩量} +\defterm{粘连}(glue)是可以伸长或者收缩的空白间距。 +粘连给 \TeX\ 提供了生成漂亮文档所需的灵活性。 +粘连有两种类型:水平粘连和竖直粘连。 +水平粘连出现在\refterm{水平列表}中,而竖直粘连出现在\refterm{竖直列表}中。 +^^{水平列表} +^^{竖直列表} +你可以隐式地生成一个粘连项,比如用单词间空格, +或者显式地生成一个粘连项,比如用 ^|\hskip| 命令。 +^^{间隔//单词间距} +在排版文档时 \TeX\ 本身也生成很多粘连项。 +这里我们只描述水平粘连——竖直粘连与之类似。 + +%When \TeX\ assembles a list of boxes and glue into a larger +%unit, +%^^{boxes//glue with} +%it adjusts the size of the glue to meet the space requirements of the +%larger unit. For instance, \TeX\ ensures that the ^{right margin} of a page +%is uniform by adjusting the horizontal glue within lines. +%Similarly, it ensures that different pages have the +%same ^{bottom margin} +%by adjusting the glue between blocks of text such as paragraphs and +%math displays +%(where the change is least likely to be conspicuous). +在 \TeX\ 将一系列盒子和粘连组装成一个较大单元时, +^^{盒子//盒子与粘连} +它调整各个粘连的尺寸以适合较大单元的空间要求。 +例如,为了让页面的^{右边距}保持一致,\TeX\ 调整了各行的水平粘连。 +类似地,为了让各页的^{下边距}保持相同, +它调整了各个文本块比如段落和陈列公式之间的粘连% +(这种修改是最不可能引人注意的)。 + +%A glue item has a natural space---the size it ``wants to be''. Glue +%also has two other attributes: its \refterm{stretch} and its +%\refterm{shrink}. You can produce a specific amount of horizontal glue +%with the ^|\hskip| \refterm{command} \ctsref{\hskip}. The command +%|\hskip 6pt plus 2pt minus 3pt| +%produces a horizontal glue item whose natural +%size is $6$ points, whose stretch is $2$ points, and whose shrink is +%$3$ points. Similarly, you can produce a specific amount of vertical +%glue with the ^|\vskip| command \ctsref{\vskip}. +每个粘连项有它的自然间距——即它“所期望的”尺寸。粘连还有另外两个属性: +它的\refterm{伸长量}(stretch)和它的\refterm{收缩量}(shrink)。 +你可以用^|\hskip| \refterm{命令}\ctsref{\hskip}生成特定大小的水平粘连。 +命令 |\hskip 6pt plus 2pt minus 3pt| 生成一个水平粘连, +其自然尺寸为$6$点,伸长量为$2$点,收缩量为$3$点。 +类似地,你可以用 ^|\vskip| 命令\ctsref{\vskip}生成特定大小的竖直粘连。 + +%The best way to understand what stretch and shrink are about +%is to see an example of glue at work. +%Suppose you're constructing an \refterm{hbox} from three boxes and two glue +%items, as in this picture: +%\gluepicture +% 29 {\picbox 4 \gluebox 6 4 1 6 \picbox 5 \gluebox 10 8 3 10 \picbox 4 } +%\noindent +%The units of measurement here could be points, millimeters, or anything else. +%If the hbox is allowed to assume its natural width, then each glue item in the +%box also assumes its natural width. The total width of the hbox is then the +%sum of the widths of its parts, namely, $29$ units. +要理解什么是伸长量和收缩量,最好方法是看粘连的一个实际例子。 +假设你要用三个盒子和两个粘连项构造一个\refterm{水平盒子}项目, +如下图: +\gluepicture + 29 {\picbox 4 \gluebox 6 4 1 6 \picbox 5 \gluebox 10 8 3 10 \picbox 4 } +\noindent +这里的度量单位可以是点,毫米,或其他任何单位。 +如果水平盒子可以呈现它的自然宽度, +那么盒子内的每个粘连项也呈现它的自然宽度。 +从而水平盒子的总宽度就是它个各部分宽度之和,即$29$点。 + +%Next, suppose that the hbox is required to be wider than $29$ units, say +%$35$ units. This +%could happen, for example, if the hbox is required to occupy an entire +%line and the line width is $35$ units. +%Since the boxes can't change their width, +%\TeX\ produces the necessary extra space by making the glue items wider. +%The picture now looks like this: +%\gluepicture +% 35 {\picbox 4 \gluebox 6 4 2 8 \picbox 5 \gluebox 10 8 6 14 \picbox 4 } +%The glue items don't become wider equally; they became wider in proportion to +%their stretch. Since the second glue item +%has twice as much stretch as the first one, +%it gets wider by four units while the first glue item gets wider by only +%two units. +%Glue can be stretched as far as necessary, although \TeX\ is +%somewhat reluctant to +%stretch it beyond the amount of stretch given in its definition. +接下来,假设这个水平盒子需要比 $29$ 单位还宽,比方说 $35$ 单位。 +这是可能出现的,比如水平盒子可能需要占据行宽为 $35$ 单位的整行。 +由于 \TeX\ 不可能改变盒子的宽度, +它通过增加粘连项的宽度生成所需的额外间距。 +现在的图形看起来是这样的: +\gluepicture + 35 {\picbox 4 \gluebox 6 4 2 8 \picbox 5 \gluebox 10 8 6 14 \picbox 4 } +各粘连项增加的宽度并不相等;增加的宽度与它们的伸长量成比例。 +由于第二个粘连项的伸长量是第一个的两倍, +它的宽度增加了四个单位,而后者只增加了两个单位。 +粘连允许任意伸长, +尽管 \TeX\ 有时不愿意超出定义中给出的伸长量。 + +%Finally, suppose that the hbox is required to be narrower than $29$ units, say +%$25$ units. In this case \TeX\ makes the glue items narrower. +%The picture looks like this: +%\gluepicture +% 25 {\picbox 4 \gluebox 6 4 2 5 \picbox 5 \gluebox 10 8 6 7 \picbox 4 } +%The glue items become narrower in proportion to their shrink. +%The first glue item becomes narrower by one unit, while the second glue item +%becomes narrower by three units. Glue cannot shrink by a distance +%less than the amount of shrink +%given in its definition even though the distance it can stretch is +%unlimited. In this important sense the shrink and +%the stretch behave differently. +最后,假设这个水平盒子需要比 $29$ 单位还窄,比如说 $25$ 单位。 +此时 \TeX\ 将减少粘连项的宽度。图形看起来是这样的: +\gluepicture + 25 {\picbox 4 \gluebox 6 4 2 5 \picbox 5 \gluebox 10 8 6 7 \picbox 4 } +各粘连项减少的宽度于它们的收缩量成比例。 +第一个粘连项的宽度减少了一个单位,而第二个粘连项减少了三个单位。 +粘连收缩时不能超出定义中给出的收缩量,而伸长时却不受限制。 +从这个重要意义上说,收缩和伸长有不同的表现。 + +%A good rule of thumb for glue is to set the natural size to the amount +%of space that looks best, the stretch to the largest amount of space +%that \TeX\ can add before the document starts to look bad, and the +%shrink to the largest amount of space that \TeX\ can take away before +%the document starts to look bad. You may need to set the values by +%experiment. +有一个不错的经验法则可用于设定粘连, +即取它的自然尺寸为文档最美观时的间距大小, +取它的伸长量为文档开始变难看之前 \TeX\ 能添加的最大间距, +取它的收缩量为文档开始变难看之前 \TeX\ 能去掉的最大间距。 +你也许需要通过试验确定这些值。 + +%You can produce glue that is infinitely stretchable by specifying +%its stretch in units of `^|fil|', `^|fill|', or `^|filll|'. Glue measured in +%`|fill|' is infinitely more stretchable than glue measured in `|fil|', and +%glue measured in `|filll|' is infinitely more stretchable than glue measured +%in `|fill|'. You should rarely have any need for `|filll|' glue. Glue whose +%stretch is |2fil| has twice as much stretch as glue whose stretch is |1fil|, +%and similarly for the other kinds of infinitely stretchable glue. +以 `^|fil|',`^|fill|',或 `^|filll|' 为单位设定粘连的伸长量, +就可以生成可无限伸长的粘连。 +以 `|fill|' 为单位的粘连相比以 `|fil|' 为单位的粘连有更加无限的伸长能力, +以 `|filll|' 为单位的粘连相比以 `|fill|' 为单位的粘连有更加无限的伸长能力。 +你很少需要使用 `|filll|' 粘连。 +伸长量为 |2fil| 的粘连,其伸长能力是伸长量为 |1fil| 的粘连的两倍, +对其他类型的可无限伸长粘连情形类似。 + +%When \TeX\ is +%apportioning extra space among glue items, the infinitely stretchable +%ones, if there +%are any, get all of it. Infinitely stretchable glue is particularly useful for +%setting text flush left, flush right, or centered: +在 \TeX\ 给各个粘连项分配额外间距时, +如果存在可无限伸长的粘连,它们将分到全部间距。 +可无限伸长的粘连在设定文本左对齐,右对齐或者居中时特别有用: + +%\ulist\compact +%\li To set text ^{flush left}, put infinitely stretchable +%horizontal glue to the right of it. +%That glue will consume all the +%extra space that's available on the line. +%You can use the ^|\leftline| command \ctsref{\leftline} +%or the |\raggedright| command \ctsref{\raggedright} to do~this. +%\li To set text ^{flush right}, put infinitely +%stretchable horizontal glue to the left of it. +%As before, that glue will consume all the extra space on the line. +%You can use the ^|\rightline| command \ctsref{\rightline} to do~this. +%\li To set ^{centered text}, put identical infinitely stretchable +%horizontal glue items +%on both sides of it. +%These two glue items will divide all the extra space on the line +%equally between them. +%You can use the ^|\centerline| command \ctsref{\centerline} to do~this. +%\endulist +\ulist\compact +\li 要让文本^{左对齐},可以在它右边放上一个可无限伸长的水平粘连。 +这个粘连将占用该行所有可用的多余间距。 +你可以用 ^|\leftline| 命令\ctsref{\leftline}或 +|\raggedright| 命令\ctsref{\raggedright}达到此目的。 +\li 要让文本^{右对齐},可以在它左边放上一个可无限伸长的水平粘连。 +如同上面,这个粘连将占用该行所有可用的多余间距。 +你可以用 ^|\rightline| 命令\ctsref{\rightline}达到此目的。 +\li 要设定^{居中文本},可以在它两边各放上一个同样的可无限伸长的水平粘连。 +这两个粘连项将平分该行的多余间距。 +你可以用 ^|\centerline| 命令\ctsref{\centerline}达到此目的。 +\endulist + +%You can also specify infinitely shrinkable glue +%^^{glue//infinitely shrinkable} +%in a similar way. Infinitely shrinkable glue can act as negative space. +%Note that |fil|, etc., can be used only +%to specify the stretch and shrink of glue---they can't be used to specify +%its natural size. +%\eix^^{stretch} +%\eix^^{shrink} +%\endconcept +类似地,你也可以指定可无限收缩的粘连。 +^^{粘连//可无限收缩的粘连} +可无限收缩粘连可以作为负间距。 +注意 |fil| 等只可用于指定粘连的伸长量和收缩量——% +它们不能用于指定自然尺寸。 +\eix^^{伸长量} +\eix^^{收缩量} +\endconcept + + +%\conceptindex{groups} +%\concept group +\conceptindex{编组} +\concept 编组 + +%A \defterm{group} is a part of your manuscript that \TeX\ treats as a unit. +%You indicate a group by enclosing it in the braces +%`|{|' and `|}|' (or any other characters with the appropriate +%\refterm{category codes}). +%^^|{//starting a group| +%^^|}//ending a group| +\defterm{编组}(group)是文稿中 \TeX\ 视为一个单元的一部分。 +要表示一个编组,你可以用括号 `|{|' 和 `|}|'% +(或者\refterm{类别码}合适的其他字符)将它括起来。 +^^|{//开始编组| +^^|}//结束编组| + +%The most important property of a group is that any nonglobal +%definition or assignment that you make inside a group disappears when +%the group ends. For instance, if you write: +编组的重要特性在于,当一个编组结束时, +在其中所作的任何非全局的定义或赋值都消失了。假如你这样写: + +%\csdisplay +%Please don't pour {\it any} more tea into my hat. +%| +%the |\it| \refterm{control sequence} causes \TeX\ to set the word +%`|any|' in italic type but does not affect the rest of the text. +%As another example, if you use the |\hsize| parameter +%\ctsref{\hsize} to change the line length within a group, the line length +%reverts to its previous value once \TeX\ has gotten past the group. +\csdisplay +Please don't pour {\it any} more tea into my hat. +| +|\it| \refterm{控制序列}让 \TeX\ 设定 `|any|' 为意大利体, +但它不会影响其他文本。 +再举一个例子,如果你在编组中用 |\hsize| 命令\ctsref{\hsize}改变行宽, +在 \TeX\ 完成这个编组后,行宽将恢复为之前的取值。 + +%Groups are also useful as a way of controlling spacing. For instance, if you +%write: +编组也可以作为一种控制间距的方法。举个例子,如果你这样写: + +%\csdisplay +%\TeX for the Impatient and the Outpatient too. +%| +%\noindent +%you'll get: +%\display{% +%\TeX for the Impatient and the Outpatient too. +%} +%\noindent +%since the control sequence |\TeX| (which produces the \TeX\ +%logo) absorbs the following space. +%What you probably want is: +%\display{% +%{\TeX} for the Impatient and the Outpatient too. +%} +%\noindent +%One way to get it is to enclose `|\TeX|' in a group: +%\csdisplay +%{\TeX} for the Impatient and the Outpatient too. +%| +%The right brace prevents the control sequence from absorbing the space. +%\endconcept +\csdisplay +\TeX for the Impatient and the Outpatient too. +| +\noindent +你将会得到下列结果: +\display{% +\TeX for the Impatient and the Outpatient too. +} +\noindent +这是由于控制序列 |\TeX|(它生成 \TeX\ 标识)吸收了其后的空格。 +你所需要的也许是这样: +\display{% +{\TeX} for the Impatient and the Outpatient too. +} +\noindent +要得到这种结果,其中一种方法就是将 `|\TeX|' 括到一个编组里面: +\csdisplay +{\TeX} for the Impatient and the Outpatient too. +| +其中的右花括号阻止了控制序列吸收空格。 +\endconcept + + +\bookmark{2}{以H开头} +%\conceptindex{hboxes} +%\concept hbox +\concept 水平盒子 + +%An \defterm{hbox} (horizontal box) is a \refterm{box} that \TeX\ +%constructs by placing the items of a \refterm{horizontal list} one after +%another, left to right. +%^^{horizontal lists//hboxes formed from} +%An hbox, taken as a unit, is neither +%inherently horizontal nor inherently vertical, i.e., it can appear as an +%item of either a horizontal list or a \refterm{vertical list}. You can +%construct an hbox with the |\hbox| command \ctsref{\hbox}. +%\endconcept +\defterm{水平盒子}(hbox,horizontal box)是 \TeX\ +从左到右逐个放置\refterm{水平列表}的项目而构造出来的\refterm{盒子}。 +^^{水平列表//组成水平盒子} +水平盒子,作为一个单元,既不是本质上水平的也不是本质上竖直的, +即它可以出现在水平列表或\refterm{竖直列表}中。 +你可以用 |\hbox| 命令\ctsref{\hbox}构造水平盒子。 +\endconcept + + +%\conceptindex{headers} +%\concept header +\concept 页眉 + +%A \defterm{header} is material that \TeX\ puts at the top of every page, +%above the text of that page. +%The header for a simple report +%might consist of the title on the left side of +%the page and the text ``Page $n$'' on the right side of the page. +%Ordinarily a header consists of a single line, which you can set by +%assigning a token list to ^|\headline| \ctsref\headline. +%The default \plainTeX\ header is blank. +%It's possible to produce multiline headers too; see \xrefpg{bighead} for +%how to do it. +%\endconcept +\defterm{页眉}(header)是放在每个页面顶部,位于正文之上的素材。 +一个简单报告的页眉可能由左侧的标题和右侧的`第 $n$ 页''组成。 +通常页眉只包含一行文本,你可以通过给 ^|\headline|\ctsref\headline 指定一个记号列来设定页眉。 +在 \plainTeX\ 中默认页眉是空白的。 +你也可以生成多行页眉;请参阅\xrefpg{bighead}中介绍的方法。 +\endconcept + + +%\concept height +\concept 高度 + +%The \defterm{height} of a \refterm{box} is the distance that the box +%extends above its \refterm{baseline}. +%^^{boxes//height of} +%\endconcept +\refterm{盒子}的\defterm{高度}(height)是盒子在\refterm{基线}之上的距离。 +^^{盒子//盒子的高度} +\endconcept + + +%\conceptindex{horizontal lists} +%\concept{horizontal list} +\concept{水平列表} + +%A \defterm{horizontal list} is a list of items +%that \TeX\ has produced while it is +%in one of its \refterm{horizontal modes:horizontal mode}, i.e., assembling +%either a paragraph or an hbox. See ``horizontal mode'' below. +%\endconcept +\defterm{水平列表}(horizontal list)是 \TeX\ 位于某种\refterm{水平模式}时 +(即组装段落或水平盒子时)生成的一列项目。见下面的``水平模式''。 +\endconcept + + +%\concept {horizontal mode} +\concept {水平模式} + +%^^{hboxes//horizontal mode for} +%When \TeX\ is assembling a paragraph or an \refterm{hbox}, it is in one +%of two \defterm{horizontal modes}: ^{ordinary horizontal +%mode} for assembling paragraphs and ^{restricted horizontal mode} for +%assembling hboxes. Whenever \TeX\ is in a horizontal mode its stomach +%\seeconcept{\anatomy} is constructing a \refterm{horizontal +%list} of items (boxes, glue, penalties, etc.). +%\TeX\ typesets the items in the list +%one after another, left to right. +^^{水平盒子//处于水平模式中} +在组装段落或者\refterm{水平盒子}时, +\TeX\ 位于两种\defterm{水平模式}(horizontal mode)之一: +^{普通水平模式}用于组装段落,而^{受限水平模式}用于组装水平盒子。 +只要 \TeX\ 位于水平模式中,它的胃\seeconcept{\anatomy}就在构造项目% +(盒子、粘连、惩罚等)的\refterm{水平列表}。 +\TeX\ 逐个排版列表中的项目,从左到右。 + +%A horizontal list can't contain any +%items produced by inherently vertical commands, e.g., |\vskip|. +%^^{horizontal lists//can't contain vertical commands} +水平列表不能包含任何用本质上的竖直命令,比如 |\vskip|,生成的项目。 +^^{水平列表//不能包含竖直命令} + +%\ulist +%\li If \TeX\ is assembling a horizontal list in ordinary horizontal mode and +%encounters an inherently vertical command, \TeX\ ends the paragraph and +%enters \refterm{vertical mode}. +\ulist +\li 如果 \TeX\ 正在普通水平模式中组装水平列表,并碰到一个本质上的竖直命令, +它将结束当前段落并进入\refterm{竖直模式}。 + +%\li If \TeX\ is assembling a horizontal list in restricted horizontal +%mode and encounters an inherently vertical command, it complains. +%\endulist Two commands that you might at first think are inherently +%horizontal are in fact inherently vertical: |\halign| \ctsref{\halign} +%and |\hrule| \ctsref{\hrule}. +%^^|\hrule//inherently vertical| +%^^|\halign//inherently vertical| +%See \knuth{page~286} for a list +%of the inherently vertical commands. +\li 如果 \TeX\ 正在受限水平模式中组装水平列表,并碰到一个本质上的竖直命令, +它将报错。 +\endulist 这两个命令你也许会认为是本质上水平的,实际上却是本质上竖直的: +|\halign|\ctsref{\halign}和 |\hrule|\ctsref{\hrule}。 +^^|\hrule//本质上竖直的| +^^|\halign//本质上竖直的| +在\knuth{第~286~页}中列出了所有本质上的竖直命令。 + +%{\tighten +%You should be aware of a subtle but important property of restricted +%horizontal mode: \emph{you can't enter restricted horizontal mode +%when you're in ordinary horizontal mode}. What this means in practice is that +%when \TeX\ is assembling an hbox it +%won't handle paragraph-like text, i.e., text for which it does +%\refterm{line breaking}. You can get +%around this restriction by enclosing the paragraph-like text in a +%\refterm{vbox} within the hbox. The same method works if you want to +%put, say, a horizontal \refterm{alignment} inside an~hbox. +%}% end scope of tighten +对于受限水平模式,你要知道这个微小但是重要的特性: +\emph{你无法从普通水平模式进入受限水平模式}。% +\footnote{译注:此处似乎有误,应为“你无法从受限水平模式进入普通水平模式”。} +在实践上,这意味着在组装水平盒子时 \TeX\ 无法处理类似段落的文本, +即需要\refterm{断行:断行点}的文本。在水平盒子内部, +通过把类似段落的文本放入一个\refterm{竖直盒子}中,你就可以绕过此限制。 +其他类似方法也可行,比如将一个水平\refterm{阵列}放在水平盒子内部。 + +\endconcept + + +%\concept{hyphenation} +\concept{连字} + +%\TeX\ automatically hyphenates words as it is processing your document. +%\TeX\ is not eager to insert hyphens, preferring instead to find good +%line breaks by adjusting the spacing between words and moving words +%from one line to another. +%\TeX\ is clever enough to understand +%hyphens that are already in words. +在处理文档时,\TeX\ 自动将单词连字化(hyphenation)。 +\TeX\ 并不急于插入连字符,它更喜欢通过调整单词间隔找到合适断行点, +从而将单词用一行移动到另一行。 +\TeX\ 足够聪明,它可以理解已经出现在单词中的连字符。 + +%You can control \TeX's hyphenation in several ways: +%\ulist +%\li You can tell \TeX\ to +%allow a hyphen in a particular place by inserting a +%discretionary hyphen +%^^{discretionary hyphens} +%with the ^|\-| command \ctsref{\@minus}. +%\li You can tell \TeX\ how to +%hyphenate particular words throughout your document with the ^|\hyphenation| +%command \ctsref{\hyphenation}. +%\li You can enclose a word in an \refterm{hbox}, thus preventing \TeX\ +%from hyphenating it. +%\li You can set the value of penalties such as |\hyphenpenalty| +%\ctsref\hyphenpenalty. +%\endulist +%\noindent If a word contains an explicit or discretionary hyphen, +%\TeX\ will never break it elsewhere. +%\endconcept +你可以用如下几种方式控制 \TeX\ 的连字: +\ulist +\li 你可以用 \writeidxfalse^|\-|\writeidxtrue 命令\ctsref{\@minus} 插入自定连字符, +以允许 \TeX\ 在特定位置连字化。 +^^{自定连字符} +\li 你可以用 ^|\hyphenation| 命令\ctsref{\hyphenation}% +告诉 \TeX\ 在整个文档中如何对某个单词连字化。 +\li 你可以将单词放入一个\refterm{水平盒子}中,以阻止 \TeX\ 将它连字化。 +\li 你可以设定一些惩罚值,比如 |\hyphenpenalty|\ctsref\hyphenpenalty 。 +\endulist +\noindent 如果单词中包含显式或自定连字符,\TeX\ 将不会在其他位置断开。 +\endconcept + + +\bookmark{2}{以I开头} +%\conceptindex{input streams} +%\concept {input stream} +\concept {输入流} + +%See \conceptcit{file}. +%\endconcept +见\conceptcit{文件}。 +\endconcept + +%\conceptindex{insertions} +%\concept insertion +\concept 插入项 + +%\looseness = -1 +%An \defterm{insertion} is a vertical list containing material +%to be inserted into +%a page when \TeX\ has finished building that page.\footnote +%{\tighten +%\TeX\ itself doesn't +%insert the material---it just makes the material available to +%the output routine, which is then responsible for transferring +%it to the composed page. +%^^{output routine//insertions, treatment of} +%The only immediate effect of the ^|\insert| command +%\ctsref{\insert} is to change \TeX's page break calculations so that it +%will leave room on the page for the inserted material. Later, when +%\TeX\ actually breaks the page, it divides the inserted material into +%two groups: the material that fits on the current page and the material +%that doesn't. +%^^{page breaks//insertions at} +%The material that fits on the page is placed into box registers, +%one per insertion, +%and the material that doesn't fit is carried over to the next page. +%This procedure allows \TeX\ to do such +%things as distributing parts of a long footnote over several consecutive +%pages.} Examples of such insertions are footnotes and figures. The +%\refterm{\plainTeX} commands for +%creating insertions are ^|\footnote|, ^|\topinsert|, |\mid!-insert|, +%^^|\midinsert| +%and ^|\pageinsert|, as well as the primitive ^|\insert| command +%itself (\pp\xrefn\footnote--\xrefn{endofinsert}). +%\TeX's mechanism for handling insertions is rather complicated; +%see \knuth{pages~122--125} for the details. +%\endconcept +\defterm{插入项}(insertion)是一个竖直列表, +它包含即将在页面建造完成后插入到该页面的素材。\footnote +{\TeX\ 本身并不插入这些素材——它仅提供这些素材给输出例行程序, +输出例行程序负责将它们移动到排版出的页面中。 +^^{输出例行程序//处理插入项} +^|\insert| 命令\ctsref{\insert}仅有的直接效果是, +改变了 \TeX\ 的分页计算公式以给插入素材留出空间。 +稍后,当 \TeX\ 实际分出了页面时,它将插入素材分为两组:当前页能够放下的和无法放下的。 +^^{分页//分页时的插入项} +当前页能够放下的素材被放入盒子寄存器中,每个插入项放入一个寄存器, +而无法放下的素材则保留到下一页中。 +此过程允许 \TeX\ 将长脚注分到连续多个页面中。} +脚注和图片就是插入项的例子。 +在\refterm{\plainTeX} 中,用于创建插入项的命令有 +^|\footnote|,^|\topinsert|,|\mid!-insert| 和 ^|\pageinsert|, +^^|\midinsert| +以及原始命令 ^|\insert| 本身(见~\xrefn\footnote--\xrefn{endofinsert}~页)。 +\TeX\ 插入项的处理机制是相当复杂的; +你可以在\knuth{第~122--125~页}中看到详细介绍。 +\endconcept + + +%\concept {interline glue} +\concept {行间粘连} + +%\defterm{Interline glue} is the glue that \TeX\ inserts in front of every +%\refterm{box} in a \refterm{vertical list} except for the first one. +%The interline glue is ordinarily specified so as to maintain a constant +%distance between the baselines of the boxes. +%Its value is jointly determined by the ^|\baselineskip|, +%^|\lineskip|, and ^|\lineskiplimit| parameters \ctsref{\baselineskip}. +%\endconcept +\defterm{行间粘连}(interline glue)是 \TeX\ 在\refterm{竖直列表}的每个盒子% +(第一个盒子除外)之前插入的粘连。 +通常指定行间粘连以让各盒子基线间保持相同的距离。 +行间粘连的值由 ^|\baselineskip|,^|\lineskip| 和 ^|\lineskiplimit| +这三个参数合起来确定\ctsref{\baselineskip}。 +\endconcept + + +%\conceptindex{items} +%\concept item +\concept 项目 + +%The term \defterm{item} is often used to refer to a component of +%a horizontal, vertical, or math list, i.e., a list of items that +%\TeX\ is building while it is in a horizontal, vertical, or math mode. +%\endconcept +\defterm{项目}(item)这个术语常用来表示水平,竖直或数学列表 +(即 \TeX\ 在水平,竖直或数学模式中建造的项目列表)的一个组成元素。 +\endconcept + + +\bookmark{2}{以J开头} +%\conceptindex{justification} +%\concept {justified text} +\concept {对齐文本} + +%\defterm{Justified text} is text that has been typeset so that both +%margins are even. Unjustified text, on the other hand, has been typeset +%with ``ragged'' margins on one or both sides. +%Documents typed on old-fashioned typewriters almost always have +%ragged right margins. +%Although documents produced by \TeX\ are +%justified by default, you can if you wish produce documents (or +%sequences of lines) that have ^{ragged right}---or ^{ragged left}---margins. +%You can also get \TeX\ to center a sequence of lines, thus making both +%margins ragged. +%^^{centered text} +%You can use the +%^|\leftskip|, ^|\rightskip|, and ^|\raggedright| commands +%(\pp \xrefn{\leftskip},~\xrefn{\raggedright}) for these purposes. +\defterm{对齐文本}(justified text)是两边对齐排版的文本。 +而非对齐文本是单边或两边“不对齐”排版的文本。 +老式打印机排版的文档几乎总是左对齐的。 +虽然 \TeX\ 默认生成两边对齐的文档, +如果你需要也可以生成^{左对齐}或^{右对齐}的文档(或一些文本行)。 +你也可以让 \TeX\ 将一些文本行居中,从而让两边都不对齐。 +^^{居中文本} +用 ^|\leftskip|,^|\rightskip| 和 ^|\raggedright| 命令% +(第 \xrefn{\leftskip},\xrefn{\raggedright}页)可以达到这些目的. + +%When \TeX\ is producing justified text, it usually +%needs to stretch or shrink the glue within each line to make the margins +%come out even. When \TeX\ is producing unjustified text, on the other +%hand, it usually leaves the glue within each line at its natural width. +%Many typographers prefer unjustified text because its interword +%spacing is more uniform. +%\endconcept +在生成对齐文本时,\TeX\ 通常需要伸缩各行的粘连以让两边对齐。 +而在生成非对齐文本时,\TeX\ 通常让各行的粘连保持自然尺寸。 +很多排印工更喜欢非对齐文本,因为它的字间距更加一致。 +\endconcept + + +\bookmark{2}{以K开头} +%\conceptindex{kerns} +%\concept kern +\conceptindex{紧排} +\concept 紧排 + +%^^{spacing//adjusting with kerns} +%A \defterm{kern} indicates a change to the normal spacing between +%the items of a vertical or horizontal list. +%A kern can be either positive or negative. By +%putting a positive kern between two items, you push them further apart +%by the amount of the kern. By putting a negative kern between two +%items, you bring them closer together by the amount of the kern. For +%instance, this text: +%\csdisplay +%11\quad 1\kern1pt 1\quad 1\kern-.75pt 1 +%| +%produces letter pairs that look like this: +%\display{11\quad 1\kern1pt 1\quad 1\kern-.75pt 1} +%You can use kerns in vertical mode to adjust the space between +%particular pairs of lines. +^^{间隔//用紧排调整} +\defterm{紧排}(kern)表示对竖直或水平列中的项目间的距离作一定调整。 +紧排可正可负。将正紧排放入两个项目间,将以该紧排的大小拉开两个项目。 +而将负紧排放入两个项目间,将以该紧排的大小拉近两个项目。 +例如,下列文本: +\csdisplay +11\quad 1\kern1pt 1\quad 1\kern-.75pt 1 +| +将生成类似下面的几个字符对: +\display{11\quad 1\kern1pt 1\quad 1\kern-.75pt 1} +在竖直模式中可以用紧排改变特定两行的间距。 + +%A kern of size $d$ is very similar to a \refterm{glue} item that has +%size $d$ and no stretch or shrink. Both the kern and the glue insert or +%remove space between neighboring items. The essential difference is +%that \TeX\ considers two boxes with only kerns between them to be tied +%together. That is, \TeX\ won't break a line or a page at a kern unless +%the kern is immediately followed by glue. Bear this difference in mind +%when you're deciding whether to use a kern or a glue item for a +%particular purpose. +大小为$d$的紧排与大小为$d$且无伸缩的\refterm{粘连}非常相似。 +紧排和粘连两者都在相邻项目间插入或删除一定间距。 +本质区别在于,若两盒子间只有紧排,\TeX\ 将认为它们是合在一起的。 +\footnote{译注:本书将“kern”翻译为“紧排”正由于这个原因,“紧”应该理解为“紧固”。} +这就是说,\TeX\ 不会在紧排处断行或者分页,除非其后跟着一个粘连。 +当你决定用紧排或粘连实现某种目的时,务必记得这两者的区别。 + +%\TeX\ automatically inserts kerns between particular pairs of adjacent +%letters, thus adjusting the space between those letters and enhancing +%the appearance of your typeset document. +%For instance, the Computer Modern $10$-point roman font contains a kern +%for the pair `To' that brings the left edge of the `o' under the +%`T'. Without the kern, you'd get \hbox{``T{o}p''} rather than ``Top''---% +%the difference is slight but noticeable. +%The metrics file +%(^{\tfmfile}) +%for each \refterm{font} specifies the placement and size of the +%kerns that \TeX\ automatically inserts when it is setting text in that~font. +%\margin{paragraph deleted to save space; most of the material was +%already in this section.} +\TeX\ 在某些相邻的字符对之间自动插入紧排, +从而改变这些字符的间距,使得排版出的文档更加美观。 +例如,在计算机现代字体的$10$点罗马字体中, +包含一个字符对`To'的紧排,将字母`o'的左边缘拉到字母`T'下边。 +没有这个紧排,你将得到 \hbox{“T{o}p”} 而不是 “Top” ——% +两者的差别是微小的但却是明显的。 +\TeX\ 用某个\refterm{字体}排版文本时自动插入的紧排的位置和大小, +是在该字体的度量文件(^{\tfmfile})中指定的。 +\margin{paragraph deleted to save space; most of the material was +already in this section.} + +\endconcept + + +\bookmark{2}{以L开头} +%\concept leaders +\concept 指引线 + +%You can use \defterm{leaders} to fill a space with copies of +%a pattern, e.g., +%to put repeated dots between a title and a page number in a table of contents. +%A leader is a single copy of the pattern. +%The specification of leaders contains three pieces of information: +%\olist\compact +%\li what a single leader is +%\li how much space needs to be filled +%\li how the copies of the pattern should be arranged within the space +%\endolist +利用\defterm{指引线}(leaders),你可以用某个模式的复本填充空间, +比如在目录中的用重复的点填充标题和页码之间的空间。 +指引体(leader)是模式的单个复本。 +要指定一个指引线,你需要给出三方面的信息: +\olist\compact +\li 单个指引体是怎样的 +\li 要填充的空间有多大 +\li 模式的复本在空间内应该如何组织 +\endolist + +%\bix^^|\leaders| +%\bix^^|\cleaders| +%\bix^^|\xleaders| +%{\tighten +%\TeX\ has three commands for specifying leaders: +%|\leaders|, \hbox{|\cleaders|}, and |\xleaders| (\xref\leaders). The +%\refterm{argument} of each command specifies the leader. +%The command must be followed by \refterm{glue}; the size of the glue +%specifies how much space is to be filled. The choice of command determines +%how the leaders are arranged within the space.} +\bix^^|\leaders| +\bix^^|\cleaders| +\bix^^|\xleaders| +\TeX\ 有三个用于指定指引线的命令: +|\leaders|,\hbox{|\cleaders|} 和 |\xleaders|(\xref\leaders )。 +各命令的\refterm{参量}指定了指引体。 +命令之后必须是一个\refterm{粘连};粘连的大小指定了要填充空间的大小。 +命令的选择决定了指引体在空间内如何组织。 + +%Here's an example showing how |\leaders| works: +%\csdisplay +%\def\dotting{\leaders\hbox to 1em{\hfil.\hfil}\hfil} +%\line{The Political Process\dotting 18} +%\line{Bail Bonds\dotting 26} +%| +%Here we've put the leaders and their associated glue into a \refterm{macro} +%definition so that we can conveniently +%use them in two places. This input produces: +这里有个例子展示了 |\leaders| 的工作方式: +\csdisplay +\def\dotting{\leaders\hbox to 1em{\hfil.\hfil}\hfil} +\line{The Political Process\dotting 18} +\line{Bail Bonds\dotting 26} +| +其中我们将指引线及相关粘连放在一个\refterm{宏}定义中, +以方便我们在两个地方使用它。这个例子的输出结果是: + +%\vdisplay{\advance\hsize by -\parindent +%\def\dotting{\leaders\hbox to 1em{\hfil{.}\hfil}\hfill}% +%\line{The Political Process{\dotting}18} +%\line{Bail Bonds{\dotting}26} +%} +\vdisplay{\advance\hsize by -\parindent +\def\dotting{\leaders\hbox to 1em{\hfil{.}\hfil}\hfill}% +\line{The Political Process{\dotting}18} +\line{Bail Bonds{\dotting}26} +} + +%The \refterm{hbox} following |\leaders| specifies +%the leader, namely, an hbox 1\em\ wide containing a dot +%at its center. +%The space is filled with copies of this box, +%effectively filling it +%with dots whose centers are 1\em{} apart. +%The following |\hfil| (the one at the +%end of the macro definition) is glue that +%specifies the space to be filled. +%In this case it's whatever space is needed to fill out the line. +%By choosing |\leaders| rather than |\cleaders| or |\xleaders| we've insured +%that the dots on different lines line up with each other. +|\leaders| 之后的\refterm{水平盒子}指定了指引体,即包含居中点的 1\em\ 宽的水平盒子。 +空间将用这个盒子的复本填充,实际上是用中心相隔 1\em{} 的点填充。 +随后的 |\hfil|(宏定义末尾那个)是一个粘连,它给出所要填充空间的大小。 +在这个例子中,它就是填满文本行所需的空间。 +我们选择 |\leaders| 而不是 |\cleaders| 或 |\xleaders|,是为了让不同行的点相互对齐。 + +%In general, the space to be filled acts as a window +%on the repeated copies of the leader. +%\TeX\ inserts as many copies as possible, but some space is +%usually left over---either because of where the leaders fall +%within the window or because +%the width of the window isn't an exact multiple of the width of the +%leader. +%The difference among the three commands is in how they arrange the leaders +%within the window and how they distribute any leftover space: +一般地,所要填充的空间就作为包含指引体的多个复本的窗体。 +\TeX\ 插入尽可能多的复本,但通常会有些空间剩下——% +或者是由于指引体在窗体内的位置问题,或者是由于窗体的宽度不是指引体宽度的整数倍。 +这三个命令的差异在于,在窗体内如何安排指引体和分配剩余空间: + +%\ulist +%\li For |\leaders|, \TeX\ first produces a row of copies of the leader. +%It then aligns the start of this row with the left end of the innermost +%box $B$ that is to contain the result of the |\leaders| command. +%In the two-line example above, $B$ is a box produced by |\line|. +%Those leaders that fit entirely in the window are placed into $B$, +%and the leftover space at the left and right ends is left empty. +%The picture is like this: +%\vdisplay{% +%\def\dotting{\leaders\hbox to 1em{\hfil{.}\hfil}\hfill}% +%\def\pp{The Political Process} +%\line{\dotting} +%\line{\hphantom\pp\hfil$\Downarrow$\hfil\hphantom{18}} +%\vskip 4pt +%\setbox0 = \hbox{\pp} +%\setbox1 = \hbox{18} +%\dimen0 = \hsize \advance\dimen0 by -\wd0 \advance \dimen0 by -\wd1 +%\advance\dimen0 by -0.8pt +%\hbadness=10000 +%\line{\pp +% \vrule\vbox{\hrule width \dimen0\vskip 2pt +% \hbox to \dimen0{\hfil window\strut\hfil} +% \vskip 2pt\hrule width \dimen0}% +% \vrule 18} +%\line{\hphantom\pp\hfil$\Downarrow$\hfil\hphantom{18}} +%\vskip 2pt +%\line{\pp{\dotting}18} +%} +%\vskip\medskipamount +%{\tighten +%\noindent +%This procedure ensures that in the two-line example on the previous page, +%the dots in the two lines +%are vertically aligned (since the \refterm{reference points:reference point} +%of the hboxes produced by |\line| are vertically aligned). +%\par} +\ulist +\li 对于 |\leaders|, \TeX\ 首先生成一行指引体复本。 +然后该行复本的起始位置与包含 |\leaders| 命令的最内侧盒子 $B$ 的左侧对齐。 +在上面的两行例子中,$B$ 就是由 |\line| 生成的盒子。 +整个落入窗体的指引体将被放入 $B$ 中,而左右两边剩下的空间将空着。图形如下: +\vdisplay{% +\def\dotting{\leaders\hbox to 1em{\hfil{.}\hfil}\hfill}% +\def\pp{The Political Process} +\line{\dotting} +\line{\hphantom\pp\hfil$\Downarrow$\hfil\hphantom{18}} +\vskip 4pt +\setbox0 = \hbox{\pp} +\setbox1 = \hbox{18} +\dimen0 = \hsize \advance\dimen0 by -\wd0 \advance \dimen0 by -\wd1 +\advance\dimen0 by -0.8pt +\hbadness=10000 +\line{\pp + \vrule\vbox{\hrule width \dimen0\vskip 2pt + \hbox to \dimen0{\hfil window\strut\hfil} + \vskip 2pt\hrule width \dimen0}% + \vrule 18} +\line{\hphantom\pp\hfil$\Downarrow$\hfil\hphantom{18}} +\vskip 2pt +\line{\pp{\dotting}18} +} +\vskip\medskipamount +\noindent +这个过程确保在上面的两行例子中,两行中的各个点是竖直对齐的% +(由于用 |\line| 生成的水平盒子的\refterm{基准点}是竖直对齐的)。 + +%\li For |\cleaders|, \TeX\ centers the leaders within the window +%by dividing the leftover space between the two ends of the window. +%The leftover space is always less than the width of a single leader. +\li 对于 |\cleaders|,\TeX\ 平分窗体两边的剩余空间以让指引线在窗体中居中。 +剩余空间总是小于单个指引体的宽度。 + +%\li For |\xleaders|, \TeX\ distributes the +%leftover space evenly within the window. +%In other words, if the leftover space is $w$ and the +%leader is repeated $n$ times, +%\TeX\ puts space of width $w/(n+1)$ between adjacent leaders and +%at the two ends of the leaders. +%The effect is usually to spread out the leaders a little bit. +%The leftover space for |\xleaders|, like that for |\cleaders|, +%is always less than the width of a single leader. +%\endulist +\li 对于 |\xleaders|,\TeX\ 将剩余空间在窗体内均匀分布。 +也就是说,如果剩余空间是 $w$,指引体被重复 $n$ 次, +\TeX\ 将在相邻指引体中间及指引线两端填充宽度为 $w/(n+1)$ 的空间。 +其效果通常是将指引体散开一点。和 |\cleaders| 类似, +|\xleaders| 的剩余空间也总是小于单个指引体的宽度。 +\endulist + +%So far we've assumed that the leaders consist of hboxes arranged +%horizontally. Two variations are possible: +%\olist +%\li You can use a +%rule instead of an hbox for the leader. +%\TeX\ makes the rule as wide as necessary to extend +%across the glue (and the three commands are equivalent). +%\li You +%can produce vertical leaders that run down the page by including them in +%a \refterm{vertical list} rather than a \refterm{horizontal list}. In +%this case you need vertical glue following the leaders. +%\endolist +%\noindent +%See \knuth{pages~223--225} for the precise rules that \TeX\ uses +%in typesetting leaders. +%\eix^^|\leaders| +%\eix^^|\cleaders| +%\eix^^|\xleaders| +%\endconcept +到目前为止,我们都假定指引线由横向排列的水平盒子组成的。实际上指引线还有两个可能的变种: +\olist +\li 你可以用标线代替水平盒子作为指引体。 +\TeX\ 将让标线尽可能宽以让它填满该粘连(从而这三个命令是等价的)。 +\li 你可以不在\refterm{水平列表}而在\refterm{竖直列表}中使用它, +以在页面中生成向下排列的竖直指引线。在这种情形中指引线后面需要给出竖直粘连。 +\endolist +\noindent +请参阅 \knuth{第~223--225~页}, +其中给出了 \TeX\ 用于排版指引线的精确规则。 +\eix^^|\leaders| +\eix^^|\cleaders| +\eix^^|\xleaders| +\endconcept + + +%\conceptindex{ligatures} +%\concept ligature +\concept 连写 + +%A \defterm{ligature} is a single character that replaces a +%particular sequence of adjacent characters in a typeset document. +%For example, the word `|office|' is typeset as \hbox{``office''}, +%not \hbox{``of{f}ice''}, by high-quality typesetting systems. +%Knowledge of ligatures is built into the +%\refterm{fonts:font} that you use, so there's nothing explicit you need do +%in order to get \TeX\ to produce them. (You could defeat the ligature +%in ``office'', as we did just above, by writing `|of{f}ice|' in your input.) +%\TeX\ is also capable of using its ligature mechanism to typeset the +%first or last letter of a word differently than the same letter as it would +%appear in the middle of a word. +%You can defeat this effect (if you ever encounter it) by using the +%^|\noboundary| command (\xref\noboundary). +\defterm{连写}(ligature)是排版的文档中替换特定的相邻字符串的单个字符。 +例如,在高质量的排版系统中, +单词 `|office|'将被排版为 \hbox{``office''},而不是 \hbox{``of{f}ice''}。 +连写信息已经嵌入在你使用的\refterm{字体}中,因此什么也不用做你就可以让\TeX\ 生成它们。% +(通过将输入写成 `|of{f}ice|' 可以取消 ``office'' 中的连写,正如我们刚才所做的。) +利用此连写机制,对单词的开头或者末尾字母,\TeX\ 也可以使用与它在单词中间时不同的方式排版。 +用 ^|\noboundary| 命令(\xref\noboundary )你可以取消这种效果(如果你曾经碰到它)。 + +%Sometimes you may need a ligature from a European language. +%^^{European languages} +%\TeX\ won't +%produce these automatically unless you're using a font designed for that +%language. A number of these ligatures, e.g., `\AE', are available as +%commands (see ``Letters and ligatures for European alphabets'', +%\xref{fornlets}). +%\endconcept +有时候你会需要欧洲语言的连写。 +^^{欧洲语言} +除非你使用一个针对该语言设计的字体,否则 \TeX\ 不会自动生成这些连写。 +有一些连写,比如 `\AE',可以用命令得到(见``欧洲语言字母和连写'',\xref{fornlets})。 +\endconcept + + +%\conceptindex{line breaks} +%\concept{line break} +\conceptindex{断行} +\concept{断行点} + +%A \defterm{line break} is a place in your document where \TeX\ ends +%a line as it typesets a paragraph. +%When \TeX\ processes your document, it collects the contents of each +%paragraph in a \refterm{horizontal list}. +%When it has collected an entire paragraph, +%it analyzes the list to find what it considers to be the best possible +%line breaks. \TeX\ associates ``^{demerits}'' with various symptoms of +%unattractive line breaks---lines that have too much or too little +%space between words, consecutive lines that end in hyphens, and so forth. It +%then chooses the line breaks so as to minimize the total number of demerits. +%See \knuth{pages~96--101} for a full description of \TeX's line-breaking rules. +\defterm{断行点}(line break)是文档中 \TeX\ 结束一行并开始新行的位置。 +在处理你的文档时,\TeX\ 将一个段落的内容收集到一个\refterm{水平列表}中。 +收集完整个段落之后,它分析该列表以找到它认为最佳的断行点。 +\TeX\ 附加``^{缺陷}''值给各种形态的丑陋断行点——% +单词间隔太大或太小的行,连续以连字符结尾的行,诸如此类。 +然后它选择让总缺陷值最小的断行点。 +请参阅\knuth{第~96--101~页}中的 \TeX\ 的断行规则的完整说明。 + +%You can control \TeX's choice of line breaks in several ways: +%\ulist +你可以用下面几种方式控制 \TeX\ 对断行点的选择: +\ulist + +%\li You can insert a \refterm{penalty} (\xref{hpenalty}) somewhere in +%the horizontal list that \TeX\ builds as it forms a paragraph. +%^^{penalties//in horizontal lists} +%A +%positive penalty discourages \TeX\ from breaking the line there, while a +%negative penalty---a bonus, in other words---encourages \TeX\ to break +%the line there. A penalty of $10000$ or more prevents a line break, +%while a penalty of $-10000$ or less forces a line break. You can get +%the same effects with the ^|\break| and +%^|\nobreak| commands (\pp\xrefn{hbreak},~\xrefn{hnobreak}). +\li 你可以在 \TeX\ 形成段落时构建的水平列表的某处插入\refterm{惩罚}项(\xref{hpenalty})。 +^^{惩罚//在水平列表中} +正惩罚值阻碍 \TeX\ 在该处断行,而负惩罚值——即奖励值——鼓励 \TeX\ 在该处断行。 +大于或等于 $10000$ 的惩罚只阻止断行,而小于或等于 $-10000$ 强制断行。 +用 ^|\break| 和 ^|\nobreak| 命令(第~\xrefn{hbreak},\xrefn{hnobreak}~页)可以达到相同效果。 + +%\li You can tell \TeX\ to allow a hyphen in a particular place by +%inserting a discretionary hyphen +%^^{discretionary hyphens} +%with the |\-| command \ctsref{\@minus}, or +%otherwise control how \TeX\ hyphenates your document \seeconcept +%{hyphenation}. +%^^|\-//in line breaking| +\li 你可以用 |\-| 命令\ctsref{\@minus}插入自定连字符,以允许 \TeX\ 在特定位置连字化。 +^^{自定连字符} +你也可以控制 \TeX\ 在你的文档中如何连字化\seeconcept{连字}。 +\ifoldeplain^^|\-//在断行中|\fi + +%\li You can tell \TeX\ to allow a line break after a ^{solidus} (/) between +%two words by inserting ^|\slash| \ctsref{\slash} +%between them, e.g., `|fur!-longs\slash fortnight|'. +\li 你可以在两个单词间用 ^|\slash|\ctsref{\slash}插入^{斜线符号} (/), +并允许 \TeX\ 在斜线后断行,比如 `|fur!-longs\slash fortnight|'。 + +%\li You can tell \TeX\ not to break a line between two particular words by +%inserting a ^{tie} (|~|) between those words. +%^^|~//in line breaking| +\li 你可以通过在两个特定单词间插入^{带子} (|~|),以禁止 \TeX\ 在该处断行。 +^^|~//在断行中| + +%\li You can adjust the penalties associated with line breaking by +%assigning different values to \TeX's line-breaking +%\refterm{parameters:parameter}. +\li 你可以给 \TeX\ 的断行\refterm{参数}赋予不同的值,以调整断行时附加的惩罚值。 + +%\li You can enclose a word or sequence of words in an \refterm{hbox}, +%thus preventing \TeX\ from breaking the line anywhere within the hbox. +%^^{hboxes//controlling line breaks} +%\endulist +\li 你可以将一个单词或一列单词放在一个\refterm{水平盒子}中, +从而阻止 \TeX\ 盒子里面的任何位置断行。 +^^{水平盒子//控制断行} +\endulist + +%It's useful to know the places where \TeX\ can break a line: +%\ulist +%\li at glue, provided that: +%\olist +%\li the item preceding the glue is one of the following: +%a box, a discretionary item (e.g., a discretionary hyphen), +%the end of a math formula, +%a whatsit, +%or vertical material produced by |\mark| or |\vadjust| +%or |\insert| +%\li the glue is not part of a math formula +%\endolist +%\noindent +%When \TeX\ breaks a line at glue, it makes the break at the left edge +%of the glue space and forgets about the rest of the glue. +%\li at a kern that's immediately followed by glue, +%provided that this kern isn't within a math formula +%\li at the end of a math formula that's immediately followed by glue +%\li at a penalty, even one within a math formula +%\li at a discretionary break +%\endulist +%When \TeX\ breaks a line, it discards any +%sequence of glue, kerns, and penalty items that follows the break point. +%If such a sequence is followed by the beginning of a math formula, it +%also discards any kern produced by the beginning of the formula. +%\endconcept +知道在什么地方 \TeX\ 可以断行也是有益的: +\ulist +\li 在粘连处,只要: +\olist +\li 粘连之前是下列项目之一:盒子、自定项目(比如自定连字符)、公式结尾、 +小玩意或者用|\mark| 或 |\vadjust| 或 |\insert| 生成的竖直素材 +\li 粘连不是数学公式的一部分 +\endolist +\noindent +在粘连处断行时,\TeX\ 让断行点位于粘连的左边缘,并忽略粘连的其他部分。 +\li 在紧排处,只要其后直接跟着粘连,且该紧排不在数学公式中 +\li 在数学公式结尾处,只要其后直接跟着粘连 +\li 在惩罚项处,即使该惩罚项在数学公式中 +\li 在自定可断点处 +\endulist +在断行时,\TeX\ 丢弃断点之后的任意多个粘连、紧排和惩罚项。 +如果这些项目之后还是一个数学公式起点,它同样丢弃公式起点生成的任何紧排。 +\endconcept + + +%\conceptindex{lists} +%\concept list +\concept 列表 + +%A \defterm{list} is a sequence of \refterm{items:item} +%(\refterm{boxes:box}, \refterm{glue}, \refterm{kerns:kern}, etc.) +%that comprise the contents of an hbox, a vbox, +%or a math formula. +%See \conceptcit{horizontal list}, \conceptcit{vertical list}. +\defterm{列表}(list)是一列用于组成水平列表、竖直列表或数学公式的\refterm{项目}% +(\refterm{盒子}、\refterm{粘连}、\refterm{紧排}等)。 +请参阅\conceptcit{水平列表},\conceptcit{竖直列表}。 + +\endconcept + + +%\concept {log file} +\concept {日志文件} + +%See \conceptcit{file}. +%\endconcept +见\conceptcit{文件}。 +\endconcept + + +\bookmark{2}{以M开头} +%\conceptindex{macros} +%\concept macro +\conceptindex{宏} +\concept 宏 + +%{% Use a brace here so that definitions of explanatory macros remain local. +%% The closing brace is at the end of the concept. +%A \defterm{macro} is a definition that gives a name to a pattern of +%\TeX\ input text.\footnote{More precisely, the definition gives a name +%to a sequence of tokens.} The name can be either a \refterm{control +%sequence} or an \refterm{active character}. The pattern is called the +%``replacement text''. The primary command for defining macros is the +%|\def| control sequence. +{% Use a brace here so that definitions of explanatory macros remain local. +% The closing brace is at the end of the concept. +\defterm{宏}(macro)是一个定义,它给出了 \TeX\ 输入文本的一种模式的名称。% +\footnote{更准确地说,该定义给出了一个记号序列的名称。} +这个名称可以是一个\refterm{控制序列}或一个\refterm{活动字符}。 +其中的模式称为“替换文本”。 +用于定义宏的原始命令是 |\def| 控制序列。 + +%\def\arctheta{\cos \theta + i \sin \theta} +%As a simple example, suppose that you have a document in which +%the sequence `$\cos \theta + i \sin \theta$' occurs many times. +%Instead of writing it out each time, you can define a macro for it: +%\csdisplay +%\def\arctheta{\cos \theta + i \sin \theta} +%| +%Now whenever you need this sequence, you can just ``call'' the macro +%by writing `|\arctheta|' +%and you'll get it. For example, `|$e^{\arctheta}$|' will give you +%`$e^{\arctheta}$'. +\def\arctheta{\cos \theta + i \sin \theta} +举个简单例子,假设你有一个文档, +其中多次出现‘$\cos \theta + i \sin \theta$’这串字符。 +为避免每次都写一遍,你可以给它定义一个宏: +\csdisplay +\def\arctheta{\cos \theta + i \sin \theta} +| +这样每次需要这串字符时, +用‘|\arctheta|’命令“调用”这个宏就可以得到它。 +比如,‘|$e^{\arctheta}$|’将给出‘$e^{\arctheta}$’。 + +%\bix^^{macros//parameters of} +%But the real power of macros lies in the fact that a macro can have +%parameters. When you call a macro that has parameters, you provide +%arguments that are substituted for those parameters. For example, suppose +%you write: +%\pix\indexchar # +%\def\arc#1{\cos #1 + i \sin #1} +%\csdisplay +%\def\arc#1{\cos #1 + i \sin #1} +%| +\bix^^{宏//宏的参数} +但宏的真正威力在于它可以带有参数。 +在调用一个带有参数的宏时,你给出用于替换这些参数的参量。 +例如,假设你这样写: +\pix\indexchar # +\def\arc#1{\cos #1 + i \sin #1} +\csdisplay +\def\arc#1{\cos #1 + i \sin #1} +| + +%The notation |#1| \xrdef{@msharp} indicates the first parameter +%of the macro, which in this case has only one parameter. You now can +%produce a similar form, such as `$\arc{2t}$', with the macro call `|\arc +%{2t}|'. +记号 |#1| \xrdef{@msharp} 表示宏的第一个参数, +在这个例子中宏只有一个参数。 +现在你可以用‘|\arc {2t}|’得到‘$\arc{2t}$’。 + +%More generally, a macro can have up to nine parameters, which you +%indicate as `|#1|', `|#2|', etc\null. in the macro definition. \TeX\ +%provides two kinds of parameters: delimited parameters and undelimited +%parameters. Briefly, a delimited parameter has an \refterm{argument} +%that's delimited, or ended, by a +%specified sequence of tokens (the delimiter), while an undelimited +%parameter has an argument that doesn't need a delimiter to end it. +%First we'll explain how macros work when they have only undelimited +%parameters, and then we'll explain how they work when +%they have delimited parameters. +更一般地,一个宏最多可以有九个参数, +在宏定义中它们分别用`|#1|',`|#2|' 等表示。 +\TeX\ 提供两种类型的宏参数:定界参数和非定界参数。 +简单来说, +定界参数对应一个由特定记号序列(即定界子)定界(即结束)的\refterm{参量}, +而非定界参数对应一个无需定界子结束的参量。 +我们先解释只有非定界参数时宏如何运作, +然后解释包含定界参数时宏如何运作。 + +%^^{parameters//undelimited} +%If a macro has only undelimited parameters, those parameters must appear +%one after another in the macro definition \emph{with nothing between +%them or between the last parameter and the left brace in front of the +%replacement text}. +%A call on such a macro consists of the macro name followed by +%the arguments of the call, one for each parameter. Each argument is +%either: +^^{参数//非定界参数} +当宏只有非定界参数时,这些参数必须依次出现在宏定义中, +\emph{在各个参数之间,以及最后一个参数和替换文本前的左花括号之间,不能有任何东西}。 +对这种宏的调用由该宏的名称,以及后面跟随的各个参量组成。 +每个参量对应一个参数,参量可以是 + +%\ulist \compact +%\li a single \refterm{token} other than a left or right brace, or +\ulist \compact +\li 不为左或右花括号的单个\refterm{记号},或者 + +%\li a sequence of tokens enclosed between a left brace and +%a matching right brace.\footnote{The +%argument can have nested pairs of braces within it, and each of these +%pairs can indicate either a \refterm{group} or a further macro +%argument.} +%\endulist +\li 一个包含在配对的左右花括号之间的记号序列。% +\footnote{参量内部也可以有嵌套的配对花括号, +其中每对花括号表示一个\refterm{编组},或者表示一个另外的宏参量。} +\endulist + +%When \TeX\ encounters a macro, it expands the macro in its gullet +%\seeconcept{\anatomy} +%by substituting each argument for the corresponding +%parameter in the replacement text. The resulting text may contain other macro +%calls. When \TeX\ encounters such an embedded macro call, it expands +%that call immediately without looking at what follows the +%call.\footnote{In computer science terminology, the expansion is ``depth +%first'' rather than ``breadth first''. Note that you can modify the +%order of expansion with commands such as |\expandafter|.} When \TeX's +%gullet gets to a \refterm{primitive} \refterm{command} that +%cannot be further expanded, \TeX\ passes that command to \TeX's stomach. +%The order of expansion is sometimes critical, so in order to help +%you understand it we'll give you an example of \TeX\ at work. +\TeX\ 在食道中展开它所遇到的宏\seeconcept{\anatomy}, +方法是将替换文本中的每个参数替换为它所对应的参量。 +宏展开后所得到的文本中可能还包含其他宏。 +当 \TeX\ 遇到这种嵌套的宏调用时, +它将立即展开此宏调用,完成后再查看后续内容。% +\footnote{用计算机科学中的术语, +宏展开是“深度优先的”,而不是“广度优先的”。 +注意用类似 |\expandafter| 的命令你可以修改宏展开的顺序。} +当 \TeX\ 的食道得到无法再展开的\refterm{原始命令}时, +\TeX\ 就将该命令送入 \TeX\ 的胃。 +宏展开的先后顺序有时候是至关重要的, +为帮助你理解这个问题,下面我们将给出一个例子。 + +%Suppose you provide \TeX\ with the following input: +%\csdisplay +%\def\a#1#2{\b#2#1\kern 2pt #1} +%\def\b{bb} +%\def\c{\char49 cc} +%\def\d{dd} +%\a\c{e\d} % Call on \a. +%| +%Then the argument corresponding to |#1| is |\c|, +%and the argument corresponding to |#2| is |e\d|. +%\TeX\ expands the macro call in the following steps: +假设你给 \TeX\ 提供如下输入: +\csdisplay +\def\a#1#2{\b#2#1\kern 2pt #1} +\def\b{bb} +\def\c{\char49 cc} +\def\d{dd} +\a\c{e\d} % Call on \a. +| +则与 |#1| 对应的参量为 |\c|,与 |#2| 对应的参量为 |e\d|。 +\TeX\ 按照如下步骤展开宏调用: + +%{\vskip\abovedisplayskip\obeylines % ugly +%|\b e\d\c\kern 2pt \c| +%|bbe\d\c\kern 2pt \c| +%|\d\c\kern 2pt \c|\quad(`|b|', `|b|', `|e|' sent to stomach) +%|dd\c\kern 2pt \c| +%|\c\kern 2pt \c|\quad(`|d|', `|d|' sent to stomach) +%|\char49 cc\kern 2pt \c| +%|\c|\quad(`|\char|', `|4|', `|9|', `|c|', `|c|', % +%`|\kern|', `|2|', `|p|', `|t|' sent to stomach) +%|\char49 cc| +%(`|\char49|', `|c|', `|c|' sent to stomach) +%\vskip\belowdisplayskip} +{\vskip\abovedisplayskip\obeylines % ugly +|\b e\d\c\kern 2pt \c| +|bbe\d\c\kern 2pt \c| +|\d\c\kern 2pt \c|\quad (`|b|',`|b|',`|e|' 送到胃里) +|dd\c\kern 2pt \c| +|\c\kern 2pt \c|\quad (`|d|',`|d|' 送到胃里) +|\char49 cc\kern 2pt \c| +|\c|\quad (`|\char|',`|4|',`|9|',`|c|',`|c|',% +`|\kern|',`|2|',`|p|',`|t|' 送到胃里) +|\char49 cc| +(`|\char49|',`|c|',`|c|' 送到胃里) +\vskip\belowdisplayskip} + +%\noindent Note that the letters `|b|', `|c|', `|d|', and `|e|' and the +%control sequences `|\kern|' and `|\char|' are all primitive +%commands that cannot be expanded further. +\noindent 注意字母 `|b|',`|c|',`|d|' 和 `|e|', +以及控制序列 `|\kern|' 和 `|\char|' 都是无法再展开的原始命令。 + +%\bix^^{parameters//delimited} +%A macro can also have ``delimited parameters'', which can be mixed with +%the undelimited ones in any combination. The idea of a delimited +%parameter is that \TeX\ finds the corresponding argument by looking for +%a certain sequence of tokens that marks the end of the argument---the +%delimiter. That is, when \TeX\ is looking for such an argument, it +%takes the argument to be all the tokens from \TeX's current position up +%to but not including the delimiter. +\bix^^{参数//定界参数} +宏也可以包含“定界参数”,它们可以和非定界参数混合使用。 +定界参数的想法是, +\TeX\ 通过寻找标记参量结束的特定记号序列(即定界子)确定对应的参量。 +也就是说,在查找这种参量时, +\TeX\ 选取从当前位置到定界子之间的所有记号,不包含该定界子。 + +%You indicate a delimited parameter by writing `|#|$n$' ($n$ +%must be between $0$ +%and $9$) followed by one or more tokens that act as the delimiter. The +%delimiter extends up to the next `|#|' or `|{|'---which makes sense +%since `|#|' starts another parameter and `|{|' starts the replacement text. +要指定一个定界参数,你可以在 `|#|$n$'($n$ 必须在 $1$ 和 $9$ 之间)% +后面加上一个或多个充当定界子的记号。 +定界子一直延续到下一个 `|#|' 或 `|{|' 为止——这是有道理的, +因为 `|#|' 开始另一个参数,而 `|{|' 开始替换文本。 + +%The delimiter can't be `|#|' or `|{|', so you can tell a delimited +%parameter from an undelimited one by looking at what comes after it. +定界子不能是 `|#|' 或者 `|{|', +因而你可以从后面的字符辨别出定界参数和非定界参数。 + +%If the character after the parameter is `|#|' or `|{|', you've got an +%undelimited parameter; otherwise you've got a delimited one. Note +%the difference in arguments for the two kinds of parameters---an +%undelimited parameter is matched either by a single token or by +%a sequence of tokens enclosed in braces, while a +%delimited parameter is matched by any number of tokens, even zero. +如果参数之后的字符为 `|#|' 或 `|{|', +你得到一个非定界参数,否则你得到一个定界参数。 +注意这两种参数的参量形式不同—— +非定界参数匹配单个记号或者围在花括号中的记号序列, +而定界参数匹配任意多个记号,即便是零个也可以。 + +%An example of a macro that uses two delimited parameters is: +%\def\diet#1 #2.{On #1 we eat #2!} +%\csdisplay +%\def\diet#1 #2.{On #1 we eat #2!!} +%| +%Here the first parameter is delimited by a single space +%and the second parameter is delimited by a period. If you write: +%\csdisplay +%\diet Tuesday turnips. +%| +%you'll get the text ``\diet Tuesday turnips.''. +%But if the delimiting tokens are enclosed in a group, \TeX\ doesn't consider +%them as delimiting. So if you write: +%\csdisplay +%\diet {Sunday mornings} pancakes. +%| +%you'll get the text `\diet {Sunday mornings} pancakes.' +%even though there's a space between `|Sunday|' and `|morning|'. +%When you use a space as a delimiter, +%an end-of-line character ordinarily also delimits the argument +%since \TeX\ converts the end-of-line to a space before the macro +%mechanism ever sees it. +%\eix^^{parameters//delimited} +%\eix^^{macros//parameters of} +下面的例子用到了两个定界参数: +\def\diet#1 #2.{On #1 we eat #2!} +\csdisplay +\def\diet#1 #2.{On #1 we eat #2!!} +| +其中第一个参数用单个空格定界,而第二个参数用英文句号定界。 +如果你这样写: +\csdisplay +\diet Tuesday turnips. +| +你将得到文本“\diet Tuesday turnips.”。 +但若将定界记号放在编组中,\TeX\ 就不会将它们认作定界记号。 +因此如果你这样写: +\csdisplay +\diet {Sunday mornings} pancakes. +| +即使在 ‘|Sunday|’ 和 ‘|morning|’ 之间有一个空格, +你也将得到文本‘\diet {Sunday mornings} pancakes.’。 +当你将空格符作为定界子时,行尾符一般同样定界了对应的参量; +这是因为 \TeX\ 在宏机制运作之前就将行尾符都转换为空格了。 +\eix^^{参数//定界参数} +\eix^^{宏//宏的参数} + +%Once in a while you might need to define a macro that has `|#|' as a +%meaningful character within it. +%You're most likely to need to do this when you're defining a macro +%that in turn defines a second macro. +%What then do you do about +%the parameters of the second macro to avoid getting \TeX\ confused? +%The answer is that you write +%two `|#|'s for every one that you want +%when the first macro is expanded. For example, suppose you +%write the macro definition: +%\def\first#1{\def\second##1{#1/##1}} +%\csdisplay +%\def\first#1{\def\second##1{#1/##1}} +%| +%Then the call `|\first{One}|' defines `|\second|' as: +%\csdisplay +%\def\second#1{One/#1} +%| +%and the subsequent call `|\second{Two}|' produces the text +%\def\second#1{One/#1}% +%`\second {Two}'. +偶尔在你所定义的宏里面需要将`|#|'用做一个有意义的字符。 +当你在宏定义中实际上又定义了第二个宏时,你多半需要这样做。 +怎样处理第二个宏的参数,以让 \TeX\ 不会混淆它们俩呢? +答案是,在第一个宏展开后需要一个‘|#|’的地方写上两个‘|#|’。 +假如你写出下面的宏定义: +\def\first#1{\def\second##1{#1/##1}} +\csdisplay +\def\first#1{\def\second##1{#1/##1}} +| +则对‘|\first{One}|’的调用将把‘|\second|’定义为: +\csdisplay +\def\second#1{One/#1} +| +而随后的调用‘|\second{Two}|’将得到文本 +\def\second#1{One/#1}% +`\second {Two}'。 + +%A number of commands provide additional ways of defining macros +%(see pp.~\xrefn{mac1}--\xrefn{mac2}). +%For the complete rules pertaining to macros, see \knuth{Chapter~20}. +%}% close brace at the start of the `macro' concept. +%\endconcept +还有一些命令提供了宏的其他定义方式(见第~\xrefn{mac1}--\xrefn{mac2}~页)。 +在\knuth{第~20~章}中有关于宏的完整规则。 +}% close brace at the start of the `macro' concept. +\endconcept + + +%\concept magnification +\concept 放大率 + +%When \TeX\ typesets your document, it multiplies all dimensions +%by a +%\refterm{magnification} factor $f/1000$, +%where $f$ is the value of the ^|\mag| parameter \ctsref\mag. +%Since the default value of |\mag| is $1000$, the normal case is that +%your document is typeset just as specified. +%Increasing the magnification is often useful when you're typesetting a document +%that will later be photoreduced. +\TeX\ 排版文档时将把所有尺寸乘以一个放大(magnification)因子 $f/1000$, +其中 $f$ 是 ^|\mag| 参数\ctsref\mag 的值。 +由于 |\mag| 的默认值为 $1000$,在一般情形下文档是照常排版的。 +若以后需要缩印文档,增加文档的放大率通常就比较有用。 + +%You can also apply magnification to a single \refterm{font} so as to get +%a smaller or larger version of that font than its ``^{design size}''. You +%need to provide the device driver with a ^{shape file} +%\seeconcept{font} for +%each magnification of a font that you're using---% +%unless the fonts are built into your printer and your device driver +%knows about them. +%When you're defining a font with +%the |\font| command \ctsref{\font}, you can specify a magnification with +%the word `|scaled|'. For example: +你也可以缩放一个\refterm{字体}, +以得到比它的“^{设计大小}”更小或更大的字体。 +对每个使用的缩放字体,你需要提供它的^{字形文件}给设备驱动程序% +\seeconcept{字体}—— +除非该字体已经内嵌在打印机中,而设备驱动程序也知道它。 +在用 |\font| 命令\ctsref{\font}定义一个字体时, +你可以用单词‘|scaled|’指定放大率。比如: + +%\csdisplay +%\font\largerbold = cmbx10 scaled 2000 +%| +%defines `|\largerbold|' as a font that is +%twice as big as |cmbx10| (Computer Modern +%Bold Extended $10$-point) and has the character shapes +%uniformly enlarged by a factor of~$2$. +\csdisplay +\font\largerbold = cmbx10 scaled 2000 +| +将 `|\largerbold|' 定义为两倍大小的 |cmbx10| 字体% +(计算机现代粗体扩展的$10$点字体), +它的各个字符形状也统一地放大了两倍。 + +%Many computer centers find it convenient to provide fonts scaled by a ratio +%of $1.2$, corresponding to magnification values of $1200$, $1440$, etc. +%\TeX\ has special names for these values: +%^^|\magstep| +%`|\magstep1|' for $1200$, +%`|\magstep2|' for $1440$, and so forth up to `|\magstep5|'. The special +%value `^|\magstephalf|' corresponds to magnification by $\sqrt{1.2}$, which +%is visually halfway between `|\magstep0|' (no magnification) and +%`|\magstep1|'. For example: +% +%\csdisplay +%\font\bigbold = cmbx10 scaled \magstephalf +%| +为方便起见,很多计算机中心提供了按$1.2$比例放大的字体, +这些字体对应的放大率为 $1200$,$1440$,等等。 +在 \TeX\ 中这些放大率有特别的名称: +^^|\magstep| +`|\magstep1|' 表示 $1200$, +`|\magstep2|' 表示 $1440$,依此类推直到 `|\magstep5|'。 +特殊值 `^|\magstephalf|' 对应$\sqrt{1.2}$倍的放大率, +它看上去位于`|\magstep0|'(不放大)和 +`|\magstep1|' 的正中间。例如: + +\csdisplay +\font\bigbold = cmbx10 scaled \magstephalf +| + +%You can specify a \refterm{dimension} as it will be +%measured in the final document independent of magnification by putting +%`^|true|' in front of the unit. For instance, `|\kern 8 true pt|' +%produces a kern of $8$ points whatever the magnification. +若想指定一个最终文档中的\refterm{尺寸},让它不受放大率影响, +你可以在单位前面加上 `^|true|'。 +例如,`|\kern 8 true pt|' 将生成 $8$ 点大小的紧排,不管放大率为多少。 + +\endconcept + +%\concept margins +\concept 边距 + +%The \refterm{margins} +%of a page define a rectangle that normally +%contains the printed matter on the page. +%You can get \TeX\ to print material outside of this rectangle, +%but only by taking some explicit action that moves the material there. +%\TeX\ considers headers and footers to lie outside the margins. +页面的\refterm{边距}(margin)确定了一个矩形边框, +该边框通常包含页面的印刷内容。 +你也可以让 \TeX\ 在这个边框之外印刷内容, +但你必须用某种明确方法将内容移动到那里。 +\TeX\ 将页眉和页脚放在边框外面。 + +%The rectangle is defined in terms of its upper-left corner, its width, and +%its depth. The location of the upper-left corner is defined by +%the ^|\hoffset| +%and ^|\voffset| parameters +%\ctsref\voffset. The default is to place that corner one inch from the top +%and one inch from the left side of the page, corresponding to a value of +%zero for both |\hoffset| and |\voffset|.% +%\footnote{This seems to us to be an odd convention. +%It would have been more natural to have the $(0,0)$ +%point for |\hoffset| and |\voffset| be at the upper-left corner of the +%paper and to have set their default values to one inch.} +%The width of the rectangle is given by ^|\hsize| and the depth by ^|\vsize|. +这个矩形边框通过它的左上角位置,宽度,以及深度来定义。 +左上角位置用 ^|\hoffset| 和 ^|\voffset| \ctsref\voffset 参数来定义。 +默认将这个位置放在离页面顶端和左端各一英寸的地方, +这对应于|\hoffset| 和 |\voffset| 都取值为零。% +\footnote{这个约定看起来比较奇怪。 +让 |\hoffset| 和 |\voffset| 的 $(0,0)$ 点对应页面的左上角, +而将它们的默认值设置为一英寸,将会更自然一些。} +边框的宽度用 ^|\hsize| 给出,而深度用 ^|\vsize| 给出。 + +%The implications of these conventions are: +%\ulist\compact +%\li The left margin is given by |\hoffset|\tplus|1in|. +%\li The right margin is given by the width of the paper minus +% |\hoffset|\tplus|1in|\tplus|\hsize|. +%\li The top margin is given by |\voffset|\tplus|1in|. +%\li The bottom margin is given by the length of the paper minus +% |\voff!-set|\tplus|1in|\tplus|\vsize|. +%\endulist +%From this information you can see what parameters you need to +%change in order to change the margins. +这些规定给出的结果是: +\ulist\compact +\li 左边距等于 |\hoffset|\tplus|1in|。 +\li 右边距等于页面宽度减去 |\hoffset|\tplus|1in|\tplus|\hsize|。 +\li 上边距等于 |\voffset|\tplus|1in|。 +\li 下边距等于页面长度减去 |\voff!-set|\tplus|1in|\tplus|\vsize|。 +\endulist +从这些信息中你可以知道,要改变页面边距应该修改哪些参数。 + +%Any changes that you make to |\hoffset|, |\voffset|, or |\vsize| become +%effective the next time \TeX\ starts a page. In other words, if you change +%them within a page, the change will affect only the \emph{following} pages. +%If you change |\hsize|, the change will become effective immediately. +%\endconcept +对 |\hoffset|,|\voffset| 或者 |\vsize| 的修改在 \TeX\ 开始新页面时才生效。 +也就是说,如果你在页面中间改变它们,这些改动将只影响\emph{后面的}页面。 +然而,对 |\hsize| 的修改却会立即生效。 +\endconcept + + +%\conceptindex{marks} +%\concept mark +\concept 标记 + +%A \defterm{mark} is an item that you can insert into a +%horizontal, vertical, or math list and later recover from within your +%output routine. Marks are useful for purposes such as +%keeping track of topics to appear in page headers. +%Each mark has a list of tokens---the ``^{mark text}''---associated with it. +%The ^|\mark| command \ctsref{\mark} expects such a token list as its argument, +%and appends an item containing that token list (after +%expansion) to whatever list \TeX\ is +%currently building. The ^|\topmark|, ^|\firstmark|, and ^|\botmark| commands +%\ctsref{\topmark} can be used to retrieve various marks on a page. +%These commands are most often used in page headers and footers. +%^^{footers//marks used in} +%^^{headers//marks used in} +\defterm{标记}(mark)是可以插入水平、竖直或者数学列表中, +并在输出例行程序中还原的项目。 +标记可用于记录即将出现在页眉中的内容等。 +每个标记带有一列记号——即“^{标记文本}”。 +^|\mark| 命令\ctsref{\mark}以这样的记号列作为参量, +并将包含这个记号列(在展开之后)的项目添加到 \TeX\ 当前构造的列表中。 +^|\topmark|,^|\firstmark| 和 ^|\botmark| 命令 \ctsref{\topmark} +用于取回页面上的各种标记。 +这些命令经常在页眉和页脚中用到。 +^^{页脚//用于页脚的标记} +^^{页眉//用于页眉的标记} + +%\margin{This example of {\tt\\mark} replaces the previous explanatory +%paragraph.} +%Here is a simplified example. +%Suppose you define a section heading macro as follows: +%\csdisplay +%\def\section#1{\medskip{\bf#1}\smallskip\mark{#1}} +%% #1 is the name of the section +%| +%^^|\mark| +%This macro, when called, will produce a section heading in boldface and +%will also record the name of the section as a mark. +%You can now define the header for each printed page +%as follows: +%\csdisplay +%\headline = {\ifodd\pageno \hfil\botmark\quad\folio +% \else \folio\quad\firstmark\hfil \fi} +%| +%Each even (left-hand) page will now have the page number followed by the +%name of the first section on that page, while each odd (right-hand) page +%will have the page number followed by the name of the last section on +%that page. Special cases, e.g., no sections starting on a page, will +%generally come out correctly because of how ^|\firstmark| +%and ^|\botmark| work. +\margin{This example of {\tt\\mark} replaces the previous explanatory +paragraph.} +这里有个简化的例子。假设你定义了节标题宏如下: +\csdisplay +\def\section#1{\medskip{\bf#1}\smallskip\mark{#1}} +% #1 is the name of the section +| +^^|\mark| +调用这个宏将生成粗体的节标题,并将标题名记录为一个标记。 +现在你可以对每个打印页定义页眉如下: +\csdisplay +\headline = {\ifodd\pageno \hfil\botmark\quad\folio + \else \folio\quad\firstmark\hfil \fi} +| +这样,每个偶数页(左手页)页眉是页码加上该页第一个标题名, +而每个奇数页(右手页)页眉是该页最后一个标题名加上页码。 +特殊情形,比如该页没有节标题, +通常也会按照 ^|\firstmark| 和 ^|\botmark| 的规定正常显示。 + +%When you split a page using the |\vsplit| command \ctsref{\vsplit} you can +%retrieve the mark texts of the first and last marks of the split-off +%portion with the ^|\splitfirstmark| and ^|\splitbotmark| commands +%\ctsref{\splitfirstmark}. +在用 |\vsplit| 命令\ctsref{\vsplit}分割页面时, +用 |\splitfirstmark| 和 ^|\splitbotmark| 命令\ctsref{\splitfirstmark}% +就可以取得分割的这部分中的第一个和最后一个标记的标记文本。 + +%See \knuth{pages~258--260} for a more precise explanation of how +%to create and retrieve marks. +%\endconcept +在\knuth{第~258--260~页}中,对如何生成和取回标记作了更准确的解释。 +\endconcept + + +%\concept math mode +\concept 数学模式 + +%{\tighten +%A \defterm{math mode} is a \refterm{mode} that \TeX\ is in when it is +%building a math formula. \TeX\ has two different math modes: ^{text +%math mode} for building a formula to be embedded within a line of text, +%and ^{display math mode} for building a formula to appear on a line by +%itself. You indicate text math mode by enclosing the formula in +%|$|'s, and display math mode by enclosing the formula in +%|$$|'s. +%%\TeX\ will accept most \refterm{commands:command} in +%%math mode. If it encounters a command in math mode that doesn't make +%%sense in a formula, it will complain. +%An important property of both +%math modes is that \emph{input spaces don't count}. See +%\knuth{pages~290--293} for details on how \TeX\ responds to different +%commands in math mode. +%\par} +\defterm{数学模式}(math mode)是 \TeX\ 构造数学公式时所在的\refterm{模式}。 +\TeX\ 有两种数学模式: +^{文内数学模式}用于构造放在文本行中的公式, +而^{陈列数学模式}用于构造单独一行显示的公式。 +括在 |$| 里面的公式表示一个文内数学公式, +而括在 |$$| 里面的公式表示一个陈列数学公式。 +%\TeX\ will accept most \refterm{commands:command} in +%math mode. If it encounters a command in math mode that doesn't make +%sense in a formula, it will complain. +这两种数学模式有个重要特性,即\emph{其中的输入空格都被忽略}。 +\knuth{第~290--293~页}详细介绍了在数学模式中 \TeX\ 如何处理各种不同命令。 + +\endconcept + + +%\conceptindex{mathcodes} +%\concept mathcode +\conceptindex{数学码} +\concept 数学码 + +%A \defterm{mathcode} is a number that \TeX\ uses to identify and +%describe a math character, +%^^{math characters//described by mathcodes} +%i.e., a character that has a +%particular role in a math formula. A mathcode conveys three pieces of +%information about a character: its \refterm{font} position, its +%\refterm{family}, and its \refterm{class}. +%Each of the $256$ possible +%input characters has a mathcode, which is defined by the \TeX\ program +%but can be changed. +\defterm{数学码}(mathcode)是一个数,\TeX\ 把这个数用来识别和描述一个数学字符, +^^{数学字符//用数学码描述} +即一个在数学公式中有特别作用的字符。 +数学码表达了一个字符三个方面的信息: +它的字符位置,它所在的字体\refterm{族},以及它所属的类。 +$256$ 个可能的输入字符中每个字符都有一个数学码, +它们由 \TeX\ 程序定义,但也能被修改。 + +%^^{family//as part of mathcode} +%\TeX\ has sixteen families of fonts, numbered $0$--$15$. Each +%family contains three fonts: one for \refterm{text size}, one for +%\refterm{script size}, and one for \refterm{scriptscript size}. \TeX\ +%chooses the size of a particular character, and therefore its font, +%according to the context. The class of a character specifies its role +%in a formula (see \knuth{page~154}). For example, the equals sign `|=|' +%is in class $3$ (Relation). \TeX\ uses its knowledge of character +%classes when it is deciding how much space to put between different +%components of a math formula. +^^{族//作为数学码的一部分} +\TeX\ 有十六个字体族,它们用$0$ 到 $15$ 编号。 +每个字体族包含三个字体:一个用于\refterm{文本尺寸}, +一个用于\refterm{标号尺寸},另一个用于\refterm{小标号尺寸}。 +\TeX\ 根据上下文选择特定字符的尺寸,从而选择它的字体。 +一个字符的类指定了它在公式中扮演的角色(见\knuth{第~154~页}。 +例如,等号‘|=|’属于第$3$类(关系符号)。 +\TeX\ 根据字符所属的类确定数学公式各部分的间距大小。 + +%The best way to understand what mathcodes are all about is to see how +%\TeX\ uses them. So we'll show you what \TeX\ does with a +%character token $t$ of \refterm{category code}~11 or~12 in a math +%formula: +要全面理解数学码,最好是看 \TeX\ 如何使用它们。 +因此我们将说明,对数学公式中\refterm{类别码}为 11 或 12 的字符记号$t$, +\TeX\ 如何处理它: + +%\olist\compact +%\li It looks up the character's mathcode. +%\li It determines a family $f$ from the mathcode. +%\li It determines the size $s$ from the context. +%\li It selects a font $F$ by picking the font for size $s$ in family $f$. +%\li It determines a character number $n$ from the mathcode. +%\li It selects as the character $c$ to be typeset the character +%at position $n$ of font $F$. +%\li It adjusts the spacing around $c$ according to the class of $t$ and +%the surrounding context. +%\li It typesets the character $c$. +%\endolist +\olist\compact +\li 它查找这个字符的数学码。 +\li 它从数学码确定字体族$f$。 +\li 它从上下文确定字符尺寸$s$。 +\li 它选择第$f$族的尺寸为$s$的字体$F$. +\li 它从数学码确定字符编号$n$。 +\li 它从字体$F$的位置$n$选出字符$c$作为要排版的字符。 +\li 它根据$t$所属的类和上下文调整$c$周围的间距。 +\li 它排版字符$c$。 +\endolist + +%The context dependence in +%items (3) and (7) implies that \TeX\ cannot typeset a math character +%until it has seen the entire formula containing the +%math character. For example, in the formula +%`|$a\over b$|', \TeX\ doesn't know what size the `|a|' should be until it +%has seen the |\over|. +在(3)和(7)中的上下文相关性意味着, +\TeX\ 在排版数学字符时,要先看完该字符所在的整个公式。 +比如对于公式‘|$a\over b$|’,\TeX\ 无法确定‘|a|’的尺寸,直到它看到|\over|。 + +%{\tighten +%The mathcode of a character is encoded according to the formula $4096c +%+ 256f + n$, where $c$ is the class of the character, $f$ is its +%\refterm{family}, and $n$ is its \refterm{\ascii\ character} code within +%the family. You can change \TeX's interpretation of an input character +%in math mode by assigning a value to the ^|\mathcode| +%table entry \ctsref{\mathcode} +%for that character. The character must have a +%\refterm{category code} of $11$ (letter) or $12$ (other) for \TeX\ to +%look at its |\mathcode|. +%}\par +{\tighten +字符的数学码由公式$4096c + 256f + n$ 来表示, +其中 $c$ 是字符所属的类,$f$ 是它所在的字体\refterm{族}, +而 $n$ 是它在该字体族中的\refterm{\ascii}编码。 +通过对一个输入字符的 ^|\mathcode| 表格项赋值\ctsref{\mathcode}, +你可以改变数学模式中 \TeX\ 对这个字符的解释。 +只有\refterm{类别码}为$11$(字母)或者$12$(其它)的字符, +\TeX\ 才会查看它的 |\mathcode|。 +}\par + +%^^{family//variable} +%You can define a mathematical character to have a ``variable'' family by +%giving it a class of $7$. Whenever \TeX\ encounters that character in a +%math formula, it takes the family of the character to be the current +%value of the |\fam| parameter \ctsref{\fam}. A variable family enables +%you to specify the font of ordinary text in a math formula. For +%instance, if the roman characters are in family $0$, the assignment +%|\fam = 0| +%will cause ordinary text in a math formula to be set in roman type +%rather than in something else like math italic type. If the value of +%|\fam| is not in the range from $0$ to $15$, \TeX\ takes the value to be +%$0$, thus making classes $0$ and $7$ equivalent. +%\TeX\ sets |\fam| to $-1$ whenever it enters math mode. +%\endconcept +^^{族//可变族} +只要将一个数学字符分到第$7$类,你可以将它的族定义为“可变的”。 +当 \TeX\ 在数学公式中遇到这种字符时, +它就将该字符的字体族取为 |\fam| 参数\ctsref{\fam}的当前值。 +可变的字体族使得你可以指定数学公式中普通文本的字体。 +举个例子,如果罗马字符是在第$0$族, +赋值 |\fam = 0| 将让数学公式的普通文本以罗马字体显示, +而不是用其他类似数学意大利体的字体显示。 +如果 |\fam| 的值不在 $0$ 到 $15$ 的范围中, +\TeX\ 取它的值为 $0$,从而让第 $0$ 类和第 $7$ 类等价。 +每次进入数学模式时 \TeX\ 都设定 |\fam| 为 $-1$。 +\endconcept + + +%\conceptindex{mathematical units} +%\concept{mathematical unit} +\conceptindex{数学单位} +\concept{数学单位} + +%A \defterm{mathematical unit}, denoted by `|mu|', is a unit of distance +%that is used to specify \refterm{glue} in math formulas. See +%\conceptcit{muglue}. +%\endconcept +\defterm{数学单位}(mathematical unit),记为‘|mu|’, +是一个用于设定数学公式中的\refterm{粘连}大小的距离单位。 +见\conceptcit{数学粘连}。 +\endconcept + + +%\conceptindex{modes} +%\concept mode +\conceptindex{模式} +\concept 模式 + +%When \TeX\ is processing your input in its stomach \seeconcept{\anatomy}, +%it is in one of six \defterm{modes}: +%\ulist\compact +%\li ^{ordinary horizontal mode} (assembling a paragraph) +%\li ^{restricted horizontal mode} (assembling an \refterm{hbox}) +%\li ^{ordinary vertical mode} (assembling a page) +%\li ^{internal vertical mode} (assembling a \refterm{vbox}) +%\li ^{text math mode} (assembling a formula that appears in text) +%\li ^{display math mode} +%(assembling a formula that appears on a line by~itself) +%^^{horizontal mode}^^{vertical mode}^^{math mode} +%\endulist +%The mode describes the kind of entity that \TeX\ is putting together. +\TeX\ 在胃中处理你的输入时\seeconcept{\anatomy}, +它总是处于六种\defterm{模式}(mode)的其中一种: +\ulist\compact +\li ^{普通水平模式}(组装段落) +\li ^{受限水平模式}(组装\refterm{水平盒子}) +\li ^{普通竖直模式}(组装页面) +\li ^{内部竖直模式}(组装\refterm{竖直盒子}) +\li ^{文内数学模式}(组装在文本中显示的公式) +\li ^{陈列数学模式}(组装单独一行显示的公式) +^^{水平模式}^^{竖直模式}^^{数学模式} +\endulist +模式描述了 \TeX\ 正在组装的实体的类型。 + +%Because you can embed one kind of entity within another, e.g., a vbox +%within a math formula, \TeX\ keeps track not just of one mode but of a +%whole list of modes (what computer scientists call a ``stack''). +%Suppose that \TeX\ is in mode $M$ and encounters something that +%puts it into a new mode \Mprimeperiod. When it finishes its work in +%mode \Mprimecomma, it resumes what it was doing in mode \Mperiod. +由于你可以将某种实体嵌入另一种实体中,比如将一个竖直盒子放入数学公式中, +\TeX\ 记录的不只是一个模式,而是一整列模式(即计算机科学中所说的“栈”)。 +假设 \TeX\ 在模式$M$中,然后遇到某些东西而进入新模式$M'$。 +当它完成在模式$M'$的工作时,它将继续在模式$M$中的工作。 + +\endconcept + + +%\concept muglue +\concept 数学粘连 + +%\defterm{Muglue} is a kind of \refterm{glue} that you can use only in math +%formulas. It is measured in ^|mu| (\refterm{mathematical +%units:mathematical unit}). +%^^{mathematical units}^^{glue//mathematical} +%One |mu| is equal to \frac1/{18} em, where +%the size of an em is taken from \refterm{family} 2 of the math fonts. +%\TeX\ automatically adjusts the size of muglue according to the context. +%For instance, a glue size of |2mu| is normally smaller within a +%subscript than it is within ordinary text. +%You must use the ^|\mskip| command to produce muglue. +%For example, `|\mskip 4mu plus 5mu|' produces mathematical glue with +%natural space of four |mu| and \refterm{stretch} of five |mu|. +\defterm{数学粘连}(muglue)是一种仅用于数学公式中的\refterm{粘连}, +它的度量单位是 ^|mu|(\refterm{数学单位})。 +^^{数学单位}^^{粘连//数学粘连} +1 |mu| 的大小与 \frac1/{18} em 相等, +而 1 em 的大小取自第$2$\refterm{族}数学字体。 +\TeX\ 根据上下文自动调整 |mu| 的大小。 +比如同样是 |2mu| 大小的粘连,在下标中一般就比在普通文本中小一些。 +要生成数学粘连,你必须使用 ^|\mskip| 命令。 +例如,‘|\mskip 4mu plus 5mu|’生成了一个自然大小为 |4mu|, +\refterm{伸长量}为|5mu| 的数学粘连。 +\endconcept + + +\bookmark{2}{以N开头} +%\conceptindex{numbers} +%\concept number +\conceptindex{数} +\concept 数 + +%In \TeX, a \defterm{number} is a positive or negative integer. +%You can write a number in \TeX\ in four different ways: +%\olist\compact +%\li as an ordinary decimal integer, e.g., |52| +%\li as an octal number, e.g., |'14| ^^{octal numbers} +%\li as a hexadecimal number, e.g., |"FF0| ^^{hexadecimal numbers} +%\li as the code for an \refterm{\ascii\ character}, e.g., |`)| +%or |`\)| +%\endolist +%\noindent +%Any of these forms can be preceded by `|+|' or `|-|'. +在 \TeX\ 中,\defterm{数}(number)是指正整数或负整数。% +%\footnote{译注:在本书的翻译中,经常直接将“number”称为“整数”。} +\TeX\ 中的数可以用如下四种不同方式表示: +\olist\compact +\li 用通常的十进制整数表示,比如 |52| +\li 用八进制数表示,比如 |'14| ^^{八进制数} +\li 用十六进制数表示,比如 |"FF0| ^^{十六进制数} +\li 用字符的\refterm{\ascii}编码表示,比如 |`)| 或 |`\)| +\endolist +\noindent +上述任何一种形式都可以在前面加上 `|+|' 或者 `|-|' 。 + +%An octal number can have only the digits |0|--|7|. +%^^{octal numbers} +%A hexadecimal number can have digits |0|--|9| and +%|A|--|F|, representing +%values from $0$ to $15$. +%^^{hexadecimal numbers} +%You can't, alas, use lowercase letters when you write a hexadecimal number. +%If you need an explanation of octal and hexadecimal numbers, +%you'll find one on \knuth{pages~43--44}. +八进制数只能包含数字 |0|--|7|。 +^^{八进制数} +而十六进制数可以包含数字 |0|--|9| 以及字母 |A|--|F|, +它们分别表示从 $0$ 到 $15$ 的数值。 +^^{十六进制数} +然而,你不能用小写字母来表示十六进制数。 +在\knuth{43--44~页}中你可以找到八进制和十六进制数的解释。 + +%A decimal, octal, or hexadecimal number +%ends at the first character that can't be part of the number. +%Thus a decimal number ends when \TeX\ sees, say, a letter, even though a +%letter between `|A|' and `|F|' would not end a hexadecimal number. +%You can end a number with one or more spaces and +%\TeX\ will ordinarily ignore them.\footnote{ +%When you're defining a macro that ends in a number, you should always +%put a space after that number; otherwise \TeX\ may later combine that +%number with something else.} +十进制、八进制或十六进制数都在第一个不能作为该数一部分的字符处结束。 +因此,任何字母都会结束一个十进制数, +而`|A|'和`|F|'之间的字母却不能结束一个十六进制数。 +你也可以用一个或多个空格结束一个数, +\TeX\ 通常将忽略这些空格。\footnote{% +在定义一个以数结尾的宏时, +你应该始终在该数后面加上空格; +否则到后面 \TeX\ 可能将该数和其他字符结合在一起。} + +%The fourth form above specifies a number as the +%\minref{\ascii} code for a character. +%^^{characters//\ascii\ codes for} +%\TeX\ ignores spaces after this form of number also. +%You can write a number in this form either as |`|$c$ or as |`\|$c$. +%The second form, though longer, has the advantage that you can use it +%with \emph{any} character, even `|\|', `|%|', or `|^^M|'. +%It does have one rather technical disadvantage: when \TeX\ is expanding +%a token sequence for a command such as |\edef| or |\write|, +%^^|\edef//expansion of {\tt\\'\it c} in| +%^^|\write//expansion of {\tt\\'\it c} in| +%occurrences of `|\|$c$' within numbers will also be expanded if they can be. +%That's rarely the effect you want. +上述的第四种形式用字符的\minref{\ascii}编码表示一个数。 +^^{字符//字符的 \ascii\ 码} +\TeX\ 同样忽略此形式的数后面的空格。 +一个数按这种形式可以写成 |`|$c$ 或者 |`\|$c$。 +第二种写法虽然长一点, +但优点在于可以用于\emph{任何}字符, +甚至是 `|\|',`|%|' 或者 `|^^M|'。 +不过它确实也有一个技术上的缺点: +比如当 \TeX\ 展开 |\edef| 或 |\write| 命令的记号序列时, +^^|\edef//在其中展开 {\tt\\'\it c}| +^^|\write//在其中展开 {\tt\\'\it c}| +出现在数中间的能展开的`|\|$c$'将同样被展开; +而这多半不是你想要的。 + +%The following are all valid representations of the decimal number +%$78$: +%\csdisplay +%78 +078 "4E '116 `N `\N +%| +下面是十进制数$78$的全部有效的表示方式: +\csdisplay +78 +078 "4E '116 `N `\N +| + +%You can't use a number in text by itself since a number isn't +%a command. +%However, you can insert the decimal form of a number in text +%by putting a ^|\number| command (\xref\number) in front of it +%or the roman numeral form by putting a ^|\romannumeral| command +%in front of it. +你不能在文本中单独使用一个数,因为它不是命令。 +但是,将它放在 ^|\number| 命令(\xref\number )之后, +你就可以在文本中插入这个数的十进制形式; +或者将它放在 ^|\romannumeral| 命令之后,以得到它的罗马数字形式。 + +%You can also use ^{decimal constant}s, i.e., numbers with a fractional part, +%for specifying dimensions \seeconcept{dimension}. +%A decimal constant has a ^{decimal point}, which +%can be the first character of the constant. +%You can use a comma instead of a period to represent the decimal point. +%A decimal constant can be preceded by a plus or minus sign. +%Thus `|.5in|', +%`|-3.22pt|', and `|+1,5\baselineskip|' are valid dimensions. +%You can't, however, use decimal constants +%in any context \emph{other} than as the ``factor'' part of a dimension, +%i.e., its multiplier. +你也可以用^{小数},即带有小数部分的数,来指定一个尺寸\seeconcept{尺寸}。 +小数包含一个可以在最前面的^{小数点}。 +小数点的圆点也可以用逗号代替。小数之前也可以加上正号或负号。 +因此 `|.5in|',`|-3.22pt|' 和 `|+1,5\baselineskip|' 都是有效的尺寸。 +但是,除了作为尺寸的“因子”,即乘数, +你不能在\emph{其他}地方使用小数。 + +\endconcept + + +\bookmark{2}{以O开头} +%\concept{ordinary mode} +\concept{普通模式} + +%An \defterm{ordinary mode} is a \refterm{mode} that \TeX\ is in when it is +%assembling a paragraph into lines or assembling lines +%into a page. See \conceptcit{horizontal mode}, \conceptcit{vertical mode}. +%\endconcept +\defterm{普通模式}(ordinary mode)是 \TeX\ 分段为行或组行为页时所在的\refterm{模式}。 +见\conceptcit{水平模式},\conceptcit{竖直模式}。 +\endconcept + + +%\concept outer +\concept 外部的 + +%\bix^^{macros//outer} +%An \defterm{outer} macro is one that you can't use in certain contexts +%where \TeX\ is processing tokens at high speed. +%The purpose of making a command outer is to enable \TeX\ to catch +%errors before it's gone too far. +%When you define a macro, you can make it outer with the +%^|\outer| command \ctsref\outer. +\bix^^{宏//外部宏} +\defterm{外部的}(outer)宏是在某些 \TeX\ 高速处理记号的环境中无法使用的宏。 +将一个命令定义为外部的,目的是使 \TeX\ 能够尽早捕获到错误。 +在定义宏时,你可以用 ^|\outer| 命令\ctsref\outer 让它成为外部的。 + +%You cannot use an outer macro in any of the following contexts: +%\ulist\compact +%\li within an argument to a macro +%\li in the parameter text or replacement text of a definition +%\li in the preamble to an alignment +%\li in the unexecuted part of a conditional test +%\endulist +%\noindent +%An outer context is a context in which you can use an outer macro, +%i.e., it's any context other than the ones just listed. +在下列这些环境中,你不可以使用外部宏: +\ulist\compact +\li 在命令的参量中 +\li 在宏定义的参数文本或替换文本中 +\li 在阵列的导言中 +\li 在条件测试的跳过部分中 +\endulist +\noindent +外部环境是你可以使用外部宏的环境,即刚才列出的环境除外的环境。 + +%For example, the following input would be a forbidden use of an +%outer macro: +%\csdisplay +%\leftline{\proclaim Assertion 2. That which is not inner +% is outer.} +%| +%The |\proclaim| macro (\xref{\@proclaim}) is defined in \plainTeX\ +%to be outer, but it's being used here in a macro argument to |\leftline|. +%\eix^^{macros//outer} +例如,下面的输入就是外部宏的禁止用法: +\csdisplay +\leftline{\proclaim Assertion 2. That which is not inner + is outer.} +| +|\proclaim| 宏(\xref{\@proclaim})在 \plainTeX\ 中被定义为外部的, +但这里却将它放在 |\leftline| 的宏参量中。 +\eix^^{宏//外部宏} + +\endconcept + + +%\concept {output routine} +\concept {输出例行程序} + +%When \TeX\ has accumulated +%at least enough material to fill up a page, it chooses a breakpoint +%and places the material before the breakpoint in |\box255|. It then +%calls the +%current \defterm{output routine}, which processes the material and eventually +%sends it to the \dvifile. +%^^{\dvifile//material from output routine} +%The output routine can perform further +%processing, such as inserting headers, footers, and footnotes. +%\refterm{\PlainTeX:\plainTeX} provides +%a default output routine that inserts a centered page number +%at the bottom of each page. +%By providing a different output routine you can achieve such +%effects as double-column output. +%You can think of the output routine as having a single responsibility: +%disposing of the material in |\box255| one way or another. +\TeX\ 收集足够填满页面的素材后,它选择分页点并将分页点之前的素材放在 |\box255| 中。 +然后 \TeX\ 调用\defterm{输出例行程序}(output routine)% +以加工素材并最终将它送到 \dvifile 中。 +^^{\dvifile//来自输出例行程序的素材} +输出例行程序可以执行进一步的加工,比如插入页眉,页脚和脚注。 +\refterm{\PlainTeX:\plainTeX} 提供了一个默认的输出例行程序, +它在每个页面底部插入居中的页码。 +通过提供不同的输出例行程序,你可以达到诸如双栏输出的效果。 +你可以认为输出例行程序只有一个职责: +以某种方式处理掉放在 |\box255| 中的素材。 + +%The current output routine is defined by the value of ^|\output| +%\ctsref{\output}, which is a list of \refterm{tokens:token}. When \TeX\ +%is ready to produce a page, it just expands the token list. +当前的输出例行程序由 ^|\output|\ctsref{\output}的值定义,它是一个\refterm{记号}列。 +当 \TeX\ 准备好生成页面时,它就展开该记号列。 + +%You can make some simple changes to the actions of the \plainTeX\ +%output routine without actually modifying it. For example, by assigning +%a list of \refterm{tokens:token} to |\headline| or +%|\footline| \ctsref{\footline} you can have \TeX\ produce a different +%header or footer than it ordinarily would. +实际上不用修改 \plainTeX\ 的输出例行程序,你就能对它的行为做出一些简单改动。 +例如,通过赋予一个记号列给 |\headline| 或 |\footline|\ctsref{\footline},% +你就可以让 \TeX\ 生成和通常情形不同的页眉或页脚。 + +%The output routine is also +%responsible for collecting any \refterm{insertions:insertion}; +%combining those insertions and any +%``decorations'' such as headers and +%footers with the main contents of the page and packaging all +%of this material in a box; and +%eventually sending that box to the \dvifile\ +%^^{\dvifile//material from output routine} +%with the ^|\shipout| +%command \ctsref{\shipout}. +%Although this is what an output routine most often does, +%a special-purpose output routine might behave differently. +%\endconcept +输出例行程序也负责收集任何\refterm{插入项}; +它将这些插入项和任何“装饰”(比如页眉页脚)合并到页面主要内容中, +并将所有这些素材包装在一个盒子里; +最后它用 ^|\shipout| 命令\ctsref{\shipout}将这个盒子送到 \dvifile 中。 +^^{\dvifile//来自输出例行程序的素材} +虽然输出例行程序大多是这样运行的,但有特定用途的输出例行程序会有不同表现。 +\endconcept + + +%\conceptindex{output streams} +%\concept {output stream} +\concept {输出流} + +%\margin{This concept was out of order.} +%See \conceptcit{file}. +%\endconcept +\margin{This concept was out of order.} +见\conceptcit{文件}。 +\endconcept + + +\bookmark{2}{以P开头} +%\conceptindex{pages} +%\concept page +\conceptindex{页面} +\concept 页面 + +%\TeX\ processes a document by assembling \defterm{pages} one at a time +%and passing them to the output routine. +%As it proceeds through your document, \TeX\ maintains a list of lines +%and other +%items to be placed on the page. (The lines are actually hboxes.) +%This list is called the ``^{main vertical list}''. +%Periodically \TeX\ goes through a process called ``exercising the +%^{page builder}''. +%The items added to the main vertical list between exercises of the +%page builder are called ``^{recent contributions}''. +\TeX\ 每次一页地将你的文档组装为\defterm{页面}(page), +并将它们送往输入例行程序。 +在处理文档时,\TeX\ 维持着一个由文本行和其他要放入页面的项目组成的列表。% +(这些文本行实际上是水平盒子。) +这个列表称为“^{主竖直列}”。 +\TeX\ 周期性地执行称为“运行^{页面构建器}”的操作。 +在运行页面构建器时添加到主竖直列的项目称为“^{备选内容}”。 + +%The page builder first examines the main vertical list to see if it's +%necessary to ship out a page yet, either because the items on the main +%vertical list won't all fit on the page or because of an explicit item, +%such as |\eject| \ctsref\eject, that tells \TeX\ to end the page. +%If it's not necessary to ship out a page, then the page builder is done +%for the time being. +页面构建器首先检查主竖直列,看是否有必要输出页面, +这可能由于主竖直列上的项目不能填满页面, +或者有类似 |\eject| \ctsref\eject 的显式项目让 \TeX\ 结束页面。 +如果没必要输出页面,页面构建器这回的工作就完成了。 + +%Otherwise the page builder analyzes the main vertical +%list to find what it considers to be the best possible page break. +%It associates penalties with various kinds of unattractive page +%breaks---a break that would leave an +%isolated line at the top or bottom of a page, a break just before a +%math display, and so forth. It then +%chooses the least costly page break, +%where the cost of a break is increased by any penalty associated with that +%break and by the badness of the page that would result +%(see \knuth{page~111} for the cost formula). If it finds several +%equally costly page breaks, it chooses the last one. +否则,页面构建器分析主竖直列以找到最佳的可能分页点。 +它在各种不美观的分页点 +——即可能导致单独一行出现在页面顶部或底部的分页点, +或者在陈列公式前的分页点,诸如此类 +——添加惩罚项。 +然后它选择代价最小的分页点, +其中分页代价由分页点的惩罚值以及所得页面的劣度加起来得到 +(代价计算公式可以见\knuth{第~111~页}。 +如果找到多个代价相同的分页点,它选择最后一个。 + +%{\tighten +%Once the page builder has chosen a page break, +%it places the items on the list that are before that break +%into ^|\box255| and leaves the remaining ones for the next page. +%It then calls the output routine. |\box255| acts as a mailbox, with the +%page builder as the sender and the output routine as the receiver. +%Ordinarily the output routine processes |\box255|, adds +%other items, such as insertions, headers, and footers, to the page, and +%ships out the page to the \dvifile\ +%^^{\dvifile//material from output routine} +%with a |\shipout| command. +%(Specialized output routines may behave differently.) +%From \TeX's standpoint, it doesn't matter whether or not the output +%routine ships out a page; +%the only +%responsibility of the output routine is to process |\box255| one way or +%another. +%\par} +{\tighten +一旦页面构建器选定了分页点,它就将列表中位于分页点之前的项目放入 ^|\box255|, +并把剩余项目留给下个页面。接着它调用输出例行程序。 +|\box255| 充当了邮箱的角色,页面构建器为发送者,输出例行程序为接收者。 +输出例行程序如常处理 |\box255|,添加其他项目比如插入项和页眉页脚到该页面, +然后用 |\shipout| 命令将页面输出到 \dvifile 。% +(有些输出例行程序可能有不同的行为。) +^^{\dvifile//来自输出例行程序的素材}% +从 \TeX\ 的角度看,输出例行程序输出或不输出页面都无所谓; +输出例行程序的惟一职责是以某种方式处理|\box255|。 +\par} + +%{\tighten +%It's important to realize that the best place to break a page isn't +%necessarily the last possible place to break the page. +%Penalties and other considerations may cause the page break +%to come earlier. +%Furthermore, \TeX\ appends items to the main vertical list in batches, +%not just singly. +%The lines of a paragraph are an example of such a batch. +%For these reasons the page builder usually has items left over when it +%breaks a page. +%These leftover items then form the beginning of the main vertical list +%for the next page (possibly in the middle of a batch). +%Because items are carried over from one page to another, +%you can't assume that as \TeX\ is processing +%input, the current page number accurately reflects the page on which the +%corresponding output will appear. See \knuth{pages~110--114} for a full +%description of \TeX's page-breaking rules. +%\par} +{\tighten +认识到最佳分页点未必是最后的分页点是非常重要的。 +惩罚项和其他考虑可能导致分页点出现在前面。 +此外,\TeX\ 是批量地而不是逐个地添加项目到主竖直列的。 +段落的各行是批量的例子。 +由于这些原因页面构建器分页时通常会剩余一些项目。 +这些剩余项目组成了下一页的主竖直列的开始部分 +(可能在批量的中间)。 +由于项目可能被从一个页面移动到另一个页面, +你无法假定 \TeX\ 处理输入时的当前页码准确表示了对应输出中显示的页码。 +在 \knuth{第~110--114~页}中有 \TeX\ 的分页规则的完整说明。 +\par} + +\endconcept + + +%\conceptindex{page breaks} +%\concept{page break} +\conceptindex{分页} +\concept{分页点} + +%A \defterm{page break} is a place in your document where \TeX\ ends a +%page and (except at the end of the document) starts a new one. +%See \conceptcit{page} for the process that \TeX\ goes through in choosing +%a page break. +\defterm{分页点}(page break)是文档中 \TeX\ +结束一个页面并(除非在文档结尾处)开始新页面的位置。 +在\conceptcit{页面}中介绍了 \TeX\ 选择分页点的过程。 + +%You can control \TeX's choice of page breaks in several ways: +%\ulist +%\li You can insert a penalty (\xref{vpenalty}) +%^^{penalties//in vertical lists} +%between two items in the main vertical list. A positive +%penalty discourages \TeX\ from breaking the page +%there, while a negative penalty---a bonus, in other words---% +%encourages \TeX\ to break the page there. A penalty of $10000$ +%or more prevents a +%page break, while a penalty of $-10000$ or less forces a page break. +%You can get the same effects with the |\break| and +%|\nobreak| commands \ctsref{vbreak}. +你可以用以下几种方式控制 \TeX\ 对分页点的选择: +\ulist +\li 你可以插入惩罚项(\xref{vpenalty}) +^^{惩罚//在竖直列表中} +到主竖直列的两个项目之间。 +正惩罚值阻碍 \TeX\ 在此处分页, +而负惩罚值——换言之,奖励值——鼓励 \TeX\ 在此处分页。 +大于或等于 $10000$ 的惩罚值阻止分页, +而小于或等于 $-10000$ 的惩罚值强制分页。 +你可以用 |\break| 和 |\nobreak| \ctsref{vbreak} 命令得到相同的结果。 + +%\li You can adjust the penalties associated with page breaking +%by assigning different values to \TeX's page-breaking +%\refterm{parameters:parameter}. +\li 你可以通过改变 \TeX\ 的分页\refterm{参数}的值来调整分页惩罚值。 + +%\li You can enclose a sequence of paragraphs +%or other items in the main vertical list within a \refterm{vbox}, +%thus preventing \TeX\ from breaking the page anywhere within the sequence. +%\endulist +\li 你可以将主竖直列的一系列段落或者其他项目放入\refterm{竖直盒子}, +从而阻止 \TeX\ 在它们之间的任何位置分页。 +\endulist + +%Once \TeX\ has chosen a page break, it places the portion of the main vertical +%list that precedes the break into |\box255|. +%It then calls the current \refterm{output routine} +%to process |\box255| and eventually ships its contents to the \dvifile. +%^^{\dvifile//material from output routine} +%The output routine must +%also handle \refterm{insertions}, such as footnotes, that \TeX\ has accumulated +%while processing the page. +一旦 \TeX\ 选定了分页点, +它就将该主竖直列中位于分页点之前的内容放入 |\box255|。 +接着它调用当前的\refterm{输出例行程序}处理 |\box255|, +最终输出页面内容到 \dvifile 。 +^^{\dvifile//来自输出例行程序的素材} +输出例行程序还得处理 \TeX\ 加工页面时积累的\refterm{插入项},比如脚注。 + +%It's useful to know the places where \TeX\ can break a page: +%\ulist +%\li At glue, provided that the item preceding the glue is +%a box, a whatsit, a mark, or an insertion. +%When \TeX\ breaks a page at glue, it makes the break at the top +%of the glue space and forgets about the rest of the glue. +%\li At a kern that's immediately followed by glue. +%\li At a penalty, possibly between the lines of a paragraph. +%\endulist +%When \TeX\ breaks a page, it discards any +%sequence of glue, kerns, and penalty items that follows the break point. +最好能知道 \TeX\ 在什么地方可以分页: +\ulist +\li 在粘连处,只要在粘连之前的项目是一个盒子,小玩意,标记,或者插入项。 +当 \TeX\ 在粘连处分页时,它把分页点放在该粘连间距的顶部,并忽略该粘连的其他值。 +\li 在紧排处,只要该紧排之后是一个粘连。 +\li 在惩罚处,这可能出现在段落的两行之间。 +\endulist +\TeX\ 分页时将丢弃分页点之后的任意多个粘连,紧排和惩罚项。 + +\endconcept + + +%\concept page builder +\concept 页面构建器 + +%See \conceptcit{page}. +%\endconcept +见\conceptcit{页面}。 +\endconcept + + +%\concept {page layout} +\concept {页面布局} + +%\bix^^{margins} +%\bix^^{headers} +%\bix^^{footers} +%When you're designing a document, you need to decide on its +%\defterm{page layout}: the page size, +%the margins on all four sides, the headers and footers, if any, +%that appear at the top and bottom of the page, +%and the amount of space between the body of the text and the headers or +%footers. \TeX\ has defaults for all of these. It assumes an $8 \frac1/2$-% +%by-$11$-inch page with margins of approximately one inch +%on all four sides, no header, +%and a footer consisting of a centered page number. +\bix^^{边距} +\bix^^{页眉} +\bix^^{页脚} +在设计文档时,你需要决定其\defterm{页面布局}(page layout): +页面大小,四个方向的边距,页眉和页脚, +若存在的话,还有正文和页眉页脚之间的间隔大小。 +对上述这些 \TeX\ 都有默认值: +它设定页面大小为 $8 \frac1/2$英寸乘$11$英寸,四个边距约为一英寸, +没有页眉,页脚是居中的页码。 + +%The margins are determined jointly by the four parameters +%^|\hoffset|, ^|\voffset|, ^|\hsize|, and ^|\vsize| (see +%``margins'', \xrefpg{margins}, +%for advice on how to adjust them). +%\eix^^{margins} +%The header normally consists of a single line that appears at the top of each +%page, within the top margin area. You can set it by assigning +%a \refterm{token} list to the ^|\headline| parameter (\xref{\headline}). +%Similarly, +%the footer normally consists of a single line that appears at the bottom +%of each +%page, within the bottom margin area. You can set it by assigning +%a \refterm{token} list to the ^|\footline| parameter (\xref{\footline}). +%For example, the input: +%\csdisplay +%\headline = {Baby's First Document\dotfill Page\folio} +%\footline = {\hfil} +%| +%produces a header line like this on each page: +%\vdisplay{ +%\dimen0 = \hsize +%\advance \dimen0 by -\parindent +%\hbox to \dimen0{Baby's First Document\dotfill Page 19}} +%\noindent +%and no footer line. +边距由四个参数 ^|\hoffset|,^|\voffset|,^|\hsize| 和 ^|\vsize| 共同确定 +(在\xrefpg{边距}的“边距”概念中有如何调整它们的指南)。 +\eix^^{边距} +页眉是在每个页面顶部的一行内容,位于上边距区域中。 +通过将一个\refterm{记号}列表赋值给 ^|\headline| 参数(\xref{\headline}), +你就可以设定页眉。类似地, +页脚是在每个页面底部的一行内容,位于下边距区域中。 +通过将一个\refterm{记号}列表赋值给 ^|\footline| 参数(\xref{\footline}), +你就可以设定页脚。 +例如,下面的输入: +\csdisplay +\headline = {Baby's First Document\dotfill Page\folio} +\footline = {\hfil} +| +将给每个页面生成类似下面的页眉行 +\vdisplay{ +\dimen0 = \hsize +\advance \dimen0 by -\parindent +\hbox to \dimen0{Baby's First Document\dotfill Page 19}} +\noindent +而页脚行是空白的。 + +%You can use marks to place the current topic of a section +%of text into the header or footer. +%^^{marks//with headers or footers} +%See \conceptcit{mark} for an explanation of how to do this. +%\eix^^{headers} +%\eix^^{footers} +%\endconcept +利用标记,你可以将当前主题或节标题放入页眉或页脚中。 +^^{标记//用于页眉和页脚} +在\conceptcit{标记}这里将详细解释如何做到这些。 +\eix^^{页眉} +\eix^^{页脚} +\endconcept + +%\conceptindex{paragraphs} +%\concept paragraph +\conceptindex{段落} +\concept 段落 + +%Intuitively, a \defterm{paragraph} is a sequence of input lines that's +%ended by a blank line, by a ^|\par| command \ctsref{\@par}, +%^^|\par//ending a paragraph with| +%or by an intrinsically vertical command, such as |\vskip|. +%More precisely, a paragraph is a sequence of commands that \TeX\ processes +%in ordinary horizontal mode. +%When \TeX\ has collected an entire paragraph, it forms it into a sequence of +%lines by choosing line breaks \seeconcept{line break}. +%The result is a list of hboxes with glue, interline penalties, +%and interspersed vertical material between them. +%Each hbox is a single line, and the glue is the interline glue. +直观地,\defterm{段落}(paragraph)就是一系列输入行, +并用空行或者 ^|\par| 命令\ctsref{\@par}, +或者类似 |\vskip| 的本质上的竖直模式命令结束。 +^^|\par//用于结束段落| +更准确地说,段落就是 \TeX\ 在普通水平模式中处理的一系列命令。 +\TeX\ 收集整个段落的内容后,就通过选择断行点\seeconcept{断行点}将它分为多行。 +得到的结果是一系列水平盒子,以及它们之间的粘连,行间惩罚和穿插的竖直素材。 +其中的每个水平盒子就是一个文本行,而这些粘连就是行间粘连。 + +%\eject +%\TeX\ starts a paragraph when it's in a vertical mode +%and encounters an inherently horizontal command. +%In particular, it's in a vertical mode when it's just finished a paragraph, +%so the horizontal material on the line after a blank input line starts the +%next paragraph in a natural way. +%There are many kinds of inherently horizontal commands, but the most common +%kind is an ordinary character, e.g., a letter. +当 \TeX\ 在竖直模式中碰到本质上为水平模式的命令,它开始一个新段落。 +特别地,在刚结束一个段落的时候,它位于竖直模式, +因此在空白输入行之后的水平素材自然就开始下一个段落。 +本质上为水平模式的命令有好多种,但最常见的就是普通字符,比如一个字母。 + +%\looseness = -1 +%The ^|\indent| and ^|\noindent| commands +%(\pp\xrefn{\indent},~\xrefn{\noindent}) +%are also inherently horizontal commands that tell +%\TeX\ either to indent or not to indent the beginning of a paragraph. +%Any other horizontal command in vertical +%mode causes \TeX\ to do an implicit |\indent|. +%Once \TeX\ has started a paragraph, it's in ordinary horizontal mode. +%It first obeys any commands that are in ^|\everypar|. +%It then proceeds to collect items for the paragraph until it gets a signal +%that the paragraph is ended. +%At the end of the paragraph it +%resets the paragraph shape parameters ^|\parshape|, |\hang!-indent|, +%^^|\hangindent| +%and ^|\looseness|. +\looseness = -1 +^|\indent| 和 ^|\noindent| 命令(见\xrefn{\indent},~\xrefn{\noindent}页) +也属于本质上为水平模式的命令, +它们让 \TeX\ 在段落开始缩进或不缩进。 +其他水平模式命令出现在竖直模式时都会导致 \TeX\ 隐性执行 |\indent|。 +一旦 \TeX\ 开始一个新段落,它就处于普通水平模式中。 +它首先执行 ^|\everypar| 中的命令, +然后着手收集该段落的项目,直到它得到段落结束的信号。 +在段落结尾处,它重置段落形状参数 ^|\parshape|, +|\hangindent| ^^|\hangindent| 和 ^|\looseness|。 + +%\TeX\ ordinarily translates a blank line into |\par|. +%It also +%inserts a |\par| into the input whenever it's in horizontal mode and +%sees an intrinsically vertical command. +%So ultimately the thing that ends a paragraph is always a |\par| command. +\TeX\ 一般将一个空行转换为一个 |\par| 命令。 +当它在水平模式碰到一个本质上的竖直模式命令时, +它同样插入 |\par| 命令到输入中。 +因此结束段落的最终都是一个 |\par| 命令。 + +%When \TeX\ receives a |\par| command, it first +%fills out\footnote{% +%More precisely, it executes the commands: +%\csdisplay +%\unskip \penalty10000 \hskip\parfillskip +%| +%thus appending items for these commands +%to the end of the current horizontal list.} +%the paragraph it's working on. +%It then breaks the paragraph into lines, +%adds the resulting list of items to the enclosing vertical list, +%and exercises the page builder +%(in the case where the enclosing vertical list is the main vertical list). +%If the paragraph was ended by an intrinsically vertical command, +%\TeX\ then executes that command. +当 \TeX\ 收到一个 |\par| 命令时,它首先填满 \footnote{% +准确地说,它执行下列这些命令: +\csdisplay +\unskip \penalty10000 \hskip\parfillskip +| +并将所得项目添加到当前竖直列的最后面。} +当前段落。接着将该段落分为多行, +并将所得结果添加到所在的竖直列中, +然后执行页面构建器(仅当所在的竖直列就是主竖直列时)。 +如果该段落是用本质上为竖直模式的命令结束的, +\TeX\ 接下来将执行该命令。 + +\endconcept + +%\conceptindex{parameters} +%\concept parameter +\conceptindex{参数} +\concept 参数 + +%The term \defterm{parameter} has two different meanings---it can refer +%either to a \TeX\ parameter or to a macro parameter. +\defterm{参数}(parameter)这个术语有两个不同的含义 +——它可以表示 \TeX\ 参数或者表示宏参数。 + +%A \TeX\ parameter is a \refterm{control sequence} that names +%a value. +%The value of a parameter can be a \refterm{number}, a \refterm{dimension}, +%an amount of \refterm{glue} or muglue, or a \refterm{token list}. +%For example, the ^|\parindent| parameter +%specifies the distance that \TeX\ skips at the start of an +%indented paragraph. +\TeX\ 参数是一个\refterm{控制序列},它是某个值的名称。 +参数的值可以是\refterm{数值},\refterm{长度}, +一定大小的\refterm{粘连}或数学粘连,或者是一个\refterm{记号列表}. +例如,^|\parindent| 参数指定了 \TeX\ 在缩进段落开头所跳过距离的大小。 + +%You can use the control sequence for a parameter either to retrieve the value +%of the parameter or to set that value. \TeX\ interprets the control sequence +%as a request for a value if it appears in a context where a value is expected, +%and as an \refterm{assignment} otherwise. +%^^{assignments} +%For example: +%\csdisplay +%\hskip\parindent +%| +%produces horizontal \refterm{glue} whose natural size is given by |\parindent|, +%while: +%\csdisplay +%\parindent = 2pc % (or \parindent 2pc) +%| +%sets |\parindent| to a length of two picas. The assignment: +%\csdisplay +%\parindent = 1.5\parindent +%| +%uses |\parindent| in both ways. Its effect is to multiply the value of +%|\parindent| by $1.5$. +你可以对 \TeX\ 参数的控制序列取值或赋值。 +如果该控制序列出现在需要取值的地方,\TeX\ 将它解释为取值; +否则,解释为\refterm{赋值}。 +^^{赋值} +例如: +\csdisplay +\hskip\parindent +| +生成一个自然大小为 |\parindent| 的水平\refterm{粘连},而 +\csdisplay +\parindent = 2pc % (or \parindent 2pc) +| +设置 |\parindent| 等于两派卡的长度。而下列赋值: +\csdisplay +\parindent = 1.5\parindent +| +用两种方式使用 |\parindent|。其结果是将 |\parindent| 的值乘以 $1.5$ 倍。 + +%You can think of a parameter as a built-in \refterm{register}. +%^^{registers//parameters as} +%You'll find a complete list of the \TeX\ parameters on \knuth{pages~272--275}. +你可以将 \TeX\ 参数视为内置的\refterm{寄存器}。 +^^{寄存器//作为参数} +在\knuth{第~272--275~页}中你可以找到 \TeX\ 参数的完整列表。 + +%A \refterm{macro} parameter is a placeholder for text that is to be +%plugged into the definition of a macro. See \conceptcit{macro} +%for more information about this kind of parameter. +\refterm{宏}参数是一个占位符,用于插入文本到宏定义中。 +在\conceptcit{宏}这里有这类参数的更多信息。 + +\endconcept + + +%\conceptindex{penalties} +%\concept penalty +\conceptindex{惩罚} +\concept 惩罚 + +%A \defterm{penalty} is an item that you can include in a +%horizontal, vertical, or math list +%in order to discourage \TeX\ from breaking the list +%at that point or encourage \TeX\ to break the list there. +%^^{horizontal lists//penalties in} +%^^{vertical lists//penalties in} +%A positive penalty indicates a bad break point, while +%a negative penalty indicates a good break point. +%Breaking an +%ordinary horizontal +%list produces a \refterm{line break}, while breaking an +%ordinary vertical list produces +%a \refterm{page break}. +%(A penalty has no effect in restricted horizontal or +%internal vertical \refterm{mode}.) +\defterm{惩罚}是一个你可以放在水平、竖直或数学列表中的项目, +用于阻碍或鼓励 \TeX\ 在此处断开该列表。 +^^{水平列表//水平列表中的惩罚} +^^{竖直列表//竖直列表中的惩罚} +正惩罚值表示一个糟糕断开点,而负惩罚值表示一个良好断开点。 +断开普通水平列生成一个\refterm{断行点}, +而断开普通竖直列生成一个\refterm{分页点}。% +(在限制水平\refterm{模式}或内部竖直模式的惩罚项无效。) + +%You can use the +%|\penalty| command (\pp\xrefn{hpenalty},~\xrefn{vpenalty}) +%to insert a penalty explicitly. +%A penalty of $10000$ or more prevents a break, while a penalty of +%$-10000$ or less forces a break. +%\endconcept +你可以用 |\penalty| 命令(见\xrefn{hpenalty},~\xrefn{vpenalty}\pp ) +直接插入一个惩罚项。 +大于或等于 $10000$ 的惩罚值阻止断开。 +而小于或等于 $-10000$ 的惩罚值强制断开。 +\endconcept + + +\concept{\plainTeX} + +%\defterm{\PlainTeX} is the form of \TeX\ described in this +%book and in \texbook. \PlainTeX\ is part of the standard \TeX\ +%system, so documents that use only the facilities of \plainTeX\ can +%usually be transferred from one installation to another without +%difficulty. +\defterm{\PlainTeX} 是本书和 \texbook\ 中所描述的 \TeX\ 形式。 +\PlainTeX\ 包含在标准 \TeX\ 系统中, +因此仅使用 \plainTeX\ 的文档通常很容易从一个 \TeX\ 系统转移到另一个中。 + +%\PlainTeX\ consists of the \refterm{primitive} commands together with a +%large collection of macros and +%other definitions. These additional definitions are given in +%\knuth{Appendix~B}. They should also be in the file |plain.tex| +%somewhere in your computer system. +%\endconcept +\PlainTeX\ 由\refterm{原始命令},加上大量的宏和其他定义组成。 +在\knuth{附录~B}中给出了这些附加定义。 +它们应该同样包含在你的计算机系统的某个 |plain.tex| 文件中。 +\endconcept + + +%\concept{primitive} +\concept{原始的} + +%A \defterm{primitive} \refterm{command} is one whose definition is built +%into the \TeX\ computer program. In contrast, a command that is not +%primitive is defined by a \refterm{macro} or some other form of +%definition written in \TeX\ itself. The commands in \refterm{\plainTeX} +%consist of the primitive commands together with +%other commands defined in terms of the +%primitive ones. +%\endconcept +\defterm{原始的}(primitive)命令是在 \TeX\ 程序内部就定义好的命令。 +作为对比,非原始命令或者是从\refterm{宏}定义得到的, +或者是从 \TeX\ 编写的其他形式的定义得到的。 +\refterm{\PlainTeX} 的命令由原始命令加上用原始命令定义的其他命令组成。 +\endconcept + +\bookmark{2}{以R开头} +%\concept {reference point} +\concept {基准点} + +%^^{baselines} +%^^{boxes//reference point of} +%The \defterm{reference point} of a \refterm{box} is the point where the +%left edge of the box intersects its \refterm{baseline}. When \TeX\ is +%processing a \refterm{horizontal:horizontal list} or \refterm{vertical +%list}, it uses the reference points of the boxes in the list to line up +%those boxes horizontally or vertically \seeconcept{box}. +%\endconcept +^^{基线} +^^{盒子//盒子的基准点} +\refterm{盒子}的\defterm{基准点}(reference point)是盒子左边缘与\refterm{基线}的交点。 +在处理\refterm{水平列表}或\refterm{竖直列表}时, +\TeX\ 用列表中各盒子的基准点水平或竖直对齐这些盒子\seeconcept{盒子}。 +\endconcept + +%\conceptindex{registers} +%\concept register +\concept 寄存器 + +%A \defterm{register} is a named location for storing a value. +%It is much like a variable in a programming language. +%\TeX\ has five kinds of registers, as shown in the following table: +\defterm{寄存器}(register)是用于存储数值的命名位置。 +它很像编程语言中的一个变量。\TeX\ 有五种寄存器,如下表所示: + +%\vdisplay{\tabskip 10pt\halign{\tt #\hfil &#\hfil\cr +%{\it Register type}&{\it Contents}\cr +%box&a \refterm{box} \idxref{box registers}\cr +%count&a \refterm{number} \idxref{count registers}\cr +%dimen&a \refterm{dimension} \idxref{dimension registers}\cr +%muskip&\refterm{muglue} \idxref{muglue registers}\cr +%skip&\refterm{glue} \idxref{glue registers}\cr +%toks&a \refterm{token} list\idxref{token registers}\cr}} +\vdisplay{\tabskip 10pt\halign{\tt #\hfil &#\hfil\cr +{\it 寄存器类型}&{\it 存储内容}\cr +box&一个\refterm{盒子} \idxref{盒子寄存器}\cr +count&一个\refterm{数} \idxref{计数寄存器}\cr +dimen&一个\refterm{尺寸} \idxref{尺寸寄存器}\cr +muskip&\refterm{数学粘连} \idxref{数学粘连寄存器}\cr +skip&\refterm{粘连} \idxref{粘连寄存器}\cr +toks&一个\refterm{记号}列 \idxref{记号寄存器}\cr}} + +%The registers of each type are numbered from $0$ to $255$. +%You can access register $n$ of category $c$ by using the form `|\|$cn$', +%e.g., |\muskip192|. +%You can use a register +%anywhere that information of the appropriate type is called for. For +%instance, you can use |\count12| +%in any context calling for a number or |\skip0| +%in any context calling for glue. +每种类型的寄存器都从 $0$ 到 $255$ 编号。 +要存取第 $n$ 个类型为 $c$ 的寄存器,你可以用 `|\|$cn$' 这种形式,比如 |\muskip192|。 +寄存器可以用在任何需要相应类型信息的地方。例如, +你可以在需要一个数的地方使用 |\count12|,或者在需要粘连的地方使用 |\skip0|。 + +%You put information into a register by \refterm{assigning:assignment} +%something to it: +要将信息放入寄存器中,你可以给它\refterm{赋值}: + +%\csdisplay +%\setbox3 = \hbox{lagomorphs are not mesomorphs} +%\count255 = -1 +%| +%The first assignment constructs an hbox and assigns it to +%box register~$3$. +%You can +%subsequently use `|\box3|' wherever a box is called for, and you will +%get just that hbox.\footnote{But note carefully: using a box register +%also empties it so that its contents become void. The other kinds of +%registers don't behave that way. You can use the |\copy| command +%\ctsref{\copy} to retrieve the contents of a box register without +%emptying it.} +%The second assignment assigns $-1$ to count register~$255$. +\csdisplay +\setbox3 = \hbox{lagomorphs are not mesomorphs} +\count255 = -1 +| +第一个赋值构造一个水平盒子并把它分配给 $3$ 号盒子寄存器。 +此后你可以在需要盒子的地方用 `|\box3|' 得到该盒子。 +\footnote{但是要注意:使用盒子寄存器的同时也清空了该寄存器, +从而它的内容变为空白。其他类型的寄存器不会这样。 +你可以用|\copy| 命令\ctsref{\copy}获取盒子寄存器的内容而不清空它。} +第二个赋值将 $-1$ 分配给 $255$ 号计数寄存器。 + +%A register of a given type, e.g., a glue register, behaves just like +%a parameter of that type. +%^^{parameters//like registers} +%You retrieve its value or assign to it +%just as you would with a \refterm{parameter}. +%Some \TeX\ parameters, e.g., |\pageno|, +%are implemented as registers, in fact. +给定类型的寄存器,比如粘连寄存器,就像该类型的参数一样。 +^^{参数//如同寄存器} +你可以如同\refterm{参数}那样获取或赋予它的值。 +有些 \TeX\ 参数,比如 |\pageno|,实际上就是作为寄存器实现的。 + +%\PlainTeX\ +%uses many registers for its own purposes, so you should not just +%pick an arbitrary +%register number when you need a register. Instead you should ask +%\TeX\ to reserve a register by using one of the commands +%^|\newbox|, ^|\newcount|, ^|\newdimen|, ^|\newmuskip|, ^|\newskip|, +%or ^|\newtoks| +%\ctsref{\@newbox}. These commands are outer, so you can't +%use them in a macro definition. +%If you could, +%you'd use up a register every time the macro was called and probably run out +%of registers before long. +\PlainTeX\ 用了很多寄存器来实现自己的目标,因此在需要寄存器时你不能随意选择一个来用。 +你应该用下列这些命令之一让 \TeX\ 给你保留一个寄存器:^|\newbox|、 +^|\newcount|、^|\newdimen|、^|\newmuskip|、^|\newskip| 或 ^|\newtoks|\ctsref{\@newbox}。 +这些命令是外部的,因此你不能在宏定义中使用它们。 +要是可以这样做,每次调用宏时就会用掉一个寄存器,可能很快就用完所有寄存器。 + +%Nonetheless you can with some caution use any register temporarily +%within a \refterm{group}, even one that \TeX\ is using for something +%else. +%After \TeX\ finishes executing the commands in a group, +%it restores the contents of every register +%to what they were before it started executing the group. +%When you use an explicitly numbered register inside a group, +%you must be sure that the register isn't modified by any +%\refterm{macro} +%that you might call within the group. +%Be especially careful +%about using arbitrary registers in a group that calls macros +%that you didn't write yourself. +即便如此,只需谨慎一点你就可以在\refterm{编组}内部临时使用寄存器, +甚至是 \TeX\ 在其他地方用到的寄存器。 +在执行完编组内的命令后,\TeX 将每个寄存器的内容重置为开始执行编组前的内容。 +在编组内部使用显式编号的寄存器时, +你必须确保该寄存器不会被你在编组内调用的\refterm{宏}所修改。 +如果编组内调用了非你所写的宏,在其中使用任意寄存器时需要特别小心。 + +%{\tighten +%\TeX\ reserves certain registers for special purposes: |\count0| through +%|\count9| for page numbering information and +%^^{page numbering} +%^|\box255| for the contents +%of a page just before it is offered to the \refterm{output routine}. +%Registers |\dimen0|--|\dimen9|, |\skip0|--|\skip9|, +%|\muskip0|--|\mu!-skip9|, |\box0|--|\box9|, +%and the |255| registers other than |\box255| +%are generally available as ``scratch'' registers. +%Thus \plainTeX\ provides only one scratch register, |\count255|, for +%counts. +%See \knuth{pages~122 and 346} for conventions to follow +%in choosing register numbers. +%\par} +\TeX\ 将某些寄存器保留作特别用途:|\count0| 到 +|\count9| 用作页面编号信息,而 +^^{页码} +^|\box255| 用作送到\refterm{输出例行程序}之前的页面内容。 +寄存器 |\dimen0|--|\dimen9|、|\skip0|--|\skip9|、|\muskip0|--|\mu!-skip9|、 +|\box0|--|\box9| 和 |\box255| 除外的 |255| 号寄存器一般用作“临时”寄存器。 +也就是说 \plainTeX\ 仅提供一个用于计数的临时寄存器 |\count255|。 +请参阅 \knuth{第~122 和 346~页}, +其中有选择寄存器编号时要遵守的约定。 + +%You can examine the contents of registers during a \TeX\ run with the +%^|\showthe| command \ctsref\showthe, e.g., with `|\showthe\dimen0|'. +%\endconcept +要在 \TeX\ 运行时检查一个寄存器的内容, +你可以用 ^|\showthe| 命令\ctsref\showthe ,比如 `|\showthe\dimen0|'。 +\endconcept + + +%\concept{restricted mode} +\concept{受限模式} + +%A \defterm{restricted mode} is a \refterm{mode} that \TeX\ is in when it is +%assembling an \refterm{hbox} or a \refterm{vbox}. +%We follow \texbook\ in using the term ``internal vertical mode'' +%for what you might expect to be ``restricted vertical mode''. +%See \conceptcit{horizontal +%mode} and \conceptcit{vertical mode}.\endconcept +\defterm{受限模式}(restricted mode)是 \TeX\ 组装\refterm{水平盒子}% +或\refterm{竖直盒子}时所处的\refterm{模式}。 +我们使用 \texbook\ 中的术语``内部竖直模式''来命名我们所认为的``受限竖直模式''。 +请参阅\conceptcit{水平模式}和\conceptcit{竖直模式}。\endconcept + + +%\conceptindex{rules} +%\concept rule +\concept 标线 + +%A \defterm{rule} is a solid black rectangle. +%A rule, like a \refterm{box}, +%has \refterm{width}, \refterm{height}, and \refterm{depth}. +%The vertical dimension of the rectangle +%is the sum of its height and its depth. +%An ordinary horizontal or vertical straight line is a special case of a rule. +\defterm{标线}(rule)是一个黑色实心矩形。 +标线和\refterm{盒子}一样也有\refterm{宽度}、\refterm{高度}和\refterm{深度}。 +该矩形的竖直尺寸是它的高度和深度之和。 +普通的水平或竖直直线是标线的特殊情形。 + +%\bix^^{horizontal rules} +%\bix^^{vertical rules} +%\bix^^|\hrule| +%\bix^^|\vrule| +%A rule can be either horizontal or vertical. The distinction between a +%horizontal rule and a vertical one has to do with how you produce the +%rule, since a vertical rule can be short and fat (and therefore look +%like a horizontal line), while a horizontal rule can be tall and skinny +%(and therefore look like a vertical line). \TeX's notion of a rule is +%more general than that of typographers, who think of a rule as a line +%and would not usually call a square black box a rule. +\bix^^{水平标线} +\bix^^{竖直标线} +\bix^^|\hrule| +\bix^^|\vrule| +标线可以是水平的或者竖直的。水平标线和竖直标线的区别与你如何生成标线有关, +因为竖直标线可以矮而胖(从而看似水平标线), +而水平标线也可以高而瘦(从而看似竖直标线)。\TeX\ 所说的标线比排印工的更一般, +它们认为标线就是一条线而通常不把黑色方块称为标线。 + +%You can produce a horizontal rule using the +%|\hrule| command and a vertical rule using +%the |\vrule| command \ctsref{\vrule}. +%For example, the control sequence |\hrule| by itself +%produces a thin rule that runs across the page, like this: +你可以用 |\hrule| 命令生成水平标线,用 |\vrule| 命令\ctsref{\vrule}生成竖直标线。 +例如,控制序列 |\hrule| 本身就生成一个横跨页面的细标线,如下: + +%{\offinterlineskip +%\nobreak\medskip +%\hrule +%\medskip} +{\offinterlineskip +\nobreak\medskip +\hrule +\medskip} + +%The command `|\vrule height .25in|' produces a vertical rule +%that runs $.25$~inches down the page like this: +%\nobreak\vskip \abovedisplayskip +%\leftline{\vrule height .25in} +%\vskip \belowdisplayskip +命令 `|\vrule height .25in|' 生成往下 $.25$ 英寸的竖直标线如下: +\nobreak\vskip \abovedisplayskip +\leftline{\vrule height .25in} +\vskip \belowdisplayskip + +%There are two differences between horizontal rules and vertical rules: +%\olist +%\li For a horizontal rule, \TeX\ defaults the width to the width of the +%smallest \refterm{box} or \refterm{alignment} that encloses it. For a +%vertical rule, \TeX\ defaults the height and depth in the same way. (The +%default is the size that you get if you don't give a size explicitly for that +%dimension.) +水平标线和竖直标线有如下两个区别: +\olist +\li 对于水平标线,\TeX\ 设定将其默认宽度为包含它的最小\refterm{盒子}或\refterm{阵列}的宽度。 +对于竖直标线,\TeX\ 用类似方法设定其默认高度和深度。% +(如果你没有显式设定尺寸,默认为内容的尺寸。) + +%^^{horizontal lists//rule in} +%^^{vertical lists//rule in} +%\li +%{\tighten +%A horizontal rule is an inherently vertical item that cannot participate in +%a \refterm{horizontal list}, +%while a vertical +%rule is an inherently horizontal item +%that cannot participate in a \refterm{vertical list}. This behavior +%may seem strange at first but there is good reason for it: +%a horizontal rule ordinarily runs visually from left +%to right and thus separates items in a vertical list, +%while a vertical rule ordinarily runs visually from top to bottom +%and thus separates items in a horizontal list. +%%(Look at the rules that are shown above.) +%\par} +%\endolist +^^{水平列表//水平列表中的标线} +^^{竖直列表//竖直列表中的标线} +\li +水平标线是本质上的竖直项目,不能放在\refterm{水平列表}中; +而竖直标线是本质上的水平项目,不能放在\refterm{竖直列表}中; +这种行为初看也许有些奇怪,但却是有合理原因的: +水平标线在外观上通常是从左到右的,因而分开了竖直列表中的项目; +而竖直标线在外观上通常是从上到下的,因而分开了水平列表中的项目; +%(Look at the rules that are shown above.) +\endolist + +%{\tighten +%If you construct a rule with three explicit dimensions, it will look the +%same whether you make it a horizontal rule or a vertical rule. +%For example, the command `|\vrule height1pt depth2pt width3in|' produces this +%horizontal-looking rule: +%\par} +如果你构造一个有三个明确尺寸的标线,无论作为水平标线还是竖直标线它看起来都是一样的。 +例如,命令 `|\vrule height1pt depth2pt width3in|' 生成如下看似水平方向的标线: + +%{\offinterlineskip +%\nobreak\medskip\nobreak\vskip3pt +%\leftline{\vrule height1pt depth2pt width3in} +%\medskip} +{\offinterlineskip +\nobreak\medskip\nobreak\vskip3pt +\leftline{\vrule height1pt depth2pt width3in} +\medskip} + +%You'll find a precise statement of \TeX's treatment of rules on +%\knuth{pages~221--222}. +%\eix^^{horizontal rules} +%\eix^^{vertical rules} +%\eix^^|\hrule| +%\eix^^|\vrule| +%\endconcept +在\knuth{第~221--222~页}中,你可以找到对 \TeX\ 如何处理标线的精确表述。 +\eix^^{水平标线} +\eix^^{竖直标线} +\eix^^|\hrule| +\eix^^|\vrule| +\endconcept + + +\bookmark{2}{以S开头} +%\concept {script size} +\concept {标号尺寸} + +%\defterm{Script size} describes one of the three related +%\refterm{fonts:font} in a family. +%^^{family//script size in} +%Script size is smaller than \refterm{text size} but larger than +%\refterm{scriptscript size}. \TeX\ uses script size for subscripts and +%superscripts, as well as for the numerators and denominators of +%fractions in text. +%\endconcept +\defterm{标号尺寸}(script size)描述一族字体中三个相关\refterm{字体}的其中一个。 +^^{族//族的标号尺寸} +标号尺寸比\refterm{文本尺寸}小但比\refterm{小标号尺寸}大。 +对上标,下标以及文本中分式的分子和分母,\TeX\ 使用标号尺寸。 +\endconcept + + +%\concept {scriptscript size} +\concept {小标号尺寸} + +%\defterm{Scriptscript size} describes the smallest of the three related +%\refterm{fonts:font} in a family. +%^^{family//scriptscript size in} +%\TeX\ uses \refterm{scriptscript size} for second-order subscripts, +%superscripts, numerators, and denominators. For example, \TeX\ will use +%scriptscript size for a subscript on a subscript or for a superscript on +%a scriptsize numerator. +%\endconcept +\defterm{小标号尺寸}(scriptscript size)描述一族字体中三个相关\refterm{字体}的最小一个。 +^^{族//族的小标号尺寸} +对第二级的上标、下标、分子和分母,\TeX\ 使用小标号尺寸。 +比如,对于下标中的下标,或者标号尺寸分子中的上标,\TeX\ 将使用小标号尺寸。 +\endconcept + + +%\concept shrink +\concept 收缩量 + +%See \conceptcit{glue}. +%\endconcept +见 \conceptcit{粘连}。 +\endconcept + + +%\concept space +\concept 间隔 + +%You can cause \TeX\ to put \defterm{space} between two items in +%several~ways: +要让 \TeX\ 在两个项目间留下\defterm{间隔}(space),有如下几种方法: + +%\olist +%^^{end of line} +%\li You can write something that \TeX\ treats as a space +%\refterm{token}: one or more blank characters, the end of a line (the +%end-of-line character acts like a space), or any \refterm{command} that +%expands into a space token. \TeX\ generally treats several consecutive +%spaces as equivalent to a single one, including the case where the +%spaces include a single end-of-line. (An empty line +%indicates the end of a paragraph; it +%causes \TeX\ to generate a |\par| token.) +%^^|\par//from empty line| +%\TeX\ adjusts the size of +%this kind of space to suit the length required by the context. +\olist +^^{行尾符} +\li 你可以写上某些 \TeX\ 视为空格\refterm{记号}的东西: +一个或多个空格符,行尾符(行尾符作用和空格相似), +或任何能展开为空格记号的\refterm{命令}。 +\TeX\ 一般将多个连续空格视为单个空格,包括其中有一个行尾符的情形。% +(一个空行表示段落的结束;它导致 \TeX\ 生成一个 |\par| 记号。) +^^|\par//来自空行| +\TeX\ 调整此种间隔的大小以适应由上下文所需的长度。 + +%^^{glue//creating space with} +%\li You can write a skip command that produces the glue +%you specify in the command. The glue can +%\refterm{stretch} or \refterm{shrink}, +%producing more or less space. You can have vertical glue as +%well as horizontal glue. Glue disappears whenever it is next to a +%line or page break. +^^{粘连//用它生成间距} +\li 你可以写上一个生成指定粘连的间距命令。 +粘连有\refterm{伸长量}或\refterm{收缩量},从而生成或多或少的间隔。 +你可以有水平粘连和竖直粘连。在断行或分页位置之后的粘连将会消失。 + +%^^{kerns//creating space with} +%\li You can write a \refterm{kern}. A kern produces a fixed amount of +%space that does not stretch or shrink and does not disappear at a line +%or page break (unless it is immediately followed by glue). The most +%common use of a kern is to establish a fixed spatial relationship +%between two adjacent \refterm{boxes}. +%\endolist +^^{紧排//用它生成间距} +\li 你可以写上一个\refterm{紧排}。紧排生成固定大小的间隔,它不可伸长也不可收缩, +而且在断行或分页时也不会消失(除非其后紧跟着一个粘连)。 +紧排常用于给两个相邻\refterm{盒子}建立固定的空间关系。 +\endolist + +%Glue and kerns can have negative values. Negative glue or a negative kern +%between adjacent items brings those items closer together. +%\endconcept +粘连和紧排也可以取负值。两个相邻项目间的负粘连或负紧排将拉近它们俩的距离。 +\endconcept + + +%\concept stretch +\concept 伸长量 + +%See \conceptcit{glue}. +%\endconcept +见 \conceptcit{粘连}。 +\endconcept + + +%\conceptindex{struts} +%\concept strut +\concept 支架 + +%{\tighten +%A \defterm{strut} is an invisible \refterm{box} +%^^{boxes//invisible} +%whose width is zero and whose height and depth are slightly more than +%those of a ``normal'' +%line of type in the context. Struts are useful for obtaining +%uniform vertical spacing when \TeX's +%usual line spacing is disabled, e.g., within a math formula +%or within a horizontal alignment where you've specified ^|\offinterlineskip|. +%Because a strut is taller and deeper than everything else on its line, +%it determines the height and depth of the line. +%You can produce a strut with +%the ^|\strut| command \ctsref{\strut} or the ^|\mathstrut| command +%\ctsref\mathstrut. +%You can use |\strut| anywhere, but you can only use |\mathstrut| when +%\TeX\ is in math \refterm{mode}. A strut in \plainTeX\ has height 8.5\pt\ and +%depth 3.5\pt, while a math strut has the height and depth of a left +%parenthesis in the current \refterm{style} (so it's smaller for +%subscripts and superscripts). +%\par} +\defterm{支架}(strut)一个不可见的\refterm{盒子}, +^^{盒子//不可见盒子} +它的宽度为零,而高度和深度比上下文中的“正常”行稍微大一点。 +支架常用于在通常行间隔取消时获得一致的竖直间隔, +比如在数学公式中,或者在设定了 ^|\offinterlineskip| 的水平阵列中。 +因为支架比该行的其他东西都高和深,它确定了该行的高度和深度。 +你可以用 ^|\strut| 命令\ctsref{\strut}或 +^|\mathstrut| 命令\ctsref\mathstrut 生成一个支架。 +|\strut| 可以在任何地方使用,但 |\mathstrut| 只能在数学\refterm{模式}中使用。 +在 \plainTeX\ 中,支架的高度为 8.5\pt ,深度为3.5\pt , +而数学支架的高度和深度和当前\refterm{样式}的左圆括号的相等% +(因此在上下标中会小一点)。 + +%Here's an example showing how you might use a strut: +%\csdisplay +%\vbox{\hsize = 3in \raggedright +% \strut Here is the first of two paragraphs that we're +% setting in a much narrower line length.\strut} +%\vbox{\hsize = 3in \raggedright +% \strut Here is the second of two paragraphs that we're +% setting in a much narrower line length.\strut} +%| +%This input yields: +%\display{\vbox{ +%\vbox{\hsize = 3in \raggedright +%\strut Here is the first of two paragraphs that we're setting +%in a much narrower line length.\strut} +%\vbox{\hsize = 3in \raggedright +%\strut Here is the second of two paragraphs that we're setting +%in a much narrower line length.\strut} +%}} +%\noindent +%Without the struts the \refterm{vboxes:vbox} would be too close +%together. Similarly, in the formula: +%\csdisplay +%$\overline{x\mathstrut} \otimes \overline{t\mathstrut}$ +%| +%the math struts cause both bars to be set at the same height even +%though the `$x$' and the `$t$' have different heights: +%\display{ +%$\overline{x\mathstrut} \otimes \overline{t\mathstrut}$ +%} +%\vskip -\belowdisplayskip +%\endconcept +%\nobreak +这里有个例子给你展示了支架的用法: +\csdisplay +\vbox{\hsize = 3in \raggedright + \strut Here is the first of two paragraphs that we're + setting in a much narrower line length.\strut} +\vbox{\hsize = 3in \raggedright + \strut Here is the second of two paragraphs that we're + setting in a much narrower line length.\strut} +| +这个输入产生下列输出: +\display{\vbox{ +\vbox{\hsize = 3in \raggedright +\strut Here is the first of two paragraphs that we're setting +in a much narrower line length.\strut} +\vbox{\hsize = 3in \raggedright +\strut Here is the second of two paragraphs that we're setting +in a much narrower line length.\strut} +}} +\noindent +要是没有支架,这两个\refterm{盒子}将太过靠近了。 +类似地,在数学公式中: +\csdisplay +$\overline{x\mathstrut} \otimes \overline{t\mathstrut}$ +| +数学支架让两个横线位于相同的高度,即使 `$x$' 和 `$t$' 有不同的高度: +\display{ +$\overline{x\mathstrut} \otimes \overline{t\mathstrut}$ +} +\vskip -\belowdisplayskip +\endconcept +%\nobreak + + +%\conceptindex{styles} +%\concept {style} +\concept {样式} + +%Material in a math formula is set in one of eight \defterm{styles}, +%depending on the context. Knowing about styles can be useful if you want to +%set part of a formula in a different size of type than the one +%that \TeX\ has chosen according to its usual rules. +数学公式中的素材依据上下文被设定为八种\defterm{样式}(style)的其中一种。 +对样式的了解,将有助于你将某部分公式设为不同类型的大小, +即与 \TeX\ 按照通用法则选择的大小不同。 + +%\eject +%The four primary styles are: +其中的四种主要样式如下: + +%\vdisplay{% +%\halign{\refterm{# style}\hfil&\hskip .25in(for #)\hfil\cr +%display&formulas displayed on a line by themselves\cr +%text&formulas embedded in ordinary text\cr +%script&superscripts and subscripts\cr +%scriptscript&superscripts on superscripts, etc.\cr +%}} +\vdisplay{% +\halign{\refterm{#样式}\hfil&\hskip .25in(用于#)\hfil\cr +陈列&单独一行显示的公式\cr +文本&嵌入普通文本内的公式\cr +标号&上标和下标\cr +小标号&上标中的上标,等等\cr +}} + +%The other four styles are so-called ^{cramped variants}. In these +%variants superscripts aren't raised as high as usual, and so the formula +%needs less vertical space than it otherwise would. See +%\knuth{pages~140--141} for the details of how \TeX\ selects the style. +另外四种样式被称为^{狭窄变体}。 +在这些变体中,上标升高得没那么多,因而公式和原来相比占用更少的竖直间隔。 +在\knuth{第~140--141~页}中详细介绍了 \TeX\ 如何选择样式。 + +%\TeX\ chooses a size of type according to the style: +\TeX\ 依照样式选择尺寸类型: + +%\ulist\compact +%^^{display style}^^{text style} +%\li Display style and text style are set in \refterm{text size}, like +%`$\rm this$'. +\ulist\compact +^^{陈列样式}^^{文本样式} +\li 陈列样式和文本样式设定为\refterm{文本尺寸},就像 `$\rm this$' 这样。 + +%^^{script style} +%\li Script style is set in \refterm{script size}, like `$\scriptstyle +%\rm this$'. +^^{标号样式} +\li 标号样式设定为\refterm{标号尺寸},就像 `$\scriptstyle \rm this$' 这样。 + +%^^{scriptscript style} +%\li Scriptscript style is set in \refterm{scriptscript size}, like +%`$\scriptscriptstyle \rm this$'. +%\endulist +^^{小标号样式} +\li 小标号样式设定为\refterm{小标号尺寸},就像 `$\scriptscriptstyle \rm this$' 这样。 +\endulist + +%See \conceptcit{family} for more information about these three sizes. +参考\conceptcit{族}以获得更多关于这三种尺寸的信息。 + +%\TeX\ doesn't have a ``scriptscriptscript'' style because such a style +%would usually have to be set in a size of type too small to read. \TeX\ +%therefore sets third-order subscripts, superscripts, etc., using the +%scriptscript style. +在 \TeX\ 中没有“小小标号”样式,因为此样式对应的尺寸太小以致无法阅读。 +因此 \TeX\ 用小标号样式设定三阶上下标等。 + +%Once in a while you may find that \TeX\ has set a formula in a different style +%than the one you'd prefer. You can override \TeX's choice with the +%^|\textstyle|, ^|\displaystyle|, ^|\scriptstyle|, and ^|\scriptscriptstyle| +%commands \ctsref{\textstyle}. +%\endconcept +偶尔你会发现 \TeX\ 给公式设定的样式和你想要的不同。 +你可以用 ^|\textstyle|,^|\displaystyle|,^|\scriptstyle| 和 ^|\scriptscriptstyle| +命令\ctsref{\textstyle}改变 \TeX\ 的选择。 +\endconcept + + +\bookmark{2}{以T开头} +\concept {\TeXMeX} + +%(a)~A variant of \TeX\ used for mathematical typesetting in +%Central American countries. +%(b)~A spicy cuisine favored by the \TeX\-ni\-cians of ^{El Paso}. +%\endconcept +(a)~一个在中美洲国家用于数学排版的 \TeX\ 变种。 +(b)~一种深受^{埃尔帕索}的 \TeX\ 用户欢迎的香辣菜。 +\endconcept + + +%\concept {text math} +\concept {文内公式} + +%We use the term \defterm{text math} to refer to a math formula set within a +%line of text, i.e., enclosed in |$|'s. +%\ttidxref{$} +%\TeX\ sets text math in text math \refterm{mode}. +%\endconcept +我们用\defterm{文内公式}(text math)这个术语表示放在一行文本之中的数学公式, +即两边用 |$| 括起来的公式。 +\ttidxref{$} +\TeX\ 在文内数学\refterm{模式}中排版文内公式。 +\endconcept + + +%\concept {text size} +\concept {文本尺寸} + +%\defterm{Text size} describes the largest of the three related +%\refterm{fonts:font} in a \refterm{family}. +%^^{family//text size in} +%\TeX\ uses text size for ordinary symbols appearing in +%\refterm{math mode}. +%\endconcept +\defterm{文本尺寸}(text size)描述一\refterm{族}字体中% +三个相关\refterm{字体}的最大一个。 +^^{族//族的文本尺寸} +对\refterm{数学模式}中的普通符号,\TeX\ 使用文本尺寸。 +\endconcept + + +%\conceptindex{tokens} +%\concept token +\concept 记号 + +%A \defterm{token} is either a single character tagged with a +%\refterm{category code}, or a \refterm{control sequence}. \TeX\ reads +%characters from a file using its eyes \seeconcept{\anatomy} +%and groups the characters into tokens using its mouth. When a token +%reaches \TeX's stomach, \TeX\ interprets it as a \refterm{command} +%unless it's part of an argument of a preceding command. +%\endconcept +一个\defterm{记号}(token)要么是一个标有\refterm{类别码}的字符, +要么是一个\refterm{控制序列}。 +\TeX\ 用它的眼睛从文件中读取字符串\seeconcept{\anatomy}, +并用它的嘴将字符串咀嚼成一个个记号。 +当一个记号到达\TeX\ 的胃时,\TeX\ 将它解释为一个\refterm{命令}, +除非它是之前命令的参量。 +\endconcept + + +\bookmark{2}{以U开头} +%\conceptindex{units of measure} +%\concept {unit of measure} +\concept {度量单位} + +%See \conceptcit{dimension}. +%\endconcept +见 \conceptcit{尺寸}。 +\endconcept + + +\bookmark{2}{以V开头} +%\conceptindex{vboxes} +%\concept vbox +\concept 竖直盒子 + +%^^{vertical lists//vboxes formed from} +%A \defterm{vbox} (vertical box) is a \refterm{box} that \TeX\ constructs +%by placing the items of a \refterm{vertical list} one after another, top +%to bottom. A vbox, taken as a unit, is neither inherently horizontal +%nor inherently vertical, i.e., it can appear as an item of either a +%vertical list or a \refterm{horizontal list}. You can construct a vbox +%with the ^|\vbox| or the ^|\vtop| command +%\ctsref{\vtop}. The difference is that for |\vbox|, +%the \refterm{reference point} +%of the constructed vbox is derived from that of the last (and +%usually bottommost) constituent list item, but for |\vtop|, it's that of the +%first (and usually topmost) constituent list item. +%\endconcept +^^{竖直列表//组成竖直盒子} +\defterm{竖直盒子}(vbox,vertical box)是 \TeX\ +从上到下逐个放置\refterm{竖直列表}的项目而构造出来的\refterm{盒子}。 +竖直盒子,作为一个单元,既不是本质上水平的也不是本质上竖直的, +即它可以出现在竖直列表或\refterm{水平列表}中。 +你可以用 ^|\vbox| 或 ^|\vtop| 命令\ctsref{\vtop}构造竖直盒子。 +两者的区别在于, +对于 |\vbox|,所构造的竖直盒子的\refterm{基准点}来源于% +列表的最后一个(通常是最下面那个)组成项; +而对于 |\vtop|,所构造的竖直盒子的\refterm{基准点}来源于% +列表的第一个(通常是最上面那个)组成项。 +\endconcept + + +%\conceptindex{vertical lists} +%\concept{vertical list} +\concept{竖直列表} + +%A \defterm{vertical list} is a list of items +%that \TeX\ has produced while it is +%in one of its vertical modes, i.e., +%assembling either a +%\refterm{vbox} or a page. See ``vertical mode'' below. +\defterm{竖直列表}(vertical list)是 \TeX\ 位于某种竖直模式时 +(即组装\refterm{竖直盒子}或页面时)生成的一列项目。见下面的``竖直模式''。 + +\endconcept + + +%\concept{vertical mode} +\concept{竖直模式} + +%^^{vboxes//vertical mode for} When \TeX\ is assembling either a +%\refterm{vbox} or the main vertical list from which pages are derived, +%it is in one of two \defterm{vertical modes}: ^{ordinary +%vertical mode} for assembling the main vertical list, and ^{internal +%vertical mode} for assembling vboxes. Whenever \TeX\ is in a vertical mode +%its stomach \seeconcept{\anatomy} is constructing a \refterm{vertical +%list} of items (boxes, glue, penalties, etc.). +%\TeX\ typesets the items in the list +%one below another, top to bottom. +^^{竖直盒子//位于竖直模式中} +在组装\refterm{竖直盒子}或者主竖直列(输出的页面来源于此)时, +\TeX\ 位于两种\defterm{竖直模式}(vertical mode)之一: +^{普通竖直模式}用于组装主竖直列,而^{内部竖直模式}用于组装竖直盒子。 +只要 \TeX\ 位于竖直模式中,它的胃\seeconcept{\anatomy}就在构造项目% +(盒子、粘连、惩罚等)的\refterm{竖直列表}。 +\TeX\ 逐个排版列表中的项目,从上到下。 + +%A vertical list can't contain any items produced by +%inherently horizontal commands, e.g., +%^^{vertical lists//can't contain horizontal commands} +%|\hskip| or an ordinary (nonspace) character. +%\footnote{\TeX\ \emph{ignores} any space characters +%that it encounters while it's in a vertical mode.} +竖直列表不能包含任何用本质上的水平命令, +^^{竖直列表//不能包含水平命令} +比如 |\hskip| 或普通的(非空格)字符,生成的项目。 +\footnote{在竖直模式中 \TeX\ \emph{忽略}它遇到的任何空格符。} + +%\ulist +%\li If \TeX\ is assembling a vertical list in ordinary vertical mode and +%encounters an inherently horizontal command, it switches to ordinary +%\refterm{horizontal mode}. +%\li If \TeX\ is assembling a vertical list in internal vertical mode and +%encounters an inherently horizontal command, it complains. +%\endulist +\ulist +\li 如果 \TeX\ 正在普通竖直模式中组装竖直列表,并碰到一个本质上的水平命令, +它将切换到\refterm{水平模式}。 +\li 如果 \TeX\ 正在内部竖直模式中组装竖直列表,并碰到一个本质上的水平命令, +它将报错。 +\endulist + +%Two commands that you might at first think are inherently vertical are +%in fact inherently horizontal: |\valign| \ctsref{\valign} and |\vrule| +%\ctsref{\vrule}. +%^^|\valign//inherently horizontal| +%^^|\vrule//inherently horizontal| +%See \knuth{page~283} for a list of the +%inherently horizontal commands. +这两个命令你也许会认为是本质上竖直的,实际上却是本质上水平的: +|\valign|\ctsref{\valign}和 |\vrule|\ctsref{\vrule}。 +^^|\valign//本质上水平的| +^^|\vrule//本质上水平的| +在\knuth{第~283~页}中列出了所有本质上的水平命令。 + +%It's particularly important to be aware that \TeX\ considers an ordinary +%character other than a space character to be inherently horizontal. If +%\TeX\ suddenly starts a new paragraph when you weren't expecting it, +%a likely cause is a +%character that \TeX\ encountered while in vertical mode. +%You can convince \TeX\ +%not to treat that character as inherently horizontal by enclosing it in +%an \refterm{hbox} since the |\hbox| command, despite its name, is +%neither inherently horizontal nor inherently vertical. +%\endconcept +有个特别重要的事实需要知道,即 \TeX\ 将任何普通的非空格符视为本质上水平的。 +如果 \TeX\ 在你预期之外突然开始一个新段落, +这可能是由 \TeX\ 在竖直模式中遇到的字符引起的。 +要让 \TeX\ 不把该字符视为本质上水平的,你可以将它放入一个\refterm{水平盒子}中; +这是因为,尽管看名字容易误解,|\hbox| 命令既不是本质上水平的也不是本质上竖直的。 +\endconcept + + +\bookmark{2}{以W开头} +%\concept whatsit +\concept 小玩意 + +%A \defterm{whatsit} is an item of information that +%tells \TeX\ to carry out some action +%that doesn't fit into its ordinary scheme of things. +%A whatsit can appear in a horizontal or vertical list, just like a box +%or a glue item. +%\TeX\ typesets a whatsit +%as a \refterm{box} having zero width, height, and depth---in other +%words, a box that contains nothing and occupies no space. +\defterm{小玩意}(whatsit)是一个信息项目, +它用于让 \TeX\ 执行某些无法归入普通事物体系中的操作。 +小玩意可以出现在水平列表或竖直列表中,就像一个盒子或粘连项那样。 +\TeX\ 将小玩意排版为一个宽度、高度和深度都为零的\refterm{盒子}——% +即一个不包含任何东西也不占用任何空间的盒子。 + +%Three sorts of whatsits are built into \TeX: +%\ulist +%\li The |\openout|, |\closeout|, and |\write| commands +%(\p\xrefn{\openout}) +%% (2nd) removed \xref to \write, since it's on the same page +%produce a whatsit for operating on an output file. +%^^|\openout//whatsit produced by| +%^^|\write//whatsit produced by| +%^^|\closeout//whatsit produced by| +%\TeX\ postpones the operation until it next ships out a page +%to the {\dvifile} +%^^{\dvifile//whatsits in} +%(unless the operation is preceded by ^|\immediate|). +%\TeX\ uses a whatsit for these commands because they don't have anything +%to do with what it's typesetting when it encounters them. +%\li The ^|\special| command \ctsref{\special} tells \TeX\ to +%insert certain text directly into the \dvifile. +%As with the |\write| command, \TeX\ postpones the insertion +%until it next ships out a page to the {\dvifile}. +%^^{\dvifile//material inserted by \b\tt\\special\e} +%A typical use of |\special| would be to +%name a graphics file that the device driver should incorporate into +%your final output. +%\li When you change languages with the ^|\language| or ^|\setlanguage| +%commands \ctsref{\language}, +%\TeX\ inserts a whatsit that instructs it to use a +%certain set of hyphenation rules later on when it's breaking a paragraph +%into lines. +%\endulist +%\noindent +%A particular implementation of \TeX\ may provide additional whatsits. +%\endconcept +在 \TeX\ 中内建了三种类型的小玩意: +\ulist +\li |\openout|、|\closeout| 和 |\write| 命令(第~\xrefn{\openout}~页)% +% (2nd) removed \xref to \write, since it's on the same page +生成用于操作输出文件的小玩意。 +^^|\openout//生成小玩意| +^^|\write//生成小玩意| +^^|\closeout//生成小玩意| +\TeX\ 将此操作推迟到下次送出页面到 \dvifile 时% +^^{\dvifile//其中的小玩意} +(除非在该操作之前加上 ^|\immediate|)。 +\TeX\ 用小玩意表示这些命令,因为它们与当时正在排版的内容完全无关。 +\li ^|\special| 命令\ctsref{\special}让 \TeX\ 直接插入某些文本到 \dvifile 中。 +如同 |\write| 命令,\TeX\ 也将此操作推迟到下次送出页面到 \dvifile 时。 +^^{\dvifile//用 \b\tt\\special\e 插入的素材} +|\special| 的典型用法是命名一个图片文件,以让设备驱动文件将它整合到最终输出中。 +\li 当你用 ^|\language| 或 ^|\setlanguage| 命令\ctsref{\language}改变语言时, +\TeX\ 插入一个小玩意,以引导它在以后分段为行时使用特定集合的连字规则。 +\endulist +\noindent +\TeX\ 的某些特别实现可能提供额外的小玩意。 +\endconcept + + +%\concept width +\concept 宽度 + +%^^{boxes//width of} +%The \defterm{width} of a \refterm{box} is the amount of horizontal space +%that it occupies, i.e., the distance from its left edge to its +%right edge. The typeset material in a box can be wider than the box itself. +%\endconcept +^^{盒子//盒子的宽度} +\refterm{盒子}的\defterm{宽度}(width)是它总共占用的水平间隔, +即从它的左边缘到右边缘的距离。盒子内排版的素材可以比盒子本身还宽。 +\endconcept + +\endconcepts + +\ifoldeplain\else\ifcompletebook\else +\vskip4em{\sectionfonts\leftline{本章索引}} +\readindexfile{i} +\fi\fi + +\endchapter +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/config.tex b/Master/texmf-dist/doc/plain/impatient-cn/config.tex new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/config.tex diff --git a/Master/texmf-dist/doc/plain/impatient-cn/copyrght.tex b/Master/texmf-dist/doc/plain/impatient-cn/copyrght.tex new file mode 100644 index 00000000000..2fe8addc6c9 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/copyrght.tex @@ -0,0 +1,48 @@ +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros + + +% Copyright page. +% +\noheadlinetrue +\sinkage + +\noindent `\TeX' is a trademark of the American Mathematical Society. + +\noindent `\Metafont' is a trademark of Addison-Wesley Publishing Company. + +\bigskip +\noindent This book, \thisbook, contains both tutorial and reference +information on all features of both plain and primitive \TeX. + +\bigskip + +\noindent Copyright \copyright{} 2003 Paul~W. Abrahams, +Kathryn~A. Hargreaves, and Karl Berry. + +\bigskip +\noindent Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version +1.1 or any later version published by the Free Software Foundation; with +no Invariant Sections, with no Front-Cover texts, and with no Back-Cover +texts. A copy of the license is included in the chapter entitled ``GNU +Free Documentation License''. + +\medskip\noindent +Under the terms of the GFDL, anyone is allowed to modify and +redistribute this material, and it is our hope that others will find it +useful to do so. That includes translations, either to other natural +languages, or to other computer source or output formats. + +\medskip\noindent +In our interpretation of the GFDL, you may also extract text from this +book for use in a new document, as long as the new document is also +under the GFDL, and as long as proper credit is given (as provided for +in the license). + + +\pagebreak +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/eplain.tex b/Master/texmf-dist/doc/plain/impatient-cn/eplain.tex new file mode 100644 index 00000000000..5d4f98e3c01 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/eplain.tex @@ -0,0 +1,1198 @@ +%% @texfile{ +%% author = "Karl Berry et al.", +%% version = "1.9a", +%% date = "28jul03", +%% filename = "eplain.tex", +%% email = "karl@cs.umb.edu", +%% codetable = "ISO/ASCII", +%% supported = "yes", +%% docstring = "This file defines macros that expand on plain TeX, and +%% is used in the production of the book TeX for the Impatient. It was +%% originally version 1.9 from 11mar91, and differs only in this header +%% material. Sadly, newer versions of eplain have more +%% incompatibilities with the features we used to produce TFTI. Of +%% course new documents should use the latest eplain, available from +%% http://tug.org/eplain and from http://www.ctan.org/macros/eplain. +%% ", +%% } +\def\makeactive#1{\catcode`#1 = \active \ignorespaces}% +\chardef\letter = 11 +\chardef\other = 12 +\catcode`@ = \letter +\def\uncatcodespecials{% + \def\do##1{\catcode`##1 = \other}% + \dospecials +}% +{% + \makeactive\^^M + \long\gdef\letreturn#1{\let^^M = #1}% +}% +\def\gobble#1{}% +\def\gobbletwo#1#2{}% +\def\gobblethree#1#2#3{}% +\def\@gobblemeaning#1:->{}% +\def\sanitize{\expandafter\@gobblemeaning\meaning}% +\def\futurenonspacelet#1{\def\cs{#1}% + \afterassignment\@stepone\let\nexttoken= +}% +\def\\{\let\@stoken= }% +\\ % now \@stoken is a space token (\\ is a control symbol, so that +\def\@stepone{\expandafter\futurelet\cs\@steptwo}% +\def\@steptwo{\expandafter\ifx\cs\@stoken\let\@@next=\@stepthree + \else\let\@@next=\nexttoken\fi \@@next}% +\def\@stepthree{\afterassignment\@stepone\let\@@next= }% +\let\@plainwlog = \wlog +\let\wlog = \gobble +\newlinechar = `^^J +\def\loggingall{\tracingcommands\tw@\tracingstats\tw@ + \tracingpages\@ne\tracingoutput\@ne\tracinglostchars\@ne + \tracingmacros\tw@\tracingparagraphs\@ne\tracingrestores\@ne + \showboxbreadth\maxdimen\showboxdepth\maxdimen +}% +\def\tracingboxes{\showboxbreadth = \maxdimen \showboxdepth = \maxdimen}% +\newdimen\hruledefaultheight \hruledefaultheight = 0.4pt +\newdimen\hruledefaultdepth \hruledefaultdepth = 0.0pt +\newdimen\vruledefaultwidth \vruledefaultwidth = 0.4pt +\def\ehrule{\hrule height\hruledefaultheight depth\hruledefaultdepth}% +\def\evrule{\vrule width\vruledefaultwidth}% +\begingroup + \catcode`\{ = 12 \catcode`\} = 12 + \catcode`\[ = 1 \catcode`\] = 2 + \gdef\lbracechar[{]% + \gdef\rbracechar[}]% + \catcode`\% = \other + \gdef\percentchar[%]\endgroup +\def^^L{\par}% +\let\@ifempty = \iffalse +\ifx\@undefinedmessage\@undefined + \def\@undefinedmessage + {No .aux file; I won't warn you about undefined labels.}% +\fi +%% @texfile{ +%% author = "Karl Berry and Oren Patashnik", +%% version = "0.99h", +%% date = "24 Apr 1991", +%% filename = "btxmac.tex", +%% address = "Please use electronic mail", +%% checksum = "812 4053 30557", +%% email = "opbibtex@neon.stanford.edu", +%% codetable = "ISO/ASCII", +%% supported = "yes", +%% docstring = "Defines macros that make BibTeX work with plain TeX", +%% } +\edef\cite{\the\catcode`@}% +\catcode`@ = 11 +\let\@oldatcatcode = \cite +\chardef\@letter = 11 +\chardef\@other = 12 +\def\@innerdef#1#2{\edef#1{\expandafter\noexpand\csname #2\endcsname}}% +\@innerdef\@innernewcount{newcount}% +\@innerdef\@innernewdimen{newdimen}% +\@innerdef\@innernewif{newif}% +\@innerdef\@innernewwrite{newwrite}% +\def\@gobble#1{}% +\ifx\inputlineno\@undefined + \let\@linenumber = \empty % Pre-3.0. +\else + \def\@linenumber{\the\inputlineno:\space}% +\fi +\def\@getoptionalarg#1{\let\temp = #1\futurelet\next\@bracketcheck}% +\def\@bracketcheck{\begingroup + \if [\next + \aftergroup\@@getoptionalarg + \else + \global\let\@optionalarg = \empty + \aftergroup\temp + \fi +\endgroup}% +\def\@@getoptionalarg[#1]{% + \def\@optionalarg{#1}% + \temp +}% +\def\@tokstostring#1{\@ttsA#1 \@ttsmarkA}% +\def\@ttsA#1 #2\@ttsmarkA{% + \@ifempty{#1}\else + \@ttsB #1\@ttsmarkB + \@ifempty{#2}\else + \@spacesub\@ttsA#2\@ttsmarkA + \fi + \fi +}% +\def\@ttsB#1{% + \ifx #1\@ttsmarkB\else + \string #1% + \expandafter\@ttsB + \fi +}% +\def\@ttsmarkB{\@ttsmarkB}% should never be expanded +\def\@spacesub{+}% +\def\@ifempty#1{\@@ifempty #1\@emptymarkA\@emptymarkB}% +\def\@@ifempty#1#2\@emptymarkB{\ifx #1\@emptymarkA}% +\def\@emptymarkA{\@emptymarkA}% Again, so \ifx won't complain. +\def\@nnil{\@nil}% +\def\@fornoop#1\@@#2#3{}% +\def\@for#1:=#2\do#3{% + \edef\@fortmp{#2}% + \ifx\@fortmp\empty \else + \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}% + \fi +}% +\def\@forloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else + #5\def#4{#2}\ifx #4\@nnil \else#5\@iforloop #3\@@#4{#5}\fi\fi +}% +\def\@iforloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\@nnil + \let\@nextwhile=\@fornoop \else + #4\relax\let\@nextwhile=\@iforloop\fi\@nextwhile#2\@@#3{#4}% +}% +\@innernewif\if@fileexists +\def\@testfileexistence{\@getoptionalarg\@finishtestfileexistence}% +\def\@finishtestfileexistence#1{% + \begingroup + \def\extension{#1}% + \immediate\openin0 = + \ifx\@optionalarg\empty\jobname\else\@optionalarg\fi + \ifx\extension\empty \else .#1\fi + \space + \ifeof 0 + \global\@fileexistsfalse + \else + \global\@fileexiststrue + \fi + \immediate\closein0 + \endgroup +}% +\toks0 = {% +\def\bibliographystyle#1{% + \@readauxfile + \@writeaux{\string\bibstyle{#1}}% +}% +\let\bibstyle = \@gobble +\def\bibliography#1{% + \@readauxfile + \@writeaux{\string\bibdata{#1}}% + \@testfileexistence{bbl}% + \if@fileexists + \@readbblfile + \fi +}% +\let\bibdata = \@gobble +\def\nocite#1{% + \@readauxfile + \@writeaux{\string\citation{#1}}% +}% +\@innernewif\if@notfirstcitation +\def\cite{\begingroup\catcode`_ = \@letter \@getoptionalarg\@cite}% +\def\@cite#1{% + \nocite{#1}% + \printcitestart + \@notfirstcitationfalse + \@for \@citation :=#1\do + {% + \expandafter\@onecitation\@citation\@@ + }% + \ifx\empty\@optionalarg\else + \printcitenote{\@optionalarg}% + \fi + \printcitefinish + \endgroup +}% +\def\@onecitation#1\@@{% + \if@notfirstcitation + \printbetweencitations + \fi + \expandafter \ifx \csname\@citelabel{#1}\endcsname \relax + \if@citewarning + \message{\@linenumber Undefined citation `#1'.}% + \fi + \expandafter\gdef\csname\@citelabel{#1}\endcsname{% + {\tt \nobreak\hskip0pt#1\nobreak\hskip0pt}}% + \fi + \csname\@citelabel{#1}\endcsname + \@notfirstcitationtrue +}% +\def\@citelabel#1{\@tokstostring{b@#1}}% +\def\@citedef#1{% + \begingroup + \@resetnumerals + \@finishcitedef{#1}% +}% +\def\@finishcitedef#1#2{% + \expandafter\gdef\csname\@citelabel{#1}\endcsname{#2}% + \endgroup +}% +\def\@resetnumerals{% + \catcode`0 = \@other \catcode`1 = \@other \catcode`2 = \@other + \catcode`3 = \@other \catcode`4 = \@other \catcode`5 = \@other + \catcode`6 = \@other \catcode`7 = \@other \catcode`8 = \@other + \catcode`9 = \@other \catcode`" = \@other \catcode`' = \@other + \catcode`` = \@other \catcode`, = \@other \catcode`. = \@other +}% +\def\@readbblfile{% + \@innernewcount\@itemnum + \begingroup + \def\begin##1##2{% + \setbox0 = \hbox{\biblabelcontents{##2}}% + \biblabelwidth = \wd0 + }% + \def\end##1{}% ##1 is `thebibliography' again. + \@itemnum = 0 + \def\bibitem{\futurelet\next\@bibitem}% + \def\@bibitem{% + \begingroup \if [\next + \aftergroup\@alphabibitem + \else + \aftergroup\@numberedbibitem + \fi \endgroup + }% + \def\@alphabibitem[##1]##2{% + \expandafter \xdef\csname\@citelabel{##2}\endcsname {##1}% + \@finishbibitem{##2}% + }% + \def\@numberedbibitem##1{% + \advance\@itemnum by 1 + \expandafter \xdef\csname\@citelabel{##1}\endcsname{\number\@itemnum}% + \@finishbibitem{##1}% + }% + \def\@finishbibitem##1{% + \biblabelprint{\csname\@citelabel{##1}\endcsname}% + \@writeaux{\string\@citedef{##1}{\csname\@citelabel{##1}\endcsname}}% + \ignorespaces + }% + \let\em = \bblem + \let\newblock = \bblnewblock + \let\sc = \bblsc + \frenchspacing + \clubpenalty = 4000 \widowpenalty = 4000 + \tolerance = 10000 \hfuzz = .5pt + \everypar = {\hangindent = \biblabelwidth + \advance\hangindent by \biblabelextrahang}% + \bblrm + \parskip = 1.5ex plus .5ex minus .5ex + \biblabelextrahang = .5em + \bblhook + \input \jobname.bbl + \endgroup +}% +\@innernewdimen\biblabelwidth +\@innernewdimen\biblabelextrahang +\def\biblabelprint#1{% + \noindent\hbox to \biblabelwidth{\biblabelcontents{#1}\hss}\enspace}% +\def\biblabelcontents#1{\bblrm [#1]}% +\def\bblrm{\rm}% +\def\bblem{\it}% +\def\bblsc{\ifx\@scfont\@undefined + \font\@scfont = cmcsc10 + \fi + \@scfont +}% +\def\bblnewblock{\hskip .11em plus .33em minus .07em}% +\let\bblhook = \empty +\def\printcitestart{[}% left bracket +\def\printcitefinish{]}% right bracket +\def\printbetweencitations{, }% comma, space +\def\printcitenote#1{, #1}% comma, space, note (if it exists) +\let\citation = \@gobble +\@innernewcount\@numparams +\def\newcommand#1{% + \def\@commandname{#1}% + \futurelet\@next\@continuenewcommand +}% +\def\@continuenewcommand{\begingroup + \if [\@next + \aftergroup\@newcommandwithargs + \else + \global\@numparams = 0 + \aftergroup\@newcommand + \fi +\endgroup}% +\def\@newcommandwithargs[#1]{% + \global\@numparams = #1 + \@newcommand +}% +\def\@newcommand#1{% + \def\@startdef{\expandafter\edef\@commandname}% + \ifnum\@numparams=0 + \let\@paramdef = \empty + \else + \ifnum\@numparams>9 + \errmessage{\the\@numparams\space is too many parameters}% + \else + \ifnum\@numparams<0 + \errmessage{\the\@numparams\space is too few parameters}% + \else + \edef\@paramdef{% + \ifcase\@numparams + \empty No arguments. + \or ####1% + \or ####1####2% + \or ####1####2####3% + \or ####1####2####3####4% + \or ####1####2####3####4####5% + \or ####1####2####3####4####5####6% + \or ####1####2####3####4####5####6####7% + \or ####1####2####3####4####5####6####7####8% + \or ####1####2####3####4####5####6####7####8####9% + \fi + }% + \fi + \fi + \fi + \expandafter\@startdef\@paramdef{#1}% +}% +}% +\ifx\nobibtex\@undefined \the\toks0 \fi +\def\@readauxfile{% + \if@auxfiledone \else % remember: \@auxfiledonetrue if \noauxfile is defined + \global\@auxfiledonetrue + \@testfileexistence{aux}% + \if@fileexists + \begingroup + \endlinechar = -1 + \@setletters + \input \jobname.aux + \endgroup + \else + \message{\@undefinedmessage}% + \global\@citewarningfalse + \fi + \immediate\openout\@auxfile = \jobname.aux + \fi +}% +\newif\if@auxfiledone +\ifx\noauxfile\@undefined \else \@auxfiledonetrue\fi +\def\@setletters{% + \count255 = 0 + \edef\temp{\ifx\inputlineno\@undefined 128\else 256\fi}% + \loop + \ifnum\catcode\count255 = \@other + \catcode\count255 = \@letter + \fi + \advance\count255 by 1 + \ifnum\count255<\temp + \repeat + \catcode`\_ = \@letter +}% +\@innernewwrite\@auxfile +\def\@writeaux#1{\ifx\noauxfile\@undefined \write\@auxfile{#1}\fi}% +\ifx\@undefinedmessage\@undefined + \def\@undefinedmessage{No .aux file; I won't give you warnings about + undefined citations.}% +\fi +\@innernewif\if@citewarning +\ifx\noauxfile\@undefined \@citewarningtrue\fi +\catcode`@ = \@oldatcatcode +\let\auxfile = \@auxfile +\let\for = \@for +\let\getoptionalarg = \@getoptionalarg +\let\ifempty = \@ifempty +\def\iffileexists{\if@fileexists}% +\let\innerdef = \@innerdef +\let\innernewcount = \@innernewcount +\let\innernewdimen = \@innernewdimen +\let\innernewif = \@innernewif +\let\innernewwrite = \@innernewwrite +\let\linenumber = \@linenumber +\let\readauxfile = \@readauxfile +\let\spacesub = \@spacesub +\let\testfileexistence = \@testfileexistence +\let\tokstostring = \@tokstostring +\let\writeaux = \@writeaux +\def\innerinnerdef#1{\expandafter\innerdef\csname inner#1\endcsname{#1}}% +\innerinnerdef{newbox}% +\innerinnerdef{newfam}% +\innerinnerdef{newhelp}% +\innerinnerdef{newinsert}% +\innerinnerdef{newlanguage}% +\innerinnerdef{newmuskip}% +\innerinnerdef{newread}% +\innerinnerdef{newskip}% +\innerinnerdef{newtoks}% +\def\immediatewriteaux#1{% + \ifx\noauxfile\@undefined + \immediate\write\@auxfile{#1}% + \fi +}% +\begingroup + \makeactive\^^M \makeactive\ % No spaces or ^^M's from here on. +\gdef\obeywhitespace{% +\makeactive\^^M\def^^M{\par\futurelet\next\@finishobeyedreturn}% +\makeactive\ \def {\ }% +\aftergroup\@removebox% +\futurelet\next\@finishobeywhitespace% +}% +\gdef\@finishobeywhitespace{{% +\ifx\next % +\aftergroup\@obeywhitespaceloop% +\else\ifx\next^^M% +\aftergroup\gobble% +\fi\fi}}% +\gdef\@finishobeyedreturn{% +\ifx\next^^M\vskip\blanklineskipamount\fi% +\indent% +}% +\endgroup +\def\@obeywhitespaceloop#1{\futurelet\next\@finishobeywhitespace}% +\def\@removebox{% + \setbox0 = \lastbox + \ifdim\wd0=\parindent + \setbox2 = \hbox{\unhbox0}% + \ifdim\wd2=0pt + \ignorespaces + \else + \box2 % Put it back: it wasn't empty. + \fi + \else + \box0 % Put it back: it wasn't the right width. + \fi +}% +\newskip\blanklineskipamount +\blanklineskipamount = 0pt +\def\frac#1/#2{\leavevmode + \kern.1em \raise .5ex \hbox{\the\scriptfont0 #1}% + \kern-.1em $/$% + \kern-.15em \lower .25ex \hbox{\the\scriptfont0 #2}% +}% +\def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\null}% +\def\LaTeX{L\kern -.26em \raise .6ex \hbox{\sevenrm A}\kern -.15em \TeX}% +\def\AMSTeX{$\cal A\kern -.1667em + \lower .5ex\hbox{$\cal M$}% + \kern -.125em S$-\TeX +}% +\def\BibTeX{{\rm B\kern-.05em{\sevenrm I\kern-.025em B}\kern-.08em + T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}% +\font\mflogo = logo10 +\def\MF{{\mflogo META}{\tenrm \-}{\mflogo FONT}}% +\def\blackbox{\vrule height .8ex width .6ex depth -.2ex }% square bullet +\def\makeblankbox#1#2{% + \ifvoid0 + \errmessage{Box 0 is void}% + \errhelp = \@makeblankboxhelp + \fi + \hbox{\lower\dp0 + \vbox{\hidehrule{#1}{#2}% + \kern -#1% overlap rules + \hbox to \wd0{\hidevrule{#1}{#2}% + \raise\ht0\vbox to #1{}% vrule height + \lower\dp0\vtop to #1{}% vrule depth + \hfil\hidevrule{#2}{#1}% + }% + \kern-#1\hidehrule{#2}{#1}% + }% + }% +}% +\newhelp\@makeblankboxhelp{Assigning to the dimensions of a void^^J% + box has no effect. Do `\string\setbox0=\string\null' before you^^J% + define its dimensions.}% +\def\hidehrule#1#2{\kern-#1\hrule height#1 depth#2 \kern-#2}% +\def\hidevrule#1#2{% + \kern-#1% + \dimen0=#1\advance\dimen0 by #2% + \vrule width\dimen0 + \kern-#2% +}% +\newdimen\boxitspace \boxitspace = 3pt +\def\boxit#1{% + \vbox{% + \hrule + \hbox{% + \vrule + \kern\boxitspace + \vbox{\kern\boxitspace \parindent = 0pt #1\kern\boxitspace}% + \kern\boxitspace + \vrule + }% + \hrule + }% +}% +\def\numbername#1{\ifcase#1% + zero% + \or one% + \or two% + \or three% + \or four% + \or five% + \or six% + \or seven% + \or eight% + \or nine% + \or ten% + \or #1% + \fi +}% +\def\environment#1{% + \ifx\@groupname\@undefined\else + \errhelp = \@unnamedendgrouphelp + \errmessage{`\@groupname' was not closed by \string\endenvironment}% + \fi + \def\@groupname{#1}% + \begingroup + \let\@groupname = \@undefined +}% +\def\endenvironment#1{% + \endgroup + \def\@thearg{#1}% + \ifx\@groupname\@thearg + \else + \ifx\@groupname\@undefined + \errhelp = \@isolatedendenvironmenthelp + \errmessage{Isolated \string\endenvironment\space for `#1'}% + \else + \errhelp = \@mismatchedenvironmenthelp + \errmessage{Environment `#1' ended, but `\@groupname' started}% + \endgroup % Probably a typo in the names. + \fi + \fi + \let\@groupname = \@undefined +}% +\newhelp\@unnamedendgrouphelp{Most likely, you just forgot an^^J% + \string\endenvironment. Maybe you should try inserting another^^J% + \string\endgroup to recover.}% +\newhelp\@isolatedendenvironmenthelp{You ended an environment X, but^^J% + no \string\environment\space to start it is anywhere in sight.^^J% + You might also be at an \string\endenvironment\space that would match^^J% + a \string\begingroup, i.e., you forgot an \string\endgroup.}% +\newhelp\@mismatchedenvironmenthelp{You started an environment X, but^^J% + you ended it with Y. Maybe you made a typo in one or the other^^J% + of the names.}% +\newif\ifenvironment +\def\checkenv{\ifenvironment \errhelp = \@interwovenenvhelp + \errmessage{Interwoven environments}% + \endgroup \fi +}% +\newhelp\@interwovenenvhelp{Perhaps you forgot to end the previous^^J% + environment? I'm finishing off the current group,^^J% + hoping that will fix it.}% +\newif\ifeqno +\newif\ifleqno +\def\eq{\the\@eqtoks}% +\def\eqn{\the\@eqnotoks}% +\newtoks\@eqtoks +\newtoks\@eqnotoks +\long\def\displaysetup#1$${% + \@ddisplaytest#1\eqdef\eqdef\@ddisplaytest + \expandafter\@displaytest\the\toks0\eqno\eqno\@displaytest +}% +\def\@removetrailingspaces#1 #2 \endmark{#1}% +\long\def\@ddisplaytest#1\eqdef#2\eqdef#3\@ddisplaytest{% + \if !\noexpand#3!% + \toks0 = {#1}% + \else + \toks2 = {#1}% + \begingroup + \def\temp{\@removetrailingspaces #2}% + \def\\{ }% + \xdef\temp{{\expandafter\temp\\ \endmark}}% + \endgroup + \toks4 = \expandafter\expandafter\expandafter{\expandafter\eqdef\temp}% + \edef\@setupeq{\toks0 = {\the\toks2 \the\toks4}}% + \@setupeq + \fi +}% +\long\def\@displaytest#1\eqno#2\eqno#3\@displaytest{% + \if !\noexpand#3!% + \@ldisplaytest#1\leqno\leqno\@ldisplaytest + \else + \eqnotrue + \leqnofalse + \@eqnotoks = {#2}% + \@eqtoks = {#1}% + \fi + \generaldisplay$$% +}% +\long\def\@ldisplaytest#1\leqno#2\leqno#3\@ldisplaytest{% + \@eqtoks = {#1}% + \if !\noexpand#3!% + \eqnofalse + \else + \eqnotrue + \leqnotrue + \@eqnotoks = {#2}% + \fi +}% +\newdimen\leftdisplayindent +\newtoks\previouseverydisplay +\newtoks\displayhook +\def\leftdisplays{% + \previouseverydisplay = \everydisplay + \everydisplay = {\the\previouseverydisplay \the\displayhook \displaysetup}% + \def\generaldisplay{% + \leftline{% + \strut + \indent \hskip\leftskip \hskip\leftdisplayindent + \dimen0 = \parindent \advance\dimen0 by \leftskip + \advance\dimen0 by \leftdisplayindent + \advance\displaywidth by -\dimen0 + \@redefinealignmentdisplays + \ifeqno\ifleqno + \kern-\dimen0\rlap{$\displaystyle\eqn$}\kern\dimen0 + \fi\fi + $\displaystyle\eq$% + \ifeqno\ifleqno\else + \hfill $\displaystyle\eqn$% + \fi\fi + }% + }% +}% +\def\@redefinealignmentdisplays{% + \def\displaylines##1{\displ@y + \vcenter{% + \let\oldeqprint = \eqprint + \def\eqprint{\hfill\oldeqprint}% + \halign{\hbox to\displaywidth{$\@lign\displaystyle####\hfil$}\crcr + ##1\crcr}}}% + \def\eqalignno##1{\displ@y + \vcenter{% + \halign to\displaywidth{% + $\@lign\displaystyle{####}$\tabskip\z@skip + &$\@lign\displaystyle{{}####}$\hfil\tabskip\centering + &\llap{$\@lign####$}\tabskip\z@skip\crcr + ##1\crcr}}}% + \def\leqalignno##1{\displ@y + \vcenter{% + \halign to\displaywidth{% + $\@lign\displaystyle{####}$\tabskip\z@skip + &$\@lign\displaystyle{{}####}$\hfil\tabskip\centering + &\kern-\displaywidth + \rlap{\kern-\parindent\kern-\leftskip$\@lign####$}% + \tabskip\displaywidth\crcr + ##1\crcr}}}% +}% +\def\centereddisplays{\let\displaysetup = \relax}% +\def\monthname{% + \ifcase\month + \or Jan\or Feb\or Mar\or Apr\or May\or Jun% + \or Jul\or Aug\or Sep\or Oct\or Nov\or Dec% + \fi +}% +\def\fullmonthname{% + \ifcase\month + \or January\or February\or March\or April\or May\or June% + \or July\or August\or September\or October\or November\or December% + \fi +}% +\def\timestring{\begingroup + \count0 = \time + \divide\count0 by 60 + \count2 = \count0 % The hour, from zero to 23. + \count4 = \time + \multiply\count0 by 60 + \advance\count4 by -\count0 % The minute, from zero to 59. + \ifnum\count4<10 + \toks1 = {0}% + \else + \toks1 = {}% + \fi + \ifnum\count2<12 + \toks0 = {a.m.}% + \else + \toks0 = {p.m.}% + \advance\count2 by -12 + \fi + \ifnum\count2=0 + \count2 = 12 + \fi + \number\count2:\the\toks1 \number\count4 \thinspace \the\toks0 +\endgroup}% +\def\timestamp{\number\day\space\monthname\space\number\year\quad\timestring}% +\newskip\abovelistskip \abovelistskip = .5\baselineskip +\newskip\interitemskip \interitemskip = 0pt +\newskip\belowlistskip \belowlistskip = .5\baselineskip +\newdimen\listleftindent \listleftindent = 0pt +\newdimen\listrightindent \listrightindent = 0pt +\def\listcompact{\interitemskip = 0pt \relax}% +\newdimen\@listindent +\def\beginlist{% + \@listindent = \parindent + \advance\@listindent by \listleftindent + \everydisplay = \expandafter{\the\everydisplay + \advance\displayindent by \@listindent + \advance\displaywidth by -\@listindent + \advance\displaywidth by -\listrightindent}% + \nobreak\vskip\abovelistskip + \advance\leftskip by \@listindent + \advance\rightskip by \listrightindent +}% +\def\printitem{% + \par + \vskip-\parskip + \noindent + \llap{\marker \enspace}% +}% +\def\endlist{\vskip\belowlistskip}% +\newcount\numberedlistdepth +\newcount\itemnumber +\newcount\itemletter +\def\numberedmarker{% + \ifcase\numberedlistdepth + (impossible)% + \or \itemnumberout)% + \or \itemletterout)% + \else *% + \fi +}% +\def\numberedlist{\environment{@numbered-list}% + \advance\numberedlistdepth by 1 + \itemnumber = 1 + \itemletter = `a + \beginlist + \let\marker = \numberedmarker + \def\li{% + \ifnum\itemnumber=1\else + \vskip\interitemskip + \fi + \printitem + \advance\itemnumber by 1 + \advance\itemletter by 1 + }% +}% +\def\itemnumberout{\number\itemnumber}% +\def\itemletterout{\char\itemletter}% +\def\endnumberedlist{% + \par + \endenvironment{@numbered-list}% + \endlist +}% +\newcount\unorderedlistdepth +\def\unorderedmarker{% + \ifcase\unorderedlistdepth + (impossible)% + \or \blackbox + \or ---% + \else *% + \fi +}% +\def\unorderedlist{\environment{@unordered-list}% + \advance\unorderedlistdepth by 1 + \beginlist + \itemnumber = 1 + \let\marker = \unorderedmarker + \def\li{% + \ifnum\itemnumber=1\else + \vskip\interitemskip + \fi + \printitem + \advance\itemnumber by 1 + }% +}% +\def\endunorderedlist{% + \par + \endenvironment{@unordered-list}% + \endlist +}% +\def\listing#1{% + \par \begingroup + \@setuplisting + \setuplistinghook + \input #1 + \endgroup +}% +\let\setuplistinghook = \empty +\def\@setuplisting{% + \uncatcodespecials + \obeywhitespace + \makeactive\` + \makeactive\^^I + \def^^L{\vfill\eject}% + \tt +}% +{% + \makeactive\` + \gdef`{\relax\lq}% Defeat ligatures. +}% +{% + \makeactive\^^I + \tt + \gdef^^I{\hskip8\fontdimen2\font \relax}% +}% +\newif\if@tocfileopened +\newwrite\tocfile +\def\opentocfile{% + \if@tocfileopened\else + \global\@tocfileopenedtrue + \immediate\openout\tocfile = \jobname.toc + \fi +}% +\def\writetocentry#1#2{\writenumberedtocentry{#1}{#2}\empty}% +\def\writenumberedtocentry#1#2#3{% + \ifrewritetocfile + \opentocfile + \toks0 = {\expandafter\noexpand \csname toc#1entry\endcsname}% + \def\temp{#2}% + %\def\cs{#3}% fixed % + \toks2 = \expandafter{#3}% + \edef\cs{\the\toks2}% + \edef\@wr{% + \write\tocfile{% + \the\toks0 + {\sanitize\temp}% + \ifx \empty\cs\else{#3}\fi + {\noexpand\folio}% + }% + }% + \@wr + \fi + \ignorespaces +}% +\newif\ifrewritetocfile \rewritetocfiletrue +\def\readtocfile{% + \testfileexistence{toc}% + \if@fileexists + \input \jobname.toc + \ifrewritetocfile + \opentocfile + \fi + \fi +}% +\def\tocchapterentry#1#2{\line{\bf #1 \dotfill\ #2}}% +\def\tocsectionentry#1#2{\line{\quad\sl #1 \dotfill\ \rm #2}}% +\def\tocsubsectionentry#1#2{\line{\qquad\rm #1 \dotfill\ #2}}% +\def\xrdef#1{% + \@readauxfile + \begingroup + \xrlabel{#1}% + \edef\@wr{\@writexrdef{\the\xrlabeltoks}}% + \@wr + \endgroup + \ignorespaces +}% +\def\@writexrdef#1{% + \@writeaux{% + \string\gdef\expandafter\string\csname#1\endcsname {\noexpand\folio}% + }% +}% +\newtoks\xrlabeltoks +\def\xrlabel#1{% + \begingroup + \escapechar = `\_ + \edef\tts{\tokstostring{#1_}}% + \global\xrlabeltoks = \expandafter{\tts}% + \endgroup +}% +\let\ifxrefwarning = \iftrue +\def\xrefwarningtrue{\@citewarningtrue \let\ifxrefwarning = \iftrue}% +\def\xrefwarningfalse{\@citewarningfalse let\ifxrefwarning = \iffalse}% +\def\xrefn#1{% + \@readauxfile + \xrlabel{#1}% \xrlabeltoks now has the control sequence name. + \toks0 = \expandafter{\csname\the\xrlabeltoks\endcsname}% + \expandafter \ifx\the\toks0\relax + \if@citewarning + \message{\linenumber Undefined label `\tokstostring{#1}'.}% + \fi + \begingroup + \let\spacesub = \space + \expandafter\xdef\the\toks0{`{\tt \tokstostring{#1}}'}% + \endgroup + \fi + \the\toks0 % Always produce something. +}% +\def\xref#1{p.\thinspace\xrefn{#1}}% +\newcount\eqnumber +\def\eqdefn#1{% + \@readauxfile + \global\advance\eqnumber by 1 + \begingroup + \xrlabel{#1}% \xrlabeltoks now has the control sequence name. + \edef\@wr{\@writeeqdef{\the\xrlabeltoks}{\the\eqnumber}}% + \@wr + \endgroup + \expandafter\xdef\csname\the\xrlabeltoks\endcsname{\the\eqnumber}% + \ignorespaces +}% +\def\@writeeqdef#1#2{% + \immediatewriteaux{% + \string\gdef\expandafter\string\csname#1\endcsname{#2}% + }% +}% +\def\eqdef#1{% + \@maybedisableeqno + \eqno \eqdefn{#1}\eqprint{\the\eqnumber}% + \@mayberestoreeqno + \ignorespaces +}% +\let\@mayberestoreeqno = \empty +\def\@maybedisableeqno{% + \ifinner + \global\let\eqno = \relax + \global\let\@mayberestoreeqno = \@restoreeqno + \fi +}% +\let\@primitiveeqno = \eqno +\def\@restoreeqno{% + \global\let\eqno = \@primitiveeqno + \global\let\@mayberestoreeqno = \empty +}% +\def\eqref#1{% + \@readauxfile + \xrlabel{#1}% \xrlabeltoks now has the control sequence name. + \toks0 = \expandafter{\csname\the\xrlabeltoks\endcsname}% + \expandafter \ifx\the\toks0\relax + \if@citewarning + \message{\linenumber Undefined equation label `\tokstostring{#1}'.}% + \fi + \begingroup + \let\spacesub = \space + \expandafter\xdef\the\toks0{`{\tt \tokstostring{#1}}'}% + \endgroup + \fi + \eqprint{\the\toks0}% +}% +\def\eqprint#1{(#1)}% +\begingroup + \catcode `\^^M = \active % + \globaldefs = 1 % + \def\flushleft{\beforejustify % + \aftergroup\@endflushleft % + \def^^M{\null\hfil\break}% + \def\@eateol^^M{}% + \@eateol % + }% + \def\flushright{\beforejustify % + \aftergroup\@endflushright % + \def^^M{\break\null\hfil}% + \def\@eateol^^M{\hfil\null}% + \@eateol % + }% + \def\center {\beforejustify % + \aftergroup\@endcenter % + \def^^M{\hfil\break\null\hfil}% + \def\@eateol^^M{\hfil\null}% + \@eateol % + }% +\endgroup +\def\@endflushleft{\unpenalty{\parfillskip = 0pt plus 1 fil\par}\ignorespaces}% +\def\@endflushright{% Remove the \hfil\null\break we just put on. + \unskip \setbox0=\lastbox \unpenalty + {\parfillskip = 0pt \par}\ignorespaces +}% +\def\@endcenter{% Remove the \hfil\null\break we just put on. + \unskip \setbox0=\lastbox \unpenalty + {\parfillskip = 0pt plus 1fil \par}\ignorespaces +}% +\def\beforejustify{% + \par\noindent + \catcode`\^^M = \active + \checkenv \environmenttrue +}% +\newcount\abovecolumnspenalty \abovecolumnspenalty = 10000 +\newcount\@linestogo % Lines remaining to process. +\newcount\@linestogoincolumn % Lines remaining in column. +\newcount\@columndepth % Number of lines in a column. +\newdimen\@columnwidth % Width of each column. +\newtoks\crtok \crtok = {\cr}% +\newcount\currentcolumn +\def\makecolumns#1/#2: {\par \begingroup + \@columndepth = #1 + \advance\@columndepth by #2 + \advance\@columndepth by -1 + \divide \@columndepth by #2 + \@linestogoincolumn = \@columndepth + \@linestogo = #1 + \currentcolumn = 1 + \def\@endcolumnactions{% + \ifnum \@linestogo<2 + \the\crtok \egroup \endgroup \par % End \valign and \makecolumns. + \else + \global\advance\@linestogo by -1 + \ifnum\@linestogoincolumn<2 + \global\advance\currentcolumn by 1 + \global\@linestogoincolumn = \@columndepth + \the\crtok + \else + &\global\advance\@linestogoincolumn by -1 + \fi + \fi + }% + \makeactive\^^M + \letreturn \@endcolumnactions + \@columnwidth = \hsize + \advance\@columnwidth by -\parindent + \divide\@columnwidth by #2 + \penalty\abovecolumnspenalty + \noindent % It's not a paragraph (usually). + \valign\bgroup + &\hbox to \@columnwidth{\strut \hsize = \@columnwidth ##\hfil}\cr +}% +\newcount\footnotenumber +\newdimen\footnotemarkseparation \footnotemarkseparation = .5em +\newskip\interfootnoteskip \interfootnoteskip = 0pt +\newtoks\everyfootnote +\newdimen\footnoterulewidth \footnoterulewidth = 2true in +\newdimen\footnoteruleheight \footnoteruleheight = 0.4pt +\newdimen\belowfootnoterulespace \belowfootnoterulespace = 2.6pt +\let\@plainfootnote = \footnote +\let\@plainvfootnote = \vfootnote +\def\vfootnote#1{\insert\footins\bgroup + \interlinepenalty\interfootnotelinepenalty + \splittopskip\ht\strutbox % top baseline for broken footnotes + \advance\splittopskip by \interfootnoteskip + \splitmaxdepth\dp\strutbox + \floatingpenalty\@MM + \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip + \everypar = {}% + \the\everyfootnote + \vskip\interfootnoteskip + \indent\llap{#1\kern\footnotemarkseparation}\footstrut\futurelet\next\fo@t +}% +\def\footnoterule{\dimen0 = \footnoteruleheight + \advance\dimen0 by \belowfootnoterulespace + \kern-\dimen0 + \hrule width\footnoterulewidth height\footnoteruleheight depth0pt + \kern\belowfootnoterulespace + \vskip-\interfootnoteskip +}% +\def\numberedfootnote{% + \global\advance\footnotenumber by 1 + \@plainfootnote{$^{\number\footnotenumber}$}% +}% +\newdimen\paperheight \paperheight = 11in +\def\topmargin{\afterassignment\@finishtopmargin \dimen0}% +\def\@finishtopmargin{% + \dimen2 = \voffset % Remember the old \voffset. + \voffset = \dimen0 \advance\voffset by -1in + \advance\dimen2 by -\voffset % Compute the change in \voffset. + \advance\vsize by \dimen2 % Change type area accordingly. +}% +\def\advancetopmargin{% + \dimen0 = 0pt \afterassignment\@finishadvancetopmargin \advance\dimen0 +}% +\def\@finishadvancetopmargin{% + \advance\voffset by \dimen0 + \advance\vsize by -\dimen0 +}% +\def\bottommargin{\afterassignment\@finishbottommargin \dimen0}% +\def\@finishbottommargin{% + \@computebottommargin % Result in \dimen2. + \advance\dimen2 by -\dimen0 % Compute the change in the bottom margin. + \advance\vsize by \dimen2 % Change the type area. +}% +\def\advancebottommargin{% + \dimen0 = 0pt \afterassignment\@finishadvancebottommargin \advance\dimen0 +}% +\def\@finishadvancebottommargin{% + \advance\vsize by -\dimen0 +}% +\def\@computebottommargin{% + \dimen2 = \paperheight % The total paper size. + \advance\dimen2 by -\vsize % Less the text size. + \advance\dimen2 by -\voffset % Less the offset at the top. + \advance\dimen2 by -1in % Less the default offset. +}% +\newdimen\paperwidth \paperwidth = 8.5in +\def\leftmargin{\afterassignment\@finishleftmargin \dimen0}% +\def\@finishleftmargin{% + \dimen2 = \hoffset % Remember the old \hoffset. + \hoffset = \dimen0 \advance\hoffset by -1in + \advance\dimen2 by -\hoffset % Compute the change in \hoffset. + \advance\hsize by \dimen2 % Change type area accordingly. +}% +\def\advanceleftmargin{% + \dimen0 = 0pt \afterassignment\@finishadvanceleftmargin \advance\dimen0 +}% +\def\@finishadvanceleftmargin{% + \advance\hoffset by \dimen0 + \advance\hsize by -\dimen0 +}% +\def\rightmargin{\afterassignment\@finishrightmargin \dimen0}% +\def\@finishrightmargin{% + \@computerightmargin % Result in \dimen2. + \advance\dimen2 by -\dimen0 % Compute the change in the right margin. + \advance\hsize by \dimen2 % Change the type area. +}% +\def\advancerightmargin{% + \dimen0 = 0pt \afterassignment\@finishadvancerightmargin \advance\dimen0 +}% +\def\@finishadvancerightmargin{% + \advance\hsize by -\dimen0 +}% +\def\@computerightmargin{% + \dimen2 = \paperwidth % The total paper size. + \advance\dimen2 by -\hsize % Less the text size. + \advance\dimen2 by -\hoffset % Less the offset at the left. + \advance\dimen2 by -1in % Less the default offset. +}% +\newskip\abovedoublecolumnskip \abovedoublecolumnskip = \bigskipamount +\newskip\belowdoublecolumnskip \belowdoublecolumnskip = \bigskipamount +\newdimen\gutter \gutter = 2pc +\newdimen\doublecolumnhsize +\newbox\@partialpage \newdimen\singlecolumnhsize \newdimen\singlecolumnvsize +\newtoks\previousoutput +\def\doublecolumns{% + \doublecolumnhsize = \hsize % If \hsize changed, get the new value. + \par % Shouldn't start in horizontal mode. + \previousoutput = \expandafter{\the\output}% + \advance\doublecolumnhsize by -\gutter + \divide\doublecolumnhsize by 2 + \output = {% + \global\setbox\@partialpage = + \vbox{\unvbox255\vskip\abovedoublecolumnskip}% + }% + \pagegoal = \pagetotal + \break % Now expand the \output just above. + \output = {\doublecolumnoutput}% + \singlecolumnhsize = \hsize + \singlecolumnvsize = \vsize + \hsize = \doublecolumnhsize + \vsize = 2\vsize +}% +\def\@doublecolumnsplit{% + \splittopskip = \topskip + \splitmaxdepth = \maxdepth + \dimen0 = \singlecolumnvsize + \advance\dimen0 by -\ht\@partialpage + \advance\dimen0 by -\ht\footins + \ifvoid\footins\else \advance\dimen0 by -\skip\footins \fi + \advance\dimen0 by -\ht\topins + \ifvoid\topins\else \advance\dimen0 by -\skip\topins \fi + \begingroup + \vbadness = 10000 + \global\setbox1 = \vsplit255 to \dimen0 + \wd1 = \hsize + \global\setbox3 = \vsplit255 to \dimen0 + \wd3 = \hsize + \endgroup + \global\setbox4 = \vbox{\unvbox255 \penalty\outputpenalty}% + \global\setbox255 + = \vbox{% + \unvbox\@partialpage + \hbox to \singlecolumnhsize{\box1\hfil\box3}% + }% +}% +\def\doublecolumnoutput{% + \@doublecolumnsplit + \hsize = \singlecolumnhsize % Local to the \output group. + \vsize = \singlecolumnvsize + \the\previousoutput + \unvbox4 +}% +\def\singlecolumn{% + \par % Shouldn't start in horizontal mode. + \output = {\global\setbox1 = \box255}% + \pagegoal = \pagetotal + \break % Exercise the page builder, i.e., \output. + \setbox255 = \box1 % Retrieve what the fake \output set. + \begingroup + \singlecolumnvsize = \ht\@partialpage + \advance\singlecolumnvsize by \ht\footins + \ifvoid\footins\else \advance\singlecolumnvsize by \skip\footins\fi + \advance\singlecolumnvsize by \ht\topins + \ifvoid\topins\else \advance\singlecolumnvsize by \skip\topins\fi + \dimen0 = \ht255 \divide\dimen0 by 2 + \advance\singlecolumnvsize by \dimen0 + \advance\singlecolumnvsize by .5\baselineskip + \@doublecolumnsplit + \endgroup + \hsize = \singlecolumnhsize + \vsize = \singlecolumnvsize + \output = \expandafter{\the\previousoutput}% + \unvbox255 + \vskip\belowdoublecolumnskip + \nointerlineskip +}% +\let\wlog = \@plainwlog +\catcode`@ = \other +\def\fmtname{eplain}% +\def\eplain{t}% +{\edef\plainversion{\fmtversion}% + \xdef\fmtversion{1.9: 26 April 1991 (and plain \plainversion)}% +}% diff --git a/Master/texmf-dist/doc/plain/impatient-cn/eplain3.tex b/Master/texmf-dist/doc/plain/impatient-cn/eplain3.tex new file mode 100644 index 00000000000..aa446aec776 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/eplain3.tex @@ -0,0 +1,4346 @@ +%% @texfile{ +%% author = "Karl Berry, Steven Smith, Oleg Katsitadze, and others", +%% version = "3.6", +%% date = "Mon Sep 30 11:39:28 PDT 2013", +%% filename = "eplain.tex", +%% email = "bug-eplain@tug.org", +%% checksum = "4346 9755 139706", +%% codetable = "ASCII", +%% supported = "yes", +%% docstring = "This file defines macros that extend and expand on +%% plain TeX. eplain.tex is xeplain.tex and the other +%% source files with comments stripped; see the original +%% files for author credits, etc. The original sources +%% can be found in Eplain source zip archive in your TeX +%% distribution, on CTAN or on Eplain's home page at +%% http://tug.org/eplain. And please base diffs or +%% other contributions on xeplain.tex, not the +%% stripped-down eplain.tex.", +%% } +\ifx\eplain\undefined + \let\next\relax +\else + \expandafter\let\expandafter\next\csname endinput\endcsname +\fi +\next +%% +%% This is file `ifpdf.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ifpdf.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Project: ifpdf +%% Version: 2011/01/30 v2.3 +%% +%% Copyright (C) 2001, 2005-2011 by +%% Heiko Oberdiek <heiko.oberdiek at googlemail.com> +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3c of this license or (at your option) any later +%% version. This version of this license is in +%% http://www.latex-project.org/lppl/lppl-1-3c.txt +%% and the latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Heiko Oberdiek. +%% +%% The Base Interpreter refers to any `TeX-Format', +%% because some files are installed in TDS:tex/generic//. +%% +%% This work consists of the main source file ifpdf.dtx +%% and the derived files +%% ifpdf.sty, ifpdf.pdf, ifpdf.ins, ifpdf.drv, ifpdf-test1.tex. +%% +\begingroup\catcode61\catcode48\catcode32=10\relax% + \catcode13=5 % ^^M + \endlinechar=13 % + \catcode35=6 % # + \catcode39=12 % ' + \catcode44=12 % , + \catcode45=12 % - + \catcode46=12 % . + \catcode58=12 % : + \catcode64=11 % @ + \catcode123=1 % { + \catcode125=2 % } + \expandafter\let\expandafter\x\csname ver@ifpdf.sty\endcsname + \ifx\x\relax % plain-TeX, first loading + \else + \def\empty{}% + \ifx\x\empty % LaTeX, first loading, + \else + \expandafter\ifx\csname PackageInfo\endcsname\relax + \def\x#1#2{% + \immediate\write-1{Package #1 Info: #2.}% + }% + \else + \def\x#1#2{\PackageInfo{#1}{#2, stopped}}% + \fi + \x{ifpdf}{The package is already loaded}% + \fi + \fi +\endgroup% +\begingroup\catcode61\catcode48\catcode32=10\relax% + \catcode13=5 % ^^M + \endlinechar=13 % + \catcode35=6 % # + \catcode39=12 % ' + \catcode40=12 % ( + \catcode41=12 % ) + \catcode44=12 % , + \catcode45=12 % - + \catcode46=12 % . + \catcode47=12 % / + \catcode58=12 % : + \catcode64=11 % @ + \catcode91=12 % [ + \catcode93=12 % ] + \catcode123=1 % { + \catcode125=2 % } + \expandafter\ifx\csname ProvidesPackage\endcsname\relax + \def\x#1#2#3[#4]{\endgroup + \xdef#1{#4}% + }% + \else + \def\x#1#2[#3]{\endgroup + #2[{#3}]% + \ifx#1\@undefined + \xdef#1{#3}% + \fi + \ifx#1\relax + \xdef#1{#3}% + \fi + }% + \fi +\expandafter\x\csname ver@ifpdf.sty\endcsname +\ProvidesPackage{ifpdf}% + [2011/01/30 v2.3 Provides the ifpdf switch (HO)]% +\begingroup\catcode61\catcode48\catcode32=10\relax% + \catcode13=5 % ^^M + \endlinechar=13 % + \catcode123=1 % { + \catcode125=2 % } + \catcode64=11 % @ + \def\x{\endgroup + \expandafter\edef\csname ifpdf@AtEnd\endcsname{% + \endlinechar=\the\endlinechar\relax + \catcode13=\the\catcode13\relax + \catcode32=\the\catcode32\relax + \catcode35=\the\catcode35\relax + \catcode61=\the\catcode61\relax + \catcode64=\the\catcode64\relax + \catcode123=\the\catcode123\relax + \catcode125=\the\catcode125\relax + }% + }% +\x\catcode61\catcode48\catcode32=10\relax% +\catcode13=5 % ^^M +\endlinechar=13 % +\catcode35=6 % # +\catcode64=11 % @ +\catcode123=1 % { +\catcode125=2 % } +\def\TMP@EnsureCode#1#2{% + \edef\ifpdf@AtEnd{% + \ifpdf@AtEnd + \catcode#1=\the\catcode#1\relax + }% + \catcode#1=#2\relax +} +\TMP@EnsureCode{10}{12}% ^^J +\TMP@EnsureCode{39}{12}% ' +\TMP@EnsureCode{40}{12}% ( +\TMP@EnsureCode{41}{12}% ) +\TMP@EnsureCode{44}{12}% , +\TMP@EnsureCode{45}{12}% - +\TMP@EnsureCode{46}{12}% . +\TMP@EnsureCode{47}{12}% / +\TMP@EnsureCode{58}{12}% : +\TMP@EnsureCode{60}{12}% < +\TMP@EnsureCode{91}{12}% [ +\TMP@EnsureCode{93}{12}% ] +\TMP@EnsureCode{94}{7}% ^ +\TMP@EnsureCode{96}{12}% ` +\begingroup + \expandafter\ifx\csname ifpdf\endcsname\relax + \else + \edef\i/{\expandafter\string\csname ifpdf\endcsname}% + \expandafter\ifx\csname PackageError\endcsname\relax + \def\x#1#2{% + \edef\z{#2}% + \expandafter\errhelp\expandafter{\z}% + \errmessage{Package ifpdf Error: #1}% + }% + \def\y{^^J}% + \newlinechar=10 % + \else + \def\x#1#2{% + \PackageError{ifpdf}{#1}{#2}% + }% + \def\y{\MessageBreak}% + \fi + \x{Name clash, \i/ is already defined}{% + Incompatible versions of \i/ can cause problems,\y + therefore package loading is aborted.% + }% + \endgroup + \expandafter\ifpdf@AtEnd + \fi% +\endgroup +\begingroup + \def\skip#1\relax\begingroup{}% + \expandafter\ifx\csname pdfoutput\endcsname\relax + \else + \expandafter\skip + \fi + \expandafter\ifx\csname directlua\endcsname\relax + \expandafter\skip + \fi +\endgroup +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname RequirePackage\endcsname\relax + \def\TMP@RequirePackage#1[#2]{% + \begingroup\expandafter\expandafter\expandafter\endgroup + \expandafter\ifx\csname ver@#1.sty\endcsname\relax + \input #1.sty\relax + \fi + }% + \TMP@RequirePackage{ifluatex}[2009/04/10]% +\else + \RequirePackage{ifluatex}[2009/04/10]% +\fi +\ifluatex + \ifnum\luatexversion<36 % + \else + \begingroup + \directlua{tex.enableprimitives('ifpdf', {'pdfoutput'})}% + \global\let\pdfoutput\ifpdfpdfoutput + \endgroup + \fi +\fi +\relax\begingroup\endgroup +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname newif\endcsname\relax + \edef\pdffalse{% + \let + \expandafter\noexpand\csname ifpdf\endcsname + \expandafter\noexpand\csname iffalse\endcsname + }% + \edef\pdftrue{% + \let + \expandafter\noexpand\csname ifpdf\endcsname + \expandafter\noexpand\csname iftrue\endcsname + }% + \pdffalse +\else + \csname newif\expandafter\endcsname\csname ifpdf\endcsname +\fi +\begingroup\expandafter\expandafter\expandafter\endgroup +\expandafter\ifx\csname pdfoutput\endcsname\relax +\else + \ifnum\pdfoutput<1 % + \else + \pdftrue + \fi +\fi +\begingroup + \expandafter\ifx\csname pdfoutput\endcsname\relax + \else + \escapechar=92 % + \edef\m{\meaning\pdfoutput}% + \edef\p{\string\pdfoutput}% + \ifx\m\p + \else + \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax + \def\PackageWarningNoLine#1#2{% + \immediate\write16{% + Package `#1' Warning: #2.% + }% + }% + \fi + \PackageWarningNoLine{ifpdf}{% + Someone has redefined \string\pdfoutput% + }% + \fi + \fi +\endgroup +\begingroup + \expandafter\ifx\csname PackageInfo\endcsname\relax + \def\x#1#2{% + }% + \else + \let\x\PackageInfo + \expandafter\let\csname on@line\endcsname\empty + \fi + \x{ifpdf}{pdfTeX in PDF mode is \ifpdf\else not \fi detected}% +\endgroup +\ifpdf@AtEnd% +%% +%% End of file `ifpdf.sty'. +\def\makeactive#1{\catcode`#1 = \active \ignorespaces}% +\chardef\letter = 11 +\chardef\other = 12 +\def\makeatletter{% + \edef\resetatcatcode{\catcode`\noexpand\@\the\catcode`\@\relax}% + \catcode`\@11\relax +}% +\def\makeatother{% + \edef\resetatcatcode{\catcode`\noexpand\@\the\catcode`\@\relax}% + \catcode`\@12\relax +}% +\edef\leftdisplays{\the\catcode`@}% +\catcode`@ = \letter +\let\@eplainoldatcode = \leftdisplays +\toksdef\toks@ii = 2 +\def\uncatcodespecials{% + \def\do##1{\catcode`##1 = \other}% + \dospecials +}% +{% + \makeactive\^^M % + \long\gdef\letreturn#1{\let^^M = #1}% +}% +\let\@eattoken = \relax % Define this, so \eattoken can be used in \edef. +\def\eattoken{\let\@eattoken = }% +\def\gobble#1{}% +\def\gobbletwo#1#2{}% +\def\gobblethree#1#2#3{}% +\def\identity#1{#1}% +\def\@emptymarkA{\@emptymarkB} +\def\ifempty#1{\@@ifempty #1\@emptymarkA\@emptymarkB}% +\def\@@ifempty#1#2\@emptymarkB{\ifx #1\@emptymarkA}% +\def\@gobbleminus#1{\ifx-#1\else#1\fi}% +\def\ifinteger#1{\ifcat_\ifnum9<1\@gobbleminus#1 _\else A\fi}% +\def\isinteger{TT\fi\ifinteger}% +\def\@gobblemeaning#1:->{}% +\def\sanitize{\expandafter\@gobblemeaning\meaning}% +\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}% +\def\csn#1{\csname#1\endcsname}% +\def\ece#1#2{\expandafter#1\csname#2\endcsname}% +\def\expandonce{\expandafter\noexpand}% +\let\@plainwlog = \wlog +\let\wlog = \gobble +\newlinechar = `^^J +\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% +\def\loggingall{\tracingcommands\tw@\tracingstats\tw@ + \tracingpages\@ne\tracingoutput\@ne\tracinglostchars\@ne + \tracingmacros\tw@\tracingparagraphs\@ne\tracingrestores\@ne + \showboxbreadth\maxdimen\showboxdepth\maxdimen +}% +\def\tracingboxes{\showboxbreadth = \maxdimen \showboxdepth = \maxdimen}% +\def\gtracingoff{\begingroup \globaldefs = 1 \tracingoff \endgroup}% +\def\tracingoff{\tracingonline\z@\tracingcommands\z@\tracingstats\z@ + \tracingpages\z@\tracingoutput\z@\tracinglostchars\z@ + \tracingmacros\z@\tracingparagraphs\z@\tracingrestores\z@ + \showboxbreadth5 \showboxdepth3 +}% +\begingroup + \catcode`\{ = 12 \catcode`\} = 12 + \catcode`\[ = 1 \catcode`\] = 2 + \gdef\lbracechar[{]% + \gdef\rbracechar[}]% + \catcode`\% = \other + \gdef\percentchar[%]\endgroup +\def\vpenalty{\ifhmode\par\fi \penalty}% +\def\hpenalty{\ifvmode\leavevmode\fi \penalty}% +\def\iterate{% + \let\loop@next\relax + \body + \let\loop@next\iterate + \fi + \loop@next +}% +\def\edefappend#1#2{% + \toks@ = \expandafter{#1}% + \edef#1{\the\toks@ #2}% +}% +\def\allowhyphens{\nobreak\hskip\z@skip}% +\long\def\hookprepend{\@hookassign{\the\toks@ii \the\toks@}}% +\long\def\hookappend{\@hookassign{\the\toks@ \the\toks@ii}}% +\let\hookaction = \hookappend % either one should be ok +\long\def\@hookassign#1#2#3{% + \expandafter\ifx\csname @#2hook\endcsname \relax + \toks@ = {}% + \else + \expandafter\let\expandafter\temp \csname @#2hook\endcsname + \toks@ = \expandafter{\temp}% + \fi + \toks2 = {#3}% Don't expand the argument all the way. + \ece\edef{@#2hook}{#1}% +}% +\long\def\hookactiononce#1#2{% + \edefappend#2{\global\let\noexpand#2\relax} + \hookaction{#1}#2% +}% +\def\hookrun#1{% + \expandafter\ifx\csname @#1hook\endcsname \relax \else + \def\temp{\csname @#1hook\endcsname}% + \expandafter\temp + \fi +}% +\def\setproperty#1#2#3{\ece\edef{#1@p#2}{#3}}% +\def\setpropertyglobal#1#2#3{\ece\xdef{#1@p#2}{#3}}% +\def\getproperty#1#2{% + \expandafter\ifx\csname#1@p#2\endcsname\relax + \else \csname#1@p#2\endcsname + \fi +}% +\ifx\@undefinedmessage\@undefined + \def\@undefinedmessage + {No .aux file; I won't warn you about undefined labels.}% +\fi +%% @texfile{ +%% author = "Karl Berry and Oren Patashnik", +%% version = "0.99n", +%% date = "30 September 2013", +%% filename = "btxmac.tex", +%% address = "tex-eplain@tug.org", +%% supported = "yes", +%% docstring = "Defines macros that make BibTeX work with plain TeX", +%% } +\edef\cite{\the\catcode`@}% +\catcode`@ = 11 +\let\@oldatcatcode = \cite +\chardef\@letter = 11 +\chardef\@other = 12 +\def\@innerdef#1#2{\edef#1{\expandafter\noexpand\csname #2\endcsname}}% +\@innerdef\@innernewcount{newcount}% +\@innerdef\@innernewdimen{newdimen}% +\@innerdef\@innernewif{newif}% +\@innerdef\@innernewwrite{newwrite}% +\def\@gobble#1{}% +\ifx\inputlineno\@undefined + \let\@linenumber = \empty % Pre-3.0. +\else + \def\@linenumber{\the\inputlineno:\space}% +\fi +\long\def\@futurenonspacelet#1{\def\cs{#1}% + \afterassignment\@stepone\let\@nexttoken= +}% +\begingroup % The grouping here avoids stepping on an outside use of `\\'. +\def\\{\global\let\@stoken= }% +\\ % now \@stoken is a space token (\\ is a control symbol, so that +\endgroup +\def\@stepone{\expandafter\futurelet\cs\@steptwo}% +\def\@steptwo{\expandafter\ifx\cs\@stoken\let\@@next=\@stepthree + \else\let\@@next=\@nexttoken\fi \@@next}% +\def\@stepthree{\afterassignment\@stepone\let\@@next= }% +\def\@getoptionalarg#1{% + \let\@optionalusercs = #1% + \let\@optionalnext = \relax + \@futurenonspacelet\@optionalnext\@bracketcheck +}% +\def\@bracketcheck{% + \ifx [\@optionalnext + \expandafter\@@getoptionalarg % we have an optional arg + \else + \let\@optionalarg = \empty % no optional arg + \expandafter\@optionalusercs + \fi +}% +\def\@@getoptionalarg[#1]{% + \def\@optionalarg{#1}% + \let\@optdummy=\relax % just in case it has become \outer somehow + \@futurenonspacelet\@optdummy\@optionalusercs +}% +\def\@nnil{\@nil}% +\def\@fornoop#1\@@#2#3{}% +\def\@for#1:=#2\do#3{% + \edef\@fortmp{#2}% + \ifx\@fortmp\empty \else + \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}% + \fi +}% +\def\@forloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\@nnil \else + #5\def#4{#2}\ifx #4\@nnil \else#5\@iforloop #3\@@#4{#5}\fi\fi +}% +\def\@iforloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\@nnil + \let\@nextwhile=\@fornoop \else + #4\relax\let\@nextwhile=\@iforloop\fi\@nextwhile#2\@@#3{#4}% +}% +\@innernewif\if@fileexists +\def\@testfileexistence{\@getoptionalarg\@finishtestfileexistence}% +\def\@finishtestfileexistence#1{% + \begingroup + \def\extension{#1}% + \immediate\openin0 = + \ifx\@optionalarg\empty\jobname\else\@optionalarg\fi + \ifx\extension\empty \else .#1\fi + \space + \ifeof 0 + \global\@fileexistsfalse + \else + \global\@fileexiststrue + \fi + \immediate\closein0 + \endgroup +}% +\toks0 = {% +\def\bibliographystyle#1{% + \@readauxfile + \@writeaux{\string\bibstyle{#1}}% +}% +\let\bibstyle = \@gobble +\let\bblfilebasename = \jobname +\def\bibliography#1{% + \@readauxfile + \@writeaux{\string\bibdata{#1}}% + \@testfileexistence[\bblfilebasename]{bbl}% + \if@fileexists + \nobreak + \@readbblfile + \fi +}% +\let\bibdata = \@gobble +\def\nocite#1{% + \@readauxfile + \@writeaux{\string\citation{#1}}% +}% +\@innernewif\if@notfirstcitation +\def\cite{\@getoptionalarg\@cite}% +\def\@cite#1{% + \let\@citenotetext = \@optionalarg + \printcitestart + \nocite{#1}% + \@notfirstcitationfalse + \@for \@citation :=#1\do + {% + \expandafter\@onecitation\@citation\@@ + }% + \ifx\empty\@citenotetext\else + \printcitenote{\@citenotetext}% + \fi + \printcitefinish +}% +\def\@onecitation#1\@@{% + \if@notfirstcitation + \printbetweencitations + \fi + \expandafter \ifx \csname\@citelabel{#1}\endcsname \relax + \if@citewarning + \message{\@linenumber Undefined citation `#1'.}% + \fi + \expandafter\gdef\csname\@citelabel{#1}\endcsname{% + {\tt + \escapechar = -1 + \nobreak\hskip0pt + \expandafter\string\csname#1\endcsname + \nobreak\hskip0pt + }% + }% + \fi + \printcitepreitem{#1}% + \csname\@citelabel{#1}\endcsname + \printcitepostitem + \@notfirstcitationtrue +}% +\def\@citelabel#1{b@#1}% +\def\@citedef#1#2{{\expandafter\gdef\csname\@citelabel{#1}\endcsname{#2}}}% +\def\@readbblfile{% + \ifx\@itemnum\@undefined + \@innernewcount\@itemnum + \fi + \begingroup + \ifx\begin\@undefined + \def\begin##1##2{% + \setbox0 = \hbox{\biblabelcontents{##2}}% + \biblabelwidth = \wd0 + }% + \let\end = \@gobble % The arg is `thebibliography' again. + \fi + \@itemnum = 0 + \def\bibitem{\@getoptionalarg\@bibitem}% + \def\@bibitem{% + \ifx\@optionalarg\empty + \expandafter\@numberedbibitem + \else + \expandafter\@alphabibitem + \fi + }% + \def\@alphabibitem##1{% + \expandafter \xdef\csname\@citelabel{##1}\endcsname {\@optionalarg}% + \ifx\biblabelprecontents\@undefined + \let\biblabelprecontents = \relax + \fi + \ifx\biblabelpostcontents\@undefined + \let\biblabelpostcontents = \hss + \fi + \@finishbibitem{##1}% + }% + \def\@numberedbibitem##1{% + \advance\@itemnum by 1 + \expandafter \xdef\csname\@citelabel{##1}\endcsname{\number\@itemnum}% + \ifx\biblabelprecontents\@undefined + \let\biblabelprecontents = \hss + \fi + \ifx\biblabelpostcontents\@undefined + \let\biblabelpostcontents = \relax + \fi + \@finishbibitem{##1}% + }% + \def\@finishbibitem##1{% + \bblitemhook{##1}% + \biblabelprint{\csname\@citelabel{##1}\endcsname}% + \@writeaux{\string\@citedef{##1}{\csname\@citelabel{##1}\endcsname}}% + \ignorespaces + }% + \ifx\undefined\em \let\em=\bblem \fi + \ifx\undefined\emph \let\emph=\bblemph \fi + \ifx\undefined\mbox \let\mbox=\bblmbox \fi + \ifx\undefined\newblock \let\newblock=\bblnewblock \fi + \ifx\undefined\sc \let\sc=\bblsc \fi + \ifx\undefined\textbf \let\textbf=\bbltextbf \fi + \frenchspacing + \clubpenalty = 4000 \widowpenalty = 4000 + \tolerance = 10000 \hfuzz = .5pt + \everypar = {\hangindent = \biblabelwidth + \advance\hangindent by \biblabelextraspace}% + \bblrm + \parskip = 1.5ex plus .5ex minus .5ex + \biblabelextraspace = .5em + \bblhook + \input \bblfilebasename.bbl + \endgroup +}% +\@innernewdimen\biblabelwidth +\@innernewdimen\biblabelextraspace +\def\biblabelprint#1{% + \noindent + \hbox to \biblabelwidth{% + \biblabelprecontents + \biblabelcontents{#1}% + \biblabelpostcontents + }% + \kern\biblabelextraspace +}% +\def\biblabelcontents#1{{\bblrm [#1]}}% +\def\bblrm{\rm}% +\def\bblem{\it}% +\def\bblemph#1{{\bblem #1\/}} +\def\bbltextbf#1{{\bf #1}} +\def\bblmbox{\leavevmode\hbox} +\def\bblsc{\ifx\@scfont\@undefined + \font\@scfont = cmcsc10 + \fi + \@scfont +}% +\def\bblnewblock{\hskip .11em plus .33em minus .07em }% +\let\bblhook = \empty +\let\bblitemhook = \@gobble +\def\printcitestart{[}% left bracket +\def\printcitefinish{]}% right bracket +\def\printbetweencitations{, }% comma, space +\let\printcitepreitem\@gobble % takes label +\let\printcitepostitem\empty +\def\printcitenote#1{, #1}% comma, space, note (if it exists) +\let\citation = \@gobble +\@innernewcount\@numparams +\ifx\newcommand\undefined +\long\def\newcommand#1{% + \def\@commandname{#1}% + \@getoptionalarg\@continuenewcommand +}% +\fi +\ifx\renewcommand\undefined + \let\renewcommand = \newcommand +\fi +\ifx\providecommand\undefined +\long\def\providecommand#1{% + \def\@commandname{#1}% + \expandafter\ifx\@commandname \@undefined + \let\cs=\@continuenewcommand % undefined, so we'll define it + \else + \let\cs=\@gobble % already defined, so ignore it + \fi + \@getoptionalarg\cs +}% +\fi +\def\@continuenewcommand{% + \@numparams = \ifx\@optionalarg\empty 0\else\@optionalarg \fi \relax + \@newcommand +}% +\def\@newcommand#1{% + \def\@startdef{\expandafter\def\@commandname}% + \ifnum\@numparams=0 + \let\@paramdef = \empty + \else + \ifnum\@numparams>9 + \errmessage{\the\@numparams\space is too many parameters}% + \else + \ifnum\@numparams<0 + \errmessage{\the\@numparams\space is too few parameters}% + \else + \edef\@paramdef{% + \ifcase\@numparams + \empty No arguments. + \or ####1% + \or ####1####2% + \or ####1####2####3% + \or ####1####2####3####4% + \or ####1####2####3####4####5% + \or ####1####2####3####4####5####6% + \or ####1####2####3####4####5####6####7% + \or ####1####2####3####4####5####6####7####8% + \or ####1####2####3####4####5####6####7####8####9% + \fi + }% + \fi + \fi + \fi + \expandafter\@startdef\@paramdef{#1}% +}% +}% +\ifx\nobibtex\@undefined \the\toks0 \fi +\def\@readauxfile{% + \if@auxfiledone \else % remember: \@auxfiledonetrue if \noauxfile is defined + \global\@auxfiledonetrue + \@testfileexistence{aux}% + \if@fileexists + \begingroup + \endlinechar = -1 + \catcode`@ = 11 + \input \jobname.aux + \endgroup + \else + \message{\@undefinedmessage}% + \global\@citewarningfalse + \fi + \immediate\openout\@auxfile = \jobname.aux + \fi +}% +\newif\if@auxfiledone +\ifx\noauxfile\@undefined \else \@auxfiledonetrue\fi +\@innernewwrite\@auxfile +\def\@writeaux#1{\ifx\noauxfile\@undefined \write\@auxfile{#1}\fi}% +\ifx\@undefinedmessage\@undefined + \def\@undefinedmessage{No .aux file; I won't give you warnings about + undefined citations.}% +\fi +\@innernewif\if@citewarning +\ifx\noauxfile\@undefined \@citewarningtrue\fi +\catcode`@ = \@oldatcatcode +\let\auxfile = \@auxfile +\let\for = \@for +\let\futurenonspacelet = \@futurenonspacelet +\def\iffileexists{\if@fileexists}% +\let\innerdef = \@innerdef +\let\innernewcount = \@innernewcount +\let\innernewdimen = \@innernewdimen +\let\innernewif = \@innernewif +\let\innernewwrite = \@innernewwrite +\let\linenumber = \@linenumber +\let\readauxfile = \@readauxfile +\let\spacesub = \@spacesub +\let\testfileexistence = \@testfileexistence +\let\writeaux = \@writeaux +\def\innerinnerdef#1{\expandafter\innerdef\csname inner#1\endcsname{#1}}% +\innerinnerdef{newbox}% +\innerinnerdef{newfam}% +\innerinnerdef{newhelp}% +\innerinnerdef{newinsert}% +\innerinnerdef{newlanguage}% +\innerinnerdef{newmuskip}% +\innerinnerdef{newread}% +\innerinnerdef{newskip}% +\innerinnerdef{newtoks}% +\def\immediatewriteaux#1{% + \ifx\noauxfile\@undefined + \immediate\write\@auxfile{#1}% + \fi +}% +\def\bblitemhook#1{\gdef\@hlbblitemlabel{#1}}% +\def\biblabelprint#1{% + \noindent + \hbox to \biblabelwidth{% + \hldest@impl{bib}{\@hlbblitemlabel}% + \biblabelprecontents + \biblabelcontents{#1}% + \biblabelpostcontents + }% + \kern\biblabelextraspace +}% +\def\eplainprintcitepreitem#1{\hlstart@impl{cite}{#1}}% +\def\eplainprintcitepostitem{\hlend@impl{cite}}% +\def\printcitepreitem#1{% + \testfileexistence[\bblfilebasename]{bbl}% + \iffileexists + \global\let\printcitepreitem\eplainprintcitepreitem + \global\let\printcitepostitem\eplainprintcitepostitem + \else + \global\let\printcitepreitem\gobble + \global\let\printcitepostitem\relax + \fi + \printcitepreitem{#1}% +}% +\def\@Nnil{\@Nil}% +\def\@Fornoop#1\@@#2#3{}% +\def\For#1:=#2\do#3{% + \edef\@Fortmp{#2}% + \ifx\@Fortmp\empty \else + \expandafter\@Forloop#2,\@Nil,\@Nil\@@#1{#3}% + \fi +}% +\def\@Forloop#1,#2,#3\@@#4#5{\@Fordef#1\@@#4\ifx #4\@Nnil \else + #5\@Fordef#2\@@#4\ifx #4\@Nnil \else#5\@iForloop #3\@@#4{#5}\fi\fi +}% +\def\@iForloop#1,#2\@@#3#4{\@Fordef#1\@@#3\ifx #3\@Nnil + \let\@Nextwhile=\@Fornoop \else + #4\relax\let\@Nextwhile=\@iForloop\fi\@Nextwhile#2\@@#3{#4}% +}% +\def\@Forspc{ }% +\def\@Fordef{\futurelet\@Fortmp\@@Fordef}% Peep at the next token. +\def\@@Fordef{% + \expandafter\ifx\@Forspc\@Fortmp % Next token is a space. + \expandafter\@Fortrim + \else + \expandafter\@@@Fordef + \fi +}% +\expandafter\def\expandafter\@Fortrim\@Forspc#1\@@{\@Fordef#1\@@}% +\def\@@@Fordef#1\@@#2{\def#2{#1}}% +\def\tmpfileextension{.tmp}% +\let\tmpfilebasename = \jobname +\ifx\eTeXversion\undefined + \innernewwrite\eplain@tmpfile + \def\scantokens#1{% + \toks@={#1}% + \immediate\openout\eplain@tmpfile=\tmpfilebasename\tmpfileextension + \immediate\write\eplain@tmpfile{\the\toks@}% + \immediate\closeout\eplain@tmpfile + \input \tmpfilebasename\tmpfileextension\relax + }% +\fi +\begingroup + \makeactive\^^M \makeactive\ % No spaces or ^^M's from here on. +\gdef\obeywhitespace{% +\makeactive\^^M\def^^M{\par\futurelet\next\@finishobeyedreturn}% +\makeactive\ \let =\ % +\aftergroup\@removebox% +\futurelet\next\@finishobeywhitespace% +}% +\gdef\@finishobeywhitespace{{% +\ifx\next % +\aftergroup\@obeywhitespaceloop% +\else\ifx\next^^M% +\aftergroup\gobble% +\fi\fi}}% +\gdef\@finishobeyedreturn{% +\ifx\next^^M\vskip\blanklineskipamount\fi% +\indent% +}% +\endgroup +\def\@obeywhitespaceloop#1{\futurelet\next\@finishobeywhitespace}% +\def\@removebox{% + \ifhmode + \setbox0 = \lastbox + \ifdim\wd0=\parindent + \setbox2 = \hbox{\unhcopy0}% Preserve \box0 so we can put it back. + \ifdim\wd2=0pt + \ignorespaces + \else + \box0 % Put it back: it wasn't empty. + \fi + \else + \box0 % Put it back: it wasn't the right width. + \fi + \fi +}% +\newskip\blanklineskipamount +\blanklineskipamount = 0pt +\def\frac#1/#2{\leavevmode + \kern.1em \raise .5ex \hbox{\the\scriptfont0 #1}% + \kern-.1em $/$% + \kern-.15em \lower .25ex \hbox{\the\scriptfont0 #2}% +}% +\newdimen\hruledefaultheight \hruledefaultheight = 0.4pt +\newdimen\hruledefaultdepth \hruledefaultdepth = 0.0pt +\newdimen\vruledefaultwidth \vruledefaultwidth = 0.4pt +\def\ehrule{\hrule height\hruledefaultheight depth\hruledefaultdepth}% +\def\evrule{\vrule width\vruledefaultwidth}% +%%% ==================================================================== +%%% @TeX-style-file{ +%%% author = "Nelson H. F. Beebe", +%%% version = "1.10", +%%% date = "02 March 1998", +%%% time = "08:36:13 MST", +%%% filename = "texnames.sty", +%%% address = "Center for Scientific Computing +%%% Department of Mathematics +%%% South Physics Building +%%% University of Utah +%%% Salt Lake City, UT 84112 +%%% USA +%%% Tel: (801) 581-5254 +%%% FAX: (801) 581-4148", +%%% checksum = "27723 296 1385 12423", +%%% email = "beebe@magna.math.utah.edu (Internet)", +%%% codetable = "ISO/ASCII", +%%% keywords = "TeX names", +%%% supported = "yes", +%%% docstring = "This style file for AmSTeX, LaTeX, and TeX +%%% defines macros for the names of TeX +%%% and METAFONT programs, in several +%%% letter-case variants: +%%% +%%% \AMSTEX, \AMSTeX, \AmSTeX +%%% \BIBTEX, \BIBTeX, \BibTeX +%%% \LAMSTeX, \LAmSTeX +%%% \LaTeX, \LATEX +%%% \METAFONT, \MF +%%% \SLITEX, \SLITeX, \SLiTeX, \SliTeX +%%% +%%% It will NOT redefine any macro that +%%% already exists, so it can be included +%%% harmlessly after other style files. +%%% +%%% In AmSTeX or Plain TeX, just do +%%% +%%% \input texnames.sty +%%% +%%% In LaTeX, do +%%% +%%% \documentstyle[...,texnames]{...} +%%% +%%% This file grew out of original work by +%%% +%%% Richard Furuta +%%% Department of Computer Science +%%% University of Maryland +%%% College Park, MD 20742 +%%% +%%% furuta@mimsy.umd.edu +%%% seismo!umcp-cs!furuta +%%% +%%% 22 October 1986, first release (1.00) +%%% +%%% 1 April 1987 (1.01): Modified by William +%%% LeFebvre, Rice University to include +%%% definitions for BibTeX and SLiTeX, as they +%%% appear in the LaTeX Local User's Guide +%%% template (the file latex/local.tex in +%%% standard distributions) +%%% +%%% 26 October 1991 (1.02): Modified by +%%% Nelson H. F. Beebe <beebe@math.utah.edu> to +%%% add several new macro names, and adapt for +%%% use with Plain TeX and AmSTeX. +%%% +%%% 26 October 1991 (1.03): Add \LaTeX and +%%% \LATEX +%%% +%%% 25 November 1991 (1.04): Add \LamSTeX +%%% and \LAMSTeX +%%% +%%% 27 January 1991 (1.05 and 1.06): Add slanted +%%% font support for \MF. Make several comment +%%% changes. Add a couple of missing % at end +%%% of line, and replace blank lines by empty +%%% comments. +%%% +%%% 30 December 1992 (1.07): Use \TeX in +%%% definitions of \BibTeX and \LaTeX. Remove +%%% occurrences of \rm. Change \sc to use +%%% \scriptfont instead of hardwiring cmcsc10. +%%% Use \cal for \LAMSTeX. +%%% +%%% 1 March 1993 (1.08): Consolidate \ifx's onto +%%% single lines for brevity. Add +%%% \spacefactor1000 to definitions for \TeX and \MF. +%%% +%%% 16 March 1993 (1.09): Add \AmS, \AMS, \AmSLaTeX, +%%% and \AMSLaTeX. +%%% +%%% 02 March 1998 (1.10): Add \LaTeXe. +%%% +%%% The checksum field above contains a CRC-16 +%%% checksum as the first value, followed by the +%%% equivalent of the standard UNIX wc (word +%%% count) utility output of lines, words, and +%%% characters. This is produced by Robert +%%% Solovay's checksum utility.", +%%% +%%% } +%%% ==================================================================== +\ifx\sc\undefined + \def\sc{% + \expandafter\ifx\the\scriptfont\fam\nullfont + \font\temp = cmr7 \temp + \else + \the\scriptfont\fam + \fi + \def\uppercasesc{\char\uccode`}% + }% +\fi +\ifx\uppercasesc\undefined + \let\uppercasesc = \relax +\fi +\def\TeX{T\kern-.1667em\lower.5ex\hbox{E}\kern-.125emX\spacefactor1000 }% +\ifx\AmS\undefined + \def\AmS{{\the\textfont2 A}\kern-.1667em\lower.5ex\hbox + {\the\textfont2 M}\kern-.125em{\the\textfont2 S}} +\fi +\ifx\AMS\undefined \let\AMS=\AmS \fi +\ifx\AmSLaTeX\undefined + \def\AmSLaTeX{\AmS-\LaTeX} +\fi +\ifx\AMSLaTeX\undefined \let\AMSLaTeX=\AmSLaTeX \fi +\ifx\AmSTeX\undefined + \def\AmSTeX{$\cal A$\kern-.1667em\lower.5ex\hbox{$\cal M$}% + \kern-.125em$\cal S$-\TeX}% +\fi +\ifx\AMSTEX\undefined \let\AMSTEX=\AmSTeX \fi +\ifx\AMSTeX\undefined \let\AMSTeX=\AmSTeX \fi +\ifx\BibTeX\undefined + \def\BibTeX{B{\sc \uppercasesc i\kern-.025em \uppercasesc b}\kern-.08em + \TeX}% +\fi +\ifx\BIBTeX\undefined \let\BIBTeX=\BibTeX \fi +\ifx\BIBTEX\undefined \let\BIBTEX=\BibTeX \fi +\ifx\LAMSTeX\undefined + \def\LAMSTeX{L\raise.42ex\hbox{\kern-.3em\the\scriptfont2 A}% + \kern-.2em\lower.376ex\hbox{\the\textfont2 M}% + \kern-.125em {\the\textfont2 S}-\TeX}% +\fi +\ifx\LamSTeX\undefined \let\LamSTeX=\LAMSTeX \fi +\ifx\LAmSTeX\undefined \let\LAmSTeX=\LAMSTeX \fi +\ifx\LaTeX\undefined + \def\LaTeX{L\kern-.36em\raise.3ex\hbox{\sc \uppercasesc a}\kern-.15em\TeX}% +\fi +\ifx\LATEX\undefined \let\LATEX=\LaTeX \fi +\ifx\LaTeXe\undefined + \def\LaTeXe{\LaTeX{}\kern.05em2$_{\textstyle\varepsilon}$} +\fi +\ifx\MF\undefined + \ifx\manfnt\undefined + \font\manfnt=logo10 + \fi + \ifx\manfntsl\undefined + \font\manfntsl=logosl10 + \fi + \def\MF{{\ifdim\fontdimen1\font>0pt \let\manfnt = \manfntsl \fi + {\manfnt META}\-{\manfnt FONT}}\spacefactor1000 }% +\fi +\ifx\METAFONT\undefined \let\METAFONT=\MF \fi +\ifx\SLITEX\undefined + \def\SLITEX{S\kern-.065em L\kern-.18em\raise.32ex\hbox{i}\kern-.03em\TeX}% +\fi +\ifx\SLiTeX\undefined \let\SLiTeX=\SLITEX \fi +\ifx\SliTeX\undefined \let\SliTeX=\SLITEX \fi +\ifx\SLITeX\undefined \let\SLITeX=\SLITEX \fi +%%% @TeX-style-file +%%% { +%%% author = "Philip Taylor", +%%% version = "3.05", +%%% date = "7 April 2011", +%%% time = "15:59:31 BST", +%%% filename = "path.sty", +%%% license = "Unlimited copying and redistribution of this +%%% file are permitted as long as this file is +%%% not modified. Modifications are permitted, +%%% but only if the resulting file is not named +%%% path.sty regardless of case", +%%% address = "c/o The Hellenic Institute +%%% Royal Holloway, University of London +%%% Egham Hull, Egham +%%% Surrey TW20 0EX +%%% United Kingdom", +%%% telephone = "Tel: +44 1622 820 735", +%%% email = "P.Taylor@Rhul.Ac.Uk", +%%% codetable = "ISO/ASCII", +%%% keywords = "file name, filename, path name, pathname, +%%% discretionary, discretionaries", +%%% supported = "yes", +%%% docstring = {Computer filenames, host names, and e-mail +%%% addresses tend to be long strings that +%%% cause line breaking problems for TeX. +%%% Sometimes rather long strings are +%%% encountered, such as: +%%% +%%% mighty-mouse-gw.scrc.symbolics.com +%%% +%%% This file defines a macro, \path|...|, +%%% similar to LaTeX's \verb|...| macro, that +%%% sets the text in the typewriter font, +%%% allowing hyphen-less line breaks at +%%% punctuation characters. +%%% +%%% The default set of punctuation characters is +%%% defined as +%%% +%%% \discretionaries |~!@$%^&*()_+`-=#{"}[]:;'<>,.?\/| +%%% +%%% However, you can change it as needed, for +%%% example +%%% +%%% \discretionaries +@%!.+ +%%% +%%% would assign to it the set @ % ! . which +%%% commonly occur in electronic mail addresses. +%%% +%%% The delimiter characters surrounding the +%%% arguments to \discretionaries and \path +%%% will normally be a punctuation character not +%%% found in the argument, and not otherwise +%%% significant to TeX. In particular, backslash +%%% cannot be used as a delimiter. In the rare +%%% event that this is required, set +%%% +%%% \specialpathdelimiterstrue +%%% +%%% This practice is not recommended, because TeX +%%% then runs about four times slower while it is +%%% typesetting \path\...\ requests. +%%% \specialpathdelimitersfalse is the normal +%%% setting. +%%% +%%% This file may be used in Plain TeX or AmSTeX +%%% by +%%% +%%% \input path.sty +%%% +%%% and in LaTeX by +%%% +%%% \usepackage {path} +%%% +%%% The checksum field above, if present, contains +%%% a CRC-16 checksum as the first value, followed +%%% by the equivalent of the standard UNIX wc (word +%%% count) utility output of lines, words, and +%%% characters. This is produced by Robert +%%% Solovay's checksum utility. +%%% } +%%% } +%%% ==================================================================== +%%% The use of `\path' as a temporary control sequence is a kludge, but +%%% it's a reasonably simple way to accomplish making @ a letter (to +%%% provide ``concealed'' control sequences) without overwriting something +%%% (without an `@' in its name) that might already be defined. +\edef \path {\the \catcode `\@}% +\catcode `\@ = 11 +\let \oldc@tcode = \path +%%% Make commercial-at a letter to provide concealed control sequences +\catcode `\@ = 11 +%%% and then declare two \count variables with concealed names +\newcount \c@tcode +\newcount \c@unter +%%% and a boolean variable with an open name, to specify the nature of +%%% the delimiters which will be associated with the \path command +\newif \ifspecialpathdelimiters +%%% If desired, you can define \pathafterhook to take +\let \pathafterhook = \relax +%%% We need to define control sequences which expand to both +%%% active and passive spaces ... +\begingroup +\catcode `\ = 10 +\gdef \passivesp@ce { } +\catcode `\ = 13\relax% +\gdef\activesp@ce{ }% +\endgroup +%%% \discretionaries will define a macro \discr@ti@n@ri@s which will +%%% make every character between the first and final <delim> a +%%% discretionary breakpoint. +\def \discretionaries %%% <delim> <chars> <delim> + {\begingroup + \c@tcodes = 13 + \discr@tionaries + } +%%% \discr@tionaries will receive as parameter the initial <delim> +%%% which will delimit the set of discretionaries; this <delim> +%%% will be active. +\def \discr@tionaries #1%%% <delim> + {\def \discr@ti@naries ##1#1%%% <chars> <delim> + {\endgroup + \def \discr@ti@n@ries ####1%%% <char> or <delim> + {\if \noexpand ####1\noexpand #1% + \let \n@xt = \relax + \else + \catcode `####1 = 13 + \def ####1{\discretionary + {\char `####1}{}{\char `####1}}% + \let \n@xt = \discr@ti@n@ries + \fi + \n@xt + }% + \def \discr@ti@n@ri@s {\discr@ti@n@ries ##1#1}% + }% + \discr@ti@naries + } +%%% \path, which is the user interface to \p@th, first checks +%%% to see whether \specialpathdelimiters is <true> or <false>; +%%% if <true>, it needs to take special action to ensure that +%%% \stress {all} characters (apart from <space>) are acceptable +%%% as delimiters; this is very time-consuming, and should be +%%% avoided if at all possible. It also defines \endp@th, to +%%% close the appropriate number of groups, and finally transfers +%%% control to \p@th +\def \path + {\ifspecialpathdelimiters + \begingroup + \c@tcodes = 12 + \def \endp@th {\endgroup \endgroup \pathafterhook}% + \else + \def \endp@th {\endgroup \pathafterhook}% + \fi + \p@th + } +%%% \p@th, which has essentially the same syntax as \discretionaries, +%%% expects to be followed by a <delim>, a <path>, and a second instance +%%% of <delim>; it will typeset <path> in the \tt font with hyphenation +%%% inhibited --- breaks (but not true hyphenation) are allowed at any +%%% or all of the special characters which have +%%% previously been declared as \discretionaries. +\def \p@th #1%%% <delim> + {\begingroup + \tt + \c@tcode = \catcode `#1 + \discr@ti@n@ri@s + \catcode `\ = \active + \expandafter \edef \activesp@ce {\passivesp@ce \hbox {}}% + \catcode `#1 = \c@tcode + \def \p@@th ##1#1% <chars> <delim> + {\leavevmode \hbox {}##1% + \endp@th + }% + \p@@th + } +%%% \c@tcodes expects to be followed by the r-h-s of a numeric +%%% assignment optionally including the assignment operator; it saves +%%% the value of the r-h-s in \c@tcode, and invokes \c@tc@des. +\def \c@tcodes {\afterassignment \c@tc@des \c@tcode} +%%% \c@tc@des uses the value saved in \c@tcode, and assigns it to the +%%% \catcode of all characters with the single exception of <space>, +%%% which retains its normal catcode of 10; on exit, every single +%%% character apart from <space> will have the catcode which followed +%%% \c@tcodes. The code is optimised to avoid unnecessary usage of +%%% save-stack space. +\def \c@tc@des + {\c@unter = 0 + \loop + \ifnum \catcode \c@unter = \c@tcode + \else + \catcode \c@unter = \c@tcode + \fi + \ifnum \c@unter < 255 + \advance \c@unter by 1 + \repeat + \catcode `\ = 10 + } +%%% We restore the original catcode of commercial-at +\catcode `\@ = \oldc@tcode +%%% Define a default set of discretionary break characters +%%% to include all punctuation characters except vertical +%%% bar +\discretionaries |~!@$%^&*()_+`-=#{}[]:";'<>,.?\/| +\ifx\eTeX\undefined + \def\eTeX{\hbox{\mathsurround=0pt $\varepsilon$-\kern-.125em\TeX}}% +\fi +\ifx\ExTeX\undefined + \def\ExTeX{\hbox{\mathsurround=0pt + $\textstyle\varepsilon_{\kern-0.15em\cal{X}}$\kern-.2em\TeX}}% +\fi +\def\eplain@Xe@reflect#1{% + \ifx\reflectbox\undefined + \errmessage{A graphics package must be loaded for \string\XeTeX}% + \else + \ifdim \fontdimen1\font>0pt + \raise 1.75ex \hbox{\kern.1em\rotatebox{180}{#1}}\kern-.1em + \else + \reflectbox{#1}% + \fi + \fi +}% +\def\eplain@Xe#1{\leavevmode + \smash{\hbox{X% + \setbox0=\hbox{\TeX}\setbox2=\hbox{E}% + \lower\dp0\hbox{\raise\dp2\hbox{\kern-.125em\eplain@Xe@reflect{E}}}% + \kern-.1667em #1}}}% +\ifx\XeTeX\undefined + \def\XeTeX{\eplain@Xe\TeX}% +\fi +\ifx\XeLaTeX\undefined + \def\XeLaTeX{\eplain@Xe{\thinspace\LaTeX}}% +\fi +\def\blackbox{\vrule height .8ex width .6ex depth -.2ex \relax}% square bullet +\def\makeblankbox#1#2{% + \ifvoid0 + \errhelp = \@makeblankboxhelp + \errmessage{Box 0 is void}% + \fi + \hbox{\lower\dp0 + \vbox{\hidehrule{#1}{#2}% + \kern -#1% overlap rules + \hbox to \wd0{\hidevrule{#1}{#2}% + \raise\ht0\vbox to #1{}% vrule height + \lower\dp0\vtop to #1{}% vrule depth + \hfil\hidevrule{#2}{#1}% + }% + \kern-#1\hidehrule{#2}{#1}% + }% + }% +}% +\newhelp\@makeblankboxhelp{Assigning to the dimensions of a void^^J% + box has no effect. Do `\string\setbox0=\string\null' before you^^J% + define its dimensions.}% +\def\hidehrule#1#2{\kern-#1\hrule height#1 depth#2 \kern-#2}% +\def\hidevrule#1#2{% + \kern-#1% + \dimen@=#1\advance\dimen@ by #2% + \vrule width\dimen@ + \kern-#2% +}% +\newdimen\boxitspace \boxitspace = 3pt +\long\def\boxit#1{% + \vbox{% + \ehrule + \hbox{% + \evrule + \kern\boxitspace + \vbox{\kern\boxitspace \parindent = 0pt #1\kern\boxitspace}% + \kern\boxitspace + \evrule + }% + \ehrule + }% +}% +\def\numbername#1{\ifcase#1% + zero% + \or one% + \or two% + \or three% + \or four% + \or five% + \or six% + \or seven% + \or eight% + \or nine% + \or ten% + \or #1% + \fi +}% +\let\@plainnewif = \newif +\let\@plainnewdimen = \newdimen +\let\newif = \innernewif +\let\newdimen = \innernewdimen +\edef\@eplainoldandcode{\the\catcode`& }% +\catcode`& = 11 +\toks0 = {% +\edef\thinlines{\the\catcode`@ }% +\catcode`@ = 11 +\let\@oldatcatcode = \thinlines +\def\smash@@{\relax % \relax, in case this comes first in \halign + \ifmmode\def\next{\mathpalette\mathsm@sh}\else\let\next\makesm@sh + \fi\next} +\def\makesm@sh#1{\setbox\z@\hbox{#1}\finsm@sh} +\def\mathsm@sh#1#2{\setbox\z@\hbox{$\m@th#1{#2}$}\finsm@sh} +\def\finsm@sh{\ht\z@\z@ \dp\z@\z@ \box\z@} +\edef\@oldandcatcode{\the\catcode`& }% +\catcode`& = 11 +\def\&whilenoop#1{}% +\def\&whiledim#1\do #2{\ifdim #1\relax#2\&iwhiledim{#1\relax#2}\fi}% +\def\&iwhiledim#1{\ifdim #1\let\&nextwhile=\&iwhiledim + \else\let\&nextwhile=\&whilenoop\fi\&nextwhile{#1}}% +\newif\if&negarg +\newdimen\&wholewidth +\newdimen\&halfwidth +\font\tenln=line10 +\def\thinlines{\let\&linefnt\tenln \let\&circlefnt\tencirc + \&wholewidth\fontdimen8\tenln \&halfwidth .5\&wholewidth}% +\def\thicklines{\let\&linefnt\tenlnw \let\&circlefnt\tencircw + \&wholewidth\fontdimen8\tenlnw \&halfwidth .5\&wholewidth}% +\def\drawline(#1,#2)#3{\&xarg #1\relax \&yarg #2\relax \&linelen=#3\relax + \ifnum\&xarg =0 \&vline \else \ifnum\&yarg =0 \&hline \else \&sline\fi\fi}% +\def\&sline{\leavevmode + \ifnum\&xarg< 0 \&negargtrue \&xarg -\&xarg \&yyarg -\&yarg + \else \&negargfalse \&yyarg \&yarg \fi + \ifnum \&yyarg >0 \&tempcnta\&yyarg \else \&tempcnta -\&yyarg \fi + \ifnum\&tempcnta>6 \&badlinearg \&yyarg0 \fi + \ifnum\&xarg>6 \&badlinearg \&xarg1 \fi + \setbox\&linechar\hbox{\&linefnt\&getlinechar(\&xarg,\&yyarg)}% + \ifnum \&yyarg >0 \let\&upordown\raise \&clnht\z@ + \else\let\&upordown\lower \&clnht \ht\&linechar\fi + \&clnwd=\wd\&linechar + \&whiledim \&clnwd <\&linelen \do {% + \&upordown\&clnht\copy\&linechar + \advance\&clnht \ht\&linechar + \advance\&clnwd \wd\&linechar + }% + \advance\&clnht -\ht\&linechar + \advance\&clnwd -\wd\&linechar + \&tempdima\&linelen\advance\&tempdima -\&clnwd + \&tempdimb\&tempdima\advance\&tempdimb -\wd\&linechar + \hskip\&tempdimb \multiply\&tempdima \@m + \&tempcnta \&tempdima \&tempdima \wd\&linechar \divide\&tempcnta \&tempdima + \&tempdima \ht\&linechar \multiply\&tempdima \&tempcnta + \divide\&tempdima \@m + \advance\&clnht \&tempdima + \ifdim \&linelen <\wd\&linechar \hskip \wd\&linechar + \else\&upordown\&clnht\copy\&linechar\fi}% +\def\&hline{\vrule height \&halfwidth depth \&halfwidth width \&linelen}% +\def\&getlinechar(#1,#2){\&tempcnta#1\relax\multiply\&tempcnta 8 + \advance\&tempcnta -9 \ifnum #2>0 \advance\&tempcnta #2\relax\else + \advance\&tempcnta -#2\relax\advance\&tempcnta 64 \fi + \char\&tempcnta}% +\def\drawvector(#1,#2)#3{\&xarg #1\relax \&yarg #2\relax + \&tempcnta \ifnum\&xarg<0 -\&xarg\else\&xarg\fi + \ifnum\&tempcnta<5\relax \&linelen=#3\relax + \ifnum\&xarg =0 \&vvector \else \ifnum\&yarg =0 \&hvector + \else \&svector\fi\fi\else\&badlinearg\fi}% +\def\&hvector{\ifnum\&xarg<0 \rlap{\&linefnt\&getlarrow(1,0)}\fi \&hline + \ifnum\&xarg>0 \llap{\&linefnt\&getrarrow(1,0)}\fi}% +\def\&vvector{\ifnum \&yarg <0 \&downvector \else \&upvector \fi}% +\def\&svector{\&sline + \&tempcnta\&yarg \ifnum\&tempcnta <0 \&tempcnta=-\&tempcnta\fi + \ifnum\&tempcnta <5 + \if&negarg\ifnum\&yarg>0 % 3d quadrant; dp > 0 + \llap{\lower\ht\&linechar\hbox to\&linelen{\&linefnt + \&getlarrow(\&xarg,\&yyarg)\hss}}\else % 4th quadrant; ht > 0 + \llap{\hbox to\&linelen{\&linefnt\&getlarrow(\&xarg,\&yyarg)\hss}}\fi + \else\ifnum\&yarg>0 % 1st quadrant; ht > 0 + \&tempdima\&linelen \multiply\&tempdima\&yarg + \divide\&tempdima\&xarg \advance\&tempdima-\ht\&linechar + \raise\&tempdima\llap{\&linefnt\&getrarrow(\&xarg,\&yyarg)}\else + \&tempdima\&linelen \multiply\&tempdima-\&yarg % 2d quadrant; dp > 0 + \divide\&tempdima\&xarg + \lower\&tempdima\llap{\&linefnt\&getrarrow(\&xarg,\&yyarg)}\fi\fi + \else\&badlinearg\fi}% +\def\&getlarrow(#1,#2){\ifnum #2 =\z@ \&tempcnta='33\else +\&tempcnta=#1\relax\multiply\&tempcnta \sixt@@n \advance\&tempcnta +-9 \&tempcntb=#2\relax\multiply\&tempcntb \tw@ +\ifnum \&tempcntb >0 \advance\&tempcnta \&tempcntb\relax +\else\advance\&tempcnta -\&tempcntb\advance\&tempcnta 64 +\fi\fi\char\&tempcnta}% +\def\&getrarrow(#1,#2){\&tempcntb=#2\relax +\ifnum\&tempcntb < 0 \&tempcntb=-\&tempcntb\relax\fi +\ifcase \&tempcntb\relax \&tempcnta='55 \or +\ifnum #1<3 \&tempcnta=#1\relax\multiply\&tempcnta +24 \advance\&tempcnta -6 \else \ifnum #1=3 \&tempcnta=49 +\else\&tempcnta=58 \fi\fi\or +\ifnum #1<3 \&tempcnta=#1\relax\multiply\&tempcnta +24 \advance\&tempcnta -3 \else \&tempcnta=51\fi\or +\&tempcnta=#1\relax\multiply\&tempcnta +\sixt@@n \advance\&tempcnta -\tw@ \else +\&tempcnta=#1\relax\multiply\&tempcnta +\sixt@@n \advance\&tempcnta 7 \fi\ifnum #2<0 \advance\&tempcnta 64 \fi +\char\&tempcnta}% +\def\&vline{\ifnum \&yarg <0 \&downline \else \&upline\fi}% +\def\&upline{\hbox to \z@{\hskip -\&halfwidth \vrule width \&wholewidth + height \&linelen depth \z@\hss}}% +\def\&downline{\hbox to \z@{\hskip -\&halfwidth \vrule width \&wholewidth + height \z@ depth \&linelen \hss}}% +\def\&upvector{\&upline\setbox\&tempboxa\hbox{\&linefnt\char'66}\raise + \&linelen \hbox to\z@{\lower \ht\&tempboxa\box\&tempboxa\hss}}% +\def\&downvector{\&downline\lower \&linelen + \hbox to \z@{\&linefnt\char'77\hss}}% +\def\&badlinearg{\errmessage{Bad \string\arrow\space argument.}}% +\thinlines +\countdef\&xarg 0 +\countdef\&yarg 2 +\countdef\&yyarg 4 +\countdef\&tempcnta 6 +\countdef\&tempcntb 8 +\dimendef\&linelen 0 +\dimendef\&clnwd 2 +\dimendef\&clnht 4 +\dimendef\&tempdima 6 +\dimendef\&tempdimb 8 +\chardef\@arrbox 0 +\chardef\&linechar 2 +\chardef\&tempboxa 2 % \&linechar and \&tempboxa don't interfere. +\let\lft^% +\let\rt_% distinguish between \rt and \lft +\newif\if@pslope % test for positive slope +\def\@findslope(#1,#2){\ifnum#1>0 + \ifnum#2>0 \@pslopetrue \else\@pslopefalse\fi \else + \ifnum#2>0 \@pslopefalse \else\@pslopetrue\fi\fi}% +\def\generalsmap(#1,#2){\getm@rphposn(#1,#2)\plnmorph\futurelet\next\addm@rph}% +\def\sline(#1,#2){\setbox\@arrbox=\hbox{\drawline(#1,#2){\sarrowlength}}% + \@findslope(#1,#2)\d@@blearrfalse\generalsmap(#1,#2)}% +\def\arrow(#1,#2){\setbox\@arrbox=\hbox{\drawvector(#1,#2){\sarrowlength}}% + \@findslope(#1,#2)\d@@blearrfalse\generalsmap(#1,#2)}% +\newif\ifd@@blearr +\def\bisline(#1,#2){\@findslope(#1,#2)% + \if@pslope \let\@upordown\raise \else \let\@upordown\lower\fi + \getch@nnel(#1,#2)\setbox\@arrbox=\hbox{\@upordown\@vchannel + \rlap{\drawline(#1,#2){\sarrowlength}}% + \hskip\@hchannel\hbox{\drawline(#1,#2){\sarrowlength}}}% + \d@@blearrtrue\generalsmap(#1,#2)}% +\def\biarrow(#1,#2){\@findslope(#1,#2)% + \if@pslope \let\@upordown\raise \else \let\@upordown\lower\fi + \getch@nnel(#1,#2)\setbox\@arrbox=\hbox{\@upordown\@vchannel + \rlap{\drawvector(#1,#2){\sarrowlength}}% + \hskip\@hchannel\hbox{\drawvector(#1,#2){\sarrowlength}}}% + \d@@blearrtrue\generalsmap(#1,#2)}% +\def\adjarrow(#1,#2){\@findslope(#1,#2)% + \if@pslope \let\@upordown\raise \else \let\@upordown\lower\fi + \getch@nnel(#1,#2)\setbox\@arrbox=\hbox{\@upordown\@vchannel + \rlap{\drawvector(#1,#2){\sarrowlength}}% + \hskip\@hchannel\hbox{\drawvector(-#1,-#2){\sarrowlength}}}% + \d@@blearrtrue\generalsmap(#1,#2)}% +\newif\ifrtm@rph +\def\@shiftmorph#1{\hbox{\setbox0=\hbox{$\scriptstyle#1$}% + \setbox1=\hbox{\hskip\@hm@rphshift\raise\@vm@rphshift\copy0}% + \wd1=\wd0 \ht1=\ht0 \dp1=\dp0 \box1}}% +\def\@hm@rphshift{\ifrtm@rph + \ifdim\hmorphposnrt=\z@\hmorphposn\else\hmorphposnrt\fi \else + \ifdim\hmorphposnlft=\z@\hmorphposn\else\hmorphposnlft\fi \fi}% +\def\@vm@rphshift{\ifrtm@rph + \ifdim\vmorphposnrt=\z@\vmorphposn\else\vmorphposnrt\fi \else + \ifdim\vmorphposnlft=\z@\vmorphposn\else\vmorphposnlft\fi \fi}% +\def\addm@rph{\ifx\next\lft\let\temp=\lftmorph\else + \ifx\next\rt\let\temp=\rtmorph\else\let\temp\relax\fi\fi \temp}% +\def\plnmorph{\dimen1\wd\@arrbox \ifdim\dimen1<\z@ \dimen1-\dimen1\fi + \vcenter{\box\@arrbox}}% +\def\lftmorph\lft#1{\rtm@rphfalse \setbox0=\@shiftmorph{#1}% + \if@pslope \let\@upordown\raise \else \let\@upordown\lower\fi + \llap{\@upordown\@vmorphdflt\hbox to\dimen1{\hss % \dimen1=\wd\@arrbox + \llap{\box0}\hss}\hskip\@hmorphdflt}\futurelet\next\addm@rph}% +\def\rtmorph\rt#1{\rtm@rphtrue \setbox0=\@shiftmorph{#1}% + \if@pslope \let\@upordown\lower \else \let\@upordown\raise\fi + \llap{\@upordown\@vmorphdflt\hbox to\dimen1{\hss + \rlap{\box0}\hss}\hskip-\@hmorphdflt}\futurelet\next\addm@rph}% +\def\getm@rphposn(#1,#2){\ifd@@blearr \dimen@\morphdist \advance\dimen@ by + .5\channelwidth \@getshift(#1,#2){\@hmorphdflt}{\@vmorphdflt}{\dimen@}\else + \@getshift(#1,#2){\@hmorphdflt}{\@vmorphdflt}{\morphdist}\fi}% +\def\getch@nnel(#1,#2){\ifdim\hchannel=\z@ \ifdim\vchannel=\z@ + \@getshift(#1,#2){\@hchannel}{\@vchannel}{\channelwidth}% + \else \@hchannel\hchannel \@vchannel\vchannel \fi + \else \@hchannel\hchannel \@vchannel\vchannel \fi}% +\def\@getshift(#1,#2)#3#4#5{\dimen@ #5\relax + \&xarg #1\relax \&yarg #2\relax + \ifnum\&xarg<0 \&xarg -\&xarg \fi + \ifnum\&yarg<0 \&yarg -\&yarg \fi + \ifnum\&xarg<\&yarg \&negargtrue \&yyarg\&xarg \&xarg\&yarg \&yarg\&yyarg\fi + \ifcase\&xarg \or % There is no case 0 + \ifcase\&yarg % case 1 + \dimen@i \z@ \dimen@ii \dimen@ \or % case (1,0) + \dimen@i .7071\dimen@ \dimen@ii .7071\dimen@ \fi \or + \ifcase\&yarg % case 2 + \or % case 0,2 wrong + \dimen@i .4472\dimen@ \dimen@ii .8944\dimen@ \fi \or + \ifcase\&yarg % case 3 + \or % case 0,3 wrong + \dimen@i .3162\dimen@ \dimen@ii .9486\dimen@ \or + \dimen@i .5547\dimen@ \dimen@ii .8321\dimen@ \fi \or + \ifcase\&yarg % case 4 + \or % case 0,2,4 wrong + \dimen@i .2425\dimen@ \dimen@ii .9701\dimen@ \or\or + \dimen@i .6\dimen@ \dimen@ii .8\dimen@ \fi \or + \ifcase\&yarg % case 5 + \or % case 0,5 wrong + \dimen@i .1961\dimen@ \dimen@ii .9801\dimen@ \or + \dimen@i .3714\dimen@ \dimen@ii .9284\dimen@ \or + \dimen@i .5144\dimen@ \dimen@ii .8575\dimen@ \or + \dimen@i .6247\dimen@ \dimen@ii .7801\dimen@ \fi \or + \ifcase\&yarg % case 6 + \or % case 0,2,3,4,6 wrong + \dimen@i .1645\dimen@ \dimen@ii .9864\dimen@ \or\or\or\or + \dimen@i .6402\dimen@ \dimen@ii .7682\dimen@ \fi \fi + \if&negarg \&tempdima\dimen@i \dimen@i\dimen@ii \dimen@ii\&tempdima\fi + #3\dimen@i\relax #4\dimen@ii\relax }% +\catcode`\&=4 % Back to alignment tab +}% +\catcode`& = 4 +\toks2 = {% +\catcode`\&=4 % Back to alignment tab +\def\generalhmap{\futurelet\next\@generalhmap}% +\def\@generalhmap{\ifx\next^ \let\temp\generalhm@rph\else + \ifx\next_ \let\temp\generalhm@rph\else \let\temp\m@kehmap\fi\fi \temp}% +\def\generalhm@rph#1#2{\ifx#1^ + \toks@=\expandafter{\the\toks@#1{\rtm@rphtrue\@shiftmorph{#2}}}\else + \toks@=\expandafter{\the\toks@#1{\rtm@rphfalse\@shiftmorph{#2}}}\fi + \generalhmap}% +\def\m@kehmap{\mathrel{\smash@@{\the\toks@}}}% +\def\mapright{\toks@={\mathop{\vcenter{\smash@@{\drawrightarrow}}}\limits}% + \generalhmap}% +\def\mapleft{\toks@={\mathop{\vcenter{\smash@@{\drawleftarrow}}}\limits}% + \generalhmap}% +\def\bimapright{\toks@={\mathop{\vcenter{\smash@@{\drawbirightarrow}}}\limits}% + \generalhmap}% +\def\bimapleft{\toks@={\mathop{\vcenter{\smash@@{\drawbileftarrow}}}\limits}% + \generalhmap}% +\def\adjmapright{\toks@={\mathop{\vcenter{\smash@@{\drawadjrightarrow}}}\limits}% + \generalhmap}% +\def\adjmapleft{\toks@={\mathop{\vcenter{\smash@@{\drawadjleftarrow}}}\limits}% + \generalhmap}% +\def\hline{\toks@={\mathop{\vcenter{\smash@@{\drawhline}}}\limits}% + \generalhmap}% +\def\bihline{\toks@={\mathop{\vcenter{\smash@@{\drawbihline}}}\limits}% + \generalhmap}% +\def\drawrightarrow{\hbox{\drawvector(1,0){\harrowlength}}}% +\def\drawleftarrow{\hbox{\drawvector(-1,0){\harrowlength}}}% +\def\drawbirightarrow{\hbox{\raise.5\channelwidth + \hbox{\drawvector(1,0){\harrowlength}}\lower.5\channelwidth + \llap{\drawvector(1,0){\harrowlength}}}}% +\def\drawbileftarrow{\hbox{\raise.5\channelwidth + \hbox{\drawvector(-1,0){\harrowlength}}\lower.5\channelwidth + \llap{\drawvector(-1,0){\harrowlength}}}}% +\def\drawadjrightarrow{\hbox{\raise.5\channelwidth + \hbox{\drawvector(-1,0){\harrowlength}}\lower.5\channelwidth + \llap{\drawvector(1,0){\harrowlength}}}}% +\def\drawadjleftarrow{\hbox{\raise.5\channelwidth + \hbox{\drawvector(1,0){\harrowlength}}\lower.5\channelwidth + \llap{\drawvector(-1,0){\harrowlength}}}}% +\def\drawhline{\hbox{\drawline(1,0){\harrowlength}}}% +\def\drawbihline{\hbox{\raise.5\channelwidth + \hbox{\drawline(1,0){\harrowlength}}\lower.5\channelwidth + \llap{\drawline(1,0){\harrowlength}}}}% +\def\generalvmap{\futurelet\next\@generalvmap}% +\def\@generalvmap{\ifx\next\lft \let\temp\generalvm@rph\else + \ifx\next\rt \let\temp\generalvm@rph\else \let\temp\m@kevmap\fi\fi \temp}% +\toksdef\toks@@=1 +\def\generalvm@rph#1#2{\ifx#1\rt % append + \toks@=\expandafter{\the\toks@ + \rlap{$\vcenter{\rtm@rphtrue\@shiftmorph{#2}}$}}\else % prepend + \toks@@={\llap{$\vcenter{\rtm@rphfalse\@shiftmorph{#2}}$}}% + \toks@=\expandafter\expandafter\expandafter{\expandafter\the\expandafter + \toks@@ \the\toks@}\fi \generalvmap}% +\def\m@kevmap{\the\toks@}% +\def\mapdown{\toks@={\vcenter{\drawdownarrow}}\generalvmap}% +\def\mapup{\toks@={\vcenter{\drawuparrow}}\generalvmap}% +\def\bimapdown{\toks@={\vcenter{\drawbidownarrow}}\generalvmap}% +\def\bimapup{\toks@={\vcenter{\drawbiuparrow}}\generalvmap}% +\def\adjmapdown{\toks@={\vcenter{\drawadjdownarrow}}\generalvmap}% +\def\adjmapup{\toks@={\vcenter{\drawadjuparrow}}\generalvmap}% +\def\vline{\toks@={\vcenter{\drawvline}}\generalvmap}% +\def\bivline{\toks@={\vcenter{\drawbivline}}\generalvmap}% +\def\drawdownarrow{\hbox to5pt{\hss\drawvector(0,-1){\varrowlength}\hss}}% +\def\drawuparrow{\hbox to5pt{\hss\drawvector(0,1){\varrowlength}\hss}}% +\def\drawbidownarrow{\hbox to5pt{\hss\hbox{\drawvector(0,-1){\varrowlength}}% + \hskip\channelwidth\hbox{\drawvector(0,-1){\varrowlength}}\hss}}% +\def\drawbiuparrow{\hbox to5pt{\hss\hbox{\drawvector(0,1){\varrowlength}}% + \hskip\channelwidth\hbox{\drawvector(0,1){\varrowlength}}\hss}}% +\def\drawadjdownarrow{\hbox to5pt{\hss\hbox{\drawvector(0,-1){\varrowlength}}% + \hskip\channelwidth\lower\varrowlength + \hbox{\drawvector(0,1){\varrowlength}}\hss}}% +\def\drawadjuparrow{\hbox to5pt{\hss\hbox{\drawvector(0,1){\varrowlength}}% + \hskip\channelwidth\raise\varrowlength + \hbox{\drawvector(0,-1){\varrowlength}}\hss}}% +\def\drawvline{\hbox to5pt{\hss\drawline(0,1){\varrowlength}\hss}}% +\def\drawbivline{\hbox to5pt{\hss\hbox{\drawline(0,1){\varrowlength}}% + \hskip\channelwidth\hbox{\drawline(0,1){\varrowlength}}\hss}}% +\def\commdiag#1{\null\, + \vcenter{\commdiagbaselines + \m@th\ialign{\hfil$##$\hfil&&\hfil$\mkern4mu ##$\hfil\crcr + \mathstrut\crcr\noalign{\kern-\baselineskip} + #1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,}% +\def\commdiagbaselines{\baselineskip15pt \lineskip3pt \lineskiplimit3pt }% +\def\gridcommdiag#1{\null\, + \vcenter{\offinterlineskip + \m@th\ialign{&\vbox to\vgrid{\vss + \hbox to\hgrid{\hss\smash@@{$##$}\hss}}\crcr + \mathstrut\crcr\noalign{\kern-\vgrid} + #1\crcr\mathstrut\crcr\noalign{\kern-.5\vgrid}}}\,}% +\newdimen\harrowlength \harrowlength=60pt +\newdimen\varrowlength \varrowlength=.618\harrowlength +\newdimen\sarrowlength \sarrowlength=\harrowlength +\newdimen\hmorphposn \hmorphposn=\z@ +\newdimen\vmorphposn \vmorphposn=\z@ +\newdimen\morphdist \morphdist=4pt +\dimendef\@hmorphdflt 0 % These two dimensions are +\dimendef\@vmorphdflt 2 % defined by \getm@rphposn +\newdimen\hmorphposnrt \hmorphposnrt=\z@ +\newdimen\hmorphposnlft \hmorphposnlft=\z@ +\newdimen\vmorphposnrt \vmorphposnrt=\z@ +\newdimen\vmorphposnlft \vmorphposnlft=\z@ +\let\hmorphposnup=\hmorphposnrt +\let\hmorphposndn=\hmorphposnlft +\let\vmorphposnup=\vmorphposnrt +\let\vmorphposndn=\vmorphposnlft +\newdimen\hgrid \hgrid=15pt +\newdimen\vgrid \vgrid=15pt +\newdimen\hchannel \hchannel=0pt +\newdimen\vchannel \vchannel=0pt +\newdimen\channelwidth \channelwidth=3pt +\dimendef\@hchannel 0 % Defined via the +\dimendef\@vchannel 2 % macro \getch@nnel +\catcode`& = \@oldandcatcode +\catcode`@ = \@oldatcatcode +}% +\let\newif = \@plainnewif +\let\newdimen = \@plainnewdimen +\ifx\noarrow\@undefined \the\toks0 \the\toks2 \fi +\catcode`& = \@eplainoldandcode +\def\environment#1{% + \ifx\@groupname\@undefined\else + \errhelp = \@unnamedendgrouphelp + \errmessage{`\@groupname' was not closed by \string\endenvironment}% + \fi + \edef\@groupname{#1}% + \begingroup + \let\@groupname = \@undefined +}% +\def\endenvironment#1{% + \endgroup + \edef\@thearg{#1}% + \ifx\@groupname\@thearg + \else + \ifx\@groupname\@undefined + \errhelp = \@isolatedendenvironmenthelp + \errmessage{Isolated \string\endenvironment\space for `#1'}% + \else + \errhelp = \@mismatchedenvironmenthelp + \errmessage{Environment `#1' ended, but `\@groupname' started}% + \endgroup % Probably a typo in the names. + \fi + \fi + \let\@groupname = \@undefined +}% +\newhelp\@unnamedendgrouphelp{Most likely, you just forgot an^^J% + \string\endenvironment. Maybe you should try inserting another^^J% + \string\endgroup to recover.}% +\newhelp\@isolatedendenvironmenthelp{You ended an environment X, but^^J% + no \string\environment{X} to start it is anywhere in sight.^^J% + You might also be at an \string\endenvironment\space that would match^^J% + a \string\begingroup, i.e., you forgot an \string\endgroup.}% +\newhelp\@mismatchedenvironmenthelp{You started an environment named X, but^^J% + you ended one named Y. Maybe you made a typo in one^^J% + or the other of the names?}% +\newif\ifenvironment +\def\checkenv{\ifenvironment \errhelp = \@interwovenenvhelp + \errmessage{Interwoven environments}% + \egroup \fi +}% +\newhelp\@interwovenenvhelp{Perhaps you forgot to end the previous^^J% + environment? I'm finishing off the current group,^^J% + hoping that will fix it.}% +\newtoks\previouseverydisplay +\let\@leftleftfill\relax % as it was +\newdimen\leftdisplayindent \leftdisplayindent=\parindent +\newif\if@leftdisplays +\def\leftdisplays{% + \if@leftdisplays\else + \previouseverydisplay = \everydisplay + \everydisplay = {\the\previouseverydisplay \leftdisplaysetup}% + \let\@save@maybedisableeqno = \@maybedisableeqno + \let\@saveeqno = \eqno + \let\@saveleqno = \leqno + \let\@saveeqalignno = \eqalignno + \let\@saveleqalignno = \leqalignno + \let\@maybedisableeqno = \relax + \def\eqno{\hfill\textstyle\enspace}% + \def\leqno{% + \hfill + \hbox to0pt\bgroup + \kern-\displaywidth + \kern-\leftdisplayindent % I'll use just \leftdisplayindent + $\aftergroup\@leftleqnoend % inserted after ending $ + }% + \@redefinealignmentdisplays + \@leftdisplaystrue + \fi +}% +\newbox\@lignbox +\newdimen\disprevdepth +\def\centereddisplays{% + \if@leftdisplays + \everydisplay = \previouseverydisplay + \let\@maybedisableeqno = \@save@maybedisableeqno + \let\eqno = \@saveeqno + \let\leqno = \@saveleqno + \let\eqalignno = \@saveeqalignno + \let\leqalignno = \@saveleqalignno + \@leftdisplaysfalse + \fi +}% +\def\leftdisplaysetup{% + \dimen@ = \leftdisplayindent + \advance\dimen@ by \leftskip + \advance\displayindent by \dimen@ + \advance\displaywidth by -\dimen@ + \halign\bgroup##\cr \noalign\bgroup + \disprevdepth = \prevdepth + \setbox\z@ = \hbox to\displaywidth\bgroup + $\displaystyle + \aftergroup\@lefteqend % inserted after ending $ +} +\def\@lefteqend{% gets inserted between the ending $$ + \hfil\egroup% end box 0 + \@putdisplay} +\def\@leftleqnoend{\hss \egroup $}% end the \hbox to 0pt for \leqno, restore $ +\def\@putdisplay{% + \ifvoid\@lignbox % Ordinary display; use it. + \moveright\displayindent\box\z@ + \else % alignment display; unwrap alignment + \prevdepth = \dp\@lignbox % affects the skip *below* + \unvbox\@lignbox + \fi + \egroup\egroup % end \noalign, end outer \halign + $% restore first $ of trailing $$ +} +\def\@redefinealignmentdisplays{% + \def\displaylines##1{ + \global\setbox\@lignbox\vbox{% + \prevdepth = \disprevdepth + \displ@y + \tabskip\displayindent + \halign{\hbox to\displaywidth + {$\@lign\displaystyle####\hfil$\hfil}\crcr + ##1\crcr}}}% + \def\eqalignno##1{% + \def\eqno{&}% + \def\leqno{&}% + \global\setbox\@lignbox\vbox{% + \prevdepth = \disprevdepth + \displ@y + \advance\displaywidth by \displayindent + \tabskip\displayindent + \halign to\displaywidth{% + \hfil $\@lign\displaystyle{####}$\@leftleftfill\tabskip\z@skip + &$\@lign\displaystyle{{}####}$\hfil\tabskip\centering + &\llap{$\@lign####$}\tabskip\z@skip\crcr + ##1\crcr}}}% + \def\leqalignno##1{% + \def\eqno{&}% + \def\leqno{&}% + \global\setbox\@lignbox\vbox{% + \prevdepth = \disprevdepth + \displ@y + \advance\displaywidth by \displayindent + \tabskip\displayindent + \halign to\displaywidth{% + \hfil $\@lign\displaystyle{####}$\@leftleftfill\tabskip\z@skip + &$\@lign\displaystyle{{}####}$\hfil\tabskip\centering + &\kern-\displaywidth + \rlap{\kern\displayindent \kern-\leftdisplayindent$\@lign####$}% + \tabskip\displaywidth\crcr + ##1\crcr}}}% +}% +\let\@primitivenoalign = \noalign +\newtoks\@everynoalign +\def\@lefteqalignonoalign#1{% + \@primitivenoalign{% + \advance\leftskip by -\parindent + \advance\leftskip by -\leftdisplayindent + \parskip = 0pt + \parindent = 0pt + \the\@everynoalign + #1% + }% +}% +\def\monthname{% + \ifcase\month + \or Jan\or Feb\or Mar\or Apr\or May\or Jun% + \or Jul\or Aug\or Sep\or Oct\or Nov\or Dec% + \fi +}% +\def\fullmonthname{% + \ifcase\month + \or January\or February\or March\or April\or May\or June% + \or July\or August\or September\or October\or November\or December% + \fi +}% +\def\timestring{\begingroup + \count0 = \time + \divide\count0 by 60 + \count2 = \count0 % The hour, from zero to 23. + \count4 = \time + \multiply\count0 by 60 + \advance\count4 by -\count0 % The minute, from zero to 59. + \ifnum\count4<10 + \toks1 = {0}% + \else + \toks1 = {}% + \fi + \ifnum\count2<12 + \toks0 = {a.m.}% + \else + \toks0 = {p.m.}% + \advance\count2 by -12 + \fi + \ifnum\count2=0 + \count2 = 12 + \fi + \number\count2:\the\toks1 \number\count4 \thinspace \the\toks0 +\endgroup}% +\def\timestamp{\number\day\space\monthname\space\number\year\quad\timestring}% +\def\today{\the\day\ \fullmonthname\ \the\year}% +\newskip\abovelistskipamount \abovelistskipamount = .5\baselineskip + \newcount\abovelistpenalty \abovelistpenalty = 10000 + \def\abovelistskip{\vpenalty\abovelistpenalty \vskip\abovelistskipamount}% +\newskip\interitemskipamount \interitemskipamount = 0pt + \newcount\belowlistpenalty \belowlistpenalty = -50 + \def\belowlistskip{\vpenalty\belowlistpenalty \vskip\belowlistskipamount}% +\newskip\belowlistskipamount \belowlistskipamount = .5\baselineskip + \newcount\interitempenalty \interitempenalty = 0 + \def\interitemskip{\vpenalty\interitempenalty \vskip\interitemskipamount}% +\newdimen\listleftindent \listleftindent = 0pt +\newdimen\listrightindent \listrightindent = 0pt +\let\listmarkerspace = \enspace +\newtoks\everylist +\def\listcompact{\interitemskipamount = 0pt \relax}% +\newdimen\@listindent +\def\beginlist{% + \abovelistskip + \@listindent = \parindent + \advance\@listindent by \listleftindent + \advance\leftskip by \@listindent + \advance\rightskip by \listrightindent + \itemnumber = 1 + \the\everylist +}% +\def\li{\@getoptionalarg\@finli}% +\def\@finli{% + \let\@lioptarg\@optionalarg + \ifx\@lioptarg\empty \else + \begingroup + \@@hldestoff + \expandafter\writeitemxref\expandafter{\@lioptarg}% + \endgroup + \fi + \ifnum\itemnumber=1 \else \interitemskip \fi + \begingroup + \ifx\@lioptarg\empty \else + \toks@ = \expandafter{\@lioptarg}% + \let\li@nohldest@marker\marker + \edef\marker{\noexpand\hldest@impl{li}{\the\toks@}\noexpand\li@nohldest@marker}% + \fi + \printitem + \endgroup + \advance\itemnumber by 1 + \advance\itemletter by 1 + \advance\itemromannumeral by 1 + \ignorespaces +}% +\def\writeitemxref#1{\definexref{#1}\marker{item}}% +\def\printitem{% + \par + \nobreak + \vskip-\parskip + \noindent + \printmarker\marker +}% +\def\printmarker#1{\llap{\marker \enspace}}% +\def\endlist{\belowlistskip}% +\newcount\numberedlistdepth +\newcount\itemnumber +\newcount\itemletter +\newcount\itemromannumeral +\def\numberedmarker{% + \ifcase\numberedlistdepth + (impossible)% + \or \printitemnumber + \or \printitemletter + \or \printitemromannumeral + \else *% + \fi +}% +\def\printitemnumber{\number\itemnumber}% +\def\printitemletter{\char\the\itemletter}% +\def\printitemromannumeral{\romannumeral\itemromannumeral}% +\def\numberedprintmarker#1{\llap{#1) \listmarkerspace}}% +\def\numberedlist{\environment{@numbered-list}% + \advance\numberedlistdepth by 1 + \itemletter = `a + \itemromannumeral = 1 + \beginlist + \let\marker = \numberedmarker + \let\printmarker = \numberedprintmarker +}% +\def\endnumberedlist{% + \par + \endenvironment{@numbered-list}% + \endlist +}% +\let\orderedlist = \numberedlist +\let\endorderedlist = \endnumberedlist +\newcount\unorderedlistdepth +\def\unorderedmarker{% + \ifcase\unorderedlistdepth + (impossible)% + \or \blackbox + \or ---% + \else *% + \fi +}% +\def\unorderedprintmarker#1{\llap{#1\listmarkerspace}}% +\def\unorderedlist{\environment{@unordered-list}% + \advance\unorderedlistdepth by 1 + \beginlist + \let\marker = \unorderedmarker + \let\printmarker = \unorderedprintmarker +}% +\def\endunorderedlist{% + \par + \endenvironment{@unordered-list}% + \endlist +}% +\def\listing#1{% + \par \begingroup + \@setuplisting + \setuplistinghook + \input #1 + \endgroup +}% +\let\setuplistinghook = \relax +\def\linenumberedlisting{% + \ifx\lineno\undefined \innernewcount\lineno \fi + \lineno = 0 + \everypar = {\advance\lineno by 1 \printlistinglineno}% +}% +\def\printlistinglineno{\llap{[\the\lineno]\quad}}% +\def\nolastlinelisting{\aftergroup\@removeboxes}% +\def\@removeboxes{% + \setbox0 = \lastbox + \ifvoid0 + \ignorespaces % Ignore spaces after the \obeywhitespace's group. + \else + \expandafter\@removeboxes + \fi +}% +{% + \makeactive\^^L + \let^^L = \relax + \gdef\@setuplisting{% + \uncatcodespecials + \obeywhitespace + \makeactive\` + \makeactive\^^I + \makeactive\^^L + \def^^L{\vfill\break}% + \parskip = 0pt + \listingfont + }% +}% +\def\listingfont{\tt}% +{% + \makeactive\` + \gdef`{\relax\lq}% Defeat ligatures. +}% +{% + \makeactive\^^I + \gdef^^I{\hskip8\fontdimen2\font \relax}% +}% +\def\verbatimescapechar#1{% + \gdef\@makeverbatimescapechar{% + \@makeverbatimdoubleescape #1% + \catcode`#1 = 0 + }% +}% +\def\@makeverbatimdoubleescape#1{% + \catcode`#1 = \other + \begingroup + \lccode`\* = `#1% + \lowercase{\endgroup \ece\def*{*}}% +}% +\verbatimescapechar\| % initially escapechar is | +\def\verbatim{\begingroup + \uncatcodespecials + \makeactive\` % make space character a single space, not stretchable + \@makeverbatimescapechar + \tt\obeywhitespace} +\let\endverbatim = \endgroup +\def\definecontentsfile#1{% + \ece\innernewwrite{#1file}% + \ece\innernewif{if@#1fileopened}% + \ece\let{#1filebasename} = \jobname + \ece\def{open#1file}{\opencontentsfile{#1}}% + \ece\def{write#1entry}{\writecontentsentry{#1}}% + \ece\def{writenumbered#1entry}{\writenumberedcontentsentry{#1}}% + \ece\def{writenumbered#1line}{\writenumberedcontentsline{#1}}% + \ece\innernewif{ifrewrite#1file} \csname rewrite#1filetrue\endcsname + \ece\def{read#1file}{\readcontentsfile{#1}}% +}% +\definecontentsfile{toc}% +\def\opencontentsfile#1{% + \csname if@#1fileopened\endcsname \else + \ece{\immediate\openout}{#1file} = \csname #1filebasename\endcsname.#1 + \ece\global{@#1fileopenedtrue}% + \fi +}% +\def\writecontentsentry#1#2#3{\writenumberedcontentsentry{#1}{#2}{#3}{}}% +\def\writenumberedcontentsentry#1#2#3#4{% + \csname ifrewrite#1file\endcsname + \writenumberedcontents@cmdname{#1}{#2}% + \def\temp{#3}% the text + \toks2 = \expandafter{#4}% + \edef\cs{\the\toks2}% + \edef\@wr{% + \write\csname #1file\endcsname{% + \the\toks0 % the \toc...entry control sequence + {\sanitize\temp}% the text + \ifx\empty\cs\else {\sanitize\cs}\fi % a secondary number, or nothing + {\noexpand\folio}% the page number + }% + }% + \@wr + \fi + \ignorespaces +}% +\def\writenumberedcontentsline#1#2#3#4{% + \csname ifrewrite#1file\endcsname + \writenumberedcontents@cmdname{#1}{#2}% + \def\temp{#4}% the text + \toks2 = \expandafter{#3}% + \edef\cs{\the\toks2}% + \edef\@wr{% + \write\csname #1file\endcsname{% + \the\toks0 % the \toc...entry control sequence + \ifx\empty\cs\else {\sanitize\cs}\fi % a secondary number, or nothing + {\sanitize\temp}% the text + {\noexpand\folio}% the page number + }% + }% + \@wr + \fi + \ignorespaces +}% +\def\writenumberedcontents@cmdname#1#2{% + \csname open#1file\endcsname + \edef\temp{#2}% Expand PART fully and see if this produced an integer. + \expandafter\if\expandafter\isinteger\expandafter{\temp}% + \toks0 = {\expandafter\noexpand \csname #1entry\endcsname}% + \edef\temp{\the\toks0{\temp}}% + \toks0 = \expandafter{\temp}% + \else + \toks0 = {\expandafter\noexpand \csname #1#2entry\endcsname}% + \fi +}% +\def\readcontentsfile#1{% + \edef\temp{% + \noexpand\testfileexistence[\csname #1filebasename\endcsname]{#1}% + }\temp + \if@fileexists + \input \csname #1filebasename\endcsname.#1\relax + \fi +}% +\def\tocchapterentry#1#2{\line{\bf #1 \dotfill\ #2}}% +\def\tocsectionentry#1#2{\line{\quad\sl #1 \dotfill\ \rm #2}}% +\def\tocsubsectionentry#1#2{\line{\qquad\rm #1 \dotfill\ #2}}% +\def\tocentry#1#2#3{\line{\rm\hskip#1em #2 \dotfill\ #3}}% +\let\ifxrefwarning = \iftrue +\def\xrefwarningtrue{\@citewarningtrue \let\ifxrefwarning = \iftrue}% +\def\xrefwarningfalse{\@citewarningfalse \let\ifxrefwarning = \iffalse}% +\begingroup + \catcode`\_ = 8 + \gdef\xrlabel#1{#1_x}% +\endgroup +\def\xrdef#1{% + \begingroup + \hldest@impl{xrdef}{#1}% + \begingroup + \@@hldestoff + \definexref{#1}{\noexpand\folio}{page}% + \endgroup + \endgroup + \ignorespaces +}% +\def\definexref#1#2#3{% + \hldest@impl{definexref}{#1}% + \edef\temp{#1}% + \readauxfile + \edef\@wr{\noexpand\writeaux{\string\@definelabel{\temp}{#2}{#3}}}% + \@wr + \ignorespaces +}% +\def\@definelabel#1{% #2 and #3 will be read later. + \begingroup % Will be ended in \@definelabel@nocheck. + \expandafter\ifx\csname\xrlabel{#1}\endcsname \relax + \expandafter\@definelabel@nocheck + \else + \expandafter\@definelabel@warn + \fi + {#1}% +}% +\def\@definelabel@nocheck#1#2#3{% + \expandafter\gdef\csname\xrlabel{#1}\endcsname{#2}% + \setpropertyglobal{\xrlabel{#1}}{class}{#3}% + \endgroup % From \@definelabel. +}% +\def\@definelabel@warn#1#2#3{% + \message{^^J\linenumber Label `#1' multiply defined, + value `#2' of class `#3' overwriting value + `\csname\xrlabel{#1}\endcsname' of class + `\getproperty{\xrlabel{#1}}{class}'.}% + \@definelabel@nocheck{#1}{#2}{#3}% +}% +\def\reftie{\penalty\@M \ }% Do not rely on `~' being defined as a tie. +\let\refspace\ +\def\xrefn{\@getoptionalarg\@finxrefn}% +\def\@finxrefn#1{% + \hlstart@impl{ref}{#1}% + \ifx\@optionalarg\empty \else + \let\@xrefnoptarg\@optionalarg + \readauxfile + {\@@hloff\@xrefnoptarg}\reftie + \fi + \plain@xrefn{#1}% + \hlend@impl{ref}% +}% +\def\plain@xrefn#1{% + \readauxfile + \expandafter \ifx\csname\xrlabel{#1}\endcsname\relax + \if@citewarning + \message{\linenumber Undefined label `#1'.}% + \fi + \expandafter\def\csname\xrlabel{#1}\endcsname{% + `{\tt + \escapechar = -1 + \expandafter\string\csname#1\endcsname + }'% + }% + \fi + \csname\xrlabel{#1}\endcsname % Always produce something. +}% +\let\refn = \xrefn +\def\xrefpageword{p.\thinspace}% +\def\xref{\@getoptionalarg\@finxref}% +\def\@finxref#1{% + \hlstart@impl{xref}{#1}% + \ifx\@optionalarg\empty \else + {\@@hloff\@optionalarg}\refspace + \fi + \xrefpageword\plain@xrefn{#1}% + \hlend@impl{xref}% +}% +\def\@maybewarnref{% + \ifundefined{amsppt.sty}% + \else + \message{Warning: amsppt.sty and Eplain both define \string\ref. See + the Eplain manual.}% + \let\amsref = \ref + \fi + \let\ref = \eplainref + \ref +} +\let\ref = \@maybewarnref +\def\eplainref{\@getoptionalarg\@fineplainref}% +\def\@fineplainref{\@generalref{1}{}}% +\def\refs{\let\@optionalarg\empty \@generalref{0}s}% +\def\@generalref#1#2#3{% + \let\@generalrefoptarg\@optionalarg + \readauxfile + \ifcase#1 \else \hlstart@impl{ref}{#3}\fi + \edef\@generalref@class{\getproperty{\xrlabel{#3}}{class}}% + \expandafter\ifx\csname \@generalref@class word\endcsname\relax + \ifx\@generalrefoptarg\empty \else {\@@hloff\@generalrefoptarg\reftie}\fi + \else + \begingroup + \@@hloff + \ifx\@generalrefoptarg\empty \else \@generalrefoptarg \refspace \fi + \csname \@generalref@class word\endcsname + #2\reftie + \endgroup + \fi + \ifcase#1 \hlstart@impl{ref}{#3}\fi + \plain@xrefn{#3}% + \hlend@impl{ref}% +}% +\newcount\eqnumber +\newcount\subeqnumber +\def\eqdefn{\@getoptionalarg\@fineqdefn}% +\def\@fineqdefn#1{% + \ifx\@optionalarg\empty + \global\advance\eqnumber by 1 + \def\temp{\eqconstruct{\number\eqnumber}}% + \else + \def\temp{\@optionalarg}% + \fi + \global\subeqnumber = 0 + \gdef\@currenteqlabel{#1}% + \toks0 = \expandafter{\@currenteqlabel}% + \begingroup + \def\eqrefn{\noexpand\plain@xrefn}% + \def\xrefn{\noexpand\plain@xrefn}% + \edef\temp{\noexpand\@eqdefn{\the\toks0}{\temp}}% + \temp + \endgroup +}% +\def\eqsubdefn#1{% + \global\advance\subeqnumber by 1 + \toks0 = {#1}% + \toks2 = \expandafter{\@currenteqlabel}% + \begingroup + \def\eqrefn{\noexpand\plain@xrefn}% + \def\xrefn{\noexpand\plain@xrefn}% + \def\eqsubreftext{\noexpand\eqsubreftext}% + \edef\temp{% + \noexpand\@eqdefn + {\the\toks0}% + {\eqsubreftext{\eqrefn{\the\toks2}}{\the\subeqnumber}}% + }% + \temp + \endgroup +}% +\newcount\phantomeqnumber +\def\phantomeqlabel{PHEQ\the\phantomeqnumber}% +\def\@eqdefn#1#2{% + \ifempty{#1}% + \global\advance\phantomeqnumber by 1 + \edef\hl@eqlabel{\phantomeqlabel}% + \readauxfile + \else + \def\hl@eqlabel{#1}% + {\@@hldestoff \definexref{#1}{#2}{eq}}% + \fi + \hldest@impl{eq}{\hl@eqlabel}% + \begingroup % \@definelabel@nocheck will end this group. + \@definelabel@nocheck{#1}{#2}{eq}% +}% +\def\eqdef{\@getoptionalarg\@fineqdef}% +\def\@fineqdef{% + \toks0 = \expandafter{\@optionalarg}% + \edef\temp{\noexpand\@eqdef{\noexpand\eqdefn[\the\toks0]}}% + \temp +}% +\def\eqsubdef{\@eqdef\eqsubdefn}% +\def\@eqdef#1#2{% + \@maybedisableeqno + \eqnum #1{#2}% Define the label and hyperlink destination. + \let\@optionalarg\empty % \@fineqref will examine \@optionalarg. + {\@@hloff\@fineqref{#2}}% Print the text without a hyperlink. + \@mayberestoreeqno + \ignorespaces +}% +\let\@mayberestoreeqno = \relax +\def\@maybedisableeqno{% + \ifinner + \global\let\eqno = \relax + \global\let\leqno = \relax + \global\let\@mayberestoreeqno = \@restoreeqno + \fi +}% +\let\@primitiveeqno = \eqno +\let\@primitiveleqno = \leqno +\def\@restoreeqno{% + \global\let\eqno = \@primitiveeqno + \global\let\leqno = \@primitiveleqno + \global\let\@mayberestoreeqno = \empty +}% +\def\righteqnumbers{% + \def\eqnum{\eqno}% + \def\eqalignnum{\eqalignno}% +}% +\def\lefteqnumbers{% + \def\eqnum{\leqno}% + \def\eqalignnum{\leqalignno}% +}% +\righteqnumbers +\def\eqrefn{\@getoptionalarg\@fineqrefn}% +\def\@fineqrefn#1{% + \eqref@start{#1}% + \plain@xrefn{#1}% + \hlend@impl{eq}% +}% +\def\eqref{\@getoptionalarg\@fineqref}% +\def\@fineqref#1{% + \eqref@start{#1}% + \eqprint{\plain@xrefn{#1}}% + \hlend@impl{eq}% +}% +\def\eqref@start#1{% + \let\@eqrefoptarg\@optionalarg + \ifempty{#1}% + \hlstart@impl{eq}{\phantomeqlabel}% + \else + \hlstart@impl{eq}{#1}% + \fi + \ifx\@eqrefoptarg\empty \else + {\@@hloff\@eqrefoptarg\reftie}% + \fi +}% +\let\eqconstruct = \identity +\def\eqprint#1{(#1)}% +\def\eqsubreftext#1#2{#1.#2}% +\let\extraidxcmdsuffixes = \empty +\def\defineindex#1{% + \def\@idxprefix{#1}% + \expandafter\innernewif\csname if\@idxprefix dx\endcsname + \csname \@idxprefix dxtrue\endcsname + \for\@idxcmd:=,marked,submarked,name% + \extraidxcmdsuffixes\do + {% + \@defineindexcmd\@idxcmd + }% + \ece\innernewwrite{@#1indexfile}% + \ece\innernewif{if@#1indexfileopened}% +}% +\newif\ifsilentindexentry +\def\@defineindexcmd#1{% + \@defineoneindexcmd{s}{#1}\silentindexentrytrue + \@defineoneindexcmd{}{#1}\silentindexentryfalse +}% +\def\@defineoneindexcmd#1#2#3{% + \toks@ = {#3}% + \edef\temp{% + \def + \expandonce\csname#1\@idxprefix dx#2\endcsname % e.g., \idx or \sidxname. + {\def\noexpand\@idxprefix{\@idxprefix}% define \@idxprefix + \expandonce\csname @@#1idx#2\endcsname + }% + \def + \expandonce\csname @@#1idx#2\endcsname{% e.g., \@@idx + \the\toks@ + \noexpand\@idxgetrange\expandonce\csname @#1idx#2\endcsname + }% + }% + \temp +}% +\let\indexfilebasename = \jobname +\def\@idxwrite#1#2{% + \csname if\@idxprefix dx\endcsname + \@openidxfile + \def\temp{#1}% + \edef\@wr{% + \expandafter\write\csname @\@idxprefix indexfile\endcsname{% + \string\indexentry + {\sanitize\temp}% + {\noexpand#2}% + }% + }% + \@wr + \else + \write-1{}% + \fi + \ifindexproofing + \def\temp{#1}% + \edef\temp{% + \insert\@indexproof{\noexpand\indexproofterm{\sanitize\temp}}% + }% + \temp + \ifhmode\allowhyphens\fi + \fi + \hookrun{afterindexterm}% + \ifsilentindexentry \expandafter\ignorespaces\fi +}% +\def\@openidxfile{% + \csname if@\@idxprefix indexfileopened\endcsname \else + \expandafter\immediate\openout\csname @\@idxprefix indexfile\endcsname = + \indexfilebasename.\@idxprefix dx + \expandafter\global\csname @\@idxprefix indexfileopenedtrue\endcsname + \fi +}% +\newif\ifindexproofing +\newinsert\@indexproof +\dimen\@indexproof = \maxdimen % No limit on number of terms. +\count\@indexproof = 0 \skip\@indexproof = 0pt % They take up no space. +\font\indexprooffont = cmtt8 +\def\indexproofterm#1{\hbox{\strut \indexprooffont #1}}% +\let\@plainmakeheadline = \makeheadline +\def\makeheadline{% + \expandafter\ifx\csname\idxpageanchor{\folio}\endcsname\relax \else + {\@@hldeston \hldest@impl{idx}{\hlidxpagelabel{\folio}}}% + \fi + \indexproofunbox + \@plainmakeheadline +}% +\def\indexsetmargins{% + \ifx\undefined\outsidemargin + \dimen@ = 1truein + \advance\dimen@ by \hoffset + \edef\outsidemargin{\the\dimen@}% + \let\insidemargin = \outsidemargin + \fi +}% +\def\indexproofunbox{% + \ifvoid\@indexproof\else + \indexsetmargins + \rlap{% + \kern\hsize + \ifodd\pageno \kern\outsidemargin \else \kern\insidemargin \fi + \vbox to 0pt{\unvbox\@indexproof\vss}% + }\nointerlineskip + \fi +}% +\def\idxrangebeginword{begin}% +\def\idxbeginrangemark{(}% the corresponding magic char to go in the idx file +\def\idxrangeendword{end}% +\def\idxendrangemark{)}% +\def\idxseecmdword{see}% +\def\idxseealsocmdword{seealso}% +\newif\if@idxsee +\newif\if@hlidxencap +\let\@idxseenterm = \relax +\def\idxpagemarkupcmdword{pagemarkup}% +\let\@idxpagemarkup = \relax +\def\@idxgetrange#1{% + \let\@idxrangestr = \empty + \let\@afteridxgetrange = #1% + \begingroup + \catcode\idxargopen=1 + \@getoptionalarg\@finidxgetopt +}% +\def\@finidxgetopt{% + \global\let\@idxgetrange@arg\@optionalarg + \endgroup + \@hlidxencaptrue + \for\@idxarg:=\@idxgetrange@arg\do{% + \expandafter\@idxcheckpagemarkup\@idxarg=,% + \ifx\@idxarg\idxrangebeginword + \def\@idxrangestr{\idxencapoperator\idxbeginrangemark}% + \else + \ifx\@idxarg\idxrangeendword + \def\@idxrangestr{\idxencapoperator\idxendrangemark}% + \@hlidxencapfalse + \else + \ifx\@idxarg\idxseecmdword + \def\@idxpagemarkup{indexsee}% + \@idxseetrue + \@hlidxencapfalse + \else + \ifx\@idxarg\idxseealsocmdword + \def\@idxpagemarkup{indexseealso}% + \@idxseetrue + \@hlidxencapfalse + \else + \ifx\@idxpagemarkup\relax + \errmessage{Unrecognized index option `\@idxarg'}% + \fi + \fi + \fi + \fi + \fi + }% + \ifnum\hldest@place@idx < 0 \else + \if@hlidxencap + \ifx\@idxpagemarkup\relax + \let\@idxpagemarkup\empty + \fi + \ifcase\hldest@place@idx \relax + \edef\@idxpagemarkup{hlidxpage{\@idxpagemarkup}}% + \definepageanchor{\noexpand\folio}% + \else + \global\advance\hlidxlabelnumber by 1 + \edef\@idxpagemarkup{hlidx{\hlidxlabel}{\@idxpagemarkup}}% + \hldest@impl{idx}{\hlidxlabel}% + \fi + \fi + \fi + \@afteridxgetrange +}% +\def\@idxcheckpagemarkup#1=#2,{% + \def\temp{#1}% + \ifx\temp\idxpagemarkupcmdword + \if ,#2, % If #2 is empty, complain. + \errmessage{Missing markup command to `pagemarkup'}% + \else + \def\temp##1={##1}% + \edef\@idxpagemarkup{\temp\string#2}% + \fi + \fi +}% +\def\hldest@place@idx{-1}% +\begingroup + \catcode`\_ = 8 + \gdef\idxpageanchor#1{#1_p}% +\endgroup +\def\definepageanchor#1{% + \readauxfile + \edef\@wr{\noexpand\writeaux{\string\@definepageanchor{#1}}}% + \@wr + \ignorespaces +}% +\def\@definepageanchor#1{% + \expandafter\gdef\csname\idxpageanchor{#1}\endcsname{}% +}% +\newcount\hlidxlabelnumber +\def\hlidxlabel{IDX\the\hlidxlabelnumber}% +\def\hlidxpagelabel#1{IDXPG#1}% +\def\hlidx#1#2#3{% + \ifempty{#2}% + \let\@idxpageencap\relax + \else + \expandafter\let\expandafter\@idxpageencap\csname #2\endcsname + \fi + \hlstart@impl{idx}{#1}% + \@idxpageencap{#3}% + \hlend@impl{idx}% +}% +\def\hlidxpage#1#2{% + \@hlidxgetpages{#2}% + \ifempty{#1}% + \let\@idxpageencap\relax + \else + \expandafter\let\expandafter\@idxpageencap\csname #1\endcsname + \fi + \hlstart@impl{idx}{\hlidxpagelabel{\@idxpageiref}}% + \expandafter\@idxpageencap\expandafter{\@idxpagei}% + \hlend@impl{idx}% + \ifx\@idxpageii\empty \else + \@idxpagesep + \hlstart@impl{idx}{\hlidxpagelabel{\@idxpageiiref}}% + \expandafter\@idxpageencap\expandafter{\@idxpageii}% + \hlend@impl{idx}% + \fi +}% +\def\@hlidxgetpages#1{% + \idxparselist{#1}% + \ifx\idxpagei\empty + \idxparserange{#1}% + \ifx\idxpagei\empty + \def\@idxpageiref{#1}% Label for \hlstart. + \else + \let\@idxpageiref\idxpagei % Label for \hlstart. + \fi + \def\@idxpagei{#1}% + \let\@idxpageii\empty + \else + \let\@idxpagei\idxpagei + \let\@idxpageii\idxpageii + \let\@idxpageiref\idxpagei % Label for \hlstart. + \let\@idxpageiiref\idxpageii % Label for \hlstart. + \let\@idxpagesep\idxpagelistdelimiter + \fi +}% +\def\setidxpagelistdelimiter#1{% + \gdef\idxpagelistdelimiter{#1}% + \gdef\@removepagelistdelimiter##1#1{##1}% + \gdef\@idxparselist##1#1##2\@@{% + \ifempty{##2}% + \let\idxpagei\empty + \else + \def\idxpagei{##1}% + \edef\idxpageii{\@removepagelistdelimiter##2}% + \fi + }% + \gdef\idxparselist##1{\@idxparselist##1#1\@@}% +}% +\def\setidxpagerangedelimiter#1{% + \gdef\idxpagerangedelimiter{#1}% + \gdef\@removepagerangedelimiter##1#1{##1}% + \gdef\@idxparserange##1#1##2\@@{% + \ifempty{##2}% + \let\idxpagei\empty + \else + \def\idxpagei{##1}% + \edef\idxpageii{\@removepagerangedelimiter##2}% + \fi + }% + \gdef\idxparserange##1{\@idxparserange##1#1\@@}% +}% +\setidxpagelistdelimiter{, }% +\setidxpagerangedelimiter{--}% +\def\idxsubentryseparator{!}% +\def\idxencapoperator{|}% +\def\idxmaxpagenum{99999}% +\newtoks\@idxmaintoks +\newtoks\@idxsubtoks +\def\@idxtokscollect{% + \edef\temp{\the\@idxsubtoks}% + \edef\@indexentry{% + \the\@idxmaintoks + \ifx\temp\empty\else \idxsubentryseparator\the\@idxsubtoks \fi + \@idxrangestr + }% + \if@idxsee + \@idxseefalse % Reset so the next term won't be a `see'. + \edef\temp{\noexpand\idx@getverbatimarg + {\noexpand\@finidxtokscollect{\idxmaxpagenum}}}% + \else + \def\temp{\@finfinidxtokscollect\folio}% + \fi + \temp +}% +\def\@finidxtokscollect#1#2{% + \def\@idxseenterm{#2}% + \@finfinidxtokscollect{#1}% +}% +\def\@finfinidxtokscollect#1{% + \ifx\@idxpagemarkup\relax \else + \toks@ = \expandafter{\@indexentry}% + \edef\@indexentry{% + \the\toks@ + \ifx\@idxrangestr\empty \idxencapoperator \fi + \@idxpagemarkup + }% + \let\@idxpagemarkup = \relax + \fi + \ifx\@idxseenterm\relax \else + \toks@ = \expandafter{\@indexentry}% + \edef\@indexentry{\the\toks@{\sanitize\@idxseenterm}}% + \let\@idxseenterm = \relax + \fi + \expandafter\@idxwrite\expandafter{\@indexentry}{#1}% +}% +\def\@idxcollect#1#2{% + \@idxmaintoks = {#1}% + \@idxsubtoks = {#2}% + \@idxtokscollect +}% +\def\idxargopen{`\{}% +\def\idxargclose{`\}}% +\def\idx@getverbatimarg#1{% + \def\idx@getverbatimarg@cmd{#1}% Save the command, allowing it to be + \begingroup + \uncatcodespecials + \catcode\idxargopen=1 + \catcode\idxargclose=2 + \catcode`\ =10 % Swallow multiple consequent spaces. + \catcode`\^^I=10 % Just in case, to avoid dependence on + \catcode`\^^M=5 % current meanings of tabs and newlines. + \idx@fingetverbatimarg +}% +\def\idx@fingetverbatimarg#1{\endgroup\idx@getverbatimarg@cmd{#1}}% +\def\idx@getverboptarg#1{% + \def\idx@optionaltemp{#1}% Save the command, allowing it to be more + \let\idx@optionalnext = \relax + \begingroup + \if@idxsee \catcode\idxargopen=1 \fi + \@futurenonspacelet\idx@optionalnext\idx@bracketcheck +}% +\def\idx@bracketcheck{% + \ifx [\idx@optionalnext + \endgroup % Cancel \catcode\idxargopen=1. + \expandafter\idx@finbracketcheck + \else + \endgroup % Cancel \catcode\idxargopen=1. + \let\@optionalarg = \empty + \expandafter\idx@optionaltemp + \fi +}% +\def\idx@finbracketcheck{% + \begingroup + \uncatcodespecials + \catcode`\ =10 % Swallow multiple consequent spaces. + \catcode`\^^I=10 % Just in case, to avoid dependence on + \catcode`\^^M=5 % current meanings of tabs and newlines. + \idx@@getoptionalarg +}% +\def\idx@@getoptionalarg[#1]{% + \endgroup + \def\@optionalarg{#1}% + \idx@optionaltemp +}% +{\catcode`\&=0 +\gdef\idx@scanterm#1{% + \edef\idx@scanterm@nl@catcode{\the\catcode`\^^M\relax}% + \catcode`\^^M=5 + \scantokens{#1&endinput}% + \catcode`\^^M=\idx@scanterm@nl@catcode +}}% +\def\@idx{\idx@getverbatimarg\@finidx}% +\def\@finidx#1{% + \idx@scanterm{#1}% Produce TERM as output. + \@idxcollect{#1}{}% +}% +\def\@sidx{\idx@getverbatimarg\@finsidx}% +\def\@finsidx#1{\@idxmaintoks = {#1}\idx@getverboptarg\@finfinsidx}% +\def\@finfinsidx{% + \@idxsubtoks = \expandafter{\@optionalarg}% + \@idxtokscollect +}% +\def\idxsortkeysep{@}% This `@' is catcode 11, but it doesn't matter. +\def\@idxconstructmarked#1#2#3{% + \toks@ = {#2}% The control sequence. + \toks2 = {#3}% The term. + \edef\temp{\the\toks2 \idxsortkeysep \the\toks@{\the\toks2}}% + #1 = \expandafter{\temp}% +}% +\def\@idxmarked#1{\idx@getverbatimarg{\@finidxmarked{#1}}}% +\def\@finidxmarked#1#2{% + \idx@scanterm{#1{#2}}% Produce \CS{TERM} as output. + \@idxconstructmarked\@idxmaintoks{#1}{#2}% + \@idxsubtoks = {}% + \@idxtokscollect +}% +\def\@sidxmarked#1{\idx@getverbatimarg{\@finsidxmarked{#1}}}% +\def\@finsidxmarked#1#2{% + \@idxconstructmarked\toks@{#1}{#2}% + \edef\temp{{\the\toks@}}% + \expandafter\@finsidx\temp +}% +\def\@idxsubmarked{% + \let\sidxsubmarked@print\idxsubmarked@print + \idx@getverbatimarg\@finsidxsubmarked +}% +\def\idxsubmarked@print{\expandafter\idx@scanterm\expandafter}% +\def\@sidxsubmarked{% + \let\sidxsubmarked@print\gobble + \idx@getverbatimarg\@finsidxsubmarked +}% +\def\@finsidxsubmarked#1{\@idxmaintoks = {#1}\@@finsidxsubmarked}% Reads TERM. +\def\@@finsidxsubmarked#1{\idx@getverbatimarg{\@@@finsidxsubmarked{#1}}}% Reads \CS. +\def\@@@finsidxsubmarked#1#2{% Reads {\CS}{SUBTERM}. + \sidxsubmarked@print % Prints for \@idxsubmarked, gobbles for \@sidxsubmarked. + {\the\@idxmaintoks\space #1{#2}}% Maybe produce `TERM \CS{SUBTERM}' as output. + \@idxconstructmarked\@idxsubtoks{#1}{#2}% + \@idxtokscollect +}% +\def\idxnameseparator{, }% as in `Tachikawa, Elizabeth' +\def\@idxcollectname#1#2{% + \def\temp{#1}% + \ifx\temp\empty + \toks@ = {}% + \else + \toks@ = \expandafter{\idxnameseparator #1}% + \fi + \toks2 = {#2}% + \edef\temp{\the\toks2 \the\toks@}% +}% +\def\@idxname{\idx@getverbatimarg\@finidxname}% +\def\@finidxname#1{\idx@getverbatimarg{\@finfinidxname{#1}}}% +\def\@finfinidxname#1#2{% + \idx@scanterm{#1 #2}% Separate the names by a space in the output. + \@idxcollectname{#1}{#2}% + \expandafter\@idxcollect\expandafter{\temp}{}% +}% +\def\@sidxname{\idx@getverbatimarg\@finsidxname}% +\def\@finsidxname#1{\idx@getverbatimarg{\@finfinsidxname{#1}}}% +\def\@finfinsidxname#1#2{% + \@idxcollectname{#1}{#2}% + \expandafter\@finsidx\expandafter{\temp}% +}% +\let\indexfonts = \relax +\def\readindexfile#1{% + \edef\@idxprefix{#1}% + \testfileexistence[\indexfilebasename]{\@idxprefix nd}% + \iffileexists \begingroup + \ifx\begin\undefined + \def\begin##1{\@beginindex}% + \let\end = \@gobble + \fi + \input \indexfilebasename.\@idxprefix nd + \singlecolumn + \endgroup + \else + \message{No index file \indexfilebasename.\@idxprefix nd.}% + \fi +}% +\def\@beginindex{% + \let\item = \@indexitem + \let\subitem = \@indexsubitem + \let\subsubitem = \@indexsubsubitem + \indexfonts + \doublecolumns + \parindent = 0pt + \hookrun{beginindex}% +}% +\let\indexspace = \bigbreak +\let\afterindexterm = \quad +\newskip\aboveindexitemskipamount \aboveindexitemskipamount = 0pt plus2pt +\def\aboveindexitemskip{\vskip\aboveindexitemskipamount}% +\def\@indexitem{\begingroup + \@indexitemsetup + \leftskip = 0pt + \aboveindexitemskip + \penalty-100 % Encourage page breaks before items. + \def\par{\endgraf\endgroup\nobreak}% +}% +\def\@indexsubitem{% + \@indexitemsetup + \leftskip = 1em +}% +\def\@indexsubsubitem{% + \@indexitemsetup + \leftskip = 2em +}% +\def\@indexitemsetup{% + \par + \hangindent = 1em + \raggedright + \hyphenpenalty = 10000 + \hookrun{indexitem}% +}% +\def\seevariant{\it}% +\def\indexseeword{see}% +\def\indexsee{\idx@getverbatimarg\@finindexsee}% +\def\@finindexsee#1#2{{\seevariant \indexseeword\/ }\idx@scanterm{#1}}% +\def\indexseealsowords{see also}% +\def\indexseealso{\idx@getverbatimarg\@finindexseealso}% +\def\@finindexseealso#1#2{{\seevariant \indexseealsowords\/ }\idx@scanterm{#1}}% +\defineindex{i}% +\begingroup + \catcode `\^^M = \active % + \gdef\flushleft{% + \def\@endjustifycmd{\@endflushleft}% + \def\@eoljustifyaction{\null\hfil\break}% + \let\@firstlinejustifyaction = \relax + \@startjustify % + }% + \gdef\flushright{% + \def\@endjustifycmd{\@endflushright}% + \def\@eoljustifyaction{\break\null\hfil}% + \def\@firstlinejustifyaction{\hfil\null}% + \@startjustify % + }% + \gdef\center{% + \def\@endjustifycmd{\@endcenter}% + \def\@eoljustifyaction{\hfil\break\null\hfil}% + \def\@firstlinejustifyaction{\hfil\null}% + \@startjustify % + }% + \gdef\@startjustify{% + \parskip = 0pt + \catcode`\^^M = \active % + \def^^M{\futurelet\next\@finjustifyreturn}% + \def\@eateol##1^^M{% + \def\temp{##1}% + \@firstlinejustifyaction % + \ifx\temp\empty\else \temp^^M\fi % + }% + \expandafter\aftergroup\@endjustifycmd % + \checkenv \environmenttrue % + \par\noindent % + \@eateol % + }% + \gdef\@finjustifyreturn{% + \@eoljustifyaction % + \ifx\next^^M% + \def\par{\endgraf\vskip\blanklineskipamount \global\let\par = \endgraf}% + \@endjustifycmd % + \noindent % + \@firstlinejustifyaction % + \fi % + }% +\endgroup +\def\@endflushleft{\unpenalty{\parfillskip = 0pt plus1fil\par}\ignorespaces}% +\def\@endflushright{% Remove the \hfil\null\break we just put on. + \unskip \setbox0=\lastbox \unpenalty + {\parfillskip = 0pt \par}\ignorespaces +}% +\def\@endcenter{% Remove the \hfil\null\break we just put on. + \unskip \setbox0=\lastbox \unpenalty + {\parfillskip = 0pt plus1fil \par}\ignorespaces +}% +\newcount\abovecolumnspenalty \abovecolumnspenalty = 10000 +\newcount\@linestogo % Lines remaining to process. +\newcount\@linestogoincolumn % Lines remaining in column. +\newcount\@columndepth % Number of lines in a column. +\newdimen\@columnwidth % Width of each column. +\newtoks\crtok \crtok = {\cr}% +\newcount\currentcolumn +\def\makecolumns#1/#2: {\par \begingroup + \@columndepth = #1 + \advance\@columndepth by -1 + \divide \@columndepth by #2 + \advance\@columndepth by 1 + \@linestogoincolumn = \@columndepth + \@linestogo = #1 + \currentcolumn = 1 + \def\@endcolumnactions{% + \ifnum \@linestogo<2 + \the\crtok \egroup \endgroup \par % End \valign and \makecolumns. + \else + \global\advance\@linestogo by -1 + \ifnum\@linestogoincolumn<2 + \global\advance\currentcolumn by 1 + \global\@linestogoincolumn = \@columndepth + \the\crtok + \else + &\global\advance\@linestogoincolumn by -1 + \fi + \fi + }% + \makeactive\^^M + \letreturn \@endcolumnactions + \@columnwidth = \hsize + \advance\@columnwidth by -\parindent + \divide\@columnwidth by #2 + \penalty\abovecolumnspenalty + \noindent % It's not a paragraph (usually). + \valign\bgroup + &\hbox to \@columnwidth{\strut \hsize = \@columnwidth ##\hfil}\cr +}% +\newcount\footnotenumber +\newcount\hlfootlabelnumber +\newdimen\footnotemarkseparation \footnotemarkseparation = .5em +\newskip\interfootnoteskip \interfootnoteskip = 0pt +\newtoks\everyfootnote +\newdimen\footnoterulewidth \footnoterulewidth = 2in +\newdimen\footnoteruleheight \footnoteruleheight = 0.4pt +\newdimen\belowfootnoterulespace \belowfootnoterulespace = 2.6pt +\let\@plainfootnote = \footnote +\let\@plainvfootnote = \vfootnote +\def\hlfootlabel{FOOT\the\hlfootlabelnumber}% +\def\hlfootbacklabel{FOOTB\the\hlfootlabelnumber}% +\def\@eplainfootnote#1{\let\@sf\empty % parameter #2 (the text) is read later + \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\/\fi + \global\advance\hlfootlabelnumber by 1 + \hlstart@impl{foot}{\hlfootlabel}% + \hldest@impl{footback}{\hlfootbacklabel}% + #1% + \hlend@impl{foot}% + \@sf\vfootnote{#1}% +}% +\let\footnote\@eplainfootnote +\def\vfootnote#1{\insert\footins\bgroup + \interlinepenalty\interfootnotelinepenalty + \splittopskip\ht\strutbox % top baseline for broken footnotes + \advance\splittopskip by \interfootnoteskip + \splitmaxdepth\dp\strutbox + \floatingpenalty\@MM + \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip + \everypar = {}% + \parskip = 0pt % because of the vskip + \ifnum\@numcolumns > 1 \hsize = \@normalhsize \fi + \the\everyfootnote + \vskip\interfootnoteskip + \indent\llap{% + \hlstart@impl{footback}{\hlfootbacklabel}% + \hldest@impl{foot}{\hlfootlabel}% + #1% + \hlend@impl{footback}% + \kern\footnotemarkseparation + }% + \footstrut\futurelet\next\fo@t +}% +\def\footnoterule{\dimen@ = \footnoteruleheight + \advance\dimen@ by \belowfootnoterulespace + \kern-\dimen@ + \hrule width\footnoterulewidth height\footnoteruleheight depth0pt + \kern\belowfootnoterulespace + \vskip-\interfootnoteskip +}% +\def\numberedfootnote{% + \global\advance\footnotenumber by 1 + \@eplainfootnote{$^{\number\footnotenumber}$}% +}% +\newdimen\paperheight +\ifnum\mag=1000 + \paperheight = 11in % No magnification (yet). +\else + \paperheight = 11truein % We already have a magnification. +\fi +\def\topmargin{\afterassignment\@finishtopmargin \dimen@}% +\def\@finishtopmargin{% + \dimen2 = \voffset % Remember the old \voffset. + \voffset = \dimen@ \advance\voffset by -1truein + \advance\dimen2 by -\voffset % Compute the change in \voffset. + \advance\vsize by \dimen2 % Change type area accordingly. +}% +\def\advancetopmargin{% + \dimen@ = 0pt \afterassignment\@finishadvancetopmargin \advance\dimen@ +}% +\def\@finishadvancetopmargin{% + \advance\voffset by \dimen@ + \advance\vsize by -\dimen@ +}% +\def\bottommargin{\afterassignment\@finishbottommargin \dimen@}% +\def\@finishbottommargin{% + \@computebottommargin % Result in \dimen2. + \advance\dimen2 by -\dimen@ % Compute the change in the bottom margin. + \advance\vsize by \dimen2 % Change the type area. +}% +\def\advancebottommargin{% + \dimen@ = 0pt \afterassignment\@finishadvancebottommargin \advance\dimen@ +}% +\def\@finishadvancebottommargin{% + \advance\vsize by -\dimen@ +}% +\def\@computebottommargin{% + \dimen2 = \paperheight % The total paper size. + \advance\dimen2 by -\vsize % Less the text size. + \advance\dimen2 by -\voffset % Less the offset at the top. + \advance\dimen2 by -1truein % Less the default offset. +}% +\newdimen\paperwidth +\ifnum\mag=1000 + \paperwidth = 8.5in % No magnification (yet). +\else + \paperwidth = 8.5truein % We already have a magnification. +\fi +\def\leftmargin{\afterassignment\@finishleftmargin \dimen@}% +\def\@finishleftmargin{% + \dimen2 = \hoffset % Remember the old \hoffset. + \hoffset = \dimen@ \advance\hoffset by -1truein + \advance\dimen2 by -\hoffset % Compute the change in \hoffset. + \advance\hsize by \dimen2 % Change type area accordingly. +}% +\def\advanceleftmargin{% + \dimen@ = 0pt \afterassignment\@finishadvanceleftmargin \advance\dimen@ +}% +\def\@finishadvanceleftmargin{% + \advance\hoffset by \dimen@ + \advance\hsize by -\dimen@ +}% +\def\rightmargin{\afterassignment\@finishrightmargin \dimen@}% +\def\@finishrightmargin{% + \@computerightmargin % Result in \dimen2. + \advance\dimen2 by -\dimen@ % Compute the change in the right margin. + \advance\hsize by \dimen2 % Change the type area. +}% +\def\advancerightmargin{% + \dimen@ = 0pt \afterassignment\@finishadvancerightmargin \advance\dimen@ +}% +\def\@finishadvancerightmargin{% + \advance\hsize by -\dimen@ +}% +\def\@computerightmargin{% + \dimen2 = \paperwidth % The total paper size. + \advance\dimen2 by -\hsize % Less the text size. + \advance\dimen2 by -\hoffset % Less the offset at the left. + \advance\dimen2 by -1truein % Less the default offset. +}% +\let\@plainm@g = \m@g +\def\m@g{\@plainm@g \paperwidth = 8.5 true in \paperheight = 11 true in}% +\newskip\abovecolumnskip \abovecolumnskip = \bigskipamount +\newskip\belowcolumnskip \belowcolumnskip = \bigskipamount +\newdimen\gutter \gutter = 2pc +\newbox\@partialpage +\newdimen\@normalhsize +\newdimen\@normalvsize % The original (before multi-columns) \vsize. +\newtoks\previousoutput +\def\quadcolumns{\@columns4}% +\def\triplecolumns{\@columns3}% +\def\doublecolumns{\@columns2}% +\def\begincolumns#1{\ifcase#1\relax \or \singlecolumn \or \@columns2 \or + \@columns3 \or \@columns4 \else \relax \fi}% +\def\endcolumns{\singlecolumn}% +\let\@ndcolumns = \relax +\chardef\@numcolumns = 1 +\mathchardef\@ejectpartialpenalty = 10141 +\chardef\@col@minlines = 3 +\chardef\@col@extralines = 3 +\newdimen\@col@extraheight +\def\@columns#1{% + \@ndcolumns + \global\let\@ndcolumns = \@endcolumns + \global\chardef\@numcolumns = #1 + \global\previousoutput = \expandafter{\the\output}% + \global\output = {% + \ifnum\outputpenalty = -\@ejectpartialpenalty + \dimen@ = \vsize + \advance\dimen@ by \@col@minlines\baselineskip + \global\setbox\@partialpage = + \vbox \ifdim \pagetotal > \vsize to \dimen@ \fi {% + \unvbox255 \unskip + }% + \else + \the\previousoutput + \fi + }% + \vskip \abovecolumnskip + \vskip \@col@minlines\baselineskip + \penalty -\@ejectpartialpenalty + \global\output = {\@columnoutput}% + \global\@normalhsize = \hsize + \global\@normalvsize = \vsize + \count@ = \@numcolumns + \advance\count@ by -1 + \global\advance\hsize by -\count@\gutter + \global\divide\hsize by \@numcolumns + \advance\vsize by -\ht\@partialpage + \advance\vsize by -\ht\footins + \ifvoid\footins\else \advance\vsize by -\skip\footins \fi + \multiply\count\footins by \@numcolumns + \advance\vsize by -\ht\topins + \ifvoid\topins\else \advance\vsize by -\skip\topins \fi + \multiply\count\topins by \@numcolumns + \global\vsize = \@numcolumns\vsize + \@col@extraheight=\@col@extralines\baselineskip + \multiply\@col@extraheight by \@numcolumns + \global\advance\vsize by \@col@extraheight +}% +\def\gutterbox{\vbox to \dimen0{\vfil\hbox{\hfil}\vfil}}% +\def\@columnsplit{% + \splittopskip = \topskip + \splitmaxdepth = \baselineskip + \begingroup + \vbadness = 10000 + \global\setbox1 = \vsplit255 to \dimen@ \global\wd1 = \hsize + \global\setbox3 = \vsplit255 to \dimen@ \global\wd3 = \hsize + \ifnum\@numcolumns > 2 + \global\setbox5 = \vsplit255 to \dimen@ \global\wd5 = \hsize + \fi + \ifnum\@numcolumns > 3 + \global\setbox7 = \vsplit255 to \dimen@ \global\wd7 = \hsize + \fi + \endgroup + \setbox0 = \box255 + \global\setbox255 = \vbox{% + \unvbox\@partialpage + \ifcase\@numcolumns \relax\or\relax + \or \hbox to \@normalhsize{\box1\hfil\gutterbox\hfil\box3}% + \or \hbox to \@normalhsize{\box1\hfil\gutterbox\hfil\box3% + \hfil\gutterbox\hfil\box5}% + \or \hbox to \@normalhsize{\box1\hfil\gutterbox\hfil\box3% + \hfil\gutterbox\hfil\box5% + \hfil\gutterbox\hfil\box7}% + \fi + }% + \setbox\@partialpage = \box0 +}% +\def\@columnoutput{% + \dimen@ = \ht255 + \advance\dimen@ by -\@col@extraheight + \divide\dimen@ by \@numcolumns + \@columnsplit + \@recoverclubpenalty + \hsize = \@normalhsize % Local to \output's group. + \vsize = \@normalvsize + \the\previousoutput + \unvbox\@partialpage + \penalty\outputpenalty + \global\vsize = \@numcolumns\@normalvsize + \global\advance\vsize by \@col@extraheight +}% +\def\singlecolumn{% + \@ndcolumns + \chardef\@numcolumns = 1 + \vskip\belowcolumnskip + \nointerlineskip +}% +\newbox\@singlecolumnbox +\newdimen\column@pagegoal +\newdimen\column@vsize +\def\@endcolumns{% + \global\let\@ndcolumns = \relax + \par % Shouldn't start in horizontal mode. + \column@pagegoal = \pagegoal + \advance\column@pagegoal by-\@col@extraheight + \ifdim \pagetotal > \column@pagegoal + \column@vsize = \column@pagegoal + \else + \column@vsize = \pagetotal + \fi + \global\output = {\global\setbox1 = \box255}% + \pagegoal = \pagetotal + \break % Exercise the page builder, i.e., \output. + \setbox2 = \box1 % Save material in box2 in case of overflow. + \global\output = \expandafter{\the\previousoutput}% + \setbox\@singlecolumnbox = \box\@partialpage + \@balancecolumns +}% +\def\@balancecolumns{% + \global\setbox255 = \copy2 % Retrieve what the fake \output set. + \dimen@ = \column@vsize + \divide\dimen@ by \@numcolumns + \@columnsplit + \ifvoid\@partialpage + \global\vsize = \@normalvsize + \global\hsize = \@normalhsize + \dump@balanced@columns + \let\next\relax + \else + \advance \column@vsize by \@numcolumns pt + \test@spill@columns + \ifspill@columns + \begingroup + \vsize = \@normalvsize + \hsize = \@normalhsize + \dump@balanced@columns + \break + \@recoverclubpenalty + \endgroup + \unvbox\@partialpage + \let\next\@endcolumns + \else + \setbox0=\box\@partialpage % Merely to void \@partialpage. + \let\next\@balancecolumns + \fi + \fi + \next +}% +\def\dump@balanced@columns{% + \ifvoid\topins\else\topinsert\unvbox\topins\endinsert\fi + \unvbox\@singlecolumnbox + \nointerlineskip + \box255 +}% +\newif\ifspill@columns +\def\test@spill@columns{% + \spill@columnsfalse + \ifdim \column@vsize > \column@pagegoal + \ifvoid\footins + \ifvoid\topins + \spill@columnstrue + \fi + \fi + \fi +}% +\def\@saveclubpenalty{% save the current value of \clubpenalty + \edef\@recoverclubpenalty{% + \global\clubpenalty=\the\clubpenalty\relax% + \global\let\noexpand\@recoverclubpenalty\relax + }% the \noexpand handles infinite self-reference +}% +\let\@recoverclubpenalty\relax +\newdimen\temp@dimen +\def\columnfill{% + \par + \dimen@ = \pagetotal % The height of the text so far. + \temp@dimen = \vsize % = \@numcolumns * columnheight + \advance\temp@dimen by -\@col@extraheight + \divide\temp@dimen by \@numcolumns % Compute column height + \loop + \ifdim \dimen@ > \temp@dimen % more material than a column? + \advance \dimen@ by -\temp@dimen + \advance \dimen@ by \topskip % fudge factor + \repeat + \advance \temp@dimen by -\dimen@ + \advance \temp@dimen by -\prevdepth + \@saveclubpenalty + \clubpenalty=10000\relax + \hrule height\temp@dimen width0pt depth0pt\relax % fill space with rule + \nointerlineskip + \par + \nointerlineskip + \allowbreak \vfil % To allow a page break here. + \relax +}% +\def\@hldest{% + \def\hl@prefix{hldest}% + \let\after@hl@getparam\hldest@aftergetparam + \begingroup + \hl@getparam +}% +\def\hldest@aftergetparam{% + \ifvmode + \hldest@driver + \else + \allowhyphens + \smash{\ifx\hldest@opt@raise\empty \else \raise\hldest@opt@raise\fi + \hbox{\hldest@driver}}% + \allowhyphens + \fi + \endgroup +}% +\def\@hlstart{% + \leavevmode + \def\hl@prefix{hl}% + \let\after@hl@getparam\hlstart@aftergetparam + \begingroup + \hl@getparam +}% +\def\hlstart@aftergetparam{% + \ifx\color\undefined \else + \ifx\hl@opt@color\empty \else + \ifx\hl@opt@colormodel\empty + \edef\temp{\noexpand\color{\hl@opt@color}}% + \else + \edef\temp{\noexpand\color[\hl@opt@colormodel]{\hl@opt@color}}% + \fi + \temp + \fi + \fi + \hl@driver +}% +\def\hl@getparam#1#2{% We'll read #3 (LABEL) later. + \edef\@hltype{#1}% + \ifx\@hltype\empty + \expandafter\let\expandafter\@hltype + \csname \hl@prefix @type\endcsname + \fi + \expandafter\ifx\csname \hl@prefix @typeh@\@hltype\endcsname \relax + \errmessage{Invalid hyperlink type `\@hltype'}% + \fi + \For\hl@arg:=#2\do{% + \ifx\hl@arg\empty \else + \expandafter\hl@set@opt\hl@arg=,% + \fi + }% + \bgroup + \uncatcodespecials + \catcode`\{=1 \catcode`\}=2 + \@hl@getparam +}% +\def\@hl@getparam#1{% + \egroup + \edef\@hllabel{#1}% + \after@hl@getparam + \ignorespaces +}% +\def\hl@set@opt#1=#2,{% + \expandafter\ifx\csname \hl@prefix @opt@#1\endcsname \relax + \errmessage{Invalid hyperlink option `#1'}% + \fi + \if ,#2, % if #2 is empty, complain. + \errmessage{Missing value for option `#1'}% + \else + \def\temp##1={##1}% + \expandafter\edef\csname \hl@prefix @opt@#1\endcsname{\temp#2}% + \fi +}% +\def\hldest@impl#1{% + \expandafter\ifcase\csname hldest@on@#1\endcsname + \relax\expandafter\gobble + \else + \toks@=\expandafter{\csname hldest@type@#1\endcsname}% + \toks@ii=\expandafter{\csname hldest@opts@#1\endcsname}% + \edef\temp{\noexpand\hldest{\the\toks@}{\the\toks@ii}}% + \expandafter\temp + \fi +}% +\def\hlstart@impl#1{% + \expandafter\ifcase\csname hl@on@#1\endcsname + \leavevmode\expandafter\gobble + \else + \toks@=\expandafter{\csname hl@type@#1\endcsname}% + \toks@ii=\expandafter{\csname hl@opts@#1\endcsname}% + \edef\temp{\noexpand\hlstart{\the\toks@}{\the\toks@ii}}% + \expandafter\temp + \fi +}% +\def\hlend@impl#1{% + \expandafter\ifcase\csname hl@on@#1\endcsname + \else + \hlend + \fi +}% +\def\hl@asterisk@word{*}% +\def\hl@opts@word{opts}% +\newif\if@params@override +\def\hldest@groups{definexref,xrdef,li,eq,bib,foot,footback,idx}% +\def\hl@groups{ref,xref,eq,cite,foot,footback,idx,url,hrefint,hrefext}% +\def\hldesttype{% + \def\hl@prefix{hldest}% + \def\hl@param{type}% + \let\hl@all@groups\hldest@groups + \futurelet\hl@excl\hl@param@read@excl +}% +\def\hldestopts{% + \def\hl@prefix{hldest}% + \def\hl@param{opts}% + \let\hl@all@groups\hldest@groups + \futurelet\hl@excl\hl@param@read@excl +}% +\def\hltype{% + \def\hl@prefix{hl}% + \def\hl@param{type}% + \let\hl@all@groups\hl@groups + \futurelet\hl@excl\hl@param@read@excl +}% +\def\hlopts{% + \def\hl@prefix{hl}% + \def\hl@param{opts}% + \let\hl@all@groups\hl@groups + \futurelet\hl@excl\hl@param@read@excl +}% +\def\hl@param@read@excl{% + \ifx!\hl@excl + \let\next\hl@param@read@opt@arg + \@params@overridetrue + \else + \def\next{\hl@param@read@opt@arg{!}}% + \@params@overridefalse + \fi + \next +}% +\def\hl@param@read@opt@arg#1{% #1 is the `!', ignore it. + \@getoptionalarg\hl@setparam +}% +\def\@hl@setparam#1{% + \ifx\@optionalarg\empty + \hl@setparam@default{#1}% Set default. + \else + \let\hl@do@all@groups\gobble + \For\hl@group:=\@optionalarg\do{% + \ifx\hl@group\hl@asterisk@word + \def\hl@do@all@groups{\let\@optionalarg\hl@all@groups \hl@setparam}% + \else + \hl@setparam@group{#1}% + \fi + }% + \hl@do@all@groups{#1}% + \fi +}% +\def\hl@setparam@group#1{% + \ifx\hl@group\empty + \hl@setparam@default{#1}% + \else + \expandafter\ifx\csname\hl@prefix @\hl@param @\hl@group\endcsname\relax + \errmessage{Hyperlink group `\hl@prefix:\hl@param:\hl@group' is not defined}% + \fi + \ifx\hl@param\hl@opts@word + \if@params@override + \expandafter\let\csname\hl@prefix @\hl@param @\hl@group\endcsname\empty + \fi + \hl@update@opts@with@list{#1}% #1 will be used in the \for + \else + \ece\def{\hl@prefix @\hl@param @\hl@group}{#1}% + \fi + \fi +}% +\def\hl@setparam@default#1{% + \ifx\hl@param\hl@opts@word + \For\hl@opt:=#1\do{% + \ifx\hl@opt\empty \else + \expandafter\hl@set@opt\hl@opt=,% + \fi + }% + \else + \expandafter\ifx\csname\hl@prefix @\hl@param\endcsname\relax + \message{Default hyperlink parameter `\hl@prefix:\hl@param' is not defined}% + \fi + \ece\def{\hl@prefix @\hl@param}{#1}% + \fi +}% +\def\hl@update@opts@with@list#1{% + \global\expandafter\let\expandafter\hl@update@new@list + \csname \hl@prefix @opts@\hl@group\endcsname + \begingroup + \For\hl@opt:=#1\do{% + \hl@update@opts@with@opt + }% + \endgroup + \ece\let{\hl@prefix @opts@\hl@group}\hl@update@new@list +}% +\def\hl@update@opts@with@opt{% + \global\let\hl@update@old@list\hl@update@new@list + \global\let\hl@update@new@list\empty + \global\let\hl@update@new@opt\hl@opt + \expandafter\hl@parse@opt@key\hl@opt=,% + \let\hl@update@new@key\hl@update@key + \global\let\hl@update@comma\empty + \begingroup + \for\hl@opt:=\hl@update@old@list\do{% + \ifx\hl@opt\empty \else % Skip empty `options'. + \expandafter\hl@parse@opt@key\hl@opt=,% + \toks@=\expandafter{\hl@update@new@list}% + \ifx\hl@update@key\hl@update@new@key + \ifx\hl@update@new@opt\empty \else % Skip multiple options. + \toks@ii=\expandafter{\hl@update@new@opt}% + \xdef\hl@update@new@list{\the\toks@\hl@update@comma\the\toks@ii}% + \global\let\hl@update@new@opt\empty + \global\def\hl@update@comma{,}% + \fi + \else + \toks@ii=\expandafter{\hl@opt}% + \xdef\hl@update@new@list{\the\toks@\hl@update@comma\the\toks@ii}% + \global\def\hl@update@comma{,}% + \fi + \fi + }% + \endgroup + \ifx\hl@update@new@opt\empty \else + \toks@=\expandafter{\hl@update@new@list}% + \toks@ii=\expandafter{\hl@update@new@opt}% + \xdef\hl@update@new@list{\the\toks@\hl@update@comma\the\toks@ii}% + \fi +}% +\def\hl@parse@opt@key#1=#2,{\def\hl@update@key{#1}}% +\def\hldest@opt@raise{\normalbaselineskip}% +\def\hl@opt@colormodel{cmyk}% +\def\hl@opt@color{0.28,1,1,0.35}% +\def\hldest@on@definexref{0}% +\def\hldest@on@xrdef{0}% +\def\hldest@on@li{0}% +\def\hldest@on@eq{0}% \eqdef and friends +\def\hldest@on@bib{0}% \biblabelprint (BibTeX) +\def\hldest@on@foot{0}% \footnote / \numberedfootnote +\def\hldest@on@footback{0}% back-ref for \footnote / \numberedfootnote +\def\hldest@on@idx{0}% both `page' dests and `exact' dests +\let\hldest@type@definexref\empty +\let\hldest@type@xrdef\empty +\let\hldest@type@li\empty +\let\hldest@type@eq\empty % \eqdef and friends +\let\hldest@type@bib\empty % \biblabelprint (BibTeX) +\let\hldest@type@foot\empty % \footnote / \numberedfootnote +\let\hldest@type@footback\empty % back-ref for \footnote / \numberedfootnote +\let\hldest@type@idx\empty % both `page' dests and `exact' dests +\let\hldest@opts@definexref\empty +\let\hldest@opts@xrdef\empty +\let\hldest@opts@li\empty +\def\hldest@opts@eq{raise=1.7\normalbaselineskip}% \eqdef and friends +\let\hldest@opts@bib\empty % \biblabelprint (BibTeX) +\let\hldest@opts@foot\empty % \footnote / \numberedfootnote +\let\hldest@opts@footback\empty % back-ref for \footnote / \numberedfootnote +\let\hldest@opts@idx\empty % both `page' dests and `exact' dests +\def\hl@on@ref{0}% \refn and \xrefn, \ref, \refs +\def\hl@on@xref{0}% +\def\hl@on@eq{0}% \eqref and \eqrefn +\def\hl@on@cite{0}% \cite (BibTeX) +\def\hl@on@foot{0}% \footnote / \numberedfootnote +\def\hl@on@footback{0}% back-reference for \footnote / \numberedfootnote +\def\hl@on@idx{0}% +\def\hl@on@url{0}% \url from url.sty +\def\hl@on@hrefint{0}% \href with internal #labels +\def\hl@on@hrefext{0}% \href with external labels (URLs) +\let\hl@type@ref\empty % \refn and \xrefn, \ref, \refs +\let\hl@type@xref\empty +\let\hl@type@eq\empty % \eqref and \eqrefn +\let\hl@type@cite\empty % \cite (BibTeX) +\let\hl@type@foot\empty % \footnote / \numberedfootnote +\let\hl@type@footback\empty % back-reference for \footnote / \numberedfootnote +\let\hl@type@idx\empty +\let\hl@type@url\empty % \url from url.sty (this will be set to `url' by +\let\hl@type@hrefint\empty % \href with internal #labels +\let\hl@type@hrefext\empty % \href with external labels (URLs) (this +\let\hl@opts@ref\empty % \refn and \xrefn, \ref, \refs +\let\hl@opts@xref\empty +\let\hl@opts@eq\empty % \eqref and \eqrefn +\let\hl@opts@cite\empty % \cite (BibTeX) +\let\hl@opts@foot\empty % \footnote / \numberedfootnote +\let\hl@opts@footback\empty % back-reference for \footnote / \numberedfootnote +\let\hl@opts@idx\empty +\let\hl@opts@url\empty % \url from url.sty +\let\hl@opts@hrefint\empty % \href with internal #labels +\let\hl@opts@hrefext\empty % \href with external labels (URLs) +\def\@hlon{\@hlonoff@value@stub{hl}\@@hlon1 }% +\def\@hloff{\@hlonoff@value@stub{hl}\@@hloff0 }% +\def\@hldeston{\@hlonoff@value@stub{hldest}\@@hldeston1 }% +\def\@hldestoff{\@hlonoff@value@stub{hldest}\@@hldestoff0 }% +\def\@hlonoff@value@stub#1#2#3{% + \def\hl@prefix{#1}% + \let\hl@on@empty#2% + \def\hl@value{#3}% + \expandafter\let\expandafter\hl@all@groups + \csname \hl@prefix @groups\endcsname + \@getoptionalarg\@finhlswitch +}% +\def\@finhlswitch{% + \ifx\@optionalarg\empty + \hl@on@empty + \fi + \let\hl@do@all@groups\relax + \For\hl@group:=\@optionalarg\do{% + \ifx\hl@group\hl@asterisk@word + \let\@optionalarg\hl@all@groups + \let\hl@do@all@groups\@finhlswitch + \else + \ifx\hl@group\empty + \hl@on@empty + \else + \expandafter\ifx\csname\hl@prefix @on@\hl@group\endcsname \relax + \errmessage{Hyperlink group `\hl@prefix:on:\hl@group' + is not defined}% + \fi + \ece\edef{\hl@prefix @on@\hl@group}{\hl@value}% + \fi + \fi + }% + \hl@do@all@groups +}% +\def\@@hlon{% + \let\hlstart\@hlstart + \let\hlend\@hlend +}% +\def\@@hloff{% + \def\hlstart##1##2##3{\leavevmode\ignorespaces}% + \let\hlend\relax +}% +\def\@@hldeston{% + \let\hldest\@hldest +}% +\def\@@hldestoff{% + \def\hldest##1##2##3{\ignorespaces}% +}% +\def\hl@idxexact@word{idxexact}% +\def\hl@idxpage@word{idxpage}% +\def\hl@idxnone@word{idxnone}% +\def\hl@raw@word{raw}% +\def\enablehyperlinks{\@getoptionalarg\@finenablehyperlinks}% +\def\@finenablehyperlinks{% + \let\hl@selecteddriver\empty + \def\hldest@place@idx{0}% + \for\hl@arg:=\@optionalarg\do{% + \ifx\hl@arg\hl@idxexact@word + \def\hldest@place@idx{1}% + \else + \ifx\hl@arg\hl@idxnone@word + \def\hldest@place@idx{-1}% + \else + \ifx\hl@arg\hl@idxpage@word + \def\hldest@place@idx{0}% + \else + \let\hl@selecteddriver\hl@arg + \fi + \fi + \fi + }% + \ifx\hl@selecteddriver\empty + \ifpdf + \def\hl@selecteddriver{pdftex}% + \message{^^JEplain: using `pdftex' hyperlink driver.}% + \else + \def\hl@selecteddriver{hypertex}% + \message{^^JEplain: using `hypertex' hyperlink driver.}% + \fi + \else + \expandafter\ifx\csname hldriver@\hl@selecteddriver\endcsname \relax + \errmessage{No hyperlink driver `\hl@selecteddriver' available}% + \fi + \fi + \let\hl@setparam\@hl@setparam + \csname hldriver@\hl@selecteddriver\endcsname + \def\@finenablehyperlinks{\errmessage{Hyperlink driver `\hl@selecteddriver' + already selected}}% + \let\hldriver@nolinks\undefined + \let\hldriver@hypertex\undefined + \let\hldriver@pdftex \undefined + \let\hldriver@dvipdfm\undefined + \let\hloff\@hloff + \let\hlon\@hlon + \let\hldestoff\@hldestoff + \let\hldeston\@hldeston + \hlon[*,]\hloff[foot,footback]% + \hldeston[*,]\hldestoff[foot,footback]% +}% +\def\hldriver@nolinks{% + \def\@hldest##1##2##3{% + \edef\temp{\write-1{hldest: ##3}}% + \ifvmode + \temp + \else + \allowhyphens + \expandafter\smash\expandafter{\temp}% + \allowhyphens + \fi + \ignorespaces + }% + \def\@hlstart##1##2##3{% + \leavevmode + \begingroup % Start the color group. + \edef\temp{\write-1{hlstart: ##3}}% + \temp + \ignorespaces + }% + \def\@hlend{% + \edef\temp{\write-1{hlend}}% + \temp + \endgroup % End the color group from \@hlstart. + }% + \let\hl@setparam\gobble +}% +{\catcode`\#=\other +\gdef\hlhash{#}}% +\def\hldriver@hypertex{% + \def\hldest@type{xyz}% + \let\hldest@opt@cmd \empty + \def\hldest@driver{% + \ifx\@hltype\hl@raw@word + \csname \hldest@opt@cmd \endcsname + \else + \special{html:<a name="\@hllabel">}\special{html:</a>}% + \fi + }% + \let\hldest@typeh@raw \empty + \let\hldest@typeh@xyz \empty + \def\hl@type{name}% + \ifx\hl@type@url\empty + \def\hl@type@url{url}% + \fi + \ifx\hl@type@hrefext\empty + \def\hl@type@hrefext{url}% + \fi + \let\hl@opt@cmd \empty + \let\hl@opt@ext \empty + \let\hl@opt@file \empty + \def\hl@driver{% + \ifx\@hltype\hl@raw@word + \csname \hl@opt@cmd \endcsname + \else + \def\hlstart@preamble{html:<a href="}% + \csname hl@typeh@\@hltype\endcsname + \fi + }% + \let\hl@typeh@raw \empty + \def\hl@typeh@name{\special{\hlstart@preamble \hlhash\@hllabel">}}% + \def\hl@typeh@filename{% + \special{% + \hlstart@preamble + file:\hl@opt@file\hl@opt@ext + \ifempty\@hllabel \else \hlhash\@hllabel\fi + ">% + }% + }% + \def\hl@typeh@url{% + \special{% + \hlstart@preamble + \@hllabel + ">% + }% + }% + \def\@hlend{\special{html:</a>}\endgroup}% End the group from \@hlstart. +}% +\def\hldriver@pdftex{% +\ifpdf % PDF output is enabled. + \def\hldest@type{xyz}% + \let\hldest@opt@width \empty + \let\hldest@opt@height \empty + \let\hldest@opt@depth \empty + \let\hldest@opt@zoom \empty + \let\hldest@opt@cmd \empty + \def\hldest@driver{% + \ifx\@hltype\hl@raw@word + \csname \hldest@opt@cmd \endcsname + \else + \pdfdest name{\@hllabel}\@hltype + \csname hldest@typeh@\@hltype\endcsname + \fi + }% + \let\hldest@typeh@raw \empty + \let\hldest@typeh@fit \empty + \let\hldest@typeh@fith \empty + \let\hldest@typeh@fitv \empty + \let\hldest@typeh@fitb \empty + \let\hldest@typeh@fitbh \empty + \let\hldest@typeh@fitbv \empty + \def\hldest@typeh@fitr{% + \ifx\hldest@opt@width \empty \else width \hldest@opt@width \fi + \ifx\hldest@opt@height \empty \else height \hldest@opt@height \fi + \ifx\hldest@opt@depth \empty \else depth \hldest@opt@depth \fi + }% + \def\hldest@typeh@xyz{% + \ifx\hldest@opt@zoom\empty \else zoom \hldest@opt@zoom \fi + }% + \def\hl@type{name}% + \ifx\hl@type@url\empty + \def\hl@type@url{url}% + \fi + \ifx\hl@type@hrefext\empty + \def\hl@type@hrefext{url}% + \fi + \let\hl@opt@width \empty + \let\hl@opt@height \empty + \let\hl@opt@depth \empty + \def\hl@opt@bstyle {S}% + \def\hl@opt@bwidth {1}% + \let\hl@opt@bcolor \empty + \let\hl@opt@hlight \empty + \let\hl@opt@bdash \empty + \let\hl@opt@pagefit \empty + \let\hl@opt@cmd \empty + \let\hl@opt@file \empty + \let\hl@opt@newwin \empty + \def\hl@driver{% + \ifx\@hltype\hl@raw@word + \csname \hl@opt@cmd \endcsname + \else + \let\hl@BSspec\relax % construct + \ifx\hl@opt@bstyle \empty + \ifx\hl@opt@bwidth \empty + \ifx\hl@opt@bdash \empty + \let\hl@BSspec\empty % don't construct + \fi + \fi + \fi + \def\hlstart@preamble{% + \pdfstartlink + \ifx\hl@opt@width \empty \else width \hl@opt@width \fi + \ifx\hl@opt@height \empty \else height \hl@opt@height \fi + \ifx\hl@opt@depth \empty \else depth \hl@opt@depth \fi + attr{% + \ifx\hl@opt@bcolor\empty\else /C[\hl@opt@bcolor]\fi + \ifx\hl@opt@hlight\empty\else /H/\hl@opt@hlight\fi + \ifx\hl@BSspec\relax + /BS<<% + /Type/Border% + \ifx\hl@opt@bstyle\empty\else /S/\hl@opt@bstyle\fi + \ifx\hl@opt@bwidth\empty\else /W \hl@opt@bwidth\fi + \ifx\hl@opt@bdash\empty \else /D[\hl@opt@bdash]\fi + >>% + \fi + }% + }% + \csname hl@typeh@\@hltype\endcsname + \fi + }% + \let\hl@typeh@raw\empty + \def\hl@typeh@name{\hlstart@preamble goto name{\@hllabel}}% + \def\hl@typeh@num{\hlstart@preamble goto num \@hllabel}% + \def\hl@typeh@page{% + \count@=\@hllabel + \advance\count@ by-1 + \hlstart@preamble + user{% + /Subtype/Link% + /Dest% + [\the\count@ + \ifx\hl@opt@pagefit\empty/Fit\else\hl@opt@pagefit\fi]% + }% + }% + \def\hl@typeh@filename{\hl@file{(\@hllabel)}}% + \def\hl@typeh@filepage{% + \count@=\@hllabel + \advance\count@ by-1 + \hl@file{% + [\the\count@ \ifx\hl@opt@pagefit\empty/Fit\else\hl@opt@pagefit\fi]% + }% + }% + \def\hl@file##1{% + \hlstart@preamble + user{% + /Subtype/Link% + /A<<% + /Type/Action% + /S/GoToR% + /D##1% + /F(\hl@opt@file)% + \ifx\hl@opt@newwin\empty \else + /NewWindow \ifcase\hl@opt@newwin false\else true\fi + \fi + >>% + }% + }% + \def\hl@typeh@url{% + \hlstart@preamble + user{% + /Subtype/Link% + /A<<% + /Type/Action% + /S/URI% + /URI(\@hllabel)% + >>% + }% + }% + \def\@hlend{\pdfendlink\endgroup}% End the group from the \@hlstart. +\else % PDF output is not enabled. + \message{Eplain warning: `pdftex' hyperlink driver: PDF output is^^J + \space not enabled, falling back on `nolinks' driver.}% + \hldriver@nolinks +\fi +}% +\def\hldriver@dvipdfm{% + \def\hldest@type{xyz}% + \let\hldest@opt@left \empty + \let\hldest@opt@top \empty + \let\hldest@opt@right \empty + \let\hldest@opt@bottom \empty + \let\hldest@opt@zoom \empty + \let\hldest@opt@cmd \empty + \def\hldest@driver{% + \ifx\@hltype\hl@raw@word + \csname \hldest@opt@cmd \endcsname + \else + \def\hldest@preamble{% + pdf: dest (\@hllabel) [@thispage + }% + \csname hldest@typeh@\@hltype\endcsname + \fi + }% + \let\hldest@typeh@raw\empty + \def\hldest@typeh@fit{% + \special{\hldest@preamble /Fit]}% + }% + \def\hldest@typeh@fith{% + \special{\hldest@preamble /FitH + \ifx\hldest@opt@top\empty @ypos \else \hldest@opt@top \fi]}% + }% + \def\hldest@typeh@fitv{% + \special{\hldest@preamble /FitV + \ifx\hldest@opt@left\empty @xpos \else \hldest@opt@left \fi]}% + }% + \def\hldest@typeh@fitb{% + \special{\hldest@preamble /FitB]}% + }% + \def\hldest@typeh@fitbh{% + \special{\hldest@preamble /FitBH + \ifx\hldest@opt@top\empty @ypos \else \hldest@opt@top \fi]}% + }% + \def\hldest@typeh@fitbv{% + \special{\hldest@preamble /FitBV + \ifx\hldest@opt@left\empty @xpos \else \hldest@opt@left \fi]}% + }% + \def\hldest@typeh@fitr{% + \special{\hldest@preamble /FitR + \ifx\hldest@opt@left\empty @xpos\else\hldest@opt@left\fi\space + \ifx\hldest@opt@bottom\empty @ypos\else\hldest@opt@bottom\fi\space + \ifx\hldest@opt@right\empty @xpos\else\hldest@opt@right\fi\space + \ifx\hldest@opt@top\empty @ypos\else\hldest@opt@top \fi]}% + }% + \def\hldest@typeh@xyz{% + \begingroup + \ifx\hldest@opt@zoom\empty + \count1=\z@ \count2=\z@ + \else + \count2=\hldest@opt@zoom + \count1=\count2 \divide\count1 by 1000 + \count3=\count1 \multiply\count3 by 1000 + \advance\count2 by -\count3 + \fi + \special{\hldest@preamble /XYZ + \ifx\hldest@opt@left\empty @xpos\else\hldest@opt@left\fi\space + \ifx\hldest@opt@top\empty @ypos\else\hldest@opt@top\fi\space + \the\count1.\the\count2]}% + \endgroup + }% + \def\hl@type{name}% + \ifx\hl@type@url\empty + \def\hl@type@url{url}% + \fi + \ifx\hl@type@hrefext\empty + \def\hl@type@hrefext{url}% + \fi + \def\hl@opt@bstyle {S}% + \def\hl@opt@bwidth {1}% + \let\hl@opt@bcolor \empty + \let\hl@opt@hlight \empty + \let\hl@opt@bdash \empty + \let\hl@opt@pagefit \empty + \let\hl@opt@cmd \empty + \let\hl@opt@file \empty + \let\hl@opt@newwin \empty + \def\hl@driver{% + \ifx\@hltype\hl@raw@word + \csname \hl@opt@cmd \endcsname + \else + \let\hl@BSspec\relax % construct + \ifx\hl@opt@bstyle \empty + \ifx\hl@opt@bwidth \empty + \ifx\hl@opt@bdash \empty + \let\hl@BSspec\empty % don't construct + \fi + \fi + \fi + \def\hlstart@preamble{% + pdf: beginann + <<% + /Type/Annot% + /Subtype/Link% + \ifx\hl@opt@bcolor\empty\else /C[\hl@opt@bcolor]\fi + \ifx\hl@opt@hlight\empty\else /H/\hl@opt@hlight\fi + \ifx\hl@BSspec\relax + /BS<<% + /Type/Border% + \ifx\hl@opt@bstyle\empty\else /S/\hl@opt@bstyle\fi + \ifx\hl@opt@bwidth\empty\else /W \hl@opt@bwidth\fi + \ifx\hl@opt@bdash\empty \else /D[\hl@opt@bdash]\fi + >>% + \fi + }% + \csname hl@typeh@\@hltype\endcsname + \fi + }% + \let\hl@typeh@raw\empty + \def\hl@typeh@name{\special{\hlstart@preamble /Dest(\@hllabel)>>}}% + \def\hl@typeh@page{% + \count@=\@hllabel + \advance\count@ by-1 + \special{% + \hlstart@preamble + /Dest[\the\count@ + \ifx\hl@opt@pagefit\empty/Fit\else\hl@opt@pagefit\fi]% + >>% + }% + }% + \def\hl@typeh@filename{\hl@file{(\@hllabel)}}% + \def\hl@typeh@filepage{% + \count@=\@hllabel + \advance\count@ by-1 + \hl@file{% + [\the\count@ \ifx\hl@opt@pagefit\empty/Fit\else\hl@opt@pagefit\fi]% + }% + }% + \def\hl@file##1{% + \special{% + \hlstart@preamble + /A<<% + /Type/Action% + /S/GoToR% + /D##1% + /F(\hl@opt@file)% + \ifx\hl@opt@newwin\empty \else + /NewWindow \ifcase\hl@opt@newwin false\else true\fi + \fi + >>% + >>% + }% + }% + \def\hl@typeh@url{% + \special{% + \hlstart@preamble + /A<<% + /Type/Action% + /S/URI% + /URI(\@hllabel)% + >>% + >>% + }% + }% + \def\@hlend{\special{pdf: endann}\endgroup}% End the group from \@hlstart. +}% +\def\href{% + \bgroup + \uncatcodespecials + \catcode`\{=1 \catcode`\}=2 + \@href +}% +\def\@href#1{% We'll read #2 (TEXT) later. + \egroup + \edef\@hreftmp{\ifempty{#1}{}\fi}% Parameter stuffing for \@@href. + \expandafter\@@href\@hreftmp#1\@@ +}% +\def\href@end@int{\hlend@impl{hrefint}}% +\def\href@end@ext{\hlend@impl{hrefext}}% +\def\@@href#1#2\@@{% + \def\@hreftmp{#1}% + \ifx\@hreftmp\hlhash + \let\href@end\href@end@int + \hlstart@impl{hrefint}{#2}% + \else + \let\href@end\href@end@ext + \hlstart@impl{hrefext}{#1#2}% + \fi + \@@@href +}% +\def\@@@href{% + \futurelet\@hreftmp\href@ +}% +\def\href@{% + \ifcat\bgroup\noexpand\@hreftmp + \let\@hreftmp\href@@ + \else + \let\@hreftmp\href@@@ + \fi + \@hreftmp +}% +\def\href@@{\bgroup\aftergroup\href@end \let\@hreftmp}% +\def\href@@@#1{#1\href@end}% +\def\hldeston{\errmessage{Please enable hyperlinks with + \string\enablehyperlinks\space before using hyperlink commands + (consider selecting the `nolinks' driver to ignore all hyperlink + commands in your document)}}% +\let\hldestoff\hldeston \let\hlon\hldeston \let\hloff\hldeston +\let\hlstart\hldeston \let\hlend\hldeston \let\hldest\hldeston +\let\hl@setparam\hldeston +\@hloff[*]\@hldestoff[*]% +\newif\ifusepkg@miniltx@loaded +\newcount\usepkg@recursion@level +\def\usepkg@rcrs{\the\usepkg@recursion@level}% +\let\usepkg@at@begin@document\empty +\let\usepkg@at@end@of@package\empty +\def\usepkg@word@autopict{autopict}% +\def\usepkg@word@psfrag{psfrag}% +\long\def\beginpackages#1\endpackages{% + \let\usepackage\real@usepackage + \let\DoNotLoadEpstopdf=t + \let\eplaininput=\input + #1% + \usepkg@at@begin@document + \global\let\usepkg@at@begin@document\empty + \global\let\usepackage\fake@usepackage + \let\packageinput=\input + \let\input=\eplaininput + \ifx\resetatcatcode\@undefined \else\resetatcatcode \fi +}% +\def\fake@usepackage{\errmessage{You should not use \string\usepackage\space outside of^^J + \@spaces\string\beginpackages...\string\endpackages\space environment}% +}% +\def\eplain@RequirePackage{% + \global\ece\let{usepkg@save@pkg\usepkg@rcrs}\usepkg@pkg + \global\ece\let{usepkg@save@options\usepkg@rcrs}\usepkg@options + \global\ece\let{usepkg@save@date\usepkg@rcrs}\usepkg@date + \global\ece\let{usepkg@at@end@of@package\usepkg@rcrs}\usepkg@at@end@of@package + \global\advance\usepkg@recursion@level by\@ne + \real@usepackage +}% +\let\usepackage\fake@usepackage +\def\real@usepackage{\@getoptionalarg\@finusepackage}% +\def\@finusepackage#1{% + \let\usepkg@options\@optionalarg + \ifempty{#1}% + \errmessage{No packages specified}% + \fi + \ifusepkg@miniltx@loaded \else + \testfileexistence[miniltx]{tex}% + \if@fileexists + \input miniltx.tex + \global\usepkg@miniltx@loadedtrue + \global\let\RequirePackage\eplain@RequirePackage + \global\let\DeclareOption\eplain@DeclareOption + \global\let\PassOptionsToPackage\eplain@PassOptionsToPackage + \global\let\ExecuteOptions\eplain@ExecuteOptions + \gdef\ProcessOptions{\@ifstar\eplain@ProcessOptions + \eplain@ProcessOptions}% + \global\let\AtBeginDocument\eplain@AtBeginDocument + \global\let\AtEndOfPackage\eplain@AtEndOfPackage + \global\let\ProvidesFile\eplain@ProvidesFile + \global\let\ProvidesPackage\eplain@ProvidesPackage + \else + \errmessage{miniltx.tex not found, cannot load LaTeX packages}% + \fi + \fi + \@ifnextchar[%] + {\@finfinusepackage{#1}}% + {\@finfinusepackage{#1}[]}% +}% +\def\@finfinusepackage#1[#2]{% + \edef\usepkg@date{#2}% + \let\usepkg@load@list\empty + \for\usepkg@pkg:=#1\do{% + \toks@=\expandafter{\usepkg@load@list}% + \edef\usepkg@load@list{% + \the\toks@ + \noexpand\usepkg@load@pkg{\usepkg@pkg}% + }% + }% + \usepkg@load@list + \ifnum\usepkg@recursion@level>0 + \global\advance\usepkg@recursion@level by\m@ne + \expandafter\let\expandafter\usepkg@pkg\csname usepkg@save@pkg\usepkg@rcrs\endcsname + \expandafter\let\expandafter\usepkg@options\csname usepkg@save@options\usepkg@rcrs\endcsname + \expandafter\let\expandafter\usepkg@date\csname usepkg@save@date\usepkg@rcrs\endcsname + \expandafter\let\expandafter\usepkg@at@end@of@package\csname usepkg@at@end@of@package\usepkg@rcrs\endcsname + \global\ece\let{usepkg@save@pkg\usepkg@rcrs}\undefined + \global\ece\let{usepkg@save@options\usepkg@rcrs}\undefined + \global\ece\let{usepkg@save@date\usepkg@rcrs}\undefined + \global\ece\let{usepkg@at@end@of@package\usepkg@rcrs}\undefined + \fi +}% +\def\usepkg@load@pkg#1{% + \def\usepkg@pkg{#1}% + \ifx\usepkg@pkg\usepkg@word@autopict + \testfileexistence[picture]{tex}% + \if@fileexists \else + \errmessage{Loader `picture.tex' for package `\usepkg@pkg' not found}% + \fi + \else + \ifx\usepkg@pkg\usepkg@word@psfrag + \testfileexistence[psfrag]{tex}% + \if@fileexists \else + \errmessage{Loader `psfrag.tex' for package `\usepkg@pkg' not found}% + \fi + \fi + \fi + \ifundefined{ver@\usepkg@pkg.sty}% + \expandafter\@finusepkg@load@pkg + \else + \immediate\write-1{^^J\linenumber Eplain: package `\usepkg@pkg' already + loaded, skipping reloading}% + \fi +}% +\def\@finusepkg@load@pkg{% + \testfileexistence[\usepkg@pkg]{sty}% + \if@fileexists \else + \errmessage{Package `\usepkg@pkg' not found}% + \fi + \expandafter\let\expandafter\temp\csname usepkg@options@\usepkg@pkg\endcsname + \ifx\temp\relax + \let\temp\empty + \fi + \ifx\temp\empty + \let\temp\usepkg@options + \else + \ifx\usepkg@options\empty \else + \edef\temp{\temp,\usepkg@options}% + \fi + \fi + \global\ece\let{usepkg@options@\usepkg@pkg}\temp + \let\usepackage\eplain@RequirePackage + \global\let\usepkg@at@end@of@package\empty + \ifx\usepkg@pkg\usepkg@word@autopict + \input picture.tex + \else + \ifx\usepkg@pkg\usepkg@word@psfrag + \input \usepkg@pkg.tex + \else + \input \usepkg@pkg.sty + \fi + \fi + \usepkg@at@end@of@package + \global\let\usepkg@at@end@of@package\empty + \let\usepackage\real@usepackage + \global\ece\let{usepkg@options@\usepkg@pkg}\undefined + \def\Url@HyperHook##1{\hlstart@impl{url}{\Url@String}##1\hlend@impl{url}}% +}% +\def\eplain@DeclareOption#1#2{% + \toks@{#2}% + \expandafter\xdef\csname usepkg@option@\usepkg@pkg @#1\endcsname{\the\toks@}% +}% +\def\eplain@PassOptionsToPackage#1#2{% + \ifempty{#1}\else + \for\usepkg@temp:=#2\do{% + \expandafter\let\expandafter\temp\csname usepkg@options@\usepkg@temp\endcsname + \ifx\temp\relax + \let\temp\empty + \fi + \ifx\temp\empty + \edef\temp{#1}% + \else + \edef\temp{\temp,#1}% + \fi + \global\ece\let{usepkg@options@\usepkg@temp}\temp + }% + \fi +}% +\def\usepkg@exec@options#1{% + \for\CurrentOption:=#1\do{% + \expandafter\let\expandafter\usepkg@temp + \csname usepkg@option@\usepkg@pkg @\CurrentOption\endcsname + \ifx\usepkg@temp\relax + \expandafter\let\expandafter\temp\csname usepkg@option@\usepkg@pkg @*\endcsname + \ifx\temp\relax + \errmessage{Unknown option `\CurrentOption' to package `\usepkg@pkg'}% + \else + \temp + \fi + \else + \usepkg@temp + \fi + }% +}% +\let\eplain@ExecuteOptions\usepkg@exec@options +\def\eplain@ProcessOptions{% + \expandafter\usepkg@exec@options\csname usepkg@options@\usepkg@pkg\endcsname +}% +\def\usepkg@accumulate@cmds#1#2{% + \toks@=\expandafter{#1}% + \toks@ii={#2}% + \xdef#1{\the\toks@\the\toks@ii}% +}% +\def\eplain@AtBeginDocument{\usepkg@accumulate@cmds\usepkg@at@begin@document}% +\def\eplain@AtEndOfPackage{\usepkg@accumulate@cmds\usepkg@at@end@of@package}% +\def\eplain@ProvidesPackage#1{% + \@ifnextchar[%] + {\eplain@pr@videpackage{#1.sty}}{\eplain@pr@videpackage#1[]}% +}% +\def\eplain@pr@videpackage#1[#2]{% + \wlog{#1: #2}% + \expandafter\xdef\csname ver@#1\endcsname{#2}% + \@ifl@t@r{#2}\usepkg@date{}% + {\message{Warning: you have requested package `\usepkg@pkg', version \usepkg@date,^^J + \@spaces but only version `\csname ver@#1\endcsname' is available.}}% +}% +\def\eplain@ProvidesFile#1{% + \@ifnextchar[%] + {\eplain@pr@videfile{#1}}{\eplain@pr@videfile#1[]}% +}% +\def\eplain@pr@videfile#1[#2]{% + \wlog{#1: #2}% + \expandafter\xdef\csname ver@#1\endcsname{#2}% +}% +\def\@ifl@ter#1#2{% + \expandafter\@ifl@t@r + \csname ver@#2.#1\endcsname +}% +\def\@ifl@t@r#1#2{% + \ifnum\expandafter\@parse@version#1//00\@nil<% + \expandafter\@parse@version#2//00\@nil + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi +}% +\def\@parse@version#1/#2/#3#4#5\@nil{#1#2#3#4 }% +\let\ttfamily\tt +\def\strip@prefix#1>{}% +\def\@ifpackageloaded#1{% + \expandafter\ifx\csname ver@#1.sty\endcsname\relax + \expandafter\@secondoftwo + \else + \expandafter\@firstoftwo + \fi +}% +\long\def\g@addto@macro#1#2{% + \begingroup + \toks@\expandafter{#1#2}% + \xdef#1{\the\toks@}% + \endgroup +}% +\def\PackageWarning#1#2{% + \begingroup + \newlinechar=10 % + \def\MessageBreak{% + ^^J(#1)\@spaces\@spaces\@spaces\@spaces + }% + \immediate\write16{^^JPackage #1 Warning: #2\on@line.^^J}% + \endgroup +}% +\def\PackageWarningNoLine#1#2{% + \PackageWarning{#1}{#2\@gobble}% +}% +\def\on@line{ on input line \the\inputlineno}% +\def\@spaces{\space\space\space\space}% +\def\@inmatherr#1{% + \relax + \ifmmode + \errmessage{The command is invalid in math mode}% + \fi +}% +\let\protected@edef\edef +\let\wlog = \@plainwlog +\catcode`@ = \@eplainoldatcode +\def\fmtname{eplain}% +\def\eplain{t}% +{\edef\plainversion{\fmtversion}% + \xdef\fmtversion{3.6: 30 September 2013 (and plain \plainversion)}% +}% diff --git a/Master/texmf-dist/doc/plain/impatient-cn/errors.tex b/Master/texmf-dist/doc/plain/impatient-cn/errors.tex new file mode 100644 index 00000000000..1d2369b60b9 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/errors.tex @@ -0,0 +1,575 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\chapter{Making sense \linebreak of error messages} +\chapter{理解错误信息} + +\chapterdef{errors} + +%\codefuzz = 4pc % for this chapter only (in scope of \chapter) +%\bix^^{error messages} +%Interpreting \TeX's error messages can sometimes +%be like going to your physician +%with a complaint that you're feeling fatigued and being handed, +%in response, +%a breakdown of your blood chemistry. The explanation of your distress +%is probably there, but it's not easy to figure out what it is. +%A few simple rules will go a long way in helping you to understand \TeX's +%error messages and get the most benefit from them. +\codefuzz = 4pc % for this chapter only (in scope of \chapter) +\bix^^{错误信息} +解释 \TeX\ 的错误信息有时候就像, +你跟医生抱怨你感觉疲乏无力,医生却递给你一份血生化细目表。 +对你的痛苦的解释也许就在那里,但却不容易弄清楚它是什么。 +掌握一些简单规则对你理解 \TeX\ 错误信息并从中受益将大有帮助。 + +%Your first goal should be +%to understand what you did that caused \TeX\ to complain. +%Your second goal (if you're working interactively) +%should be to catch as many errors as you can in a single run. +你的第一个目标应当是理解什么东西导致 \TeX\ 报错。 +第二个目标(如果是交互式使用 \TeX )应当是在一次运行中捕获尽可能多的错误。% +\footnote{译注:本章的各个节标题为译者所加。} + +\section{第一个例子} + +%Let's look at an example. Suppose that your input +%contains the line: +%\csdisplay +%We skip \quid a little bit. +%| +%You meant to type `|\quad|', but you typed `|\quid|' instead. +%Here's what you'll get from \TeX\ in response: +%\csdisplay +%!! Undefined control sequence. +%l.291 We skip \quid +% a little bit. +%? +%| +%This message will appear both at your terminal and in your log file. +%^^{log file//error messages} +%The first line, which always starts with an exclamation point (|!!|), +%tells you what the problem is. The last two lines before the `|?|' prompt +%(which in this case are also +%the next two lines) tell you how far \TeX\ has gotten +%when it found the error. +%It found the error on line $291$ of the current input file, +%and the break between the two message lines indicates +%\TeX's precise position within line $291$, namely, just after |\quid|. +%The current input file is the one just after the most recent unclosed +%left parenthesis in the terminal output of your run (see \xref{infiles}). +我们来看一个例子。假设你的输入中包含下面这行: +\csdisplay +We skip \quid a little bit. +| +你本想输入 `|\quad|',却输入成 `|\quid|'。 +此时 \TeX\ 将给出下面的信息: +\csdisplay +!! Undefined control sequence. +l.291 We skip \quid + a little bit. +? +| +此信息将同时出现在终端上和日志文件中。 +^^{日志文件//错误信息} +第一行始终以感叹号(|!!|)开头,告诉你出现了什么问题。 +在 `|?|' 提示符之前的最后两行(在此例子中同样也是接下来的两行)% +告诉你 \TeX\ 在何处发现此错误。 +它在当前输入文件的第 $291$ 行发现了错误, +两个信息行之间的断行表示 \TeX\ 在第 $291$ 行的精确位置,即在 |\quid| 后面。 +当前输入文件是指,在运行时的终端输出上, +最接近的非闭合左圆括号后显示的文件(见\xref{infiles})。 + +%This particular error, an undefined control +%sequence, is one of the most common ones you can get. +%If you respond to the prompt with another~`|?|', +%\TeX\ will display the following message: +%{\hfuzz = 2in +%\csdisplay +%Type <return> to proceed, S to scroll future error messages, +%R to run without stopping, Q to run quietly, +%I to insert something, E to edit your file, +%1 or ... or 9 to ignore the next 1 to 9 tokens of input, +%H for help, X to quit. +%| +%}% +这种错误,即控制序列未定义,是你最常出现的错误之一。 +如果你在提示符后键入另一个 `|?|',\TeX\ 将显示下列信息: +{\hfuzz = 2in +\csdisplay +Type <return> to proceed, S to scroll future error messages, +R to run without stopping, Q to run quietly, +I to insert something, E to edit your file, +1 or ... or 9 to ignore the next 1 to 9 tokens of input, +H for help, X to quit. +| +}% +%Here's what these alternatives mean: +%\ulist +%\li If you type \asciichar{return}, +%\TeX\ will continue processing your document. +%In this case it will just ignore the |\quid|. +%\li If you type `|S|' (or `|s|'---uppercase and lowercase are equivalent +%here), \TeX\ will process your document without stopping \emph{except} +%if it encounters a missing file. Error messages will still appear at your +%terminal and in the log file. +%\li If you type `|R|' or `|r|', +%you'll get the same effect as `|S|' except that +%\TeX\ won't even stop for missing files. +%\li If you type `|Q|' or `|q|', +%\TeX\ will continue processing your document but +%will neither stop for errors nor display them at your terminal. The +%errors will still show up in the log file. +%\li If you type `|X|' or `|x|', +%\TeX\ will clean up as best it can, discard the page +%it's working on, and quit. You can still print or view the +%pages that \TeX\ has already processed. +%\li If you type `|E|' or `|e|', \TeX\ will clean up and terminate +%as it would for `|X|' or `|x|' and then enter your text editor, +%positioning you at the erroneous line. +%(Not all systems support this option.) +%\li If you type `|H|' or `|h|', +%you'll get a further explanation of the error displayed +%at your terminal and +%possibly some advice about what to do about it. This explanation will also +%appear in your log file. For the undefined control sequence above, +%you'll get: +%{\hfuzz = 2in +%\csdisplay +%The control sequence at the end of the top line +%of your error message was never \def'ed. If you have +%misspelled it (e.g., `\hobx'), type `I' and the correct +%spelling (e.g., `I\hbox'). Otherwise just continue, +%and I'll forget about whatever was undefined. +%| +%} +%\li If you type `|?|', you'll get this same message again. +%\endulist +这些选择各自的含义如下: +\ulist +\li 如果你键入 \asciichar{return}, +\TeX\ 将继续处理你的文档。在此例子中它就忽略了 |\quid|。 +\li 如果你键入 `|S|'(或者 `|s|'——这时候大小写是等价的), +\TeX\ 将继续处理你的文档且不再暂停,\emph{除非}找不到某文件。 +但错误信息还是会出现在终端上和日志文件中。 +\li 如果你键入 `|R|' 或 `|r|', +你将得到与 `|S|' 相同的结果,但此时 \TeX\ 即使找不到文件也不会暂停。 +\li 如果你键入 `|Q|' 或 `|q|', +\TeX\ 将继续处理你的文档,且遇到错误后将不会再暂停,也不会在终端上显示。 +错误信息还是会记录到日志文件中。 +\li 如果你键入 `|X|' 或 `|x|', +\TeX\ 将尽力清理干净,丢弃正在构造的页面,并退出。 +你仍然可以打印或查看 \TeX\ 已经生成的页面。 +\li 如果你键入 `|E|' 或 `|e|', +\TeX\ 将如同 `|X|' 或 `|x|' 那样清理并中止,然后打开文本编辑器,跳转到错误所在的行。% +(并非所有系统都支持此选项。) +\li 如果你键入 `|H|' 或 `|h|', +你将在终端上看到对此错误的进一步解释,可能还有对此错误的一些建议。 +这些信息同样会记录到你的日志文件中。 +对于上述例子的未定义控制序列,你将得到下列信息: +{\hfuzz = 2in +\csdisplay +The control sequence at the end of the top line +of your error message was never \def'ed. If you have +misspelled it (e.g., `\hobx'), type `I' and the correct +spelling (e.g., `I\hbox'). Otherwise just continue, +and I'll forget about whatever was undefined. +| +} +\li 如果你键入 `|?|',你将得到和上面相同的信息。 +\endulist +%\noindent +%The other two alternatives, typing `|I|' or a small integer, provide ways of +%getting \TeX\ back on the track so that your error won't cause further errors +%later in your document: +%\ulist +%\li If you type `|I|' or `|i|' +%followed by some text, then \TeX\ will insert +%that text as though it had occurred just after the point of the error, +%at the innermost level where \TeX\ is working. +%In the case of the example above, that means at \TeX's +%position in your original input, namely, just after `|\quid|'. +%Later you'll see an example that shows +%the difference between inserting something at the innermost level and +%inserting it into your original input. In the example above of the undefined +%control sequence, if you type: +%\csdisplay +%I\quad +%| +%\TeX\ will carry out the |\quad| command and produce a quad space +%where you intended to have one. +%\li If you type a positive integer less than $100$ (not less than $10$ as the +%message misleadingly suggests), +%\TeX\ will delete that number of tokens from the innermost +%level where it is working. +%(If you type an integer greater than or equal to $100$, \TeX\ will +%delete $10$ tokens!) +%\endulist +\noindent +另外两个选择,即键入 `|I|' 或一个小整数, +提供一种让 \TeX\ 回到正常轨道上的方法, +使得该错误不会在文档后面导致更多的错误: +\ulist +\li 如果你键入 `|I|' 或 `|i|' 并加上一些文本, +\TeX\ 将把文本插入错误位置之后,放在 \TeX\ 处理的最内层级。 +在上面这个例子中,这表示在 \TeX\ 的原始输入的位置,即在 `|\quid|' 之后。 +稍后我们将给出一个例子,说明把某些东西插入到最内层级与插入到原始输入的区别。 +在上面这个控制序列未定义的例子中,如果你键入: +\csdisplay +I\quad +| +\TeX\ 将执行 |\quad| 命令并在你需要的地方生成一个全方间隔。 +\li 如果你键入一个小于 $100$(错误信息让人误解为小于 $10$)的正整数, +\TeX\ 将从它处理的最内层级删除该数目的记号。% +(如果你键入大于或等于 $100$ 的整数,\TeX\ 将只删除 $10$ 个记号!) +\endulist + +\section{第二个例子} + +%Here's an example of another common error: +%\csdisplay +%Skip across \hskip 3cn by 3 centimeters. +%| +%The error message for this is: +%\csdisplay +%!! Illegal unit of measure (pt inserted). +%<to be read again> +% c +%<to be read again> +% n +%l.340 Skip across \hskip 3cn +% by 3 centimeters. +%| +%^^|<to be read again>| +%In this case \TeX\ has observed that `|3|' is followed by something that +%isn't a proper unit of measure, and so it's assumed the unit of measure to be +%points. \TeX\ will read the tokens of `|cn|' again and insert them into +%your input, which is not what you want. In this case you can get a better +%result by first typing `|2|' to bypass the `|cn|'. +%You'll get the message: +%\csdisplay +%<recently read> n +% +%l.340 Skip across \hskip 3cn +% by 3 centimeters. +%| +这里是另一种常见错误的例子: +\csdisplay +Skip across \hskip 3cn by 3 centimeters. +| +这个例子的错误信息为: +\csdisplay +!! Illegal unit of measure (pt inserted). +<to be read again> + c +<to be read again> + n +l.340 Skip across \hskip 3cn + by 3 centimeters. +| +^^|<to be read again>| +这里 \TeX\ 注意到 `|3|' 后面不是一个正确的度量单位,因此它假设该度量单位为点。 +\TeX\ 将重新读取 `|cn|' 的记号并将它们插入你的输入中,而这并不是你想要的。 +在这种情形下若想得到更好的结果,你可以先键入 `|2|' 以跳过 `|cn|'。 +这样你将得到如下信息: +\csdisplay +<recently read> n + +l.340 Skip across \hskip 3cn + by 3 centimeters. +| + +%Now you can type +%`|I\hskip 3cm|' to get the skip you wanted (in addition to the |3pt| skip +%that you've already gotten).\footnote +%{By typing `|I\unskip\hskip 3cm|' you can get rid of the |3pt| skip.} +现在你可以键入 `|I\hskip 3cm|' 以得到你所要的间距(加上你已经得到的 |3pt| 间距)。% +\footnote{若改为键入 `|I\unskip\hskip 3cm|',你就可以去掉这个 |3pt| 的间距。} + +\section{第三个例子} + +%If you type something that's only valid in math mode, \TeX\ will switch over +%to math mode for you whether or not that's what you really wanted. +%For example: +%\csdisplay +%So \spadesuit s are trumps. +%| +%Here's \TeX's error message: +%\csdisplay +%!! Missing $ inserted. +%<inserted text> +% $ +%<to be read again> +% \spadesuit +%l.330 So \spadesuit +% s are trumps. +%| +%Since the |\spadesuit| symbol is only allowed in math mode, +%\TeX\ has inserted a `|$|' in front of it. +%After \TeX\ inserts a token, it's positioned in \emph{front} of +%that token, in this case the `|$|', ready to read it. +%Typing `|2|' will cause \TeX\ to skip both the `|$|' +%and the `|\spadesuit|' tokens, leaving it ready to process the `|s|' +%in `|s are trumps.|'. +%(If you just let \TeX\ continue, it will typeset `|s are trumps|' +%in math mode.) +如果你输入某些仅可用于数学模式的内容,\TeX\ 将帮你切换到数学模式, +不管这是否你真正想要的。例如: +\csdisplay +So \spadesuit s are trumps. +| +下面是 \TeX\ 的错误信息: +\csdisplay +!! Missing $ inserted. +<inserted text> + $ +<to be read again> + \spadesuit +l.330 So \spadesuit + s are trumps. +| +由于 |\spadesuit| 符号仅可在数学模式中使用, +\TeX\ 已经在它前面插入一个 `|$|'。 +在插入某个记号之后,\TeX\ 位于该记号的\emph{前面}, +在此情形中就是位于 `|$|' 前面,并准备读取输入。 +键入 `|2|' 将让 \TeX\ 跳过 `|$|' 和 `|\spadesuit|' 记号, +让它准备处理 `|s are trumps.|' 中的 `|s|'。% +(若你只是让 \TeX\ 继续,它将在数学模式中排版 `|s are trumps|'。) + +\section{第四个例子} + +%Here's an example where \TeX's error diagnostic is downright wrong: +%\csdisplay +%\hbox{One \vskip 1in two.} +%| +%The error message is: +%\csdisplay +%!! Missing } inserted. +%<inserted text> +% } +%<to be read again> +% \vskip +%l.29 \hbox{One \vskip +% 1in two.} +%| +%^^|<inserted text>| +%The problem is that you can't use |\vskip| when \TeX\ is in +%restricted horizontal mode, i.e, constructing an hbox. +%But instead of rejecting the |\vskip|, \TeX\ has inserted a right brace +%in front of it in an attempt to close out the hbox. +%If you accept \TeX's correction, \TeX\ will complain again +%when it gets to the correct right brace later on. It will also complain +%about anything before that right brace that isn't allowed in vertical mode. +%These additional complaints will be particularly confusing +%because the errors they indicate are bogus, a +%result of the propagated effects of the inappropriate +%insertion of the right brace. +%Your best bet is to type `|5|', skipping past all the tokens +%in `|}\vskip 1in|'. +在下面这个例子中,\TeX\ 对错误的诊断是完全不正确的: +\csdisplay +\hbox{One \vskip 1in two.} +| +它给出的错误信息如下: +\csdisplay +!! Missing } inserted. +<inserted text> + } +<to be read again> + \vskip +l.29 \hbox{One \vskip + 1in two.} +| +^^|<inserted text>| +问题在于,当 \TeX\ 位于受限水平模式中,即正在构建水平盒子时,不能使用 |\vskip|。 +但 \TeX\ 不是丢掉 |\vskip|,而是在它前面插入一个右花括号,以结束该水平盒子。 +如果你接受 \TeX\ 的修改,\TeX\ 遇到稍后的正确右花括号时将再次报错。 +它还将对该右花括号之前的任何不能出现在竖直模式的东西报错。 +这些额外的错误将是特别让人迷惑的,因为这些错误所说的都是假的, +它们是不恰当插入右花括号后产生的结果。 +你的最佳做法是键入 `|5|' 以跳过在 `|}\vskip 1in|' 中的所有记号。 + +\section{第五个例子} + +%Here's a similar example in which the error message is longer +%than any we've seen so far: +%\csdisplay +%\leftline{Skip \smallskip a little further.} But no more. +%| +%The mistake here is that |\smallskip| only works in a vertical mode. +%The error message is something like: +%\csdisplay +%!! Missing } inserted. +%<inserted text> +% } +%<to be read again> +% \vskip +%\smallskip ->\vskip +% \smallskipamount +%<argument> Skip \smallskip +% a little further. +%\leftline #1->\line {#1 +% \hss } +%l.93 ...Skip \smallskip a little further.} +% But no more. +%| +%The error messages here give you a tour through the macros that are used in +%\plainTeX's implementation of |\leftline|---macros +%that you probably don't care about. +%The first line tells you that \TeX\ intends to cure the problem by +%inserting a right brace. +%\TeX\ hasn't actually read the +%right brace yet, so you can delete it if you choose to. +%Each component of the message after the first line +%(the one with the `!') occupies a pair of lines. +%Here's what the successive pairs of lines mean: +这里还有个相似的例子,它的错误信息比你之前看到的都要长: +\csdisplay +\leftline{Skip \smallskip a little further.} But no more. +| +错误在于 |\smallskip| 只能在竖直模式中使用。给出的错误信息如下: +\csdisplay +!! Missing } inserted. +<inserted text> + } +<to be read again> + \vskip +\smallskip ->\vskip + \smallskipamount +<argument> Skip \smallskip + a little further. +\leftline #1->\line {#1 + \hss } +l.93 ...Skip \smallskip a little further.} + But no more. +| +这些错误信息带你巡视了在 \plainTeX\ 中用于实现 |\leftline| 的各个宏——% +这些宏也许是你并不在乎的。 +第一行告诉你 \TeX\ 试图通过插入右花括号解决此问题。 +\TeX\ 还未读到右花括号,因此若你想的话你可以删除它。 +第一行(带 `!' 的那行)之后的信息每部分都由两行组成。 +下面是各部分的两行信息的含义: +%\olist +%\li The first pair indicates that \TeX\ has inserted, but not yet read, +%a right brace. +%\li The next pair indicates that after reading the right brace, \TeX\ will +%again read a `|\vskip|' command (gotten from the macro definition +%of |\smallskip|). +%\li The third pair indicates that \TeX\ was expanding the |\smallskip| +%macro when it found the error. The pair also displays the definition of +%|\smallskip| and indicates how far \TeX\ has gotten in expanding and +%executing that definition. Specifically, it's just attempted +%unsuccessfully to execute the |\vskip| command. In general, a +%diagnostic line that starts with a control sequence followed by `|->|' +%indicates that \TeX\ has been expanding and executing a macro by that +%name. +%\li The fourth pair indicates that \TeX\ was processing a macro argument +%when it found the |\smallskip| and also indicates \TeX's position in that +%argument, i.e., it's just processed the |\smallskip| (unsuccessfully). +%By looking ahead to the next pair of lines +%we can see that the argument was passed to +%|\leftline|. +%\li The fifth pair indicates that \TeX\ was expanding +%the |\leftline| +%macro when it found the error. +%(In this example the error occurred while \TeX\ was +%in the middle of interpreting several +%macro definitions at different levels of expansion.) +%Its position after |#1| indicates that the last thing it saw was the +%first (and in this case the only) argument to |\leftline|. +%\li The last pair indicates where \TeX\ is positioned in your input file. +%Note that this position is well beyond the position where it's +%inserting the right brace and reading `|\vskip|' again. +%That's because \TeX\ has already read the entire argument to |\leftline| +%from your input file, even though it's only processed part of that argument. +%The dots at the beginning of the pair indicate a preceding part of the +%input line that isn't shown. This preceding part, in fact, includes +%the |\leftline| control sequence that made the |\vskip| illegal. +%\endolist +\olist +\li 第一对双行表示 \TeX\ 已经插入,但尚未读到的右花括号。 +\li 第二对双行表示在读取右花括号后, +\TeX\ 将重新读取 `|\vskip|' 命令(它来自 |\smallskip| 宏的定义中)。 +\li 第三对双行表示 \TeX\ 是在展开 |\smallskip| 时发现的错误。 +此部分也显示 |\smallskip| 的定义,并表示在展开和执行该定义时已经读到哪里。 +具体地说,它是在执行|\vskip| 命令时失败的。 +一般地,以控制序列加 `|->|' 开始的信息行表示 \TeX\ 已展开执行的宏的名称。 +\li 第四对双行表示 \TeX\ 在处理宏参量时发现了 |\smallskip|, +同时也表示 \TeX\ 在该参量中的位置,即它正在处理 |\smallskip|(失败了)。 +通过往前查找接下来两行,你可以看到此参量是传递给 |\leftline| 的。 +\li 第五对双行表示 \TeX\ 是在展开 |\leftline| 宏是发现的错误。% +(在这个例子中,错误发生在 \TeX\ 解释多个不同层级的宏定义的中间。)% +在 |#1| 后面的位置表示它最后读取到的是 |\leftline| 的第一个(在这里也是唯一的)参量。 +\li 最后对双行表示 \TeX\ 在你的输入文件的位置。 +注意此位置远远超出它插入右花括号并重新读取 `|\vskip|' 的位置。 +这是因为 \TeX\ 已经从输入文件读取了 |\leftline| 的完整参量, +即使它仅仅处理该参量的一部分。 +这两行信息开头的圆点表示输入行前面一部分内容没显示出来。 +前面那部分内容实际上就包括让 |\vskip| 变得不合法的 |\leftline| 控制序列。 +\endolist +%\noindent +%In a long message like this, you'll generally find only the first line and the +%last pair of lines to be useful; but it sometimes helps to know what the other +%lines are about. Any text that you insert or delete will be +%inserted or deleted at the +%innermost level. In this example the insertion or deletion would occur +%just before the +%inserted right brace. +%Note in particular that in this case \TeX\ puts any text you might insert +%\emph{not} into your input text but into a macro definition +%several levels down. (The original macro definition is of course not modified.) +\noindent +在类似这样的长篇信息中,你通常发现只有第一行和最后两行是有用的; +但知道其他行是怎么回事有时候也有益处。 +任何你插入或删除的文本将在最内层级中插入或删除。 +在这里例子中,插入或删除将出现在 \TeX\ 插入的右花括号前。 +特别要注意,在此情形中 \TeX\ 将\emph{不会}把你可能插入的文本放在你的输入文本中, +而是放在多层宏定义的最里面。% +(原始的宏定义当然并不会被改动。) + +%You can use the ^|\errorcontextlines| command \ctsref{\errorcontextlines} +%to limit the +%number of pairs of error context lines that \TeX\ produces. +%If you're not interested in all the information that \TeX\ is giving you, +%you can set |\error!-contextlines| to $0$. That will give you just the first +%and last pairs of lines. +你可以用 ^|\errorcontextlines|\ctsref{\errorcontextlines}命令限制 +\TeX\ 生成的错误信息双行的数目。 +如果你并非对 \TeX\ 给你的所有信息都感兴趣, +你可以设定 |\error!-contextlines| 为 $0$。 +这样错误信息将只有最前面两行和最后面两行。 + +%Finally, +%we'll mention two other indicators that can appear at the start of a pair +%of error message lines: +%\ulist +%\li ^|<output>| indicates that \TeX\ was in the middle of its output routine +%when this error occurred. +%\li ^|<write>| indicates that \TeX\ was in the middle of executing a +%|\write| command when this error occurred. +%\TeX\ will detect such an error when it is actually doing the |\write| +%(during a |\shipout|), rather than when it first encounters the |\write|. +%\endulist +最后,我们提及可能出现在错误信息行对开头的另外两个指示词: +\ulist +\li ^|<output>| 表示 \TeX\ 在它的输出例行程序中间遇到此错误。 +\li ^|<write>| 表示 \TeX\ 在执行 |\write| 命令时遇到此错误。 +\TeX\ 将在实际执行 |\write| 时才检测这样的错误(在 |\shipout| 时), +而不是在刚遇到 |\write| 命令时。 +\endulist + +%\eix^^{error messages} +%\endchapter +%\byebye +\eix^^{错误信息} + +\ifoldeplain\else\ifcompletebook\else +\vskip4em{\sectionfonts\leftline{本章索引}} +\readindexfile{i} +\fi\fi + +\endchapter +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/examples.tex b/Master/texmf-dist/doc/plain/impatient-cn/examples.tex new file mode 100644 index 00000000000..a4c83e3162d --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/examples.tex @@ -0,0 +1,83 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\chapter{Examples} +\chapter{例子} + +\chapterdef{examples} + +%This section of the book contains a set of examples +%to help get you started and to show you how to do various things with \TeX. +%Each example has \TeX\ output on the left-hand page and the \TeX \ +%input that led to that output on the right-hand page. +%You can use these examples both as forms to imitate and +%as a way of finding the +%\TeX\ commands that you need in order to achieve a particular effect. +%However, these examples can illustrate only a few of the +%about $900$ \TeX\ commands. +这一章中包括了一组例子,来帮助你熟悉 \TeX , +同时这些例子还展示了如何使用 \TeX\ 来完成各种排版工作。 +每个例子都有一个放在左页的 \TeX\ 排版的结果和放在右页的相对应的 \TeX\ 输入文本。 +你可以把这些例子作为模仿的样式,也可以用来找到你想要的效果的实现命令。 +不过要注意的是,这些例子仅能展示 \TeX\ $900$ 条左右的命令的一小部分。 + +%Some of the examples are self-descriptive---that is, they discuss the very +%features of \TeX\ that they are illustrating. These discussions are +%necessarily sketchy because there isn't room in the examples for all the +%information you'd need. The capsule summary of commands +%(\chapterref{capsule}) +%and the index will help you +%locate the complete explanation of every \TeX\ feature shown in the +%examples. +这里的某些例子是其义自现的——也就是说,它们在介绍每个所排印出来的功能。 +这个介绍很粗略,因为没有足够的篇幅来讲术所有你想得到的信息。 +命令速查表(\chapterref{capsule})和索引可以帮你来找到例子中的每个 \TeX\ 功能。 + +%Because we've designed the examples to illustrate +%many things at once, some examples contain a great variety of +%typographical effects. These examples generally are \emph{not} good +%models of typographical practice. For instance, Example~8 has some of its +%equation numbers on the left and some on the right. You'd never want to +%do that in a real publication. +因为我们在设计这些例子时,把很多的东西放在一起描述, +因此,这些例子展示了很多的排版效果。 +这些例子一般并\emph{不是}好的排版实践模版。 +比如例~8 把有些公式编号放在左边,又把另一些放在了右边。 +你永远不会在一个实际的科学出版物中使用这样的公式编号。 + +%\xrdef{xmphead} +%Each example except for the first one starts with a macro (see +%\xref{macro}) named |\xmpheader|. We've used |\xmpheader| in order to +%conserve space in the input, since without it each example would have +%several lines of material you'd already seen. +%|\xmpheader| produces the title of an example and the +%extra space that goes with it. You can see in the first example +%what |\xmpheader| does, so you can imitate it if you wish. +%Except for |\xmpheader|, every command that we use in these examples is +%defined in \plainTeX. +\xrdef{xmphead} +除了第一个例子以外,每个例子都由一个叫 |\xmpheader| 的宏开始(见\xref{宏})。 +我们这样做是为了节省输入文本的篇幅, +否则每个例子开头你都会看到几行你先前已经看到的内容。 +|\xmpheader| 会排印出例子的标题和标题后的空白。 +你可以参见没有使用 |\xmpheader| 的第一个例子是如何实现这一点的, +然后你就能模仿它了。 +除了 |\xmpheader|,在这里使用的每个命令都是在 \PlainTeX\ 中定义过的。 + +% The first example does the necessary eject here. +{% + \let\bye = \relax % We don't want to obey \bye in the example input. + % These switches can't be done by a macro since \bye is outer. + \doexamples {xmptext}% Typeset the actual examples. +}% + +\ifoldeplain\else\ifcompletebook\else +\vfil\eject{\sectionfonts\leftline{本章索引}} +\readindexfile{i} +\fi\fi + +\endchapter +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/fdl.tex b/Master/texmf-dist/doc/plain/impatient-cn/fdl.tex new file mode 100644 index 00000000000..1a9a7e56f35 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/fdl.tex @@ -0,0 +1,464 @@ +% -*- coding: utf-8 -*- +% This file is a chapter. It must be included in a larger document to work +% properly. + +\chapter{GNU 自由文档许可证} + +\begingroup +% pseudo-latex since that's what the original source used. +\let\label=\eqdefn +\def\eqprint#1{#1\relax} +\def\\{\hfil\break} +\let\ref=\eqref + +% we have to have section numbers since we have internal references. +\def\fdlkludge{\begingroup + \count255=\eqnumber \advance\count255 by 1 + \the\count255. +\endgroup} + +Version 1.2, November 2002 + + Copyright \copyright\ 2000,2001,2002 Free Software Foundation, Inc.\\ + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\\ + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +\section{PREAMBLE} + +The purpose of this License is to make a manual, textbook, or other +functional and useful document ``free'' in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of ``copyleft'', which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +\section{APPLICABILITY AND DEFINITIONS} + +\label{applicability} + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The ``Document'', below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as ``you''. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A ``Modified Version'' of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A ``Secondary Section'' is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (Thus, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The ``Invariant Sections'' are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The ``Cover Texts'' are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A ``Transparent'' copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not ``Transparent'' is called ``Opaque''. + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, \LaTeX\ input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The ``Title Page'' means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, ``Title Page'' means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +A section ``Entitled XYZ'' means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as ``Acknowledgements'', +``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' +of such a section when you modify the Document means that it remains a +section ``Entitled XYZ'' according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + + +\section{VERBATIM COPYING} + +\label{verbatim} + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in +section~\ref{copying}. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +\section{COPYING IN QUANTITY} + +\label{copying} + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +\section{MODIFICATIONS} + +\label{modifications} + +You may copy and distribute a Modified Version of the Document under +the conditions of sections~\ref{verbatim} and \ref{copying} above, +provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +%\begin{enumerate} +\smallskip +\itemletter = `A +\def\item{\vskip\interitemskipa \char\itemletter. \advance\itemletter by 1} +\item Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +\item List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +\item State on the Title page the name of the publisher of the + Modified Version, as the publisher. +\item Preserve all the copyright notices of the Document. +\item Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +\item Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +\item Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +\item Include an unaltered copy of this License. +\item Preserve the section Entitled ``History'', Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled ``History'' in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +\item Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the ``History'' section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +\item For any section Entitled ``Acknowledgements'' or ``Dedications'', + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +\item Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +\item Delete any section Entitled ``Endorsements''. Such a section + may not be included in the Modified Version. +\item Do not retitle any existing section to be Entitled ``Endorsements'' + or to conflict in title with any Invariant Section. +\item Preserve any Warranty Disclaimers. + +\smallskip +%\end{enumerate} + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled ``Endorsements'', provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +\section{COMBINING DOCUMENTS} + +\label{combining} + +You may combine the Document with other documents released under this +License, under the terms defined in section~\ref{modifications} +above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled ``History'' +in the various original documents, forming one section Entitled +``History''; likewise combine any sections Entitled ``Acknowledgements'', +and any sections Entitled ``Dedications''. You must delete all sections +Entitled ``Endorsements''. + + +\section{COLLECTIONS OF DOCUMENTS} + +\label{collections} + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +\section{AGGREGATION WITH INDEPENDENT WORKS} + +\label{aggregation} + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an ``aggregate'' if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section~\ref{copying} is applicable to +these copies of the Document, then if the Document is less than one half +of the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + +\section{TRANSLATION} + +\label{translation} + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of +section~\ref{modifications}. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled ``Acknowledgements'', +``Dedications'', or ``History'', the requirement +(section~\ref{modifications}) to Preserve +its Title (section~\ref{applicability}) will typically require +changing the actual title. + + +\section{TERMINATION} + +\label{termination} + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +\section{FUTURE REVISIONS OF THIS LICENSE} + +\label{future} + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License ``or any later version'' applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +% this section title is so long, it messes up everything. +% don't put it in the headline and don't write it to the toc +\let\markinfo=\gobble +\let\writetocentry=\gobbletwo +\section{\vtop{\noindent ADDENDUM: How to use this License + \\for your documents\hfil}} + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + +%\begin{quote} +\smallskip +{\narrower\obeylines\eightrm\baselineskip=10pt + Copyright \copyright\ YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled ``GNU + Free Documentation License''. +\par} +%\end{quote} +\smallskip + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the ``with...Texts.'' line with this: + +\smallskip +{\narrower\obeylines\eightrm\baselineskip=10pt + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. +\par} +\smallskip + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. + +\endgroup + +\endchapter\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/fonts.tex b/Master/texmf-dist/doc/plain/impatient-cn/fonts.tex new file mode 100644 index 00000000000..9094b3b339d --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/fonts.tex @@ -0,0 +1,334 @@ +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +% Fonts for TeX for the Impatient. + +% This file is being distributed with the macros because the macro file +% refers to it. We used a combination of Bitstream and standard TeX +% fonts for the original printed book, but for the free edition, we +% stick to Computer Modern. +% ----------------------------------------------------------------------- +% +% We used Computer Modern for the main text and math, and Zapf Humanist +% (i.e., Optima) for heads. (bs00015 is Optima Roman, 16 italic, 17 +% bold, 18 bold italic.) +% +% First we define all of the fonts we use for any purpose, in terms of the +% font files. Later we define fonts functionally, using \let or \def. + +% Computer Modern fonts. +% +\chardef\chinesefont = 2 +\ifcase\chinesefont + \def\song{Adobe Song Std} + \def\hei{Adobe Heiti Std} + \def\kai{Adobe Kaiti Std} + \def\fang{Adobe Fangsong Std} +\or + \def\song{SimSun} + \def\hei{SimHei} + \def\kai{KaiTi} + \def\fang{FangSong} +\or + \def\song{FandolSong} + \def\hei{FandolHei} + \def\kai{FandolKai} + \def\fang{FandolFang} +\fi +% +\newif\ifxecjk \xecjktrue +\ifxecjk + \font\CJKfont="\song" at 10pt + \input xeCJK-base + \def\letfont{\let\CJKfont} + \normalspacedchars{-} +\else + \font\zhfont="\song" at 10pt + \def\zhpunctfont{\zhfont} + \input zhspacing.sty + \zhspacing + \def\letfont{\let\zhfont} +\fi +% +\font\enfiverm = cmr5 +\font\zhfiverm = "\song" at 5pt +\def\fiverm{\enfiverm\letfont\zhfiverm} +\font\eneightrm = cmr8 +\font\zheightrm = "\song" at 8pt +\def\eightrm{\eneightrm\letfont\zheightrm} +\font\enninerm = cmr9 % Glue pictures, small caps for ASCII. +\font\zhninerm = "\song" at 9pt +\def\ninerm{\enninerm\letfont\zhninerm} +%\font\tenrm = xcmr10 % with our kerning +\font\entenrm = cmr10 % don't have the xcmr10 source any more +\font\zhtenrm = "\song" at 10pt +\def\tenrm{\entenrm\letfont\zhtenrm} +\font\enoldtenrm = cmr10 % straight CM +\font\zholdtenrm = "\song" at 10pt +\def\oldtenrm{\enoldtenrm\letfont\zholdtenrm} +\font\entwelverm = cmr12 +\font\zhtwelverm = "\song" at 12pt +\def\twelverm{\entwelverm\letfont\zhtwelverm} +\font\entwentysixrm = cmr10 at 26pt +\font\zhtwentysixrm = "\hei" at 26pt +\def\twentysixrm{\entwentysixrm\letfont\zhtwentysixrm} +% +\font\eneightit = cmti8 +\font\zheightit = "\kai" at 8pt +\def\eightit{\eneightit\letfont\zheightit} +\font\ennineit = cmti9 +\font\zheightit = "\kai" at 9pt +\def\nineit{\ennineit\letfont\zhnineit} +\font\entenit = cmti10 +\font\zhtenit = "\kai" at 10pt +\def\tenit{\entenit\letfont\zhtenit} +% +\font\eneighttt = cmtt8 +\font\zheighttt = "\fang" at 8pt +\def\eighttt{\eneighttt\letfont\zheighttt} +\font\ententt = cmtt10 +\font\zhtentt = "\fang" at 10pt +\def\tentt{\ententt\letfont\zhtentt} +\font\eneleventt = cmtt10 at 11pt +\font\zheleventt = "\fang" at 11pt +\def\elventt{\enelventt\letfont\zhelventt} +\font\entwelvett = cmtt10 scaled \magstep2 +\font\zhtwelvett = "\fang" at 12pt +\def\twelvett{\entwelvett\letfont\zhtwelvett} +% +\font\entenbt = cmtt10 +\font\zhtenbt = "\fang" at 10pt +\def\tenbt{\entenbt\letfont\zhtenbt} +% +\font\enelevensf = cmss10 scaled\magstephalf +\font\zhelevensf = "\hei" at 11pt +\def\elevensf{\enelevensf\letfont\zhelevensf} +\font\enfourteensf = cmss10 scaled\magstep2 +\font\zhfourteensf = "\hei" at 14pt +\def\fourteensf{\enfourteensf\letfont\zhfourteensf} +% +\font\eneightbf = cmbx8 +\font\zheightbf = "\hei" at 8pt +\def\eightbf{\eneightbf\letfont\zheightbf} +\font\entenbf = cmbx10 +\font\zhtenbf = "\hei" at 10pt +\def\tenbf{\entenbf\letfont\zhtenbf} +\font\enelevenbf = cmbx10 scaled \magstephalf +\font\zhelevenbf = "\hei" at 11pt +\def\elevenbf{\enelevenbf\letfont\zhelevenbf} +\font\entwelvebf = cmbx12 +\font\zhtwelvebf = "\hei" at 12pt +\def\twelvebf{\entwelvebf\letfont\zhtwelvebf} +\font\enthirtysixbf = cmbx10 at 36pt +\font\zhthirtysixbf = "\hei" at 36pt +\def\thirtysixbf{\enthirtysixbf\letfont\zhthirtysixbf} +% +\font\entenbi = cmbxti10 +\font\zhtenbi = "\hei" at 10pt +\def\tenbi{\entenbi\letfont\zhtenbi} +\font\enelevenbi= cmbxti10 scaled \magstephalf +\font\zhelevenbi = "\hei" at 11pt +\def\elevenbi{\enelevenbi\letfont\zhelevenbi} +\font\enfourteenbi= cmbxti10 scaled \magstep2 +\font\zhfourteenbi = "\hei" at 14pt +\def\fourteenbi{\enfourteenbi\letfont\zhfourteenbi} +% +\font\entensc = cmcsc10 +\font\zhtensc = "\fang" at 10pt +\def\tensc{\entensc\letfont\zhtensc} +\font\eneightsl = cmsl8 +\font\zheightsl = "\fang" at 8pt +\def\eightsl{\eneightsl\letfont\zheightsl} +\font\eneighti = cmmi8 +\font\zheighti = "\kai" at 8pt +\def\eighti{\eneighti\letfont\zheighti} +\font\eneightsy = cmsy8 +\font\zheightsy = "\song" at 8pt +\def\eightsy{\eneightsy\letfont\zheightsy} + +% % Optima fonts. +% % +% \font\eightopt = bs0015 at 8pt +% \font\nineopt = bs0015 at 9pt +% \font\twelveopt = bs0015 at 12pt +% \font\twentysixopt = bs0015 at 26pt +% \font\nineoptit = bs0016 at 9pt +% \font\tenoptit = bs0016 at 10pt +% \font\tenoptbf = bs0017 at 10pt +% \font\thirtysixoptbf = bs0017 at 36pt +% \font\tenbt = bs00175 at 10pt +% \font\tenoptbi = bs0018 at 10pt +% \font\elevenoptbi = bs0018 at 11pt +% \font\fourteenoptbi = bs0018 at 14pt + +% Palatino fonts. +% +\font\tenpal = pplr +%\font\tenpal = bs0023 +%\font\tenpalit = bs0024 +%\font\tenpalbf = bs0025 +%\font\tenpalbi = bs0026 + +% Logo and picture fonts. +% +\font\eightlogo = logo8 +\font\logosl = logosl10 +\font\handfont = pzdr + +% The following changes are to avoid driver overflow +\ifmsdos + \font\cnum = cnum % 36-pt bold Optima, numbers only (just for MS-DOS) + \let\chapternumeralfont = \cnum + %\let\thirtysixoptbf = \twentysixopt + %\font\sevensy = cmsy8 + %\font\seveni = cmmi8 +\fi + +\def\undefinedfont{\errmessage{Undefined font}} + +% This should only be called when \rm et al. are going to be defined +% directly. +% +\def\clearfonts{\let\rm = \undefinedfont \let\bf = \undefinedfont + \let\it = \undefinedfont \let\bi = \undefinedfont + \let\tt = \undefinedfont \let\bt = \undefinedfont + \let\sc = \undefinedfont + \let\ss = \undefinedfont +} + +% We only need to assign to \fam if the font is going to be used in math +% mode, which isn't the case with any of these. \rm, \it, \sl, \bf, and +% \tt are defined in plain. +% +\def\bi{\tenbi} + +\def\mapquotes{\catcode`` = \active \catcode`' = \active} +{\mapquotes + \gdef\bt{% The font change also draws \ ` ' from a different font. + \tenbt + \def\\{{\tentt \char92}}% + \def`{{\tentt \char96}}\def'{{\tentt \char39}}% + } +} + +\def\bti{\tenbi} +\def\sc{\tensc} + +% Text fonts. +% +\def\textfonts{% + \def\rm{\fam0\tenrm}% + \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm + \textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei + \textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy + \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex + \def\it{\fam\itfam\tenit}\textfont\itfam=\tenit + \def\sl{\fam\slfam\tensl}\textfont\slfam=\tensl + \def\bf{\fam\bffam\tenbf}\textfont\bffam=\tenbf + \scriptfont\bffam=\sevenbf \scriptscriptfont\bffam=\fivebf + \def\tt{\fam\ttfam\tentt}\textfont\ttfam=\tentt + \let\sc = \tensc + \setbox\strutbox=\hbox{\vrule height8.5pt depth3.5pt width\z@}% + \normalbaselineskip=12pt + \normalbaselines \rm +} + + +% Footnote fonts. We generally use eight point. +% +\def\footnotefonts{% + \def\rm{\fam0\eightrm}% + \textfont0=\eightrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm + \textfont1=\eighti \scriptfont1=\seveni \scriptscriptfont1=\fivei + \textfont2=\eightsy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy + \textfont3=\tenex \scriptfont3=\tenex \scriptscriptfont3=\tenex + \def\it{\fam\itfam\eightit}\textfont\itfam=\eightit + \def\sl{\fam\slfam\eightsl}\textfont\slfam=\eightsl + \def\bf{\fam\bffam\eightbf}\textfont\bffam=\eightbf + \scriptfont\bffam=\sevenbf \scriptscriptfont\bffam=\fivebf + \def\tt{\fam\ttfam\eighttt}\textfont\ttfam=\eighttt + \let\sc = \eightsc + \setbox\strutbox=\hbox{\vrule height7pt depth2pt width\z@}% + \normalbaselineskip=9pt + \normalbaselines \rm +} + +% Fonts for the example titles. They are defined in the first example, +% also. +% + +\def\exampletitlefonts{\clearfonts + \let\bf = \elevenbf + \let\bi = \elevenbi + \baselineskip = 13pt \bf +} + +% Fonts for the subsection titles. +% +\def\subsectionfonts{\clearfonts \let\sf = \elevensf + \baselineskip = 12pt \sf +} + + +% Fonts for the section titles. +% +\def\sectionfonts{\clearfonts \let\sf = \fourteensf + \baselineskip = 16pt \sf +} + +% Fonts for the chapter titles. +% +\let\chapternumeralfont = \thirtysixbf + +\def\chapterfonts{\clearfonts \let\bf = \twentysixrm + \baselineskip = 32pt \bf +} + +% Fonts for the table of contents. +% +\def\shorttocfonts{\clearfonts \let\rm = \twelverm + \baselineskip = 20pt \rm +} + +\def\tocfonts{\clearfonts \let\rm = \ninerm + \let\it = \tenit \let\bf = \tenbf + \baselineskip = 12pt \rm +} + +% Fonts for the index. +% + +\def\indexfonts{\clearfonts + \let\rm = \eightrm + \let\it = \eightit + \let\tt = \eighttt + \let\sc = \tensc + \let\sl = \eightsl + \textfont2 = \eightsy % For \AMSTeX. + \let\mflogo = \eightlogo % For \Metafont. + \normalbaselineskip = 10pt \normallineskip = 1.5pt \normalbaselines + \setbox\strutbox=\hbox{\vrule height 7.5pt depth2.5pt width0pt}% + \rm +} + +% Fonts for the inside back cover. +% +\def\conceptpagefonts{\clearfonts + \let\rm = \ninerm + \let\sc = \eightrm + \let\sl = \nineit + \baselineskip = 12pt + \rm +} + +% We don't want any automatic hyphenation within the code font + +\hyphenchar\zhtentt = -1 +\hyphenchar\ententt = -1 +\hyphenchar\zheighttt = -1 +\hyphenchar\eneighttt = -1 + + + +\textfonts diff --git a/Master/texmf-dist/doc/plain/impatient-cn/frontm.tex b/Master/texmf-dist/doc/plain/impatient-cn/frontm.tex new file mode 100644 index 00000000000..1a69abe85e9 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/frontm.tex @@ -0,0 +1,85 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. +% +% Front matter. + +\input macros + + +% Frontmatter is numbered i, ii, ... +\pageno = -1 + + +% Bastard title. +% +% \sinkage +\indent\vskip8em +\centerline{\chapterfonts \TeX\ 急就帖} +\vskip4em +\centerline{\sectionfonts \number\year 年\number\month 月\number\day 日} + +\noheadlinetrue\pagebreak + + +% Title spread. +% +%(title page, lhs) +%\noheadlinetrue\pagebreak +\blankpage + +%(title page, rhs) +%\noheadlinetrue\pagebreak +\blankpage + + +{\input copyrght } +\noheadlinetrue + + +% Dedication. +% +\sinkage +{\it \flushright + 致 Jodi. + ---{\sc p.w.a.} + + 忆信任我的父亲, + ---{\sc k.a.h.} + + 致 Dan. + ---{\sc k.b.} +} +\pagebreak + +% From here on, the convention is that every frontchapter does its own +% ending pagebreak and encloses its fonts in a group if necessary. + +% The preface should start on a right-hand page. + +\blankpage +{\input preface } + +% Contents. +% +% We never want to empty the file after doing the brief contents. +% +\rewritetocfilefalse +% +\blankpage +\frontchapter{简要} + +\shortcontents + + +\ifcompletebook \global\rewritetocfiletrue \fi + +\frontchapter{目录} + +\contents + +\blankpage +{\input read1st } + +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/genops.tex b/Master/texmf-dist/doc/plain/impatient-cn/genops.tex new file mode 100644 index 00000000000..ca9e08a1e0c --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/genops.tex @@ -0,0 +1,5017 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\chapter {Commands for \linebreak general operations} +\chapter {一般操作命令} + +\chapterdef{general} + +%This section covers +%\TeX's ^{programming features} and +%everything else that doesn't fit into the categories +%of commands in the previous chapters. +%For an explanation of the conventions used in this section, +%see \headcit{Descriptions of the commands}{cmddesc}. +这章介绍 \TeX\ 的^{编程功能}和不适合放入前几章的所有内容. +在 \headcit{命令描述}{cmddesc} 一节中, 给出了这章的惯例. + +\begindescriptions + +%========================================================================== +%\section {Naming and modifying fonts} +\section {命名及修改字体} + +%\begindesc +%\bix^^{fonts//naming and modifying} +%\cts font {} +%\aux\cts font {\<control sequence> = \<fontname>} +%\aux\cts font {\<control sequence> = \<fontname> {\bt scaled} \<number>} +%\aux\cts font {\<control sequence> = \<fontname> {\bt at} \<dimen>} +%\explain +%Used alone, the |\font| control sequence designates the current font. +%|\font| isn't a true command when it's used alone, +%since it then can appear only as an argument to another command. +\begindesc +\bix^^{字体//命名及修改字体} +\cts font {} +\aux\cts font {\<control sequence> = \<fontname>} +\aux\cts font {\<control sequence> = \<fontname> {\bt scaled} \<number>} +\aux\cts font {\<control sequence> = \<fontname> {\bt at} \<dimen>} +\explain +单独使用时, |\font| 控制序列指代当前的字体. +|\font| 在这个时候并不是一个真正的命令, +它仅仅作为其它命令的一个参数. + +%For the other three forms of |\font|, +%\<font\-name> names a set of files that define a font. +%These forms of |\font| are commands. Each of these forms has two effects: +%{\tighten +%\olist +%\li It defines \<control sequence> as a name that selects +%the font \<font\-name>, possibly magnified (see below). +%\li It causes \TeX\ to load the font ^{metrics file} +%(^{\tfmfile}) for \<fontname>. +%\endolist +%}% end tighten +其它的三个 |\font| 形式, 字体名 \<font\-name> +用来指代定义一个字体所需要的一系列文件. +在这些形式下, |\font| 是命令. +每种形式都有两个效果: +{\tighten +\olist +\li 它定义了一个名为 \<control sequence> 的控制序列, +用来选择名为 \<font\-name> 的字体, 而且该字体可能被缩放 (见后). +\li 它使 \TeX\ 载入 \<font\-name> 的^{字体信息文件} (^{\tfmfile}). +\endolist +}% end tighten + +%\noindent +%The name of a font file usually indicates its design size. +%For example, |cmr10| indicates Computer Modern roman with a +%design size of $10$ points. +%The design size of a font is recorded in its metrics file. +\noindent +字体的名字往往表示它的设计大小, +比如 |cmr10| 表示设计大写为 $10$ 点的计算机现代字体. +字体的设计大小保存在字体信息文件中. + +%If neither |scaled| \<number> nor |at| \<dimen> +%is present, the font is used +%at its design size---the size at which it usually looks best. +%Otherwise, a magnified version of the font is loaded: +%\ulist +%\li If |scaled| \<number> +%is present, the font is magnified by a factor of $\hbox{\<number>}/1000$. +%\li If |at| \<dimen> is present, the font is scaled to \<dimen> by magnifying +%it by $\hbox{\<dimen>}/ds$, where $ds$ is the design size of +%\<fontname>. +%\<dimen> and $ds$ are nearly always given in points. +%\endulist +%\noindent +%Magnifications of less than $1$ are possible; they reduce the size. +如果用户既没有指定 |scaled| \<number> 也没有指定 |at| \<dimen>, +那么这个字体载入时, 使用设计大小---设计大小的含意是, +字体在这个大小时, 表示最佳. +否则将会载入一个缩放版的字体: +\ulist +\li 如果指定了 |scaled| \<number>, 则字体将被放大 $\hbox{\<number>}/1000$ 倍. +\li 如果指定了 |at| \<dimen>, 则字体通过缩放大 $\hbox{\<dimen>}/ds$ 倍, +变为 \<dimen> 大小, +其中, $ds$ 是 \<fontname> 的设计大小. +\<dimen> 和 $ds$ 的单位往往使用点. +\endulist +\noindent +放大率可以小于 $1$, 这样做就会使字体缩小尺寸. + +%You usually need to provide a shape file (\xref{shape}) for each +%magnification of a font that you load. +%However, some ^{device drivers} can utilize fonts that are resident +%in a printer. ^^{resident fonts} +%Such fonts don't need shape files. +你往往需要为载入的字体的每一个使用的放大率提供一个字体轮廓文件 (\xref{shape}). +当然, 一些^{设备驱动}可以使用打印机内置的字体. +^^{内置字体}这些字体不需要字体轮廓文件. + +%See \conceptcit{font} and +%\conceptcit{magnification} for further information. +更多信息请参见\conceptcit{字体}和\conceptcit{放大率}. + +%\example +%\font\tentt = cmtt10 +%\font\bigttfont = cmtt10 scaled \magstep2 +%\font\eleventtfont = cmtt10 at 11pt +%First we use {\tentt regular CM typewriter}. +%Then we use {\eleventtfont eleven-point CM typewriter}. +%Finally we use {\bigttfont big CM typewriter}. +%| +%\produces +%\font\regttfont = cmtt10 +%\font\bigttfont = cmtt10 scaled \magstep 2 +%\font\eleventtfont = cmtt10 at 11pt +%First we use {\regttfont regular CM typewriter}. +%Then we use {\eleventtfont eleven-point CM typewriter}. +%Finally we use {\bigttfont big CM typewriter}. +%\endexample +%\enddesc +\example +\font\tentt = cmtt10 +\font\bigttfont = cmtt10 scaled \magstep2 +\font\eleventtfont = cmtt10 at 11pt +First we use {\tentt regular CM typewriter}. +Then we use {\eleventtfont eleven-point CM typewriter}. +Finally we use {\bigttfont big CM typewriter}. +| +\produces +\font\regttfont = cmtt10 +\font\bigttfont = cmtt10 scaled \magstep 2 +\font\eleventtfont = cmtt10 at 11pt +First we use {\regttfont regular CM typewriter}. +Then we use {\eleventtfont eleven-point CM typewriter}. +Finally we use {\bigttfont big CM typewriter}. +\endexample +\enddesc + +%\begindesc +%\cts fontdimen {\<number> \<font>\param{dimen}} +%\explain +%^^{fonts//parameters of} +%These parameters specify various dimensions associated with +%the font named by the control sequence \<font> +%(as distinguished from the \<font\-name> that names the font files). +%Values of these parameters are specified in the metrics +%file for \<font>, but you can +%retrieve or change their values during a \TeX\ run. +%The numbers and meanings of the parameters are: +%\display{\halign{\hfil#\hfil\quad&#\hfil\cr +%\it Number&\it Meaning\cr +%\noalign{\vskip 1\jot}% +%1&slant per point\cr +%2&interword space\cr +%3&interword stretch\cr +%4&interword shrink\cr +%5&x-height (size of |1ex|)\cr +%6&quad width (size of |1em|)\cr +%7&extra space\cr}} +%\noindent +%\TeX\ uses the slant per point for positioning accents. +%It uses the interword parameters for producing interword spaces +%(see |\spaceskip|, \xref\spaceskip) and the extra space parameter +%for the additional space after a period (see |\xspaceskip|, +%\xref\xspaceskip). +%The values of these parameters for the +%\plainTeX\ fonts are enumerated on \knuth{page~433}. +%Math symbol fonts have $15$ additional parameters, which we won't discuss here. +\begindesc +\cts fontdimen {\<number> \<font>\param{dimen}} +\explain +^^{字体//字体参数} +这些参数可以用来定义控制序列 \<font> (注意, \<font> 和 \<font\-name> 不同, \<font-name> 是用来表示字体文件的文件名的) 所定义的各种尺寸大小. +这些参数的值, 都在 \<font> 所使用的字体信息文件中定义了, 但是你可以在执行 \TeX\ 时得到或改变这些值. +这些参数的数值及其意义为: +\display{\halign{\hfil#\hfil\quad&#\hfil\cr +\it 数值&\it 意义\cr +\noalign{\vskip 1\jot}% +1&字体每点的倾斜程度\cr +2&词间距\cr +3&词间伸长长度\cr +4&词间收缩长度\cr +5&x 字符的高度(|1ex| 的长度)\cr +6&m 字符的宽度 (|1em| 的长度)\cr +7&额外空白长度\cr}} +\noindent +\TeX\ 需要使用字体每点的倾斜程度来计算重音符号的位置. +使用词间距来控制单词间的距离 (见 |\spaceskip|, \xref\spaceskip). +使用额外空白长度来控制句号以后所留的空白 (见 |\spaceskip|, \xref\spaceskip). +在 \knuth{433~页} 中列出了 \plainTeX\ 中字体所使用的这些参数的数值. +数学符号有另外 $15$ 个参数, 不过我们在此不展开讨论. + +%Beware: +%assignments to these parameters are \emph{not} undone at the end +%of a group. +%If you want to change these parameters locally, you'll need to +%save and restore their original settings explicitly. +%\example +%Here's a line printed normally.\par +%\fontdimen2\font = 3\fontdimen2\font +%% Triple the interword spacing. +%\noindent Here's a really spaced-out line. +%| +%\produces +%Here's a line printed normally.\par +%\dimen0 = \fontdimen2\font % to undo global assignment +%\fontdimen2\font = 3\fontdimen2\font +%% triple the interword spacing +%\noindent Here's a really spaced-out line. +%\fontdimen2\font = \dimen0 +%\endexample +%\enddesc +注意: +这些参数被设定后, 在当前组结束时, 并\emph{不}返回初始值. +如果你只是希望在局部的文本中改变这些值, +你需要将它的原值保存, 以便稍后恢复. +\example +Here's a line printed normally.\par +\fontdimen2\font = 3\fontdimen2\font +% Triple the interword spacing. +\noindent Here's a really spaced-out line. +| +\produces +Here's a line printed normally.\par +\dimen0 = \fontdimen2\font % to undo global assignment +\fontdimen2\font = 3\fontdimen2\font +% triple the interword spacing +\noindent Here's a really spaced-out line. +\fontdimen2\font = \dimen0 +\endexample +\enddesc + +%\begindesc +%\cts magnification {{\bt =} \<number>} +%\cts mag {\param{number}} +%\explain +%\margin{{\tt\\mag} and {\tt\\magnification} combined.} +%An assignment to |\magnification| establishes +%the ``^{scale factor}'' $f$ that determines +%the \minref{magnification} ratio of your document \seeconcept{magnification}. +%The assignment to |\magni!-fication| must occur before the first page +%of your document has been shipped out. +\begindesc +\cts magnification {{\bt =} \<number>} +\cts mag {\param{number}} +\explain +\margin{合并了 {\tt\\mag} 和 {\tt\\magnification}.} +使用 |\magnification| 可以定义“^{缩放因子}”$f$, +缩放因子决定了你的文档的\minref{放大率}\seeconcept{放大率}。 +|\magni!-fication|必须在文档的第一页被编译出前定义。 + +%The assignment sets $f$ to \<number> and also +%sets |\hsize| and |\vsize| +%^^|\hsize//set by {\tt\\magnification}| +%^^|\vsize//set by {\tt\\magnification}| +%respectively to |6.5true in| and |8.9true in|, +%the values appropriate for an $8 \frac1/2$-% +%by-$11$-inch page. +%$f$ must be between $0$ and $32768$. +%The \minref{magnification} ratio of the +%document is $f/1000$. +%A scale factor +%of $1000$ provides unit magnification, i.e., it leaves the size of your +%document +%unchanged. It's customary to use powers of $1.2$ as scale factors, and +%most libraries of fonts are based on such factors. You can use the +%^|\magstep| and ^|\magstephalf| commands to specify magnifications by +%these factors. +这个命令把 $f$ 定义成 \<number> 的同时, +也会定义 |\hsize| 为 |6.5true in|,|\vsize| 为 |8.9true in|, +^^|\hsize//用 {\tt\\magnification} 设定| +^^|\vsize//用 {\tt\\magnification} 设定| +即适合 $8 \frac1/2$ 英尺乘 $11$ 英尺的页面的大小。 +缩放因子 $f$ 的值必需介于 $0$ 到 $32768$ 之间, +它确定了该文档的\minref{放大率}为 $f/1000$。 +因此缩放因子为 $1000$ 就给出了单位放大率,也就是说,它不改变文档的尺寸。 +我们习惯使用 $1.2$ 的幂次值来定义缩放因子, +因为很多的字体就是基于这种因子的。 +用 ^|\magstep| 和 ^|\magstephalf| 命令你可以更方便地定义这种因子。 + +%|\magnification| is not a parameter. You can't use it +%to \emph{retrieve} the scale factor. If you write something like +%|\dimen0 = \mag!-nifi!-cation|, \TeX\ will complain about it. +|\magnification| 不是一个参数,你不能使用它来得到缩放因子。 +如果你使用类似 |\dimen0 = \mag!-nifi!-cation| 之类的语句, +\TeX\ 将会报错。 + +%The |\mag| parameter contains the scale factor. +%Changing the value of |\mag| rescales the page dimensions, which is not +%usually what you want. +%Therefore it's usually better to change the magnification by +%assigning to |\magnification| rather than to |\mag|. +而 |\mag| 参数则包含缩放因子。 +改变 |\mag| 的值也缩放了页面尺寸,而这一般不是你所想要的。 +因此,一般情况下, +最好是使用 |\magnification| 而不是 |\mag| 来改变页面的放大率。% +\footnote{译注:|\mag| 是 \TeX\ 的原始命令, +而 |\magnification| 是 \plainTeX\ 中定义的命令。 +|\magnification| 依赖于 |\mag|, +它用 |\mag| 设置放大率后恢复了默认的页面尺寸。 +在 LaTeX 中没有 |\magnification| 命令, +一般也不建议使用 |\mag| 命令,因为这与 LaTeX 的设计原则相悖。 +} + +%\example +%\magnification = \magstep2 +%% magnify fonts by 1.44 (=1.2x1.2) +%| +%\endexample +%\enddesc +\example +\magnification = \magstep2 +% 把字体放大 1.44 倍 (=1.2x1.2) +| +\endexample +\enddesc + +%\begindesc +%\cts magstep {\<number>} +%\explain +%This command expands to the \minref{magnification} ratio needed to +%magnify everything in your document +%(other than |true| dimensions) +%by $1.2^r$, where $r$ is +%the value of \<number>. \<number> must be between $0$ and $5$. +%\example +%\magnification = \magstep1 % Magnify by ratio of 1.2. +%| +%\endexample +%\enddesc +\begindesc +\cts magstep {\<number>} +\explain +这个命令展开为一个\minref{放大率}因子, +这个因子可以把你文档中所有(除了给定 |true| 尺寸的)东西放大 $1.2^r$ 倍, +其中 $r$ 是 \<number> 的值。 +\<number> 必须在 $0$ 到 $5$ 之间。% +\footnote{译注:即在 \plainTeX\ 中定义 |\magstep1| 为 1200,|\magstep2| 为 1440,等等。} +\example +\magnification = \magstep1 % 放大 1.2 倍. +| +\endexample +\enddesc + +%\begindesc +%\cts magstephalf {} +%\explain +%This command expands to the \minref{magnification} ratio needed to +%magnify everything in your document +%(other than |true| dimensions) +%by $\sqrt{1.2}$, +%i.e., halfway between $1$ and $1.2$. +%\example +%\magnification = \magstephalf +%| +%\endexample +%\eix^^{fonts//naming and modifying} +%\enddesc +\begindesc +\cts magstephalf {} +\explain +这个命令展开为一个\minref{放大率}因子, +这个因子可以把你文档中所有(除了给定 |true| 尺寸的)东西放大 $\sqrt{1.2}$ 倍, +也就是 $1$ 和 $1.2$ 的等比中项。% +\footnote{译注:即在 \plainTeX\ 中定义 |\magstephalf| 为 1095。} +\example +\magnification = \magstephalf +| +\endexample +\eix^^{字体//命名及修改字体} +\enddesc + +%========================================================================== +%\section {Converting information to tokens} +\section {把信息转为记号} + +%\subsection {Numbers} +\subsection {数值} + +%\begindesc +%\xrdef{convert} +%\bix^^{numbers//converting to characters} +%% +%\cts number {\<number>} +%\explain +%This command produces the representation of a \minref{number} +%as a sequence of +%character \minref{token}s. The number can be either an explicit integer, +%a \<number> parameter, or a \<number> register. +%\example +%\number 24 \quad \count13 = -10000 \number\count13 +%| +%\produces +%\number 24 \quad \count13 = -10000 \number\count13 +%\endexample +%\enddesc +\begindesc +\xrdef{convert} +\bix^^{数值//转换为字符} +% +\cts number {\<number>} +\explain +这个命令可以把一个\minref{数}表示成字符\minref{记号}序列。 +这里的数可以是一个确定的整数,或是一个 \<number> 参数, +也可以是一个 \<number> 寄存器。 +\example +\number 24 \quad \count13 = -10000 \number\count13 +| +\produces +\number 24 \quad \count13 = -10000 \number\count13 +\endexample +\enddesc + +%\begindesc +%^^{Roman numerals} +%\easy\cts romannumeral {\<number>} +%\explain +%This command produces the roman numeral representation of a \minref{number} +%as a sequence of +%character \minref{token}s. The number can be either an explicit integer, +%a \<number> parameter, or a \<number> register. +%If the number is zero or negative, |\romannumeral| produces +%no tokens. +%\example +%\romannumeral 24 \quad (\romannumeral -16)\quad +%\count13 = 6000 \romannumeral\count13 +%| +%\produces +%\romannumeral 24 \quad (\romannumeral -16)\quad +%\count13 = 6000 \romannumeral\count13 +%\endexample +% +%\eix^^{numbers//converting to characters} +%\enddesc +\begindesc +^^{罗马数字} +\easy\cts romannumeral {\<number>} +\explain +这个命令可以把一个\minref{数}表示成罗马字符\minref{记号}序列. +这里的数可以是一个确定的整数,或是一个 \<number> 参数, +也可以是一个 \<number> 寄存器。 +如果这个数是负的,则 |\romannumeral| 不产生任何记号。 +\example +\romannumeral 24 \quad (\romannumeral -16)\quad +\count13 = 6000 \romannumeral\count13 +| +\produces +\romannumeral 24 \quad (\romannumeral -16)\quad +\count13 = 6000 \romannumeral\count13 +\endexample + +\eix^^{数值//转换为字符} +\enddesc + +%========================================================================== +%\subsection {Environmental information} +\subsection {环境信息} + +%\begindesc +%^^{time of day} +%\cts time {\param{number}} +%\explain +%\TeX\ sets this parameter to the +%number of minutes that have elapsed since midnight (of the current day). +%At noon, for instance, |\time| is $720$. +%This command and the next three make use of the time and date as +%recorded in your computer. +%\TeX\ retrieves them just once, at the beginning of your run, so |\time| +%at the end of the run always has the same value as |\time| at the +%beginning of the run (unless you've explicitly changed it). +%\enddesc +\begindesc +^^{日期时间} +\cts time {\param{number}} +\explain +\TeX\ 把这个参数设置为从当日午夜到现在所经过的分钟数. +比如在中午, |\time| 就是 $720$. +这个命令和下面的三个命令使用的是你计算机中所记录的时间. +\TeX\ 只在开始运行的时候向系统获取一次时间, +所以如果你不改变这个值的话, +先前运行的 |\time| 和最后运行的 |\time| 的值是完全相同的. +\enddesc + +%\bix^^{date} +%\begindesc +%\cts day {\param{number}} +%\explain +%\TeX\ sets this parameter to the current day of the month. It is +%a number between $1$ and $31$. +%|\day| is set at the beginning of your run (see the comments on +%|\time| above). +%\enddesc +\bix^^{日期} +\begindesc +\cts day {\param{number}} +\explain +\TeX\ 把这个参数设置为今天的日期数. +这是一个介于 $1$ 和 $31$ 之间的数. +|\day| 只在程序开始运行的时候被设定 (见上面 |\time| 的说明). +\enddesc + +%\begindesc +%\cts month {\param{number}} +%\explain +%\TeX\ sets this parameter to the current month. It is +%a number between $1$ and $12$. +%|\month| is set at the beginning of your run (see the comments on +%|\time| above). +%\enddesc +\begindesc +\cts month {\param{number}} +\explain +\TeX\ 把这个参数设置为当前的月份. +这是一个介于 $1$ 和 $12$ 之间的数. +|\time| 只在程序开始运行的时候被设定 (见上面 |\time| 的说明). +\enddesc + +%\begindesc +%\cts year {\param{number}} +%\explain +%\TeX\ sets this parameter to the current year ({\sc A.D.}). +%It is a number such as $1991$. +%|\year| is set at the beginning of your run (see the comments on +%|\time| above) +\begindesc +\cts year {\param{number}} +\explain +\TeX\ 把这个参数设置为当前的 ({\sc 公元}) 年份. +这是一个类似 $1991$ 之类的数. +|\year| 只在程序开始运行的时候被设定 (见上面 |\time| 的说明). + +%\eix^^{date} +%\enddesc +\eix^^{日期} +\enddesc + +%\begindesc +%^^{version number} +%\cts fmtname {} +%\cts fmtversion {} +%\explain +%These commands produce the name and version number +%of the \TeX\ format, +%e.g., \minref{\plainTeX} or ^{\LaTeX}, that you're using. +%\example +%This book was produced with the \fmtname\ format, +%version~\fmtversion. +%| +%\produces +%This book was produced with the \fmtname\ format, +%version~\fmtversion. +%\endexample +%\enddesc +\begindesc +^^{版本号} +\cts fmtname {} +\cts fmtversion {} +\explain +这个命令会产生当前使用的 \TeX\ 格式(比如 \minref{\plainTeX} 或 ^{\LaTeX})的名字和版本号。 +\example +本书使用 \fmtname\ 格式,版本~\fmtversion 。 +| +\produces +本书使用 \fmtname\ 格式,版本~1.9: 26 April 1991 (and plain 3.141592653)。 +\endexample +\enddesc + +%\begindesc +%\cts jobname {} +%\explain +%This command produces the base +%name of the file with which \TeX\ was invoked. +%For example, if your main input file is |hatter.tex|, +%|\jobname| will expand to |hatter|. +%|\jobname| is most useful when you're +%creating an auxiliary file to be associated with a document. +%^^{auxiliary files} +%\example +%\newwrite\indexfile \openout\indexfile = \jobname.idx +%% For input file `hatter.tex', open index file `hatter.idx'. +%| +%\endexample\enddesc +\begindesc +\cts jobname {} +\explain +这个命令产生调用 \TeX\ 的文件的文件本名. +比如你的输入文件为 |hatter.tex|, |\jobname| 会被展开成 |hatter|. +|\jobname| 在你生成文档的辅助文件时会很管用. +^^{辅助文件} +\example +\newwrite\indexfile \openout\indexfile = \jobname.idx +% 打开 `hatter.tex' 的索引文件 `hatter.idx'. +| +\endexample\enddesc + +%========================================================================== +\subsection {变量的值} + +\begindesc +\cts meaning {\<token>} +\explain +^^{记号//显示记号的含义} +这个命令会产生 \<token> 的定义. +它对于诊断输出很有用. +你可以用类似的方法使用 ^|the| 命令 (\xref\the) 来得到 \minref{寄存器}和其它 \TeX\ 中的东西的值信息. +\example +[{\tt \meaning\eject}] [\meaning\tenrm] [\meaning Y] +| +\produces +[{\tt \meaning\eject}] [\meaning\entenrm] [\meaning Y] +\endexample\enddesc + +\begindesc +\cts string {\<control sequence>} +\explain +^^{控制序列//转换为字符串} +这个命令会把 \<control sequence> 表示成其名字的字符串, +包括 \minref{转义符}. +转义符会被表示成当前 ^|\escapechar| 的值. +^^{转义符//用 \b\tt\\escapechar\e 表示} +\TeX\ 把在此中的所有字符的类码设为 $12$ (其它). + +你可以使用 ^|\csname| 命令执行这个命令的反操作 (\xref\csname). +它会把一个字符串转为一个控制序列. +\example +控制序列 {\tt \string\bigbreak} +| +\produces +控制序列 {\tt \string\bigbreak} +\endexample\enddesc + +\begindesc +\cts escapechar {\param{number}} +\explain +这个参数在把一个控制序列名转化为一系列字符标记时, 指定 \TeX\ 用来表示\minref{转义符}的字符的 \ascii\ 码\minrefs{ascii}. +^^{转义符//用 \b\tt\\escapechar\e 表示} +这个转化发生在你使用 |\string|命令时或者 \TeX\ 在产生诊断信息时. +转义符的默认值是 $92$, 即 ^{右斜杠} 的 \ascii\ 码. +如果 |\escapechar| 不在 $0$--$255$ 之间, \TeX\ 则在转换时不包括转义符. +\example +\escapechar = `!! +控制序列 {\tt \string\bigbreak} +| +\produces +\escapechar = `! +控制序列 {\tt \string\bigbreak} +\endexample +\enddesc + +\begindesc +\cts fontname {\<font>} +\explain +^^{字体名称} +这个命令产生 \<font> 的字体文件名. +该字体名就是定义 \<font> 时所的 \<font\-name>. +\example +\font\myfive=cmr5 [\fontname\myfive] +| +\produces +\font\myfive=cmr5 [\fontname\myfive] +\endexample +\enddesc + + +%========================================================================== +%\section {Grouping} +\section {编组} + +%\begindesc +%\bix^^{groups} +\begindesc +\bix^^{编组} +% +%\cts begingroup {} +%\cts endgroup {} +%\explain +%These two commands begin and end a \minref{group}. +%A |\begingroup| does not match up with a right brace, +%nor an |\endgroup| with a left brace. +\cts begingroup {} +\cts endgroup {} +\explain +这两个命令开始或结束一个\minref{编组}。 +|\begingroup| 不会和右花括号匹配,|\endgroup| 也不会和左花括号匹配。 + +%\TeX\ treats |\begingroup| and |\endgroup| like any other +%\minref{control sequence} when it's scanning its input. In particular, +%you can define a \minref{macro} that contains a |\begingroup| +%but not an |\endgroup|, and conversely. +%^^{macros//using \b\tt\\begingroup\e\ and \b\tt\\endgroup\e\ in} +%This technique is often useful +%when you're defining paired macros, one of which establishes +%an environment and the other of which terminates that environment. +%You can't, however, use |\begingroup| and |\endgroup| as substitutes for +%braces other than the ones that surround a group. +%\example +%\def\a{One \begingroup \it two } +%\def\enda{\endgroup four} +%\a three \enda +%| +%\produces +%\def\a{One \begingroup \it two } +%\def\enda{\endgroup four} +%\a three \enda +%\endexample +%\enddesc +在扫描输入时,\TeX\ 如同其它\minref{控制序列}一样对待 |\begingroup| 和 |\endgroup|。 +尤其体现在,你可以定义一个包括 |\begingroup| 但不包括 |\endgroup| 的宏, +或者与之相反。 +^^{宏//使用 \b\tt\\begingroup\e\ 和 \b\tt\\endgroup\e} +这个技巧往往在你定义一对宏时会非常有用,一个用来开始一个环境, +另一个用来结束这个环境。 +但是你不可以使用 |\begingroup| 和 |\endgroup| +来替换除了用来括起一个组以外功能的花括号。 +\example +\def\a{一 \begingroup \it 二 } +\def\enda{\endgroup 四} +\a 三 \enda +| +\produces +\def\a{一 \begingroup \it 二 } +\def\enda{\endgroup 四} +\a 三 \enda +\endexample +\enddesc + +%\begindesc +%\makecolumns 4/2: +%\easy% +%\ctsact { \xrdef{@lbrace} +%\cts bgroup {} +%\ctsact } \xrdef{@rbrace} +%\cts egroup {} +%\explain +%The left and right braces are commands that begin and end a +%\minref{group}. +%The |\bgroup| and |\egroup| \minref{control sequence}s are equivalent +%to `|{|' and `|}|', except that +%\TeX\ treats |\bgroup| and |\egroup| like any other +%\minref{control sequence} when it's scanning its input. +\begindesc +\makecolumns 4/2: +\easy% +\ctsact { \xrdef{@lbrace} +\cts bgroup {} +\ctsact } \xrdef{@rbrace} +\cts egroup {} +\explain +左花括号和右花括号命令的作用是用来开始或结束一个\minref{编组}。 +除了在扫描输入时 \TeX\ 会把 |\bgroup| 和 |\egroup| +像其它\minref{控制序列}一样对待以外, +|\bgroup| 和 |\egroup| \minref{控制序列}与 `|{|' 和 `|}|'是等价的。 + +%|\bgroup| and |\egroup| can be useful when you're +%defining paired macros, one of which +%starts a brace-delimited construct (not necessarily a group) +%and the other one of which ends that construct. +%^^{macros//using \b\tt\\bgroup\e\ and \b\tt\\egroup\e\ in} +%You can't define such macros using ordinary braces---if you try, +%your macro definitions will contain unmatched braces +%and will therefore be unacceptable to \TeX. +%Usually you should use these commands only when you can't use +%ordinary braces. +当你定义两个成对的宏时,|\bgroup| 和 |\egroup| 会非常有用。 +这两个宏中其中一个开始一个由花括号定界的结构(不一定是一个组), +而另一个结束该结构。 +^^{宏//用 \b\tt\\bgroup\e\ 和 \b\tt\\egroup\e} +你不能使用常规的花括号来定义这样的宏,否则你的宏定义会包含没有匹配的花括号, +而这样的定义是不被 \TeX\ 所接受的。 +一般情况下你需要在你没有办法使用花括号时使用这些命令。 + +%\example +%Braces define the {\it boundaries\/} of a group. +%| +%\produces +%Braces define the {\it boundaries\/} of a group. +%\nextexample +%\def\a{One \vbox\bgroup} +%% You couldn't use { instead of \bgroup here because +%% TeX would not recognize the end of the macro +%\def\enda#1{{#1\egroup} two} +%% This one is a little tricky, since the \egroup actually +%% matches a left brace and the following right brace +%% matches the \bgroup. But it works!! +%\a \enda{\hrule width 1in} +%| +%\produces +%\def\a{One \vbox\bgroup} +%% You couldn't use { instead of \bgroup here because +%% TeX would not recognize the end of the macro +%\def\enda#1{{#1\egroup} two} +%% This one is a little tricky, since the \egroup actually +%% matches a left brace and the following right brace +%% matches the \bgroup. But it works! +%\a \enda{\hrule width 1in} +%\endexample +%\enddesc +\example +一个编组的 {\it 边界\/} 可由花括号定义. +| +\produces +一个编组的~{\it 边界\/}~可由花括号定义. +\nextexample +\def\a{一 \vbox\bgroup} +% 在这里你不能使用一个 { 来代替 \bgroup, +% 否则 TeX 不会识别这个宏 +\def\enda#1{{#1\egroup} 二} +% 这有点技巧性, 因为 \egroup 事实上和左花括号匹配, +% 而它右边的右边的花括号和 \bgroup 匹配. +% 不过这个歪门邪道行得通!! +\a \enda{\hrule width 1in} +| +\produces +\def\a{一 \vbox\bgroup} +% 在这里你不能使用一个 { 来代替 \bgroup, +% 否则 TeX 不会识别这个宏 +\def\enda#1{{#1\egroup} 二} +% 这有点技巧性, 因为 \egroup 事实上和左花括号匹配, +% 而它右边的右边的花括号和 \bgroup 匹配. +% 不过这花招能用!! +\a \enda{\hrule width 1in} +\endexample +\enddesc + +%\begindesc +%\cts global {} +%\explain +%This command makes the following definition +%or \minref{assignment} \minref{global} \seeconcept{global} so that it +%becomes effective independent of \minref{group} boundaries. +%You can apply a |\global| prefix to any kind of definition +%or \minref{assignment}, +%including a \minref{macro} definition or a \minref{register} assignment. +%\example +%{\global\let\la = \leftarrow} +%$a \la b$ +%| +%\produces +%% for safety's sake we fake this one! +%\let\la = \leftarrow +%$a \la b$ +%\endexample +%\enddesc +\begindesc +\cts global {} +\explain +这个命令使得它随后的定义或\minref{赋值}成为\minref{全局}性的% +\seeconcept{全局的},而不是仅局限在所处的\minref{组}之中生效。 +你可以把 |\global| 放在 +包括宏定义和\minref{寄存器}赋值在内的任何定义或\minref{赋值}前。 +\example +{\global\let\la = \leftarrow} +$a \la b$ +| +\produces +% for safety's sake we fake this one! +\let\la = \leftarrow +$a \la b$ +\endexample +\enddesc + +%\begindesc +%\cts globaldefs {\param{number}} +%\explain +%This parameter controls whether or not \TeX\ takes definitions +%and other assignments to be +%\minref{global}: +%\ulist +%\li If |\globaldefs| is zero (as it is by default), a definition is global +%if and only if it is preceded by |\global| either explicitly or implicitly. +%(The ^|\gdef| and ^|\xdef| commands (\xref\gdef) have an implicit +%|\global| prefix). +%\li If |\globaldefs| is greater than zero, all assignments and +%definitions are implicitly prefixed by ^|\global|. +%\li If |\globaldefs| is less than zero, all ^|\global| prefixes are ignored. +%\endulist +%\enddesc +\begindesc +\cts globaldefs {\param{number}} +\explain +这个参数控制 \TeX\ 是否把定义和其它的赋值作为\minref{全局}的: +\ulist +\li 如 |\globaldefs| 是 (默认值) 零, +当且仅当一个定义是由直接或者间接的 |\global| 命令指定的. +(^|\gdef| 和 ^|\xdef| 命令 (\xref\gdef) 间接地在定义前面加了 |\global| 命令). +\li 如果 |\globaldefs| 大于零, 所有的定义和赋值都会间接地在前面加上 ^|global|. +\li 如果 |\globaldefs| 小于零, 所有的 ^|\global| 都被忽略. +\endulist +\enddesc + +%\begindesc +%\margin{Order of {\tt\\aftergroup} and {\tt\\afterassignment} changed.} +%\cts aftergroup {\<token>} +%\explain +%When \TeX\ encounters this command during input, +%it saves \<token>. +%After the end of the current \minref{group}, +%it inserts \<token> back into the input and expands it. +%If a group contains several |\aftergroup|s, the corresponding tokens +%are \emph{all} inserted following the end of the group, in the order +%in which they originally appeared. +\begindesc +\margin{改变了 {\tt\\aftergroup} 和 {\tt\\afterassignment} 顺序.} +\cts aftergroup {\<token>} +\explain +当 \TeX\ 在读取输入时遇到了这个命令,它就把 \<token> 保存下来。 +并在当前\minref{组}后插入展开后的 \<token>。 +如果一个编组有好几个 |\aftergroup|,则每个标记\emph{全}都会依次插入这个编组的最后。 + +%The example that follows shows how you can use |\aftergroup| to postpone +%processing a token that you generate within a \minref{conditional test}. +%\example +%\def\neg{negative} \def\pos{positive} +%% These definitions are needed because \aftergroup applies +%% to a single token, not to a sequence of tokens or even +%% to a brace-delimited text. +%\def\arith#1{Is $#1>0$? \begingroup +% \ifnum #1>-1 Yes\aftergroup\pos +% \else No\aftergroup\neg\fi +% , it's \endgroup. } +%\arith 2 +%\arith {-1} +%| +%\produces +%\def\neg{negative} \def\pos{positive} +%% These definitions are needed because \aftergroup applies +%% to a single token, not a sequence of tokens or even +%% a group. +%\def\arith#1{Is $#1>0$? \begingroup +% \ifnum #1>-1 Yes\aftergroup\pos +% \else No\aftergroup\neg\fi +% , it's \endgroup. } +%\arith 2 +%\arith {-1} +%\endexample +%\eix^^{groups} +%\enddesc +下面的例子向你展示了如何用 |\aftergroup| 来延迟处理一个在\minref{条件测试}中产生的标记. +\example +\def\neg{负} \def\pos{正} +% 因为一个 \aftergroup 只能作用到一个标记上, +% 而不是到一系列的标记上, 甚至不能是一个用括号定界的文本, +% 所以下面的代码是必需的. +\def\arith#1{是否 $#1>0$? \begingroup + \ifnum #1>-1 是\aftergroup\pos + \else 否\aftergroup\neg\fi + , 它是\endgroup. } +\arith 2 +\arith {-1} +| +\produces +\def\neg{负} \def\pos{正} +% 因为一个 \aftergroup 只能作用到一个标记上, +% 而不是到一系列的标记上, 甚至不能是一个用括号定界的文本, +% 所以下面的代码是必需的. +\def\arith#1{是否 $#1>0$? \begingroup + \ifnum #1>-1 是\aftergroup\pos + \else 否\aftergroup\neg\fi + , 它是\endgroup. } +\arith 2 +\arith {-1} +\endexample +\eix^^{编组} +\enddesc + +%\begindesc +%\cts afterassignment {\<token>} +%\explain +%When \TeX\ encounters this command it saves \<token> in a special +%place. After it next performs an \minref{assignment}, it inserts +%\<token> into the input and expands it. If you call |\afterassignment| +%more than once before an assignment, only the last call has any effect. +%One use of |\afterassignment| +%is in writing \minref{macro}s for commands intended to be written +%in the +%form of assignments, as in the example below. +\begindesc +\cts afterassignment {\<token>} +\explain +当 \TeX\ 遇到这个命令,它会把 \<token> 保存在一个特殊的地方。 +在它下次执行赋值时,它会把展开后的 \<token> 放到其后。 +如果你调用了几次 |\afterassignment|,那仅有最后一次是生效的。 +|\afterassignment| 命令的一个用处是可以写定义形式的\minref{宏}命令, +例子如下。 + +%See \knuth{page~279} for a precise description +%of the behavior of |\afterassignment|. +%\example +%\def\setme{\afterassignment\setmeA\count255} +%\def\setmeA{$\number\count255\advance\count255 by 10 +% +10=\number\count255$} +%Some arithmetic: \setme = 27 +%% After expanding \setme, TeX sets \count255 to 27 and +%% then calls \setmeA. +%| +%\produces +%\def\setme{\afterassignment\setmeA\count255} +%\def\setmeA{$\number\count255\advance\count255 by 10 +%+10=\number\count255$} +%Some arithmetic: \setme = 27 +%% After expanding \setme, TeX sets \count255 to 27 and +%% then calls \setmeA. +%\endexample +%\enddesc +精确的 |\afterassignment| 行为定义请参见 \knuth{page~279}. +\example +\def\setme{\afterassignment\setmeA\count255} +\def\setmeA{$\number\count255\advance\count255 by 10 + +10=\number\count255$} +算术式: \setme = 27 +% 在展开 \setme 以后, TeX 把 \count255 +% 设为 27, 然后调用 \setmeA. +| +\produces +\def\setme{\afterassignment\setmeA\count255} +\def\setmeA{$\number\count255\advance\count255 by 10 + +10=\number\count255$} +算术式: \setme = 27 +% 在展开 \setme 以后, TeX 把 \count255 +% 设为 27, 然后调用 \setmeA. +\endexample +\enddesc + + +%========================================================================== +%\section {Macros} +\section {宏} + +%========================================================================== +%\subsection {Defining macros} +\subsection {定义宏} + +%\begindesc +%\bix^^{macros} +%\bix^^{macros//defining} +%\xrdef{mac1}% begin the section on macros +%% +%\cts def {\<control sequence> \<parameter text> \rqbraces{\<replacement text>}} +%\explain +%This command defines \<control sequence> as a \minref{macro} with the +%specified \<parameter text> and \<replacement text>. +%See \xrefpg{macro} for a full explanation of how to write a macro +%definition. +%\example +%\def\add#1+#2=?{#1+#2&= +% \count255=#1 \advance\count255 by #2 \number\count255\cr} +%$$\eqalign{ +% \add 27+9=? +% \add -5+-8=?}$$ +%| +%\dproduces +%\def\add#1+#2=?{#1+#2&= +% \count255=#1 \advance\count255 by #2 \number\count255\cr} +%$$\eqalign{ +% \add 27+9=? +% \add -5+-8=?}$$ +%\endexample +%\enddesc +\begindesc +\bix^^{宏} +\bix^^{宏//定义宏} +\xrdef{mac1}% begin the section on macros +% +\cts def {\<control sequence> \<parameter text> \rqbraces{\<replacement text>}} +\explain +这个命令根据 \<parameter text> 和 \<replacement text> 把 \<control sequence> 定义为一个\minref{宏}。 +请参阅\xrefpg{宏}获取关于如何定义宏的完整信息。 +\example +\def\add#1+#2=?{#1+#2&= + \count255=#1 \advance\count255 by #2 \number\count255\cr} +$$\eqalign{ + \add 27+9=? + \add -5+-8=?}$$ +| +\dproduces +\def\add#1+#2=?{#1+#2&= + \count255=#1 \advance\count255 by #2 \number\count255\cr} +$$\eqalign{ + \add 27+9=? + \add -5+-8=?}$$ +\endexample +\enddesc + +%\begindesc +%\cts edef {\<control sequence> \<parameter text> \rqbraces{\<replacement text>}} +%\explain +%This command defines a macro in the same general way as |\def|. +%The difference is that \TeX\ expands the \<replacement text> +%of an |\edef| immediately (but still without executing anything). +%Thus any definitions within the \<replacement text> are expanded, but +%assignments and commands that produce things such as boxes and glue +%are left as is. For example, an |\hbox| command within +%the \<replacement text> of an |\edef| remains as a command and is not +%turned into a box as \TeX\ is processing the definition. +%It isn't always obvious what's expanded and what isn't, but you'll +%find a complete list of expandable control sequences on +%\knuth{pages~212--215}. +\begindesc +\cts edef {\<control sequence> \<parameter text> \rqbraces{\<replacement text>}} +\explain +这个命令和 |\def| 一样可以定义宏. +唯一的区别在于, \TeX\ 会把 |\edef| 的 \<replacement text> 立即展开 (但是不会执行它). +因此, 任何在 \<replacement text> 中的内容会被展开, 但那些产生盒子或粘连的排列或命令依然保持原来的样子. +比如 \TeX\ 在处理这个定义时, 在由 |\edef| 的定义中的 \<replacement text> 中的 |\hbox| 命令依然会保持命令竹的格式, 而不会变成一个盒子. +一般情况下, 并不能明显看出什么会被展开, 什么不会, 但你可以在 \knuth{页~212-215} 找到一张可被展开的控制序列列表. + +%You can inhibit the expansion of a control sequence that would otherwise +%be expanded by using |\no!-expand| (\xref\noexpand). ^^|\noexpand| +%You can postpone the expansion of a control sequence by using +%^|\expandafter| (\xref\expandafter). +你可以使用 |\no!-expand| 命令 (\xref\noexpand) 来阻止一个控制序列的展开. +^^|\noexpand| +你可以使用 ^|\expandafter| (\xref\expandafter) 命令来延迟一个控制序列的展开. + +%The |\write|, |\message|, |\errmessage|, |\wlog|, and |\csname| +%commands expand their +%token lists using the same rules that |\edef| uses to expand its +%replacement text. +%^^|\write//expanded by {\tt\\edef} rules| +%^^|\message//expanded by {\tt\\edef} rules| +%^^|\errmessage//expanded by {\tt\\edef} rules| +%^^|\wlog//expanded by {\tt\\edef} rules| +%^^|\csname//expanded by {\tt\\edef} rules| +%\example +%\def\aa{xy} \count255 = 1 +%\edef\bb{w\ifnum \count255 > 0\aa\fi z} +%% equivalent to \def\bb{wxyz} +%\def\aa{} \count255 = 0 % leaves \bb unaffected +%\bb +%| +%\produces +%\def\aa{xy} \count255 = 1 +%\edef\bb{w\ifnum \count255 > 0\aa\fi z} +%% equivalent to \def\bb{wxyz} +%\def\aa{} \count255 = 0 % leaves \bb unaffected +%\bb +%\endexample +%\enddesc +|\write|, |\message|, |\errmessage|, |\wlog| 和 |\csname| 命令会把它们的标记使用和 |\edef| 替换文本相同的法则进行展开. +^^|\write//用 {\tt\\edef} 规则展开| +^^|\message//用 {\tt\\edef} 规则展开| +^^|\errmessage//用 {\tt\\edef} 规则展开| +^^|\wlog//用 {\tt\\edef} 规则展开| +^^|\csname//用 {\tt\\edef} 规则展开| +\example +\def\aa{xy} \count255 = 1 +\edef\bb{w\ifnum \count255 > 0\aa\fi z} +% 和 \def\bb{wxyz} 等价 +\def\aa{} \count255 = 0 % 不影响 \bb +\bb +| +\produces +\def\aa{xy} \count255 = 1 +\edef\bb{w\ifnum \count255 > 0\aa\fi z} +% 和 \def\bb{wxyz} 等价 +\def\aa{} \count255 = 0 % 不影响 \bb +\bb +\endexample +\enddesc + +%\begindesc +%\cts gdef {\<control sequence> \<parameter text> \rqbraces{\<replacement text>}} +%\explain +%This command is equivalent to |\global\def|. +%\enddesc +\begindesc +\cts gdef {\<control sequence> \<parameter text> \rqbraces{\<replacement text>}} +\explain +这个命令等价于 |\global\def|. +\enddesc + +%\begindesc +%\cts xdef {\<control sequence> \<parameter text> \rqbraces{\<replacement text>}} +%\explain +%This command is equivalent to |\global\edef|. +%\enddesc +\begindesc +\cts xdef {\<control sequence> \<parameter text> \rqbraces{\<replacement text>}} +\explain +这个命令等价于 |\global\edef|. +\enddesc + +%\begindesc +%\cts long {} +%\explain +%This command is used as a prefix to a \minref{macro} definition. +%It tells \TeX\ that the arguments to the macro are permitted to include +%|\par| tokens (\xref{\@par}), which normally indicate the end of a paragraph. +%^^|\par//in macro arguments| +%If \TeX\ +%tries to expand a macro defined without |\long| and any of +%the macro's arguments include a |\par| token, +%\TeX\ will complain about a runaway argument. The purpose +%of this behavior is to provide you with some protection against unterminated +%macro arguments. +%|\long| gives you a way of bypassing the protection. +%\example +%\long\def\aa#1{\par\hrule\smallskip#1\par\smallskip\hrule} +%\aa{This is the first line.\par +%This is the second line.} +%% without \long, TeX would complain +%| +%\produces +%\medskip +%\long\def\aa#1{\par\hrule\smallskip#1\par\smallskip\hrule} +%\aa{This is the first line.\par +%This is the second line.} +%% without \long, TeX would complain +%\endexample +%\enddesc +\begindesc +\cts long {} +\explain +这个命令加在\minref{宏}定义前面. +它告诉 \TeX\ 该宏的参数可以包括 |\par| 标记 (\xref{\@par}), +该标记一般表示一个段的结束. +^^|\par//在宏参量中| +如果 \TeX\ 尝试把一个没有 |\long| 的宏定义展开, +而该宏的任意一部分的参数包括了一个 |\par| 标记, +\TeX\ 就会报错错这是一个失控的参数. +这个行为的目的, 是为了确保宏参数的完整结束. +而 |\long| 就给你提供了一个回避这个行为的方法. +\example +\long\def\aa#1{\par\hrule\smallskip#1\par\smallskip\hrule} +\aa{这是第一行.\par +这是第二行.} +% 没有 \long, TeX 会报错 +| +\produces +\medskip +\long\def\aa#1{\par\hrule\smallskip#1\par\smallskip\hrule} +\aa{这是第一行.\par +这是第二行.} +% 没有 \long, TeX 会报错 +\endexample +\enddesc + +%\begindesc +%\cts outer {} +%\explain +%\null ^^{outer} +%This command is used as a prefix to a \minref{macro} definition. +%It tells \TeX\ that the macro is outer (\xref{outer}) +%and cannot be used in certain contexts. +%If the macro is used in a forbidden context, \TeX\ will complain. +\begindesc +\cts outer {} +\explain +\null ^^{外部的} +这个命令加在\minref{宏}定义前。 +它告诉 \TeX\ 这个宏是外部的(\xref{外部的}), +所以不能在某些情况中使用。 +如果这个宏出现在那些被禁止的情下,\TeX\ 会报错。 + +%\example +%\outer\def\chapterhead#1{% +% \eject\topglue 2in \centerline{\bf #1}\bigskip} +%% Using \chapterhead in a forbidden context causes an +%% error message. +%| +%\endexample +%\enddesc +\example +\outer\def\chapterhead#1{% + \eject\topglue 2in \centerline{\bf #1}\bigskip} +% 在一个被禁止的情况下使用 \chapterhead +% 会出现错误信息. +| +\endexample +\enddesc + +%\begindesc +%\cts chardef {\<control sequence>=\<charcode>} +%\explain +%^^{characters//defined by \b\tt\\chardef\e} +%This command defines \<control sequence> +%to be \<charcode>. +%Although |\chardef| is most often used to define characters, you can also +%use it to give a name to a number in the range $0$--$255$ even when you +%aren't using that number as a character code. +%\example +%\chardef\percent = `\% 21\percent, {\it 19\percent} +%% Get the percent character in roman and in italic +%| +%\produces +%\chardef\percent = `\% +%21\percent, {\it 19\percent} +%% You'll get the percent character in roman and in italic +%\endexample +%\enddesc +\begindesc +\cts chardef {\<control sequence>=\<charcode>} +\explain +^^{字符//用 \b\tt\\chardef\e 定义} +上面的命令把 \<charcode> 定义为 \<control sequence>. +虽然 |\chardef| 常在定义字符时用到, +你也可以使用它来给 $0$--$255$ 之间的任何一个数定义一个名字, +即使你没用以字符码的形式使用该数. +\example +\chardef\percent = `\% 21\percent, {\it 19\percent} +% 排印出正体和意大利体的百分号 +| +\produces +\chardef\percent = `\% +21\percent, {\it 19\percent} +% 排印出正体和意大利体的百分号 +\endexample +\enddesc + +%\begindesc +%^^{math characters} +%^^{mathcodes} +%\cts mathchardef {\<control sequence>=\<mathcode>} +%\explain +%This command defines \<control sequence> as a math character +%with the given \minrefs{mathcode}\<mathcode>. +%The control sequence will only be legal in math mode. +%\example +%\mathchardef\alphachar = "010B % As in plain TeX. +%$\alphachar$ +%| +%\produces +%\mathchardef\alphachar = "010B % As in plain TeX. +%$\alphachar$ +%\endexample +%\eix^^{macros//defining} +%\enddesc +\begindesc +^^{数学字符} +^^{数学码} +\cts mathchardef {\<control sequence>=\<mathcode>} +\explain +这个命令把 \<control sequence> 定义为一个给定\minref{数学字符码}的数学字符. +这个控制序列仅在数学模式下有效 +\example +\mathchardef\alphachar = "010B % 类似 plain TeX 的定义 +$\alphachar$ +| +\produces +\mathchardef\alphachar = "010B % 类似 plain TeX 的定义 +$\alphachar$ +\endexample +\eix^^{宏//定义宏} +\enddesc + +%========================================================================== +%\subsection {Other definitions} +\subsection {其它定义方法} + +%\begindesc +%\cts let {\<control sequence> = \<token>} +%\explain +%^^{control sequences//defining with \b\tt\\let\e} +%\minrefs{token} +%This command causes +%\<control sequence> to acquire the current meaning of \<token>. +%Even if you redefine \<token> later, the meaning of \<control sequence> +%will not change. Although \<token> is most commonly a control sequence, +%it can also be a \minref{character} token. +%\enddesc +\begindesc +\cts let {\<control sequence> = \<token>} +\explain +^^{控制序列//用 \b\tt\\let\e 定义} +\minrefs{token} +这个命令会使得 \<control sequence> 去获取当前 \<token> 的含义. +即使你对 \<token> 重新定义, \<control sequence> 的含义仍然不变. +虽然 \<token> 一般情况下都是一个控制序列, +它其实也可以是一个\minref{字符}标记. +\enddesc + +%\begindesc +%\cts futurelet {\<control sequence> \<token$_1$> \<token$_2$>} +%\explain +%This command tells \TeX\ to make \<token$_2$> the meaning of +%\<control sequence> (as would be done with |\let|), and then to +%process \<token$_1$> and \<token$_2$> normally. +%|\futurelet| is useful at the end of macro definitions +%because it gives you a way of looking beyond the token that \TeX\ +%is about to process before it processes it. +%\example +%\def\predict#1{\toks0={#1}\futurelet\next\printer} +%% \next will acquire the punctuation mark after the +%% argument to \predict +%\def\printer#1{A \punc\ lies ahead for \the\toks0. } +%\def\punc{% +% \ifx\next;semicolon\else +% \ifx\next,comma\else +% ``\next''\fi\fi} +%\predict{March}; \predict{April}, \predict{July}/ +%| +%\produces +%\def\predict#1{\toks0={#1}\futurelet\next\printer} +%\def\printer#1{A \punc\ lies ahead for \the\toks0. } +%\def\punc{% +% \ifx\next;semicolon\else +% \ifx\next,comma\else +% ``\next''\fi\fi +% } +%\predict{March}; +%\predict{April}, +%\predict{July}/ +%\endexample +%\enddesc +\begindesc +\cts futurelet {\<control sequence> \<token$_1$> \<token$_2$>} +\explain +这个命令告诉 \TeX\ 把 \<token$_2$> 的设为 \<control sequence> 的定义 +(可以由 |\let| 完成), +然后按正常的方式来处理 \<token$_1$> 和 \<token$_2$>. +在宏定义的最后 |\futurelet| 很有用, 因为它可以给你提供一个 +在 \TeX\ 处理未处理的标记前, 查看它后面的标记的方法. +\example +\def\predict#1{\toks0={#1}\futurelet\next\printer} +% \next 会获取 \predict 后的标点符号. +\def\printer#1{一个 \punc\ 放在 \the\toks0 前. } +\def\punc{% + \ifx\next;分号\else + \ifx\next,逗号\else + ``\next''\fi\fi} +\predict{三月}; \predict{四月}, \predict{七月}/ +| +\produces +\def\predict#1{\toks0={#1}\futurelet\next\printer} +% \next 会获取 \predict 后的标点符号. +\def\printer#1{一个 \punc\ 放在 \the\toks0 前. } +\def\punc{% + \ifx\next;分号\else + \ifx\next,逗号\else + ``\next''\fi\fi + } +\predict{三月}; \predict{四月}, \predict{七月}/ +\endexample +\enddesc + +%\begindesc +%\cts csname {\<token list> {\bt \\endcsname}} +%\xrdef{\endcsname} +%\explain +%This command produces a control sequence from \<token list>. +%It provides a way of synthesizing control sequences, +%including ones that you can't normally write. +%\<token list> can itself include control sequences; it is expanded +%in the same way as the replacement text of an |\edef| definition (\xref\edef). +%If the final expansion +%yields anything that isn't a character, \TeX\ will complain. +%|\csname| goes from a list of tokens to a control sequence; +%you can go the other way with ^|\string| \ctsref\string. +%\example +%\def\capTe{Te} +%This book purports to be about \csname\capTe X\endcsname. +%| +%\produces +%\def\capTe{Te} +%This book purports to be about \csname\capTe X\endcsname. +%\endexample +%\enddesc +\begindesc +\cts csname {\<token list> {\bt \\endcsname}} +\xrdef{\endcsname} +\explain +这个命令可以由 \<token list> 产生一个控制序列. +它提供了一种把标记合并成控制序列的方式, +包括一些你一般情况下不能直接写的形式. +|\csname| 命令会把它们的标记使用和 |\edef| 替换文本相同的法则进行展开 (\xref\edef). +如果最后的展开会产生不是字符的东西, \TeX\ 会报错. +|\csname| 把一系列的标记转为一个控制序列; +你可以用 ^|\string| \ctsref\string 的方法做相反的事情. +\example +\def\capTe{Te} +本书关于 \csname\capTe X\endcsname. +| +\produces +\def\capTe{Te} +本书关于 \csname\capTe X\endcsname. +\endexample +\enddesc + +%========================================================================== +%\subsection {Controlling expansion} +\subsection {控制展开} + +%\begindesc +%\bix^^{macros//controlling expansion of} +%\cts expandafter {\<token$_1$> \<token$_2$>} +%\explain +%This command tells \TeX\ to expand \<token$_1$> according to its rules +%for \minref{macro} expansion \emph{after} it has expanded \<token$_2$> +%by one level. It's useful when \<token$_1$> is something like `|{|' +%^^|{//with {\tt\\expandafter}| +%or ^|\string| that inhibits expansion of \<token$_2$>, +%but you want to expand \<token$_2$> nevertheless. +%\example +%\def\aa{xyz} +%\tt % Use this font so `\' prints that way. +%[\string\aa] [\expandafter\string\aa] +%[\expandafter\string\csname TeX\endcsname] +%| +%\produces +%\def\aa{xyz} +%\tt +%[\string\aa] [\expandafter\string\aa] +%[\expandafter\string\csname TeX\endcsname] +%\endexample +%\enddesc +\begindesc +\bix^^{宏//控制宏展开} +\cts expandafter {\<token$_1$> \<token$_2$>} +\explain +这个命令会让 \TeX\ 在展开一层 \<token$_2$> 后把 \<token$_1$> 根据\minref{宏}展开法则进行展开. +有时你想展开 \<token$_2$>, +而它前面有类似 `|{|' 或 ^|\string| 的东西阻止它的展开, +^^|{//和 {\tt\\expandafter} 一起| +这时这个命令会非常有用. +\example +\def\aa{xyz} +\tt % Use this font so `\' prints that way. +[\string\aa] [\expandafter\string\aa] +[\expandafter\string\csname TeX\endcsname] +| +\produces +\def\aa{xyz} +\tt +[\string\aa] [\expandafter\string\aa] +[\expandafter\string\csname TeX\endcsname] +\endexample +\enddesc + +%\begindesc +%\cts noexpand {\<token>} +%\explain +%This command tells \TeX\ to +%suppress expansion of \<token> if \<token> is a +%\minref{control sequence} that can be expanded. +%If \<token> can't be expanded, e.g., it's a letter, +%\TeX\ acts as though the |\noexpand| wasn't there +%and processes \<token> normally. +%In other words the expansion of `|\noexpand|\<token>' +%is simply \<token> no matter what \<token> happens to be. +%\example +%\def\bunny{rabbit} +%\edef\magic{Pull the \noexpand\bunny\ out of the hat!! } +%% Without \noexpand, \bunny would always be replaced +%% by `rabbit' +%\let\oldbunny=\bunny \def\bunny{lagomorph} \magic +%\let\bunny=\oldbunny \magic +%| +%\produces +%\def\bunny{rabbit} +%\edef\magic{Pull the \noexpand\bunny\ out of the hat! } +%% Without \noexpand, \bunny would always be replaced +%% by `rabbit' +%\let\oldbunny=\bunny \def\bunny{lagomorph} \magic +%\let\bunny=\oldbunny \magic +%\endexample +%\enddesc +\begindesc +\cts noexpand {\<token>} +\explain +这个命令让 \TeX\ 跳过一个可以展开的标记 \<token> 的展开. +如果 \<token> 不能被展开, 比如它是一个字符, +\TeX\ 则不会理会 |\noexpand|, 而把 \<token> 按一般的方法处理. +\example +\def\bunny{兔子} +\edef\magic{把 \noexpand\bunny\ 从帽子中取出!! } +% 如果没有 \noexpand, \bunny 会永远替换为 `兔子' +\let\oldbunny=\bunny \def\bunny{兔} \magic +\let\bunny=\oldbunny \magic +| +\produces +\def\bunny{兔子} +\edef\magic{把 \noexpand\bunny\ 从帽子中取出!! } +% 如果没有 \noexpand, \bunny 会永远替换为 `兔子' +\let\oldbunny=\bunny \def\bunny{兔} \magic +\let\bunny=\oldbunny \magic +\endexample +\enddesc + +%\begindesc +%\cts the {\<token>} +%\explain +%This command generally expands to a list of \minref{character} tokens +%that represents \<token>. \<token> can be any of the following: +\begindesc +\cts the {\<token>} +\explain +这个命令一般会把 \<token> 展开, 表示成一个\minref{字符}串. +其中 \<token> 可以是以下的任何形式: + +%\ulist\compact +%\li a \TeX\ \minref{parameter}, e.g., |\parindent| or |\deadcycles| +%^^{parameters//using \b\tt\\the\e\ with} +%\li a \minref{register}, e.g., |\count0| +%^^{registers//with \b\tt\\the\e} +%\margin{Item for special registers removed} +%\li a code associated with an input character, e.g., |\catcode`(| +%\li a font parameter, e.g., |\fontdimen3\sevenbf| +%\li the ^|\hyphenchar| or ^|\skewchar| of a font, e.g., +%|\skewchar\teni| +%\li ^|\lastpenalty|, ^|\lastskip|, or ^|\lastkern| (values derived from +%the last item on the current horizontal \minrefs{horizontal list} +%or \minref{vertical list}) +%\li a control sequence defined by ^|\chardef| or +%^|\mathchardef| +%\endulist +\ulist\compact +\li \TeX\ \minref{参数}, 比如, |\parindent| 或者 |\deadcycles| +^^{参数//和 \b\tt\\the\e\ 一起使用} +\li \minref{寄存器}, 比如, |\count0| +^^{寄存器//和 \b\tt\\the\e 一起} +\margin{去除了特殊寄存器的那项} +\li 输入字符的字符码, 比如, |\catcode`(| +\li 字符参数, 比如, |\fontdimen3\sevenbf| +\li 字体的 ^|\hyphenchar| 或 ^|\skewchar|, 比如, |\skewchar\teni| +\li ^|\lastpenalty|, ^|\lastskip|, 或者 ^|\lastkern| +(当前的水平\minrefs{水平列表}或\minref{竖直列表}的最后一项的数值). +\li ^|\chardef| 或 ^|\mathchardef| 定义的控制序列 +\endulist + +%\noindent +%In addition, |\the| can expand to noncharacter tokens in the following two +%cases: +%\ulist\compact +%\li |\the| \<font>, which expands to the most recently defined +%control sequence that selects +%the same font as the control sequence \<font> +%\li |\the| \<token variable>, which expands to a copy of the value of the +%variable, e.g., |\the\everypar| +%\endulist +\noindent +此外, |\the| 可以在下面两种情况下, 展开成非字符标记: +\ulist\compact +\li |\the| \<font>, 会展开成当前定义的控制序列, +这个控制序列和控制序列 \<font> 所选择的字体相同. +\li |\the| \<token variable>, 会复制变量的值, 并且对复本进行展开, +比如 |\the\everypar| +\endulist + +%See \knuth{pages~214--215} for a more detailed description of what +%|\the| does in various cases. +%\example +%The vertical size is currently \the\vsize. +%The category code of `(' is \the\catcode `(. +%| +%\produces +%The vertical size is currently \the\vsize. +%The category code of `(' is \the\catcode `(. +%\endexample +%\enddesc +请参阅 \knuth{页~214--215} 来获取 |\the| 在各种情况下行为的更详细描述. +\example +目前页面的竪直长度为 \the\vsize. +`(' 字符的类码是 \the\catcode `(. +| +\produces +目前页面的竪直长度为 \the\vsize. +`(' 字符的类码是 \the\catcode `(. +\endexample +\enddesc + +%{\tighten +%\see \headcit{Converting information to tokens}{convert}, +%|\showthe| (\xref\showthe). +%\par} +{\tighten +\see \headcit{把信息改为标记}{convert}, +|\showthe| (\xref\showthe). +\par} + +\eix^^{宏//控制宏展开} + +%========================================================================== +%\subsection {Conditional tests} +\subsection {条件测试} + +%\begindesc +%\xrdef{conds} +%\bix^^{conditional tests} +%% +%\ctspecial if {\<token$_1$> \<token$_2$>}\ctsxrdef{@if} +%\explain +%{\emergencystretch=1em +%This command tests if \<token$_1$> and \<token$_2$> +%have the same \minref{character} code, independent of their +%\minref{category code}s. +%Before performing the test, \TeX\ expands tokens following the |\if| +%until it obtains two tokens that can't be expanded further. +%These two tokens become \<token$_1$> and \<token$_2$>. +%The expansion +%includes replacing a control sequence |\let| equal to a character token +%by that character token. +%A \minref{control sequence} that can't be further expanded is +%considered to have character code $256$.\par} +%\example +%\def\first{abc} +%\if\first true\else false\fi; +%% ``c'' is left over from the expansion of \first. +%% It lands in the unexecuted ``true'' part. +%\if a\first\ true\else false\fi; +%% Here ``bc'' is left over from the expansion of \first +%\if \hbox\relax true\else false\fi +%% Unexpandable control sequences test equal with ``if'' +%| +%\produces +%\def\first{abc} +%\if\first true\else false\fi; +%% ``c'' is left over from the expansion of \first. +%% It lands in the unexecuted ``true'' part. +%\if a\first\ true\else false\fi; +%% Here ``bc'' is left over from the expansion of \first +%\if \hbox\relax true\else false\fi +%% Unexpandable control sequences test equal with ``if'' +%\endexample +%\enddesc +\begindesc +\xrdef{conds} +\bix^^{条件测试} +% +\ctspecial if {\<token$_1$> \<token$_2$>}\ctsxrdef{@if} +\explain +此命令测试 \<token$_1$> 和 \<token$_2$> 的\minref{字符}编码是否相同, +不区分它们的\minref{类别码}。 +在测试之前,\TeX\ 展开 |\if| 之后的记号,直到得到两个无法继续展开的记号。 +这两个记号就是 \<token$_1$> 和 \<token$_2$>。 +展开过程也包括将控制序列替换为用 |\let| 设定的某个字符记号。 +\TeX\ 将无法继续展开的\minref{控制序列}视为字符编码 $256$ 的记号。 +\example +\def\first{abc} +\if\first true\else false\fi; +% ``c'' is left over from the expansion of \first. +% It lands in the unexecuted ``true'' part. +\if a\first\ true\else false\fi; +% Here ``bc'' is left over from the expansion of \first +\if \hbox\relax true\else false\fi +% Unexpandable control sequences test equal with ``if'' +| +\produces +\def\first{abc} +\if\first true\else false\fi; +% ``c'' is left over from the expansion of \first. +% It lands in the unexecuted ``true'' part. +\if a\first\ true\else false\fi; +% Here ``bc'' is left over from the expansion of \first +\if \hbox\relax true\else false\fi +% Unexpandable control sequences test equal with ``if'' +\endexample +\enddesc + +%\begindesc +%\ctspecial ifcat {\<token$_1$> \<token$_2$>}\ctsxrdef{@ifcat} +%\explain +%^^{category codes//testing} +%This command tests if \<token$_1$> and \<token$_2$> +%have the same \minref{category code}. +%Before performing the test, \TeX\ expands tokens following the |\ifcat| +%until it obtains two tokens that can't be expanded further. +%These two tokens become \<token$_1$> and \<token$_2$>. +%The expansion +%includes replacing a control sequence |\let| equal to a character token +%by that character token. +%A \minref{control sequence} that can't be further expanded is +%considered to have category code $16$. +%\example +%\ifcat axtrue\else false\fi; +%\ifcat ]}true\else false\fi; +%\ifcat \hbox\day true\else false\fi; +%\def\first{12345} +%\ifcat (\first true\else false\fi +%% ``2345'' lands in the true branch of the test +%| +%\produces +%\ifcat axtrue\else false\fi; +%\ifcat ]}true\else false\fi; +%\ifcat \hbox\day true\else false\fi; +%\def\first{12345} +%\ifcat (\first true\else false\fi +%% ``2345'' lands in the true branch of the test +%\endexample +%\enddesc +\begindesc +\ctspecial ifcat {\<token$_1$> \<token$_2$>}\ctsxrdef{@ifcat} +\explain +^^{类别码//测试类别码} +此命令测试 \<token$_1$> 和 \<token$_2$> 的\minref{类别码}是否相同。 +在测试之前,\TeX\ 展开 |\ifcat| 之后的记号,直到得到两个无法继续展开的记号。 +这两个记号就是 \<token$_1$> 和 \<token$_2$>。 +展开过程也包括将控制序列替换为用 |\let| 设定的某个字符记号。 +\TeX\ 将无法继续展开的\minref{控制序列}视为类别码 $16$ 的记号。 +\example +\ifcat axtrue\else false\fi; +\ifcat ]}true\else false\fi; +\ifcat \hbox\day true\else false\fi; +\def\first{12345} +\ifcat (\first true\else false\fi +% ``2345'' lands in the true branch of the test +| +\produces +\ifcat axtrue\else false\fi; +\ifcat ]}true\else false\fi; +\ifcat \hbox\day true\else false\fi; +\def\first{12345} +\ifcat (\first true\else false\fi +% ``2345'' lands in the true branch of the test +\endexample +\enddesc + +%\begindesc +%\ctspecial ifx {\<token$_1$> \<token$_2$>}\ctsxrdef{@ifx} +%\explain +%This command tests if \<token$_1$> and \<token$_2$> agree. +%Unlike |\if| and |\ifcat|, |\ifx| does \emph{not} expand the tokens +%following |\ifx|, so \<token$_1$> and \<token$_2$> are the two +%tokens immediately after |\ifx|. +%There are three cases: +%\olist +%\li If one token is a \minref{macro} and the other one isn't, +%the tokens don't agree. +%\li If neither token is a macro, the tokens agree if: +%\olist +%\li both tokens are characters (or control sequences denoting characters) and +%their \minref{character} codes and \minref{category code}s agree, or +%\li both tokens refer to the same \TeX\ command, +%font, etc. +%\endolist +%\li If both tokens are macros, the tokens agree if: +%\olist\compact +%\li their ``first level'' expansions, i.e., +%their replacement texts, are identical, and +%\li they have the same status with respect to ^|\long| (\xref\long) +%and ^|\outer| (\xref\outer). +%\endolist +%Note in particular that \emph{any two undefined control +%sequences agree}. +%\endolist +%\noindent +%This test is generally more useful than |\if|. +%\example +%\ifx\alice\rabbit true\else false\fi; +%% true since neither \rabbit nor \alice is defined +%\def\a{a}% +%\ifx a\a true\else false\fi; +%% false since one token is a macro and the other isn't +%\def\first{\a}\def\second{\aa}\def\aa{a}% +%\ifx \first\second true\else false\fi; +%% false since top level expansions aren't the same +%\def\third#1:{(#1)}\def\fourth#1?{(#1)}% +%\ifx\third\fourth true\else false\fi +%% false since parameter texts differ +%| +%\produces +%\ifx\alice\rabbit true\else false\fi; +%% true since neither \rabbit nor \alice is defined +%\def\a{a}% +%\ifx a\a true\else false\fi; +%% false since one token is a macro and the other isn't +%\def\first{\a}\def\second{\aa}\def\aa{a}% +%\ifx \first\second true\else false\fi; +%% false since top level expansions aren't the same +%\def\third#1:{(#1)}\def\fourth#1?{(#1)}% +%\ifx\third\fourth true\else false\fi +%% false since parameter texts differ +%\endexample +%\enddesc +\begindesc +\ctspecial ifx {\<token$_1$> \<token$_2$>}\ctsxrdef{@ifx} +\explain +此命令测试 \<token$_1$> 和 \<token$_2$> 是否相同。 +与 |\if| 和 |\ifcat| 不同,|\ifx| 命令\emph{不会}展开 |\ifx| 之后的记号, +因此 \<token$_1$> 和 \<token$_2$> 就是紧随 |\ifx| 之后的两个记号。 +\TeX\ 按照如下三种情形处理: +\olist +\li 如果一个记号是\minref{宏}而另一个记号不是,则这两个记号不相同。 +\li 如果两个记号都不是宏,它们满足下面条件之一时相同: +\olist +\li 两个记号都是字符(或表示字符的控制序列), +且它们的\minref{字符}编码和\minref{类别码}相同; +\li 两个记号指代相同的 \TeX\ 命令或字体等。 +\endolist +\li 如果两个记号都是宏,它们满足下面两个条件时相同: +\olist\compact +\li 它们的``第一层''展开即它们的替换文本相同; +\li 它们有相同的 ^|\long|(\xref\long )和 ^|\outer|(\xref\outer )状态。 +\endolist +注意特别地\emph{任何两个未定义的控制序列是相同的}。 +\endolist +\noindent +此测试通常比 |\if| 更为有用。 +\example +\ifx\alice\rabbit true\else false\fi; +% true since neither \rabbit nor \alice is defined +\def\a{a}% +\ifx a\a true\else false\fi; +% false since one token is a macro and the other isn't +\def\first{\a}\def\second{\aa}\def\aa{a}% +\ifx \first\second true\else false\fi; +% false since top level expansions aren't the same +\def\third#1:{(#1)}\def\fourth#1?{(#1)}% +\ifx\third\fourth true\else false\fi +% false since parameter texts differ +| +\produces +\ifx\alice\rabbit true\else false\fi; +% true since neither \rabbit nor \alice is defined +\def\a{a}% +\ifx a\a true\else false\fi; +% false since one token is a macro and the other isn't +\def\first{\a}\def\second{\aa}\def\aa{a}% +\ifx \first\second true\else false\fi; +% false since top level expansions aren't the same +\def\third#1:{(#1)}\def\fourth#1?{(#1)}% +\ifx\third\fourth true\else false\fi +% false since parameter texts differ +\endexample +\enddesc + +%\begindesc +%\ctspecial ifnum {\<number$_1$> \<relation> \<number$_2$>}\ctsxrdef{@ifnum} +%\explain +%^^{numbers//comparing} +%This command tests if \<number$_1$> and \<number$_2$> +%satisfy \<relation>, which must be either `|<|', `|=|', or `|>|'. +%The numbers can be constants such as |127|, count registers such as +%|\pageno| or |\count22|, or numerical parameters such as |\hbadness|. +%Before performing the test, \TeX\ expands tokens following the |\ifnum| +%until it obtains a sequence of tokens having +%the form \<number$_1$> \<relation> \<number$_2$>, followed by a token +%that can't be part of \<number$_2$>. +%\example +%\count255 = 19 \ifnum \count255 > 12 true\else false\fi +%| +%\produces +%\count255 = 19 \ifnum \count255 > 12 true\else false\fi +%\endexample +%\enddesc +\begindesc +\ctspecial ifnum {\<number$_1$> \<relation> \<number$_2$>}\ctsxrdef{@ifnum} +\explain +^^{数//比较两个数} +此命令测试 \<number$_1$> 和 \<number$_2$> 是否满足 \<relation>, +即 `|<|'、`|=|' 或者 `|>|' 关系。 +这两个数可以是类似 |127| 的常数、类似 |\pageno| 或 |\count22| 的计数寄存器% +或者类似 |\hbadness| 的数值参数。 +在执行测试之前,\TeX\ 展开 |\ifnum| 之后的记号, +直到它得到一串形如 \<number$_1$> \<relation> \<number$_2$> 的记号序列, +而且随后的记号不能成为 \<number$_2$> 的一部分。 +\example +\count255 = 19 \ifnum \count255 > 12 true\else false\fi +| +\produces +\count255 = 19 \ifnum \count255 > 12 true\else false\fi +\endexample +\enddesc + +%\begindesc +%\ctspecial ifodd {\<number>}\ctsxrdef{@ifodd} +%\explain +%^^{numbers//testing for odd/even} +%This command tests if \<number> is odd. +%Before performing the test, \TeX\ expands tokens following the |\ifodd| +%until it obtains a sequence of tokens having the form \<number>, +%followed by a token that can't be part of \<number>. +%\example +%\count255 = 19 +%\ifodd 5 true\else false\fi +%| +%\produces +%\ifodd 5 true\else false\fi +%\endexample +%\enddesc +\begindesc +\ctspecial ifodd {\<number>}\ctsxrdef{@ifodd} +\explain +^^{数//测试奇偶性} +此命令测试 \<number> 是否为奇数。 +在执行测试之前,\TeX\ 展开 |\ifodd| 之后的记号, +直到它得到一串形如 \<number> 的记号序列, +而且随后的记号不能成为 \<number> 的一部分。 +\example +\count255 = 19 +\ifodd 5 true\else false\fi +| +\produces +\ifodd 5 true\else false\fi +\endexample +\enddesc + +%\begindesc +%\ctspecial ifdim {\<dimen$_1$> \<relation> \<dimen$_2$>}\ctsxrdef{@ifdim} +%\explain +%^^{dimensions//comparing} +%This command tests if \<dimen$_1$> and \<dimen$_2$> +%satisfy \<relation>, which must be either `|<|', `|=|', or `|>|'. +%The dimensions can be constants such as |1in|, dimension registers +%such as |\dimen6|, or dimension parameters such as |\parindent|. +%Before performing the test, \TeX\ expands tokens following the |\ifdim| +%until it obtains a sequence of tokens having +%the form \<dimen$_1$> \<relation> \<dimen$_2$>, followed by a token +%that can't be part of \<dimen$_2$>. +% +%\example +%\dimen0 = 1000pt \ifdim \dimen0 > 3in true\else false\fi +%| +%\produces +%\dimen0 = 1000pt \ifdim \dimen0 > 3in true\else false\fi +%\endexample +%\enddesc +\begindesc +\ctspecial ifdim {\<dimen$_1$> \<relation> \<dimen$_2$>}\ctsxrdef{@ifdim} +\explain +^^{尺寸//比较两个尺寸} +此命令测试 \<dimen$_1$> 和 \<dimen$_2$> 是否满足 \<relation>, +即 `|<|'、`|=|' 或 `|>|' 关系。这两个尺寸可以是类似 |1in| 的常数、 +类似 |\dimen6| 的尺寸寄存器或者类似 |\parindent| 的尺寸参数。 +在执行测试之前,\TeX\ 展开 |\ifdim| 之后的记号, +直到它得到一串形如 \<dimen$_1$> \<relation> \<dimen$_2$> 的记号序列, +而且随后的记号不能成为 \<dimen$_2$> 的一部分。 +\example +\dimen0 = 1000pt \ifdim \dimen0 > 3in true\else false\fi +| +\produces +\dimen0 = 1000pt \ifdim \dimen0 > 3in true\else false\fi +\endexample +\enddesc + +%\begindesc +%\ctspecial ifhmode {}\ctsxrdef{@ifhmode} +%\ctspecial ifvmode {}\ctsxrdef{@ifvmode} +%\ctspecial ifmmode {}\ctsxrdef{@ifmmode} +%\ctspecial ifinner {}\ctsxrdef{@ifinner} +%\explain +%^^{horizontal mode//testing for} +%^^{vertical mode//testing for} +%^^{math mode//testing for} +%^^{internal mode//testing for} +%These commands test what \minref{mode} \TeX\ is in: +%\ulist +%\li |\ifhmode| is true if \TeX\ is in ordinary or restricted horizontal mode. +%\li |\ifvmode| is true if \TeX\ is in ordinary or internal vertical mode. +%\li |\ifmmode| is true if \TeX\ is in text math or display math mode. +%\li |\ifinner| is true if \TeX\ is in an ``internal'' mode: +%restricted horizontal, internal vertical, or text math. +%\endulist +%\example +%\def\modes{{\bf +% \ifhmode +% \ifinner IH\else H\fi +% \else\ifvmode +% \ifinner \hbox{IV}\else \hbox{V}\fi +% \else\ifmmode \hbox{M}\else +% error\fi\fi\fi}} +%Formula $\modes$; then \modes, +% \hbox{next \modes\ and \vbox{\modes}}. +%\par\modes +%| +%\produces +%\def\modes{{\bf +% \ifhmode +% \ifinner IH\else H\fi +% \else\ifvmode +% \ifinner \hbox{IV}\fi +% \else\ifmmode \hbox{M}\else +% error\fi\fi\fi}} +%Formula $\modes$; then \modes, +% \hbox{next \modes\ and \vbox{\modes}}. +%\par\noindent{\bf V} % sorry folks, we have to fake this one +%\endexample +%\enddesc +\begindesc +\ctspecial ifhmode {}\ctsxrdef{@ifhmode} +\ctspecial ifvmode {}\ctsxrdef{@ifvmode} +\ctspecial ifmmode {}\ctsxrdef{@ifmmode} +\ctspecial ifinner {}\ctsxrdef{@ifinner} +\explain +^^{水平模式//测试水平模式} +^^{竖直模式//测试竖直模式} +^^{数学模式//测试数学模式} +^^{内部模式//测试内部模式} +这些命令测试 \TeX\ 处于何种模式中: +\ulist +\li |\ifhmode| 为真,如果 \TeX\ 处于普通或受限水平模式中。 +\li |\ifvmode| 为真,如果 \TeX\ 处于普通或内部竖直模式中。 +\li |\ifmmode| 为真,如果 \TeX\ 处于文内数学或陈列数学模式中。 +\li |\ifinner| 为真,如果 \TeX\ 处于``内部''模式中: +即位于受限水平模式、内部竖直模式或者文内数学模式中。 +\endulist +\example +\def\modes{{\bf + \ifhmode + \ifinner IH\else H\fi + \else\ifvmode + \ifinner \hbox{IV}\else \hbox{V}\fi + \else\ifmmode \hbox{M}\else + error\fi\fi\fi}} +Formula $\modes$; then \modes, + \hbox{next \modes\ and \vbox{\modes}}. +\par\modes +| +\produces +\def\modes{{\bf + \ifhmode + \ifinner IH\else H\fi + \else\ifvmode + \ifinner \hbox{IV}\fi + \else\ifmmode \hbox{M}\else + error\fi\fi\fi}} +Formula $\modes$; then \modes, + \hbox{next \modes\ and \vbox{\modes}}. +\par\noindent{\bf V} % sorry folks, we have to fake this one +\endexample +\enddesc + +%\begindesc +%\ctspecial ifhbox {\<register>}\ctsxrdef{@ifhbox} +%\ctspecial ifvbox {\<register>}\ctsxrdef{@ifvbox} +%\ctspecial ifvoid {\<register>}\ctsxrdef{@ifvoid} +%\explain +%^^{hboxes//testing for} +%^^{vboxes//testing for} +%^^{boxes//testing if void} +%These commands test the contents of +%the box register numbered \<reg\-ister>. +%Let \<register> be $n$. Then: +%\ulist +%\li |\ifhbox| is true if |\box|$\,n$ is an \minref{hbox}. +%\li |\ifvbox| is true if |\box|$\,n$ is an \minref{vbox}. +%\li |\ifvoid| is true if |\box|$\,n$ is void, i.e, doesn't have +%a box in it. +%\endulist +%\example +%\setbox0 = \vbox{} % empty but not void +%\setbox1 = \hbox{a} +%\setbox2 = \box1 % makes box1 void +%\ifvbox0 true\else false\fi; +%\ifhbox2 true\else false\fi; +%\ifvoid1 true\else false\fi +%| +%\produces +%\setbox0 = \vbox{} +%\setbox1 = \hbox{a} +%\setbox2 = \box1 % empties box1 +%\ifvbox0 true\else false\fi; +%\ifhbox2 true\else false\fi; +%\ifvoid1 true\else false\fi +%\endexample +%\enddesc +\begindesc +\ctspecial ifhbox {\<register>}\ctsxrdef{@ifhbox} +\ctspecial ifvbox {\<register>}\ctsxrdef{@ifvbox} +\ctspecial ifvoid {\<register>}\ctsxrdef{@ifvoid} +\explain +^^{水平盒子//测试水平盒子} +^^{竖直盒子//测试竖直盒子} +^^{盒子//测试空盒子} +这些命令测试编号为 \<reg\-ister> 的盒子寄存器的内容。 +设编号 \<register> 为 $n$。则有: +\ulist +\li |\ifhbox| 为真,如果 |\box|$\,n$ 是一个\minref{水平盒子}。 +\li |\ifvbox| 为真,如果 |\box|$\,n$ 是一个\minref{竖直盒子}。 +\li |\ifvoid| 为真,如果 |\box|$\,n$ 是空的,即它不包含盒子。 +\endulist +\example +\setbox0 = \vbox{} % empty but not void +\setbox1 = \hbox{a} +\setbox2 = \box1 % makes box1 void +\ifvbox0 true\else false\fi; +\ifhbox2 true\else false\fi; +\ifvoid1 true\else false\fi +| +\produces +\setbox0 = \vbox{} +\setbox1 = \hbox{a} +\setbox2 = \box1 % empties box1 +\ifvbox0 true\else false\fi; +\ifhbox2 true\else false\fi; +\ifvoid1 true\else false\fi +\endexample +\enddesc + +%\begindesc +%\ctspecial ifeof {\<number>}\ctsxrdef{@ifeof} +%\explain +%^^{end of file, testing for} +%\minrefs{file} +%This command tests an input stream for end of file. +%It is true if input stream \<number> has not been opened, +%or has been opened and the associated file has been entirely read in +%(or doesn't exist). +%\enddesc +\begindesc +\ctspecial ifeof {\<number>}\ctsxrdef{@ifeof} +\explain +^^{文件尾测试} +\minrefs{file} +此命令测试输入流文件是否结束。 +它为真当且仅当第 \<number> 个输入流还没打开, +或者已经打开但对应的文件已经全部读完(或文件不存在)。 +\enddesc + +%\begindesc +%\ctspecial ifcase +%{\<number>\<case$_0$ text> {\bt \\or }\<case$_1$ text> {\bt \\or} +% $\ldots$ {\bt \\or} \<case$_n$ text>\hfil\break +%\hglue 3pc{\bt \\else} \<otherwise text> {\bt \\fi}} +%\ctsxrdef{@ifcase} +%\ctsxrdef{@or} +%\explain +%^^{case testing} +%This command introduces a test with numbered multiple cases. +%If \<num\-ber> has the value $k$, \TeX\ will expand \<case$_k$ text> if +%it exists, and \<other\-wise text> if it doesn't. You can omit the |\else|---% +%in this case, \TeX\ won't expand anything if none of the cases are satisfied. +%\example +%\def\whichday#1{\ifcase #1<day 0>\or Sunday\or Monday% +% \or Tuesday\or Wednesday\or Thursday\or Friday% +% \or Saturday\else Nonday\fi +% \ is day \##1. } +%\whichday2 \whichday3 \whichday9 +%| +%\produces +%\def\whichday#1{\ifcase #1<day 0>\or Sunday\or Monday% +% \or Tuesday\or Wednesday\or Thursday\or Friday% +% \or Saturday\else Nonday\fi +% \ is day \##1. } +%\whichday2 \whichday3 \whichday9 +%\endexample +%\enddesc +\begindesc +\ctspecial ifcase +{\<number>\<case$_0$ text> {\bt \\or }\<case$_1$ text> {\bt \\or} + $\ldots$ {\bt \\or} \<case$_n$ text>\hfil\break +\hglue 3pc{\bt \\else} \<otherwise text> {\bt \\fi}} +\ctsxrdef{@ifcase} +\ctsxrdef{@or} +\explain +^^{分支测试} +此命令引入一个带编号的多重分支测试。 +假设 \<num\-ber> 的值为 $k$,在 \<case$_k$ text> 存在时 \TeX\ 将展开它, +否则就展开 \<other\-wise text>。你可以省略 |\else| ——% +此时,在各个分支都不满足时 \TeX\ 将不展开任何东西。 +\example +\def\whichday#1{\ifcase #1<day 0>\or Sunday\or Monday% + \or Tuesday\or Wednesday\or Thursday\or Friday% + \or Saturday\else Nonday\fi + \ is day \##1. } +\whichday2 \whichday3 \whichday9 +| +\produces +\def\whichday#1{\ifcase #1<day 0>\or Sunday\or Monday% + \or Tuesday\or Wednesday\or Thursday\or Friday% + \or Saturday\else Nonday\fi + \ is day \##1. } +\whichday2 \whichday3 \whichday9 +\endexample +\enddesc + +%\begindesc +%\ctspecial iftrue {}\ctsxrdef{@iftrue} +%\ctspecial iffalse {}\ctsxrdef{@iffalse} +%\explain +%These commands are equivalent to tests that are always true or always +%false. The main use of these commands is in defining macros that keep +%track of the result of a test. +%\example +%\def\isbigger{\let\bigger=\iftrue} +%\def\isnotbigger{\let\bigger=\iffalse} +%% These \let's MUST be buried in macros!! If they aren't, +%% TeX erroneously tries to match them with \fi. +%\def\test#1#2{\ifnum #1>#2 \isbigger\else\isnotbigger\fi} +%\test{3}{6} +%\bigger$3>6$\else$3\le6$\fi +%| +%\produces +%\def\isbigger{\let\bigger=\iftrue} +%\def\isnotbigger{\let\bigger=\iffalse} +%% These \let's MUST be buried in macros! +%% If they aren't, TeX erroneously tries to match them with \fi +%\def\test#1#2{\ifnum #1>#2 \isbigger\else\isnotbigger\fi} +%\test{3}{6} +%\bigger$3>6$\else$3\le6$\fi +%\endexample +%\enddesc +\begindesc +\ctspecial iftrue {}\ctsxrdef{@iftrue} +\ctspecial iffalse {}\ctsxrdef{@iffalse} +\explain +这两个命令提供始终为真或始终为假的测试。它们主要用于在宏定义中记录测试结果。 +\example +\def\isbigger{\let\bigger=\iftrue} +\def\isnotbigger{\let\bigger=\iffalse} +% These \let's MUST be buried in macros!! If they aren't, +% TeX erroneously tries to match them with \fi. +\def\test#1#2{\ifnum #1>#2 \isbigger\else\isnotbigger\fi} +\test{3}{6} +\bigger$3>6$\else$3\le6$\fi +| +\produces +\def\isbigger{\let\bigger=\iftrue} +\def\isnotbigger{\let\bigger=\iffalse} +% These \let's MUST be buried in macros! +% If they aren't, TeX erroneously tries to match them with \fi +\def\test#1#2{\ifnum #1>#2 \isbigger\else\isnotbigger\fi} +\test{3}{6} +\bigger$3>6$\else$3\le6$\fi +\endexample +\enddesc + +%\begindesc +%\ctspecial else {} \ctsxrdef{@else} +%\explain +%This command introduces the ``false'' alternative of a conditional test. +%\enddesc +\begindesc +\ctspecial else {} \ctsxrdef{@else} +\explain +此命令提供条件测试为``假''时的另一选择。 +\enddesc + +%\begindesc +%\ctspecial fi {} \ctsxrdef{@fi} +%\explain +%This command ends the text of a conditional test. +%\enddesc +\begindesc +\ctspecial fi {} \ctsxrdef{@fi} +\explain +此命令结束条件测试文本。 +\enddesc + +%\begindesc +%\ctspecial newif {{\bt \\if}\<test name>}\ctsxrdef{@newif} +%\explain +%This command names a trio of control sequences with names |\alpha!-true|, +%|\alphafalse|, +%and |\ifalpha|, where |alpha| is \<test name>. +%You can use them to define your own tests by +%creating a logical variable that records +%true\slash false information: +%\ulist\compact +%\li |\alphatrue| sets the logical variable |alpha| true. +%\li |\alphafalse| sets the logical variable |alpha| false +%\li |\ifalpha| is a conditional test that is true if the logical +%variable |alpha| is true and false otherwise. +%\endulist +%The logical variable |alpha| doesn't really exist, but \TeX\ behaves as +%though it did. After |\newif\ifalpha|, the logical variable is initially +%false. +% +%|\newif| is an outer command, so you can't use it inside a macro +%definition. +%\example +%\newif\iflong \longtrue +%\iflong Rabbits have long ears. +%\else Rabbits don't have long ears.\fi +%| +%\produces +%\newif\iflong +%\longtrue +%\iflong Rabbits have long ears.\else Rabbits don't have long ears.\fi +%\endexample +%\eix^^{conditional tests} +%\enddesc +\begindesc +\ctspecial newif {{\bt \\if}\<test name>}\ctsxrdef{@newif} +\explain +假设 \<test name> 为 |alpha|,此命令命名了三个控制序列 +|\alpha!-true|、|\alphafalse| 和 |\ifalpha|。 +通过创建记录真\slash 假信息的逻辑变量,你可以定义自己的测试: +\ulist\compact +\li |\alphatrue| 设定逻辑变量 |alpha| 为真; +\li |\alphafalse| 设定逻辑变量 |alpha| 为假; +\li |\ifalpha| 是一个条件测试,它为真当且仅当逻辑变量 |alpha| 为真。 +\endulist +该逻辑变量 |alpha| 实际上不存在,但 \TeX\ 假装它是存在的。 +在执行 |\newif\ifalpha| 后,该逻辑变量的初始值为假。 + +|\newif| 是一个外部命令,因此你不能在宏定义中使用它。 +\example +\newif\iflong \longtrue +\iflong Rabbits have long ears. +\else Rabbits don't have long ears.\fi +| +\produces +\newif\iflong +\longtrue +\iflong Rabbits have long ears.\else Rabbits don't have long ears.\fi +\endexample +\eix^^{条件测试} +\enddesc + + +%========================================================================== +%\subsection {Repeated actions} +\subsection {重复操作} + +%{\def\test{{\bt \\if}$\Omega$}% +%\begindesc +%\bix^^{repeated actions} +%\bix^^{loops} +%\cts loop {$\alpha$ {\test} $\beta$ {\bt \\repeat}} +%\ctspecial repeat {}\ctsxrdef{@repeat} +%\explain +%These commands provide a looping construct for \TeX. +%Here $\alpha$ and $\beta$ are arbitrary sequences of commands +%and \test\ is any of the conditional tests described in +%\headcit{Conditional tests}{conds}. +%The |\repeat| replaces the |\fi| corresponding to the test, +%so you must not write an explicit |\fi| to terminate the test. +%Nor, unfortunately, can you associate an |\else| with the test. +%If you want to use the test in the opposite sense, you need to +%rearrange the test or +%define an auxiliary test with |\newif| (see above) and use that +%test in the sense you want (see the second example below). +% +%\TeX\ expands |\loop| as follows: +%\olist +%\li $\alpha$ is expanded. +%\li {\test} is performed. If the result is false, the loop is terminated. +%\li $\beta$ is expanded. +%\li The cycle is repeated. +%\endolist +%\example +%\count255 = 6 +%\loop +% \number\count255\ +% \ifnum\count255 > 0 +% \advance\count255 by -1 +%\repeat +%| +%\produces +%\count255 = 6 +%\loop +% \number\count255\ +% \ifnum\count255 > 0 +% \advance\count255 by -1 +%\repeat +%\nextexample +%\newif\ifnotdone % \newif uses \count255 in its definition +%\count255=6 +%\loop +% \number\count255\ +% \ifnum\count255 < 1 \notdonefalse\else\notdonetrue\fi +% \ifnotdone +% \advance\count255 by -1 +%\repeat +%| +%\produces +%\newif\ifnotdone +%\count255=6 +%\loop +% \number\count255\ +% \ifnum\count255 < 1 \notdonefalse\else\notdonetrue\fi +% \ifnotdone +% \advance\count255 by -1 +%\repeat +%% +%\eix^^{repeated actions} +%\eix^^{loops} +%% +%\endexample +%\enddesc +%} % end scope of definition of \test +{\def\test{{\bt \\if}$\Omega$}% +\begindesc +\bix^^{重复操作} +\bix^^{循环} +\cts loop {$\alpha$ {\test} $\beta$ {\bt \\repeat}} +\ctspecial repeat {}\ctsxrdef{@repeat} +\explain +这些命令提供了 \TeX\ 的循环结构。 +这里 $\alpha$ 和 $\beta$ 是任意的命令序列, +而 \test\ 是在\headcit{条件测试}{conds}中描述的任何一种条件测试。 +|\repeat| 已经替代了对应于该测试的 |\fi|, +因此你不可以显式写出 |\fi| 以结束测试。 +这也遗憾地导致你不可以给测试带上 |\else| 部分。 +如果你想在相反意义上使用测试,你需要重新安排该测试, +或者用 |\newif|(见上面)定义一个辅助测试% +并按照你的需要使用这个测试(见下面第二个例子)。 + +\TeX\ 按照下列步骤展开 |\loop| 循环: +\olist +\li 展开 $\alpha$。 +\li 执行 {\test}。如果结果为假,循环就此中止。 +\li 展开 $\beta$。 +\li 重复此循环。 +\endolist +\example +\count255 = 6 +\loop + \number\count255\ + \ifnum\count255 > 0 + \advance\count255 by -1 +\repeat +| +\produces +\count255 = 6 +\loop + \number\count255\ + \ifnum\count255 > 0 + \advance\count255 by -1 +\repeat +\nextexample +\newif\ifnotdone % \newif uses \count255 in its definition +\count255=6 +\loop + \number\count255\ + \ifnum\count255 < 1 \notdonefalse\else\notdonetrue\fi + \ifnotdone + \advance\count255 by -1 +\repeat +| +\produces +\newif\ifnotdone +\count255=6 +\loop + \number\count255\ + \ifnum\count255 < 1 \notdonefalse\else\notdonetrue\fi + \ifnotdone + \advance\count255 by -1 +\repeat +% +\eix^^{重复操作} +\eix^^{循环} +% +\endexample +\enddesc +} % end scope of definition of \test + +%========================================================================== +%\subsection {Doing nothing} +\subsection {什么也不做} + +%\begindesc +%\cts relax {} +%\explain +%This command tells \TeX\ to do nothing. It's useful in a context where +%you need to provide a command but there's nothing that you want \TeX\ to do. +%\example +%\def\medspace{\hskip 12pt\relax} +%% The \relax guards against the possibility that +%% The next tokens are `plus' or `minus'. +%| +% +%\endexample +%\enddesc +\begindesc +\cts relax {} +\explain +此命令让 \TeX\ 不做任何事情。 +此命令常用在需要提供一个命令但却无事可做的环境中。 +\example +\def\medspace{\hskip 12pt\relax} +% The \relax guards against the possibility that +% The next tokens are `plus' or `minus'. +| + +\endexample +\enddesc + +%\begindesc +%\cts empty {} +%\explain +%This command expands to no tokens at all. +%It differs from |\relax| in that it disappears after macro expansion. +%% +%\xrdef{mac2}% end the section on macros +%\eix^^{macros} +%\enddesc +\begindesc +\cts empty {} +\explain +此命令展开后得不到任何记号。它与 |\relax| 的区别在于,在宏展开后它消失了。 +% +\xrdef{mac2}% end the section on macros +\eix^^{宏} +\enddesc + +%========================================================================== +%\section {Registers} +\section {寄存器} + +%========================================================================== +%\subsection {Using registers} +\subsection {使用寄存器} + +%\begindesc +%\bix^^{registers} +%\makecolumns 11/2: +%\cts count {\<register> {\bt =} \<number>} +%\cts dimen {\<register> {\bt =} \<dimen>} +%\cts skip {\<register> {\bt =} \<glue>} +%\cts muskip {\<register> {\bt =} \<muglue>} +%\cts toks {\<register> {\bt =} \<token variable>} +%\aux\cts toks {\<register> {\bt =} \rqbraces{\<token list>}} +%\aux\cts count {\<register>} +%\aux\cts dimen {\<register>} +%\aux\cts skip {\<register>} +%\aux\cts muskip {\<register>} +%\aux\cts toks {\<register>} +%\explain +%^^{assignments//of registers} +%The first six commands listed here assign something to a register. +%The |=|'s in the assignments are optional. +%The remaining five control sequences are not true commands +%because they can only appear as part of an argument. +%They yield the contents of the specified register. +%Although you can't use these control sequences by themselves as commands +%in text, you can use ^|\the| to convert them to text so that +%you can typeset their values. +\begindesc +\bix^^{寄存器} +\makecolumns 11/2: +\cts count {\<register> {\bt =} \<number>} +\cts dimen {\<register> {\bt =} \<dimen>} +\cts skip {\<register> {\bt =} \<glue>} +\cts muskip {\<register> {\bt =} \<muglue>} +\cts toks {\<register> {\bt =} \<token variable>} +\aux\cts toks {\<register> {\bt =} \rqbraces{\<token list>}} +\aux\cts count {\<register>} +\aux\cts dimen {\<register>} +\aux\cts skip {\<register>} +\aux\cts muskip {\<register>} +\aux\cts toks {\<register>} +\explain +^^{赋值//给寄存器赋值} +左边列出的六个命令用于给寄存器赋值,其中的 `|=|' 是可选的。 +右边列出的五个控制序列并不是真正的命令,因为它们只能作为参量的一部分。 +它们给出了特定寄存器的内容。虽然在文本中你不能将这些控制序列单独用作命令, +但你可以用 ^|\the| 命令将它们转换为文本再排版它们的值。 + +%You can name and reserve registers +%with the ^|\newcount| command and its relatives +%(\xref{\@newcount}). +%Using these commands is a safe way to obtain registers that +%are known not to have any conflicting usage. +你可以用 ^|\newcount| 及相关命令命名和预留寄存器(\xref{\@newcount})。 +用这些命令获取寄存器更加安全,因为它们保证不会造成冲突。 + +%^^{count registers} +%A |\count| register contains an integer, which can be either positive or +%negative. +%Integers can be as large as you're ever likely to need them to be.\footnote +%{Here's the only exercise in this book: find out what's the largest +%integer that \TeX\ will accept.} +%\TeX\ uses count registers $0$--$9$ to keep track of the +%page number (see \knuth{page~119}). +%|\count255| is the only count register available for use +%without a reservation. +%\example +%\count255 = 17 \number\count255 +%| +%\produces +%\count255 = 17 \number\count255 +%\endexample +^^{计数寄存器} +|\count| 寄存器存储一个整数,可正可负。 +该整数可以很大,比你可能需要的都大。\footnote +{这里是本书仅有的一个练习:找出 \TeX\ 可以接受的最大整数。} +\TeX\ 将计数寄存器 $0$--$9$ 用于记录页码(见\knuth{第~119~页})。 +|\count255| 是无需预留就能使用的唯一计数寄存器。 +\example +\count255 = 17 \number\count255 +| +\produces +\count255 = 17 \number\count255 +\endexample + +%\medskip\noindent +%^^{dimension registers} +%A |\dimen| register contains a dimension. +%Registers |\dimen0| through |\dimen9| and |\dimen255| are available +%for scratch use. +\medskip\noindent +^^{尺寸寄存器} +|\dimen| 寄存器存储一个尺寸。 +寄存器 |\dimen0| 到 |\dimen9| 及 |\dimen255| 都可用于临时用途。 + +%\example +%\dimen0 = 2.5in +%\hbox to \dimen0{$\Leftarrow$\hfil$\Rightarrow$} +%| +%\produces +%\dimen0 = 2.5in +%\hbox to \dimen0{$\Leftarrow$\hfil$\Rightarrow$} +%\doruler{\8\8\8}3{in} +%\endexample +\example +\dimen0 = 2.5in +\hbox to \dimen0{$\Leftarrow$\hfil$\Rightarrow$} +| +\produces +\dimen0 = 2.5in +\hbox to \dimen0{$\Leftarrow$\hfil$\Rightarrow$} +\doruler{\8\8\8}3{in} +\endexample + +%\medskip\noindent +%^^{skip registers} +%A |\skip| register contains the dimensions of glue. +%Unlike a |\dimen| register, it +%records an amount of shrink and stretch as well as a natural size. +%Registers |\skip0| through |\skip9| and |\skip255| are available +%for use without a reservation. +\medskip\noindent +^^{间距寄存器} +|\skip| 寄存器存储粘连的尺寸。 +与 |\dimen| 寄存器不同,它除了记录粘连的自然尺寸外,还记录其伸长量和收缩量。 +寄存器 |\skip0| 到 |\skip9| 及 |\skip255| 都可用于临时用途。 + +%\example +%\skip2 = 2in +%$\Rightarrow$\hskip \skip2 $\Leftarrow$ +%| +%\produces +%\skip2 = 2in +%$\Rightarrow$\hskip \skip2 $\Leftarrow$\par +%\noindent\hphantom{$\Rightarrow$}\ruler{\8\8}2{in} +%\endexample +\example +\skip2 = 2in +$\Rightarrow$\hskip \skip2 $\Leftarrow$ +| +\produces +\skip2 = 2in +$\Rightarrow$\hskip \skip2 $\Leftarrow$\par +\noindent\hphantom{$\Rightarrow$}\ruler{\8\8}2{in} +\endexample + +%\medskip\noindent +%^^{muskip registers} +%A |\muskip| register is like a |\skip| register, +%but the glue in it is always measured in ^|mu| +%\seeconcept{mathematical unit}. +%The size of a |mu| depends on the current font. +%For example, it's usually a little +%smaller in a subscript than in ordinary text. +%Registers |\muskip0| through |\muskip9| and |\muskip255| are available +%for use without a reservation. +\medskip\noindent +^^{数学间距寄存器} +|\muskip| 寄存器与 |\skip| 寄存器相似, +但其中的粘连始终以 ^|mu| 为单位\seeconcept{数学单位}。 +一个 |mu| 的大小与当前字体有关,比如在下标中通常就比在普通文本中小一点。 +寄存器 |\muskip0| 到 |\muskip9| 及 |\muskip255| 都可用于临时用途。 + +%\example +%\muskip0 = 24mu % An em and a half, no stretch or shrink. +%$\mathop{a \mskip\muskip0 b}\limits^{a \mskip\muskip0 b}$ +%% Note the difference in spacing. +%| +%\produces +%\muskip0 = 24mu % an em and a half +%$\mathop{a \mskip\muskip0 b}\limits^{a \mskip\muskip0 b}$ +%% Note the difference in spacing +%\endexample +\example +\muskip0 = 24mu % An em and a half, no stretch or shrink. +$\mathop{a \mskip\muskip0 b}\limits^{a \mskip\muskip0 b}$ +% Note the difference in spacing. +| +\produces +\muskip0 = 24mu % an em and a half +$\mathop{a \mskip\muskip0 b}\limits^{a \mskip\muskip0 b}$ +% Note the difference in spacing +\endexample + +%\medskip\noindent +%^^{token registers} +%You can assign either a token variable +%(a register or a parameter) or a token list +%to a |\toks| register. +%When you assign a token list to a token register, +%the tokens in the token list are \emph{not} expanded. +\medskip\noindent +^^{记号寄存器} +你可以指定一个记号变量(一个寄存器或一个参数)或一个记号列给 |\toks| 寄存器。 +当你指定一个记号列给记号寄存器时,记号列中的记号\emph{不会}被展开。 + +%Once the tokens in a token list have been inserted into text +%using ^|\the|, they are +%expanded just like tokens that were read in directly. +%They have the category codes that they received when \TeX\ first +%saw them in the~\hbox{input}. +一旦用 ^|\the| 命令将记号列中的记号插入文本中,\TeX\ 就像直接读入那样展开它们。 +它们的类别码是 \TeX\ 在\hbox{输入}中首次看到时给出的。 + +%\example +%\toks0 = {the \oystereaters\ were at the seashore} +%% This assignment doesn't expand \oystereaters. +%\def\oystereaters{Walrus and Carpenter} +%\toks1 = \toks0 +%% the same tokens are now in \toks0 and \toks1 +%Alice inquired as to whether \the\toks1. +%| +%\produces +%\toks0 = {the \oystereaters\ were at the seashore} +%% This assignment doesn't expand \oystereaters +%\def\oystereaters{Walrus and Carpenter} +%\toks1 = \toks0 +%% the same tokens are now in \toks0 and \toks1 +%Alice inquired as to whether \the\toks1. +%\endexample +%\enddesc +\example +\toks0 = {the \oystereaters\ were at the seashore} +% This assignment doesn't expand \oystereaters. +\def\oystereaters{Walrus and Carpenter} +\toks1 = \toks0 +% the same tokens are now in \toks0 and \toks1 +Alice inquired as to whether \the\toks1. +| +\produces +\toks0 = {the \oystereaters\ were at the seashore} +% This assignment doesn't expand \oystereaters +\def\oystereaters{Walrus and Carpenter} +\toks1 = \toks0 +% the same tokens are now in \toks0 and \toks1 +Alice inquired as to whether \the\toks1. +\endexample +\enddesc + +%\begindesc +%\cts maxdimen {} +%\explain +%^^{dimensions//maximum} +%This control sequence yields a \<dimen> that is the +%largest dimension acceptable to \TeX\ (nearly 18 feet). +%It is not a true command because it can only appear as part of an argument +%to another command. +%\example +%\maxdepth = \maxdimen % Remove restrictions on \maxdepth. +%| +%\endexample +%\enddesc +\begindesc +\cts maxdimen {} +\explain +^^{尺寸//最大尺寸} +这个控制序列生成 \TeX\ 所能接受的最大尺寸 \<dimen>(差不多为 18 英尺)。 +它不是真正的命令,因为它只能作为其他命令的参量的一部分。 +\example +\maxdepth = \maxdimen % Remove restrictions on \maxdepth. +| +\endexample +\enddesc + +\see |\advance| (\xref\advance), |\multiply|, +|\divide| (\xref\divide), |\set!-box|, |\box| (\xref\box). + +%========================================================================== +%\subsection {Naming and reserving registers, etc.} +\subsection {命名和预留寄存器等} + +%\begindesc +%\bix^^{registers//reserving} +%\makecolumns 11/2: +%\ctspecial newcount \ctsxrdef{@newcount} +%\ctspecial newdimen \ctsxrdef{@newdimen} +%\ctspecial newskip \ctsxrdef{@newskip} +%\ctspecial newmuskip \ctsxrdef{@newmuskip} +%\ctspecial newtoks \ctsxrdef{@newtoks} +%\ctspecial newbox \ctsxrdef{@newbox} +%\ctspecial newread \ctsxrdef{@newread} +%\ctspecial newwrite \ctsxrdef{@newwrite} +%\ctspecial newfam \ctsxrdef{@newfam} +%\ctspecial newinsert \ctsxrdef{@newinsert} +%\ctspecial newlanguage \ctsxrdef{@newlanguage} +%\explain +%These commands +%reserve and name an entity of the indicated type: +%\ulist +%{\tolerance = 5000 +%\fontdimen3\the\font = 2\fontdimen3\the\font % allow spaces to stretch more +%\li |\new!-count|, |\newdimen|, |\newskip|, |\new!-mu!-skip|, |\new!-toks|, +%and |\new!-box| each reserve a \minref{register} of the indicated type. +%} +%^^{count registers//reserved by \b\tt\\newcount\e} +%^^{dimension registers//reserved by \b\tt\\newdimen\e} +%^^{skip registers//reserved by \b\tt\\newskip\e} +%^^{muskip registers//reserved by \b\tt\\newmuskip\e} +%^^{token registers//reserved by \b\tt\\newtoks\e} +%^^{box registers//reserved by \b\tt\\newbox\e} +%\li |\newread| and |\newwrite| reserve an input stream and +%an output stream \minrefs{input stream}\minrefs{output stream} +%respectively. +%^^{input streams//reserved by \b\tt\\newread\e} +%^^{output streams//reserved by \b\tt\\newwrite\e} +%\li |\newfam| reserves a \minref{family} of math fonts. +%^^{family//reserved by \b\tt\\newfam\e} +%\li |\newinsert| reserves an insertion type. +%(Reserving an insertion type involves reserving several different registers.) +%^^{insertions//numbers reserved by \b\tt\\newinsert\e} +%\li |\newlanguage| reserves a set of hyphenation patterns. +%\endulist +%You should use these commands whenever you need one of these entities, +%other than in a very local region, +%in order to avoid numbering conflicts. +\begindesc +\bix^^{寄存器//预留寄存器} +\makecolumns 11/2: +\ctspecial newcount \ctsxrdef{@newcount} +\ctspecial newdimen \ctsxrdef{@newdimen} +\ctspecial newskip \ctsxrdef{@newskip} +\ctspecial newmuskip \ctsxrdef{@newmuskip} +\ctspecial newtoks \ctsxrdef{@newtoks} +\ctspecial newbox \ctsxrdef{@newbox} +\ctspecial newread \ctsxrdef{@newread} +\ctspecial newwrite \ctsxrdef{@newwrite} +\ctspecial newfam \ctsxrdef{@newfam} +\ctspecial newinsert \ctsxrdef{@newinsert} +\ctspecial newlanguage \ctsxrdef{@newlanguage} +\explain +这些命令预留并命名一个指定类型的实体: +\ulist +{\tolerance = 5000 +\fontdimen3\the\font = 2\fontdimen3\the\font % allow spaces to stretch more +\li |\new!-count|、|\newdimen|、|\newskip|、|\new!-mu!-skip|、 +|\new!-toks| 以及 |\new!-box| 各自预留一个指定类型的\minref{寄存器}。 +} +^^{计数寄存器//用 \b\tt\\newcount\e 预留} +^^{尺寸寄存器//用 \b\tt\\newdimen\e 预留} +^^{间距寄存器//用 \b\tt\\newskip\e 预留} +^^{数学间距寄存器//用 \b\tt\\newmuskip\e 预留} +^^{记号寄存器//用 \b\tt\\newtoks\e 预留} +^^{盒子寄存器//用 \b\tt\\newbox\e 预留} +\li |\newread| 和 |\newwrite| 分别预留一个输入流和输出流% +\minrefs{input stream}\minrefs{output stream}。 +^^{输入流//用 \b\tt\\newread\e 预留} +^^{输出流//用 \b\tt\\newwrite\e 预留} +\li |\newfam| 预留一个数学字体\minref{族}。 +^^{族//用 \b\tt\\newfam\e 预留} +\li |\newinsert| 预留一个插入项类型。% +(预留一个插入项类型包括预留几个不同的寄存器。) +^^{插入项//用 \b\tt\\newinsert\e 预留编号} +\li |\newlanguage| 预留一套连字模式。 +\endulist +为避免编号冲突,在需要这些实体之一时你应当使用这些命令,除非在很局部的范围中。 + +%There's an important difference among these commands: +%\ulist +%\li The control sequences defined by +%|\newcount|, |\newdimen|, |\newskip|, |\newmuskip|, and |\newtoks| +%each designate an entity of the appropriate type. +%For instance, after the command: +%\csdisplay +%\newdimen\listdimen +%| +%the control sequence |\listdimen| can be used as a dimension. +%\li The control sequences defined by +%|\newbox|, |\newread|, |\newwrite|, |\newfam|, |\newinsert|, +%and |\newlanguage| each +%evaluate to the \emph{number} of an entity of the appropriate type. +%For instance, after the command: +%\csdisplay +%\newbox\figbox +%| +%the control sequence |\figbox| must be used in conjunction with +%a |\box|-like command, e.g.: +%\csdisplay +%\setbox\figbox = \vbox{!dots} +%| +%\endulist +%\enddesc +这些命令之间还有一个很重要的区别: +\ulist +\li 用 |\newcount|、|\newdimen|、|\newskip|、|\newmuskip| 以及 +|\newtoks| 定义的控制序列各自指明一个相应类型的实体。 +例如在执行命令 +\csdisplay +\newdimen\listdimen +| +之后,控制序列 |\listdimen| 可以用作一个尺寸。 +\li 用 |\newbox|、|\newread|、|\newwrite|、|\newfam|、|\newinsert| 以及 +|\newlanguage| 定义的控制序列各自表示相应类型的实体的\emph{编号}。 +例如在执行命令 +\csdisplay +\newbox\figbox +| +之后,控制序列 |\figbox| 必须和 类似 |\box| 的命令一起使用,比如: +\csdisplay +\setbox\figbox = \vbox{!dots} +| +\endulist +\enddesc + +%\begindesc +%\cts countdef {\<control sequence> {\bt =} \<register>} +%\cts dimendef {\<control sequence> {\bt =} \<register>} +%\cts skipdef {\<control sequence> {\bt =} \<register>} +%\cts muskipdef {\<control sequence> {\bt =} \<register>} +%\cts toksdef {\<control sequence> {\bt =} \<register>} +%\explain +%These commands define \<control sequence> to refer to the +%\minref{register} of the indicated category whose number is \<register>. +%Normally you should use the commands in the previous group +%(|\newcount|, etc.) in preference to these commands in order to avoid +%numbering conflicts. The commands in the previous group are +%defined in terms of the commands \hbox{in this group}. +%\example +%\countdef\hatters = 19 % \hatters now refers to \count19 +%\toksdef\hares = 200 % \hares now refers to \toks200 +%| +%\endexample +%\enddesc +\begindesc +\cts countdef {\<control sequence> {\bt =} \<register>} +\cts dimendef {\<control sequence> {\bt =} \<register>} +\cts skipdef {\<control sequence> {\bt =} \<register>} +\cts muskipdef {\<control sequence> {\bt =} \<register>} +\cts toksdef {\<control sequence> {\bt =} \<register>} +\explain +这些命令将 \<control sequence> 定义为指定类型的编号为 \<register> 的\minref{寄存器}。 +为避免编号冲突,通常你应当使用前面那些命令(|\newcount| 等),而不是使用这些命令。 +实际上,前面那些命令就是用这些命令来定义的. +\example +\countdef\hatters = 19 % \hatters now refers to \count19 +\toksdef\hares = 200 % \hares now refers to \toks200 +| +\endexample +\enddesc + +%\see |\newif| (\xref{\@newif}), |\newhelp| (\xref{\@newhelp}). +%\eix^^{registers//reserving} +\see |\newif| (\xref{\@newif}), |\newhelp| (\xref{\@newhelp}). +\eix^^{寄存器//预留寄存器} + +%========================================================================== +%\subsection {Doing arithmetic in registers} +\subsection {寄存器中的算术运算} + +%\begindesc +%\bix^^{arithmetic} +%\bix^^{registers//arithmetic in} +%% +%\cts advance {\<count register> {\bt by} \<number>} +%\aux\cts advance {\<dimen register> {\bt by} \<dimen>} +%\aux\cts advance {\<skip register> {\bt by} \<glue>} +%\aux\cts advance {\<muskip register> {\bt by} \<muglue>} +%\explain +%This command adds a compatible quantity to a register. For \<glue> +%or \<muglue> all three components (natural value, stretch, and shrink) +%\minrefs{glue} are added. +%Any of the quantities can be negative. For purposes of these calculations +%(and other assignments as well), \<glue> can be converted to a +%\<dimen> by dropping the stretch and shrink, and a \<dimen> can be converted +%to a \<number> by taking its value in scaled points +%\seeconcept{dimension}. +%You can omit the word |by| in these commands---\TeX\ will understand them +%anyway. +%\example +%\count0 = 18 \advance\count0 by -1 \number\count0\par +%\skip0 = .5in \advance\skip0 by 0in plus 1in % add stretch +%\hbox to 2in{a\hskip\skip0 b} +%| +%\produces +%\count0 = 18 \advance\count0 by -1 \number\count0\par +%\skip0 = .5in \advance\skip0 by 0in plus 1in % add stretch +%\hbox to 2in{a\hskip\skip0 b} +%\doruler{\8\8}2{in} +%\endexample +%\enddesc +\begindesc +\bix^^{算术} +\bix^^{寄存器//寄存器中的算术运算} +% +\cts advance {\<count register> {\bt by} \<number>} +\aux\cts advance {\<dimen register> {\bt by} \<dimen>} +\aux\cts advance {\<skip register> {\bt by} \<glue>} +\aux\cts advance {\<muskip register> {\bt by} \<muglue>} +\explain +此命令给寄存器加上一个兼容的数量。对于 \<glue> 或 \<muglue>, +三个部分(自然尺寸、伸长量和收缩量)\minrefs{粘连}都被加上。 +任何数量都可以是负的。为方便这些计算(以及其他的赋值), +\<glue> 可以通过丢掉伸长量和收缩量转换为 \<dimen>, +而 \<dimen> 可以通过取以 scaled point 为单位的值转换为 \<number>% +\seeconcept{尺寸}。 +在这些命令中,你可以忽略单词 |by| ——这两种写法 \TeX\ 都能理解。 +\example +\count0 = 18 \advance\count0 by -1 \number\count0\par +\skip0 = .5in \advance\skip0 by 0in plus 1in % add stretch +\hbox to 2in{a\hskip\skip0 b} +| +\produces +\count0 = 18 \advance\count0 by -1 \number\count0\par +\skip0 = .5in \advance\skip0 by 0in plus 1in % add stretch +\hbox to 2in{a\hskip\skip0 b} +\doruler{\8\8}2{in} +\endexample +\enddesc + +%\begindesc +%\cts multiply {\<register> {\bt by} \<number>} +%\cts divide {\<register> {\bt by} \<number>} +%\explain +%These commands multiply and divide the value in \<register> +%by \<number> (which can be negative). +%The register can be a ^|\count|, ^|\dimen|, ^|\skip|, or ^|\muskip| +%register. +%For a ^|\skip| or ^|\muskip| register (\xref\skip), +%all three components of the \minref{glue} in the register are modified. +%You can omit the word |by| in these commands---\TeX\ will understand them +%anyway. +\begindesc +\cts multiply {\<register> {\bt by} \<number>} +\cts divide {\<register> {\bt by} \<number>} +\explain +这两个命令将 \<register> 中的值乘以或除以 \<number>(它可以为负数)。 +其中的寄存器可以是 ^|\count|、^|\dimen|、^|\skip| 或 ^|\muskip| 寄存器。 +对于 ^|\skip| 或 ^|\muskip| 寄存器(\xref\skip ), +在寄存器中\minref{粘连}的三个部分都被修改。 +在这些命令中,你可以忽略单词 |by| ——这两种写法 \TeX\ 都能理解。 + +%You can also obtain a multiple of a \<dimen> by preceding it by a \<number> +%\minrefs{number} +%or decimal constant, e.g., +%|-2.5\dimen2|. +%You can also use this notation for \<glue>, but watch out---the result +%is a \<dimen>, not \<glue>. +%Thus |2\baselineskip| yields a \<dimen> that is twice the natural size +%of |\baselineskip|, with no stretch or shrink. +%\example +%\count0 = 9\multiply \count0 by 8 \number\count0 ; +%\divide \count0 by 12 \number\count0 \par +%\skip0 = 20pt plus 2pt minus 3pt \multiply \skip0 by 3 +%Multiplied value of skip0 is \the\skip0.\par +%\dimen0 = .5in \multiply\dimen0 by 6 +%\hbox to \dimen0{a\hfil b} +%| +%\produces +%\count0 = 9\multiply \count0 by 8 \number\count0 ; +%\divide \count0 by 12 \number\count0 \par +%\skip0 = 20pt plus 2pt minus 3pt \multiply \skip0 by 3 +%Multiplied value of skip0 is \the\skip0.\par +%\dimen0 = .5in \multiply\dimen0 by 6 +%\hbox to \dimen0{a\hfil b} +%\doruler{\8\8\8}3{in} +%\endexample +在 \<dimen> 前面加上 \<number>\minrefs{number}或小数,你可以得到它的倍数, +比如 |-2.5\dimen2|。在 \<glue> 前面也可以使用此写法, +但小心注意——结果是一个 \<dimen> 而不是 \<glue>。 +比如用 |2\baselineskip| 将得到一个 \<dimen>, +它等于 |\baselineskip| 的自然尺寸的两倍,但没有伸长量和收缩量。 +\example +\count0 = 9\multiply \count0 by 8 \number\count0 ; +\divide \count0 by 12 \number\count0 \par +\skip0 = 20pt plus 2pt minus 3pt \multiply \skip0 by 3 +Multiplied value of skip0 is \the\skip0.\par +\dimen0 = .5in \multiply\dimen0 by 6 +\hbox to \dimen0{a\hfil b} +| +\produces +\count0 = 9\multiply \count0 by 8 \number\count0 ; +\divide \count0 by 12 \number\count0 \par +\skip0 = 20pt plus 2pt minus 3pt \multiply \skip0 by 3 +Multiplied value of skip0 is \the\skip0.\par +\dimen0 = .5in \multiply\dimen0 by 6 +\hbox to \dimen0{a\hfil b} +\doruler{\8\8\8}3{in} +\endexample + +%\eix^^{arithmetic} +%\eix^^{registers//arithmetic in} +%\eix^^{registers} +%\enddesc +\eix^^{算术} +\eix^^{寄存器//寄存器中的算术运算} +\eix^^{寄存器} +\enddesc + +%========================================================================== +%\section {Ending the job} +\section {结束任务} + +%\begindesc +%^^{ending the job} +%\easy\ctspecial bye \ctsxrdef{@bye} +%\explain +%This command tells \TeX\ to fill out and produce the last page, print +%any held-over \minref{insertion}s, and end the job. +%It is the usual way to end your input file. +%\enddesc +\begindesc +^^{结束任务} +\easy\ctspecial bye \ctsxrdef{@bye} +\explain +此命令让 \TeX\ 填满并生成最后的页面,打印遗留的\minref{插入项},并结束任务。 +这是结束输入文件的常用方式。 +\enddesc + +%\begindesc +%\cts end {} +%\explain +%This command tells \TeX\ to produce the last page and end the job. +%It does not fill out the page, however, +%so it's usually better to use |\bye| rather than |\end|. +%\enddesc +\begindesc +\cts end {} +\explain +此命令让 \TeX\ 生成最后的页面并结束任务。 +但由于它不会填满页面,一般情形用 |\bye| 比用 |\end| 更好些。 +\enddesc + +%========================================================================== +%\section {Input and output} +\section {输入和输出} + +%========================================================================== +%\subsection {Operations on input files} +\subsection {操作输入文件} + +%\begindesc +%\bix^^{files} +%\bix^^{input files} +%\easy\cts input {\<filename>} +%\explain +%\minrefs{file}\minrefs{file name} +%This command tells \TeX\ to read its input from file \<filename>. +%When that file is exhausted, \TeX\ returns to reading from its previous +%input source. You can nest input files to any level you like +%(within reason). +\begindesc +\bix^^{文件} +\bix^^{输入文件} +\easy\cts input {\<filename>} +\explain +\minrefs{file}\minrefs{file name} +此命令让 \TeX\ 从文件 \<filename> 读取输入。 +当该文件用完后,\TeX\ 回到之前的输入来源继续读取。 +你可以嵌套输入文件到任何层级(在合理范围内)。 + +%When you're typesetting a large document, it's usually a good idea to +%structure your main file as a sequence of |\input| commands that refer +%to the subsidiary parts of the document. That way you can process the +%individual parts easily as you're working on drafts. It's also a good +%practice to put all of your \minref{macro} definitions into a separate file and +%summon that file with an |\input| command as the first action in your +%main file. +在排版一个大文档时,通常在主文件写上一系列 |\input| 命令,以引入文档的各个子文件。 +用这种方式,在打草稿阶段你可以很方便地处理文档的单个部分。 +还有个好习惯就是,将所有\minref{宏定义}放在一个独立文件中, +并在主文件一开始用 |\input| 命令引入它。 + +%\TeX\ uses different rules for scanning file names than it does for scanning +%\minref{token}s in general (see \xref{file name}). +%If your implementation expects file names to have extensions (usually +%indicated by a preceding dot), then \TeX\ provides a default extension +%of |.tex|. +%\example +%\input macros.tex +%\input chap1 % equivalent to chap1.tex +%| +%\endexample +%\enddesc +\TeX\ 扫描文件名的规则一般和扫描\minref{记号}的不同(见\xref{文件名})。 +如果 \TeX\ 系统要求文件名包含扩展名(通常在前面加上点号表示), +则 \TeX\ 以 |.tex| 作为默认扩展名。 +\example +\input macros.tex +\input chap1 % equivalent to chap1.tex +| +\endexample +\enddesc + +%\begindesc +%\cts endinput {} +%\explain +%This command tells \TeX\ to stop reading input from the current file when it +%next reaches the end of a line. +%\enddesc +\begindesc +\cts endinput {} +\explain +此命令让 \TeX\ 在这一行读完后停止从当前文件读取输入。 +\enddesc + +%\begindesc +%\cts inputlineno {} +%\explain +%This command yields a number (not a string) giving the line number of the +%current line, defined to be the number that would appear in an error message +%if an error occurred at this point. +%\enddesc +\begindesc +\cts inputlineno {} +\explain +此命令生成一个给出当前行编号的数(不是字符串), +当此处有错误时,它就是写在错误信息中的行数。 +\enddesc + +%\begindesc +%\cts openin {\<number> {\bt =} \<filename>} +%\explain +%This command tells \TeX\ to open the file named \<filename> +%and make it available for reading via the input stream +%designated by \<number>. +%^^{input streams//opening} +%\<number> must be between $0$ and $15$. +%Once you've opened a file and connected it to an input stream, +%you can read from the file using the |\read| command +%with the input stream's number. +\begindesc +\cts openin {\<number> {\bt =} \<filename>} +\explain +此命令让 \TeX\ 打开名为 \<filename> 的文件, +让我们可以通过编号为 \<number> 的输入流读取它。 +^^{输入流//打开输入流} +\<number> 必须在 $0$ 和 $15$ 之间。 +一旦打开了一个文件并将它连接到一个输入流, +你就可以用|\read| 命令以输入流编号读取其内容。 + +%You can associate more than one input stream with the same +%file. You can then read from several different positions within +%the file, one for each input stream. +你可以把同一个文件和多个输入流连接。 +这样你就可以从文件的多个不同位置读取内容,每个输入流对应一个位置。 + +%You should allocate stream numbers for |\openin| using +%|\new!-read| (\xref{\@newread}). +%\example +%\newread\auxfile \openin\auxfile = addenda.aux +%% \auxfile now denotes the number of this opening +%% of addenda.aux. +%| +%\endexample +%\enddesc +你应当用 |\new!-read|(\xref{\@newread})命令分配 |\openin| 的流编号。 +\example +\newread\auxfile \openin\auxfile = addenda.aux +% \auxfile now denotes the number of this opening +% of addenda.aux. +| +\endexample +\enddesc + +%\begindesc\secondprinting{\vglue-.5\baselineskip\vskip0pt} +%\cts closein {\<number>} +%\explain +%This command tells \TeX\ to close the \minref{input stream} numbered +%\<number>, i.e., +%end the association between the input stream and its file. +%The input stream with this number then becomes available for use with a +%different file. +%You should close an input stream once you're finished using its file. +%\example +%\closein\auxfile +%| +%\endexample +%\enddesc +\begindesc%\secondprinting{\vglue-.5\baselineskip\vskip0pt} +\cts closein {\<number>} +\explain +此命令让 \TeX\ 关闭编号为 \<number> 的\minref{输入流}, +结束输入流与文件之间的关联。 +此编号的输入流以后就可以用于其他文件。 +在文件使用完成后你应当关闭输入流。 +\example +\closein\auxfile +| +\endexample +\enddesc + +%\begindesc\secondprinting{\vglue-.5\baselineskip\vskip0pt} +%\cts read {\<number> {\bt to} \<control sequence>} +%\explain +%^^{input streams//reading with \b\tt\\read\e} +%^^{reading a file} +%This command tells \TeX\ to read a line from the file +%associated with the \minref{input stream} +%designated by \<number> and assign the tokens on that line to +%\<control sequence>. The \minref{control sequence} then becomes a +%parameterless \minref{macro}. No macro expansion takes place +%during the reading operation. If the line contains any unmatched +%left braces, \TeX\ will read additional lines until the braces are +%all matched. If \TeX\ reaches the end of the file without matching all the +%braces, it will complain. +\begindesc%\secondprinting{\vglue-.5\baselineskip\vskip0pt} +\cts read {\<number> {\bt to} \<control sequence>} +\explain +^^{输入流//用 \b\tt\\read\e 读取} +^^{读取文件} +此命令让 \TeX\ 从编号 \<number> 的\minref{输入流}关联的文件中读取一行, +并将该行的记号赋予 \<control sequence>。 +该\minref{控制序列}就成为一个不带参数的\minref{宏}。 +在读取操作中 \TeX\ 不会执行宏展开。如果该行包含未配对的左花括号, +\TeX\ 将读取额外的行直到花括号全部配对。 +如果直到文件结束还无法配对所有花括号,\TeX\ 将报错。 + +%If \<number> is greater than $15$ or hasn't been associated with a file +%using ^|\openin|, \TeX\ prompts you with `\<control sequence> |=|' +%on your terminal and waits for you to type a line of input. +%It then assigns the input line to \<control sequence>. +%If \<number> is less than zero, it reads a line of input from your +%terminal but omits the prompt. +%\example +%\read\auxfile to \holder +%% Expanding \holder will produce the line just read. +%| +%\endexample +%\eix^^{input files} +%\enddesc +如果 \<number> 大于 $15$ 或者还未用 ^|\openin| 关联文件, +\TeX\ 将在终端上显示提示符 `\<control sequence> |=|', +等待你键入一行输入,然后将该行输入赋予 \<control sequence>。 +如果 \<number> 小于零,它同样从终端读取输入,但不显示提示符。 +\example +\read\auxfile to \holder +% Expanding \holder will produce the line just read. +| +\endexample +\eix^^{输入文件} +\enddesc + +%\secondprinting{\vfill\eject} + + +%========================================================================== +%\subsection {Operations on output files} +\subsection {操作输出文件} + +%\bix^^{output files} +%\begindesc +%\cts openout {\<number> {\bt =} \<filename>} +%\explain +%^^{output streams//opening} +%This command tells \TeX\ to open the file named \<filename> +%and make it available for writing via the \minref{output stream} +%designated by \<number>. +%\<number> must be between $0$ and $15$. +%Once you've opened a file and connected it to an output stream, +%you can write to the file using the |\write| command +%with the output stream's number. +\bix^^{输出文件} +\begindesc +\cts openout {\<number> {\bt =} \<filename>} +\explain +^^{输出流//打开输出流} +此命令让 \TeX\ 打开名为 \<filename> 的文件, +让我们可以通过编号为 \<number> 的\minref{输出流}写入它。 +\<number> 必须在 $0$ 和 $15$ 之间。 +一旦打开了一个文件并将它连接到一个输出流, +你就可以用 |\write| 命令以输出流编号读取其内容。 + +%An |\openout| generates a whatsit that becomes part of a box. +%The |\openout| does not take effect until \TeX\ ships out that box +%to the \dvifile, +%unless you've preceded the |\openout| with ^|\immediate|. +|\openout| 命令生成一个作为盒子一部分的小玩意。 +直到 \TeX\ 将该盒子送出到 \dvifile 时 |\openout| 才会起作用, +除非你在 |\openout| 之前加上 ^|\immediate| 命令。 + +%\TeX\ won't complain if you associate more than one output stream with the +%same file, but you'll get garbage in the file if you try it! +如果你把同一个文件和多个输出流关联,\TeX\ 不会报错,但这样做将得到一些垃圾! + +%You should allocate stream numbers for |\openout| using +%|\newwrite| (\xref{\@newwrite}). +%\example +%\newwrite\auxfile \openout\auxfile = addenda.aux +%% \auxfile now denotes the number of this opening +%% of addenda.aux. +%| +%\endexample +%\enddesc +你应当用 |\newwrite|(\xref{\@newwrite})为 |\openout| 分配编号。 +\example +\newwrite\auxfile \openout\auxfile = addenda.aux +% \auxfile now denotes the number of this opening +% of addenda.aux. +| +\endexample +\enddesc + +%\begindesc +%\cts closeout {\<number>} +%\explain +%^^{output streams//closing} +%This command tells \TeX\ to close the \minref{output stream} numbered +%\<number>. i.e., +%end the association between the output stream and its file. +%The output stream with this number then becomes available for use with a +%different file. +%You should close an output stream once you're finished using its file. +\begindesc +\cts closeout {\<number>} +\explain +^^{输出流//关闭输出流} +此命令让 \TeX\ 关闭编号为 \<number> 的\minref{输出流}, +结束输出流与文件之间的关联。 +此编号的输出流以后就可以用于其他文件。 +在文件使用完成后你应当关闭输出流。 + +%A |\closeout| generates a whatsit that becomes part of a box. +%The |\closeout| does not take effect until \TeX\ ships out that box +%to the \dvifile, +%unless you've preceded the |\closeout| with ^|\immediate|. +%\example +%\closeout\auxfile +%| +%\endexample +%\enddesc +|\closeout| 命令生成一个作为盒子一部分的小玩意。 +直到 \TeX\ 将该盒子送出到 \dvifile 时 |\closeout| 才会起作用, +除非你在 |\closeout| 之前加上 ^|\immediate| 命令。 +\example +\closeout\auxfile +| +\endexample +\enddesc + +%\begindesc +%\cts write {\<number> \rqbraces{\<token list>}} +%\explain +%^^{output streams//writing} +%^^{writing a file} +%This command tells \TeX\ to write \<token list> to the file +%associated with the \minref{output stream} +%designated by \<number>. +%It generates a whatsit that becomes part of a box. +%The actual writing does not take place until \TeX\ ships out that box +%to the \dvifile, +%unless you've preceded the |\write| with ^|\immediate|. +\begindesc +\cts write {\<number> \rqbraces{\<token list>}} +\explain +^^{输出流//写入输出流} +^^{写入文件} +此命令让 \TeX\ 将 \<token list> 写入编号为 \<number> 的\minref{输出流}的关联文件中。 +它生成一个作为盒子一部分的小玩意。 +直到 \TeX\ 将该盒子送出到 \dvifile 时才会实际写入文件, +除非你在 |\write| 之前加上 ^|\immediate| 命令。 + +%For a |\write| that is not immediate, \TeX\ does not expand macros in +%\<token list> until the token list is actually written to the file. +%The macro expansions follow the same rules as |\edef| (\xref\edef). +%In particular, any control sequence that is not +%the name of a macro is written as +%^|\escapechar| followed by the control sequence name +%and a space. Any `|#|' tokens +%in \<token list> are doubled, i.e., written as `|##|'. +对于非立即(immediate)的 |\write|, +\TeX\ 直到实际写入文件时才展开 \<token list> 中的宏。 +宏展开遵循与 |\edef|(\xref\edef )一样的规则。 +任何不是宏名称的控制序列被写成 ^|\escapechar| 加上控制序列名, +后面再加一个空格。\<token list> 中的任何 `|#|' 记号被重复两遍,即写成 `|##|'。 + +%If \<number> is not in the range from $0$ to $15$, \TeX\ writes +%\<token list> to the log file. +%^^{log file//written by \b\tt\\write\e} +%If \<number> is greater than $15$ or isn't associated with an output +%stream, \TeX\ also writes \<token list> to the terminal. +%\example +%\def\aa{a a} +%\write\auxfile{\hbox{$x#y$} \aa} +%% Writes the string `\hbox {$x##y$} a a' to \auxfile. +%| +%\endexample +%\enddesc +如果 \<number> 不在 $0$ 到 $15$ 的范围中, +\TeX\ 将 \<token list> 写入到日志文件。 +^^{日志文件//用 \b\tt\\write\e 写入} +如果 \<number> 大于 $15$ 或该输出流未关联文件, +\TeX\ 还同时将 \<token list> 写到终端中。 +\example +\def\aa{a a} +\write\auxfile{\hbox{$x#y$} \aa} +% Writes the string `\hbox {$x##y$} a a' to \auxfile. +| +\endexample +\enddesc + +%\begindesc +%\cts immediate {} +%\explain +%This command should precede an |\openout|, |\closeout|, or |\write|. +%^^|\write//with {\tt\\immediate}| +%^^|\openout//with {\tt\\immediate}| +%^^|\closeout//with {\tt\\immediate}| +%It tells \TeX\ to perform the specified file operation without delay. +%\example +%\immediate\write 16{I'm stuck!!} +%% has the same effect as \message +%| +%\endexample\enddesc +\begindesc +\cts immediate {} +\explain +此命令应当放在 |\openout|、|\closeout| 或 |\write| 之前。 +^^|\write//和 {\tt\\immediate} 一起| +^^|\openout//和 {\tt\\immediate} 一起| +^^|\closeout//和 {\tt\\immediate} 一起| +它让 \TeX\ 立即执行指定的文件操作。 +\example +\immediate\write 16{I'm stuck!!} +% has the same effect as \message +| +\endexample\enddesc + +%\begindesc +%\cts special {\rqbraces{\<token list>}} +%\explain +%This command tells \TeX\ to +%write \<token list> directly to the \dvifile\ when it next +%ships out a page. +%A typical use of |\special| would be to tell the device driver to incorporate +%the contents of a named graphics file into the output page. +%^^{device drivers//instructions from \b\tt\\special\e} +%The |\special| command produces a whatsit that associates +%\<token list> with a particular position on the page, namely, +%the position that a zero-size box would have had if such a box +%had appeared instead of the |\special| command. +%Any use you might make of |\special| depends strictly on +%the ^{device drivers} that you have available. +%\example +%\special{graphic expic} +%% Display the graphics file `expic' here. +%| +%\endexample +%\enddesc +\begindesc +\cts special {\rqbraces{\<token list>}} +\explain +此命令让 \TeX\ 下次送出页面时将 \<token list> 直接写入 \dvifile 中。 +|\special| 的一个典型用法是, +让设备驱动器将指定名称的图片文件整合到输出页面中。 +^^{设备驱动//用 \b\tt\\special\e 指导它} +|\special| 命令生成一个包含 \<token list> 和一个特定位置的小玩意, +该位置是将 |\special| 命令换成零尺寸盒子时该盒子应该出现的位置。 +你可以怎样使用 |\special| 命令,完全取决于你可用的^{设备驱动器}。 +\example +\special{graphic expic} +% Display the graphics file `expic' here. +| +\endexample +\enddesc + +%\begindesc +%\cts newlinechar {\param{number}} +%\explain +%This parameter contains a character that indicates a new line on +%output. When \TeX\ encounters this character +%while reading the argument of +%a |\write|, |\message|, or +%|\errmessage| command, it starts a new line. +%If |\newlinechar| is not in the range $0$--$255$, +%there is no character that indicates +%a new line on output. +%\PlainTeX\ sets |\newlinechar| to $-1$. +%\example +%\newlinechar = `\^^J +%\message{This message appears^^Jon two lines.} +%| +%\logproduces +%This message appears +%on two lines. +%| +%\endexample +%\enddesc +\begindesc +\cts newlinechar {\param{number}} +\explain +此参数表示输出时所用的换行符。 +在读取 |\write|、|\message| 或 |\errmessage| 命令的参量时, +如果 \TeX\ 遇到这个字符,它就新起一行。 +如果 |\newlinechar| 不在 $0$--$255$ 的范围内, +输出中就不会任何换行符。 +\PlainTeX\ 设定 |\newlinechar| 等于 $-1$。 +\example +\newlinechar = `\^^J +\message{This message appears^^Jon two lines.} +| +\logproduces +This message appears +on two lines. +| +\endexample +\enddesc + +%\see |\newread|, |\newwrite| (\xref{\@newwrite}). +%\eix^^{files} +%\eix^^{output files} +\see |\newread|, |\newwrite| (\xref{\@newwrite}). +\eix^^{文件} +\eix^^{输出文件} + +%========================================================================== +%\subsection {Interpreting input characters} +\subsection {解释输入字符} + +%\begindesc +%\cts catcode {\<charcode> \tblentry{number}} +%\explain +%^^{category codes//in \b\tt\\catcode\e\ table} +%This table entry contains the \minref{category code} of the character +%whose \ascii\ code is \<charcode>. +%The category codes are listed on \xrefpg{catcodes}. +%By changing the category code of a character you can get \TeX\ to treat +%that character differently. +%\example +%\catcode `\[ = 1 \catcode `\] = 2 +%% Make [ and ] act like left and right braces. +%| +%\endexample +%\enddesc +\begindesc +\cts catcode {\<charcode> \tblentry{number}} +\explain +^^{类别码//在 \b\tt\\catcode\e\ 表格中} +此表格项表示 \ascii\ 码为 \<charcode> 的字符的\minref{类别码}。 +\xrefpg{catcodes}列出了所有的类别码。 +通过修改一个字符的类别码,你可以让 \TeX\ 用不同方式处理该字符。 +\example +\catcode `\[ = 1 \catcode `\] = 2 +% Make [ and ] act like left and right braces. +| +\endexample +\enddesc + +%\begindesc +%\cts active {} +%\explain +%This command contains the +%category code for an active character, namely, the number $13$. +%\example +%\catcode `\@ = \active % Make @ an active character. +%| +%\endexample +%\enddesc +\begindesc +\cts active {} +\explain +此命令表示活动字符的类别码,即数字 $13$。 +\example +\catcode `\@ = \active % Make @ an active character. +| +\endexample +\enddesc + +%\begindesc +%\cts mathcode {\<charcode> \tblentry{number}} +%\explain +%This table entry contains the \minref{mathcode} of the character +%whose \ascii\ code is \<charcode> \seeconcept{mathcode}. +%The mathcode specifies that character's interpretation in math mode. +%\example +%\mathcode\> = "313E % as in plain TeX +%% The > character has class 3 (relation), family 1 (math +%% italic), and character code "3E +%| +%\endexample +%\enddesc +\begindesc +\cts mathcode {\<charcode> \tblentry{number}} +\explain +此表格项表示 \ascii\ 码为 \<charcode> 的字符的\minref{数学码}\seeconcept{数学码}。 +数学码指明在数学模式中如何解释该字符。 +\example +\mathcode\> = "313E % as in plain TeX +% The > character has class 3 (relation), family 1 (math +% italic), and character code "3E +| +\endexample +\enddesc + +%\begindesc +%\margin{{\tt\\delcode} was explained in two places. This explanation +%combines them. (The other place was in the math section.)} +%\cts delcode {\<charcode>\tblentry{number}} +%\explain +%^^{delimiter codes} +%This table entry specifies the \minref{delimiter} code for the input character +%whose \ascii\ code is \<charcode>. +%The delimiter code tells \TeX\ how to find the best output character to use +%for typesetting the indicated input character as a delimiter. +\begindesc +\margin{{\tt\\delcode} was explained in two places. This explanation +combines them. (The other place was in the math section.)} +\cts delcode {\<charcode>\tblentry{number}} +\explain +^^{定界码} +此表格项表示 \ascii\ 码为 \<charcode> 的输入字符的定界码。 +定界码指引 \TeX\ 找到最佳输出字符以将该输入字符排版为定界符。 + +%\<number> is normally written in hexadecimal notation. +%Suppose that \<number> is the hexadecimal number $s_1s_2s_3\, +%l_1l_2l_3$. Then when the character is used as a delimiter, +%\TeX\ takes the character to have small variant +%$s_1s_2s_3$ and large variant $l_1l_2l_3$. Here $s_1s_2s_3$ indicates +%the math character found in position $s_2s_3$ of family $s_1$, and +%similarly for $l_1l_2l_3$. This is the same convention as the one +%used for ^|\mathcode| (\xref \mathcode), +%except that |\mathcode| also specifies a class. +%\example +%\delcode `( = "028300 % As in plain TeX. +%| +%\endexample +%\enddesc +通常以十六进制表示 \<number>。 +假设 \<number> 等于十六进制数 $s_1s_2s_3\,l_1l_2l_3$。 +则当该字符用作定界符时,该字符的小型变体为 $s_1s_2s_3$,大型变体为 $l_1l_2l_3$。 +这里 $s_1s_2s_3$ 表示在第 $s_1$ 族的 $s_2s_3$ 位置的数学字符,$l_1l_2l_3$ 类似。 +这与 ^|\mathcode|(\xref\mathcode )中的用法一样, +只是 |\mathcode| 还另外指定了字符类。 +\example +\delcode `( = "028300 % As in plain TeX. +| +\endexample +\enddesc + +%\begindesc +%\cts endlinechar {\param{number}} +%\explain +%This parameter +%contains the character code for the character that +%\TeX\ appends to the end of each input line. +%^^{input lines} +%A value not in the range $0$--$255$ +%indicates that no character should be appended. +%\PlainTeX\ leaves |\end!-line!-char| at +%|`\^^M| (the {\ascii} code for \asciichar{return}). +%\enddesc +\begindesc +\cts endlinechar {\param{number}} +\explain +此参数表示 \TeX\ 在每个输入行后添加的行尾符。 +^^{输入行} +取不在 $0$--$255$ 范围内的值则表示不添加行尾符。 +\PlainTeX\ 设定 |\end!-line!-char| 为 |`\^^M|% +(即 \asciichar{return} 符的{\ascii}码)。 +\enddesc + +%\begindesc +%\cts ignorespaces {} +%\explain +%This command tells \TeX\ to read and expand tokens until it finds one that +%is not a space \minref{token}, ignoring any space tokens +%that it finds on the way. +%|\ignorespaces| is often useful at the end of a \minref{macro} as a way +%of making the macro insensitive to any spaces or ends of line +%that might follow calls on it. +%(An empty line after |\ignorespaces| still produces a |\par| token, +%however.) +%\example +%\def\aa#1{yes #1\ignorespaces} +%\aa{may} +%be +%| +%\produces +%\def\aa#1{yes #1\ignorespaces} +%\aa{may} +%be +%\endexample +%\enddesc +\begindesc +\cts ignorespaces {} +\explain +此命令让 \TeX\ 读取和展开记号, +直到找到一个非空格\minref{记号},并忽略它找到的任何空格记号。 +|\ignorespaces| 常用在\minref{宏}结尾处, +使得调用宏时不受后面的空格符或换行符的影响。% +(但是 |\ignorespaces| 之后的空行依然生成 |\par| 记号)。 +\example +\def\aa#1{yes #1\ignorespaces} +\aa{may} +be +| +\produces +\def\aa#1{yes #1\ignorespaces} +\aa{may} +be +\endexample +\enddesc + +%========================================================================== +%\section {Controlling interaction with \TeX} +\section {控制与 \TeX\ 的交互} + +%\begindesc +%\bix^^{controlling \TeX} +%\bix^^{running \TeX} +%\cts errorstopmode {} +%\explain +%This command tells \TeX\ +%to stop for interaction whenever it finds an error. +%This is the normal mode of operation. +%\enddesc +\begindesc +\bix^^{控制 \TeX} +\bix^^{运行 \TeX} +\cts errorstopmode {} +\explain +此命令让 \TeX\ 遇到错误时暂停以和用户交互。 +这是 \TeX\ 运行的正常模式。 +\enddesc + +%\begindesc +%\cts scrollmode {} +%\explain +%This command tells \TeX\ +%not to stop for most errors, +%but to continue displaying the error messages on your terminal. +%Typing `|S|' or `|s|' in response to an error message puts you +%into scroll mode. +%\enddesc +\begindesc +\cts scrollmode {} +\explain +此命令让 \TeX\ 遇到大多数错误时不暂停,而仅在终端上显示错误信息。 +在回应错误信息时键入 `|S|' 或 `|s|' 就进入卷动模式。 +\enddesc + +%\begindesc +%\cts nonstopmode {} +%\explain +%This command tells \TeX\ +%not to stop for errors, even those pertaining to files that +%it can't find, but to continue displaying the error messages on your terminal. +%Typing `|R|' or `|r|' in response to an error message puts you +%into nonstop mode. +%\enddesc +\begindesc +\cts nonstopmode {} +\explain +此命令让 \TeX\ 遇到错误时不暂停,即使是那些无法找到文件的错误, +而仅仅在终端上显示错误信息。 +在回应错误信息时键入 `|R|' 或 `|r|' 就进入直达模式。 +\enddesc + +%\begindesc +%\cts batchmode {} +%\explain +%This command tells \TeX\ +%not to stop for errors and to suppress all further output to your terminal. +%Typing `|Q|' or `|q|' in response to an error message puts you +%into batch mode. +%\enddesc +\begindesc +\cts batchmode {} +\explain +此命令让 \TeX\ 遇到错误时不暂停,且取消在终端上显示此后的输出。 +在回应错误信息时键入 `|Q|' 或 `|q|' 就进入批处理模式。 +\enddesc + +%\begindesc +%\cts pausing {\param{number}} +%\explain +%If this parameter is greater than zero, \TeX\ will pause +%at each line of input to give you an opportunity to +%replace it with a different line. If you type in a replacement, +%\TeX\ will use that line instead of the original one; if you respond +%with \asciichar{return}, \TeX\ will use the original line. +\begindesc +\cts pausing {\param{number}} +\explain +如果此参数大于零,\TeX\ 将在每个输入行后暂停,让你有机会将该行替换为另外一行。 +如果你键入替换行,\TeX\ 就将原来的行替换为此行; +如果你键入\asciichar{return}符,\TeX\ 将使用原来的行。 + +%Setting |\pausing| to $1$ can be useful as a way of patching a document as +%\TeX\ is processing it. For example, +%you can use this facility to insert ^|\show| commands (see below). +%\eix^^{running \TeX} +%\eix^^{controlling \TeX} +%\enddesc +将 |\pausing| 设定为 $1$,是在 \TeX\ 处理文档时修补它的常用方法。 +例如,你可以用这种方式插入 ^|\show| 命令(见下面)。 +\eix^^{运行 \TeX} +\eix^^{控制 \TeX} +\enddesc + +%========================================================================== +%\section {Diagnostic aids} +\section {帮助调试} + +%\subsection{Displaying internal data} +\subsection{显示内部数据} + +%\begindesc +%\bix^^{tracing} +%\bix^^{debugging} +%\bix^^{diagnostic aids} +%\cts show {\<token>} +%\cts showthe {\<argument>} +%\cts showbox {\<number>} +%\cts showlists {} +%\explain +%These commands record information in the log of your \TeX\ run: +%\ulist +%\li |\show| records the meaning of \<token>.\minrefs{token} +%^^{tokens//displayed by \b\tt\\show\e} +%\li |\showthe| records +% whatever tokens would be produced by +%|\the| \<arg\-u\-ment> (see \xref \the). +%\li |\showbox| records the contents of the \minref{box} +%\minref{register} numbered \<num\-ber>. +%The number of +%leading dots in the log indicates the number of +%levels of nesting of inner boxes. +%\li |\showlists| records +%the contents of each list that \TeX\ is currently constructing. +%(These lists are nested one within another.) +%See \knuth{pages~88--89} for further information about interpreting +%the output of |\showlists|. +%\endulist +%For |\show| and |\showthe|, \TeX\ also displays the information at your +%^{terminal}. +%For |\showbox| and |\showlists|, \TeX\ displays the information at your +%terminal only +%if ^|\tracingonline| (\xref \tracingonline) is greater than zero; +%if ^|\tracingonline| is zero or less (the default case), +%the information is not displayed. +\begindesc +\bix^^{追踪} +\bix^^{调试} +\bix^^{帮助诊断} +\cts show {\<token>} +\cts showthe {\<argument>} +\cts showbox {\<number>} +\cts showlists {} +\explain +这些命令在 \TeX\ 运行时记录信息到日志文件中: +\ulist +\li |\show| 记录 \<token> 的含义。\minrefs{token} +^^{记号//用 \b\tt\\show\e 显示} +\li |\showthe| 记录用 |\the| \<arg\-u\-ment> 生成的所有记号(见 \xref\the )。 +\li |\showbox| 记录编号为 \<num\-ber> 的\minref{盒子}\minref{寄存器}的内容。 +日志文件中的前导点号的个数表示内部盒子的嵌套层级。 +\li |\showlists| 记录 \TeX\ 正在构造的各个列表的内容。% +(这些列表将会互相嵌套。)% +见\knuth{第~88--89~页}中对 |\showlists| 的输出的进一步介绍。 +\endulist +对于 |\show| 和 |\showthe|,\TeX\ 还在^{终端}中显示这些信息。 +对于 |\showbox| 和 |\showlists|, +\TeX\ 仅在 ^|\tracingonline|(\xref \tracingonline )大于零时才在终端显示信息; +如果 ^|\tracingonline| 小于或等于零(默认情形),这些信息就不在终端显示。 + +%Whenever \TeX\ encounters a |\show|-type command it +%stops for interaction. The request for interaction does \emph{not} +%indicate an error, but it does give you an opportunity to ask \TeX\ to +%show you something else. If you don't want to see anything else, just +%press \asciichar{return}. +在遇到类似 |\show| 的命令时,\TeX\ 暂停以和用户交互。 +请求交互\emph{并不}表示有错误发生,但这确实给你机会让 \TeX\ 显示其他东西。 +如果你不想看到其他东西,键入\asciichar{return}符即可。 + +%You can control the amount of output produced by |\showbox| by setting +%|\show!-box!-breadth| and |\show!-box!-depth| (\xref\showboxbreadth). +%^^|\showboxbreadth| ^^|\showboxdepth| +%These parameters respectively have default values of $5$ +%and $3$, which is why +%just five items appear for each box described +%in the log output below. (The `|..etc.|' indicates additional items +%within the boxes that aren't displayed.) +要控制 |\showbox| 生成的输出的数量, +你可以设定 |\show!-box!-breadth| 和 |\show!-box!-depth|(\xref\showboxbreadth )。 +^^|\showboxbreadth| ^^|\showboxdepth| +这两个参数的默认值分别为 $5$ 和 $3$, +因而在下面的日志输出中每个盒子只显示五个项目。% +(`|..etc.|' 表示盒子内的其他未显示的项目。) +%\example +%\show a +%\show \hbox +%\show \medskip +%\show & +%| +%\logproduces +%> the letter a. +%> \hbox=\hbox. +%> \medskip=macro: +%->\vskip \medskipamount . +%> alignment tab character &. +%| +%\nextexample +%\showthe\medskipamount +%\toks27={\hbox{Joe's\quad\ Diner}} +%\showthe\toks27 +%| +%\logproduces +%> 6.0pt plus 2.0pt minus 2.0pt. +%> \hbox {Joe's\quad \ Diner}. +%| +%\nextexample +%\setbox 3=\vbox{\hbox{A red dog.}\hrule A black cat.} +%\showbox 3 +%| +%\logproduces +%> \box3= +%\vbox(16.23332+0.0)x53.05565 +%.\hbox(6.94444+1.94444)x46.41675 +%..\tenrm A +%..\glue 3.33333 plus 1.66498 minus 1.11221 +%..\tenrm r +%..\tenrm e +%..\tenrm d +%..etc. +%.\rule(0.4+0.0)x* +%.\hbox(6.94444+0.0)x53.05565 +%..\tenrm A +%..\glue 3.33333 plus 1.66498 minus 1.11221 +%..\tenrm b +%..\tenrm l +%..\tenrm a +%..etc. +%| +%\endexample +%%\vfil\eject +%\example +%\vbox{A \hbox +% {formula +% $x \over y\showlists$}} +%| +%\logproduces +%### math mode entered at line 3 +%\mathord +%.\fam1 y +%this will be denominator of: +%\fraction, thickness = default +%\\mathord +%\.\fam1 x +%### restricted horizontal mode entered at line 2 +%\tenrm f +%\tenrm o +%\tenrm r +%\tenrm m +%\kern-0.27779 +%\tenrm u +%\tenrm l +%\tenrm a +%\glue 3.33333 plus 1.66666 minus 1.11111 +%spacefactor 1000 +%### horizontal mode entered at line 1 +%\hbox(0.0+0.0)x20.0 +%\tenrm A +%\glue 3.33333 plus 1.66498 minus 1.11221 +%spacefactor 999 +%### internal vertical mode entered at line 1 +%prevdepth ignored +%### vertical mode entered at line 0 +%prevdepth ignored +%| +%\endexample +%\enddesc +\example +\show a +\show \hbox +\show \medskip +\show & +| +\logproduces +> the letter a. +> \hbox=\hbox. +> \medskip=macro: +->\vskip \medskipamount . +> alignment tab character &. +| +\nextexample +\showthe\medskipamount +\toks27={\hbox{Joe's\quad\ Diner}} +\showthe\toks27 +| +\logproduces +> 6.0pt plus 2.0pt minus 2.0pt. +> \hbox {Joe's\quad \ Diner}. +| +\nextexample +\setbox 3=\vbox{\hbox{A red dog.}\hrule A black cat.} +\showbox 3 +| +\logproduces +> \box3= +\vbox(16.23332+0.0)x53.05565 +.\hbox(6.94444+1.94444)x46.41675 +..\tenrm A +..\glue 3.33333 plus 1.66498 minus 1.11221 +..\tenrm r +..\tenrm e +..\tenrm d +..etc. +.\rule(0.4+0.0)x* +.\hbox(6.94444+0.0)x53.05565 +..\tenrm A +..\glue 3.33333 plus 1.66498 minus 1.11221 +..\tenrm b +..\tenrm l +..\tenrm a +..etc. +| +\endexample +%\vfil\eject +\example +\vbox{A \hbox + {formula + $x \over y\showlists$}} +| +\logproduces +### math mode entered at line 3 +\mathord +.\fam1 y +this will be denominator of: +\fraction, thickness = default +\\mathord +\.\fam1 x +### restricted horizontal mode entered at line 2 +\tenrm f +\tenrm o +\tenrm r +\tenrm m +\kern-0.27779 +\tenrm u +\tenrm l +\tenrm a +\glue 3.33333 plus 1.66666 minus 1.11111 +spacefactor 1000 +### horizontal mode entered at line 1 +\hbox(0.0+0.0)x20.0 +\tenrm A +\glue 3.33333 plus 1.66498 minus 1.11221 +spacefactor 999 +### internal vertical mode entered at line 1 +prevdepth ignored +### vertical mode entered at line 0 +prevdepth ignored +| +\endexample +\enddesc + +%\see |\showboxbreadth|, |\showboxdepth| \ctsref\showboxbreadth. +\see |\showboxbreadth|、|\showboxdepth|\ctsref\showboxbreadth 。 + +%\subsection{Specifying what is traced} +\subsection{指定追踪的内容} + +%\begindesc +%\cts tracingonline {\param{number}} +%\explain +%If this parameter is greater than zero, +%\TeX\ will display the results of tracing +%(including ^|\showbox| and ^|\showlists|) +%at your terminal in addition to recording them in the log file. +%\enddesc +\begindesc +\cts tracingonline {\param{number}} +\explain +如果此参数大于零,除了记录到日志文件外, +\TeX\ 还在终端上显示追踪的结果(包括 ^|\showbox| 和 ^|\showlists|)。 +\enddesc + +%\begindesc +%\cts tracingcommands {\param{number}} +%\explain +%If this parameter is $1$ or greater, +%\TeX\ will record in the log file most commands that it executes. +%If ^|\tracingonline| is greater than zero, this information will also appear +%at your terminal. +%Typesetting the first character of a word counts as a command, +%but (for the purposes of the trace only) +%the actions of typesetting the subsequent characters +%and any punctuation following them +%do not count as commands. +%If |\tracingcommands| is $2$ or greater, +%\TeX\ will also record commands that are expanded +%rather than executed, e.g., conditional tests and their outcomes. +\begindesc +\cts tracingcommands {\param{number}} +\explain +如果此参数大于或等于 $1$,\TeX\ 将在日志文件中记录它执行的大多数命令。 +如果 ^|\tracingonline| 大于或等于零,这些信息还将出现在终端上。 +排版一个单词的首个字符算作一个命令, +但(仅对追踪的目的而言)排版之后的字符和标点却不算作命令。 +如果 |\tracingcommands| 大于或等于 $2$, +\TeX\ 还将记录展开但不执行的命令,比如条件测试及它们的输出。 +%\example +%\tracingcommands = 1 If $x+y>0$ we quit.\par +%On the other hand, \tracingcommands = 0 +%| +%\logproduces +%{vertical mode: the letter I} +%{horizontal mode: the letter I} +%{blank space } +%{math shift character $} +%{math mode: the letter x} +%{the character +} +%{the letter y} +%{the character >} +%{the character 0} +%{math shift character $} +%{horizontal mode: blank space } +%{the letter w} +%{blank space } +%{the letter q} +%{blank space } +%{\par} +%{vertical mode: the letter O} +%{horizontal mode: the letter O} +%{blank space } +%{the letter t} +%{blank space } +%{the letter o} +%{blank space } +%{the letter h} +%{blank space } +%{\tracingcommands} +%| +%\endexample +%\enddesc +\example +\tracingcommands = 1 If $x+y>0$ we quit.\par +On the other hand, \tracingcommands = 0 +| +\logproduces +{vertical mode: the letter I} +{horizontal mode: the letter I} +{blank space } +{math shift character $} +{math mode: the letter x} +{the character +} +{the letter y} +{the character >} +{the character 0} +{math shift character $} +{horizontal mode: blank space } +{the letter w} +{blank space } +{the letter q} +{blank space } +{\par} +{vertical mode: the letter O} +{horizontal mode: the letter O} +{blank space } +{the letter t} +{blank space } +{the letter o} +{blank space } +{the letter h} +{blank space } +{\tracingcommands} +| +\endexample +\enddesc + +%\begindesc +%\cts tracinglostchars {\param{number}} +%\explain +%If this parameter is greater than zero, +%\TeX\ will record an indication in the log file of each time +%that it drops an output character because that character does not exist +%in the current font. +%If ^|\tracingonline| is greater than zero, this information will also appear +%at your terminal. +%\PlainTeX\ defaults it to $1$ (unlike the others). +%\example +%\tracinglostchars = 1 +%A {\nullfont few} characters. +%| +%\logproduces +%Missing character: There is no f in font nullfont!! +%Missing character: There is no e in font nullfont!! +%Missing character: There is no w in font nullfont!! +%| +%\endexample +%\enddesc +\begindesc +\cts tracinglostchars {\param{number}} +\explain +如果此参数大于零,每次因某字符不在当前字体中而丢弃它时, +\TeX\ 将在日志文件中记录一个声明。 +如果 ^|\tracingonline| 大于零,此信息还将显示在终端上。 +\PlainTeX\ 设定该参数的默认值为 $1$(与其他参数不一样)。 +\example +\tracinglostchars = 1 +A {\nullfont few} characters. +| +\logproduces +Missing character: There is no f in font nullfont!! +Missing character: There is no e in font nullfont!! +Missing character: There is no w in font nullfont!! +| +\endexample +\enddesc + +%\begindesc +%\cts tracingmacros {\param{number}} +%\explain +%If this parameter is $1$ or greater, +%\TeX\ will record in the log file the expansion and arguments +%of every macro that it executes. +%^^{macros//tracing} +%If |\tracingmacros| is $2$ or greater, +%\TeX\ will record, in addition, +%every expansion of a \minref{token} list such as +%|\output| or |\everycr|. +%If ^|\tracingonline| is greater than zero, this information will also appear +%at your terminal. +%\example +%\def\a{first \b, then \c} +%\def\b{b} \def\c{c} +%\tracingmacros = 2 +%Call \a once. +%| +%\logproduces +%\a ->first \b , then \c +% +%\b ->b +% +%\c ->c +%| +%\endexample +%\enddesc +\begindesc +\cts tracingmacros {\param{number}} +\explain +如果此参数大于或等于 $1$, +\TeX\ 将在日志文件中记录它执行的每个宏的展开和参量。 +^^{宏//追踪宏} +如果 |\tracingmacros| 大于或等于 $2$, +\TeX\ 还将记录每个\minref{记号}列的展开,比如 |\output| 或 |\everycr|。 +如果 ^|\tracingonline| 大于零,这些信息还将显示在终端上。 +\example +\def\a{first \b, then \c} +\def\b{b} \def\c{c} +\tracingmacros = 2 +Call \a once. +| +\logproduces +\a ->first \b , then \c + +\b ->b + +\c ->c +| +\endexample +\enddesc + +%\begindesc +%\cts tracingoutput {\param{number}} +%\explain +%If this parameter is greater than zero, +%\TeX\ will record in the log file the contents of every box that +%it sends to the \dvifile. +%^^{\dvifile//boxes recorded in log file} +%If ^|\tracingonline| is greater than zero, this information will also appear +%at your terminal. +%The number of leading dots in each line of the trace output indicates +%the nesting level of the box at that line. +%You can control the amount of tracing by setting +%^|\showboxbreadth| and ^|\showboxdepth| (\xref\showboxbreadth). +\begindesc +\cts tracingoutput {\param{number}} +\explain +如果此参数大于零, +\TeX\ 将在日志文件中记录它送出到 \dvifile 的每个盒子的内容。 +^^{\dvifile//在日志文件中记录盒子内容} +如果 ^|\tracingonline| 大于零,这些信息还将显示在终端上。 +追踪输出中每行开头的点号个数表示该行盒子的嵌套层级。 +你可以用 ^|\showboxbreadth| 和 ^|\showboxdepth|(\xref\showboxbreadth )% +控制追踪的数量。 + +%Setting |\tracingoutput| to $1$ can be particularly helpful when you're trying +%to determine why you've gotten ^{extra space} on a page. +若你想确定页面为何出现^{多余空格}, +设定 |\tracingoutput| 为 $1$ 就特别有用。 + +%\example +%% This is the entire file. +%\tracingoutput = 1 \nopagenumbers +%One-line page. \bye +%| +%\logproduces +%Completed box being shipped out [1] +%\vbox(667.20255+0.0)x469.75499 +%.\vbox(0.0+0.0)x469.75499, glue set 13.99998fil +%..\glue -22.5 +%..\hbox(8.5+0.0)x469.75499, glue set 469.75499fil +%...\vbox(8.5+0.0)x0.0 +%...\glue 0.0 plus 1.0fil +%..\glue 0.0 plus 1.0fil minus 1.0fil +%.\vbox(643.20255+0.0)x469.75499, glue set 631.2581fill +%..\glue(\topskip) 3.05556 +%..\hbox(6.94444+1.94444)x469.75499, glue set 386.9771fil +%...\hbox(0.0+0.0)x20.0 +%...\tenrm O +%...\tenrm n +%...\tenrm e +%...\tenrm - +%...etc. +%..\glue 0.0 plus 1.0fil +%..\glue 0.0 plus 1.0fill +%.\glue(\baselineskip) 24.0 +%.\hbox(0.0+0.0)x469.75499, glue set 469.75499fil +%..\glue 0.0 plus 1.0fil +%| +%\endexample +%\enddesc +\example +% This is the entire file. +\tracingoutput = 1 \nopagenumbers +One-line page. \bye +| +\logproduces +Completed box being shipped out [1] +\vbox(667.20255+0.0)x469.75499 +.\vbox(0.0+0.0)x469.75499, glue set 13.99998fil +..\glue -22.5 +..\hbox(8.5+0.0)x469.75499, glue set 469.75499fil +...\vbox(8.5+0.0)x0.0 +...\glue 0.0 plus 1.0fil +..\glue 0.0 plus 1.0fil minus 1.0fil +.\vbox(643.20255+0.0)x469.75499, glue set 631.2581fill +..\glue(\topskip) 3.05556 +..\hbox(6.94444+1.94444)x469.75499, glue set 386.9771fil +...\hbox(0.0+0.0)x20.0 +...\tenrm O +...\tenrm n +...\tenrm e +...\tenrm - +...etc. +..\glue 0.0 plus 1.0fil +..\glue 0.0 plus 1.0fill +.\glue(\baselineskip) 24.0 +.\hbox(0.0+0.0)x469.75499, glue set 469.75499fil +..\glue 0.0 plus 1.0fil +| +\endexample +\enddesc + +%\begindesc +%\cts tracingpages {\param{number}} +%\explain +%If this parameter is greater than zero, +%\TeX\ will record in the log file its calculations of the cost of +%various page breaks that it tries. +%^^{page breaks//tracing} +%If |\tracing!-online| ^^|\tracingonline| +%is greater than zero, this information will also appear +%at your terminal. +%\TeX\ produces a line of this output +%whenever it first places a box or \minref{insertion} +%on the current page list, and also whenever it processes a potential +%break point for the page. +%Examining this output can be helpful when you're trying to determine +%the cause of a bad page break. +%See \knuth{pages~112--114} for an illustration and explanation of +%this output. +\begindesc +\cts tracingpages {\param{number}} +\explain +如果此参数大于零, +\TeX\ 将在日志文件中记录它尝试各种分页所计算的代价。 +^^{分页//追踪分页} +如果 |\tracing!-online| ^^|\tracingonline| 大于零, +这些信息还将显示在终端上。 +在放置一个盒子或\minref{插入项}到当前的页面列表, +或者在处理页面的某个可能分页点时,\TeX\ 都在日志输出中写上一行。 +检查此输出将有助于你确定糟糕分页的起因。 +见\knuth{第~112--114~页}中此类输出的示例和解释。 + +%Some production forms of \TeX\ ignore the value of |\tracingpages| +%so that they can run faster. +%If you need to use this parameter, be sure to use a form that +%responds to it. +%\enddesc +某些 \TeX\ 实现形式忽略 |\tracingpages| 的取值以更快地运行。 +如果你需要此参数,确保你用的 \TeX\ 形式能用此参数。 +\enddesc + +%\begindesc +%\cts tracingparagraphs {\param{number}} +%\explain +%If this parameter is greater than zero, +%\TeX\ will record in the log file its calculations of the cost of +%various line breaks that it tries. +%^^{line breaking//tracing} +%If ^|\tracingonline| is greater than zero, this information will also appear +%at your terminal. +%\TeX\ produces this output when it reaches the end of each paragraph. +%See \knuth{pages~98--99} for an illustration and explanation of +%this output. +\begindesc +\cts tracingparagraphs {\param{number}} +\explain +如果此参数大于零, +\TeX\ 将在日志文件中记录它尝试各种断行所计算的代价。 +^^{断行//追踪断行} +如果 |\tracingonline| ^^|\tracingonline| 大于零, +这些信息还将显示在终端上。 +\TeX\ 在段落的结尾处生成这些输出。 +见\knuth{第~98--99~页}中此类输出的示例和解释。 + +%Some production forms of \TeX\ ignore the value of |\tracing!-para!-graphs| +%so that they can run faster. +%If you need to use this parameter, be sure to use a form that +%responds to it. +%\enddesc +某些 \TeX\ 实现形式忽略 |\tracing!-para!-graphs| 的取值以更快地运行。 +如果你需要此参数,确保你用的 \TeX\ 形式能用此参数。 +\enddesc + +%\begindesc +%\cts tracingrestores {\param{number}} +%\explain +%If this parameter is greater than zero, +%\TeX\ will record in the log file +%the values that it restores when it encounters the end of a \minref{group}. +%If ^|\tracingonline| is greater than zero, this information will also appear +%at your terminal. +\begindesc +\cts tracingrestores {\param{number}} +\explain +如果此参数大于零, +\TeX\ 将在日志文件中记录那些在\minref{编组}结尾处被还原的值。 +如果 |\tracingonline| ^^|\tracingonline| 大于零, +这些信息还将显示在终端上。 + +%Some production forms of \TeX\ ignore the value of |\tracing!-restores| +%so that they can run faster. +%If you need to use this parameter, be sure to use a form that +%responds to it. +%\enddesc +某些 \TeX\ 实现形式忽略 |\tracing!-restores| 的取值以更快地运行。 +如果你需要此参数,确保你用的 \TeX\ 形式能用此参数。 +\enddesc + +%\begindesc +%\cts tracingstats {\param{number}} +%\explain +%If this parameter is $1$ or greater, \TeX\ will +%include a report on the resources that it used to run your job +%(see \knuth{page~300} for a list and explanation of these resources). +%Moreover, if |\tracingstats| is $2$ or greater, +%\TeX\ will report on its memory usage whenever it does a +%^|\shipout| (\xref \shipout) for a page. +%The report appears at the end of the log file. +%^^{log file//tracing statistics in} +%If ^|\tracingonline| is greater than zero, the information will also appear +%at your terminal. +%If you're having trouble with \TeX\ exceeding one of its +%capacities, the information provided by |\tracingstats| may help you +%pinpoint the cause of the difficulty. +\begindesc +\cts tracingstats {\param{number}} +\explain +如果此参数大于或等于 $1$, +\TeX\ 将报告它运行任务时所用的各种资源% +(见\knuth{第~300~页}中这些资源的列表和解释)。 +另外,如果 |\tracingstats| 大于或等于 $2$, +\TeX\ 将在 ^|\shipout|(\xref \shipout )页面时报告所用的内存占用。 +这些报告写在日志文件的末尾。 +^^{日志文件//在其中追踪统计信息} +如果 |\tracingonline| ^^|\tracingonline| 大于零, +这些信息还将显示在终端上。 +如果出现 \TeX\ 超出其中某个容量的问题, +|\tracingstats| 提供的这些信息将帮助你准确定位问题的起因。 + +%Some production forms of \TeX\ ignore the value of |\tracingstats| +%so that they can run faster. +%If you need to use this parameter, be sure to use a form that +%responds to it. +某些 \TeX\ 实现形式忽略 |\tracingstats| 的取值以更快地运行。 +如果你需要此参数,确保你用的 \TeX\ 形式能用此参数。 + +%The following example shows a sample of +%the tracing output you'd get on one implementation +%of \TeX. It may be different on other implementations. +%{\codefuzz = 1in +%\example +%\tracingstats=1 +%| +%\logproduces +%Here is how much of TeX's memory you used: +% 4 strings out of 5540 +% 60 string characters out of 72328 +% 5956 words of memory out of 262141 +% 921 multiletter control sequences out of 9500 +% 14794 words of font info for 50 fonts, out of 72000 for 255 +% 14 hyphenation exceptions out of 607 +% 7i,4n,1p,68b,22s stack positions out of 300i,40n,60p,3000b,4000s +%| +%\endexample +%}% end scope of codefuzz +%\enddesc +下面的例子显示了在某个 \TeX\ 实现中实际的追踪输出。 +在其他 \TeX\ 实现中也许会有所不同。 +{\codefuzz = 1in +\example +\tracingstats=1 +| +\logproduces +Here is how much of TeX's memory you used: + 4 strings out of 5540 + 60 string characters out of 72328 + 5956 words of memory out of 262141 + 921 multiletter control sequences out of 9500 + 14794 words of font info for 50 fonts, out of 72000 for 255 + 14 hyphenation exceptions out of 607 + 7i,4n,1p,68b,22s stack positions out of 300i,40n,60p,3000b,4000s +| +\endexample +}% end scope of codefuzz +\enddesc + +%\begindesc +%\cts tracingall {} +%\explain +%This command tells \TeX\ to +%turn on every available form of tracing. +%It also sets ^|\tracingonline| to $1$ so that the trace output will appear +%at your terminal. +%\enddesc +\begindesc +\cts tracingall {} +\explain +此命令让 \TeX\ 打开所有可用的追踪形式, +并设定 ^|\tracingonline| 为 $1$ 以让追踪输出显示在终端上。 +\enddesc + +%\begindesc +%\cts showboxbreadth {\param{number}} +%\explain +%This parameter specifies the maximum number of list items +%that \TeX\ displays for one level of one box when it is producing +%the output for ^|\showbox| or ^|\tracingoutput|. +%\PlainTeX\ sets |\showboxbreadth| to $5$. +%\enddesc +\begindesc +\cts showboxbreadth {\param{number}} +\explain +此参数指定 \TeX\ 为 ^|\showbox| 或 ^|\tracingoutput| 生成输出时,% +对各级盒子的列表项显示的最大数目。 +\PlainTeX\ 设定 |\showboxbreadth| 等于 $5$。 +\enddesc + +%\begindesc +%\cts showboxdepth {\param{number}} +%\explain +%This parameter specifies the +%level of the deepest list that \TeX\ displays when +%it is producing the output for ^|\showbox| or ^|\showlists|. +%\PlainTeX\ sets |\showboxdepth| is $3$. +%\eix^^{tracing} +%\eix^^{debugging} +%\eix^^{diagnostic aids} +%\enddesc +\begindesc +\cts showboxdepth {\param{number}} +\explain +此参数指定 \TeX\ 为 ^|\showbox| 或 ^|\tracingoutput| 生成输出时,% +所显示的列表的最深层级。 +\PlainTeX\ 设定 |\showboxdepth| 等于 $3$。 +\eix^^{追踪} +\eix^^{调试} +\eix^^{帮助诊断} +\enddesc + +%========================================================================== +%\subsection {Sending messages} +\subsection {传送信息} + +%\begindesc +%\bix^^{messages, sending} +%\bix^^{error messages} +%\cts message {\rqbraces{\<token list>}} +%\cts errmessage {\rqbraces{\<token list>}} +%\explain +%These commands display the message given by \<token list> on your +%terminal and also enter it into the log. Any \minref{macro}s in the +%message are expanded, but no commands are executed. This is the same rule +%that \TeX\ uses for |\edef| (\xref \edef). +\begindesc +\bix^^{信息发送} +\bix^^{错误信息} +\cts message {\rqbraces{\<token list>}} +\cts errmessage {\rqbraces{\<token list>}} +\explain +这两个命令在终端上显示由 \<token list> 给出的信息,并将它们记录到日志中。 +信息中的任何\minref{宏}都将被展开 ,但是命令不会被执行。 +这与 \TeX\ 用于 |\edef|(\xref\edef )的规则一样。 + +%For |\errmessage|, \TeX\ pauses +%in the same way that it does for one of its own error messages +%and displays the |\errhelp| tokens if you ask for help. +对于 |\errmessage|,\TeX\ 如同显示自己的错误信息一样暂停运行, +并在请求帮助时显示 |\errhelp| 记号列。 + +%You can generate multiline messages by using the ^|\newlinechar| +%character (\xref \newlinechar). +%\example +%\message{Starting a new section.} +%| +%\endexample +%\enddesc +要生成多行的信息,你可以用 ^|\newlinechar| 字符(\xref \newlinechar )。 +\example +\message{Starting a new section.} +| +\endexample +\enddesc + +%\begindesc +%\cts wlog {\rqbraces{\<token list>}} +%\explain +%This command writes \<token list> on the log file. +%^^{log file//written by \b\tt\\wlog\e} +%\minrefs{log file} +%\TeX\ expands \<token list> according to the same rules that it uses +%for |\edef| (\xref\edef). +%\example +%\wlog{Take two aspirins and call me in the morning.} +%| +%\logproduces +%Take two aspirins and call me in the morning. +%| +%\endexample +%\enddesc +\begindesc +\cts wlog {\rqbraces{\<token list>}} +\explain +此命令在日志文件写入 \<token list>。 +^^{日志文件//用 \b\tt\\wlog\e 写入} +\minrefs{log file} +\TeX\ 按照与 |\edef|(\xref\edef )一样的规则展开 \<token list>。 +\example +\wlog{Take two aspirins and call me in the morning.} +| +\logproduces +Take two aspirins and call me in the morning. +| +\endexample +\enddesc + +%\begindesc +%\cts errhelp {\param{token list}} +%\explain +%This parameter contains the token list that \TeX\ displays +%when you ask for help in response to an |\errmessage| command. +%We recommend that when +%you're generating an error message with |\errmessage|, you +%set |\errhelp| to a string that describes the nature of the +%error and use |\newhelp| to produce that string. +%You can use the ^|\newlinechar| character to produce multiline messages. +%\enddesc +\begindesc +\cts errhelp {\param{token list}} +\explain +此参数包含 \TeX\ 用户在 |\errmessage| 命令中请求帮助时显示的记号列表。 +我们建议在用 |\errmessage| 生成错误信息时, +将|\errhelp| 设定为描述错误形式的字符串,并用 |\newhelp| 生成该字符串。 +你可以用 ^|\newlinechar| 字符生成多行的信息。 +\enddesc + +%\begindesc +%\ctspecial newhelp \ctsxrdef{@newhelp} {\<control sequence> +% \rqbraces{\<help text>}} +%\explain +%This command assigns the ^{help message} given by \<help text> to +%\<control sequence>. It provides an efficient way of defining +%the ^{help text} that further explains an error message. +%Before issuing the error message with the |\errmessage| command, +%you should assign \<control sequence> to ^|\errhelp|. The help text +%will then appear if the user types `|H|' +%or `|h|' in response to the error message. +%\example +%\newhelp\pain{Your input includes a token that I find^^J +% to be offensive. Don't bother me again with this^^J +% document until you've removed it.} +%\errhelp = \pain \newlinechar = `\^^J +%% ^^J will start a new line +%\errmessage{I do not appreciate receiving this token} +%| +%\logproduces +%!! I do not appreciate receiving this token. +%l.8 ...t appreciate receiving this token.} +% +%? H +%\Your input includes a token that I find +% to be offensive. Don't bother me again with this +% document until you've removed it. +%| +%\endexample +%\enddesc +\begindesc +\ctspecial newhelp \ctsxrdef{@newhelp} {\<control sequence> + \rqbraces{\<help text>}} +\explain +此命令将 \<help text> 给出的^{错误信息}赋予 \<control sequence>。 +它提供一种定义^{帮助文本}的快捷方式,帮助文本进一步解释了错误信息。 +在用 |\errmessage| 命令报出错误之前, +你应当将 \<control sequence> 赋予 ^|\errhelp|。 +这样在显示错误信息时,如果用户键入 `|H|' 或 `|h|', +\TeX\ 将显示出帮助文本。 +\example +\newhelp\pain{Your input includes a token that I find^^J + to be offensive. Don't bother me again with this^^J + document until you've removed it.} +\errhelp = \pain \newlinechar = `\^^J +% ^^J will start a new line +\errmessage{I do not appreciate receiving this token} +| +\logproduces +!! I do not appreciate receiving this token. +l.8 ...t appreciate receiving this token.} + +? H +\Your input includes a token that I find + to be offensive. Don't bother me again with this + document until you've removed it. +| +\endexample +\enddesc + +%\begindesc +%\cts errorcontextlines {\param{number}} +%\explain +%This parameter determines the number of pairs of context lines, +%not counting the top and bottom pairs, that \TeX\ prints when it +%encounters an error. By setting it to $0$ you can get rid of long +%error messages. +%You can still force out the full context by typing something like: +%\csdisplay +%I\errorcontextlines=100\oops +%| +%in response to an error, +%since the undefined control sequence |\oops| will cause another error. +%\PlainTeX\ sets |\error!-context!-lines| to $5$. +%\enddesc +\begindesc +\cts errorcontextlines {\param{number}} +\explain +此命令确定 \TeX\ 遇到错误时打印的成对信息行的数目,不包括最上面和最下面这两行。 +将它设为 $0$ 就可以去掉冗长的错误信息。 +你仍然可以强制显示完整的信息,只要在回应错误时这样输入: +\csdisplay +I\errorcontextlines=100\oops +| +这是因为未定义的控制序列将引起另一个错误。 +\PlainTeX\ 设定 |\error!-context!-lines| 等于 $5$。 +\enddesc + +%\see |\write| (\xref \write), |\escapechar| (\xref \escapechar). +%\eix^^{messages, sending} +%\eix^^{error messages} +\see |\write|(\xref \write )、|\escapechar|(\xref \escapechar )。 +\eix^^{信息发送} +\eix^^{错误信息} + +%========================================================================== +%\section {Initializing \TeX} +\section {初始化 \TeX} + +%\begindesc +%\cts dump {} +%\explain +%This command, which must not appear inside a group, dumps the +%contents of \TeX's memory +%to a ^{format file} (\xref{format file}). +%By using ^|virtex|, a special ``virgin'' form of \TeX, +%you can then reload the format file at high speed and +%continue in the same state that \TeX\ was in at the time of the dump. +%|\dump| also ends the run. Since |\dump| can only be used +%in ^|initex|, not in production forms of \TeX, it is only useful +%to people who are installing \TeX. +%\enddesc +\begindesc +\cts dump {} +\explain +这个命令不能在编组中使用,它可以把 \TeX\ 记录的内容导出成一个^{格式文件}(\xref{格式文件})。 +如果使用的是 ^|virtex| 这种特殊的 \TeX\ 形式, +\footnote{译注:|virtex| 和 |initex| 在现代的 \TeX\ 系统中不再被使用。 +在远古时代,人们必须使用 |initex| 命令来导出格式文件,用 |virtex| 命令载入格式文件, +而 |tex| 程序不能导出或载入格式文件。而在现代的发行版中,|tex| 命令可以处理这一切。} +你能够以很快的速度载入这个格式文件, +载入后的 \TeX\ 状态和你当初导出格式文件时的状态并无二致。 +|\dump| 命令会同时结束本次运行。 +由于 |\dump| 只能在 ^|initex| 中运行, +而不是生产版本的 \TeX ,所以它仅仅在你安装 \TeX\ 时会用到。 +\enddesc + +%\begindesc +%\cts everyjob {\param{token list}} +%\explain +%This parameter contains a \minref{token} list that \TeX\ expands at the +%start of every job. Because an assignment to |\everyjob| cannot affect +%the current run (by the time you've done the assignment it's already too +%late), it is only useful to people who are preparing format files. +%\enddesc +\begindesc +\cts everyjob {\param{token list}} +\explain +此参数包含一个\minref{记号}列,\TeX\ 在开始每个任务时展开它们。 +由于对 |\everyjob| 的赋值无法影响当前任务(在你赋值时已经太迟了), +它仅对制作格式文件的人有用。 +\enddesc + +\enddescriptions + +\ifoldeplain\else\ifcompletebook\else +\vskip4em{\sectionfonts\leftline{本章索引}} +\readindexfile{i} +\fi\fi + +\endchapter \byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/index.tex b/Master/texmf-dist/doc/plain/impatient-cn/index.tex new file mode 100644 index 00000000000..71718fd5444 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/index.tex @@ -0,0 +1,41 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\chapter{Index} +\chapter{索引} + +\par +\kern-\baselineskip + +%\noindent In the entries of this index, a page number in italics +%indicates a principal or defining entry. + +\par +% Let's try to collect indexing cross-references here. +% +\idxsee{diacritical marks}{accents} +\idxsee{drawing lines}{rules} +\idxsee{drivers}{device drivers} +\idxsee{eyes}{\anatomy} +\idxsee{foreign languages}{European languages} +\idxsee{intestines}{\anatomy} +\idxsee{mouth}{\anatomy} +\idxsee{page footers}{footers} +\idxsee{page headers}{headers} +\idxsee{paragraphs//indenting}{indentation} +\idxsee{recursive macros}{macros, recursive} +\idxsee{stomach}{\anatomy} +\idxsee{tables}{alignments} +\beginindex + +\let\+ = 0 % This can't occur in a macro... + +\ifoldeplain\input book.sdx \else\readindexfile{i}\fi + +\endindex + +\endchapter +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/macros.tex b/Master/texmf-dist/doc/plain/impatient-cn/macros.tex new file mode 100644 index 00000000000..fb0ca043919 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/macros.tex @@ -0,0 +1,2405 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. +% +% Macros for typesetting TeX for the Impatient. +% +% These macros are being distributed without any warranty whatsoever. +% The level of commentary is that which we, the authors, found necessary +% for our own purposes. +% +% ========================================================================== +% +% The macros use the term `chapter' for what in the book is called +% a `section', `section' for the book's `subsection', etc. For purposes of +% defining macros it's convenient to think of the book as divided into +% chapters, but because of the nonsequential nature of the book we don't +% want to tell the readers that they are reading chapters. + + +% An embedded file should end with \byebye. +% +\begingroup +\ifx \macsin\relax + % In frontm.tex, we do \input macros several times, and we still want + % the \byebye at the end to end the job. + % So we \input inside a group in frontm, and make the assignment to + % \endinput local. + \aftergroup\let\aftergroup\byebye\aftergroup\endinput + \aftergroup\endinput % Don't read this file again. +\else + \global\let\byebye = \end + \global\let\macsin = \relax +\fi +\endgroup + +% This must come before config.tex. +\input eplain3 + +% Define configuration switches and then read their values. +% +\newif\ifcenterpage \centerpagetrue +\newif\ifcompletebook +\newif\iffinal % true for the 2000dpi copy +\newif\ifmsdos +\newif\ifedgetabs \edgetabstrue +\newif\ifdvi \dvitrue % true if we want a .dvi file +\newif\iftrimpage \trimpagetrue +\newif\ifoldeplain \ifx\undefined\interitemskipamount\oldeplaintrue\fi +\newif\ifwriteidx \writeidxtrue % disable some index items for new eplain + +%\xrefwarningfalse + +% The config file contains settings for flags, e.g., +% \completebookfalse +% It can be empty as long as it exists. +\input config +\ifcompletebook \else\rewritetocfilefalse \fi +\edef\tempfile{\ifmsdos g:temp \else x \fi} +\ifx\setmodes\undefined\else\setmodes\fi % modify from command line input + +% Certain defaults are forced by certain others. +% +\iffinal \centerpagetrue \edgetabstrue\fi + +% Initial definitions. (These should come before \input fonts.) +% +\catcode`\@ = \letter % For the macro file only. + +% Dirty hacks for eplain 2.0+ +\ifoldeplain\else + \let\oldxrdef = \xrdef + \def\xrdef#1{\oldxrdef{\tokstostring{#1}}}% + \let\oldxrefn = \xrefn + \def\xrefn#1{\oldxrefn{\tokstostring{#1}}}% + \let\old@definelabel = \@definelabel + \def\@definelabel#1{\old@definelabel{\tokstostring{#1}}} + \def\LaTeX{L\kern -.26em \raise .6ex \hbox{\sevenrm A}\kern -.15em \TeX}% + % setup hyperlinks + \enablehyperlinks[dvipdfm] + %% may cause an error with xetex.def before version v4.03 + %% please see http://tex.stackexchange.com/q/191489/8956 + \beginpackages\usepackage{color}\endpackages + \definecolor{teal}{rgb}{0,0.5,0.5} + \hlopts{colormodel=,color=teal} + \hlopts{bwidth=0} +\fi + +% We don't want register allocation information in the log, +% so we redefine the relevant macro from plain.tex. + +\def\alloc@#1#2#3#4#5{\global\advance\count1#1 by 1 + \ch@ck#1#4#2% + \allocationnumber=\count1#1 \global#3#5=\allocationnumber +} + +% The fonts. This should come before defining the new character control +% sequences that follow. +% +\input fonts + +\hyphenation{script-script base-line-skip no-base-line-skip line-skip + line-skip-limit max-dead-cycles output-penalty no-inter-line-skip + show-box-depth show-box-breadth if-hmode if-vmode if-mmode + back-spaces back-space par-indent tracing-on-line} + +{ + \catcode`\| = 0 + \catcode`\\ = \other + |global|let|bsc = \ % \bsc is a true backslash character. +} + +\let\\ = \bsc + +\def\bslash{$\backslash$} % backslash suitable for printing +\let\shriek = ! +\let\vbar = | +{ + \catcode `\[ = 1 \catcode `\] = 2 + \catcode `\{ = \other \catcode `\} = \other + \global\let\lbracechar = { + \global\let\rbracechar = } +] +\def\blbrace{{\bt \{}} +\def\brbrace{{\bt \}}} + +{ + \catcode`\ =\other% Notice no spaces at beginning of next line. +\gdef\otherspace{ } +} + +\let\mathlbrace = \{ \let\mathrbrace = \} +{ + \catcode `\[ = 1 \catcode `\] = 2 + \catcode `\{ = \other \catcode `\} = \other + \gdef\{[\ifmmode\mathlbrace\else [\bt {]\fi] + \gdef\}[\ifmmode\mathrbrace\else [\bt }]\fi] +] + + +% These are for debugging (less drastically than \tracingall or \loggingall). +% +\def\tron{\tracingmacros=2 \tracingcommands=2 \tracingonline=1} +\def\troff{\tracingmacros=0 \tracingcommands=0} + +% \pagebreak should always cause a break, even if the resulting +% page is empty. +% +\def\pagebreak{\null\vfill\eject} + +% \linebreak causes a line break in chapter headings, but outside of that +% context we don't want it to do anything. +% +\let\linebreak = \relax + + +% Parameters. +% +\baselineskip = 14pt +\parskip = 0pt plus 0.3pt +\newdimen\codefuzz \codefuzz = 10pt % for \csdisplay, \example +\hbadness = 4000 +\vbadness = 8000 +\hfuzz = 0.1pt % as in plain TeX +\vfuzz = 0.1pt % as in plain TeX +\exhyphenpenalty = 0 % we don't mind these +\widowpenalty = 10000 % these are very bad +\clubpenalty = 10000 % these are very bad too + +% Page margins. +% +% Note that the \newdimens can't be within an \if or a \def +% because \newdimen is an \outer macro (thanks to DEK). +% +\newdimen\insidemargin \newdimen\outsidemargin +\newdimen\topmargin \newdimen\bottommargin +\newdimen\headmargin +\newdimen\totalwidth \newdimen\totalheight +\newdimen\oddoffset \newdimen\evenoffset +\newif\ifnoheadline + +% \totalwidth and \totalheight are the actual trim size of the book. +% \insidemargin, \outsidemargin, \topmargin, and \bottommargin are margins +% with respect to the pages of the book, not the draft 8 1/2 x 11 pages. +% + +% This makes it so that we only have to cut twice on a page. +% 8.5" = 51.19125pc exactly. +% \totalwidth should = \outsidemargin + \insidemargin + \hsize. +% +\totalwidth = 7.375in % 44.4159375pc = 7 3/8". +\outsidemargin = 8pc +\insidemargin = 10pc +\hsize = \totalwidth +\advance \hsize by -\outsidemargin +\advance \hsize by -\insidemargin +% \hsize should now be 26.4159375pc + +% Now that we know \hsize, we can set \parfillskip to eliminate (most) +% widows. +% +\parfillskip = .75\hsize plus .06\hsize minus .75\hsize + + +% \oddoffset and \evenoffset are the \hoffset values needed to +% align the left edge of the virtual page with the left edge of the +% draft paper (not the left edge of the book pages). +% +% The -1in below comes from the default margin, which the DVI driver must +% set at 1in. Odd pages are on the left, even on the right. +% +% First, align the left edge of the virtual page with the left edge of the +% draft page. +% +\oddoffset = -1in +\advance\oddoffset by \insidemargin +% +\evenoffset = -1in +\advance\evenoffset by \outsidemargin + +% For centered pages, move the virtual page right by half the trim width. +% +\ifcenterpage + \dimen0 = 8.5in + \advance\dimen0 by -\totalwidth + \divide\dimen0 by 2 + \advance\oddoffset by \dimen0 + \advance\evenoffset by \dimen0 + +% For uncentered even-numbered pages, align the right edge of the virtual +% page with the right edge of the draft paper so that we can remove the trim +% of two-sided pages with a single cut. +% +\else + \advance\evenoffset by 8.5in + \advance\evenoffset by -\totalwidth +\fi + +\hoffset = \oddoffset % First page is numbered one. + +% Now for the vertical, which is simpler, since it doesn't vary from +% page to page. +% 11" = 66.2475pc exactly. +% \totalheight should = \topmargin + \bottommargin + \vsize. +% +\totalheight = 9.25in % 9 1/4" = 55.708125pc +\topmargin = 6pc % Distance from top of page to baseline of text line 1 +\bottommargin = 6pc % Distance from last line to bottom of page. +\topskip = 2pc % Distance from top of \box255 to baseline of text line 1 +% \vsize Distance from top of \box255 to last line of text. +% \headmargin Distance from top of \box255 to top of page +% We'll place the headline just above \box255 + +\headmargin = \topmargin \advance \headmargin by -\topskip + +\vsize = \totalheight +\advance \vsize by -\headmargin +\advance \vsize by -\bottommargin +% \vsize should now be 46.708125pc + +\voffset = -1in % align top of logical page with top of physical page +\advance \voffset by \headmargin +\ifcenterpage + \dimen0 = 11in + \advance\dimen0 by -\totalheight + \divide\dimen0 by 2 + \advance\voffset by \dimen0 +\fi + +\topskip = 2pc % Distance from headline to first line of text. + +\iftrimpage + \pdfpagewidth=7.375in \pdfpageheight=9.25in + %\hsize=7.375in \vsize=9.25in + %\advance \hsize by -18pc + %\advance \vsize by -10pc + \outsidemargin = 9pc \insidemargin = 9pc + \oddoffset = -1in \advance\oddoffset by \insidemargin + \evenoffset = -1in \advance\evenoffset by \outsidemargin + \hoffset = \oddoffset + \voffset = -1in \advance \voffset by 4pc +\fi + +% Other formatting parameters. +% +% The basic increments we'll use in the layout. +% +\def\setskip#1 = #2 {% + \dimen0 = #2\baselineskip + \csname #1skipamount\endcsname = + \dimen0 plus .33\dimen0 minus .25\dimen0 + \ignorespaces +} +\newskip\greaterskipamount +\newskip\greatskipamount +\newskip\biggerskipamount +\newskip\medbigskipamount +\newskip\medsmallskipamount +\newskip\tinyskipamount + +\setskip greater = 2.5 +\setskip great = 2.0 +\setskip bigger = 1.5 +\setskip big = 1.0 +\setskip medbig = .75 +\setskip med = .5 +\setskip medsmall = .375 +\setskip small = .25 +\setskip tiny = .125 + +\parindent = 2em +\newdimen\normalindent \normalindent = \parindent + +\footnotemarkseparation = .16666em + +\ifoldeplain % eplain 1.9 + \let\abovelistskipa = \abovelistskip + \let\interitemskipa = \interitemskip + \let\belowlistskipa = \belowlistskip +\else % eplain 2.0+ + \let\abovelistskipa = \abovelistskipamount + \let\interitemskipa = \interitemskipamount + \let\belowlistskipa = \belowlistskipamount +\fi +\abovelistskipa = \smallskipamount +\interitemskipa = \tinyskipamount +\belowlistskipa = \smallskipamount +\listleftindent = 0pt + +% Displays involve text and math. We don't want as much flexibility in +% the glue as plain.tex sets. +% +\abovedisplayskip = \medsmallskipamount +\abovedisplayshortskip = 0pt plus 2pt +\belowdisplayskip = \medsmallskipamount +\belowdisplayshortskip = \belowdisplayskip + +\newskip\intercapsuleskip \intercapsuleskip = .75\tinyskipamount plus 0.4pt +\newdimen\capsulehangindent \capsulehangindent = 2pc + +\newskip\aboveconceptskip \aboveconceptskip = \bigskipamount + + +\newskip\abovesectionskip \abovesectionskip = \greaterskipamount +% No stretch or shrink below heads, according to A-W. +\newskip\belowsectionskip \belowsectionskip = 1\biggerskipamount + +\newskip\abovesubsectionskip \abovesubsectionskip = \greatskipamount +\newskip\belowsubsectionskip \belowsubsectionskip = 1\bigskipamount + +\newskip\abovedescriptionskip \abovedescriptionskip = \biggerskipamount +\newskip\belowdescriptionskip \belowdescriptionskip = \medskipamount + +\newskip\explainskip \explainskip = \tinyskipamount +\newskip\exampleskip \exampleskip = \smallskipamount + +\def\interexampleskip{\vskip\medsmallskipamount} +\def\tinyskip{\vskip\tinyskipamount} + +% Space in which a symbol is shown in a columnated list of commands. +\newdimen\symbolspace \symbolspace = 14pt + +% \colsindent is the indentation before material arranged in columns and +% displayed, as in the list of Greek letters. +\newskip\colsindent \colsindent = \parindent + +% The indentation for page lists in the index that don't fit on one line. +\newdimen\indexpageindent \indexpageindent = 1pc + +% The indentation for subsidiary entries in the index. (Should be less +% than \indexpageindent.) +\newdimen\indexlevelindent \indexlevelindent = .5pc + +\newskip\codebaselineskip \codebaselineskip = \baselineskip + +% Fill the previous page with blank space before a command. +% +\def\cmdbreak{\par\nobreak\vfil\penalty 1000\vfilneg\par} + +% Penalties. +% +\newcount\conceptpenalty \conceptpenalty = -1500 +\newcount\intercmdnamepenalty \intercmdnamepenalty = 300 +\newcount\@intercmdnamepenalty \@intercmdnamepenalty = \intercmdnamepenalty + + + +% The output routine. +% +\output = {% + \onepageout + % + % Odd pages are right-hand pages. + % + % Note \pageno has been incremented when we get here -- it now refers + % to the page number of the page about to be typeset, not the page + % that we just shipped out. + % + \ifodd\pageno % \onepageout advances \pageno. + \global\hoffset = \oddoffset + \global\intercmdnamepenalty = 10000 + \else + \global\hoffset = \evenoffset + \global\intercmdnamepenalty = \@intercmdnamepenalty + \fi +} + +\ifdvi\else\output={% + \setbox0=\box255\deadcycles=0 + \advancepageno + \global\advance \truepage by 1 + \ifnum\outputpenalty>-20000\else \dosupereject \fi + } +\fi + +\def\onepageout{% + \shipout\vbox{% + \offinterlineskip % The page should have vertically abutting boxes. + \ifodd\pageno + \cropmargin = \insidemargin + \else + \cropmargin = \outsidemargin + \fi + \addcropmarks % Does not affect the position. + \ifcenterpage \addtruepage \fi + % + \ifedgetabs \ifodd\pageno \ifnoheadline\else + \edgetabs % Does not affect the position. + \fi\fi\fi + % + \vbox to 0pt{\vskip-\headmargin \vskip-3.5pc + \rightline{\sevenrm\timestamp}\vss}% + % + \smash{\line{\the\headline}}% Simplified \makeheadline. + \pagebody + \vskip 2\normalbaselineskip + % The footline is needed on one page (for an example). + \line{\the\footline}% + }% + % Now the rest from \plainoutput: + \advancepageno + \global\advance\truepage by 1 + \ifnum\outputpenalty>-20000\else \dosupereject \fi +} + +\footline = {\hfil} + +% The headline always includes the name of the current chapter. This +% goes on the inside. If more information, such as the concept we're +% explaining, is included, it goes on the outside. +% +\headline = {% + % Produce the timestamp + \ifnoheadline + \hfil + \global\noheadlinefalse + \else + \let\\ = \ignorespaces + \ifodd \pageno % Right-hand page. + {\tenit \firstmark}\hfil {\tenbf \folio}% + \else % Left-hand page. + {\tenbf \folio}% + \hfil + {\tenit + \chaptername + \ifnum\pageno>0\ifback\else + \quad $\backslash$\quad\S\the\chapterno + \fi\fi + }% + \fi + \fi +} + +% Sizes for cropmarks: +% +\newdimen\cropthick \cropthick = 0.4pt +\newdimen\crophsize \crophsize = 1pc +\newdimen\cropvsize \cropvsize = 1pc +\newdimen\cropoffset \cropoffset = .0625in + +% Each of the following macros generates a quarter of a cropmark as +% a zero-size box at the center point of the cropmark. +% We want the cropmarks to be centered with respect to their thicknesses. + +\def\vcropdown {\hbox to 0pt{% + \kern -.5\cropthick + \vbox to 0pt{% + \vskip \cropoffset + \hrule width\cropthick depth\cropvsize height0pt + \vss}% + \kern -.5\cropthick}% +} + +\def\vcropup {\hbox to 0pt{% + \kern -.5\cropthick + \vbox to 0pt{% + \vss + \hrule width\cropthick depth\cropvsize height0pt + \vskip \cropoffset}% + \kern -.5\cropthick}% +} + +\def\hcropright{\rlap{\kern\cropoffset\smash{% + \vrule width\crophsize depth .5\cropthick height .5\cropthick}}} + +\def\hcropleft{\llap{\smash{% + \vrule width\crophsize depth .5\cropthick height .5\cropthick}% + \kern\cropoffset}} + +% \cropmargin will be set to the left margin on the current page. +% +\newdimen\cropmargin +\def\cropline#1{\moveleft\cropmargin\hbox to \totalwidth{#1}} + +% \addcropmarks adds the cropmarks to a page while leaving everything else +% alone. It assumes we're positioned at the top of the page. + +\def\addcropmarks{% + \vbox to 0pt{% + \offinterlineskip % contextually redundant but precautionary + \vskip -\headmargin % to get to logical top of page + \ifcenterpage + \cropline{\hcropleft\vcropup \hfil \vcropup\hcropright} + \else + \cropline{\hfil \vcropdown}% + \fi + \vskip\totalheight + \ifcenterpage + \cropline{\hcropleft\vcropdown \hfil \vcropdown\hcropright}% + \else + \cropline{\hcropright\hfil\hcropleft\vcropup\vcropdown\hcropright}% + \fi + \vss +}} + +% \addtruepage adds a small page number near the upper right cropmark. +% +\newcount\truepage \truepage = 1 +\def\addtruepage{% + \vbox to 0pt{\vskip -\headmargin\vskip -2pc + \moveleft\cropmargin\hbox to \totalwidth{% + \twelvebf + \quad\TeX\ 急就帖\hss + N\raise 3.3pt\hbox{o} \the\truepage\quad}% + \vss}% +} + + +% The mark information is output by \markinfo. +% +% We can use a different mark, e.g., a shorter heading, by calling +% \changemark. +% +\newtoks\shortmark \shortmark = {} +\newif\ifchangemark + +\def\markinfo#1{% + \ifchangemark + \mark{\the\shortmark}\changemarkfalse + \else + \mark{#1}% + \fi +} + +\def\changemark#1{\shortmark = {#1}\changemarktrue} + + +% ``Tabs'' down the side of the book. +% Say \nextedgetab to move the thing down to the next. +% Say \edgetabsfalse to turn them off. +% +\newcount\numtabs \numtabs = 7 +\newdimen\edgetabjump \edgetabjump = 0pt +\def\nextedgetab{% + \advance\edgetabjump by \edgetabdepth +} + +\def\settabdepth#1{% + \edgetabdepth = #1 + \setbox\tabbox = \vbox to \edgetabdepth{% + \leaders + \vbox{\vskip \edgespacing + \hrule width\edgetabwidth height0pt depth\edgethick}% + \vfil} +} + +\newskip\bigtab \newskip\smalltab +\newskip\edgetabdepth +\newbox\tabbox + +\bigtab = \totalheight \divide\bigtab by \numtabs +\smalltab = .4\bigtab % five smalls make two bigs + +\newdimen\edgetabin \edgetabin = .25in +\newdimen\edgetabbleed \edgetabbleed = .25in +\newdimen\edgetabwidth + \edgetabwidth = \edgetabin + \advance \edgetabwidth by \edgetabbleed +\newdimen\edgethick \edgethick = .3pt % line thickness +\newdimen\edgespacing \edgespacing = .9pt % line spacing + + +\def\edgetabs{\vbox to 0pt{% + \vskip-\headmargin + \vskip\edgetabjump + \hbox{% + \hskip \hsize + \hskip\outsidemargin + \hskip-\edgetabin + \copy\tabbox + }% + \vss +}} + + +% We can simplify \pagecontents (which is called by \pagebody) somewhat, +% since we don't have \topinserts. +% +\def\pagecontents{% + \unvbox255 % The main page contents. + % + \ifvoid\footins\else % Footnotes are present. + \vskip\skip\footins + \footnoterule + \unvbox\footins + \fi +} + + +% The command chapters had a mini-index at the bottom of right-hand +% pages. These definitions are the way to put entries into it. +% +% \minref generates a reference for the mini-index, and prints the +% reference on the page, also. +% +\def\minref#1{% + #1% Print it on the page. + % That's it, now. +} + +% Mini-index entry without printing the argument on the page. +% Just ignore the argument now. +% +\def\minrefs#1{% + \ignorespaces +} + +% This is used for producing the concept mini-index. +% +\def\minrefsdelim#1\endmark{\minrefs{#1}} + +% One last insertion-oriented thing: +% we always want numbered footnotes, as defined in eplain. +% We'll do them in 8-point type. +% +\let\@plainfootnote = \footnote +\let\footnote = \numberedfootnote +\everyfootnote = {\footnotefonts} + + +% The \margin macro produces a marginal note at the same level as its call. +% It should only be used in a paragraph or in the main vertical list. +% It is nullified when we're printing the final copy. +% +\def\margin#1{% + \ifhmode + \vadjust{\printmarginnote{#1}}% + \else + \dimen0 = \prevdepth + \prevdepth = -1000pt + \printmarginnote{#1}% + \prevdepth = \dimen0 + \fi + \ignorespaces +} + +\def\printmarginnote#1{% + \hbox to 0pt{% + \hskip 1.1\hsize + \vbox to 0pt{% + \everypar = {}% Don't inherit hanging indentation. + \hsize = 1in \rightskip = 0pt plus 1fil \noindent \sevenrm + \let\tt = \eighttt + \parfillskip = 0pt plus 1fil + \baselineskip = 8pt #1% + \vss + }% + \hss + }% +} + +%\iffinal +\iftrue + \def\margin#1{\ignorespaces} +\fi + + +% Stuff to preserve page breaks inserted for the 2nd printing. +% This macro takes one ``argument''. +% +\def\secondprinting{\afterassignment\finishsecondprinting \toks0 = } +\def\finishsecondprinting{\the\toks0} + +% add pdf bookmarks for xetex +% +\special{pdf: docview << /PageMode /UseOutlines >>} +\def\bookmark#1#2{% + \begingroup% + \def\linebreak{}\def\TeX{TeX}\def\vtop##1{##1}\def\noindent{}\def\\{}\def\hfil{}\def\quad{}% + \special{pdf:out #1 << /Title (#2) /Dest [ @thispage /FitH @ypos ] >>}% + \endgroup% +} + +% for including artwork images +% +\newdimen\oldhoffset +\newdimen\oldvoffset +\newdimen\oldparindent +\def\includeartwork#1{% + \oldhoffset=\hoffset + \oldvoffset=\voffset + \oldparindent=\parindent + \hoffset=-1in\voffset=-1in\parindent=0pt% + \iftrimpage + \special{pdf:image width 7.375in depth 9.25in (artwork/#1-l.png)}% + \else + \special{pdf:image width 210mm depth 297mm (artwork/#1.png)}% + \fi\pagebreak + \hoffset=\oldhoffset + \voffset=\oldvoffset + \parindent=\oldparindent +} + + +% Parts of the book. +% +% +% Chapters. +% +\let\chaptername = \empty +\newcount\chapterno + +\def\chaprule{\vrule depth3\baselineskip height1.5pc width1pt} + +% Chapter openings should not have headlines. +% The text of each chapter starts on a right-hand page in the final +% book. The facing page has an illustration. This means that if the +% previous chapter ended on a left-hand (i.e., even) page, we have to +% eject an extra blank page. +% +\outer\def\chapter#1 \par{% + \ifcompletebook % Don't do the blank pages for proof copies. + \blankpage % the illustration page + % The first real chapter starts on page 1. + \ifnum\pageno < 0 \pageno = 1 \fi + \fi + % + \def\chaptername{#1}% + \advance\chapterno by 1 + % + \bookmark{1}{\ifback\else\the\chapterno\ \fi\chaptername} + % + \setbox0 = \hbox{\chapternumeralfont + \kern1pt + \expandafter\kernchapno\the\chapterno\empty + \kern3pt}% + \vglue 0pt % But we get a \topskip of 2pc now. + \nointerlineskip + \leftline{% + \ifback\else + \vtop{% + \copy0 + \vskip6pt + \hrule width\wd0 height2.2pc + }% + \kern 16pt + \fi + \chapterfonts % to get \baselineskip now + \chaprule + \kern 6pt + \vtop{% + \def\linebreak{\hfil\break}% + \noindent \chaptername}% + }% + \vskip 6pc plus.5pc minus.5pc + \noheadlinetrue + \toks0=\expandafter{\chaptername} + \edef\writechaptertoc{% + \noexpand\writenumberedtocentry{chapter}{\the\toks0}{\the\chapterno}% + }% + \writechaptertoc + % + % Use chaptername as first A-head (or only one). + \mark{\chaptername}% + \footnotenumber = 0 % Number footnotes from 1 in each chapter. + \beginit{CHAPTER}% + \noindent + \ignorespaces +} + +\def\endchapter{% + \mark{\chaptername}% Use chapter name on last blank recto page + \vfil\eject % be sure everything's out before testing for recto + \ifodd\pageno + \message{Chapter ends on a verso page.}% + \blankpage + \fi + \endit{CHAPTER}% +} +% +% \blankpage creates a blank page with no headline. +% In the final book, it just advances the page number. +% For the web edition, the blank pages serve no purpose except to keep +% the indexing correct. I didn't want to rerun the index. +% +\def\blankpage{% + \iffinal + \advancepageno + \global \advance \truepage by 1 + \else + \noheadlinetrue\pagebreak + \fi +} + +% This hokey little macro kerns between the numerals in the chapter +% number. We want to kern more between `11' then otherwise; also, we +% want to remove the extra space before the chapter number, and after +% `11'. +% +\def\kernchapno#1#2{% + \ifx\empty#2\else \kern-3pt \fi + #1% + \ifx\empty#2\else + \if1#2% + \kern-.1em + \else + \kern-.05em + \fi + \fi + #2% + \if 1#2\kern-.1em\fi +} + +% Sections. +% +\newif\ifheading % Avoid breaking after a heading. + +% get section numbers for the fdl only, since it has internal references. +\let\fdlkludge=\empty + +% The heading flag is turned on by headings and turned off +% at the start of a description. +% +\outer\def\section#1 \par{% + \bookmark{2}{#1}% + \par % be sure we're in vertical mode + \saveskip = \lastskip % will be 0 if no skip + \cmdbreak + \combineskips\abovesectionskip + \dimen0 = 2.5\baselineskip \advance\dimen0 by -\topskip + \vskip -\dimen0 + \vglue \dimen0 + % + {\sectionfonts \leftline{\fdlkludge #1}}% + % + \markinfo{#1}% + \writetocentry{section}{#1}% + \nobreak + % Don't go into horizontal mode within the command descriptions. + % + \vskip\belowsectionskip + \ifcommands \else \noindent \fi + \headingtrue + \everypar = {\headingfalse \global\everypar = {}}% + % only gets executed for \par in horizontal mode + \ignorespaces +} + + +% Subsections. We don't want a break at the glue if we were preceded by +% a \nobreak. +% +\def\subsection#1 \par{% + \bookmark{3}{#1}% + \par % be sure we're in vertical mode + \saveskip = \lastskip % will be 0 if no skip + \ifheading % Did we just have \section? + \nobreak + \fi + \combineskips\abovesubsectionskip + \dimen0 = 2.5\baselineskip \advance\dimen0 by -\topskip + \vskip -\dimen0 + \vglue \dimen0 + % + {\subsectionfonts + \leftline{\vrule width.5em height1.2ex depth.2ex \enspace #1}}% + \writetocentry{subsection}{#1}% + \nobreak + % Don't go into horizontal mode within the command descriptions. + \vskip\belowsubsectionskip + \ifcommands \else \noindent \fi + \headingtrue + \everypar = {\headingfalse \global\everypar = {}}% + % only gets executed for \par in horizontal mode + \ignorespaces +} + +% \combineskips combines the current skip (#1) with the previous skip +% (which must be in \saveskip), and effectively skips by the larger of +% the two. +% +\newskip\saveskip +\def\combineskips#1{\ifdim\saveskip<#1\vskip-\saveskip \vskip#1\fi} + + + +% List macros. +% + +% We want to use different names than eplain. +% +\let\ulist = \unorderedlist +\let\endulist = \endunorderedlist +% +\let\olist = \numberedlist +\let\endolist = \endnumberedlist + +\let\compact = \listcompact + +% The \noindent here keeps us from getting indentation on the first line. +% It also makes the display into a `short' display, FYI. +% The \belowdisplayskip and \abovedisplayskip glue are inserted by the +% display. +% +\long\def\display#1{% + \ifvmode \noindent \fi + $$\vtop{\everypar = {}\hsize = \displaywidth + \parfillskip = 0pt plus 1fil % don't worry about widows + \noindent #1\par\global\savedepth = \prevdepth}$$% + \endgraf + \prevdepth = \savedepth +} + +% \vdisplay is like \display, except it's for vertical mode material. Use it +% to avoid an unwanted initial lineskip. +% +\long\def\vdisplay#1{% + \ifvmode \noindent \fi + $$\vtop{\everypar = {}\hsize = \displaywidth + \parfillskip = 0pt plus 1fil % don't worry about widows + #1\par\global\savedepth = \prevdepth}$$% + \endgraf + \prevdepth = \savedepth +} + + + +% Indexing. +% Derived from Knuth's manmac macros. +% +\newwrite\index + +\immediate\openout\index = \jobname.idx +\newif\ifsilent + +% We need ^ to be active temporarily, while we define it. +% +{ \catcode`\^ = \active +% +\gdef^{% + \ifmmode + \let \nextaction = \sp + \else + \let \nextaction = \beginindexref + \begingroup + \catcode `| = \other \catcode `^ = \other + \fi + \nextaction +}} + +\def\beginindexref{\futurelet\next\checksilence} + +{% And for here, we need ^ to be deactivated +\catcode `^ = \other + +\gdef\checksilence{% + \if ^\next + \silenttrue \let\nextaction = \secondhat + \else + \silentfalse \let\nextaction = \checkbar + \fi + \nextaction +} + +% Eat the `^' that we saw would be the next token. +% +\gdef\secondhat^{\checkbar} + +} % end scope where ^ is \other + +\def\checkbar{\futurelet\next\iswitch} + +% Here we start reading the text of the actual index entry; +% we've determined whether it's silent or not. +% +% We handle the following cases: +% ^{alpha} and ^^{alpha} +% ^|alpha| and ^^|alpha| +% ^|\alpha| and ^^|\alpha| +% +% When this is called, \next is either `|' or `{'. +% +\def\iswitch{% + \ifx |\next + \let \nextaction = \checkbackslash + \else + \let \nextaction = \normalidx + \fi + \nextaction +} + +\def\checkbackslash|{% + % within |...| we allow anything (but another |) + \deactivate \catcode `\ = \other + \futurelet\next\litidx +} + +% The thing after the ^ is a |. We have further checking to do -- is +% the next character a \? +% +{ % reverse \ and / +\catcode`\/ = 0 +\catcode`\\ = \other +/gdef/litidx{% + /if \/next + /expandafter/litidxA + /else + /expandafter/litidxB + /fi +} + +% The thing being indexed starts with a \. +% +/gdef/litidxA \#1|{% + /ctsidxref{#1}% + /litidxswitch{/\#1}% +} + +% The thing being indexed is just a word. +% +/gdef/litidxB #1|{% + /ttidxref{#1}% + /litidxswitch{#1}% +} +}% end reversal of \ and / + +% The thing after the ^ is not a |. +% +\def\normalidx#1{% + \ifsilent + \aftergroup\ignorespaces + \else + #1% + \fi + \idxref{#1}% + \endgroup % group started by \iswitch. +} + +\def\litidxswitch#1{% + \ifsilent + \aftergroup\ignorespaces + \else + {\tt #1}% + \fi + \endgroup % group started by \iswitch. +} + + + +% Indexing macros for external use. + +% replace // in index string with ! for new eplain +% +\def\replaceit#1{\@replace#1//\@replaceMark} +\def\@replace#1//#2\@replaceMark{% + \ifempty{#2}\noexpand#1\else#1!\@replace#2\@replaceMark\fi +} + +% \idxref generates an index entry for #1. If #1 contains any control +% sequences, they are treated literally. +% +\def\idxref#1{% + \ifoldeplain\indexwrite{#1}N\ignorespaces\else + \begingroup + \let\b\begingroup\let\e\endgroup\let\tt\eighttt + \edef\z{\replaceit{#1}}% + \expandafter\sidx\expandafter{\z}% + \endgroup + \fi +} + + +% For creating an index entry for control space. +{\catcode `\ =\other +\gdef\blankidxref{\ctsidxref{ }} +} + +% I removed this macro from eplain because \csname works as well, but +% since the macros below are already written to use it ... +\def\@tokstostring#1{\@ttsA#1 \@ttsmarkA}% +\let\tokstostring=\@tokstostring +\def\@ttsA#1 #2\@ttsmarkA{% + \@ifempty{#1}\else + \@ttsB #1\@ttsmarkB + \@ifempty{#2}\else + \@spacesub\@ttsA#2\@ttsmarkA + \fi + \fi +}% +\def\@ttsB#1{% + \ifx #1\@ttsmarkB\else + \string #1% + \expandafter\@ttsB + \fi +}% +\def\@ttsmarkB{\@ttsmarkB}% should never be expanded +% +\def\@spacesub{+}% +\let\spacesub = \@spacesub +% +\def\@ifempty#1{\@@ifempty #1\@emptymarkA\@emptymarkB}% +\def\@@ifempty#1#2\@emptymarkB{\ifx #1\@emptymarkA}% +\def\@emptymarkA{\@emptymarkA}% Again, so \ifx won't complain. + +% #1 is the index term, #2 is the reference as in +% Diacritical mark, see accent. + +\def\idxsee#1#2{% + \begingroup + \def\spacesub{\otherspace}% + \edef\nextaction{\write\index{\tokstostring{#1}::N::*\tokstostring{#2}}}% + \nextaction + \ignorespaces +\endgroup} + + +% \ttidxref generates an index entry for #1 in the program font. +% If #1 contains any control sequences, they are treated literally. +% +\def\ttidxref#1{% + \ifoldeplain\indexwrite{#1}T\ignorespaces\else + %\sidx{\tt\tokstostring{#1}\rm}% + \fi +} + +% \ctsidxref generates an index entry for a control sequence. #1 +% should not have a preceding backslash, so that the proper call for +% indexing \alpha is \ctsidxref{alpha}. +% +\def\ctsidxref #1{% + \ifoldeplain\indexwrite{#1}C\ignorespaces\else\ifwriteidx + \edef\z{\noexpand\tt\noexpand\\\replaceit{#1}\noexpand\rm}% + \expandafter\sidx\expandafter{\z}% + \fi\fi +} + +% \indexchar is needed to generate index entries for three especially +% difficult single characters: {, }, and \. They are blank-delimited. +% +\def\indexchar{\begingroup \deactivate \indexcharA} +\def\indexcharA#1 {\indexwrite{#1}T\endgroup} + +% \pix indicates that the next index entry is a principal one. +% +\newif\ifpix +\def\pix{\global\pixtrue} + +% \bix and \eix indicate that the next index entry begins or ends a +% range of pages. +% +\newif\ifbix \def\bix{\bixtrue} +\newif\ifeix \def\eix{\eixtrue} + +% #1 is the text of the entry, #2 is N (normal), T (typewriter) or +% C (control sequence) or `cs' for now. +% +\def\indexwrite#1#2{\begingroup + \def\spacesub{\otherspace}% + \edef\tts{\tokstostring{#1}}% + \edef\nextaction{\write\index{\tts::#2::\noexpand\number\noexpand\pageno + \ifpix P\fi\ifbix B\fi\ifeix E\fi}}% + \nextaction + \global\pixfalse \global\bixfalse \global\eixfalse +\endgroup} + +{\catcode `\^ = \other \gdef\twocarets{^^}} + + +% For generating index entries with weird characters, we need to deactivate +% them: { } blank \ and substitute [ ] ! for { } \ . \recat does this. +% It should be enclosed in a group (which must end in `]'). +\def\recat{% + \aftergroup\ignorespaces + \catcode `\! = 0 \catcode `[ = 1 \catcode `] = 2 + \catcode `\ = \other \deactivate +} + + + +% Macros for the front matter. +% +% Space at the top of the frontmatter pages. +% +\def\sinkage{\vglue 7pc \relax} + +% And at the top of the backmatter pages. +% +\def\backsinkage{\vglue 2pc \relax} + +% \frontchapter doesn't care if we're on an even page or an odd page. +% +\def\frontchapter#1 \par{% + \def\chaptername{#1}% + \bookmark{1}{\chaptername}% + \leftline{% + \chapterfonts + \chaprule + \kern 6pt + \vtop{% + \def\linebreak{\hfil\break}% + \noindent \chaptername}% + }% + \vskip 4pc + \noheadlinetrue + % Use chaptername as first A-head (or only one) + \mark{\chaptername}% + \noheadlinetrue + \noindent \ignorespaces +} + + +% We are called from inside a group, so we can redefine the \toc... macros. +% +\def\shortcontents{{% + \firsttoctrue + \backfalse + \shorttocfonts + \let\tocchapterentry = \shorttocchapter + \let\tocsectionentry = \gobbletwo + \let\tocsubsectionentry = \gobbletwo + \halign{\hfil\strut##&\strut ##\hfil\cr + \readtocfile + \crcr}}% + \pagebreak + \global\backfalse +} + +% #1 is the chapter name, #2 the chapter number, #3 the page number. +% +\def\shorttocchapter#1#2#3{% + \ifback\else#2\quad $\backslash$\quad\fi\qquad + \raise3pt\hbox{\vrule height2pt width4pt depth2pt}$\,\,$#3\cr +} + +% Yes, we read the entire contents (several pages) as one alignment. +% +\def\contents{{% + \firsttoctrue + \backfalse + \tocfonts + \interlinepenalty = 100 + \halign{\hfil\strut##&\strut ##\hfil\cr + \readtocfile + \crcr}}% + \pagebreak + % We want to end the contents on a recto page, even if it's blank + \ifodd\pageno\pagebreak\fi % leaves us on an even page. + \global\backfalse +} + +\newif\iffirsttoc + +\def\tocchapterentry#1#2#3{% + \iffirsttoc + \global\firsttocfalse + \else + \noalign{\penalty-1000 \bigskip\smallskip}% + \fi + % + \ifback\else\bf#2\quad $\backslash$\quad\fi + &\bf#1\qquad\raise3pt\hbox{\vrule height2pt width4pt depth2pt}% + $\,\,$#3\cr + \noalign{\nobreak\vskip2pt}% +} + +\def\tocsectionentry#1#2{% + \noalign{\penalty-500 \vskip\medsmallskipamount}% + &\it #1\quad \openbox$\,\,$\rm #2\cr +} + +\def\tocsubsectionentry#1#2{% + &\qquad #1\quad $\cdot\,$#2\cr +} + +\def\openbox{\ht0 = 1.75pt \dp0 = 1.75pt \wd0 = 3.5pt + \raise 2.75pt \makeblankbox{.2pt}{.2pt}% +} + +\newif\ifback +% \ifback is true when we're doing the table of contents and are about +% to do the back matter. It is also true just before we do the back matter +% chapters (really, only the index). +% +\def\backmatter{\write\tocfile{\noexpand\setback}\backtrue} +\def\setback{\ifoldeplain\noalign{\bigskip\global\backtrue}\fi} + + + +% Macros for the examples chapter. +% +% \doexamples is called with the name of the examples file +% Each example is ended by ::: (including the last one) +% A line starting with ~ is executed in the output (without the ~) +% but dropped from the input. +% +% Within the input, ! is an escape character, but {} are not recognized. +% This provides a limited control sequence capability, which is sufficient +% for delimited macros and therefore for cross-references (see \xrefdelim). +% !! stands for !. +% +\def\endmark{:::} + +\newif\ifnotatend \newif\ifnotatendfile \newif\iftildeline +\newread\exfileA \newread\exfileB \newwrite\exfileC +\newcount\examplenumber + +\def\doexamples#1{% + % Here we assume that two read-only openings of the same file are OK. + \immediate\openin\exfileA = #1 + \immediate\openin\exfileB = #1 + \loop + \advance\examplenumber by 1 + \reader + \ifx\holder\empty \notatendfilefalse \else \notatendfiletrue \fi + \ifnotatendfile + \dooneexample + \repeat +} + + +% We want control sequences to be executed as the input of each example +% is formatted, but we don't want to execute them for the output of each +% example until we generate that output with an \input command. +% Therefore, we treat ! differently for \holder, which produces example +% input, and \holderA, which produces example output. +% +% We can't say \global\immediate\read, but \immediate is implied with \read. +% +\def\reader{{\deactivate + \catcode`\! = \other % To execute control sequences on \input. + \catcode`\^^M = 9 \global\read\exfileA to \holder + % + \catcode`\! = 0 % To execute control sequences right away. + \obeyspaces \global\read\exfileB to \holderA + }% +} + +\def\dooneexample{{% + % We want to mention \! in one of the examples: + \edef\examplenum{\numbername\examplenumber}% + + \immediate\openout\exfileC = \tempfile + + \catcode`\| = \other % No literal code in these examples. + \chardef\! = `\! % !! means a literal ! character. + + + % Collect the input page, as it is to be printed, in a box + % At the same time, write out each line to \exfileC + % We make the box 0pt tall to avoid problems with overfull pages. + \setbox\xmpinput = \vbox to 0pt{% + % + \baselineskip = \codebaselineskip + \loop + \ifx\endmark\holder \notatendfalse \else\notatendtrue \fi + \ifnotatend + \expandafter\tildecheck\holder \empty \marker + \iftildeline\else + \leftline{\tt\frenchspacing \holderA \thinspace}% + \immediate\write\exfileC{\holder}% + \fi + \reader + \repeat + \vss % reduce height to 0pt + }% end \vtop + + \immediate\closeout\exfileC + + {% + \maxdepth = \maxdimen % allow long input + \vfill\eject + \catcode`\! = 0 + \restoreplainTeX + {% + \let\eject = \relax \input\tempfile + % Every example ends with \bye, but \bye is disabled in the main text. + \vfill\par\penalty-10000 + \global\footline = {\hfil}% + }% + \box\xmpinput + }% +}} + +{ + \catcode `\~ = \other % So the \ifx works. + \gdef\tildecheck#1#2\marker{% + \ifx #1~% + \immediate\write\exfileC {#2}\tildelinetrue + \else + \tildelinefalse + \fi + } +} + +% This definition is more or less repeated verbatim in the first example +% in xmptext.tex. +% +\def\xmpheader #1/#2{% + \bookmark{2}{例#1:#2}% + {\exampletitlefonts \leftline{例#1:\quad \bi#2}}% + \vglue .5\baselineskip + \count255 = \pageno + \xdef\examplepage{\number\count255}% + \markinfo{例#1: #2} + \ifrewritetocfile + \write\tocfile{\string\tocsectionentry{#2}{\examplepage}}% + \fi +} +% Let's number examples automatically; it makes it easier to move them +% around and add new ones. + +\def\xmpnum{\number\examplenumber} + +\newbox\xmpinput + + +% \negthin lets us put `\!' in examples. + +\def\negthin{\ifmmode \mskip-\thinmuskip \else \char`\\ \char`\! \fi} + +\def\xmpheaddef{见 \xref{xmphead}} + +\def\restoreplainTeX{% + % Restore plain TeX's parameters (except for \hsize and \hoffset). + \parindent = 20pt + \parskip = 0pt plus 1pt + \parfillskip = 0pt plus 1fil + \hfuzz = 0.1pt + \hbadness = 1000 + \abovedisplayskip=12pt plus 3pt minus 9pt + \abovedisplayshortskip=0pt plus 3pt + \belowdisplayskip=12pt plus 3pt minus 9pt + \belowdisplayshortskip=7pt plus 3pt minus 4pt + \everymath = {}% + \everydisplay = {}% + \centereddisplays + \let\vfootnote = \@plainvfootnote + \let\footnote = \@plainfootnote + \let\tenrm = \oldtenrm + \textfont0 = \tenrm + \rm + \ignorespaces +}% + + + +% Macros for the concepts chapter. +% +% +% Start off the chapter. +% +\def\beginconcepts{\openout\conceptfile = \jobname.ccs } +\def\endconcepts{\closeout\conceptfile} + +\newwrite\conceptfile + +% \concept produces a concept heading and also generates a crossreference +% suitable for the mini-index. It even works for concepts with several words +% or containing control sequences like `\ascii'. +% +\def\concept#1 \par{% + \par + %k \cmdbreak + \penalty\conceptpenalty\vskip\aboveconceptskip + %k \vskip 0pt plus 1pt % allow a little more stretch + \noindent + % generate the index entry + \ifconceptindex \else \global\indextoks = {\idxref{#1}}\fi + \conceptindexfalse + \pix\bix\the\indextoks + % + {\bt \let\it=\bti \unskip\null #1.\hskip1em plus.2em minus.2em }% + \markinfo{#1}% + \xrdef{#1}% + \write\conceptfile{\string\doconcept{#1}{\number\pageno}}% + \beginit{CONCEPT}% + \nobreak + \ignorespaces +} + +\def\endconcept{% + \par % always go to vertical mode here + \eix\the\indextoks + \endit{CONCEPT}% + \ignorespaces +} + +\def\doconcept#1#2{\hbox{#1\quad #2}} + +% Sometimes we want to index a concept under some other name than the +% concept name, e.g., indexing `delimiter' as `delimiters'. The +% \conceptindex macro lets us do this. +% +\newif\ifconceptindex +\newtoks\indextoks +\def\conceptindex#1{% + \conceptindextrue + \global\indextoks = {\idxref{#1}}% + \ignorespaces +} + + +% Commands for cross-referencing within the concepts chapter. +% Each refterm has the form {a} or {a:b}, where b is the term to +% actually reference (e.g., \refterm{\PlainTeX:\plainTeX}). +% +\def\refterm#1{% + \reftermA #1:\endmark % Parse the stuff. + \expandafter\minrefsdelim\termtoref\endmark + \relax % Cancel the \ignorespaces. +}% +\def\reftermA#1:{\reftermfirst{#1}\futurelet\next\reftermB} +\def\reftermB#1\endmark{\ifx\endmark \next \else \reftermsecond#1\fi} + +\def\reftermfirst#1{#1\def\termtoref{#1}} +\def\reftermsecond#1:{\def\termtoref{#1}}% + +% The defining sentence for a concept. +% +\def\defterm#1{{\it #1\/}} + + +% This macro prints the single page that will go on the back cover. +% +\def\printconceptpage{% + % Make sure this is considered an odd page. + \ifodd\pageno\else\blankpage\fi + \noheadlinetrue + \advance\hsize by 2pc + \vglue2pc % Plus a \topskip of 2pc. + \bookmark{1}{概念列表}% + {\sectionfonts \leftline{概念列表}}% + \vskip\belowsectionskip + {\conceptpagefonts + \parindent=0pt + \makecolumns 94/3: + \input \jobname.ccs + \vfil + % Put the `logo' at the bottom of the page. + %\rightline{\thisbook}% + }% + \eject +} + + + +% Macros for the commands chapters. +% +% \ifcommands is true when we're within \begindescriptions ... + +\newif\ifcommands + + +% \begindescriptions should be called to start the actual control sequences. +% +\outer\def\begindescriptions{\beginit{DESCRIPTIONS}% + % The following definitions are local to this chapter. + % + \let\example = \commandexample + \let\endexample = \endcommandexample + \interlinepenalty = 50 + % + \commandstrue + \ignorespaces +} + +% The \endgroup that \enddescriptions does must come after the page +% break, so the last page of descriptions will get a mini-index. +% +\def\enddescriptions{% + \vskip -\lastskip % undo the skip created by \enddesc + \endit{DESCRIPTIONS}% + \ignorespaces +} + + +% Begin or end the description of a control sequence or group thereof. +% +\def\begindesc{% + \par % force vertical mode + \saveskip = \lastskip % will be 0 if no skip + \ifheading % Did we just have \section or \subsection? + \nobreak + \else + \cmdbreak + \fi + \combineskips\abovedescriptionskip + \headingfalse + \beginit{DESCRIPTION}% + \beginit{COMMANDS}% + % Each command name is set as a paragraph (for reasons I don't + % remember, \leftline doesn't work because of the way the manuscript + % was typed), and so \clubpenalty will be the penalty at the + % interline glue (see p.96). + \clubpenalty = \intercmdnamepenalty + \parfillskip = 0pt plus 1fil + \ignorespaces +} + +\def\enddesc{% + \nobreak % if we need a break, we'll get it from the next group opener + \vskip\belowdescriptionskip + \endit{DESCRIPTION}% + \ignorespaces +} + +% Begin the explanation of a control sequence. Don't break at the +% space above the explanation, or the interline glue before the first line. +% +\def\explain{% + \par + \endit{COMMANDS}% + \nobreak \vskip\explainskip + \interlinepenalty = 50 + \nobreak %\noindent + \ignorespaces +} + +% Here is how \example looks in the text: +% \example +% ... +% | +% \produces +% ... +% \endexample +% +% repeated an indefinite number of times. +% +% We want to set the code of an example in a box so as to prevent it from +% being broken across pages. By using \vtop we assure that the code is the +% right distance from the `Example:' line. In order to keep the `produces:' +% the right distance from the last code line, we save the depth of that code +% line and then fool TeX into thinking that the \vtop has that depth by +% assigning it to \prevdepth. If we didn't do this, the last line of the code +% would be too close to the `produces:' (as indeed it was in earlier versions +% of the book. +% +\newdimen\savedepth + +{\makeactive| +\gdef\commandexample{% a.k.a. \example, inside \begindescriptions. + \cmdbreak\vskip\exampleskip + \leftline{\it 例子:}% + \nobreak % At the interline glue. + \beginit{EXAMPLE}% + \parfillskip = 0pt plus 1fil + \hbox\bgroup\hskip.5\parindent\vtop\bgroup + \begincs + \let | = \endcode + \advance\hsize by -\parindent + \parindent = 0pt + \bgroup\obeywhitespace +}}% + +\def\endcode{% + \egroup % end \obeywhitespace group + \par\global\savedepth=\prevdepth + \egroup % end inner \vbox + \egroup % end outer \hbox + \prevdepth = \savedepth + \ignorespaces +} + +% \dproduces should be used when the following material is a math +% display. +% +\newif\ifexampledisplay +\def\dproduces{\global\exampledisplaytrue \produces} + +\newif\ifproduces + +% \produces puts its material into a vbox so it won't be broken. +% The material starts in VERTICAL MODE! It uses the plainTeX conventions +% except that \parindent is 0pt. + +\def\produces{% + \producestrue + \ifodd\pageno \par \nobreak \else \cmdbreak\fi + \vskip\tinyskipamount + \noindent {\it 结果\ifexamplelog (在日志中)\examplelogfalse\fi :}% + \vadjust{\nobreak}% At the interline glue. + \ifexampledisplay + \centereddisplays + \else + \par\nobreak + \advance\hsize by -\parindent + \savedepth = \prevdepth + \nointerlineskip + \hbox\bgroup\hskip.5\normalindent + \vtop\bgroup \restoreplainTeX \parindent = 0pt + \prevdepth = \savedepth + \fi +}% + +% we need another ``produces'' form for when a command puts things in +% the log. In this case, the produces text also ends with a |. +% +\newif\ifexamplelog +{\makeactive| +\gdef\logproduces{\examplelogtrue\produces + \begincs + \def |{\endcode\producesfalse}% + % Every line is set as a paragraph, so we get one \parindent for free. + % But we also did \advance\leftskip in \produces, so now we have two. + % We only want one. + \advance\leftskip by -\parindent + \bgroup\obeywhitespace +}}% + +\def\nextexample{\endexample\interexampleskip\example} + +\def\endcommandexample{% + \par % force vertical mode, set previous paragraph + \ifproduces \ifexampledisplay \global\exampledisplayfalse \else + \global\savedepth = \prevdepth + \egroup % Matches the \vtop in either the \produces or the \example. + \egroup % Matches the \hbox in \producesbox. + \global\producesfalse + \par + \prevdepth = \savedepth + \fi\fi + \endit{EXAMPLE}% + \ignorespaces +} + +\def\see{% + \ifodd\pageno\nobreak\fi % don't put at the top of a verso page + \vskip -\lastskip % should be \belowdescriptionskip + \bigskip + \noindent + {\tenbi \spaceskip = 3.33pt plus 2pt minus 1.1pt + \parfillskip = 0pt plus 1fil + 参阅:%k \hskip 1em plus .5em minus .25em + }% + \ignorespaces +}% + + +\newif\ifxref \xreftrue + +% \aux acts as a prefix to a \cts command, specifying that a +% cross-reference should not be generated. +% +\def\aux{\xreffalse} + +% So does \easy, which prints a hand, pointing at the control sequence. +% (The hand font doesn't define an em.) +% +\newif\ifeasy +\let\easy = \easytrue +\def\testeasy{\ifeasy\llap{\hand\ \kern 6pt}\easyfalse\fi} + +% \cts typesets the beginning of a control sequence description, and +% generates an index entry and cross-reference definition for it. The +% control sequence name must be delimited by a blank, since there may be +% parameters that follow. The control sequence name can contain special +% characters; they are deactivated. The initial \ must be omitted. +% +\def\cts{\begingroup \deactivate \ctsA} +\def\ctsA#1 {\endgroup \ctsB{#1}} +\def\ctsB#1#2{% + \ctsbasic{\\#1}{#2}% + \ifxref \ctsxrdef{#1}\else \xreftrue \fi + \pix\ctsidxref{#1}% +} + +% \ctsx is like \cts, but separates the control sequence name and the +% text by more space. (`x' for `extra') +% +\def\ctsx{\begingroup \deactivate \ctsxA} +\def\ctsxA#1 {\endgroup \ctsxB{#1}} +\def\ctsxB#1#2{% + \ctsbasic{\\#1}{\quad #2}% + \ifxref \ctsxrdef{#1}\else \xreftrue \fi + \pix\ctsidxref{#1}% +} + + +% \ctscol is like \cts, but doesn't start a new paragraph. It's used in +% in columns of cs's and their explanations. +% +\def\ctscol#1 #2{% + {\bt \\#1}\quad #2% + \ifxref \ctsxrdef{#1}\else \xreftrue \fi + \pix\ctsidxref{#1}% +} + +% \ctsbasic does the actual printing of a cs name. It's needed on its +% own for `\ '. It does not generate any index or cross-reference +% entries. #1 is the command name, #2 some (possibly empty) text to go +% next to it. +% +\def\ctsbasic#1#2{% + \par + \nobreak % At the \parskip glue the \noindent will produce. + \noindent\testeasy {{\bt #1}\space #2}% +} + +% \ctsxrdef generates a control sequence cross-reference definition. +% For example, `\ctsxrdef{@star}' generates a cross-reference definition +% for `\@star'. +% +\def\ctsxrdef#1{\expandafter\xrdef\csname#1\endcsname} + +% \ctsact prints an active character #1 and generates an index entry +% for it. #1 is blank-delimited. \ctsact does not generate a +% cross-reference definition. +% +\def\ctsact{\begingroup \deactivate \ctsactA} +\def\ctsactA#1 {\endgroup + \ctsbasic{#1}{}% + \pix\ttidxref{#1}} + +% \ctspecial prints a control sequence #1 and generates an index +% entry for it. #1 is blank-delimited. \ctspecial does not +% automatically generate a cross-reference definition, and so it's used +% for things like \newbox and \%. +% +\def\ctspecial{\begingroup \deactivate \ctspecialA} +\def\ctspecialA#1 {\endgroup + \ctsbasic{\\#1}{}% + \pix\ifoldeplain\ctsidxref{#1}\fi% +} + +% \ctspecialx is like \ctspecial, but leaves more space after its +% argument. We want ` and ' to come from cmtt, instead of Optima, so we +% call \mapquotes before reading the argument. This only affects the \` +% and \' descriptions. +% +\def\ctspecialx{\begingroup \deactivate \mapquotes \ctspecialxA} +\def\ctspecialxA#1 {\endgroup + \ctsbasic{\\#1}{}\quad + \pix\ifoldeplain\ctsidxref{#1}\fi% +} + +% \ctsdisplay has a blank-delimited argument consisting of a control +% sequence such as alpha. It produces $\alpha$ followed by \alpha. +% +\def\ctsdisplay#1 {\basicdisplay {$\csname #1\endcsname$}{\\#1}% + \ifxref\ctsxrdef{#1}\else\xreftrue\fi \pix\ctsidxref {#1}} + +% \ctsdoubledisplay has a blank-delimited argument consisting of a +% control sequence such as bigvee. It produces $\bigvee$ and +% $\big\bigvee$ followed by \bigvee. +% +\def\ctsdoubledisplay#1 { + {% + \symbolspace = 42pt + \basicdisplay{$\csname #1\endcsname\quad + \displaystyle\csname #1\endcsname$\ddstrut}% + {\\#1}% + }% + \ifxref\ctsxrdef{#1}\else\xreftrue\fi + \pix\ctsidxref{#1}% +} +\def\ddstrut{\vrule width0pt height15pt depth11pt} + +% \ctsydisplay displays a control symbol. #1 is a single character, +% which may be active. #2 is the cross-reference label, +% blank-delimited. +% +\def\ctsydisplay{\begingroup \deactivate\catcode`\|=\other \ctsydisplayA} +\def\ctsydisplayA#1 #2 {\endgroup + \basicdisplay{$\csname\string#1\endcsname$}{\\#1}% + \ifxref \ctsxrdef{#2}\else \xreftrue \fi + \pix\ctsidxref{#1}% +} + +% \actdisplay displays an active character. #1 is the character, and +% #2 is the cross-reference label, blank-delimited. +% +\def\actdisplay{\begingroup\catcode `\|=\other\actdisplayA} +\def\actdisplayA#1 #2 {\endgroup + \basicdisplay{$#1$}{\string#1}% + \ifxref \xrdef{#2}\else \xreftrue \fi + \pix\ttidxref{#1}% +} + +% \basicdisplay does the actual typesetting of a control sequence name. +% for inside displays. +% +\def\basicdisplay#1#2{\testeasy\hbox to \symbolspace{#1\hfil}{\bt #2}} + +% Printing parameter and table entry headings. +% +\def\param#1{\printparam{#1}{parameter}} +\def\tblentry#1{\printparam{#1}{table entry}} +\def\printparam#1#2{\hskip1.5em [\kern3pt \<#1> #2\kern2pt]} + +% Required braces. +% +\def\rqbraces#1{\{\hskip2pt#1\hskip2pt\}} + +% Printing rulers. +% +\def\1{\vrule height 0pt depth 2pt} +\def\2{\vrule height 0pt depth 4pt} +\def\3{\vrule height 0pt depth 6pt} +\def\4{\vrule height 0pt depth 8pt} +\def\ruler#1#2#3{{$\vcenter{\hrule\hbox{\4#1}}\,\,\rm#2\,{#3}$}} +\def\doruler{\par \noindent\ruler} +\def\tick#1{\hbox to .125in{\hfil#1}} +\def\8{\tick\1\tick\2\tick\1\tick\3\tick\1\tick\2\tick\1\tick\4} + +% Macros for the capsule summary chapter. +% +\def\begincapsum{\beginit{CAPSULE SUMMARY}% + \let\bt = \tentt + \bigskip +} + +\def\endcapsum{\endit{CAPSULE SUMMARY}} + +\newbox\@primitivebox \setbox\@primitivebox = \hbox{\tt *} +\newif\ifcs + +\def\capline{\begingroup \deactivate\catcode `\| = \other \caplineA} +\def\caplineA#1 {\endgroup + \begingroup + \catcode `@ = \letter % for constructing labels + \caplineB{#1}% +} + +% Parameters of \caplineB: +% #1 name of control sequence +% #2 description +% #3 * or empty +% #4 xref or xref1:xref2 or empty + +\def\caplineB#1#2#3#4{% + \ifempty {#4}\temptrue\else\tempfalse\fi + % \iftemp needed to avoid \if ... \else ... \fi nesting problems + \ifcs + \toks0 = {\caplineout{\\#1}{#2}{#3}}% + \iftemp + \toks1 = \expandafter{\csname #1\endcsname}% + \else + \toks1 = {#4}% + \fi + \edef\nextaction{\the\toks0 {\the\toks1}}% + \nextaction + \ctsidxref {#1}% + \else + % The \space makes one-character entries line up nicely. + \caplineout{\space #1}{#2}{#3}{#4}% + \ttidxref {#1}% + \fi + \endgroup +} + +\newif\iftemp + + +% In a few cases we have two cross-references for a single control +% sequence. +% +\newif\ifcstwo + +\def\capac{\cstwofalse\csfalse\capline} +\def\capactwo{\cstwotrue\csfalse\capline} +\def\capcs{\cstwofalse\cstrue\capline} +\def\capcstwo{\cstwotrue\cstrue\capline} + +% \caplineout produces an output line (or several lines) for the capsule +% summary. #1 is the command text, #2 is the description, #3 is either * or +% empty, and #4 is the cross-reference label. +% +\def\caplineout#1#2#3#4{% + \setbox0 = \ifempty {#3}\box\voidb@x \else \copy\@primitivebox\fi + \vskip\intercapsuleskip + % If we use \vbox here, a multi-line summary at the top of a page + % will cause \topskip to disappear. + % + \vtop{\noindent \hangindent = \capsulehangindent + \spaceskip = 3.33pt plus 2pt minus 1.5pt + \rightskip = 0pt plus 4em % a little more stretch + \parfillskip = 0pt plus 1fil + \llap{\box0}{\bt #1}% Bold typewriter for the cs name. + \quad \hskip 0pt plus 1pt minus 1pt + #2\unskip\ + (\ifcstwo \tworefs #4:\else \xref{#4}\fi)% + }% + \par +} + +\def\tworefs#1:#2:{\xref{#1}, \xref{#2}} + + + +% Macros for printing the index. +% +% Set up to print it. +% +\def\beginindex{% + \doublecolumns + \beginit{THE INDEX} + \markinfo{\chaptername}% + \indexfonts + \parindent = 0pt + \def\pp##1{{\it ##1}} % Principal entry. + \def\c{,\thinspace\allowbreak}% + \def\ic{,\quad} + \def\see##1{.\quad{\it See} ##1 } + \def\seealso##1{\hfil\break{\it See also} ##1 } + \let\r = \romannumeral + + \raggedright +} + +\def\endindex{\endit{THE INDEX}\singlecolumn} + + +% #1 is the level of this index entry minus 1 (i.e., 0 for a main +% entry), #2 is the index term, #3 is the kind of term +% (T for ttfont, C for control sequence, N for normal), and +% #4 is the list of pages. The page list can have \pp (principal +% entry)in it, and each page is separated by \c. +% +\def\indexentry#1#2#3#4{% + \beginit{INDEX ENTRY}% + \leftskip = #1\indexpageindent + \par + \leavevmode + \hangindent = \indexlevelindent + \ifx #3T% + {\tt #2}% Typewriter. + \else \ifx #3C% + {\tt \llap{\\}#2}% Control sequence. + \else + % in normal entries, \b and \e enclose a group. ({ and } don't work.) + {\let \b = \bgroup \let \e = \egroup #2}% + \fi\fi + #4% The list of pages. + \par + \endit{INDEX ENTRY}% +} + +\ifoldeplain\else + \hookaction{beginindex}{\let \b = \bgroup \let \e = \egroup} +\fi + +% Nah, let's forget printing the initial. +% +\def\indexgroup#1{% + \bigskip +} + + + +% Code formatting. +% +% +% Turn off normally special characters. +% +\def\deactivate{% + \catcode`\\ = \other \catcode`\{ = \other \catcode`\} = \other + \catcode`\$ = \other \catcode`\& = \other \catcode`\# = \other + \catcode`\% = \other \catcode`\~ = \other \catcode`\^ = \other + \catcode`\_ = \other +} + +% It is convenient to have |...| mean print the ... verbatim, except for !. +% (But | should just be a vertical bar in math mode.) This should be +% used only for inline code; returns inside |...| become spaces. +% +\catcode`\| = \active +\def|{% + \ifmmode + \vert + \else + \begingroup + \obeyspaces + \begincs + \let| = \endgroup + \fi +} + +% \csdisplay is similar, but it inserts glue before and after. +% It also is ended by |, so we have to redefine that. +% +\def\csdisplay{% + \par + \nobreak % don't break above displays + \vskip\abovedisplayskip + \begingroup + \interlinepenalty = 10000 + \obeywhitespace + \begincs + \def|{\endgroup\vskip\belowdisplayskip \noindent\ignorespaces}% +} + +% \begincs does the setup for verbatim printing. It does not confine +% its effects to a group. +% +\def\begincs{% + \hfuzz = \codefuzz + \parfillskip = 0pt plus 1fil + \parskip = 0pt % don't stretch interparagraph space within code displays + \catcode`\! = 0 + \let\! = \exclam + \let\| = \verticalbar + \let\$ = $% + \let\. = \empty % Use !. to end a control sequence to be executed. + \def\-{\discretionary{-}{}{}}% but allow explicit discretionary hyphens + \tt \deactivate +} + + +\chardef\exclam = `\! +\chardef\verticalbar = `\| + +% In math mode we want vertical bars and exclamation points to be +% regular characters again. +% +\everymath = {\setmathchars} +\everydisplay = {\setmathchars} +\ifoldeplain\leftdisplays\fi % \leftdisplays is buggy in new eplain + +\def\setmathchars{% + \catcode`\| = \other \catcode`\! = \other + \let\{ = \lbrace \let\} = \rbrace +} + + + + +% Some miscellanous macros. +% +\def\anatomy{\TeX\ 剖析} +\def\ascii{{\ninerm ASCII}} +\def\asciichar#1{$\langle \rm #1\rangle$} +\def\bblfile{{\tt .bbl} 文件} +\def\bibfile{{\tt .bib} 文件} +\def\bstfile{{\tt .bst} 文件} +\def\didotpt{did\^ot point} +\def\dvifile{{\tt .dvi} 文件} +\def\em{\thinspace {\rm em}} +\def\emph#1{{\it #1}\itcorr} % Emphasize. +\def\ftp{{\tt ftp}} +\def\gffile{{\tt .gf} 文件} +\def\hand{{\handfont A}} +\def\ifatest{{\tt \\if} test} +\chardef\inches = "7D +\def\knuth#1{\texbook\ #1} +\let\Metafont = \MF +\def\Mperiod.{$M$\kern-1.6pt.} +\def\Mprimecomma,{$M'$\kern-3.5pt,} +\def\Mprimeperiod.{$M'$\kern-2.5pt.} +\def\mud{\thinspace {\rm mu}} % can't use \mu; it'a a Greek letter! +\def\newTeX{新 \TeX} +\def\p{页 \thinspace} +\def\pkfile{{\tt .pk} 文件} +\def\plainTeX{plain \TeX} +\def\PlainTeX{Plain \TeX} +\def\pp{页} +\def\pt{\thinspace {\rm 点}} +\def\pxlfile{{\tt .pxl} 文件} +\def\tequiv{\unskip $\>\equiv\>$} % equivalence in text +\def\texbook{{\sl The \TeX book}\itcorr} +\let\tex@ = \TeX +\def\TeX{\tex@\null} +\def\TeXMeX{\TeX\ M\kern-.11em\lower .5ex\hbox{E}\kern-.125em X\null}% +\def\tfmfile{{\tt .tfm} 文件} +\def\thisbook{{\sl \TeX\ 急就帖}} +\let\ths = \thinspace +\def\tminus{\unskip\allowbreak $\>-\>$\allowbreak} % minus in text +\def\tplus{\unskip\allowbreak $\>+\>$\allowbreak} % plus in text +\def\TUG{\TeX{} 用户组织} +\def\Vcomma,{$V$\kern-2pt,} +\def\visiblespace{{\tentt \char'040}} +\def\Vperiod.{$V$\kern-2pt.} +\let\vs=\visiblespace +\def\xref#1{第~\xrefn{#1}~页} % 覆盖 eplain 中的定义 +\def\xrefpg#1{第~\xrefn{#1}~页} + +% \tighten attempts to shorten the number of lines occupied by a paragraph. +\def\tighten{\looseness=-1 + \spaceskip = .9\fontdimen2\font plus \fontdimen3\font + minus 1.1\fontdimen4\font +} + +% \itcorr can be used at the end of a macro that puts its argument in +% italics in order to produce an italic correction just when it's needed. +% It won't look inside a following macro call, however. + +\def\itcorr{\futurelet\next\itcorrA} +\def\itcorrA{\ifx.\next\else\ifx,\next\else\/\fi\fi} + + +% Arrange N items in three columns. +% A right brace is needed at the end of the list to match the \bgroup. +% +\def\threecolumns{\nobreak\vskip\abovedisplayskip\dothreecolumns} + +\def\dothreecolumns#1 {\bgroup + \parindent = 0pt + \makecolumns #1/3: +} + +% We don't want to make < an active character because then it cannot be used +% in \ifnum tests. So, \<foo> denotes a nonterminal `foo'. +% +\def\<#1>{$\langle${\rm\it \kern-.2pt #1\kern.65pt}$\rangle$} + +\let\beginit = \environment +\let\endit = \endenvironment + +\def\eatpar#1\par{} + +% \needspace breaks out the page if there's less than #1 left on it. + +\def\needspace#1{% + \saveskip = \lastskip + \par % force vertical mode + \vfil + \penalty 1000 + \vskip #1 + \penalty9999 + \par % exercise the page builder + \vskip -#1 plus -1fil + \vskip -\saveskip \vskip \saveskip % to restore \lastskip +} + + + + +% Expanded cross-referencing for various parts of the books. +% + +% Sometimes it is clearer to refer to a cross-reference as a control +% sequence. +% +\def\ctsref{\begingroup \catcode`\@ = \letter \@ctsref} +\def\@ctsref#1{(\xref{#1})\endgroup} + +\def\xrefdelim[#1]{page~\xrefn{#1}} % this form doesn't need braces + +% This command comes at the beginning of chapters, after the \chapter +% command and before the text. Hence the \par in the template +% and the \noindent +% +\def\chapterdef#1#2\par{% + \@writeaux{% + \string\gdef\expandafter\string + \csname#1_C\endcsname{\the\chapterno}}% + \noindent +} + +\def\chapternum#1{% + \def\csn{#1_C}% + \expandafter\ifx\csname\csn\endcsname \relax + \expandafter\def\csname\csn\endcsname{`#1'}% + \ifxrefwarning + \message{Undefined chapter `#1'.}% + \fi + \fi + \csname\csn\endcsname +} + +\def\chapterref#1{第~\chapternum{#1}~章} + +\def\headcit#1#2{“{\rm #1}”(\xref{#2})} + +\def\conceptcit#1{\headcit{#1}{#1}} + +\def\seeconcept#1{(见“{\rm #1}”,\xref{#1})} + + + + +% Special types of pictures. +% +% Glue pictures: +% +\newdimen\glueboxwidth +\newdimen\boxdepth \boxdepth = 3.5pc +\newskip\underlabel \underlabel= .1\boxdepth % space under `width n'. +\def\squeezeglue{\glueboxwidth = .725\glueboxwidth} + +\def\labelledbox#1 #2 #3{\vtop{% + \hrule + \hbox{% + \vrule + \hbox to #1{\hfil \vbox to #2{\vfil#3\vskip\underlabel}\hfil}% + \vrule + }% + \hrule +}}% + +% Make a picture of a box. +% +\def\picbox#1 {% + \glueboxwidth = #1pc \squeezeglue + \vtop{% + \hbox to \glueboxwidth{\strut \hfil {\it box}\hfil}% + \labelledbox % Have to have spaces after the arguments. + {\glueboxwidth} + {\boxdepth} + {\halign{\hfil##\hfil\cr width #1\cr}}% + }% +} + +% And of glue. +% +\def\gluebox#1 #2 #3 #4 {\vtop{% + \glueboxwidth = #4pc \squeezeglue + \hbox to \glueboxwidth{\strut \hfil {\it glue}\hfil}% + \nointerlineskip + \kern2pt % to move the brace down a bit + \hbox{$\overbrace{\hbox{\hskip\glueboxwidth}}$}% + \kern-3pt % The \overbrace puts in 3pt below itself. + \nointerlineskip + \vbox to \boxdepth{% + \hsize = \glueboxwidth + \vskip 2pt + \advance\baselineskip by -2pt + \centerline{\strut size #1}% + \centerline{stretch #2}% + \centerline{shrink #3}% + \centerline{width #4}% + \vss + }% + \kern 1.5pt % I don't know why this is needed. + \nointerlineskip + \hbox{$\underbrace{\hbox{\hskip\glueboxwidth}}$}% +}} + +\def\gluepicture#1 #2{{\ninerm + \medskip + \vtop{% + \setbox0 = \hbox{#2}% The glue and box pictures. + \glueboxwidth = \wd0 + \leftline{\box0}% + \kern 6pt + \hbox to \glueboxwidth{\leftarrowfill{ width #1 }\rightarrowfill}% + }% + \medskip +}} + +% Box pictures. +% +% Set up a `reference point' and the macro for a labelled height, for use +% in forming pictures of boxes. +% +\newbox\refpoint + +\setbox\refpoint = \vbox to 0pt{% + \kern-2.6pt + \hbox to 0pt{\kern-2.2pt $\bullet$\hss} + \vss +}% + +\def\labelledheight#1#2{% +\vtop to #1{\offinterlineskip + \setbox0=\hbox{#2}\skip0=\wd0 + \hbox to \skip0{\hss\tenex\char"78\hss}\kern-4pt + {\cleaders\hbox to \skip0{\hss\tenex\char"3F\hss}\vfil}% + \vskip1pt\box0\vskip1pt + {\cleaders\hbox to \skip0{\hss\tenex\char"3F\hss}\vfil}% + \kern -6pt\boxmaxdepth 0pt\hbox to \skip0{\hss\tenex\char"79\hss}}} + + + +% Paul's updates -- no longer needed; we have converged. +% +%\input paulmacs + +% Read the cross-reference definitions. +% +\catcode `\_ = \letter % for new eplain +\readauxfile +\catcode `\_ = 8 % for new eplain + +\catcode`\@ = \other % Make @ an `other' character again. +\catcode`\^ = \active % Make ^'s do indexing outside of math mode. diff --git a/Master/texmf-dist/doc/plain/impatient-cn/math.tex b/Master/texmf-dist/doc/plain/impatient-cn/math.tex new file mode 100644 index 00000000000..85d52a3e1b7 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/math.tex @@ -0,0 +1,3697 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\chapter {Commands \linebreak for composing \linebreak math formulas} +\chapter {数学公式命令} + +%\bix^^{math} +%\chapterdef{math} +\bix^^{数学} +\chapterdef{math} + +%This section covers commands for constructing math formulas. +%For an explanation of the conventions used in this section, +%see \headcit{Descriptions of the commands}{cmddesc}. +这一章包括了排印数学公式所需要的命令。 +在\headcit{命令描述}{cmddesc}这一节中给出了这章的惯例。 + +\begindescriptions +%========================================================================== +%\section {Simple parts of formulas} +\section {简单公式排版} + +%========================================================================== +%\subsection {Greek letters} +\subsection {希腊字母} + +%\begindesc +%\bix^^{Greek letters} +%\dothreecolumns 40 +%\easy\ctsdisplay alpha {} +%\ctsdisplay beta {} +%\ctsdisplay chi {} +%\ctsdisplay delta {} +%\ctsdisplay Delta {} +%\ctsdisplay epsilon {} +%\ctsdisplay varepsilon {} +%\ctsdisplay eta {} +%\ctsdisplay gamma {} +%\ctsdisplay Gamma {} +%\ctsdisplay iota {} +%\ctsdisplay kappa {} +%\ctsdisplay lambda {} +%\ctsdisplay Lambda {} +%\ctsdisplay mu {} +%\ctsdisplay nu {} +%\ctsdisplay omega {} +%\ctsdisplay Omega {} +%\ctsdisplay phi {} +%\ctsdisplay varphi {} +%\ctsdisplay Phi {} +%\ctsdisplay pi {} +%\ctsdisplay varpi {} +%\ctsdisplay Pi {} +%\ctsdisplay psi {} +%\ctsdisplay Psi {} +%\ctsdisplay rho {} +%\ctsdisplay varrho {} +%\ctsdisplay sigma {} +%\ctsdisplay varsigma {} +%\ctsdisplay Sigma {} +%\ctsdisplay tau {} +%\ctsdisplay theta {} +%\ctsdisplay vartheta {} +%\ctsdisplay Theta {} +%\ctsdisplay upsilon {} +%\ctsdisplay Upsilon {} +%\ctsdisplay xi {} +%\ctsdisplay Xi {} +%\ctsdisplay zeta {} +%\egroup +\begindesc +\bix^^{希腊字母} +\dothreecolumns 40 +\easy\ctsdisplay alpha {} +\ctsdisplay beta {} +\ctsdisplay chi {} +\ctsdisplay delta {} +\ctsdisplay Delta {} +\ctsdisplay epsilon {} +\ctsdisplay varepsilon {} +\ctsdisplay eta {} +\ctsdisplay gamma {} +\ctsdisplay Gamma {} +\ctsdisplay iota {} +\ctsdisplay kappa {} +\ctsdisplay lambda {} +\ctsdisplay Lambda {} +\ctsdisplay mu {} +\ctsdisplay nu {} +\ctsdisplay omega {} +\ctsdisplay Omega {} +\ctsdisplay phi {} +\ctsdisplay varphi {} +\ctsdisplay Phi {} +\ctsdisplay pi {} +\ctsdisplay varpi {} +\ctsdisplay Pi {} +\ctsdisplay psi {} +\ctsdisplay Psi {} +\ctsdisplay rho {} +\ctsdisplay varrho {} +\ctsdisplay sigma {} +\ctsdisplay varsigma {} +\ctsdisplay Sigma {} +\ctsdisplay tau {} +\ctsdisplay theta {} +\ctsdisplay vartheta {} +\ctsdisplay Theta {} +\ctsdisplay upsilon {} +\ctsdisplay Upsilon {} +\ctsdisplay xi {} +\ctsdisplay Xi {} +\ctsdisplay zeta {} +\egroup +%\explain +%These commands produce Greek letters suitable for mathematics. +%You can only use them +%within a math formula, so if you need a Greek letter within ordinary +%text you must enclose it in dollar signs (|$|). \TeX\ does not have +%commands for Greek letters that look like their roman +%counterparts, since you can get them by using those roman +%counterparts. For example, you can get a lowercase +%^{omicron} in a formula by writing the letter `o', i.e., +%`|{\rm o}|' or an uppercase ^{beta} (`B') by writing +%`|{\rm B}|'. +\explain +输入这些命令可以排印出数学公式中的相应的希腊字母符号. +你只能在数学模式中使用它们, 所以如在普通的文本中使用它们时, +你必须把它们括在美元符号 (|$|) 内. +\TeX\ 并不包含这些数学中使用的希腊字母所对应的正体字符的命令, +不过你可以很方便地得到这些字符. +比如说, 你可以在公式中使用 `|{\rm o}|' 来得到一个小写的 ^{omicron} `o', +又比如, 你可以使用 `|{\rm B}|' 得到大写的 ^{beta} (`B'). + +%Don't confuse the following letters: +%\ulist \compact +%\li |\upsilon| (`$\upsilon$'), |{\rm v}| (`v'), and |\nu| (`$\nu$'). +%\li |\varsigma| (`$\varsigma$') and |\zeta| (`$\zeta$'). +%\endulist +注意不要混淆下面的符号: +\ulist \compact +\li |\upsilon| (`$\upsilon$'), |{\rm v}| (`v'), 和 |\nu| (`$\nu$'). +\li |\varsigma| (`$\varsigma$') 和 |\zeta| (`$\zeta$'). +\endulist + +%You can get slanted capital Greek letters by using the math italic +%(|\mit|) \minref{font}. +使用数学的意大利\minref{字体} (|\mit|) 可以得到斜体的大写希腊字母. + +%\TeX\ treats Greek letters as ordinary symbols when it's figuring how +%much space to put around them. +在计算在希腊字母周围插入多少的空白时,\TeX\ 把它们当作正常的符号。 + +%\example +%If $\rho$ and $\theta$ are both positive, then $f(\theta) +%-{\mit \Gamma}_{\theta} < f(\rho)-{\mit \Gamma}_{\rho}$. +%| +%\produces +%If $\rho$ and $\theta$ are both positive, then +%$f(\theta)-{\mit \Gamma}_{\theta} < f(\rho)-{\mit \Gamma}_{\rho}$. +%\endexample +%\eix^^{Greek letters} +%\enddesc +\example +如果 $\rho$ 和 $\theta$ 都是正数, 那么 $f(\theta) +-{\mit \Gamma}_{\theta} < f(\rho)-{\mit \Gamma}_{\rho}$. +| +\produces +如果 $\rho$ 和 $\theta$ 都是正数, 那么 +$f(\theta)-{\mit \Gamma}_{\theta} < f(\rho)-{\mit \Gamma}_{\rho}$. +\endexample +\eix^^{希腊字母} +\enddesc + +%========================================================================== +%\subsection {Miscellaneous ordinary math symbols} +\subsection {各种普通数学符号} + +\begindesc +\xrdef{specsyms} +\dothreecolumns 34 +\easy\ctsdisplay infty {} +\ctsdisplay Re {} +\ctsdisplay Im {} +\ctsdisplay angle {} +\ctsdisplay triangle {} +\ctsdisplay backslash {} +\ctsdisplay vert {} +\writeidxfalse\ctsydisplay | @bar {}\writeidxtrue +\ctsdisplay Vert {} +\ctsdisplay emptyset {} +\ctsdisplay bot {} +\ctsdisplay top {} +\ctsdisplay exists {} +\ctsdisplay forall {} +\ctsdisplay hbar {} +\ctsdisplay ell {} +\ctsdisplay aleph {} +\ctsdisplay imath {} +\ctsdisplay jmath {} +\ctsdisplay nabla {} +\ctsdisplay neg {} +\ctsdisplay lnot {} +\actdisplay ' @prime \ (上标点) +\ctsdisplay prime {} +\ctsdisplay partial {} +\ctsdisplay surd {} +\ctsdisplay wp {} +\ctsdisplay flat {} +\ctsdisplay sharp {} +\ctsdisplay natural {} +\ctsdisplay clubsuit {} +\ctsdisplay diamondsuit {} +\ctsdisplay heartsuit {} +\ctsdisplay spadesuit {} +\egroup +\explain +^^{音符} ^^{花色} +这些命令可以排印各种符号. +为了把它们和其它的符号, 比如关系符号等, 区分开来, 它们被称为普通数学符号. +你只能在数学模式中使用这些符号, 所以如果在普通的文本中使用, 你必须使用美元符号 (|$|) 把它们括起来. + +当你想在 `$i$' 或 `$j$' 上加上重音符号, 则需要使用 |\imath| 和 |\jmath| 命令来表示它们本身. + +上标点符号 (|'|) 是一个 |\prime| 的上标的简写. +(|\prime| 本身可以排印一个很大的丑陋的撇号.) + +|\!|| 和 ^|\Vert| 命令是等价的, 就像 ^|\neg| 和 ^|\lnot| 命令一样. +\margin{增加了 {\tt\\vert} 的解释} +|\vert| 符号可以排印出和 `|!||' 相同的效果. +\indexchar | + +由 |\backslash|, |\vert|, 和 |\Vert| 排印的命令叫做 \minref{分界符}. +使用 ^|\bigm| 等 (\xref \bigm) 命令可以排印大号的这些字符. + +\example +The Knave of $\heartsuit$s, he stole some tarts. +| +\produces +The Knave of $\heartsuit$s, he stole some tarts. +\nextexample +如 $\hat\imath < \hat\jmath$ 则 $i' \leq j^\prime$. +| +\produces +如 $\hat\imath < \hat\jmath$ 则 $i' \leq j^\prime$. +\nextexample +$${{x-a}\over{x+a}}\biggm\backslash{{y-b}\over{y+b}}$$ +| +\dproduces +$${{x-a}\over{x+a}}\biggm\backslash{{y-b}\over{y+b}}$$ +\endexample +\enddesc + +%========================================================================== +\subsection {二元运算符} + +\begindesc +\bix^^{运算符} +\xrdef{binops} +\dothreecolumns 34 +\easy\ctsdisplay vee {} +\ctsdisplay wedge {} +\ctsdisplay amalg {} +\ctsdisplay cap {} +\ctsdisplay cup {} +\ctsdisplay uplus {} +\ctsdisplay sqcap {} +\ctsdisplay sqcup {} +\ctsdisplay dagger {} +\ctsdisplay ddagger {} +\ctsdisplay land {} +\ctsdisplay lor {} +\ctsdisplay cdot {} +\ctsdisplay diamond {} +\ctsdisplay bullet {} +\ctsdisplay circ {} +\ctsdisplay bigcirc {} +\ctsdisplay odot {} +\ctsdisplay ominus {} +\ctsdisplay oplus {} +\ctsdisplay oslash {} +\ctsdisplay otimes {} +\ctsdisplay pm {} +\ctsdisplay mp {} +\ctsdisplay triangleleft {} +\ctsdisplay triangleright {} +\ctsdisplay bigtriangledown {} +\ctsdisplay bigtriangleup {} +\ctsdisplay ast {} +\ctsdisplay star {} +\ctsdisplay times {} +\ctsdisplay div {} +\ctsdisplay setminus {} +\ctsdisplay wr {} +\egroup +\explain +这些命令可以排印各种二元运算符. +二元运算符是 \TeX\ 的一种符号\minref{集}. +\TeX\ 在不同的符号集周围会插入不同的空白. +当 \TeX\ 需要在一个数学公式中间断行时, +它会考虑在二元运算符后面进行断行---不过仅在它出现在公式的最外层时, 而不是在一个组中. + +除了这些命令以外, \TeX\ 也把 `|+|' and `|-|' 作为二元运算符. +它把 `|/|' 当作一个普通符号, +因为虽然事实上在数学中它是一个二元运算, +但是它在周围加入的空白更少时看上去更漂亮. + +\example +$$z = x \div y \quad \hbox{当且仅当} \quad +z \times y = x \;\hbox{且}\; y \neq 0$$ +| +\dproduces +$$z = x \div y \quad \hbox{当且仅当} \quad +z \times y = x \;\hbox{且}\; y \neq 0$$ +\endexample +\enddesc + +\begindesc +\ctspecial * \ctsxrdef{@star} +\explain +命令 |\*| 表示乘法符号 ($\times$), 也是一个二元符号. +乘法符号在文本中的数学公式中出现时表现得和一个分词符类似. +这就是说, \TeX\ \emph{仅}会在公式该点需要断行时排版 |\times| 符号. +因为 \TeX\ 永远不会在陈列公式中断行, 所以 |\*| 在陈列公式 \minrefs{陈列公式} 中是没有任何作用的. + +\example +Let $c = a\*b$. In the case that $c=0$ or $c=1$, let +$\Delta$ be $(\hbox{the smallest $q$})\*(\hbox{the +largest $q$})$ in the set of approximate $\tau$-values. +| +\produces +Let $c = a\*b$. In the case that $c=0$ or $c=1$, let +$\Delta$ be $(\hbox{the smallest $q$})\*(\hbox{the +largest $q$})$ in the set of approximate $\tau$-values. + +\eix^^{运算符} +\endexample +\enddesc + +%========================================================================== +\subsection {关系符号} + +\begindesc +\xrdef {relations} +\bix^^{关系符} +\dothreecolumns 39 +\easy\ctsdisplay asymp {} +\ctsdisplay cong {} +\ctsdisplay dashv {} +\ctsdisplay vdash {} +\ctsdisplay perp {} +\ctsdisplay mid {} +\ctsdisplay parallel {} +\ctsdisplay doteq {} +\ctsdisplay equiv {} +\ctsdisplay ge {} +\ctsdisplay geq {} +\ctsdisplay le {} +\ctsdisplay leq {} +\ctsdisplay gg {} +\ctsdisplay ll {} +\ctsdisplay models {} +\ctsdisplay ne {} +\ctsdisplay neq {} +\ctsdisplay notin {} +\ctsdisplay in {} +\ctsdisplay ni {} +\ctsdisplay owns {} +\ctsdisplay prec {} +\ctsdisplay preceq {} +\ctsdisplay succ {} +\ctsdisplay succeq {} +\ctsdisplay bowtie {} +\ctsdisplay propto {} +\ctsdisplay approx {} +\ctsdisplay sim {} +\ctsdisplay simeq {} +\ctsdisplay frown {} +\ctsdisplay smile {} +\ctsdisplay subset {} +\ctsdisplay subseteq {} +\ctsdisplay supset {} +\ctsdisplay supseteq {} +\ctsdisplay sqsubseteq {} +\ctsdisplay sqsupseteq {} +\egroup +\explain +这些命令可以排印各种关系符号. +关系符号是 \TeX\ 的数学符号中的\minref{类}之一. +\TeX\ 在不同的\minref{类}之间插入不同的空白长度. +当 \TeX\ 需要在一个数学公式处断行, \minrefs{断行} +它会考虑在一个关系符后进行断行---不过仅在它出现在公式的最外层时, 而不是在一个组中. + +除了这里列出的命令以外, \TeX\ 也把 `^|=|' 和``arrow'' 命令 (\xref{arrows}) 作为关系运算符. + +一些关系符有多种命令表达方式, 你可以使用任何一个来排印它们: +\ulist \compact +\li `$\ge$' (|\ge| 和 |\geq|). +\li `$\le$' (|\le| 和 |\leq|). +\li `$\ne$' (|\ne|, |\neq|, 和 |\not=|). +\li `$\ni$' (|\ni| 和 |\owns|). +\endulist + +\xrdef{\not} +在这些符号前加上 |\not|, 可以排印它们的非运算: + +\nobreak +\threecolumns 21 +\basicdisplay {$\not\asymp$}{\\not\\asymp}\ctsidxref{asymp} +\basicdisplay {$\not\cong$}{\\not\\cong}\ctsidxref{cong} +\basicdisplay {$\not\equiv$}{\\not\\equiv}\ctsidxref{equiv} +\basicdisplay {$\not=$}{\\not=}\ttidxref{=} +\basicdisplay {$\not\ge$}{\\not\\ge}\ctsidxref{ge} +\basicdisplay {$\not\geq$}{\\not\\geq}\ctsidxref{geq} +\basicdisplay {$\not\le$}{\\not\\le}\ctsidxref{le} +\basicdisplay {$\not\leq$}{\\not\\leq}\ctsidxref{leq} +\basicdisplay {$\not\prec$}{\\not\\prec}\ctsidxref{prec} +\basicdisplay {$\not\preceq$}{\\not\\preceq}\ctsidxref{preceq} +\basicdisplay {$\not\succ$}{\\not\\succ}\ctsidxref{succ} +\basicdisplay {$\not\succeq$}{\\not\\succeq}\ctsidxref{succeq} +\basicdisplay {$\not\approx$}{\\not\\approx}\ctsidxref{approx} +\basicdisplay {$\not\sim$}{\\not\\sim}\ctsidxref{sim} +\basicdisplay {$\not\simeq$}{\\not\\simeq}\ctsidxref{simeq} +\basicdisplay {$\not\subset$}{\\not\\subset}\ctsidxref{subset} +\basicdisplay {$\not\subseteq$}{\\not\\subseteq}\ctsidxref{subseteq} +\basicdisplay {$\not\supset$}{\\not\\supset}\ctsidxref{supset} +\basicdisplay {$\not\supseteq$}{\\not\\supseteq}\ctsidxref{supseteq} +\basicdisplay {$\not\sqsubseteq$}{\\not\\sqsubseteq}% + \ctsidxref{sqsubseteq} +\basicdisplay {$\not\sqsupseteq$}{\\not\\sqsupseteq}% + \ctsidxref{sqsupseteq} +\egroup + +\example +我们可以得到 $AB \perp AC$,且 +$\triangle ABF \not\sim \triangle ACF$. +| +\produces +我们可以得到 $AB \perp AC$,且 +$\triangle ABF \not\sim \triangle ACF$. + +\eix^^{关系符} +\endexample +\enddesc + +%========================================================================== +%\subsection {Left and right delimiters} +\subsection {左右定界符} + +%\begindesc +%\bix^^{delimiters} +%% +%\dothreecolumns 12 +%\easy\ctsdisplay lbrace {} +%\ctsydisplay { @lbrace {} +%\ctsdisplay rbrace {} +%\ctsydisplay } @rbrace {} +%\ctsdisplay lbrack {} +%\ctsdisplay rbrack {} +%\ctsdisplay langle {} +%\ctsdisplay rangle {} +%\ctsdisplay lceil {} +%\ctsdisplay rceil {} +%\ctsdisplay lfloor {} +%\ctsdisplay rfloor {} +%\egroup +%\explain +%These commands produce left and right \minref{delimiter}s. +%Mathematicians use delimiters to indicate the boundaries between parts +%of a formula. Left delimiters are also called ``^{opening}s'', and +%right delimiters are also called ``^{closing}s''. Openings and closings +%are two of \TeX's \minref{class}es of math symbols. \TeX\ puts +%different amounts of space around different \minref{class}es of math +%symbols. You might expect the space that \TeX\ puts around openings and +%closings to be symmetrical, but in fact it isn't. +\begindesc +\bix^^{定界符} +% +\dothreecolumns 12 +\easy\ctsdisplay lbrace {} +\writeidxfalse\ctsydisplay { @lbrace {}\writeidxtrue +\ctsdisplay rbrace {} +\writeidxfalse\ctsydisplay } @rbrace {}\writeidxtrue +\ctsdisplay lbrack {} +\ctsdisplay rbrack {} +\ctsdisplay langle {} +\ctsdisplay rangle {} +\ctsdisplay lceil {} +\ctsdisplay rceil {} +\ctsdisplay lfloor {} +\ctsdisplay rfloor {} +\egroup +\explain +这些命令排印各种左右\minref{定界符}。 +数学家用定界符指明公式各部分的边界。 +左定界符又称为``^{开符号}'',右定界符又称为``^{闭符号}''。 +开符号和闭符号是 \TeX\ 数学公式中的两种字符类。 +\TeX\ 在不同\minref{类}的数学符号之间留下不同大小的间隔。 +你也许认为在开符号和闭符号旁边的间隔是对称的,但实际上并非如此。 + +%Some left and right delimiters have more than one command that you can +%use to produce them: +有些左定界符和右定界符可以用不止一个命令排印: + +%\ulist\compact +%\li `$\{$' (|\lbrace| and |\{|) +%\li `$\}$' (|\rbrace| and |\}|) +%\li `$[$' (|\lbrack| and `|[|') +%\li `$]$' (|\rbrack| and `|]|') +%\endulist +%\noindent You can also use the left and right bracket characters +%(in either form) outside of math mode. +\ulist\compact +\li `$\{$' (|\lbrace| 和 |\{|) +\li `$\}$' (|\rbrace| 和 |\}|) +\li `$[$' (|\lbrack| 和 `|[|') +\li `$]$' (|\rbrack| 和 `|]|') +\endulist +\noindent 左右方括号(两种形式皆可)在数学模式之外也可以使用。 + +%In addition to these commands, \TeX\ treats `|(|' as a left +%delimiter and `|)|' as a right delimiter. +除这些命令之外,\TeX\ 还将 `|(|' 视为左定界符,将 `|)|' 视为右定界符。 + +%You can have \TeX\ +%choose the size for a delimiter by using |\left| and |\right| (\xref\left). +%Alternatively, +%you can get a delimiter of a specific size by using one of the |\big|$x$ +%commands (see |\big| et al., \xref{\big}). +利用 |\left| 和 |\right|(\xref\left )命令, +你可以让 \TeX\ 选择定界符的尺寸。 +或者利用某个 |\big|$x$ 命令(见 |\big| 等,\xref{\big}), +你可以选择特定尺寸的定界符。 + +%\example +%The set $\{\,x \mid x>0\,\}$ is empty. +%| +%\produces +%The set $\{\,x \mid x>0\,\}$ is empty. +\example +集合 $\{\,x \mid x>0\,\}$ 是空集. +| +\produces +集合 $\{\,x \mid x>0\,\}$ 是空集. + +%\eix^^{delimiters} +%\endexample +%\enddesc +\eix^^{定界符} +\endexample +\enddesc + +%========================================================================== +%\subsection {Arrows} +\subsection {箭头} + +%\begindesc +%\bix^^{arrows} +%\xrdef{arrows} +%% +%{\symbolspace=24pt \makecolumns 34/2: +%\easy% +%\ctsdisplay leftarrow {} +%\ctsdisplay gets {} +%\ctsdisplay Leftarrow {} +%\ctsdisplay rightarrow {} +%\ctsdisplay to {} +%\ctsdisplay Rightarrow {} +%\ctsdisplay leftrightarrow {} +%\ctsdisplay Leftrightarrow {} +%\ctsdisplay longleftarrow {} +%\ctsdisplay Longleftarrow {} +%\ctsdisplay longrightarrow {} +%\ctsdisplay Longrightarrow {} +%\ctsdisplay longleftrightarrow {} +%\ctsdisplay Longleftrightarrow {} +%\basicdisplay {$\Longleftrightarrow$}{\\iff}\pix\ctsidxref{iff}\xrdef{\iff} +%\ctsdisplay hookleftarrow {} +%\ctsdisplay hookrightarrow {} +%\ctsdisplay leftharpoondown {} +%\ctsdisplay rightharpoondown {} +%\ctsdisplay leftharpoonup {} +%\ctsdisplay rightharpoonup {} +%\ctsdisplay rightleftharpoons {} +%\ctsdisplay mapsto {} +%\ctsdisplay longmapsto {} +%\ctsdisplay downarrow {} +%\ctsdisplay Downarrow {} +%\ctsdisplay uparrow {} +%\ctsdisplay Uparrow {} +%\ctsdisplay updownarrow {} +%\ctsdisplay Updownarrow {} +%\ctsdisplay nearrow {} +%\ctsdisplay searrow {} +%\ctsdisplay nwarrow {} +%\ctsdisplay swarrow {} +%} +%\explain +%These commands provide arrows of different kinds. They +%are classified as relations (\xref{relations}). +%The vertical arrows in the list are also \minref{delimiter}s, so you can make +%them larger by using |\big| et al.\ (\xref \big). +\begindesc +\bix^^{箭头} +\xrdef{arrows} +% +{\symbolspace=24pt \makecolumns 34/2: +\easy% +\ctsdisplay leftarrow {} +\ctsdisplay gets {} +\ctsdisplay Leftarrow {} +\ctsdisplay rightarrow {} +\ctsdisplay to {} +\ctsdisplay Rightarrow {} +\ctsdisplay leftrightarrow {} +\ctsdisplay Leftrightarrow {} +\ctsdisplay longleftarrow {} +\ctsdisplay Longleftarrow {} +\ctsdisplay longrightarrow {} +\ctsdisplay Longrightarrow {} +\ctsdisplay longleftrightarrow {} +\ctsdisplay Longleftrightarrow {} +\basicdisplay {$\Longleftrightarrow$}{\\iff}\pix\ctsidxref{iff}\xrdef{\iff} +\ctsdisplay hookleftarrow {} +\ctsdisplay hookrightarrow {} +\ctsdisplay leftharpoondown {} +\ctsdisplay rightharpoondown {} +\ctsdisplay leftharpoonup {} +\ctsdisplay rightharpoonup {} +\ctsdisplay rightleftharpoons {} +\ctsdisplay mapsto {} +\ctsdisplay longmapsto {} +\ctsdisplay downarrow {} +\ctsdisplay Downarrow {} +\ctsdisplay uparrow {} +\ctsdisplay Uparrow {} +\ctsdisplay updownarrow {} +\ctsdisplay Updownarrow {} +\ctsdisplay nearrow {} +\ctsdisplay searrow {} +\ctsdisplay nwarrow {} +\ctsdisplay swarrow {} +} +\explain +这些命令提供各种箭头。它们被划分为关系符号(\xref{relations})。 +上面的竖直箭头同时也是\minref{定界符}, +因此你可以用 |\big| 等命令让它们变大(\xref \big )。 + +%The command |\iff| differs from |\Longleftrightarrow| in that +%it produces extra space to the left and right of the arrow. +命令 |\iff| 和 |\Longleftrightarrow| 的差别之处在于, +它在箭头两边生成额外间隔。 + +%You can place symbols or other legends on top of a left or right arrow +%with |\buildrel| (\xref \buildrel). +你可以用 |\buildrel|(\xref \buildrel )命令将符号或者其他文字放在箭头上边。 + +%\example +%$$f(x)\mapsto f(y) \iff x \mapsto y$$ +%| +%\dproduces +%$$f(x)\mapsto f(y) \iff x \mapsto y$$ +\example +$$f(x)\mapsto f(y) \iff x \mapsto y$$ +| +\dproduces +$$f(x)\mapsto f(y) \iff x \mapsto y$$ + +%\eix^^{arrows} +%\endexample +%\enddesc +\eix^^{箭头} +\endexample +\enddesc + +%========================================================================== +%\subsection {Named mathematical functions} +\subsection {已命名的数学函数} + +%\begindesc +%\xrdef{namedfns} +%\bix^^{functions, names of} +%{\symbolspace = 36pt +%\threecolumns 32 +%\easy\ctsdisplay cos {} +%\ctsdisplay sin {} +%\ctsdisplay tan {} +%\ctsdisplay cot {} +%\ctsdisplay csc {} +%\ctsdisplay sec {} +%\ctsdisplay arccos {} +%\ctsdisplay arcsin {} +%\ctsdisplay arctan {} +%\ctsdisplay cosh {} +%\ctsdisplay coth {} +%\ctsdisplay sinh {} +%\ctsdisplay tanh {} +%\ctsdisplay det {} +%\ctsdisplay dim {} +%\ctsdisplay exp {} +%\ctsdisplay ln {} +%\ctsdisplay log {} +%\ctsdisplay lg {} +%\ctsdisplay arg {} +%\ctsdisplay deg {} +%\ctsdisplay gcd {} +%\ctsdisplay hom {} +%\ctsdisplay ker {} +%\ctsdisplay inf {} +%\ctsdisplay sup {} +%\ctsdisplay lim {} +%\ctsdisplay liminf {} +%\ctsdisplay limsup {} +%\ctsdisplay max {} +%\ctsdisplay min {} +%\ctsdisplay Pr {} +%\egroup} +%\explain +%These commands set the names of various mathematical functions +%in roman type, as is customary. +%If you apply a superscript or subscript to one of these commands, +%\TeX\ will in most cases typeset it in the usual place. +%In display style, \TeX\ typesets superscripts and subscripts +%on |\det|, |\gcd|, |\inf|, |\lim|, |\liminf|, +%|\limsup|, |\max|, |\min|, |\Pr|, and |\sup| +%as though they were limits, +%i.e., directly above or directly below the function name. +\begindesc +\xrdef{namedfns} +\bix^^{函数名称} +{\symbolspace = 36pt +\threecolumns 32 +\easy\ctsdisplay cos {} +\ctsdisplay sin {} +\ctsdisplay tan {} +\ctsdisplay cot {} +\ctsdisplay csc {} +\ctsdisplay sec {} +\ctsdisplay arccos {} +\ctsdisplay arcsin {} +\ctsdisplay arctan {} +\ctsdisplay cosh {} +\ctsdisplay coth {} +\ctsdisplay sinh {} +\ctsdisplay tanh {} +\ctsdisplay det {} +\ctsdisplay dim {} +\ctsdisplay exp {} +\ctsdisplay ln {} +\ctsdisplay log {} +\ctsdisplay lg {} +\ctsdisplay arg {} +\ctsdisplay deg {} +\ctsdisplay gcd {} +\ctsdisplay hom {} +\ctsdisplay ker {} +\ctsdisplay inf {} +\ctsdisplay sup {} +\ctsdisplay lim {} +\ctsdisplay liminf {} +\ctsdisplay limsup {} +\ctsdisplay max {} +\ctsdisplay min {} +\ctsdisplay Pr {} +\egroup} +\explain +这些命令以惯用的罗马字体排印各种数学函数的名称。 +如果你给这些命令中的任何一个加上上标或下标, +\TeX\ 将在通常的位置排版它。 +在陈列样式中,对于 |\det|、|\gcd|、|\inf|、|\lim|、|\liminf|、 +|\limsup|、|\max|、|\min|、|\Pr| 和 |\sup|, +\TeX\ 将上标和下标当成极限那样排版, +即将它们直接放在函数名的上边或下边。 + +%\example +%$\cos^2 x + \sin^2 x = 1\qquad\max_{a \in A} g(a) = 1$ +%| +%\produces +%$\cos^2 x + \sin^2 x = 1\qquad\max_{a \in A} g(a) = 1$ +%\endexample\enddesc +\example +$\cos^2 x + \sin^2 x = 1\qquad\max_{a \in A} g(a) = 1$ +| +\produces +$\cos^2 x + \sin^2 x = 1\qquad\max_{a \in A} g(a) = 1$ +\endexample\enddesc + +%\begindesc +%\cts bmod {} +%\explain +%This command produces a binary operation for indicating a ^{modulus} +%within a formula. +%\example +%$$x = (y+1) \bmod 2$$ +%| +%\dproduces +%$$x = (y+1) \bmod 2$$ +%\endexample +%\enddesc +\begindesc +\cts bmod {} +\explain +此命令排印一个标明公式内的^{模运算}的二元运算符。 +\example +$$x = (y+1) \bmod 2$$ +| +\dproduces +$$x = (y+1) \bmod 2$$ +\endexample +\enddesc + +%\begindesc +%\cts pmod {} +%\explain +%This command provides a notation for indicating a ^{modulus} in parentheses +%at the end of a formula. +%\example +%$$x \equiv y+1 \pmod 2$$ +%| +%\dproduces +%$$x \equiv y+1 \pmod 2$$ +\begindesc +\cts pmod {} +\explain +此命令在公式末尾排印放在圆括号中的^{模运算}。 +\example +$$x \equiv y+1 \pmod 2$$ +| +\dproduces +$$x \equiv y+1 \pmod 2$$ + +%\eix^^{functions, names of} +%\endexample +%\enddesc +\eix^^{函数名称} +\endexample +\enddesc + + +%========================================================================== +%\subsection {Large operators} +\subsection {巨算符} + +%\begindesc +%\bix^^{operators//large} +%\threecolumns 15 +%\easy\ctsdoubledisplay bigcap {} +%\ctsdoubledisplay bigcup {} +%\ctsdoubledisplay bigodot {} +%\ctsdoubledisplay bigoplus {} +%\ctsdoubledisplay bigotimes {} +%\ctsdoubledisplay bigsqcup {} +%\ctsdoubledisplay biguplus {} +%\ctsdoubledisplay bigvee {} +%\ctsdoubledisplay bigwedge {} +%\ctsdoubledisplay coprod {} +%{\symbolspace = 42pt\basicdisplay {\hskip 26pt$\smallint$}% +% {\\smallint}\ddstrut}% +% \xrdef{\smallint} \pix\ctsidxref{smallint} +%\ctsdoubledisplay int {} +%\ctsdoubledisplay oint {} +%\ctsdoubledisplay prod {} +%\ctsdoubledisplay sum {} +%} +%\explain +%These commands produce various large operator symbols. +%\TeX\ produces the smaller size when it's in ^{text style} +%\minrefs{math mode} and the larger size when it's in ^{display style}. +%Operators are one of \TeX's \minref{class}es of math symbols. +%\TeX\ puts different amounts of space +%around different classes of math symbols. +\begindesc +\bix^^{运算符//巨算符} +\threecolumns 15 +\easy\ctsdoubledisplay bigcap {} +\ctsdoubledisplay bigcup {} +\ctsdoubledisplay bigodot {} +\ctsdoubledisplay bigoplus {} +\ctsdoubledisplay bigotimes {} +\ctsdoubledisplay bigsqcup {} +\ctsdoubledisplay biguplus {} +\ctsdoubledisplay bigvee {} +\ctsdoubledisplay bigwedge {} +\ctsdoubledisplay coprod {} +{\symbolspace = 42pt\basicdisplay {\hskip 26pt$\smallint$}% + {\\smallint}\ddstrut}% + \xrdef{\smallint} \pix\ctsidxref{smallint} +\ctsdoubledisplay int {} +\ctsdoubledisplay oint {} +\ctsdoubledisplay prod {} +\ctsdoubledisplay sum {} +} +\explain +这些命令排印各种巨算符。 +\TeX\ 在^{文内样式}中排印小号字符, +\minrefs{math mode}而在^{陈列样式}中排印大号字符. +巨算符是 \TeX\ 数学符号的其中一\minref{类}。 +\TeX\ 在不同类数学符号间留下不同大小的间隔。 + +%The large operator symbols with `|big|' in their names are different +%from the corresponding binary operations (see \xref{binops}) such as +%|\cap| ($\cap$) since they usually appear at the beginning +%of a formula. \TeX\ uses different spacing for a large operator +%than it does for a binary operation. +名称中带有 `|big|' 的巨算符和对应的二元运算符% +(比如 |\cap| ($\cap$),见\xref{binops})不同, +因为它们通常出现公式的开头。 +\TeX\ 给巨算符留下的间隔与二元运算符的不同。 + +%Don't confuse `$\sum$' (|\sum|) with `$\Sigma$'^^|\Sigma| (|\Sigma|) +%or confuse `$\prod$' (|\prod|) with `$\Pi$' ^^|\Pi| (|\Pi|). +%|\Sigma| and |\Pi| produce capital Greek letters, which are smaller and +%have a different appearance. +不要混淆 `$\sum$' (|\sum|) 和 `$\Sigma$'^^|\Sigma| (|\Sigma|), +或者 `$\prod$' (|\prod|) 和 `$\Pi$' ^^|\Pi| (|\Pi|)。 +|\Sigma| 和 |\Pi| 排印大写希腊字母,它们尺寸更小,外观也不同。 + +%A large operator can have ^{limits}. The lower limit is specified as a +%subscript and the upper limit as a superscript. +巨算符可以带有^{极限}。下极限用下标指定,而上极限用上标指定。 + +%\example +%$$\bigcap_{k=1}^r (a_k \cup b_k)$$ +%| +%\dproduces +%$$\bigcap_{k=1}^r (a_k \cup b_k)$$ +%\endexample +%\interexampleskip +%\example +%$${\int_0^\pi \sin^2 ax\,dx} = {\pi \over 2}$$ +%| +%\dproduces +%$${\int_0^\pi \sin^2 ax\,dx} = {\pi \over 2}$$ +%\endexample +%\enddesc +\example +$$\bigcap_{k=1}^r (a_k \cup b_k)$$ +| +\dproduces +$$\bigcap_{k=1}^r (a_k \cup b_k)$$ +\endexample +\interexampleskip +\example +$${\int_0^\pi \sin^2 ax\,dx} = {\pi \over 2}$$ +| +\dproduces +$${\int_0^\pi \sin^2 ax\,dx} = {\pi \over 2}$$ +\endexample +\enddesc + +%\begindesc +%\cts limits {} +%\explain +%When it's in text style, \TeX\ normally places limits after a large operator. +%This command tells \TeX\ to place +%limits above and below a large operator rather than after it. +\begindesc +\cts limits {} +\explain +在文内样式中,\TeX\ 通常将极限放在巨算符后边。 +此命令让 \TeX\ 将极限放在巨算符的上边和下边,而不是在后边。 + +%If you specify more than one of |\limits|, |\nolimits|, +%and |\display!-limits|, the last command rules. +如果你多次使用 |\limits|、|\nolimits| 或 |\display!-limits|, +仅最后一个命令生效。 + +%\example +%Suppose that $\bigcap\limits_{i=1}^Nq_i$ contains at least +%two elements. +%| +%\produces +%Suppose that $\bigcap\limits_{i=1}^Nq_i$ contains at least +%two elements. +%\endexample +%\enddesc +\example +Suppose that $\bigcap\limits_{i=1}^Nq_i$ contains at least +two elements. +| +\produces +Suppose that $\bigcap\limits_{i=1}^Nq_i$ contains at least +two elements. +\endexample +\enddesc + +%\begindesc +%\cts nolimits {} +%\explain +%When it's in display +%style, \TeX\ normally places limits above and below a large operator. +%(The |\int| operator is an exception---\TeX\ +%places limits for |\int| after the operator in all cases.) +%^^|\int//limits after| +%This command tells \TeX\ to place +%limits after a large operator rather than above and below it. +\begindesc +\cts nolimits {} +\explain +在陈列样式中,\TeX\ 通常将极限放在巨算符的上边和下边。% +(|\int| 算符是一个例外—— \TeX\ 总是将极限放在算符的后边。)% +^^|\int//极限放在后面| +此命令让 \TeX\ 将极限放在巨算符后边,而不是上边和下边。 + +%If you specify more than one of |\limits|, |\nolimits|, +%and |\display!-limits|, the last command rules. +如果你多次使用 |\limits|、|\nolimits| 或 |\display!-limits|, +仅最后一个命令生效。 + +%\example +%$$\bigcap\nolimits_{i=1}^Nq_i$$ +%| +%\dproduces +%$$\bigcap\nolimits_{i=1}^Nq_i$$ +%\endexample +%\enddesc +\example +$$\bigcap\nolimits_{i=1}^Nq_i$$ +| +\dproduces +$$\bigcap\nolimits_{i=1}^Nq_i$$ +\endexample +\enddesc + +%\begindesc +%\cts displaylimits {} +%\explain +%This command tells \TeX\ to +%follow its normal rules for placement of limits: +%\olist\compact +%\li Limits on ^|\int| are placed after the operator. +%\li Limits on other large operators are placed after the +%operator in text style. +%\li Limits on other large operators are placed above and below the operator +%in display style. +%\endolist +%It's usually simpler to use |\limits| or |\nolimits| +%to produce a specific effect, but |\display!-limits| is sometimes +%useful in \minref{macro} definitions. +\begindesc +\cts displaylimits {} +\explain +此命令让 \TeX\ 按照通常方式放置极限: +\olist\compact +\li ^|\int| 算符的极限总放在算符后边。% +\footnote{译注:此处似乎有误,在 |\displaylimits| 下 ^|\int| 和其他算符应该有相同的表现。} +\li 在文内样式中,其他巨算符的极限放在算符的后边。 +\li 在陈列样式中,其他巨算符的极限放在算符的上边和下边。 +\endolist +用 |\limits| 或 |\nolimits| 来排印特定效果更为简单, +但 |\display!-limits| 在\minref{宏}定义中有时会用到。 + +%Note that \plainTeX\ defines ^|\int| as a macro that sets |\nolimits|, +%so |\int\displaylimits| in text style restores the |\limits| +%convention. +注意 \plainTeX\ 在定义 ^|\int| 时就带有 |\nolimits|, +因此文内样式的 |\int\displaylimits| 将恢复 |\limits| 约定。% +\footnote{译注:此处似乎有误,在文内样式中,|\int\displaylimits| 的极限应该还是在后边。} + +%If you specify more than one of |\limits|, |\nolimits|, +%and |\display!-limits|, the last command rules. +如果你多次使用 |\limits|、|\nolimits| 或 |\display!-limits|, +仅最后一个命令生效。 + +%\example +%$$a(\lambda) = {1 \over {2\pi}} \int\displaylimits +%_{-\infty}^{+\infty} f(x)e^{-i\lambda x}\,dx$$ +%| +%\dproduces +%$$a(\lambda) = {1 \over {2\pi}} \int\displaylimits +%_{-\infty}^{+\infty} f(x)e^{-i\lambda x}\,dx$$ +\example +$$a(\lambda) = {1 \over {2\pi}} \int\displaylimits +_{-\infty}^{+\infty} f(x)e^{-i\lambda x}\,dx$$ +| +\dproduces +$$a(\lambda) = {1 \over {2\pi}} \int\displaylimits +_{-\infty}^{+\infty} f(x)e^{-i\lambda x}\,dx$$ + +%\eix^^{operators//large} +%\endexample +%\enddesc +\eix^^{运算符//巨算符} +\endexample +\enddesc + + +%========================================================================== +%\subsection {Punctuation} +\subsection {标点} + +%\begindesc +%\bix^^{punctuation in math formulas} +%\cts cdotp {} +%\cts ldotp {} +%\explain +%These two commands respectively produce a centered dot and a dot +%positioned on the \minref{baseline}. They are valid only in math +%\minref{mode}. \TeX\ treats them as punctuation, putting no extra space in +%front of them but a little extra space after them. +%In contrast, \TeX\ puts an equal amount of space on both sides +%of a centered dot generated by the ^|\cdot| command (\xref \cdot). +%\example +%$x \cdotp y \quad x \ldotp y \quad x \cdot y$ +%| +%\produces +%$x \cdotp y \quad x \ldotp y \quad x \cdot y$ +%\endexample +%\enddesc +\begindesc +\bix^^{数学公式中的标点} +\cts cdotp {} +\cts ldotp {} +\explain +这两个命令分别排印居中的圆点和在\minref{基线}上的圆点。 +它们仅可用于数学\minref{模式}中。 +\TeX\ 将它们视为标点,在前面不留间隔而在后面留下一点间隔。 +与此相反,对于用 ^|\cdot| 命令(\xref\cdot )生成的居中圆点, +\TeX\ 在其两侧留下相同大小的间隔。 +\example +$x \cdotp y \quad x \ldotp y \quad x \cdot y$ +| +\produces +$x \cdotp y \quad x \ldotp y \quad x \cdot y$ +\endexample +\enddesc + +%\begindesc +%\cts colon {} +%\explain +%This command produces a colon punctation symbol. +%It is valid only in math mode. +%The difference between |\colon| and the colon character (|:|) is that +%`|:|' is an operator, so \TeX\ puts extra space to the left of it whereas +%it doesn't put extra space to the left of |\colon|. +%\example +%$f \colon t \quad f : t$ +%| +%\produces +%$f \colon t \quad f : t$ +\begindesc +\cts colon {} +\explain +此命令排印一个冒号标点,它只能用在数学模式中。 +冒号标点 |\colon| 和冒号字符(|:|)的区别在于, +`|:|' 是一个运算符,因此 \TeX\ 在其左侧留下额外间隔, +然而在 |\colon| 左侧却不留额外间隔。 +\example +$f \colon t \quad f : t$ +| +\produces +$f \colon t \quad f : t$ + +%\eix^^{punctuation in math formulas} +%\endexample +%\enddesc +\eix^^{数学公式中的标点} +\endexample +\enddesc + + +%========================================================================== +%\secondprinting{\vfill\eject\null\vglue-30pt\vskip0pt} +%\section {Superscripts and subscripts} +\section {上标和下标} + +%\begindesc +%\margin{Two groups of commands have been combined here.} +%\bix^^{superscripts} +%\bix^^{subscripts} +%\secondprinting{\vglue-12pt} +%\makecolumns 4/2: +%\easy\ctsact _ \xrdef{@underscore} {\<argument>} +%\cts sb {\<argument>} +%\ctsact ^ \xrdef{@hat} {\<argument>} +%\cts sp {\<argument>} +%\secondprinting{\vglue-4pt} +%\explain +%The commands in each column are equivalent. The commands in the first +%column typeset \<argument> as a subscript, and those in the second +%column typeset \<argument> as a superscript. The |\sb| and |\sp| +%commands are mainly useful if you're working on a terminal that lacks an +%underscore or caret, or if you've redefined `|_|' or `|^|' and need +%access to the original definition. These commands are also used for +%setting lower and upper limits on summations and integrals. ^^{lower +%limits} ^^{upper limits} +\begindesc +\margin{Two groups of commands have been combined here.} +\bix^^{上标} +\bix^^{下标} +\secondprinting{\vglue-12pt} +\makecolumns 4/2: +\easy\ctsact _ \xrdef{@underscore} {\<argument>} +\cts sb {\<argument>} +\ctsact ^ \xrdef{@hat} {\<argument>} +\cts sp {\<argument>} +\secondprinting{\vglue-4pt} +\explain +各栏的两个命令都是等价的。第一栏的命令将 \<argument> 排版为下标, +而第二栏的命令将 \<argument> 排版为上标。 +|\sb| 和 |\sp| 命令主要用于无法使用下划线和插入符的终端中, +或者用在重新定义了 `|_|' or `|^|' 但需要其原始定义的情况下。 +这些命令也用于设定求和号和积分号的下极限和上极限。 +^^{下极限} ^^{上极限} + +%If a subscript or superscript is not a single \minref{token}, you need +%to enclose it in a \minref{group}. \TeX\ does not prioritize subscripts +%or superscripts, so it will reject formulas such as |a_i_j|, |a^i^j|, or +%|a^i_j|. +如果下标或上标不是单个\minref{记号},你需要将它放在\minref{编组}中。 +\TeX\ 并不处理下标和上标的优先级, +因此它将拒绝类似 |a_i_j|、|a^i^j| 或 |a^i_j| 的公式。 + +%Subscripts and superscripts are normally typeset in ^{script style}, or +%in ^{scriptscript style} if they are second-order, e.g., a subscript on +%a subscript or a superscript on a a subscript. You can set \emph{any} +%text in a math formula in a script or scriptscript \minref{style} with +%the ^|\scriptstyle| and ^|\scriptscriptstyle| commands (\xref +%\scriptscriptstyle). +下标和上标排版时通常用^{标号样式},或者^{小标号样式}, +如果它们是二阶标号,比如下标中的下标或下标中的上标。 +利用 ^|\scriptstyle| 和 ^|\scriptscriptstyle| 命令(\xref\scriptscriptstyle ), +你可以将数学公式的\emph{任何}文本设为标号或小标号\minref{样式}。 + +%You can apply a subscript or superscript to any of the commands that +%produce named mathematical functions in roman type (see +%\xref{namedfns}). In certain cases (again, see \xref{namedfns}) the +%subscript or superscript appears directly above or under the function +%name as shown in the examples of ^|\lim| and ^|\det| below. +对任何以罗马字体排印命名数学函数(见\xref{namedfns})的命令, +你都可以给它添加下标和上标。 +在某些情形中(同样见\xref{namedfns}), +下标和上标分别出现在函数名的下边和上边, +如下面例子中的 ^|\lim| 和 ^|\det| 所示。 + +%\example +%$x_3 \quad t_{\max} \quad a_{i_k} \quad \sum_{i=1}^n{q_i} +% \quad x^3\quad e^{t \cos\theta}\quad r^{x^2}\quad +% \int_0^\infty{f(x)\,dx}$ +%$$\lim_{x\leftarrow0}f(x)\qquad\det^{z\in A}\qquad\sin^2t$$ +%| +%\produces +%\secondprinting{\divide\abovedisplayskip by 2} +%$x_3 \quad t_{\max} \quad a_{i_k} \quad \sum_{i=1}^n{q_i} +% \quad x^3\quad e^{t \cos\theta}\quad r^{x^2}\quad +% \int_0^\infty{f(x)\,dx}$ +%$$\lim_{x \leftarrow 0} f(x)\qquad +% \det^{z \in A}\qquad \sin^2 t$$ +\example +$x_3 \quad t_{\max} \quad a_{i_k} \quad \sum_{i=1}^n{q_i} + \quad x^3\quad e^{t \cos\theta}\quad r^{x^2}\quad + \int_0^\infty{f(x)\,dx}$ +$$\lim_{x\leftarrow0}f(x)\qquad\det^{z\in A}\qquad\sin^2t$$ +| +\produces +%\secondprinting{\divide\abovedisplayskip by 2} +$x_3 \quad t_{\max} \quad a_{i_k} \quad \sum_{i=1}^n{q_i} + \quad x^3\quad e^{t \cos\theta}\quad r^{x^2}\quad + \int_0^\infty{f(x)\,dx}$ +$$\lim_{x \leftarrow 0} f(x)\qquad + \det^{z \in A}\qquad \sin^2 t$$ + +%\eix^^{superscripts} +%\eix^^{subscripts} +%\endexample +%\enddesc +\eix^^{上标} +\eix^^{下标} +\endexample +\enddesc + +%\secondprinting{\vfill\eject} + +%========================================================================== +%\subsection {Selecting and using styles} +\subsection {选用样式} + +%\begindesc +%\bix^^{styles} +%\cts textstyle {} +%\cts scriptstyle {} +%\cts scriptscriptstyle {} +%\cts displaystyle {} +%\explain +%^^{text style} ^^{script style} ^^{scriptscript style} ^^{display style} +%These commands override the normal \minref{style} and hence the +%font that \TeX\ uses in setting a formula. Like +%font-setting commands such as |\it|, they are in +%effect until the end of the group containing them. +%They are useful when \TeX's choice of style is inappropriate for the formula +%you happen to be setting. +%\example +%$t+{\scriptstyle t + {\scriptscriptstyle t}}$ +%| +%\produces +%$t+{\scriptstyle t + {\scriptscriptstyle t}}$ +%\endexample +%\enddesc +\begindesc +\bix^^{样式} +\cts textstyle {} +\cts scriptstyle {} +\cts scriptscriptstyle {} +\cts displaystyle {} +\explain +^^{文本样式} ^^{标号样式} ^^{小标号样式} ^^{陈列样式} +这些命令覆盖 \TeX\ 排版公式时通常使用的\minref{样式}及其字体。 +如同类似 |\it| 的字体设置命令,它们在其所在编组结束前一直有效。 +当 \TeX\ 给你要排版的公式选用了不合适的样式时,你可以使用这些命令。 +\example +$t+{\scriptstyle t + {\scriptscriptstyle t}}$ +| +\produces +$t+{\scriptstyle t + {\scriptscriptstyle t}}$ +\endexample +\enddesc + +%\begindesc +%\cts mathchoice {% +% \rqbraces{\<math$_1$>} +% \rqbraces{\<math$_2$>} +% \rqbraces{\<math$_3$>} +% \rqbraces{\<math$_4$>}} +%\explain +%This command tells \TeX\ to typeset one of the subformulas +%\<math$_1$>, \<math$_2$>, \<math$_3$>, or \<math$_4$>, making its choice +%according to the current \minref{style}. +%That is, if \TeX\ is in +%display style it sets the |\mathchoice| as \<math$_1$>; in text style it sets +%it as \<math$_2$>; in script style it sets it as \<math$_3$>; +%and in scriptscript style it sets it as \<math$_4$>. +%\example +%\def\mc{{\mathchoice{D}{T}{S}{SS}}} +%The strange formula $\mc_{\mc_\mc}$ illustrates a +%mathchoice. +%| +%\produces +%\def\mc{{\mathchoice{D}{T}{S}{SS}}} +%The strange formula $\mc_{\mc_\mc}$ illustrates a +%mathchoice. +%\endexample +%\enddesc +\begindesc +\cts mathchoice {% + \rqbraces{\<math$_1$>} + \rqbraces{\<math$_2$>} + \rqbraces{\<math$_3$>} + \rqbraces{\<math$_4$>}} +\explain +此命令让 \TeX\ 根据当前\minref{样式}选择并排版其中一个子公式 +\<math$_1$>、\<math$_2$>、\<math$_3$> 或 \<math$_4$>。 +也就是说,如果在陈列样式中,\TeX\ 将 |\mathchoice| 排版为 \<math$_1$>; +在文本样式中排版为 \<math$_2$>,在标号样式中排版为 \<math$_3$>; +而在小标号样式中排版为 \<math$_4$>。 +\example +\def\mc{{\mathchoice{D}{T}{S}{SS}}} +The strange formula $\mc_{\mc_\mc}$ illustrates a +mathchoice. +| +\produces +\def\mc{{\mathchoice{D}{T}{S}{SS}}} +The strange formula $\mc_{\mc_\mc}$ illustrates a +mathchoice. +\endexample +\enddesc + +%\begindesc +%\cts mathpalette {\<argument$_1$> \<argument$_2$>} +%\explain +%^^{math symbols} +%This command provides a convenient way of +%producing a math construct that works in all four \minref{style}s. +%To use it, you'll normally need to define an additional macro, +%which we'll call |\build|. +%The call on |\math!-palette| should then have the form +%|\mathpalette|\allowbreak|\build|\<argument>. +\begindesc +\cts mathpalette {\<argument$_1$> \<argument$_2$>} +\explain +^^{数学符号} +此命令提供一种生成适用于四种\minref{样式}的数学结构的简便方法。% +\footnote{译注:该宏定义为 +|\def\mathpalette#1#2{\mathchoice{#1\displaystyle{#2}}|\break +|{#1\textstyle{#2}}{#1\scriptstyle{#2}}{#1\scriptscriptstyle{#2}}}|。} +要使用它,通常你需要定义一个额外的宏,假设我们称它为 |\build|。 +调用 |\math!-palette| 就应该用 +|\mathpalette|\allowbreak|\build|\<argument> 这种形式。 + + +%|\build| tests what style \TeX\ is in and typesets \<argu\-ment> accordingly. +%It should be defined to have two parameters. +%When you call |\math!-palette|, it will in turn call |\build|, +%with |#1| being a +%command that selects the current style and |#2| being \<argument>. +%Thus, within the definition of |\build| you can typeset something +%in the current style by preceding it with `|#1|'. +%See \knuth{page~360} for examples of using |\mathpalette| +%and \knuth{page~151} for a further explanation of how it works. +|\build| 测试 \TeX\ 位于何种样式,并相应地排版 \<argu\-ment>。 +它应该定义为有两个参数。 +当你调用 |\math!-palette| 时,它以 |#1| 为选择样式的命令, +|#2| 为 \<argument> 转而调用 |\build|。 +因此,在 |\build| 的定义中, +通过将某些东西放在 `|#1|' 前面,就可以用当前样式排版它。 +在\knuth{第~360~页}中有如何使用 |\mathpalette| 的例子, +而在\knuth{第~151~页}中有它如何运作的进一步解释。 + +%\eix^^{styles} +%\enddesc +\eix^^{样式} +\enddesc + +%========================================================================== +%\section {Compound symbols} +\section {复合符号} + +%========================================================================== +%\subsection {Math accents} +\subsection {数学重音} + +%\begindesc +%\xrdef{mathaccent} +%^^{accents} +%^^{math//accents} +%% +%\easy\ctsx acute {^{acute accent} as in $\acute x$} +%\ctsx b {^{bar-under accent} as in $\b x$} +%\ctsx bar {^{bar accent} as in $\bar x$} +%\ctsx breve {^{breve accent} as in $\breve x$} +%\ctsx check {^{check accent} as in $\check x$} +%\ctsx ddot {^{double dot accent} as in $\ddot x$} +%\ctsx dot {^{dot accent} as in $\dot x$} +%\ctsx grave {^{grave accent} as in $\grave x$} +%\ctsx hat {^{hat accent} as in $\hat x$} +%\ctsx widehat {^{wide hat accent} as in $\widehat {x+y}$} +%\ctsx tilde {^{tilde accent} as in $\tilde x$} +%\ctsx widetilde {^{wide tilde accent} as in $\widetilde {z+a}$} +%\ctsx vec {^{vector accent} as in $\vec x$} +%\explain +%These commands produce accent marks in math formulas. You'll ordinarily +%need to leave a space after any one of them. +%A wide accent can be applied to a multicharacter subformula; +%\TeX\ will center the accent over the subformula. +%The other accents are usefully applied only to a single character. +\begindesc +\xrdef{mathaccent} +^^{重音} +^^{数学//数学重音} +% +\easy\ctsx acute {^{锐音符},如同 $\acute x$} +\ctsx b {^{下线符},如同 $\b x$} +\ctsx bar {^{上线符},如同 $\bar x$} +\ctsx breve {^{短音符},如同 $\breve x$} +\ctsx check {^{抑扬符},如同 $\check x$} +\ctsx ddot {^{双点符},如同 $\ddot x$} +\ctsx dot {^{上点符},如同 $\dot x$} +\ctsx grave {^{钝音符},如同 $\grave x$} +\ctsx hat {^{尖角符},如同 $\hat x$} +\ctsx widehat {^{宽尖角符},如同 $\widehat {x+y}$} +\ctsx tilde {^{波浪符},如同 $\tilde x$} +\ctsx widetilde {^{宽波浪符},如同 $\widetilde {z+a}$} +\ctsx vec {^{向量符},如同 $\vec x$} +\explain +这些命令在数学公式上排印重音标记。你通常需要在它们后面留下空格。 +宽重音可以应用到多字符子公式中;\TeX\ 将把重音放在子公式的中间。 +其他重音仅在应用到单个字符时才有用。 + +%\example +%$\dot t^n \qquad \widetilde{v_1 + v_2}$ +%| +%\produces +%$\dot t^n \qquad \widetilde{v_1 + v_2}$ +%\endexample +\example +$\dot t^n \qquad \widetilde{v_1 + v_2}$ +| +\produces +$\dot t^n \qquad \widetilde{v_1 + v_2}$ +\endexample + +%\begindesc +%\cts mathaccent {\<mathcode>} +%\explain +%This command tells \TeX\ to typeset a math accent +%whose family and character code are given by \<mathcode>. (\TeX\ ignores +%the class of the \minref{mathcode}.) +%See \knuth{Appendix~G} for the details of how \TeX\ positions such an accent. +%The usual way to use |\mathaccent| is to put it in a macro definition +%that gives a name to a math accent. +%\example +%\def\acute{\mathaccent "7013} +%| +%\endexample +%\enddesc +\begindesc +\cts mathaccent {\<mathcode>} +\explain +此命令让 \TeX\ 排版字体族和字符编码由 \<mathcode> 给出的数学重音。% +(\TeX\ 忽略\minref{数学码}中的类。) +请参阅\knuth{附录~G}对 \TeX\ 如何放置该重音的详细介绍。 +经常将 |\mathaccent| 放在宏定义中,以给数学重音一个名称。 +\example +\def\acute{\mathaccent "7013} +| +\endexample +\enddesc + +%\see ``Accents'' (\xref {accents}). +%\enddesc +\see ``Accents''(\xref {accents})。 +\enddesc + +%========================================================================== +%\subsection {Fractions and other stacking operations} +\subsection {分式和其他堆叠运算} + +%\begindesc +%\bix^^{fractions} +%\bix^^{stacking subformulas} +%\easy\cts over {} +%\cts atop {} +%\cts above {\<dimen>} +%\cts choose {} +%\cts brace {} +%\cts brack {} +%\explain +%{\def\fri{\<formula$_1$>}% +%\def\frii{\<formula$_2$>}% +%These commands stack one subformula on top of another one. We will explain how +%|\over| works, and then relate the other commands to it. +\begindesc +\bix^^{分式} +\bix^^{堆叠子公式} +\easy\cts over {} +\cts atop {} +\cts above {\<dimen>} +\cts choose {} +\cts brace {} +\cts brack {} +\explain +{\def\fri{\<formula$_1$>}% +\def\frii{\<formula$_2$>}% +这些命令将一个子公式堆放在另一个子公式之上。 +我们将解释 |\over| 如何作用,然后说明其他命令与它的关系。 + +%|\over| is the command that you'd normally use to produce a fraction. +%^^{fractions//produced by \b\tt\\over\e} +%If you write something in one of the following forms: +%\csdisplay +%$$!fri\over!frii$$ +%$!fri\over!frii$ +%\left!<delim>!fri\over!frii\right!<delim> +%{!fri\over!frii} +%| +%you'll get a fraction with numerator \fri\ and denominator \<for\-mu\-la$_2$>, +%i.e., \fri\ over \frii. +%In the first three of +%these forms the |\over| is not implicitly contained in a group; +%it absorbs +%everything to its left and to its right until it comes to a boundary, +%namely, the beginning or end of a group. +|\over| 命令通常用于排印分式。 +^^{分式//用 \b\tt\\over\e 生成} +如果你按下面几种形式之一撰写: +\csdisplay +$$!fri\over!frii$$ +$!fri\over!frii$ +\left!<delim>!fri\over!frii\right!<delim> +{!fri\over!frii} +| +你将得到分子为 \fri\ 分母为 \<for\-mu\-la$_2$> 的分式, +即 \fri\ 除以 \frii 。 +在前面三种形式中,|\over| 非显式地包含在一个编组中; +它吸收左边和右边的内容直到遇到边界,即编组的开头和结尾。 + +%You can't use |\over| or any of the other commands in this group +%more than once in a formula. +%Thus a formula such as: +%\csdisplay +%$$a \over n \choose k$$ +%| +%isn't legal. +%This is not a severe restriction because +%you can always enclose one of the commands in braces. +%The reason for the restriction is that if you had two of these commands +%in a single formula, \TeX\ wouldn't know how to group them. +你不可以在一个公式中多次使用 |\over| 或这批命令的其他命令。 +因此下面的公式: +\csdisplay +$$a \over n \choose k$$ +| +是不合法的。这不是什么严重的限制,因为你总可以将其中一个命令放在花括号中。 +作此限制的原因是,如果你把这些命令的其中两个放在同一个公式中, +\TeX\ 将不知道如何划分它们。 + +%The other commands are similar to |\over|, with the following exceptions: +%\ulist\compact +%\li |\atop| leaves out the fraction bar. +%\li |\above| provides a fraction bar of thickness \<dimen>. +%\li |\choose| +%leaves out the fraction bar and encloses the construct in parentheses. +%(It's called ``choose'' because $n \choose k$ is the notation for the +%number of ways of choosing $k$ things out of $n$ things.) +%\li |\brace| leaves out the fraction bar and encloses the construct in braces. +%\li |\brack| +%leaves out the fraction bar and encloses the construct in brackets. +%\endulist +%}% +%\example +%$${n+1 \over n-1} \qquad {n+1 \atop n-1} \qquad +% {n+1 \above 2pt n-1} \qquad {n+1 \choose n-1} \qquad +% {n+1 \brace n-1} \qquad {n+1 \brack n-1}$$ +%| +%\dproduces +%$${n+1 \over n-1} \qquad {n+1 \atop n-1} \qquad +% {n+1 \above 2pt n-1} \qquad {n+1 \choose n-1} \qquad +% {n+1 \brace n-1} \qquad {n+1 \brack n-1}$$ +%\endexample +%\enddesc +其他命令与 |\over| 类似,但有所不同: +\ulist\compact +\li |\atop| 去掉分式的横线。 +\li |\above| 给出厚度为 \<dimen> 的分式横线。 +\li |\choose| 去掉分式横线,并将结构放在圆括号中。% +(称它为``选择'', +是因为 $n \choose k$ 表示从 $n$ 个东西中任取 $k$ 个的所有选取方式的数目。)% +\li |\brace| 去掉分式横线,并将结构放在花括号中。 +\li |\brack| 去掉分式横线,并将结构放在方括号中。 +\endulist +}% +\example +$${n+1 \over n-1} \qquad {n+1 \atop n-1} \qquad + {n+1 \above 2pt n-1} \qquad {n+1 \choose n-1} \qquad + {n+1 \brace n-1} \qquad {n+1 \brack n-1}$$ +| +\dproduces +$${n+1 \over n-1} \qquad {n+1 \atop n-1} \qquad + {n+1 \above 2pt n-1} \qquad {n+1 \choose n-1} \qquad + {n+1 \brace n-1} \qquad {n+1 \brack n-1}$$ +\endexample +\enddesc + +%\begindesc +%\cts overwithdelims {\<delim$_1$> \<delim$_2$>} +%\cts atopwithdelims {\<delim$_1$> \<delim$_2$>} +%\cts abovewithdelims {\<delim$_1$> \<delim$_2$> \<dimen>} +%\explain +%Each of these commands stacks one subformula on top of another one and +%surrounds the entire construct with \<delim$_1$> on the left and +%\<delim$_2$> on the right. These commands follow the same rules as +%|\over|, |\atop|, and |\above|. The \<dimen> in |\abovewithdelims| +%specifies the thickness of the fraction bar. +%\example +%$${m \overwithdelims () n}\qquad +% {m \atopwithdelims !|!| n}\qquad +% {m \abovewithdelims \{\} 2pt n}$$ +%| +%\dproduces +%$${m \overwithdelims () n}\qquad +% {m \atopwithdelims || n}\qquad +% {m \abovewithdelims \{\} 2pt n}$$ +%\endexample +%\enddesc +\begindesc +\cts overwithdelims {\<delim$_1$> \<delim$_2$>} +\cts atopwithdelims {\<delim$_1$> \<delim$_2$>} +\cts abovewithdelims {\<delim$_1$> \<delim$_2$> \<dimen>} +\explain +这里的每个命令都将一个子公式堆放在另一个子公式之上, +并将整个结构的左边用 \<delim$_1$>,右边用 \<delim$_2$> 包围。 +这些命令遵循与 |\over|、|\atop| 和 |\above| 相同的规则。 +|\abovewithdelims| 后面的 \<dimen> 指定分式横线的厚度。 +\example +$${m \overwithdelims () n}\qquad + {m \atopwithdelims !|!| n}\qquad + {m \abovewithdelims \{\} 2pt n}$$ +| +\dproduces +$${m \overwithdelims () n}\qquad + {m \atopwithdelims || n}\qquad + {m \abovewithdelims \{\} 2pt n}$$ +\endexample +\enddesc + +%\begindesc +%\cts cases {} +%\explain +%^^{combinations, notation for} +%This command produces the mathematical form that denotes a choice among +%several cases. +%Each case has two parts, separated by `|&|'. +%\TeX\ treats the first part as a math formula +%and the second part as ordinary text. Each +%case must be followed by |\cr|. +\begindesc +\cts cases {} +\explain +^^{组合数记法} +此命令排印一个表示从多个情形中选择的数学形式。 +每种情形由两部分组成,两者以 `|&|' 分隔。 +\TeX\ 将第一部分视为数学公式,第二部分视为普通文本。 +每个情形之后必须加上 |\cr|。 + +%\example +%$$g(x,y) = \cases{f(x,y),&if $x<y$\cr +% f(y,x),&if $x>y$\cr +% 0,&otherwise.\cr}$$ +%| +%\dproduces +%$$g(x,y) = \cases{f(x,y),&if $x<y$\cr +% f(y,x),&if $x>y$\cr +% 0,&otherwise.\cr}$$ +%\endexample +%\enddesc +\example +$$g(x,y) = \cases{f(x,y),&if $x<y$\cr + f(y,x),&if $x>y$\cr + 0,&otherwise.\cr}$$ +| +\dproduces +$$g(x,y) = \cases{f(x,y),&if $x<y$\cr + f(y,x),&if $x>y$\cr + 0,&otherwise.\cr}$$ +\endexample +\enddesc + +%\begindesc +%\cts underbrace {\<argument>} +%\cts overbrace {\<argument>} +%\cts underline {\<argument>} +%\cts overline {\<argument>} +%\cts overleftarrow {\<argument>} +%\cts overrightarrow {\<argument>} +%\explain +%These commands place extensible ^{braces}, lines, or ^{arrows} +%over or under the subformula given by \<argument>. +%\TeX\ will make these constructs as wide as they need to be for +%the context. +%When \TeX\ produces the extended braces, lines, or arrows, it considers +%only the dimensions of the \minref{box} containing \<argument>. +%If you use more than one of these commands in a single formula, the +%braces, lines, or arrows they produce +%may not line up properly with each other. +%You can use the |\mathstrut| command (\xref \mathstrut) +%to overcome this difficulty. +%\example +%$$\displaylines{ +%\underbrace{x \circ y}\qquad \overbrace{x \circ y}\qquad +%\underline{x \circ y}\qquad \overline{x \circ y}\qquad +%\overleftarrow{x \circ y}\qquad +%\overrightarrow{x \circ y}\cr +%{\overline r + \overline t}\qquad +%{\overline {r \mathstrut} + \overline {t \mathstrut}}\cr +%}$$ +%| +%\dproduces +%$$\displaylines{ +%\underbrace{x \circ y}\qquad \overbrace{x \circ y}\qquad +%\underline{x \circ y}\qquad \overline{x \circ y}\qquad +%\overleftarrow{x \circ y}\qquad +%\overrightarrow{x \circ y}\cr +%{\overline r + \overline t}\qquad +%{\overline {r \mathstrut} + \overline {t \mathstrut}}\cr +%}$$ +%\endexample +%\enddesc +\begindesc +\cts underbrace {\<argument>} +\cts overbrace {\<argument>} +\cts underline {\<argument>} +\cts overline {\<argument>} +\cts overleftarrow {\<argument>} +\cts overrightarrow {\<argument>} +\explain +这些命令将可伸长的^{花括号}、横线或^{箭头}% +放在由 \<argument> 给出的子公式的上边或下边。 +\TeX\ 将让这些结构足够宽以适应内容。 +当 \TeX\ 排印可伸长的花括号、横线或箭头时, +它只考虑包含 \<argument> 的 \minref{盒子}的尺寸。 +如果你在一个公式中使用这些命令中的两个以上, +其中排印的花括号、横线或箭头之间可能无法恰当地对齐。 +你可以使用 |\mathstrut| 命令(\xref\mathstrut )克服此困难。 +\example +$$\displaylines{ +\underbrace{x \circ y}\qquad \overbrace{x \circ y}\qquad +\underline{x \circ y}\qquad \overline{x \circ y}\qquad +\overleftarrow{x \circ y}\qquad +\overrightarrow{x \circ y}\cr +{\overline r + \overline t}\qquad +{\overline {r \mathstrut} + \overline {t \mathstrut}}\cr +}$$ +| +\dproduces +$$\displaylines{ +\underbrace{x \circ y}\qquad \overbrace{x \circ y}\qquad +\underline{x \circ y}\qquad \overline{x \circ y}\qquad +\overleftarrow{x \circ y}\qquad +\overrightarrow{x \circ y}\cr +{\overline r + \overline t}\qquad +{\overline {r \mathstrut} + \overline {t \mathstrut}}\cr +}$$ +\endexample +\enddesc + +%\begindesc\secondprinting{\vglue-.5\baselineskip\vskip0pt} +%\cts buildrel {\<formula> {\bt \\over} \<relation>} +%\explain +%^^{relations//putting formulas above} +%This command produces a \minref{box} in which \<formula> +%is placed on top of \<relation>. \TeX\ treats the result as a relation +%for spacing purposes \seeconcept{class}. +%\example +%$\buildrel \rm def \over \equiv$ +%| +%\produces +%$\buildrel \rm def \over \equiv$ +\begindesc%\secondprinting{\vglue-.5\baselineskip\vskip0pt} +\cts buildrel {\<formula> {\bt \\over} \<relation>} +\explain +^^{关系符//将公式放在其上} +此命令将 \<formula> 所在的\minref{盒子}放在 \<relation> 上边。 +\TeX\ 处理间隔时将结果视为一个关系符\seeconcept{类}。 +\example +$\buildrel \rm def \over \equiv$ +| +\produces +$\buildrel \rm def \over \equiv$ + +%\eix^^{fractions} +%\eix^^{stacking subformulas} +%\endexample +%\enddesc +\eix^^{分式} +\eix^^{堆叠子公式} +\endexample +\enddesc + +%\secondprinting{\vfill\eject} + + +%========================================================================== +%\subsection {Dots} +\subsection {圆点} + +%\begindesc +%\bix^^{dots} +%\easy\cts ldots {} +%\cts cdots {} +%\explain +%These commands produce three ^{dots} in a row. For |\ldots|, the dots +%are on the baseline; for |\cdots|, the dots are centered with respect to +%the axis (see the explanation of |\vcenter|, \xref\vcenter). +\begindesc +\bix^^{圆点} +\easy\cts ldots {} +\cts cdots {} +\explain +这两个命令都排印三个一排的^{圆点}。对于 |\ldots|, +圆点放在基线上;对于 |\cdots|,圆点放在中轴线上% +(见 \xref\vcenter 对 |\vcenter| 的解释)。 + +%\example +%$t_1 + t_2 + \cdots + t_n \qquad x_1,x_2, \ldots\,, x_r$ +%| +%\produces +%$t_1 + t_2 + \cdots + t_n \qquad x_1,x_2, \ldots\,, x_r$ +%\endexample +%\enddesc +\example +$t_1 + t_2 + \cdots + t_n \qquad x_1,x_2, \ldots\,, x_r$ +| +\produces +$t_1 + t_2 + \cdots + t_n \qquad x_1,x_2, \ldots\,, x_r$ +\endexample +\enddesc + +%\begindesc +%\easy\cts vdots {} +%\explain +%This command produces three vertical dots. +%\example +%$$\eqalign{f(\alpha_1)& = f(\beta_1)\cr +% \noalign{\kern -4pt}% +% &\phantom{a}\vdots\cr % moves the dots right a bit +% f(\alpha_k)& = f(\beta_k)\cr}$$ +%| +%\dproduces +%$$\eqalign{f(\alpha_1)& = f(\beta_1)\cr +% \noalign{\kern -4pt}% +% &\phantom{a}\vdots\cr +% f(\alpha_k)& = f(\beta_k)\cr}$$ +%\endexample +%\enddesc +\begindesc +\easy\cts vdots {} +\explain +此命令排印三个竖直的圆点。 +\example +$$\eqalign{f(\alpha_1)& = f(\beta_1)\cr + \noalign{\kern -4pt}% + &\phantom{a}\vdots\cr % moves the dots right a bit + f(\alpha_k)& = f(\beta_k)\cr}$$ +| +\dproduces +$$\eqalign{f(\alpha_1)& = f(\beta_1)\cr + \noalign{\kern -4pt}% + &\phantom{a}\vdots\cr + f(\alpha_k)& = f(\beta_k)\cr}$$ +\endexample +\enddesc + +%\begindesc +%\cts ddots {} +%\explain +%This command produces three dots on a diagonal. +%Its most common use is to indicate repetition along the diagonal of a matrix. +%\example +%$$\pmatrix{0&\ldots&0\cr +% \vdots&\ddots&\vdots\cr +% 0&\ldots&0\cr}$$ +%| +%\dproduces +%$$\pmatrix{0&\ldots&0\cr +% \vdots&\ddots&\vdots\cr +% 0&\ldots&0\cr}$$ +\begindesc +\cts ddots {} +\explain +此命令排印斜线上的三个圆点。它常用于表示沿矩阵对角线的重复。 +\example +$$\pmatrix{0&\ldots&0\cr + \vdots&\ddots&\vdots\cr + 0&\ldots&0\cr}$$ +| +\dproduces +$$\pmatrix{0&\ldots&0\cr + \vdots&\ddots&\vdots\cr + 0&\ldots&0\cr}$$ + +%\eix^^{dots} +%\endexample +%\enddesc +\eix^^{圆点} +\endexample +\enddesc + +%\see |\dots| \ctsref\dots. +\see |\dots|\ctsref\dots 。 + +%========================================================================== +%\subsection {Delimiters} +\subsection {定界符} + +%\begindesc +%\bix^^{delimiters} +%% +%\cts lgroup {} +%\cts rgroup {} +%\explain +%These commands produce large left and right ^{parentheses} +%that are defined as opening and closing \minref{delimiter}s. +%The smallest available size for these delimiters is |\Big|. +%If you use smaller sizes, you'll get weird characters. +%\example +%$$\lgroup\dots\rgroup\qquad\bigg\lgroup\dots\bigg\rgroup$$ +%| +%\dproduces +%$$\lgroup\dots\rgroup\qquad\bigg\lgroup\dots\bigg\rgroup$$ +%\endexample +%\enddesc +\begindesc +\bix^^{定界符} +% +\cts lgroup {} +\cts rgroup {} +\explain +这两个命令排印大号的左和右^{圆括号}, +它们分别作为开定界符和闭\minref{定界符}。 +这两个定界符的最小可用尺寸为 |\Big|。 +如果使用更小的尺寸,你将得到奇怪的字符。 +\example +$$\lgroup\dots\rgroup\qquad\bigg\lgroup\dots\bigg\rgroup$$ +| +\dproduces +$$\lgroup\dots\rgroup\qquad\bigg\lgroup\dots\bigg\rgroup$$ +\endexample +\enddesc + +%\begindesc +%\margin{{\tt\\vert} and {\tt\\Vert} were explained elsewhere.} +%\easy\cts left {} +%\cts right {} +%\explain +%These commands must be used together in the pattern: +%\display +%{{\bt \\left} \<delim$_1$> \<subformula> {\bt \\right} \<delim$_2$>} +%This construct causes \TeX\ to produce \<subformula>, +%enclosed in the \minref{delimiter}s \<delim$_1$> and \<delim$_2$>. +%The vertical size of the delimiter is adjusted to fit the +%vertical size (height plus depth) of \<subformula>. \<delim$_1$> and +%\<delim$_2$> need not correspond. +%For instance, you could use `|]|' as a left delimiter +%and `|(|' as a right delimiter in a single use of |\left| +%and |\right|. +\begindesc +\margin{{\tt\\vert} and {\tt\\Vert} were explained elsewhere.} +\easy\cts left {} +\cts right {} +\explain +这两个命令必须按照下面模式一起使用: +\display +{{\bt \\left} \<delim$_1$> \<subformula> {\bt \\right} \<delim$_2$>} +这个构造将让 \TeX\ 排印 \<subformula>, +并用\minref{定界符} \<delim$_1$> 和 \<delim$_2$> 包围它。 +\TeX\ 调整定界符的竖直尺寸以适应 \<subformula> 的竖直尺寸(高度加深度)。 +\<delim$_1$> 和 \<delim$_2$> 不需要相对应。 +举个例子,在使用 |\left| 和 |\right| 时, +你可以将 `|]|' 作为左定界符,而将 `|(|' 作为右定界符。 + +%|\left| and |\right| have the important property that they define a +%group, i.e., they act like left and right braces. This grouping +%property is particularly useful when you put ^|\over| (\xref{\over}) or +%a related command between |\left| and |\right|, since you don't need to +%put braces around the fraction constructed by |\over|. +|\left| 和 |\right| 有个重要性质是它们定义了一个编组, +即它们能够充当左和右花括号。 +当你在|\left| 和 |\right| 之间放上 ^|\over|(\xref{\over})或其他相关命令时, +此编组性质就很有用,因为你无需在 |\over| 构造的分式两边加上花括号。 + +%If you want a left delimiter but not a right delimiter, you can use `|.|' in +%place of the delimiter you don't want and it will turn into empty space +%(of width ^|\nulldelimiterspace|). +%\example +%$$\left\Vert\matrix{a&b\cr c&d\cr}\right\Vert +% \qquad \left\uparrow q_1\atop q_2\right.$$ +%| +%\dproduces +%$$\left\Vert\matrix{a&b\cr c&d\cr}\right\Vert +% \qquad \left\uparrow q_1\atop q_2\right.$$ +%\endexample +%\enddesc +如果你需要左定界符但不需要右定界符, +你可以用 `|.|' 代替你不需要的定界符, +这样它就变成一个空白(宽度为 ^|\nulldelimiterspace|)。 +\example +$$\left\Vert\matrix{a&b\cr c&d\cr}\right\Vert + \qquad \left\uparrow q_1\atop q_2\right.$$ +| +\dproduces +$$\left\Vert\matrix{a&b\cr c&d\cr}\right\Vert + \qquad \left\uparrow q_1\atop q_2\right.$$ +\endexample +\enddesc + +%\begindesc +%\cts delimiter {\<number>} +%\explain +%This command produces a delimiter whose characteristics are given by +%\<number>. \<number> is normally written in hexadecimal notation. +%You can use the |\delimiter| command instead of a character in any context +%where \TeX\ expects a delimiter (although the command is rarely used +%outside of a macro definition). +%Suppose that \<number> is the hexadecimal number $cs_1s_2s_3 +%l_1l_2l_3$. Then \TeX\ takes the delimiter to have +%\minref{class} $c$, small variant +%$s_1s_2s_3$, and large variant $l_1l_2l_3$. Here $s_1s_2s_3$ indicates +%the math character found in position $s_2s_3$ of family $s_1$, and +%similarly for $l_1l_2l_3$. This is the same convention as the one +%used for ^|\mathcode| (\xref\mathcode). +%\example +%\def\vert{\delimiter "026A30C} % As in plain TeX. +%| +%\endexample +%\enddesc +\begindesc +\cts delimiter {\<number>} +\explain +此命令排印用 \<number> 刻画其特性的定界符。\<number> 通常用十六进制表示。 +在 \TeX\ 需要定界符的任何地方你都可以用 |\delimiter| 命令代替一个字符% +(尽管此命令很少在宏定义之外的地方使用)。 +假设 \<number> 为十六进制数 $cs_1s_2s_3l_1l_2l_3$。 +则 \TeX\ 知道该定界符属于第$c$\minref{类}, +小号变体为 $s_1s_2s_3$, 而大号变体为 $l_1l_2l_3$。 +这里 $s_1s_2s_3$ 表示第 $s_1$ 族位置 $s_2s_3$ 的数学字符, +$l_1l_2l_3$ 类似。这里使用与 ^|\mathcode|(\xref\mathcode )一样的约定。 +\example +\def\vert{\delimiter "026A30C} % As in plain TeX. +| +\endexample +\enddesc + +%\begindesc +%\margin{{\tt\\delcode} was explained in two places. The +%combined explanation is now in `General operations'.} +%\cts delimiterfactor {\param{number}} +%\cts delimitershortfall {\param{number}} +%\explain +%^^{delimiters//height of} +%These parameters together tell \TeX\ how the height of a \minref{delimiter} +%should be related to the vertical size of the subformula +%with which the delimiter is associated. +%|\delimiterfactor| gives the minimum +%ratio of the delimiter size to the vertical size of the subformula, and +%|\delimitershortfall| gives the maximum by which the height of the +%delimiter will be reduced from that of the vertical size of the subformula. +\begindesc +\margin{{\tt\\delcode} was explained in two places. The +combined explanation is now in `General operations'.} +\cts delimiterfactor {\param{number}} +\cts delimitershortfall {\param{number}} +\explain +^^{定界符//定界符高度} +这两个参数共同确定了\minref{定界符}高度与其中子公式的竖直尺寸的关系。 +|\delimiterfactor| 给出定界符高度相对子公式竖直尺寸的最小比例, +而 |\delimitershortfall| 给出定界符高度相对子公式竖直尺寸的最大差距。 + +%Suppose that the \minref{box} containing the subformula +%has height $h$ and depth $d$, and let $y=2\,\max(h,d)$. +%Let the value of |\delimiterfactor| be $f$ and the value of +%|\delimitershortfall| be $\delta$. +%Then \TeX\ takes the minimum delimiter size to be at least $y \cdot +%f/1000$ and at least $y-\delta$. In particular, if |\delimiterfactor| +%is exactly $1000$ then \TeX\ will try to make a delimiter at least as tall +%as the formula to which it is attached. +%See \knuth{page~152 and page~446 (Rule 19)} +%for the exact details of how \TeX\ uses these parameters. +%\PlainTeX\ sets |\delimiter!-factor| to $901$ and +%|\delimiter!-shortfall| to |5pt|. +%\enddesc +假设包含子公式的\minref{盒子}的高度为 $h$ 深度为 $d$, +且令 $y=2\,\max(h,d)$。 +设 |\delimiterfactor| 的值为 $f$,|\delimitershortfall| 的值为 $\delta$。 +则 \TeX\ 选取的定界符高度至少为 $y \cdot f/1000$,且至少为 $y-\delta$。 +特别地,如果 |\delimiterfactor| 恰好为 $1000$, +则 \TeX\ 将试着生成一个至少和其中的子公式一样高的定界符。 +见\knuth{第~152~页和第~446~页(规则19)}中 \TeX\ 如何使用这些参数的细节。 +\PlainTeX\ 设定 |\delimiter!-factor| 为 $901$, +|\delimiter!-shortfall| 为 |5pt|。 +\enddesc + +%\see |\delcode| (\xref\delcode), |\vert|, |\Vert|, +%and |\backslash| (\xref\vert). +%\eix^^{delimiters} +\see |\delcode|(\xref\delcode )、|\vert|、|\Vert| 和 |\backslash|(\xref\vert )。 +\eix^^{定界符} + +%========================================================================== +%\subsection {Matrices} +\subsection {矩阵} + +%\begindesc +%\cts matrix +% {{\bt \rqbraces{\<line> \\cr $\ldots$ \<line> \\cr}}} +%\cts pmatrix +% {{\bt \rqbraces{\<line> \\cr $\ldots$ \<line> \\cr}}} +%\cts bordermatrix +% {{\bt \rqbraces{\<line> \\cr $\ldots$ \<line> \\cr}}} +%\explain +%Each of these three commands produces a ^{matrix}. +%The elements of each row of the input matrix +%are separated by `|&|' and each row in turn is ended +%by |\cr|. +%(This is the same form that is used for an +%\minref{alignment}.) +%The commands differ in the following ways: +%\ulist\compact +%\li |\matrix| produces a matrix without any surrounding or inserted +%\minref{delimiter}s. +%\li |\pmatrix| produces a matrix surrounded by parentheses. +%\li |\bordermatrix| produces a matrix in which the first row and the first +%column are treated as labels. (The first element of the first row is +%usually left blank.) The rest of the matrix is enclosed in +%parentheses. +%\endulist +%\TeX\ can make the parentheses for |\pmatrix| and |\bordermatrix| as large as +%they need to be by inserting vertical extensions. If you want a matrix +%to be surrounded by delimiters other than parentheses, you should use +%|\matrix| in conjunction with |\left| and |\right| (\xref \left). +\begindesc +\cts matrix + {{\bt \rqbraces{\<line> \\cr $\ldots$ \<line> \\cr}}} +\cts pmatrix + {{\bt \rqbraces{\<line> \\cr $\ldots$ \<line> \\cr}}} +\cts bordermatrix + {{\bt \rqbraces{\<line> \\cr $\ldots$ \<line> \\cr}}} +\explain +这三个命令每个都排印一个^{矩阵}, +输入矩阵时各行的元素之间用 `|&|' 分隔,而各行用 |\cr| 结尾。% +(这里使用与\minref{阵列}一样的形式。)% +这些命令之间的区别如下: +\ulist\compact +\li |\matrix| 排印一个四周空白不带\minref{定界符}的矩阵。 +\li |\pmatrix| 排印一个两边带圆括号的矩阵。 +\li |\bordermatrix| 排印一个将第一行和第一列视为标号的矩阵。% +(第一行的第一个元素通常为空白。)% +矩阵的其他元素被圆括号包含。 +\endulist +通过增加竖直延伸,\TeX\ 能够为 |\pmatrix| 和 |\bordermatrix| 制作足够大的圆括号。 +如果你需要用不同于圆括号的定界符包围矩阵,你应当将 +|\matrix| 与 |\left| 和 |\right|(\xref\left )合起来使用。 + +%\example +%$$\displaylines{ +% \matrix{t_{11}&t_{12}&t_{13}\cr +% t_{21}&t_{22}&t_{23}\cr +% t_{31}&t_{32}&t_{33}\cr}\qquad +%\left\{\matrix{t_{11}&t_{12}&t_{13}\cr +% t_{21}&t_{22}&t_{23}\cr +% t_{31}&t_{32}&t_{33}\cr}\right\}\cr +%\pmatrix{t_{11}&t_{12}&t_{13}\cr +% t_{21}&t_{22}&t_{23}\cr +% t_{31}&t_{32}&t_{33}\cr}\qquad +%\bordermatrix{&c_1&c_2&c_3\cr +% r_1&t_{11}&t_{12}&t_{13}\cr +% r_2&t_{21}&t_{22}&t_{23}\cr +% r_3&t_{31}&t_{32}&t_{33}\cr}\cr}$$ +%| +%\dproduces +%$$\displaylines{ +% \matrix{t_{11}&t_{12}&t_{13}\cr +% t_{21}&t_{22}&t_{23}\cr +% t_{31}&t_{32}&t_{33}\cr}\qquad +%\left\{\matrix{t_{11}&t_{12}&t_{13}\cr +% t_{21}&t_{22}&t_{23}\cr +% t_{31}&t_{32}&t_{33}\cr}\right\}\cr +%\pmatrix{t_{11}&t_{12}&t_{13}\cr +% t_{21}&t_{22}&t_{23}\cr +% t_{31}&t_{32}&t_{33}\cr}\qquad +%\bordermatrix{&c_1&c_2&c_3\cr +% r_1&t_{11}&t_{12}&t_{13}\cr +% r_2&t_{21}&t_{22}&t_{23}\cr +% r_3&t_{31}&t_{32}&t_{33}\cr}\cr}$$ +%\endexample +%\enddesc +\example +$$\displaylines{ + \matrix{t_{11}&t_{12}&t_{13}\cr + t_{21}&t_{22}&t_{23}\cr + t_{31}&t_{32}&t_{33}\cr}\qquad +\left\{\matrix{t_{11}&t_{12}&t_{13}\cr + t_{21}&t_{22}&t_{23}\cr + t_{31}&t_{32}&t_{33}\cr}\right\}\cr +\pmatrix{t_{11}&t_{12}&t_{13}\cr + t_{21}&t_{22}&t_{23}\cr + t_{31}&t_{32}&t_{33}\cr}\qquad +\bordermatrix{&c_1&c_2&c_3\cr + r_1&t_{11}&t_{12}&t_{13}\cr + r_2&t_{21}&t_{22}&t_{23}\cr + r_3&t_{31}&t_{32}&t_{33}\cr}\cr}$$ +| +\dproduces +$$\displaylines{ + \matrix{t_{11}&t_{12}&t_{13}\cr + t_{21}&t_{22}&t_{23}\cr + t_{31}&t_{32}&t_{33}\cr}\qquad +\left\{\matrix{t_{11}&t_{12}&t_{13}\cr + t_{21}&t_{22}&t_{23}\cr + t_{31}&t_{32}&t_{33}\cr}\right\}\cr +\pmatrix{t_{11}&t_{12}&t_{13}\cr + t_{21}&t_{22}&t_{23}\cr + t_{31}&t_{32}&t_{33}\cr}\qquad +\bordermatrix{&c_1&c_2&c_3\cr + r_1&t_{11}&t_{12}&t_{13}\cr + r_2&t_{21}&t_{22}&t_{23}\cr + r_3&t_{31}&t_{32}&t_{33}\cr}\cr}$$ +\endexample +\enddesc + +%========================================================================== +%\subsection {Roots and radicals} +\subsection {根号与根数} + +%\begindesc +%\easy\cts sqrt {\<argument>} +%\explain +%This command produces the notation for the square root of \<argument>. +%\example +%$$x = {-b\pm\sqrt{b^2-4ac} \over 2a}$$ +%| +%\dproduces +%$$x = {-b\pm\sqrt{b^2-4ac} \over 2a}$$ +%\endexample +%\enddesc +\begindesc +\easy\cts sqrt {\<argument>} +\explain +此命令排印 \<argument> 的平方根。 +\example +$$x = {-b\pm\sqrt{b^2-4ac} \over 2a}$$ +| +\dproduces +$$x = {-b\pm\sqrt{b^2-4ac} \over 2a}$$ +\endexample +\enddesc + +%\begindesc +%\easy\cts root {\<argument$_1$> {\bt \\of} \<argument$_2$>} +%\explain +%This command produces the notation for a root of \<argument$_2$>, where the +%root is given by \<argument$_1$>. +%\example +%$\root \alpha \of {r \cos \theta}$ +%| +%\produces +%$\root \alpha \of {r \cos \theta}$ +%\endexample +%\enddesc +\begindesc +\easy\cts root {\<argument$_1$> {\bt \\of} \<argument$_2$>} +\explain +此命令排印 \<argument$_2$> 的 \<argument$_1$> 次根号。 +\example +$\root \alpha \of {r \cos \theta}$ +| +\produces +$\root \alpha \of {r \cos \theta}$ +\endexample +\enddesc + +%\begindesc +%\cts radical {\<number>} +%\explain +%This command produces a radical sign +%whose characteristics are given by +%\<number>. It uses the same representation as the delimiter code +%^^{delimiter codes} +%in the ^|\delcode| command (\xref \delcode). +\begindesc +\cts radical {\<number>} +\explain +此命令排印用 \<number> 刻画其特性的根数符号。 +它使用的定界码表示法与 ^|\delcode| 命令(\xref\delcode )的相同。 +^^{定界码} + +%\example +%\def\sqrt{\radical "270370} % as in plain TeX +%| +%\endexample +%\enddesc +\example +\def\sqrt{\radical "270370} % as in plain TeX +| +\endexample +\enddesc + + +%========================================================================== +%\section {Equation numbers} +\section {方程编号} + +%\begindesc +%\easy\cts eqno {} +%\cts leqno {} +%\explain +%These commands attach an equation number to a displayed formula. +%|\eqno| puts the equation number on the right and |\leqno| puts it on +%the left. +%The commands must be given at the end of the formula. +%If you have a multiline display and you want to number more than one +%of the lines, use the |\eq!-alignno| or |\leq!-alignno| command +%(\xref \eqalignno). +\begindesc +\easy\cts eqno {} +\cts leqno {} +\explain +这两个命令给陈列公式加上方程编号。 +|\eqno| 将编号放在右侧,而|\leqno| 将编号放在左侧。 +这两个命令必须放在公式末尾。 +如果你有个多行陈列公式,而你希望给不止一行编号, +你可以用 |\eq!-alignno| 或 |\leq!-alignno| 命令(\xref\eqalignno )。 + +%These commands are valid only in display math mode. +这两个命令只能在陈列数学模式中使用。 + +%\example +%$$e^{i\theta} = \cos \theta + i \sin \theta\eqno{(11)}$$ +%| +%\produces +%$$e^{i\theta} = \cos \theta + i \sin \theta\eqno{(11)}$$ +%\endexample +%\example +%$$\cos^2 \theta + \sin^2 \theta = 1\leqno{(12)}$$ +%| +%\produces +%\abovedisplayskip = -\baselineskip +%$$\cos^2 \theta + \sin^2 \theta = 1\leqno{(12)}$$ +%\endexample +%\enddesc +\example +$$e^{i\theta} = \cos \theta + i \sin \theta\eqno{(11)}$$ +| +\produces +$$e^{i\theta} = \cos \theta + i \sin \theta\eqno{(11)}$$ +\endexample +\example +$$\cos^2 \theta + \sin^2 \theta = 1\leqno{(12)}$$ +| +\produces +\abovedisplayskip = -\baselineskip +$$\cos^2 \theta + \sin^2 \theta = 1\leqno{(12)}$$ +\endexample +\enddesc + + +%========================================================================== +%\section {Multiline displays} +\section {多行陈列公式} + +%\begindesc +%\bix^^{displays//multiline} +%\cts displaylines +% {{\bt \rqbraces{\<line>\ths\\cr$\ldots$\<line>\ths\\cr}}} +%\explain +%This command produces a multiline math display in which each line is +%centered independently of the other lines. +%You can use the |\noalign| command (\xref \noalign) to change the amount +%of space between two lines of a multiline display. +\begindesc +\bix^^{陈列公式//多行陈列公式} +\cts displaylines + {{\bt \rqbraces{\<line>\ths\\cr$\ldots$\<line>\ths\\cr}}} +\explain +此命令排印一个多行陈列公式,其中的各行独立地居中放置。 +你可以使用 |\noalign| 命令(\xref\noalign )改变多行陈列公式中两行的间隔。 + +%If you want to attach equation numbers to some or all of the equations +%in a multiline math display, you should use |\eqalignno| or +%|\leqalignno|. +%\example +%$$\displaylines{(x+a)^2 = x^2+2ax+a^2\cr +% (x+a)(x-a) = x^2-a^2\cr}$$ +%| +%\dproduces\centereddisplays +%$$\displaylines{ +%(x+a)^2 = x^2+2ax+a^2\cr +%(x+a)(x-a) = x^2-a^2\cr +%}$$ +%\endexample +%\enddesc +如果你希望给多行陈列公式的某个或某些方程添加编号, +你应当使用|\eqalignno| 或 |\leqalignno|。 +\example +$$\displaylines{(x+a)^2 = x^2+2ax+a^2\cr + (x+a)(x-a) = x^2-a^2\cr}$$ +| +\dproduces\centereddisplays +$$\displaylines{ +(x+a)^2 = x^2+2ax+a^2\cr +(x+a)(x-a) = x^2-a^2\cr +}$$ +\endexample +\enddesc + +%\begindesc +%\cts eqalign {} +% {{\bt \rqbraces{\<line> \\cr $\ldots$ \<line> \\cr}}} +%\cts eqalignno {} +% {{\bt \rqbraces{\<line> \\cr $\ldots$ \<line> \\cr}}} +%\cts leqalignno {} +% {{\bt \rqbraces{\<line> \\cr $\ldots$ \<line> \\cr}}} +%\explain +%^^{equation numbers} +%These commands produce a multiline math display +%in which certain corresponding parts of the lines are lined up vertically. +%The |\eqalignno| and |\leqalignno| commands also let you +%provide equation numbers for some or all of the lines. +%|\eqalignno| puts the equation numbers on the right and +%|\leqalignno| puts them on the left. +\begindesc +\cts eqalign {} + {{\bt \rqbraces{\<line> \\cr $\ldots$ \<line> \\cr}}} +\cts eqalignno {} + {{\bt \rqbraces{\<line> \\cr $\ldots$ \<line> \\cr}}} +\cts leqalignno {} + {{\bt \rqbraces{\<line> \\cr $\ldots$ \<line> \\cr}}} +\explain +^^{公式编号} +这些命令排印一个多行陈列公式,其中某些行的对应部分竖直对齐。 +|\eqalignno| 和 |\leqalignno| 命令还允许你给某个或某些行添加方程编号。 +|\eqalignno| 将方程编号放在右侧, +而 |\leqalignno| 将编号放在左侧。 + +%Each line in the display is ended by |\cr|. Each of the parts to be aligned +%(most often an equals sign) is preceded by +%`|&|'. An `|&|' also precedes each equation number, which comes at the +%end of a line. +%You can put more than one of these commands in a single display in order +%to produce several groups of equations. In this case, only the rightmost +%or leftmost group can be produced by |\eqalignno| or |\leqalignno|. +陈列公式的每行用 |\cr| 结尾。 +各行需要对齐的各部分(多半是等号)前面加上 `|&|'。 +方程编号放在公式末尾,它的前面也要加上 `|&|'。 +你可以在单个陈列公式中多次使用这些命令以排印多组方程。 +在这种情形中, +只有最右边或最左边的那组方程可以用 |\eqalignno| 或 |\leqalignno| 编号。 + +%You can use the |\noalign| command (\xref \noalign) to change the amount +%of space between two lines of a multiline display. +%\example +%$$\left\{\eqalign{f_1(t) &= 2t\cr f_2(t) &= t^3\cr +% f_3(t) &= t^2-1\cr}\right\} +% \left\{\eqalign{g_1(t) &= t\cr g_2(t) &= 1}\right\}$$ +%| +%\dproduces +%$$\left\{\eqalign{f_1(t) &= 2t\cr f_2(t) &= t^3\cr +% f_3(t) &= t^2-1\cr}\right\} +%\left\{\eqalign{g_1(t) &= t\cr g_2(t) &= 1}\right\}$$ +%\nextexample +%$$\eqalignno{ +%\sigma^2&=E(x-\mu)^2&(12)\cr +% &={1 \over n}\sum_{i=0}^n (x_i - \mu)^2&\cr +% &=E(x^2)-\mu^2\cr}$$ +%| +%\produces +%\abovedisplayskip = -\baselineskip +%$$\eqalignno{ +%\sigma^2&=E(x-\mu)^2&(12)\cr +% &={1 \over n}\sum_{i=0}^n (x_i - \mu)^2&\cr +% &=E(x^2)-\mu^2\cr}$$ +%\nextexample +%$$\leqalignno{ +%\sigma^2&=E(x-\mu)^2&(6)\cr +% &=E(x^2)-\mu^2&(7)\cr}$$ +%| +%\produces +%\abovedisplayskip = -\baselineskip +%$$\leqalignno{ +%\sigma^2&=E(x-\mu)^2&(6)\cr +% &=E(x^2)-\mu^2&(7)\cr}$$ +%\nextexample +%$$\eqalignno{ +% &(x+a)^2 = x^2+2ax+a^2&(19)\cr +% &(x+a)(x-a) = x^2-a^2\cr}$$ +%% same effect as \displaylines but with an equation number +%| +%\dproduces +%$$\eqalignno{ +%&(x+a)^2 = x^2+2ax+a^2&(19)\cr +%&(x+a)(x-a) = x^2-a^2\cr +%}$$ +%% same effect as \displaylines but with an equation number +你可以使用 |\noalign| 命令(\xref\noalign )改变多行陈列公式中两行的间隔。 +\example +$$\left\{\eqalign{f_1(t) &= 2t\cr f_2(t) &= t^3\cr + f_3(t) &= t^2-1\cr}\right\} + \left\{\eqalign{g_1(t) &= t\cr g_2(t) &= 1}\right\}$$ +| +\dproduces +$$\left\{\eqalign{f_1(t) &= 2t\cr f_2(t) &= t^3\cr + f_3(t) &= t^2-1\cr}\right\} +\left\{\eqalign{g_1(t) &= t\cr g_2(t) &= 1}\right\}$$ +\nextexample +$$\eqalignno{ +\sigma^2&=E(x-\mu)^2&(12)\cr + &={1 \over n}\sum_{i=0}^n (x_i - \mu)^2&\cr + &=E(x^2)-\mu^2\cr}$$ +| +\produces +\abovedisplayskip = -\baselineskip +$$\eqalignno{ +\sigma^2&=E(x-\mu)^2&(12)\cr + &={1 \over n}\sum_{i=0}^n (x_i - \mu)^2&\cr + &=E(x^2)-\mu^2\cr}$$ +\nextexample +$$\leqalignno{ +\sigma^2&=E(x-\mu)^2&(6)\cr + &=E(x^2)-\mu^2&(7)\cr}$$ +| +\produces +\abovedisplayskip = -\baselineskip +$$\leqalignno{ +\sigma^2&=E(x-\mu)^2&(6)\cr + &=E(x^2)-\mu^2&(7)\cr}$$ +\nextexample +$$\eqalignno{ + &(x+a)^2 = x^2+2ax+a^2&(19)\cr + &(x+a)(x-a) = x^2-a^2\cr}$$ +% same effect as \displaylines but with an equation number +| +\dproduces +$$\eqalignno{ +&(x+a)^2 = x^2+2ax+a^2&(19)\cr +&(x+a)(x-a) = x^2-a^2\cr +}$$ +% same effect as \displaylines but with an equation number + +%\eix^^{displays//multiline} +%\endexample +%\enddesc +\eix^^{陈列公式//多行陈列公式} +\endexample +\enddesc + + +%========================================================================== +%\section {Fonts in math formulas} +\section {数学公式字体} + +%\begindesc +%^^{fonts} +%\xrdef{mathfonts} +%% +%\easy\ctsx cal {use calligraphic uppercase font} +%\ctsx mit {use math italic font} +%\ctsx oldstyle {use old style digit font} +%\explain +%These commands cause \TeX\ to typeset the following text in the +%specified font. You can only use them in \minref{math mode}. +%The |\mit| command is useful for producing slanted capital ^{Greek letters}. +%You can also use the commands given in +%\headcit{Selecting fonts}{selfont} to change fonts in math mode. +%\example +%${\cal XYZ} \quad +%{\mit AaBb\Gamma \Delta \Sigma} \quad +%{\oldstyle 0123456789}$ +%| +%\produces +%${\cal XYZ} \quad +%{\mit AaBb\Gamma \Delta \Sigma} \quad +%{\oldstyle 0123456789}$ +%\endexample +%\enddesc +\begindesc +^^{字体} +\xrdef{mathfonts} +% +\easy\ctsx cal {use calligraphic uppercase font} +\ctsx mit {use math italic font} +\ctsx oldstyle {use old style digit font} +\explain +这些命令让 \TeX\ 用指定的字体排版之后的文本。 +你只能在\minref{数学模式}中使用它们。 +|\mit| 命令可用于排印斜体大写^{希腊字母}。 +你还可以用\headcit{选择字体}{selfont}中的那些命令改变数学模式中的字体。 +\example +${\cal XYZ} \quad +{\mit AaBb\Gamma \Delta \Sigma} \quad +{\oldstyle 0123456789}$ +| +\produces +${\cal XYZ} \quad +{\mit AaBb\Gamma \Delta \Sigma} \quad +{\oldstyle 0123456789}$ +\endexample +\enddesc + +%^^{type styles} +%\begindesc +%\ctsx itfam {family for italic type} +%\ctsx bffam {family for boldface type} +%\ctsx slfam {family for slanted type} +%\ctsx ttfam {family for typewriter type} +%\explain +%These commands define type families \minrefs{family} for use in +%\minref{math mode}. Their principal use is in defining the +%|\it|, |\bf|, |\sl|, and |\tt| commands so that they work in math mode. +%\enddesc +^^{字体风格} +\begindesc +\ctsx itfam {family for italic type} +\ctsx bffam {family for boldface type} +\ctsx slfam {family for slanted type} +\ctsx ttfam {family for typewriter type} +\explain +这些命令定义几种用于\minref{数学模式}的字体族\minrefs{族}。 +它们主要用在 |\it|、|\bf|、|\sl| 和 |\tt| 命令的定义中,使这些命令能在数学模式中使用。 +\enddesc + +%\begindesc +%\cts fam {\param{number}} +%\explain +%When \TeX\ is in \minref{math mode}, it ordinarily typesets a character +%using the font family ^^{class} given in its \minref{mathcode}. +%^^{family//given by \b\tt\\fam\e} +%However, when \TeX\ is in math mode and encounters a character whose +%\minref{class} is $7$ (Variable), it typesets that character using +%the font \minref{family} given by the value of |\fam|, provided that the +%value of |\fam| is between $0$ and $15$. +%If the value of |\fam| isn't in that range, \TeX\ uses the family in +%the character's mathcode as in the ordinary case. +%\TeX\ sets |\fam| to $-1$ whenever it enters math mode. +%Outside of math mode, |\fam| has no effect. +\begindesc +\cts fam {\param{number}} +\explain +在\minref{数学模式}时,\TeX\ 通常用字符的\minref{数学码}指定的字体族排版该字符。 +^^{类}^^{族//用 \b\tt\\fam\e 给出} +但是,如果 \TeX\ 在数学模式中遇到第 $7$ \minref{类}(变量)字符, +它将用由 |\fam| 的值给出的字体\minref{族}排版该字符, +只要 |\fam| 的值在 $0$ 和 $15$ 之间。 +如果 |\fam| 的值不在该范围内, +\TeX\ 就像通常情形那样使用字符的数学码指定的字体族。 +\TeX\ 在进入数学模式时设定 |\fam| 为 $-1$。 +在数学模式之外,|\fam| 无任何效果。 + +%By assigning a value to +%|\fam| you can change the way that \TeX\ typesets ordinary +%characters such as variables. +%For instance, by setting |\fam| to |\ttfam|, you cause \TeX\ to typeset +%variables using a typewriter font. +%\PlainTeX\ defines |\tt| as a \minref{macro} that, among other things, +%sets |\fam| to |\ttfam|. +%\example +%\def\bf{\fam\bffam\tenbf} % As in plain TeX. +%| +%\endexample +%\enddesc +通过赋予 |\fam| 不同的值,你能让 \TeX\ 用不同方式排版普通字符,比如变量。 +举个例子,设定了 |\fam| 为 |\ttfam| ,你可以让 \TeX\ 用打字机字体排版变量。 +\PlainTeX\ 在定义 |\tt| \minref{宏}时,除了其他设定之外, +还设定 |\fam| 等于 |\ttfam|。 +\example +\def\bf{\fam\bffam\tenbf} % As in plain TeX. +| +\endexample +\enddesc + +%\begindesc +%\cts textfont {\<family>\param{fontname}} +%\cts scriptfont {\<family>\param{fontname}} +%\cts scriptscriptfont {\<family>\param{fontname}} +%\explain +%^^{text style} +%^^{script style} +%^^{scriptscript style} +%Each of these parameters specifies the font that \TeX\ is to use for +%typesetting the indicated \minref{style} in the indicated \minref{family}. +%These choices have no effect outside of \minref{math mode}. +%\example +%\scriptfont2 = \sevensy % As in plain TeX. +%| +%\endexample +%\enddesc +\begindesc +\cts textfont {\<family>\param{fontname}} +\cts scriptfont {\<family>\param{fontname}} +\cts scriptscriptfont {\<family>\param{fontname}} +\explain +^^{文本样式} +^^{标号样式} +^^{小标号样式} +这三个参数分别选择 \TeX\ 排版指定\minref{族}的指定\minref{样式}时所用的字体。 +这些选择在\minref{数学模式}之外无任何效果。 +\example +\scriptfont2 = \sevensy % As in plain TeX. +| +\endexample +\enddesc + +%\see ``Type styles'' (\xref{seltype}). +\see ``字体风格''(\xref{seltype})。 + + +%========================================================================== +%\section {Constructing math symbols} +\section {构造数学符号} + +%========================================================================== +%\subsection {Making delimiters bigger} +\subsection {增大定界符} + +%\begindesc +%\makecolumns 16/4: +%\easy\cts big {} +%\cts bigl {} +%\cts bigm {} +%\cts bigr {} +%\cts Big {} +%\cts Bigl {} +%\cts Bigm {} +%\cts Bigr {} +%\cts bigg {} +%\cts biggl {} +%\cts biggm {} +%\cts biggr {} +%\cts Bigg {} +%\cts Biggl {} +%\cts Biggm {} +%\cts Biggr {} +%\explain +%^^{delimiters//enlarging} +%These commands make \minref{delimiter}s bigger than their normal size. +%The commands in the four columns +%produce successively larger sizes. The difference between |\big|, +%|\bigl|, |\bigr|, and |bigm| has to do with the \minref{class} of the +%enlarged delimiter: +%\ulist\compact +%\li |\big| produces an ordinary symbol. +%\li |\bigl| produces an opening symbol. +%\li |\bigr| produces a closing symbol. +%\li |\bigm| produces a relation symbol. +%\endulist +%\noindent +%\TeX\ uses the class of a symbol in order to decide how much space to put +%around that symbol. +\begindesc +\makecolumns 16/4: +\easy\cts big {} +\cts bigl {} +\cts bigm {} +\cts bigr {} +\cts Big {} +\cts Bigl {} +\cts Bigm {} +\cts Bigr {} +\cts bigg {} +\cts biggl {} +\cts biggm {} +\cts biggr {} +\cts Bigg {} +\cts Biggl {} +\cts Biggm {} +\cts Biggr {} +\explain +^^{定界符//增大定界符} +这些命令让\minref{定界符}比它们的正常尺寸还大。 +这四栏中的命令生成依次增大的尺寸。|\big|、|\bigl|、|\bigr| +和 |\bigm| 的区别在于增大的定界符所属的\minref{类}: +\ulist\compact +\li |\big| 生成一个普通符号。 +\li |\bigl| 生成一个开符号。 +\li |\bigr| 生成一个闭符号。 +\li |\bigm| 生成一个关系符号。 +\endulist +\noindent +\TeX\ 从字符所属的类确定要在该字符两边留下多大的空格。 + +%These commands, unlike |\left| and |\right|, +%do \emph{not} define a group. + +%\example +%$$(x) \quad \bigl(x\bigr) \quad \Bigl(x\Bigr) \quad +% \biggl(x\biggr) \quad \Biggl(x\Biggr)\qquad +%[x] \quad \bigl[x\bigr] \quad \Bigl[x\Bigr] \quad +% \biggl[x\biggr] \quad \Biggl[x\Biggr]$$ +%| +%\dproduces +%$$(x) \quad \bigl(x\bigr) \quad \Bigl(x\Bigr) \quad +%\biggl(x\biggr) \quad \Biggl(x\Biggr)\qquad +%[x] \quad \bigl[x\bigr] \quad \Bigl[x\Bigr] \quad +%\biggl[x\biggr] \quad \Biggl[x\Biggr]$$ +%\endexample +%\enddesc +\example +$$(x) \quad \bigl(x\bigr) \quad \Bigl(x\Bigr) \quad + \biggl(x\biggr) \quad \Biggl(x\Biggr)\qquad +[x] \quad \bigl[x\bigr] \quad \Bigl[x\Bigr] \quad + \biggl[x\biggr] \quad \Biggl[x\Biggr]$$ +| +\dproduces +$$(x) \quad \bigl(x\bigr) \quad \Bigl(x\Bigr) \quad +\biggl(x\biggr) \quad \Biggl(x\Biggr)\qquad +[x] \quad \bigl[x\bigr] \quad \Bigl[x\Bigr] \quad +\biggl[x\biggr] \quad \Biggl[x\Biggr]$$ +\endexample +\enddesc + +%========================================================================== +%\subsection {Parts of large symbols} +\subsection {大符号的一部分} + +%\begindesc +%\cts downbracefill {} +%\cts upbracefill {} +%\explain +%These commands respectively produce upward-pointing +%and downward-pointing extensible ^{horizontal braces}. ^^{braces} +%\TeX\ will make the braces as wide as necessary. +%These commands +%are used in the definitions of ^|\overbrace| and ^|\underbrace| +%(\xref \overbrace). +%\example +%$$\hbox to 1in{\downbracefill} \quad +% \hbox to 1in{\upbracefill}$$ +%| +%\dproduces +%$$\hbox to 1in{\downbracefill} \quad +% \hbox to 1in{\upbracefill}$$ +%\endexample +%\enddesc +\begindesc +\cts downbracefill {} +\cts upbracefill {} +\explain +这两个命令分别排印朝上和朝下的可伸展^{水平花括号}。^^{花括号} +\TeX\ 将让花括号足够宽。 +这两个命令用于定义 ^|\overbrace| 和 ^|\underbrace|(\xref\overbrace )。 +\example +$$\hbox to 1in{\downbracefill} \quad + \hbox to 1in{\upbracefill}$$ +| +\dproduces +$$\hbox to 1in{\downbracefill} \quad + \hbox to 1in{\upbracefill}$$ +\endexample +\enddesc + +%\begindesc +%\cts arrowvert {} +%\cts Arrowvert {} +%\cts lmoustache {} +%\cts rmoustache {} +%\cts bracevert {} +%\explain +%These commands produce portions of certain large +%delimiters +%^^{delimiters//parts of} +%and can themselves be used as delimiters. +%They refer to characters in the ^|cmex10| math font. +%\example +%$$\cdots \Big\arrowvert \cdots \Big\Arrowvert \cdots +% \Big\lmoustache \cdots \Big\rmoustache \cdots +% \Big\bracevert \cdots$$ +%| +%\dproduces +%$$\cdots \Big\arrowvert \cdots \Big\Arrowvert \cdots +% \Big\lmoustache \cdots \Big\rmoustache \cdots +% \Big\bracevert \cdots$$ +%\endexample +%\enddesc +\begindesc +\cts arrowvert {} +\cts Arrowvert {} +\cts lmoustache {} +\cts rmoustache {} +\cts bracevert {} +\explain +这些命令排印某些大定界符的一部分, +^^{定界符//定界符的一部分} +把它们也用作定界符。 +它们取自 ^|cmex10| 数学字体中的字符。 +\example +$$\cdots \Big\arrowvert \cdots \Big\Arrowvert \cdots + \Big\lmoustache \cdots \Big\rmoustache \cdots + \Big\bracevert \cdots$$ +| +\dproduces +$$\cdots \Big\arrowvert \cdots \Big\Arrowvert \cdots + \Big\lmoustache \cdots \Big\rmoustache \cdots + \Big\bracevert \cdots$$ +\endexample +\enddesc + + +%========================================================================== +%\section {Aligning parts of a formula} +\section {对齐部分公式} + +%========================================================================== +%\subsection {Aligning accents} +\subsection {对齐数学重音} + +%\begindesc +%\bix^^{accents//aligning} +%\cts skew {\<number> \<argument$_1$> \<argument$_2$>} +%\explain +%This command shifts the accent \<argument$_1$> by +%\<number> \minref{mathematical unit}s to the right of its normal position +%with respect to \<argu\-ment$_2$>. +%The most common use of this command is for +%modifying the position of an accent that's over +%another accent. +%\example +%$$\skew 2\bar{\bar z}\quad\skew 3\tilde{\tilde y}\quad +% \skew 4\tilde{\hat x}$$ +%| +%\dproduces +%$$\skew 2\bar{\bar z}\quad\skew 3\tilde{\tilde y}\quad +% \skew 4\tilde{\hat x}$$ +%\endexample +%\enddesc +\begindesc +\bix^^{重音//对齐重音} +\cts skew {\<number> \<argument$_1$> \<argument$_2$>} +\explain +此命令将重音 \<argument$_1$> 相对 \<argu\-ment$_2$> +从它的正常位置往右移动 \<number> 个\minref{数学单位}。 +此命令常用于调整在其他重音之上的重音的位置。 +\example +$$\skew 2\bar{\bar z}\quad\skew 3\tilde{\tilde y}\quad + \skew 4\tilde{\hat x}$$ +| +\dproduces +$$\skew 2\bar{\bar z}\quad\skew 3\tilde{\tilde y}\quad + \skew 4\tilde{\hat x}$$ +\endexample +\enddesc + +%\begindesc +%\cts skewchar {\<font>\param{number}} +%\explain +%The |\skewchar| of a font +%is the character in the font whose kerns, +%as defined in the font's metrics file, determine the positions +%of math accents. That is, suppose that \TeX\ is applying a math accent +%to the character `|x|'. \TeX\ checks if the character pair +%`|x\skewchar|' has a kern; if so, it moves the accent by the amount of +%that kern. The complete algorithm that \TeX\ uses to position math +%accents (which involves many more things) is in \knuth{Appendix~G}. +\begindesc +\cts skewchar {\<font>\param{number}} +\explain +字体的 |\skewchar| 是字体中的某个字符, +它在字体度量文件中定义的紧排确定了数学重音的位置。 +也就是说,假设 \TeX\ 要给字符 `|x|' 加上数学重音, +则 \TeX\ 检查字符对 `|x\skewchar|' 是否有个紧排; +如果有,它就以该紧排的值移动该重音。 +\TeX\ 放置数学重音的完整算法(这涉及到很多事情)在\knuth{附录~G}中描述。 + +%If the value of |\skewchar| is not in the range $0$--$255$, +%\TeX\ takes the kern value to be zero. +如果 |\skewchar| 的值不在 $0$--$255$ 的范围内,\TeX\ 将紧排的值当作零。 + +%Note that \<font> is a control sequence +%that names a font, not a \<font\-name> that names font files. +%Beware: +%an assignment to |\skewchar| is \emph{not} undone at the end +%of a group. +%If you want to change |\skewchar| locally, you'll need to +%save and restore its original value explicitly. +%\enddesc +注意 \<font> 是一个控制序列,它是字体的名称,而不是字体文件的名称 \<font\-name>。 +小心:对 |\skewchar| 的赋值在编组结束时\emph{并不会}还原。 +如果你想局部改变|\skewchar|,你需要显式地保存和还原它的原始值。 +\enddesc + +%\begindesc +%\cts defaultskewchar {\param{number}} +%\explain +%When \TeX\ reads the metrics file +%^^{metrics file//default skew character in} +%for a font in response to a +%^|\font| command, it sets the font's ^|\skewchar| to +%|\default!-skewchar|. +%If the value of |\default!-skewchar| is +%not in the range $0$--$255$, \TeX\ does not assign any +%skew characters by default. +%\PlainTeX\ sets |\defaultskewchar| to $-1$, and it's usually best +%to leave it there. +%\margin{Misleading example deleted.} +%\eix^^{accents//aligning} +%\enddesc +\begindesc +\cts defaultskewchar {\param{number}} +\explain +在执行 ^|\font| 命令读取字体的度量文件时, +^^{度量文件//其中的默认斜字符} +\TeX\ 设定该字体的 ^|\skewchar| 等于 |\default!-skewchar|。 +如果 |\default!-skewchar| 的值不在 $0$--$255$ 的范围内, +\TeX\ 默认就不设定 |\skewchar| 的值。 +\PlainTeX\ 设定 |\defaultskewchar| 等于 $-1$,一般不需要改动它。 +\margin{Misleading example deleted.} +\eix^^{重音//对齐重音} +\enddesc + +%========================================================================== +%\subsection {Aligning material vertically} +\subsection {竖直对齐素材} + +%\begindesc +%\cts vcenter {\rqbraces{\<vertical mode material>}} +%\ctsbasic {\\vcenter to \<dimen> \rqbraces{\<vertical mode material>}}{} +%\ctsbasic {\\vcenter spread \<dimen> \rqbraces{\<vertical mode material>}}{} +%\explain +%Every math formula has an invisible +%``^{axis}'' that \TeX\ treats as a kind of +%horizontal centering line for that formula. +%For instance, the axis of a formula consisting of a +%fraction is at the center of the fraction bar. +%The |\vcenter| command tells \TeX\ to place the \<vertical mode material> +%in a \minref{vbox} and to center the vbox +%with respect to the axis of the formula it is currently constructing. +\begindesc +\cts vcenter {\rqbraces{\<vertical mode material>}} +\ctsbasic {\\vcenter to \<dimen> \rqbraces{\<vertical mode material>}}{} +\ctsbasic {\\vcenter spread \<dimen> \rqbraces{\<vertical mode material>}}{} +\explain +每个数学公式都有一个不可见的``^{轴线}'',\TeX\ 将它作为该公式的水平中心线。 +举个例子,由分式组成的公式的轴线就在分数线的中心。 +|\vcenter| 命令让 \TeX\ 将 \<vertical mode material> 放入\minref{竖直盒子}中, +并将该竖直盒子与当前公式的轴线居中对齐。 + +%The first form of the command +%centers the material as given. The second and third +%forms expand or shrink the material vertically as in the |\vbox| command +%(\xref \vbox). +此命令的第一种形式如上所述居中放置素材。 +后两种形式竖直扩展或收缩素材,如同 |\vbox| 命令(\xref\vbox )。 + +%\example +%$${n \choose k} \buildrel \rm def \over \equiv \> +%\vcenter{\hsize 1.5 in \noindent the number of +%combinations of $n$ things taken $k$ at a time}$$ +%| +%\dproduces +%$${n \choose k} \buildrel \rm def \over \equiv \> +%\vcenter{\hsize 1.5 in \noindent the number of +%combinations of $n$ things taken $k$ at a time}$$ +%\endexample +%\enddesc +\example +$${n \choose k} \buildrel \rm def \over \equiv \> +\vcenter{\hsize 1.5 in \noindent the number of +combinations of $n$ things taken $k$ at a time}$$ +| +\dproduces +$${n \choose k} \buildrel \rm def \over \equiv \> +\vcenter{\hsize 1.5 in \noindent the number of +combinations of $n$ things taken $k$ at a time}$$ +\endexample +\enddesc + + +%========================================================================== +%\section {Producing spaces} +\section {生成间隔} + +%========================================================================== +%\subsection {Fixed-width math spaces} +\subsection {固定宽度数学间隔} + +%\begindesc +%\bix^^{space//in math formulas} +%\ctspecial ! \ctsxrdef{@shriek} +%\ctspecial , \ctsxrdef{@comma} +%\ctspecial > \ctsxrdef{@greater} +%\ctspecial ; \ctsxrdef{@semi} +%\explain +%These commands produce various amounts of ^{extra space} in formulas. They +%are defined in terms of \minref{mathematical unit}s, so \TeX\ adjusts +%the amount of space according to the current \minref{style}. +%\ulist +%\li |\!!| produces a negative thin space, i.e., it reduces the space +%between its neighboring subformulas by the amount of a thin space. +%\li |\,| produces a thin space. +%\li |\>| produces a medium space. +%\li |\;| produces a thick space. +%\endulist +%\example +%$$00\quad0\!!0\quad0\,0\quad0\>0\quad0\;0\quad +%{\scriptstyle 00\quad0\!!0\quad0\,0\quad0\>0\quad0\;0}$$ +%| +%\dproduces +%$$00\quad0\!0\quad0\,0\quad0\>0\quad0\;0\quad +%{\scriptstyle 00\quad0\!0\quad0\,0\quad0\>0\quad0\;0}$$ +%\endexample +%\enddesc +\begindesc +\bix^^{间隔//数学公式中的间隔} +\ctspecial ! \ctsxrdef{@shriek} +\ctspecial , \ctsxrdef{@comma} +\ctspecial > \ctsxrdef{@greater} +\ctspecial ; \ctsxrdef{@semi} +\explain +这些命令在公式中生成各种大小的^{额外间隔}。 +它们使用\minref{数学单位}来定义, +因此 \TeX\ 会根据当前\minref{样式}调整间隔的大小。 +\ulist +\li |\!!| 生成负的细小间隔,即它让相邻子公式的间隔减去该细小间隔的大小。 +\li |\,| 生成细小间隔。 +\li |\>| 生成中等间隔。 +\li |\;| 生成较大间隔。 +\endulist +\example +$$00\quad0\!!0\quad0\,0\quad0\>0\quad0\;0\quad +{\scriptstyle 00\quad0\!!0\quad0\,0\quad0\>0\quad0\;0}$$ +| +\dproduces +$$00\quad0\!0\quad0\,0\quad0\>0\quad0\;0\quad +{\scriptstyle 00\quad0\!0\quad0\,0\quad0\>0\quad0\;0}$$ +\endexample +\enddesc + +%\begindesc +%\cts thinmuskip {\param{muglue}} +%\cts medmuskip {\param{muglue}} +%\cts thickmuskip {\param{muglue}} +%\explain +%These parameters define thin, medium, and thick spaces in +%math mode. +%\example +%$00\quad0\mskip\thinmuskip0\quad0\mskip\medmuskip0 +% \quad0\mskip\thickmuskip0$ +%| +%\produces +%$00\quad0\mskip\thinmuskip0\quad0\mskip\medmuskip0 +% \quad0\mskip\thickmuskip0$ +%\endexample +%\enddesc +\begindesc +\cts thinmuskip {\param{muglue}} +\cts medmuskip {\param{muglue}} +\cts thickmuskip {\param{muglue}} +\explain +这些参数定义了数学模式中细小、中等和较大间隔的大小。 +\example +$00\quad0\mskip\thinmuskip0\quad0\mskip\medmuskip0 + \quad0\mskip\thickmuskip0$ +| +\produces +$00\quad0\mskip\thinmuskip0\quad0\mskip\medmuskip0 + \quad0\mskip\thickmuskip0$ +\endexample +\enddesc + +%\begindesc +%\cts jot {\param{dimen}} +%\explain +%This parameter defines a distance that is equal to three points (unless +%you change it). +%The |\jot| is a convenient unit of measure for opening up \hbox{math displays}. +%\enddesc +\begindesc +\cts jot {\param{dimen}} +\explain +此参数定义为三个点的距离(除非你改变了它)。 +在用 |\openup| 命令分开陈列公式各行时,|\jot| 是一个实用的度量单位。 +\footnote{译注:下面的例子为译者所加。请参阅 |\openup| 命令(\xref\openup )。} +\example +$$\vbox{\halign{$\hfil#\hfil$\cr x\cr y\cr}}$$ +$$\openup2\jot\vbox{\halign{$\hfil#\hfil$\cr x\cr y\cr}}$$ +| +\produces +$$\vbox{\halign{$\hfil#\hfil$\cr x\cr y\cr}}$$ +$$\openup2\jot\vbox{\halign{$\hfil#\hfil$\cr x\cr y\cr}}$$ +\endexample +\enddesc + +%========================================================================== +%\subsection {Variable-width math spaces} +\subsection {可变宽度数学间隔} + +%\begindesc +%\cts mkern {\<mudimen>} +%\explain +%^^{kerns//in math formulas} +%This command +%produces a \minref{kern}, i.e., blank space, of width \<mudimen>. +%The kern is measured +%in \minref{mathematical unit}s, which vary according to the style. +%Aside from its unit of measurement, this command behaves just like +%|\kern| (\xref \kern) does in horizontal mode. +\begindesc +\cts mkern {\<mudimen>} +\explain +^^{紧排//数学公式中的紧排} +此命令生成一个宽度为 \<mudimen> 的\minref{紧排},即空白间隔。 +该紧排用\minref{数学单位}表示,因此在不同样式中有不同的尺寸。 +除了使用数学单位外,此命令与水平模式的|\kern|(\xref\kern )的表现类似。 + +%\example +%$0\mkern13mu 0 \qquad {\scriptscriptstyle 0 \mkern13mu 0}$ +%| +%\produces +%$0\mkern13mu 0 \qquad {\scriptscriptstyle 0 \mkern13mu 0}$ +%\endexample +%\enddesc +\example +$0\mkern13mu 0 \qquad {\scriptscriptstyle 0 \mkern13mu 0}$ +| +\produces +$0\mkern13mu 0 \qquad {\scriptscriptstyle 0 \mkern13mu 0}$ +\endexample +\enddesc + +%\begindesc +%\cts mskip {\<mudimen$_1$> {\bt plus} \<mudimen$_2$> {\bt minus} +% \<mudimen$_3$>} +%\explain +%^^{glue} +%This command produces horizontal \minref{glue} +%that has natural width \<mu\-dimen$_1$>, stretch \<mudimen$_2$>, +%and shrink \<mudimen$_3$>. +%The glue is measured in \minref{mathematical unit}s, which vary according +%to the style. Aside from its units of measurement, this command behaves +%just like |\hskip| (\xref \hskip). +\begindesc +\cts mskip {\<mudimen$_1$> {\bt plus} \<mudimen$_2$> {\bt minus} + \<mudimen$_3$>} +\explain +^^{粘连} +此命令生成一个水平\minref{粘连},它的自然宽度为 \<mu\-dimen$_1$>, +伸长量为 \<mudimen$_2$>,收缩量为 \<mudimen$_3$>。 +该粘连用\minref{数学单位}表示,因此将随着样式的变化而变化。 +除了使用数学单位外,此命令与 |\hskip|(\xref\hskip )的表现类似。 + +%\example +%$0\mskip 13mu 0 \quad {\scriptscriptstyle 0 \mskip 13mu 0}$ +%| +%\produces +%$0\mskip 13mu 0 \quad {\scriptscriptstyle 0 \mskip 13mu 0}$ +%\endexample +%\enddesc +\example +$0\mskip 13mu 0 \quad {\scriptscriptstyle 0 \mskip 13mu 0}$ +| +\produces +$0\mskip 13mu 0 \quad {\scriptscriptstyle 0 \mskip 13mu 0}$ +\endexample +\enddesc + +%\begindesc +%\cts nonscript {} +%\explain +%When \TeX\ is currently typesetting in script or scriptscript +%\minref{style} and encounters this command +%immediately in front of glue or a kern, +%it cancels the glue or kern. +%|\nonscript| has no effect in the other styles. +\begindesc +\cts nonscript {} +\explain +在排版标号或小标号\minref{样式}时,如果 \TeX\ 在粘连或紧排跟前遇到此命令, +它就丢弃该粘连或紧排。|\nonscript| 在其他样式中无任何效果。 + +%This command provides a way of ``tightening up'' the spacing in +%script and scriptscript styles, which generally are set in smaller type. +%It is of little use outside of macro definitions. +%\example +%\def\ab{a\nonscript\; b} +%$\ab^{\ab}$ +%| +%\produces +%\def\ab{a\nonscript\; b} +%$\ab^{\ab}$ +%\endexample +%\enddesc +此命令提供一种``收紧''标号和小标号样式中的间隔的方法; +通常用小号字体排版这两个样式。在宏定义之外的地方,此命令很少用到。 +\example +\def\ab{a\nonscript\; b} +$\ab^{\ab}$ +| +\produces +\def\ab{a\nonscript\; b} +$\ab^{\ab}$ +\endexample +\enddesc + +%\see |\kern| (\xref\kern), |\hskip| (\xref\hskip). +%\eix^^{space//in math formulas} +\see |\kern|(\xref\kern )和 |\hskip|(\xref\hskip )。 +\eix^^{间隔//数学公式中的间隔} + +%========================================================================== +%\subsection {Spacing parameters for displays} +\subsection {陈列公式的间隔参数} + +%\begindesc +%\bix^^{displays//spacing parameters for} +%\cts displaywidth {\param{dimen}} +%\explain +%This parameter specifies the maximum width that +%\TeX\ allows for a math display. If \TeX\ cannot fit the display +%into a space of this width, it sets an overfull \minref{hbox} +%and complains. +%\TeX\ sets the value of |\displaywidth| when it encounters the `|$$|' +%that starts the display. This initial value is +%|\hsize| (\xref \hsize) unless it's overridden by changes to the +%paragraph shape. +%See \knuth{pages~188--189} for a more detailed explanation of this parameter. +%\enddesc +\begindesc +\bix^^{陈列公式//陈列公式的间隔参数} +\cts displaywidth {\param{dimen}} +\explain +此参数指定 \TeX\ 对陈列公式所允许的最大宽度。 +如果 \TeX\ 无法将陈列公式放入这样宽的空间中, +它将生成一个过满的\minref{水平盒子}并给出警告。 +\TeX\ 在遇到 `|$$|' 开始陈列公式时就设定 |\displaywidth| 的值。 +它的初始值为 |\hsize|(\xref\hsize ),除非段落形状改变了。 +见\knuth{第~188--189~页}中对此参数的更仔细的说明。 +\enddesc + +%\begindesc +%\cts displayindent {\param{dimen}} +%\explain +%This parameter specifies the space by which \TeX\ indents a +%math display. +%\TeX\ sets the value of |\displayindent| when it encounters the `|$$|' +%that starts the display. Usually this initial value is zero, +%but if the paragraph shape indicates that the display should +%be shifted by an amount $s$, +%\TeX\ will set |\displayindent| to $s$. +%See \knuth{pages~188--189} for a more detailed explanation of this parameter. +%\enddesc +\begindesc +\cts displayindent {\param{dimen}} +\explain +此参数指定 \TeX\ 对陈列公式的缩进量。 +\TeX\ 在遇到 `|$$|' 开始陈列公式时就设定 |\displayindent| 的值。 +通常它的初始值为零,但如果段落形状表明该陈列公式需要移动距离 $s$, +\TeX\ 就设定 |\displayindent| 等于 $s$。 +见\knuth{第~188--189~页}中对此参数的更仔细的介绍。 +\enddesc + +%\begindesc +%\cts predisplaysize {\param{dimen}} +%\explain +%\TeX\ sets this parameter to the width of the line preceding +%a math display. +%\TeX\ uses |\predisplaysize| to determine whether or not +%the display starts to +%the left of where the previous line ends, i.e., whether or not it visually +%overlaps the previous line. +%If there is overlap, it uses the |\abovedisplayskip| and +%|\belowdisplayskip| glue in setting the display; +%otherwise it uses the |\abovedisplay!-shortskip| and +%|\belowdisplay!-shortskip| glue. +%See \knuth{pages~188--189} for a more detailed explanation of this parameter. +%\enddesc +\begindesc +\cts predisplaysize {\param{dimen}} +\explain +\TeX\ 设定此参数等于陈列公式之前的文本行的宽度。 +\TeX\ 利用 |\predisplaysize| 确定是否让陈列公式的起始点位于前一行结尾处的左边, +即它在外观上是否可能与前一行重叠。如果会有重叠, +\TeX\ 在排版陈列公式时使用|\abovedisplayskip| 和 |\belowdisplayskip| 粘连; +否则 \TeX\ 使用 |\abovedisplay!-shortskip| 和 |\belowdisplay!-shortskip| 粘连。 +见\knuth{第~188--189~页}中对此参数的更仔细的介绍。 +\enddesc + +%\begindesc +%\cts abovedisplayskip {\param{glue}} +%\explain +%This parameter specifies the amount of vertical glue that +%\TeX\ inserts before a display when the display starts to +%the left of where the previous line ends, i.e., when it visually +%overlaps the previous line. +%\PlainTeX\ sets |\abovedisplayskip| to |12pt plus3pt minus9pt|. +%See \knuth{pages~188--189} for a more detailed explanation of this parameter. +%\enddesc +\begindesc +\cts abovedisplayskip {\param{glue}} +\explain +此命令指定当陈列公式的起始点位于前一行结尾处的左边时, +即它在外观上可能与前一行有重叠时, +\TeX\ 在陈列公式之前插入的竖直粘连的大小。 +\PlainTeX\ 设定 |\abovedisplayskip| 等于 |12pt plus3pt minus9pt|。 +见\knuth{第~188--189~页}中对此参数的更仔细的介绍。 +\enddesc + +%\begindesc +%\cts belowdisplayskip {\param{glue}} +%\explain +%This parameter specifies the amount of vertical glue that +%\TeX\ inserts after a display when the display starts to +%the left of where the previous line ends, i.e., when it visually +%overlaps the previous line. +%\PlainTeX\ sets |\belowdisplay!-skip| to |12pt plus3pt minus9pt|. +%See \knuth{pages~188--189} for a more detailed explanation of this parameter. +%\enddesc +\begindesc +\cts belowdisplayskip {\param{glue}} +\explain +此命令指定当陈列公式的起始点位于前一行结尾处的左边时, +即它在外观上可能与前一行有重叠时, +\TeX\ 在陈列公式之后插入的竖直粘连的大小。 +\PlainTeX\ 设定 |\belowdisplay!-skip| 等于 |12pt plus3pt minus9pt|。 +见\knuth{第~188--189~页}中对此参数的更仔细的介绍。 +\enddesc + +%\begindesc +%\cts abovedisplayshortskip {\param{glue}} +%\explain +%This parameter specifies the amount of vertical glue that +%\TeX\ inserts before a math display +%when the display starts to +%the right of where the previous line ends, i.e., when it does not visually +%overlap the previous line. +%\PlainTeX\ sets |\abovedisplay!-shortskip| to |0pt plus3pt|. +%See \knuth{pages~188--189} for a more detailed explanation of this parameter. +%\enddesc +\begindesc +\cts abovedisplayshortskip {\param{glue}} +\explain +此命令指定当陈列公式的起始点位于前一行结尾处的右边时, +即它在外观上不会与前一行有重叠时, +\TeX\ 在陈列公式之前插入的竖直粘连的大小。 +\PlainTeX\ 设定 |\abovedisplay!-shortskip| 等于 |0pt plus3pt|。 +见\knuth{第~188--189~页}中对此参数的更仔细的介绍。 +\enddesc + +%\begindesc +%\cts belowdisplayshortskip {\param{glue}} +%\explain +%This parameter specifies the amount of vertical glue that +%\TeX\ inserts after a display +%when the display starts to +%the right of where the previous line ends, i.e., when it does not visually +%overlap the previous line. +%\PlainTeX\ sets |\belowdisplay!-shortskip| to |7pt plus3pt minus4pt|. +%See \knuth{pages~188--189} for a more detailed explanation of this parameter. +\begindesc +\cts belowdisplayshortskip {\param{glue}} +\explain +此命令指定当陈列公式的起始点位于前一行结尾处的右边时, +即它在外观上不会与前一行有重叠时, +\TeX\ 在陈列公式之后插入的竖直粘连的大小。 +\PlainTeX\ 设定 |\belowdisplay!-shortskip| 等于 |7pt plus3pt minus4pt|。 +见\knuth{第~188--189~页}中对此参数的更仔细的介绍。 + +%\eix^^{displays//spacing parameters for} +%\enddesc +\eix^^{陈列公式//陈列公式的间隔参数} +\enddesc + + +%========================================================================== +\subsection {其他的数学间隔参数} + +%\begindesc +%\cts mathsurround {\param{dimen}} +%\explain +%This parameter specifies the amount of space that \TeX\ +%inserts before and after a math formula in text mode (i.e., a formula +%surrounded by single |$|'s). See \knuth{page~162} for further details about +%its behavior. +%\PlainTeX\ leaves |\mathsurround| at |0pt|. +%\enddesc +\begindesc +\cts mathsurround {\param{dimen}} +\explain +此参数指定 \TeX\ 在文内数学公式(即放在两个|$|之间的公式)两边插入的间隔的大小。 +见\knuth{第~162~页}对此行为的进一步解释。 +\PlainTeX\ 设定 |\mathsurround| 为 |0pt|。 +\enddesc + +%\begindesc +%\cts nulldelimiterspace {\param{dimen}} +%\explain +%^^{delimiters//null, space for} +%This parameter specifies the width of the +%space produced by a null \minref{delimiter}. +%\PlainTeX\ sets |\nulldelimiterspace| to |1.2pt|. +%\enddesc +\begindesc +\cts nulldelimiterspace {\param{dimen}} +\explain +^^{定界符//空定界符的间隔} +此参数指定空\minref{定界符}生成的间隔的大小。 +\PlainTeX\ 设定 |\null!-delimiterspace| 等于 |1.2pt|。 +\enddesc + +%\begindesc +%\cts scriptspace {\param{dimen}} +%\explain +%This parameter specifies the amount of space that \TeX\ +%inserts before and after a subscript or superscript. +%The |\nonscript| command (\xref\nonscript) ^^|\nonscript| +%after a subscript or superscript cancels this space. +%\PlainTeX\ sets |\script!-space| to |0.5pt|. +%\enddesc +\begindesc +\cts scriptspace {\param{dimen}} +\explain +此参数指定 \TeX\ 在上标或下标前后插入的间隔的大小。 +上标或下标之后的 |\nonscript| 命令(\xref\nonscript )^^|\nonscript| +可以取消此间隔。 +\PlainTeX\ 设定 |\script!-space| 等于 |0.5pt|。 +\enddesc + + +%========================================================================== +%\section {Categorizing math constructs} +\section {分类数学结构} + +%\begindesc +%\makecolumns 7/2: +%\cts mathord {} +%\cts mathop {} +%\cts mathbin {} +%\cts mathrel {} +%\cts mathopen {} +%\cts mathclose {} +%\cts mathpunct {} +%\explain +%These commands tell \TeX\ to treat the construct that follows as belonging +%to a particular ^{class} (see \knuth{page~154} for the definition +%of the classes). They are listed here in the order of the class numbers, +%from $0$ to $6$. Their primary +%effect is to adjust the spacing around the construct +%to be whatever it is for the specified class. +\begindesc +\makecolumns 7/2: +\cts mathord {} +\cts mathop {} +\cts mathbin {} +\cts mathrel {} +\cts mathopen {} +\cts mathclose {} +\cts mathpunct {} +\explain +这些命令让 \TeX\ 把随后的结构归入指定的^{类}(见\knuth{第~154~页}对类的定义)。 +它们按照类编号的大小顺序排列,从 $0$ 到 $6$。 +它们主要用于按照指定的类调整该结构两边的间隔大小。 +%\example +%$\mathop{\rm minmax}\limits_{t \in A \cup B}\,t$ +%% By treating minmax as a math operator, we can get TeX to +%% put something underneath it. +%| +%\produces +%$\mathop{\rm minmax}\limits_{t \in A \cup B}\,t$ +%\endexample +%\enddesc +\example +$\mathop{\rm minmax}\limits_{t \in A \cup B}\,t$ +% By treating minmax as a math operator, we can get TeX to +% put something underneath it. +| +\produces +$\mathop{\rm minmax}\limits_{t \in A \cup B}\,t$ +\endexample +\enddesc + +%\begindesc +%\cts mathinner {} +%\explain +%This command tells \TeX\ to treat the construct that follows +%as an ``inner formula'', e.g., a fraction, for spacing purposes. +%It resembles the class commands given just above. +%\enddesc +\begindesc +\cts mathinner {} +\explain +此命令让 \TeX\ 将随后的结构视为``内部公式'',比如分式,并据此调整间隔。 +它与上面刚提到的类命令类似。 +\enddesc + +%========================================================================== +%\section {Special actions for math formulas} +\section {特殊处理数学公式} + +%\begindesc +%\cts everymath {\param{token list}} +%\cts everydisplay {\param{token list}} +%\explain +%^^{displays//actions for every display} +%These parameters specify \minref{token} lists that \TeX\ inserts +%at the start of every text math or display math formula, respectively. +%You can +%take special actions at the start of each math formula by +%assigning those actions to |\everymath| or +%|\everydisplay|. Don't forget that if you want both kinds of formulas to +%be affected, you need to set \emph{both} parameters. +%\example +%\everydisplay={\heartsuit\quad} +%\everymath = {\clubsuit} +%$3$ is greater than $2$ for large values of $3$. +%$$4>3$$ +%| +%\produces +%\everydisplay={\heartsuit\quad} +%\everymath = {\clubsuit} +%$3$ is greater than $2$ for large values of $3$. +%$$4>3$$ +%\endexample +%\enddesc +\begindesc +\cts everymath {\param{token list}} +\cts everydisplay {\param{token list}} +\explain +^^{陈列公式//作用到每个陈列公式} +这两个命令分别指定 \TeX\ 在每个文内公式或陈列公式开头插入的\minref{记号}列。 +你可以利用 |\everymath| 或 |\everydisplay| 在每个数学公式开头作特殊处理。 +你务必清楚,若你需要同时处理两种公式,你必须\emph{同时}设定这两个参数。 +\example +\everydisplay={\heartsuit\quad} +\everymath = {\clubsuit} +$3$ is greater than $2$ for large values of $3$. +$$4>3$$ +| +\produces +\everydisplay={\heartsuit\quad} +\everymath = {\clubsuit} +$3$ is greater than $2$ for large values of $3$. +$$4>3$$ +\endexample +\enddesc + +%\enddescriptions +%\eix^^{math} +%\endchapter +%\byebye +\enddescriptions +\eix^^{数学} + +\ifoldeplain\else\ifcompletebook\else +\vskip4em{\sectionfonts\leftline{本章索引}} +\readindexfile{i} +\fi\fi + +\endchapter +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/modes.tex b/Master/texmf-dist/doc/plain/impatient-cn/modes.tex new file mode 100644 index 00000000000..98be8c68950 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/modes.tex @@ -0,0 +1,2595 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\chapter {Commands for \linebreak horizontal and \linebreak vertical modes} +\chapter {水平和竖直模式命令} + +\chapterdef{hvmodes} + +%This section covers commands that have corresponding or identical +%forms for both horizontal and vertical modes. +%These commands provide boxes, spaces, rules, leaders, +%and alignments. +%For an explanation of the conventions used in this section, +%see \headcit{Descriptions of the commands}{cmddesc}. +这一章介绍水平和竖直模式下具有对应或一致形式的命令。这些命令提供盒子、间隔、标线、指引线以及阵列。有关本章中使用的惯例的说明,参见\headcit{命令的描述}{cmddesc}。 + +\begindescriptions + +%========================================================================== +%\section {Producing space} +\section {产生间隔} + +%========================================================================== + +%\subsection {Fixed-width horizontal space} +\subsection {固定宽度水平间隔} + +%\begindesc +%\bix^^{space//producing} +%\bix^^{horizontal space} +%\cts thinspace {} +%\explain +%This command produces a positive \minref{kern} +%whose width is one-sixth of an em +%(\xref{dimdefs}) +%i.e., it causes \TeX\ to move its position right by that amount. +%It is useful +%when you have a nested quotation, for example, +%and you want to separate the levels of quotes. +%\TeX\ won't break a line at +%a |\thinspace|.\minrefs{line break} +\begindesc +\bix^^{间隔//产生间隔} +\bix^^{水平间隔} +\cts thinspace {} +\explain +该命令产生一个正的\minref{紧排},它的宽度是 1/6 em(\xref{dimdefs}),也就是说,它使得 \TeX\ 向右移动一个相应的距离。例如,当你需要嵌套引用,并希望将不同层次的引号分开时,它便非常有用。\TeX\ 不会在 |\thinspace| 处断行。\minrefs{line break} + +\example +``\thinspace`一个引用。'\thinspace''\par +24,\thinspace 29--31,\thinspace 45,\thinspace 102 +| +\produces +%``\thinspace`A quote.'\thinspace''\par +``\thinspace`一个引用。'\thinspace''\par +24,\thinspace 29--31,\thinspace 45,\thinspace 102 +\endexample +\enddesc + +\begindesc +\cts negthinspace {} +\explain +%This command +%produces a negative kern whose width is one-sixth of an em +%(\xref{dimdefs}), +%i.e., it causes \TeX\ to move its position left by that amount. +%It is useful for bringing together characters that are a little too +%far apart. +%\TeX\ won't break a line at a |\negthinspace|.\minrefs{line break} +该命令产生一个负的\minref{紧排},它的宽度是 1/6 em(\xref{dimdefs}),也就是说,它使得 \TeX\ 向左移动一个相应的距离。当需要将两个间隔稍远的字符靠近一些时便非常有用。\TeX\ 不会在 |\negthinspace| 处断行。\minrefs{line break} + +\example +The horror, the horror\negthinspace, the horror of it all!! +| +\produces +The horror, the horror\negthinspace, the horror of it all! +\endexample +\enddesc + +\begindesc +\cts enspace {} +\explain +%This command produces a \minref{kern} whose width is one ^{en} +%(half of an em, see \xrefpg{dimdefs}). +%\TeX\ won't break a line +%at an |\enspace| unless it's followed by glue. +%In a bulleted list, the bullets are usually separated from the following +%text by an |\enspace|. +该命令产生一个宽度为 1 ^{en} 的\minref{紧排}(1 em 的一半,参见 \xrefpg{dimdefs})。\TeX\ 不会在 |\enspace| 处断行,除非紧接其后的是粘连。在符号列表中,符号与其后的文字通常由 |\enspace| 来分隔。 + +\example +引理 1.\enspace 这里有一只白兔。 +| +\produces +%Lemma 1.\enspace There exists a white rabbit. +引理 1.\enspace 这里有一只白兔。 +\endexample +% the enspace here follows the \proclaim convention (Knuth p. 355). +\enddesc + +\begindesc +\easy\cts enskip {} +\cts quad {} +\cts qquad {} +\explain +^^{en} +%Each of these commands +%produces a glob of horizontal \minref{glue} +%that can neither stretch nor shrink. +%\TeX\ can break a line \minrefs{line break} at such glue. +%The width of these glues (which are relative to the current font) +%are as follows for |cmr10|, the default \plainTeX\ font: +这里的每个命令都产生一个既不能伸展也不能收缩的水平\minref{粘连}。\TeX\ 不能在这些粘连处断行。对于 \plainTeX\ 的默认字体 |cmr10| 来说,这些粘连的宽度(与当前字体有关)如下: +\medskip + +\def\distance#1{\hbox{\strut $\rightarrow$\vrule\hskip #1\vrule$\leftarrow$}} + +%{\def\l#1{\hfil$#1$\thinspace em} +%\tabskip 3pc \halign{#&#&\hfil#\hfil\cr +%{\it Command}&{\it Space}&{\it Illustration}\cr +%\noalign{\vskip 4pt} +%|\enskip|&\l{\frac 1/2}&\distance{.5em}\cr +%|\quad|&\l1&\distance{1em}\cr +%|\qquad|&\l2&\distance{2em}\cr +%}} +%\example +%en\enskip skip; quad\quad skip; qquad\qquad skip +%| +%\produces +%en\enskip skip; quad\quad skip; qquad\qquad skip +%\endexample +%\eix^^{horizontal space} +%\enddesc +{\def\l#1{\hfil$#1$\thinspace em} +\tabskip 3pc \halign{#&#&\hfil#\hfil\cr +{\it 命令}&{\it 间距}&{\it 图示}\cr +\noalign{\vskip 4pt} +|\enskip|&\l{\frac 1/2}&\distance{.5em}\cr +|\quad|&\l1&\distance{1em}\cr +|\qquad|&\l2&\distance{2em}\cr +}} +\example +en\enskip skip; quad\quad skip; qquad\qquad skip +| +\produces +en\enskip skip; quad\quad skip; qquad\qquad skip +\endexample +\eix^^{水平间隔} +\enddesc + +%========================================================================== +%\subsection {Fixed-length vertical space} +\subsection {固定长度竖直间隔} + +%\begindesc +%\bix^^{vertical space} +%\easy\cts smallskip {} +%\cts medskip {} +%\cts bigskip {} +%\explain +%These commands produce successively larger +%amounts of vertical space: +\begindesc +\bix^^{竖直间隔} +\easy\cts smallskip {} +\cts medskip {} +\cts bigskip {} +\explain +这些命令可以产生连续较大的竖直间隔: +\display{{\def\bar{\kern 2pt\hrule width 5pc} +\def\lbl#1{\hbox to 5pc{\hfil #1skip\hfil}} +\leavevmode +\vtop{\lbl{small}\bar\smallskip\bar}\quad +\vtop{\lbl{med}\bar\medskip\bar}\quad\vtop{\lbl{big}\bar\bigskip\bar}}} +\noindent +%|\smallskip| skips by $3$ points and can stretch or +%shrink by $1$ point. |\med!-skip| is equivalent to two |\smallskip|s +%and |\bigskip| is equivalent to two |\medskip|s. +|\smallskip| 产生 $3$ 点的竖直间隔,并可以伸展或收缩 1 点。 +|\med!-skip| 相当于两个 |\smallskip|,而 |\bigskip| 相当于两个 |\medskip|。 + +%These commands end a paragraph since they are inherently vertical. +%The skips that they produce +%are in addition to the normal interparagraph skip. +由于这些命令具有固有的竖直特性,因此它们的出现宣告一个段落的结束。由此产生的间距需要再加上正常的段落间距。 +\example +Hop \smallskip skip \medskip and \bigskip jump. +| +\produces +Hop \smallskip skip \medskip and \bigskip jump. +\endexample +\enddesc + +\begindesc +\cts smallskipamount {\param{glue}} +\cts medskipamount {\param{glue}} +\cts bigskipamount {\param{glue}} +\explain +%These parameters specify the amounts of glue produced by +%the |\small!-skip|, |\med!-skip|, and |\big!-skip| commands. +%By changing these parameters you change the effect of the commands. +%The default values (for \plainTeX) +%correspond to a quarter of a linespace, half a linespace, +%and a full linespace. +%We recommend that you maintain this ratio by changing +%these values whenever +%you change |\baselineskip| (\xref\baselineskip). +%^^|\baselineskip//and {\tt\\smallskipamount}, etc.| +%\eix^^{vertical space} +这些参数用于确定由 |\small!-skip|、|\med!-skip| 和 |\big!-skip| 命令产生的粘连的量。 +通过更改这些参数,你可以改变命令的效果。(对于 \plainTeX )它们相应的默认值是 1/4 、1/2 以及 1 行距。 +我们建议你保持这个比例,无论何时,你可以通过修改 |\baselineskip|(\xref\baselineskip )来修改参数值。 +^^|\baselineskip//和 {\tt\\smallskipamount} 等| +\eix^^{竖直间隔} + +\enddesc + +%========================================================================== +%\subsection {Variable-size space} +\subsection {可变尺寸间隔} + +%\begindesc +%\easy\cts hskip {\<dimen$_1$> {\bt plus} \<dimen$_2$> {\bt minus} \<dimen$_3$>} +%\cts vskip {\<dimen$_1$> {\bt plus} \<dimen$_2$> {\bt minus} \<dimen$_3$>} +%^^{vertical skip}^^{vertical glue} +%^^{horizontal skip}^^{horizontal glue} +%\bix^^{horizontal space} +%\bix^^{vertical space} +%\explain +%These commands produce horizontal and vertical glue respectively. +%In the simplest and most common case when only \<dimen$_1$> is present, +%|\hskip| skips to the right by \<dimen$_1$> +%and |\vskip| skips down the page by \<dimen$_1$>. +%More generally, these commands +%produce \minref{glue} whose natural size is +%\<dimen$_1$>, whose stretch is \<dimen$_2$>, and whose shrink is \<dimen$_3$>. +%Either the |plus| \<dimen$_2$>, the |minus |\<dimen$_3$>, +%or both can be omitted. +%If both are present, the |plus| must come before the |minus|. +%An omitted value +%is taken to be zero. Any of the \<dimen>s can be negative. +\begindesc +\easy\cts hskip {\<dimen$_1$> {\bt plus} \<dimen$_2$> {\bt minus} \<dimen$_3$>} +\cts vskip {\<dimen$_1$> {\bt plus} \<dimen$_2$> {\bt minus} \<dimen$_3$>} +^^{竖直间距}^^{竖直粘连} +^^{水平间距}^^{水平粘连} +\bix^^{水平间隔} +\bix^^{竖直间隔} +\explain +这些命令可以分别产生水平的和竖直的粘连。 +在最简单以及最常见的情况下,即当只有 \<dimen$_1$> 存在时, +|\hskip| 向右移动 \<dimen$_1$>,而 |\vskip| 向页面下方移动 \<dimen$_1$>。 +在一般情况下,这些命令产生一个\minref{粘连},其自然尺寸为 \<dimen$_1$>, +可伸长量为 \<dimen$_2$>,可收缩量为 \<dimen$_3$>。 +命令中的 |plus| \<dimen$_2$> 或 |minus |\<dimen$_3$>,或两者都可以省略。 +如果两者都需要,则 |plus| 必须出现在 |minus| 之前。 +被省略的变量取值为零。任何 \<dimen> 都可以取负值。 + +%You can use |\hskip| in math mode, but you can't use |mu| units +%\seeconcept{mathematical unit} +%for any of the dimensions. If you want |mu| units, use |\mskip| +%(\xref\mskip) instead. +在数学模式下,你可以使用 |\hskip|, +但不能使用 |mu|\seeconcept{数学单位}作为任何尺寸的单位。 +如果你希望使用 |mu| 作为单位,可以使用 |\mskip|(\xref\mskip )代替之。 + +\example +\hbox to 2in{one\hskip 0pt plus .5in two} +| +\produces +\hbox to 2in{one\hskip 0pt plus 2in two} + +\doruler{\8\8}2{in} +\nextexample +\hbox to 2in{Help me!! I can't fit +{\hskip 0pt minus 2in} inside this box!!} +| +\produces +\hbox to 2in{Help me! I can't fit +{\hskip 0pt minus 2in} inside this box!} + +\doruler{\8\8}2{in} +\nextexample +\vbox to 4pc{\offinterlineskip% 仅为显示 \vskip 的效果。 + \hbox{一}\vskip 0pc plus 1pc \hbox{二} + \vskip .5pc \hbox{三}} +| +\produces +\smallskip +\vbox to 4pc{\offinterlineskip% Just show effects of \vskip. +% \hbox{one}\vskip 0pc plus 1pc \hbox{two} +% \vskip .5pc \hbox{three}} + \hbox{一}\vskip 0pc plus 1pc \hbox{二} + \vskip .5pc \hbox{三}} +\endexample +\enddesc + +\begindesc +\cts hglue {\<glue>} +\cts vglue {\<glue>} +^^{竖直粘连} +^^{水平粘连} +\explain +%The |\hglue| command produces horizontal \minref{glue} that won't disappear at +%a line break; the |\vglue| command +%produces vertical \minref{glue} that won't disappear at a page break. +%In other respects these commands are just like |\hskip| and |\vskip|. +%You can use |\vglue| to produce blank space at the top of a page, +%e.g., above a title on the first page of a document, but +%^|\topglue| (next) is usually better for this purpose. +|\hglue| 命令生成水平的\minref{粘连},它不会在断行处消失;|\vglue| 命令生成竖直的\minref{粘连},它不会在分页处消失。除此以外,这些命令与 |\hskip| 和 |\vskip| 相似。你可以使用 |\vglue| 在文档第一页的标题上部等页面顶部产生空白间隔,但就此目的而言,随后的 ^|\topglue| 通常是更好的选择。 +\enddesc + +\begindesc +\cts topglue {\<glue>} +\explain +\margin{Command added; recent addition to \TeX} +%This command\footnote{|\topglue| was added to \TeX\ in version 3.0, +%later than the other enhancements introduced by ^{\newTeX} +%(\xref{newtex}). It is first described in the \emph{eighteenth\/} +%edition of \texbook.} causes the space from the top of the page to the +%top of the first box on the page to be \<glue> precisely. +%The top of the page is considered to be at the baseline of an +%imaginary line of text just above the top line of the page. +%More precisely, it's a distance |\topskip| above the origin as given by +%|\hoffset| and |\voffset|. +\margin{加入的命令;新近加入到 \TeX} +该命令 +\footnote{|\topglue| 是在 \TeX\ 3.0 中引入的, +比其它由^{\newTeX}(\xref{newtex})引入的增强特性稍晚。 +在 \texbook 的 \emph{18th\/} 版中第一次得到描述。} +可以精确地产生从页面顶部至该页上第一个盒子顶部的间隔。 +可以认为页面顶部位于页面第一行之上的一行无形文字的基线处。 +更加准确地,它在 |\hoffset| 和 |\voffset| 确定的原点之上,且间距等于 |\topskip|。 + +%This command is useful because \TeX\ ordinarily adjusts the glue +%produced by |\topskip| in a complex way. By using |\topglue| you can +%control the position of the first box on the page without worrying about +%those adjustments. +由于 \TeX\ 通常以非常复杂的方式调整由 |\topskip| 产生的粘连,所以这个命令是非常有用的。 +通过使用 |\topglue|,你能够控制页面上第一个盒子的位置,而不必担心那些复杂的调整。 + +\enddesc + +\begindesc +\cts kern {\<dimen>} +\explain +%The effect of this command depends on the mode that \TeX\ is in when +%it encounters it: +该命令产生的效果取决于 \TeX\ 遇到它时所处的模式: +\ulist + +%\li In a horizontal mode, \TeX\ moves its position to the right (for a positive +%kern) or to the left (for a negative kern). +\li 在水平模式下,\TeX\ 向右(正的紧排)或向左(负的紧排)移动。 + +%\li In a vertical mode, \TeX\ moves its position down the page (for a positive +%kern) or up the page (for a negative kern). +\li 在竖直模式下,\TeX\ 向页面下方(正的紧排)或页面上方(负的紧排)移动。 + +\endulist +\noindent +%Thus a positive kern produces empty space while a negative kern +%causes \TeX\ to back up over something that it's already produced. +%This notion of a kern ^^{kerns} +%is different from the notion of a kern in some computerized +%typesetting systems---in \TeX, positive kerns push two letters \emph{apart} +%instead of bringing them closer together. +因此,正的紧排产生空白的间隔,而负的紧排使得 \TeX\ 倒退到已经存在的东西上。 +在 \TeX 中,正的紧排将两个字母\emph{分开},而不是使它们更近一些。 +^{紧排}的这一设计与一些计算化排版系统是不同的。 + +%A kern is similar to +%\minref{glue}, except that (a)~a kern can neither stretch nor shrink, +%and (b)~\TeX\ will only break a line or a page at a kern if the kern +%is followed by glue and is not part of a math formula. +%If \TeX\ finds a kern at the +%end of a line or a page, it discards the kern. +%If you want to get the effect of a kern that never disappears, +%use ^|\hglue| or ^|\vglue|. +紧排与\minref{粘连}相似,不同的是 (a)~紧排不能被伸展或收缩; +(b)~如果紧排后紧接粘连,并且不是数学公式的一部分时,\TeX\ 不能在紧排处断行或分页。 +如果 \TeX\ 发现紧排位于一行或一页的结尾,该紧排将会被忽略。 +如果你希望得到不会消失的紧排的效果,使用 ^|\hglue| 或 ^|\vglue|。 + +%You can use |\kern| in math mode, but you can't use |mu| units +%\seeconcept{mathematical unit} +%for \<dimen>. If you want |mu| units, use |\mkern| +%(\xref\mkern) instead. +%^^{line breaks//kerns at} +%^^{page breaks//kerns at} +你可以在数学模式中使用 |\kern|,但你不能使用 |mu| 作为 \<dimen> 的单位\seeconcept{数学单位}。 +如果你希望使用 |mu| 作为单位,可以使用 |\mkern| (\xref\mkern )代替之。 +^^{断行//断行处的紧排} +^^{分页//分页处的紧排} + +\example +\centerline{$\Downarrow$}\kern 3pt % 竖直的紧排 +\centerline{$\Longrightarrow$\kern 6pt % 水平的紧排 + {\bf 留意我的警示!!}\kern 6pt % 另一水平的紧排 + $\Longleftarrow$} +\kern 3pt % 另一竖直的紧排 +\centerline{$\Uparrow$} +| +\produces +\centerline{$\Downarrow$}\kern 3pt % a vertical kern +\centerline{$\Longrightarrow$\kern 6pt % a horizontal kern +% {\bf Heed my warning!}\kern 6pt % another horizontal kern + {\bf 留意我的警示!}\kern 6pt % another horizontal kern + $\Longleftarrow$} +\kern 3pt % another vertical kern +\centerline{$\Uparrow$} +\endexample +\enddesc + +%\begindesc +%\makecolumns 4/2: +%\cts hfil {} +%\cts hfill {} +%\cts vfil {} +%\cts vfill {} +%\explain +%\bix^^{glue//infinitely stretchable} +%These commands produce infinitely stretchable horizontal +%and vertical glue that +%overwhelms any finite stretch that may be present. +%|\hfil| and |\hfill| produce horizontal glue, while +%|\vfil| and |\vfill| produce vertical glue. +\begindesc +\makecolumns 4/2: +\cts hfil {} +\cts hfill {} +\cts vfil {} +\cts vfill {} +\explain +\bix^^{粘连//可无限伸展的粘连} +这些命令产生可无限伸展的水平或竖直的粘连,它们将取代任何存在的有限伸展。|\hfil| 和 |\hfill| 产生水平的粘连,而 |\vfil| 和 |\vfill| 产生竖直的粘连。 + +%|\hfill| is infinitely larger than |\hfil|. +%If both |\hfill| and |\hfil| appear in the same \minref{box}, +%the |\hfill| will consume all the available extra space +%and the |\hfil| will be effectively ignored. +%|\hfill| can in turn be overwhelmed by |\hskip 0pt plus 1filll|. +%The glue produced by +%|\hfil| and |\hfill| never shrinks. +%|\hfill| 无限地大于 |\hfil|。如果 |\hfill| 和 |\hfil| 出现在一同一个\minref{盒子}里,|\hfill| 将占据所有可以获得的额外间隔,而 |\hfil| 的效应将被忽略。而 |\hfill| 可以被 |\hskip 0pt plus 1filll| 取代。由 |\hfil| 和 |\hfill| 产生的粘连不能被压缩。 + +%The behavior of |\vfil| and |\vfill| is analogous. +|\vfil| 和 |\vfill| 有着类似的行为。 + +\example +\hbox to 2in{左\hfil 中 \hfil 右} +| +\produces +%\hbox to 2in{Left\hfil Middle \hfil Right} +\hbox to 2in{左\hfil 中 \hfil 右} + +\doruler{\8\8}2{in} +\nextexample +\hbox to 2in{左\hfil 中 \hfill 右} +| +\produces +%\hbox to 2in{Left\hfil Middle \hfill Right} +\hbox to 2in{左\hfil 中 \hfill 右} + +\doruler{\8\8}2{in} +\nextexample +\leftline{% +\vbox to 4pc{% + \hbox{上}\vfil\hbox{中}\vfil \hbox{下}}\quad +\vbox to 4pc{% + \hbox{上}\vfil\hbox{中}\vfill\hbox{下}}} +| +\produces +\smallskip +\leftline{% +\vbox to 4pc{% + %\hbox{Top}\vfil\hbox{Middle}\vfil \hbox{Bottom}}\quad + \hbox{上}\vfil\hbox{中}\vfil \hbox{下}}\quad +\vbox to 4pc{% + %\hbox{Top}\vfil\hbox{Middle}\vfill\hbox{Bottom}}} + \hbox{上}\vfil\hbox{中}\vfill\hbox{下}}} +\endexample + +%\eix^^{glue//infinitely stretchable} +%\enddesc +\eix^^{粘连//可无限伸展的粘连} +\enddesc + +\begindesc +\cts hss {} +\cts vss {} +\explain +%These commands produce horizontal and vertical glue +%that is both infinitely stretchable and +%infinitely shrinkable. The glue can shrink +%to a negative distance, producing the effect of backspacing along a line +%(for |\hss|) or moving back up a page (for |\vss|). +这些命令产生水平和竖直的可无限伸展和收缩的粘连。 +粘连可以收缩至负的距离,产生的效果是% +(对于 |\hss| 而言)沿一行向左移动或(对于 |\vss| 而言)向页面顶部移动。 + +\example +\line{正文文本\hfil\hbox to 0pt{页边空白\hss}} +% `页边空白\hss' 收缩到宽度为零的水平盒子中。 +| +\produces +%\line{text\hfil\hbox to 0pt{margin\hss}} +\line{正文文本\hfil\hbox to 0pt{页边空白\hss}} +\nextexample +\vbox to 1pc{\hrule width 6pc % Top of box. + \hbox{1} \vskip 1pc\hbox to 2pc{\hfil 2} + % \vss 消除了由 \vskip 产生的额外间距。 + \vss \hbox to 3pc{\hfil 3} + \hrule width 6pc}% 盒子的底部 +| +\produces +\medskip +\vbox to 1pc{\hrule width 6pc % top of box + \hbox{1} \vskip 1pc\hbox to 2pc{\hfil 2} + \vss \hbox to 3pc{\hfil 3} + \hrule width 6pc}% bottom of box +\vskip 2.5pc +\endexample +\enddesc + +%\begindesc +%\cts hfilneg {} +%\cts vfilneg {} +%\explain +%^^{glue//negative} +%These commands cancel the effect of a preceding |\hfil| +%or |\vfil|. While |\hfil| and |\vfil| +%produce infinitely stretchable positive \minref{glue}, |\hfilneg| +%and |\vfilneg| produce infinitely stretchable negative glue. +%(Thus, $n$ |\hfilneg|s cancel $n$ ^|\hfil|s, and similarly for +%|\vfilneg|.) +%The main use of |\hfilneg| and |\vfilneg| +%is to counteract the effect of an |\hfil| or |\vfil| +%inserted by a \minref{macro}. +\begindesc +\cts hfilneg {} +\cts vfilneg {} +\explain +^^{粘连//负粘连} +这些命令可以消除其前接的 |\hfil| 或 |\vfil| 产生的效果。当 |\hfil| 和 |\vfil| 产生正的无限可伸展的粘连时,|\hfilneg| 和 |\vfilneg| 产生负的无限可伸展粘连。(因此,$n$ |\hfilneg| 消除 $n$ ^|\hfil| 产生的效果,对于 |\vfilneg| 也是相似的。)|\hfilneg| 和 |\vfilneg| 主要的用途是抵消由\minref{宏} 引入的 |\hfil| 或 |\vfil| 产生的效果。 + +%|\hfilneg| and |\vfilneg| have +%the curious property that if they are the only infinitely stretchable +%glue in a box, they produce exactly the same effect as |\hfil| +%and |\vfil|. +如果它们是一个盒子中仅有的可无限伸展的粘连,|\hfilneg| 和 |\vfilneg| 则具有奇异的特性,即它们产生与 |\hfil| 和 |\vfil| 完全一致的效果。 + +\example +\leftline{\hfil 位于右端\hfilneg} +% 消除了 \leftline 在其参数右侧产生的 \hfil。 +| +\produces +%\leftline{\hfil on the right \hfilneg} +\leftline{\hfil 位于右端 \hfilneg} +% Cancel the \hfil that \leftline produces to the right +% of its argument. +% +\nextexample +\def\a{\hbox to 1pc{\hfil 2}\vfil} +\vbox to 4pc{\hbox{1} \vfil \a + \vfilneg \hbox to 2pc{\hfil 3}} +| +\produces +\smallskip +\def\a{\hbox to 1pc{\hfil 2}\vfil} +\vbox to 4pc{\hbox{1} \vfil \a + \vfilneg \hbox to 2pc{\hfil 3}} +\endexample\enddesc + +%{\emergencystretch=2em +%\see |\hbadness| and |\vbadness| (\xref \vbadness), +%|\hfuzz| and |\vfuzz| (\xref \vfuzz), +%\conceptcit{leaders}.\par} +%\eix^^{space//producing} +%\eix^^{horizontal space} +%\eix^^{vertical space} +\see |\hbadness| 和 |\vbadness|(\xref \vbadness ), +|\hfuzz| 和 |\vfuzz|(\xref \vfuzz ),及\conceptcit{指引线}。 +\eix^^{间隔//产生间隔} +\eix^^{水平间隔} +\eix^^{竖直间隔} + +%========================================================================== +%\section {Manipulating boxes} +\section {操作盒子} + +%========================================================================== +%\subsection {Constructing hboxes and vboxes} +\subsection {构造 hbox 和 vbox} + +%\begindesc +%\bix^^{box commands} +%^^{hboxes//constructing with \b\tt\\hbox\e} +\begindesc +\bix^^{盒子命令} +^^{水平盒子//用 \b\tt\\hbox\e 构造} +% +\cts hbox {\rqbraces{\<horizontal mode material>}} +\aux\cts hbox {{\bt to} \<dimen> \rqbraces{\<horizontal mode material>}} +\aux\cts hbox {{\bt spread} \<dimen> \rqbraces{\<horizontal mode material>}} +\explain +%This command produces an hbox +%(horizontal \minref{box}) containing \<horizontal mode material>. +%The braces around \<horizontal mode material> define a group. +%\TeX\ doesn't break the \<horizontal mode material> into lines, +%since it's in restricted horizontal mode when it's assembling the box. +%\TeX\ won't change the size of the box once it's been produced. +该命令产生一个 hbox(水平\minref{盒子})以容纳 \<horizontal mode material>。 +\<horizontal mode material> 两侧的大括号定义一个编组。 +\TeX\ 不会对 \<horizontal mode material> 断行, +因为当其组装盒子时它处于受限水平模式下。一旦盒子生成后,\TeX\ 不会改变其大小。 + +%|\hbox| is often useful when you want to keep some text all on one line. +%If your use of |\hbox| prevents \TeX\ from breaking lines in an acceptable +%way, \TeX\ will complain about an overfull hbox. +当你希望将一些文字全部放在一行上时,|\hbox| 是有用的。 +如果你所用的 |\hbox| 使得 \TeX\ 不能以一种可以接受的方式断行时, +\TeX\ 会给出 hbox 过满的警告。 + +%The width of the hbox depends on the arguments to |\hbox|: +%\ulist\compact +%\li If you specify only \<horizontal mode material>, +%the hbox will have its natural \minref{width}. +%\li If you specify |to| \<dimen>, the width of the hbox will be \<dimen>. +%\li If you specify |spread| \<dimen>, the width of the hbox will be +%its natural width plus \<dimen>, i.e., the hbox will be spread out by +%\<dimen>. +%\endulist +hbox 的宽度取决于 |\hbox| 的参数: +\ulist\compact +\li 如果你只设定了 \<horizontal mode material>,hbox 将具有参数本身的\minref{宽度}。 +\li 如果你设定了 |to| \<dimen>,则 hbox 的宽度将是 \<dimen>。 +\li 如果你设定了 |spread| \<dimen>,则 hbox 的宽度将是参数本身的宽度再加上 \<dimen>,也就是说,hbox 将伸展 \<dimen>。 +\endulist + +%The ^|\hfil| command (\xref\hfil) is useful for filling out an +%hbox with empty space when the material in the box isn't as wide as +%the width of the box. +当盒子中内容的宽度没有盒子宽,需要使用空白间隔来填充 hbox 时,^|\hfil| 命令(\xref\hfil )是非常有用的。 +\example +\hbox{ugly suburban sprawl} +\hbox to 2in{ugly \hfil suburban \hfil sprawl} +\hbox spread 1in {ugly \hfil suburban \hfil sprawl} +% 在上面两行中,如果去掉 \hfil,将会得到 `underfull hbox' 警告。 +| +\produces +\hbox{ugly suburban sprawl} +\hbox to 2in{ugly \hfil suburban \hfil sprawl} +\hbox spread 1in {ugly \hfil suburban \hfil sprawl} +% Without \hfil in the two preceding lines, +% you'd get `underfull hbox'es. + +\doruler{\8\8\8}3{in} +\endexample +\enddesc + +%\begindesc +%\cts vtop {\<vertical mode material>} +%\aux\cts vtop {{\bt to} \<dimen> \rqbraces{\<vertical mode material>}} +%\aux\cts vtop {{\bt spread} \<dimen> \rqbraces{\<vertical mode material>}} +%\cts vbox {\rqbraces{\<vertical mode material>}} +%\aux\cts vbox {{\bt to} \<dimen> \rqbraces{\<vertical mode material>}} +%\aux\cts vbox {{\bt spread} \<dimen> \rqbraces{\<vertical mode material>}} +%\explain +%^^{hbox//constructing with \b\tt\\hbox\e} +%These commands +%produce a \minref{vbox} (vertical \minref{box}) +%containing \<vertical mode material>. +%The braces around \<vertical mode material> define a group. +%\TeX\ is in internal vertical mode when it's assembling the box. +%\TeX\ won't change the size of the box once it's been produced. +\begindesc +\cts vtop {\<vertical mode material>} +\aux\cts vtop {{\bt to} \<dimen> \rqbraces{\<vertical mode material>}} +\aux\cts vtop {{\bt spread} \<dimen> \rqbraces{\<vertical mode material>}} +\cts vbox {\rqbraces{\<vertical mode material>}} +\aux\cts vbox {{\bt to} \<dimen> \rqbraces{\<vertical mode material>}} +\aux\cts vbox {{\bt spread} \<dimen> \rqbraces{\<vertical mode material>}} +\explain +^^{水平盒子//用 \b\tt\\hbox\e 构造} +这些命令产生一个 \minref{vbox}(竖直\minref{盒子})以容纳 \<vertical mode material>。 +\<vertical mode material> 两侧的大括号定义一个编组。 +当 \TeX\ 组装盒子时它处于内部竖直模式下。一旦盒子生成后,\TeX\ 不会改变其大小。 + +%The difference between |\vtop| and |\vbox| lies in where \TeX\ puts +%the reference point of the constructed vbox. +%Ordinarily, the reference point gotten from |\vtop| tends to be at or near +%the top of the constructed vbox, +%while +%the reference point gotten from |\vbox| tends to be at or near +%the bottom of the constructed vbox. +%Thus a row of vboxes all constructed with |\vtop| +%will tend to have their tops nearly in a line, +%while a row of vboxes all constructed with |\vbox| +%will tend to have their bottoms nearly in a line. +|\vtop| 和 |\vbox| 之间的不同点在于 \TeX\ 放置已构成的 vbox 的基准点的位置。 +通常情况下,由 |\vtop| 获得的基准点位于或接近于已构成的 vbox 的顶部; +而 |\vbox| 获得的基准点位于或接近于已构成的 vbox 的底部。 +因此,一行全部由 |\vtop| 构成的 vbox,其顶部将会近似在一条线上; +相应地,一行全部由 |\vbox| 构成的 vbox,其底部将会近似在一条线上。 + +%|\vtop| and |\vbox| are often useful +%when you want to keep some text together on a single page. +%(For this purpose, it usually doesn't matter which command you use.) +%If your use of these commands +%prevents \TeX\ from breaking pages in an acceptable +%way, \TeX\ will complain that it's found an overfull or underfull vbox while +%|\output| is active. +当你希望将一些文字放在单独的一页上时,|\vtop| 和 |\vbox| 是有用的。% +(为了这个目的,它通常不在乎你使用的命令。)% +如果你使用这些命令使得 \TeX\ 不能以一种可以接受的方式分页时, +\TeX\ 会在 |\output| 处于活动的情况下,给出 vbox 过满或不足的警告。 + +%The height of a vbox depends on +%the arguments to |\vtop| or |\vbox|. +%For |\vbox|, \TeX\ determines the height as follows: +%\ulist\compact +%\li If you specify only \<vertical mode material>, +%the vbox will have its natural height. +%\li If you specify |to| \<dimen>, +%the height of the vbox will be \<dimen>. +%\li If you specify |spread| \<dimen>, the height of the vbox will be +%its natural height plus \<dimen>, i.e., +%the height of the vbox will be stretched vertically by \<dimen>. +%\endulist +%\noindent +%For |\vtop|, +%\TeX\ constructs the box using its rules for |\vbox| and then +%apportions the vertical extent between the height and the depth as +%described below. +vbox 的高度取决于 |\vtop| 或 |\vbox| 的参数。对于 |\vbox|,\TeX\ 采用如下方法确定其高度: +\ulist\compact +\li 如果你只设定 \<vertical mode material>,vbox 将具有参数本身的高度。 +\li 如果你设定 |to| \<dimen>,vbox 的高度将是 \<dimen>。 +\li 如果你设定了 |spread| \<dimen>,则 vbox 的高度将是参数本身的高度再加上 \<dimen>, +也就是说,vbox 将在竖直方向上伸展 \<dimen>。 +\endulist +\noindent +对于 |\vtop|,\TeX\ 采用 |\vbox| 一样的规则来构造盒子, +然后以下面描述的方法在高度和深度之间分配竖直方向上的扩展。 + +%Ordinarily, the width of a constructed vbox is the width of the widest +%item inside it.\footnote +%{More precisely, it's the distance from the reference point to the rightmost +%edge of the constructed vbox. Therefore, +%if you move any of the items right using ^|\moveright| or +%^|\moveleft| (with a negative distance), +%the constructed vbox might be wider.} +%The rules for apportioning the vertical extent between the +%height and the depth are more complicated: +%\ulist +%\li For |\vtop|, +%the height is the height of its first item, if that item is a box or rule. +%Otherwise the height is zero. The depth is whatever vertical +%extent remains after the height is subtracted. +%\li For |\vbox|, +%the depth is the depth of its last item, if that item is a box or rule. +%Otherwise the depth is zero. The height is whatever vertical +%extent remains after the depth is subtracted.% +%\footnote{In fact, there's a further complication. +%Suppose that after the depth has been determined +%using the two rules just given, the depth turns out to be greater than +%^|\boxmaxdepth|. +%Then the depth is reduced to |\boxmaxdepth| and the height is adjusted +%accordingly.} +%\endulist +通常,构造的 vbox 的宽度是其内部最宽项目的宽度。 +\footnote{更准确地说,是从基准点至构造的 vbox 最右侧之间的距离。 +因此,如果你使用 ^|\moveright| 或(负数距离的)^|\moveleft| 向右移动任何项目, +那么构造的 vbox 则可能更宽。} +在高度与深度间分配竖直扩展的规则更加复杂: +\ulist +\li 对于 |\vtop|,如果第一个项目是一个盒子或标线,则其高度是其第一个项目的高度。 +否则,其高度是零。深度是减去高度后的竖直扩展。 +\li 对于 |\vbox|,如果最后一个项目是一个盒子或标线,则其深度是其最后一个项目的深度。 +否则浓度是零。高度是减去深度后的竖直扩展。 +\footnote{实际上,规则可以更加复杂。假定在深度确定后,使用给出的两条规则, +则深度将会大于 ^|\boxmaxdepth|。 随后,深度将被缩小至 |\boxmaxdepth|,高度也相应地被调整。} +\endulist + +%The |\vfil| command (\xref\vfil) is useful for filling out a vbox +%^^|\vfil//filling a vbox| +%with empty space when the material in the box isn't as tall as +%the vertical extent of the box. +当盒子中内容的高度没有盒子竖直伸展高, +需要使用空白间隔来填充 vbox ^^|\vfil//填充竖直盒子|时, +^|\vfil| 命令(\xref\vfil )是非常有用的。 +\example +\hbox{\hsize = 10pc \raggedright\parindent = 1em +\vtop{在这个例子中,我们将看到如何使用 vbox 产生双栏的效果。 +每个 vbox 都包含两个段落,除了设置为左对齐以外均依照 \TeX +通常的规则进行排版。\par +这实际上并不是获得真正双栏的最好的方法,因为两栏} +\hskip 2pc +\vtop{\noindent +并不对称,而且我们无法自动选择第一栏在何处断开, +甚至不能确定第一栏的最后一行。\par +然而,将行文放在 vbox 中是一个将文本放在页面上 +你希望的位置上的有用的技巧。 +}} +| +\produces +\hbox{\hsize = 10pc \raggedright\parindent = 1em +%\vtop{In this example, we see how to use vboxes to +%produce the effect of double columns. Each vbox +%contains two paragraphs, typeset according to \TeX's +%usual rules except that it's ragged right.\par +%This isn't really the best way to get true double +%columns because the columns} +%\hskip 2pc +%\vtop{\noindent +%aren't balanced and we haven't done anything to choose +%the column break automatically or even to fix up the +%last line of the first column.\par +%However, the technique of putting running text into a +%vbox is very useful for placing that text where you +%want it on the page.}} +\vtop{在这个例子中,我们将看到如何使用 vbox 产生双栏的效果。 +每个 vbox 都包含两个段落,除了设置为左对齐以外均依照 \TeX +通常的规则进行排版。\par +这实际上并不是获得真正双栏的最好的方法,因为两栏} +\hskip 2pc +\vtop{\noindent +并不对称,而且我们无法自动选择第一栏在何处断开, +甚至不能确定第一栏的最后一行。\par +然而,将行文放在 vbox 中是一个将文本放在页面上 +你希望的位置上的有用的技巧。 +}} +\nextexample +\hbox{\hsize = 1in \raggedright\parindent = 0pt +\vtop to .75in{\hrule 这个盒子的深度是 .75in。 \vfil\hrule} +\qquad +\vtop{\hrule 这个盒子具体其本身的深度。 \vfil\hrule} +\qquad +\vtop spread .2in{\hrule 这个盒子的深度比其自身的深度多 .2in。\vfil\hrule}} +| +\produces +\hbox{\hsize = 1in \raggedright\parindent=0pt +%\vtop to .75in{\hrule This box is .75in deep. \vfil\hrule} +\vtop to .75in{\hrule 这个盒子的深度是 .75in。 \vfil\hrule} +\qquad +%\vtop{\hrule This box is at its natural depth. \vfil\hrule} +\vtop{\hrule 这个盒子具体其本身的深度。 \vfil\hrule} +\qquad +%\vtop spread .2in{\hrule This box is .2in deeper than +% its natural depth.\vfil\hrule}} +\vtop spread .2in{\hrule 这个盒子的深度比其自身的深度多 .2in。\vfil\hrule}} +\nextexample +% 显示 \vbox 是如何底部对齐,而非顶部对齐的。 +\hbox{\hsize = 1in \raggedright +\vbox to .5in{\hrule 这个盒子的深度是 .5in。\vfil\hrule} +\qquad +\vbox to .75in{\hrule 这个盒子的深度是 .75in。\vfil\hrule}} +| +\produces +\hbox{\hsize = 1in \raggedright +%\vbox to .5in{\hrule This box is .5in deep.\vfil\hrule} +\vbox to .5in{\hrule 这个盒子的深度是 .5in。\vfil\hrule} +\qquad +%\vbox to .75in{\hrule This box is .75in deep.\vfil\hrule}} +\vbox to .75in{\hrule 这个盒子的深度是 .75in。\vfil\hrule}} +\vskip 16pt % to avoid running into the next command description +\endexample +\enddesc + +\begindesc +%\margin{Two commands interchanged here.} +\margin{可交换的两个命令} +\cts boxmaxdepth {\param{dimen}} +\explain +%This parameter contains a dimension $D$. +%\TeX\ will not construct a box whose depth exceeds $D$. +%If you produce a box whose depth $d$ would exceed $D$, +%\TeX\ will transfer the +%excess depth to the height of the box, effectively moving the +%\minref{reference point} of the box down by $d-D$. +%If you set |\boxmaxdepth| to zero, \TeX\ will line up a row of vboxes +%so that their bottom boundaries all lie on the same horizontal line. +%\PlainTeX\ sets |\boxmaxdepth| to |\maxdimen| \ctsref{\maxdimen}, +%so |\boxmaxdepth| won't affect your boxes unless you change it. +这个参数包含的是一个尺寸 $D$。如果盒子的深度超过 $D$,\TeX\ 将不会构造这个盒子。 +如果你生成一个盒子,其深度 $d$ 大于 $D$,\TeX\ 将超出的深度传递给盒子的高度, +即高效地将盒子的\minref{基准点}向下移动 $d-D$。如果你将 |\boxmaxdepth| 设为零, +\TeX\ 会将盒子向上排一列,以便它们的底线都位于同一个水平线上。 +\PlainTeX\ 将 |\boxmaxdepth| 设为 |\maxdimen|\ctsref{\maxdimen}, +因此,|\boxmaxdepth| 不会影响你的盒子,除非你有意改动它。 +\enddesc + +\begindesc +\cts underbar {\<argument>} +\explain +%This command puts \<argument> into an \minref{hbox} +%and underlines it without regard to anything that protrudes below the +%\minref{baseline} of the box. +这个命令将 \<argument> 放入到一个 \minref{hbox},并在其下划线,而不考虑任何突出到盒子的\minref{基线}以下的东西。 +\example +\underbar{为什么不学习 \TeX?} +| +\produces +%\underbar{为什么不学习 \TeX?} +\underbar{Why not learn \TeX?} +\endexample +\enddesc + +\begindesc +\cts everyhbox {\param{token list}} +\cts everyvbox {\param{token list}} +\explain +%These parameters contain token lists that \TeX\ expands at the start of +%every \minref{hbox} or \minref{vbox} that it constructs. +%Any items resulting from the expansion then become +%the beginning of the list of items for the box. +%By default these token lists are empty. +这些参数包含的是记号列表。\TeX\ 会在开始构造每个 \minref{hbox} 或 \minref{vbox} 时对其进行扩展。来自于扩展的任何项目随后成为盒子的项目列表的开始。这些记号列表默认是空的。 +\enddesc + +%========================================================================== +%\subsection {Setting and retrieving the contents of boxes} +\subsection {设置和获取盒子的内容} + +%\begindesc +%\bix^^{box registers} +%% +%\cts setbox {\<register>\thinspace{\bt =}\thinspace\<box>} +%\cts box {\<register>} +%\explain +%^^{assignments//of boxes} +%These commands respectively set and retrieve the contents +%of the box register +%whose number is \<register>. +%Note that you set a box register a little differently than +%you set the other kinds of registers: you use +%|\setbox|$\,n$~|=| rather than |\box|$\,n$~|=|. +\begindesc +\bix^^{盒子寄存器} +% +\cts setbox {\<register>\thinspace{\bt =}\thinspace\<box>} +\cts box {\<register>} +\explain +^^{赋值//给盒子赋值} +这些命令分别设置和获取编号为 \<register> 的盒子寄存器的内容。 +需要注意,设置盒子寄存器与设置其它寄存器有细微的差别: +你应该使用 |\setbox|$\,n$~|=|,而不是 |\box|$\,n$~|=|。 + +%\emph{Retrieving the contents of a box register +%with these commands has the side effect of emptying it, +%so that the box register become void.} If you don't want that to happen, +%you can use |\copy| (see below) to retrieve the contents. +%You should use |\box| in preference to |\copy| +%when you don't care about what's in a box register after you've used it, +%so as not to exhaust \TeX's memory by filling it with obsolete boxes. +\emph{使用这些命令获取盒子寄存器中的内容时,有清空其内容的副作用,所以盒子寄存器将失效。}如果你不希望这些发生,你可以使用 |\copy|(参见后面的内容)来获取内容。如果你不在乎你使用之后的盒子寄存器中的内容,你应该优先使用 |\box| 而不是 |\copy|,这样可以不致于用废弃的盒子来消耗 \TeX\ 的内存。 + +\example +\setbox0 = \hbox{蘑菇} +\setbox1 = \vbox{\copy0\box0\box0} +\box1 +| +\produces +%\setbox0 = \hbox{mushroom} +\setbox0 = \hbox{蘑菇} +\setbox1 = \vbox{\copy0\box0\box0} +\box1 +\endexample +\enddesc + +%\begindesc +%\cts copy {\<register>} +%\explain +%^^{boxes//copying}%\minrefs{box} +%\minrefs{盒子} +%This command +%produces a copy of box register \<register>. +%This command is useful when you want to retrieve the contents of a box +%register but don't want to destroy the contents. +%(Retrieving the register contents with ^|\box| makes the register void.) +\begindesc +\cts copy {\<register>} +\explain +^^{盒子//复制盒子}%\minrefs{box} +\minrefs{盒子} +这个命令可以产生盒子寄存器 \<register> 的一个拷贝。当你希望获取一个盒子的内容, +但又不希望破坏其中的内容时是有用的。(使用 ^|\box| 获取寄取器内容会使寄存器失效。) +\example +\setbox0 = \hbox{美好} +祝你拥有 \copy0 \box0 \box0 的一天! +| +\produces +%\setbox0 = \hbox{good } +%Have a \copy0 \box0 \box0 day! +\setbox0 = \hbox{美好} +祝你拥有 \copy0 \box0 \box0 的一天! +\endexample +\enddesc + +%\begindesc +%\cts unhbox {\<register>} +%\cts unvbox {\<register>} +%^^{boxes//extracting contents of} +%\explain +%These commands produce the list contained in box register \<register> and make +%that box register void. +%|\unhbox| applies to box registers containing +%hboxes and |\unvbox| applies to box registers containing vboxes. +%You should use these commands in preference to |\unhcopy| and |\unvcopy| +%(see below) +%when you don't care about what's in the box register after you've used it, +%so as not to exhaust \TeX's memory by filling it with obsolete boxes. +\begindesc +\cts unhbox {\<register>} +\cts unvbox {\<register>} +^^{盒子//提取盒子的内容} +\explain +这些命令可以给出盒子寄存器 \<register> 容纳的列表,并且使盒子寄存器失效。 +|\unhbox| 适用于包含 hbox 的盒子寄存器,而 |\unvbox| 适用于包含 vbox 的盒子寄存器。 +当你不在乎你使用之后的盒子寄存器中的内容,你应该优先使用这些命令而不是 |\unhcopy| 和 |\unvcopy|, +这样可以不致于用废弃的盒子来消耗 \TeX\ 的内存。 +\example +\setbox0=\hbox{素甲鱼深深地叹息着,用一只手背抹着眼泪。} +\setbox1=\hbox{他想说话,可是有好一阵子泣不成声。} +\unhbox0 \unhbox1 +% \box0 \box1 将并排设置两个 hbox +% (并且输出难看的过满行)。 +\box1 % 什么也不输出。 +| +\produces +%\setbox0=\hbox{The Mock Turtle sighed deeply, and +%drew the back of one flapper across his eyes. } +%\setbox1=\hbox{He tried to speak, but sobs choked +% his voice. } +\setbox0=\hbox{素甲鱼深深地叹息着,用一只手背抹着眼泪。} +\setbox1=\hbox{他想说话,可是有好一阵子泣不成声。} +\unhbox0 \unhbox1 +% \hbox0 \hbox1 would set two hboxes side by side +% (and produce a badly overfull line). +\box1 % Produces nothing. +\endexample +\enddesc + +%\begindesc +%\cts unhcopy {\<register>} +%\cts unvcopy {\<register>} +%^^{boxes//extracting contents of} +%^^{boxes//copying }%\minrefs{box} +%\minrefs{盒子} +%\explain +\begindesc +\cts unhcopy {\<register>} +\cts unvcopy {\<register>} +^^{盒子//提取盒子的内容} +^^{盒子//复制盒子}%\minrefs{box} +\minrefs{盒子} +\explain +%These commands produce the list contained in box register \<register> and +%leave the contents of the register undisturbed. +%|\unhcopy| applies to box registers containing hboxes +%and |\unvcopy| applies to box registers containing vboxes. +这些命令可以给出盒子寄存器 \<register> 容纳的列表,并且保持寄存器的内容不被改变。 +|\unhcopy| 适用于包含 hbox 的盒子寄存器,而 |\unvcopy| 适用于包含 vbox 的盒子寄存器。 +\example +\setbox0=\hbox{素甲鱼深深地叹息着,用一只手背抹着眼泪。} +\setbox1=\hbox{他想说话,可是有好一阵子泣不成声。} +\unhcopy0 \unhcopy1\par\noindent +% \box0 \box1 将并排设置两个 hbox +% (并且输出难看的过满行)。 +\box1 % 输出一个(不能被断行)hbox。 +| +\produces +%\setbox0=\hbox{The Mock Turtle sighed deeply, and +%drew the back of one flapper across his eyes. } +%\setbox1=\hbox{He tried to speak, but sobs choked his +% voice. } +\setbox0=\hbox{素甲鱼深深地叹息着,用一只手背抹着眼泪。} +\setbox1=\hbox{他想说话,可是有好一阵子泣不成声。} +\unhcopy0 \unhcopy1\par\noindent +% \hbox0 \hbox1 would set two hboxes side by side +% (and produce a badly overfull line). +\box1 % produces an hbox (which can't be broken) +\endexample +\enddesc + +%\see |\wd|, |\dp|, |\ht| (\xref\ht). +%\eix^^{box registers} +\see |\wd|, |\dp|, |\ht|(\xref\ht )。 +\eix^^{盒子寄存器} + +%========================================================================== +%\subsection {Shifting boxes} +\subsection {移动盒子} + +%\begindesc +%\cts moveleft {\<dimen> \<box>} +%\cts moveright {\<dimen> \<box>} +%\bix^^{boxes//shifting} +%%\minrefs{box} +%\minrefs{盒子} +%\explain +%These commands move \<box> left or right by \<dimen> (which can be +%negative). You can only apply |\moveleft| and |\moveright| to a box +%that's in a \minref{vertical list}. +\begindesc +\cts moveleft {\<dimen> \<box>} +\cts moveright {\<dimen> \<box>} +\bix^^{盒子//移动盒子} +%\minrefs{box} +\minrefs{盒子} +\explain +这些命令将 \<box> 向左或右移动 \<dimen>(这个数值可以是负的)。 +你只能对存在于\minref{竖直列表} 中的盒子使用 |\moveleft| 和 |\moveright|。 +\example +\vbox{\vbox{Phoebe}\vbox{walked}% +\moveleft 20pt\vbox{a}\moveright 20pt\vbox{crooked}% +\vbox{mile.}} +| +\produces +\hfuzz = \maxdimen +\vbox{\vbox{Phoebe}\vbox{walked}% +\moveleft 20pt\vbox{a}\moveright 20pt\vbox{crooked}% +\vbox{mile.}} +\endexample +\enddesc + +\begindesc +\cts lower {\<dimen> \<box>} +\cts raise {\<dimen> \<box>} +\explain +%These commands move \<box> up or down by \<dimen> +%(which can be negative). +%You can only apply |\raise| and |\lower| to a box +%that's in a \minref{horizontal list}. +这些命令将 \<box> 向上或下移动 \<dimen>(这个数值可以是负的)。你只能对存在于\minref{水平列表} 中的盒子使用 |\raise| 和 |\lower|。 +\example +关于你鼻子上的 \lower 6pt \hbox{肿块},你觉得 + \raise 6pt \hbox{沮丧}吗? +| +\produces +%Are you feeling \lower 6pt \hbox{depressed} about the +% \raise 6pt \hbox{bump} on your nose? +关于你鼻子上的 \lower 6pt \hbox{肿块},你觉得 + \raise 6pt \hbox{沮丧}吗? +\endexample + +\eix^^{盒子//移动盒子} +\enddesc + +%========================================================================== +%\subsection {Dimensions of box registers} +\subsection {盒子寄存器的尺寸} + +%\begindesc +%\bix^^{box registers} +%\bix^^{dimensions//of box registers} +%\cts ht {\<register>\param{dimen}} +%\cts dp {\<register>\param{dimen}} +%\cts wd {\<register>\param{dimen}} +%\explain +%These parameters refer to the ^{height}, ^{depth}, and ^{width} +%respectively of \minref{box} \minref{register} \<register>. +%You can use them to find out the dimensions of a box. +%You can also change the dimensions of a box, but it's a tricky business; +%if you want to be adventurous you can +%learn all about it from \knuth{pages~388--389}. +\begindesc +\bix^^{盒子寄存器} +\bix^^{尺寸//盒子寄存器的尺寸} +\cts ht {\<register>\param{dimen}} +\cts dp {\<register>\param{dimen}} +\cts wd {\<register>\param{dimen}} +\explain +这些参数分别表示\minref{盒子}\minref{寄存器} \<register> 的^{高度}、^{深度}和^{宽度}。 +你可以使用这些命令获得一个盒子的尺寸。你也可以改变一个盒子的尺寸,但这是一个需要技巧的事情; +如果你希望成为冒险者,你可以从 \knuth{pages~388--389} 中获得全部的技巧。 +\example +\setbox0 = \vtop{\hbox{一个}\hbox{米黄色的}\hbox{兔子}}% +那个盒子的宽度是 \the\wd0,高度是 \the\ht0, +深度是 \the\dp0。 +| +\produces +%\setbox0 = \vtop{\hbox{a}\hbox{beige}\hbox{bunny}}% +%The box has width \the\wd0, height \the\ht0, +%and depth \the\dp0. +\setbox0 = \vtop{\hbox{一个}\hbox{米黄色的}\hbox{兔子}}% +那个盒子的宽度是 \the\wd0,高度是 \the\ht0, +深度是 \the\dp0。 +%\endexample +%\eix^^{box registers} +%\eix^^{dimensions//of box registers} +%\enddesc +\endexample +\eix^^{盒子} +\eix^^{尺寸//盒子寄存器的尺寸} +\enddesc + +%========================================================================== +%\subsection {Struts, phantoms, and empty boxes} +\subsection {支架、幻影和空盒子} + +\begindesc +%\margin{This subsection is a merger of two previous subsections. +%The commands have also been reordered.} +\margin{这一小节是前两个小节的联合体。相应的命令也被重新排序。} +%\bix^^{struts} +%\cts strut {} +%\explain +%This command produces a box whose width is zero +%and whose height (|8.5pt|) and depth (|3.5pt|) +%are those of a more or less typical line of type in |cmr10|, +%the default \plainTeX\ font. +%Its main use is in forcing lines to have the same height +%when you've disabled \TeX's interline glue with +%|\offinter!-lineskip| ^^|\offinterlineskip| or a similar command, +%e.g., when you're constructing an alignment. +%If the natural height of a line is +%too short, you can bring it up to standard by including a |\strut| +%in the line. The strut will force the height and depth of the line +%to be larger, but it won't print anything or consume any horizontal +%space. +\bix^^{支架} +\cts strut {} +\explain +这个命令产生一个宽度为零的盒子, +盒子的高度 (|8.5pt|) 和深度 (|3.5pt|) 与用 \plainTeX\ 的默认字体 |cmr10| 排出的典型的一行文字是一致的。 +当你使用 |\offinter!-lineskip| ^^|\offinterlineskip| 或类似的命令关闭 \TeX\ 的行间粘连, +如你正在构建一个阵列时,该命令主要用于强迫一行具有相同的高度。 +如果一行的自然高度过矮,你可以在行中插入一个 |\strut| 使它回到标准的高度。 +支架将使得一行的高度和深度更大一些,但它不会打印出任何东西,或者消耗任何水平间隔。 + +%If you're setting type in a font that's bigger or smaller than |cmr10|, +%you should redefine |\strut| for that context. +如果你正在使用一个大于或小于 |cmr10| 的字体排版,你应该根据所处环境重新定义 |\strut|。 +\example +\noindent % 使我们处于水平模式下。 +\offinterlineskip % 我们得到固有的间隔。 +% 下面这些 vbox 中的句号在竖直方向不是等间距的。 +\vtop{\hbox{.}\hbox{.(}\hbox{.x} + \hbox{.\vrule height 4pt depth 0pt}}\qquad +% 因为支架的缘故, +%下面这些 vbox 中的句号在竖直方向上则是等间距的。 +\vtop{\hbox{.\strut}\hbox{.(\strut}\hbox{.x\strut} + \hbox{.\vrule height 4pt depth 0pt\strut}} +| + +\produces +\noindent % So we're in horizontal mode. +\offinterlineskip % So we get the inherent spacing. +% The periods in this vbox are not vertically equidistant. +\vtop{\hbox{.}\hbox{.(}\hbox{.x} + \hbox{.\vrule height 4pt depth 0pt}}\qquad +% The periods in this vbox are vertically equidistant +% because of the struts. +\vtop{\hbox{.\strut}\hbox{.(\strut}\hbox{.x\strut} + \hbox{.\vrule height 4pt depth 0pt\strut}} +\endexample +\enddesc + +\begindesc +\cts mathstrut {} +\explain +%This command produces a phantom formula whose width is zero +%and whose height and depth are the same as those of a left parenthesis. +%|\mathstrut| is in fact defined as `|\vphantom(|'. +%Its main use is for getting radicals, underbars, and overbars to line +%up with other radicals, underbars, and overbars in a formula. +%It is much like ^|\strut| (\xref \strut), +%except that it adjusts itself to the different \minref{style}s +%that can occur in math formulas. +这个命令产生一个宽度为零的幻影公式,它的高度与深度与左圆括号是一致的。 +|\mathstrut| 实际上的定义是 `|\vphantom(|'。 +它主要用于使得根号、下横线和上横线能与公式中其它的根号、下横线和上横线成行排列。 +除能根据出现在数学公式中的不同\minref{样式}自动调节以外,它与 ^|\strut| (\xref \strut)非常相似。 +\example +$$\displaylines{ +\overline{a_1a_2} \land \overline{b_1b_2} +\quad{\rm versus}\quad \overline{a_1a_2\mathstrut} + \land \overline{b_1b_2\mathstrut}\cr +\sqrt{\epsilon} + \sqrt{\xi} \quad{\rm versus}\quad +\sqrt{\epsilon\mathstrut} + \sqrt{\xi\mathstrut}\cr}$$ +| +\dproduces +\kern 4pt +$$\displaylines{ +\overline{a_1a_2} \land \overline{b_1b_2} +\quad{\rm versus}\quad \overline{a_1a_2\mathstrut} + \land \overline{b_1b_2\mathstrut}\cr +\sqrt{\epsilon} + \sqrt{\xi} \quad{\rm versus}\quad +\sqrt{\epsilon\mathstrut} + \sqrt{\xi\mathstrut}\cr}$$ +\endexample +\eix^^{支架} +\enddesc + +%\begindesc +%\cts phantom {\<argument>} +%\explain +%\bix^^{boxes//phantom} +%\bix^^{phantoms} +%This command produces an empty \minref{box} +%having the same size and placement +%that \<argument> would have were it typeset. +%One use of |\phantom| is for reserving space for a symbol that for some +%reason needs to be drawn in by hand. +\begindesc +\cts phantom {\<argument>} +\explain +\bix^^{盒子//幻影盒子} +\bix^^{幻影} +此命令产生一个空\minref{盒子},它的大小和位置与假定 \<argument> 被排版出来时的相同。 +因某种原因需要手工给一个符号留出空间时,|\phantom| 就可派上用场。 +\example +$1\phantom{9}2$ +| +\produces +$1\phantom{9}2$ +\endexample +\enddesc + +\begindesc +\cts hphantom {\<argument>} +\cts vphantom {\<argument>} +\explain +%These commands produce phantom boxes\minrefs{box}\ that +%don't print anything: +%\ulist\compact +%\li |\hphantom| produces a box with the same width as \<argument> +%but zero height and depth. +%\li |\vphantom| produces a box with the same height and depth as \<argu\-ment> +%but zero width. +%\endulist +%\noindent +%Their main purpose is to force a subformula to have a certain minimum +%horizontal or vertical dimension. +这些命令产生幻影盒子\minrefs{box},并不打印任何东西: +\ulist\compact +\li |\hphantom| 产生一个宽度与 \<argument> 一致的盒子,但高度与深度均为零。 +\li |\vphantom| 产生一个高度与深度与 \<argu\-ment> 一致的盒子,但宽度为零。 +\endulist +\noindent +它们的主要目的是迫使一个子公式具有特定的最小水平或竖直尺寸。 +\example +$$\left[\vphantom{u\over v}t\right] \star + \left[{u\over v}\right]\quad + \{\hphantom{xx}\}$$ +| +\dproduces +\kern 4pt +$$\left[\vphantom{u\over v}t\right] \star + \left[{u\over v}\right]\quad + \{\hphantom{xx}\}$$ +\endexample +\enddesc + +\begindesc +\cts smash {\<argument>} +\explain +%This command typesets \<argument>, +%but forces the height and depth of its containing \minref{box} to be zero. +%You can use |\smash| and |\vphantom| in combination to give a subformula +%any height and depth that you wish. +该命令排出 \<argument>,但迫使其包含的\minref{盒子}的高度和深度设为零。你可以联合使用 |\smash| 和 |\vphantom| 来获得任何你期望高度与深度的子公式。 +\example +$${\smash{r_m \brace r_n}\vphantom{r}} \Longrightarrow r$$ +| +\dproduces +\kern 4pt +$${\smash{r_m \brace r_n}\vphantom{r}} \Longrightarrow r$$ +\endexample +%\eix^^{boxes//phantom} +%\eix^^{phantoms} +%\enddesc +\eix^^{盒子//幻影盒子} +\eix^^{幻影} +\enddesc + +%\begindesc +%^^{boxes//empty} +%\cts null {} +%\explain +%This command produces an empty \minref{hbox}. +\begindesc +^^{盒子//空盒子} +\cts null {} +\explain +这个命令产生一个空的 \minref{hbox}。 +\example +\setbox0 = \null +空盒子 \null 的宽度是 \the\wd0,高度是 \the\ht0, +深度是 \the\dp0。 +| +\produces +\setbox0 = \null +%The null box \null has width \the\wd0, height \the\ht0, +%and depth \the\dp0. +空盒子 \null 的宽度是 \the\wd0,高度是 \the\ht0, +深度是 \the\dp0。 +\endexample +\enddesc + + +%========================================================================== +%\subsection {Parameters pertaining to malformed boxes} +\subsection {有关畸形盒子的参数} + +%\begindesc +%\bix^^{boxes//overfull} +%\bix^^{boxes//underfull} +%\cts overfullrule {\param{dimen}} +%\explain +%This parameter specifies the width of the rule +%that \TeX\ appends to an overfull \minref{hbox}. +%\PlainTeX\ sets it to |5pt|. +\begindesc +\bix^^{盒子//过满盒子} +\bix^^{盒子//未满盒子} +\cts overfullrule {\param{dimen}} +\explain +这个参数设定 \TeX\ 附加在过满\minref{水平盒子}后的标线的宽度。\PlainTeX\ 将其设为 |5pt|。 +\enddesc + +\begindesc +\cts hbadness {\param{number}} +\cts vbadness {\param{number}} +\explain +%These parameters specify the thresholds of horizontal and vertical +%\minref{badness} for reporting underfull or overfull boxes. +%|\hbadness| applies to hboxes and |\vbadness| applies to vboxes. +%If the badness of a constructed box exceeds the threshold, +%\TeX\ will report an error. If you raise the thresholds +%(the \plainTeX\ defaults are both $1000$), +%\TeX\ will be less likely to complain. +%Note that the settings of |\hbadness| and |\vbadness| have no effect on +%the appearance of your typeset document; they only affect the error +%messages that you get. +%See \knuth{page~302} for a precise description +%of how \TeX\ decides when to complain about an overfull or underfull +%box. +这些参数设定了报告盒子未满或过满警告时的水平和竖直的\minref{恶劣状态}的阈值。|\hbadness| 适用于 hbox,而 |\vbadness| 适用于 vbox。如果一个盒子的恶劣状态超过了阈值,\TeX\ 将报告一个错误。如果你提高阈值(\plainTeX 的默认值是 $1000$),\TeX\ 将不再经常给出警告。需要注意的是,设定 |\hbadness| 和 |\vbadness| 对你的文档排版结果没有影响,它们只影响你获得的错误信息。参见 \knuth{page~302},以获得 \TeX\ 如何确定在什么时候对过满或未满盒子进行警告的准确描述。 + +%\margin{The material on tolerance was inappropriate here and has been +%removed. A new example replaces it.} +\margin{在这里讨论容许量的内容是不合适的,被去掉了。因此,采用一个新的例子取代了它。} +\example +\hbadness = 10000 % 取消任何关于 hbadness 的警告。 +\hbox to 2in{a b}\par +\hbadness = 500 % 当 hbadness 超过 500 就给出警告。 +\hbox to 2in{a\hskip 0pt plus .5in b} +| +\logproduces +Underfull \hbox (badness 5091) detected at line 4 +\tenrm a b + +\hbox(6.94444+0.0)x144.54, glue set 3.70787 +.\tenrm a +.\glue 0.0 plus 36.135 +.\tenrm b +| +\endexample +\enddesc + +\begindesc +\cts badness {} +\explain +%This command yields the numerical value of the badness of the \minref{box} +%(either horizontal or vertical) that \TeX\ has most recently produced. +%If the box was overfull, |\badness| will be $1000000$; in all other cases +%it will be between $0$ and $10000$. +该命令给出 \TeX\ 刚刚产生的(水平的或竖直的)\minref{盒子}的恶劣状态的数值。 +如果盒子是过满的,|\badness| 将是 $1000000$;在所有其它情况下,它将在 $0$ 至 $10000$ 之间。 +\enddesc + +\begindesc +\cts hfuzz {\param{dimen}} +\cts vfuzz {\param{dimen}} +\explain +%These parameters specify the amount that +%a \minref{box} can exceed its natural size before \TeX\ considers it to be +%overfull. ^^{boxes//overfull} +%|\hfuzz| applies to hboxes and |\vfuzz| applies to vboxes. +%\PlainTeX\ sets both parameters to |0.1pt|. +这些参数设置在 \TeX\ 认为一个盒子过满之前,一个\minref{盒子} 能够超出其本身大小的量。 +^^{盒子//过满盒子}|\hfuzz| 适用于水平盒子,而 |\vfuzz| 适用于竖直盒子。\PlainTeX\ 将两个参数均设为 |0.1pt|。 +\example +\hfuzz = .5in +\hbox to 2in{This box is longer than two inches.} +% 没有错误的结果。 +| +\produces +\hfuzz = .5in +\hbox to 2in{This box is longer than two inches.} +% No error results +\doruler{\8\8\8}3{in} +\endexample + +%\eix^^{boxes//overfull} +%\eix^^{boxes//underfull} +%\eix^^{box commands} +%\enddesc +\eix^^{盒子//过满盒子} +\eix^^{盒子//未满盒子} +\eix^^{盒子命令} +\enddesc + +%\see |\tolerance| \ctsref{\tolerance}. +\see |\tolerance| \ctsref{\tolerance}。 + +%========================================================================== +%\section {Retrieving the last item from a list} +\section {从列表中获取最后的项目} + +%\begindesc +%^^{boxes//last box in a list} +%^^{kerns//last kern in a list} +%^^{penalties//last penalty in a list} +%^^{glue//last glue item in a list} +%\margin{This section has been moved in its entirety from the chapter +%(`Commands for general operations')} +\begindesc +^^{盒子//列表中最后一个盒子} +^^{紧排//列表中最后一个紧排} +^^{惩罚//列表中最后一个惩罚项} +^^{粘连//列表中最后一个粘连} +\margin{这一节整个儿地从(“常规操作命令”)一章中移过来的。} +\cts lastkern {} +\cts lastskip {} +\cts lastpenalty {} +\cts lastbox {} +\explain +%These control sequences yield the value of the last item on the current +%list. They aren't true commands because they can only appear as +%part of an argument. +%If the last item on the list isn't of the indicated type, +%they yield a zero value (or an empty box, in the case of |\lastbox|). +%For example, +%if the last item on the current list is a \minref{kern}, +%|\lastkern| yields the dimension of that kern; if it +%isn't a kern, it yields a dimension of $0$. +这些控制序列产生位于当前列表最后的项目值。它们不是真正的命令,因为它们只能以参数的一部分出现。如果列表中的最后的项目不是指示类型,它们将给出零值(或者空盒子,在 |\lastbox| 的情况下)。例如,如果在当前列表中最后一项是一个\minref{紧排},|\lastkern| 给出那个紧排的尺寸;如果它不是紧排,它给出一个尺寸 $0$。 + +%Using |\lastbox| has the additional effect of removing the last box from +%the list. +%If you want the original |\last!-box| to remain on the list, you +%have to add a copy of it to the list. +%|\last!-box| is not permitted in a math list or in the main +%vertical~list. +使用 |\lastbox| 具有从列表中移除最后一个盒子的附加效应。如果你希望原来的 |\last!-box| 仍保留在列表中,你不得不向列表中增加它的一个拷贝。|\last!-box| 不允许用于数学列表或主竖直列表。 + +%These control sequences are +%most useful after macro calls that might have inserted entities of +%the indicated kinds. +这些控制序列在可能插入指标类型的宏调用后是非常有用的。 + +\example +\def\a{two\kern 15pt} +one \a\a\hskip 2\lastkern three\par +% 在`三'之前产生三倍的紧排。 +\def\a{\hbox{二}} +一 \a +\setbox0 = \lastbox % 将`二'去掉。 +三 \box0. +| +\produces +\def\a{二\kern 15pt} +一 \a\a\hskip 2\lastkern 三\par +% get three times as much space before `three' +\def\a{\hbox{二}} +一 \a +\setbox0 = \lastbox % removes `two' +三 \box0. +\endexample +\enddesc + +\begindesc +\cts unkern {} +\cts unskip {} +\cts unpenalty {} +\explain +%If the last item on the current list is of type \minref{kern}, +%\minref{glue}, or \minref{penalty} respectively, these commands remove it +%from that list. If the item isn't of the right type, these commands have +%no effect. Like ^|\lastbox|, you can't apply them to lists in math mode or to +%the main vertical list. +%These commands +%are most useful after a macro call that is known to have inserted +%a specific item that you don't want there. +%\TeX\ doesn't provide an ^|\unbox| command because |\lastbox| produces +%nearly the same effect. +如果当前列表的最后一项分别是\minref{紧排}、\minref{粘连}或\minref{惩罚}的类型,这些命令可以将它们从列表中去除。如果项目不是正确的类型,这些命令将不起作用。与 ^|\lastbox| 类似,你不能将它们应用于处于数学模式或主竖直列表中。在已知道会插入你不希望存在的特定项目的宏调用后,这些命令是非常有用的。\TeX\ 不提供 ^|\unbox| 命令,因为 |\lastbox| 产生了近乎一致的效果。 +\enddesc + + +%========================================================================== +%\section {Rules and leaders} +\section {标线与指引线} + +%\begindesc +%\bix^^{rules} +%\bix^^{horizontal rules} +%\bix^^{vertical rules} +\begindesc +\bix^^{标线} +\bix^^{水平标线} +\bix^^{竖直标线} +% +\cts hrule {} +\aux\cts hrule {\bt height \<dimen> width \<dimen> depth \<dimen>} +\cts vrule {} +\aux\cts vrule {{\bt width \<dimen> height \<dimen> depth \<dimen>}} +\explain +%The |\hrule| command produces a horizontal rule; the |\vrule| command +%produces a vertical rule. You can specify any or all of the width, +%height, and depth of the rule---\TeX\ supplies default values for those +%that you omit. You can give the dimensions of the rule in any order; +%the forms listed above show just two of the possible combinations. You +%can even give a dimension of a given kind more than once---if you do, +%the last one is the one that counts. +|\hrule| 命令用于产生水平的标线;相应的 |\vrule| 命令用于产生竖直的标线。 +你可以指定标线的宽度、高度或深度的任意或全部。 +\TeX\ 会为你省略的那些提供默认值。你可以以任何顺序给定标线的尺寸; +上面给出的形式只是可能的组合中的两个。 +你甚至可以为一个给定类型的尺寸给出多个值---如果你这么做,起作用的是最后一个值。 + +%If you don't specify the width of a horizontal rule, the rule is +%extended horizontally to the boundaries of the innermost \minref{box} or +%\minref{alignment} that contains the rule. If you don't specify the +%height of a horizontal rule, it defaults to |0.4pt|; if you don't +%specify the depth of a horizontal rule, it defaults to |0pt|. +如果你没有设定水平标线的宽度, +则标线将水平地扩展到包含标线的\minref{盒子}或\minref{阵列}的最内侧的边界。 +如果你没有设定水平标线的高度,其默认值是 |0.4pt|; +如果你没有设定水平标线的深度,其默认值是 |0pt|。 + +%If you don't specify the width of a vertical rule, it defaults to +%|0.4pt|. If you don't specify the height or the depth of a vertical +%rule, the rule is extended to the boundary of the innermost \minref{box} +%or \minref{alignment} that contains the rule. +如果你没有设定竖直标线的宽度,其默认值是 |0.4pt|; +如果你没有设定竖直标线的高度或深度, +则标线将地扩展到包含标线的\minref{盒子}或\minref{阵列}的最内侧的边界。 + +%\TeX\ treats a horizontal rule as an inherently vertical item +%and a vertical rule as an inherently horizontal item. +%Thus a horizontal rule is legal only in a \minref{vertical mode}, +%while a vertical rule is legal only in a \minref{horizontal mode}. +%^^{horizontal mode//rules in} +%^^{vertical mode//rules in} +%If this seems surprising, visualize it---a horizontal rule runs +%from left to right and separates vertical items in a sequence, while +%a vertical rule runs up and down and +%separates horizontal items in a sequence. +\TeX\ 以内在的竖直项目处理水平标线,而以内在的水平项目处理竖直标线。 +因此,水平标线只有\minref{竖直模式}下是有效的,而竖直标线只在\minref{水平模式}下是有效的。 +^^{水平模式//水平模式中的标线} +^^{竖直模式//竖直模式中的标线} +如果觉得意外,可以直观化地观测。水平标线从左向右移动,并且将竖直的项目有序地分开, +而竖直标线从上到下,将水平项目有序地分开。 + +\example +\hrule\smallskip +\hrule width 2in \smallskip +\hrule width 3in height 2pt \smallskip +\hrule width 3in depth 2pt +| +\produces +\medskip +\hrule\smallskip +\hrule width 2in \smallskip +\hrule width 3in height 2pt \smallskip +\hrule width 3in depth 2pt +\nextexample +% 在这里,你能看到基线与 \hrule 的高度与深度之间有的关系。 +\leftline{ + \vbox{\hrule width .6in height 5pt depth 0pt} + \vbox{\hrule width .6in height 0pt depth 8pt} + \vbox{\hrule width .6in height 5pt depth 8pt} + \vbox{\hbox{基线}\kern 3pt \hrule width .6in} +} +| +\produces +\medskip +\leftline{ + \vbox{\hrule width .6in height 5pt depth 0pt} + \vbox{\hrule width .6in height 0pt depth 8pt} + \vbox{\hrule width .6in height 5pt depth 8pt} + \vbox{\hbox{基线}\kern 3pt \hrule width .6in} +} +\nextexample +\hbox{( {\vrule} {\vrule width 8pt} )} +\hbox {( {\vrule height 13pt depth 0pt} + {\vrule height 13pt depth 7pt} x)} +% 圆括号定义了两个连续的盒子的高度与深度; +% 而 `x' 位于基线之上。 +| +\produces +\medskip +\hbox{( {\vrule} {\vrule width 8pt} )} +\hbox {( {\vrule height 13pt depth 0pt} + {\vrule height 13pt depth 7pt} x)} +\endexample + +%\eix^^{rules} +%\eix^^{horizontal rules} +%\eix^^{vertical rules} +%\enddesc +\eix^^{标线} +\eix^^{水平标线} +\eix^^{竖直标线} +\enddesc + +%\begindesc +%\bix^^{leaders} +%\easy\cts leaders {\<box or rule> \<skip command>} +%\cts cleaders {\<box or rule> \<skip command>} +%\cts xleaders {\<box or rule> \<skip command>} +%\explain +%These commands produce \minref{leaders}, i.e., they fill a +%horizontal or vertical space with +%copies of a pattern \seeconcept{leaders}. +%The \<box> or \<rule> specifies a leader, +%i.e., a single copy of the pattern, +%while the \<skip command> specifies a +%window to be filled with a +%row or a column of the leaders. +%The pattern is repeated as many times as will fit into the window. +%If \<skip command> is a horizontal skip, the window +%contains a row of leaders and \TeX\ must be in a horizontal mode; +%if \<skip command> is a vertical skip, the window +%contains a column of leaders and \TeX\ must be in a vertical mode. +\begindesc +\bix^^{指引线} +\easy\cts leaders {\<box or rule> \<skip command>} +\cts cleaders {\<box or rule> \<skip command>} +\cts xleaders {\<box or rule> \<skip command>} +\explain +这些命令用于产生\minref{指引线}, +也就是用某一个模式\seeconcept{指引线}的复本填充水平或竖直的间隔。 +\<box> 或 \<rule> 确定一个指引体,即模式的单个复本, +而 \<skip command> 确定了用一行或一列的指引体填充的窗体。 +模式将重复多次,直到填充了整个窗体。如果 \<skip command> 是一个水平的间距, +窗体中包括的是行向的指引线,\TeX\ 必须处于水平模式下; +如果 \<skip command> 是一个竖直的间距, +窗体中包括的是列向的指引线,\TeX\ 必须处于竖直模式下。 + +%The commands differ in how they arrange the repeated pattern in the space +%and where they put any leftover space: +这些命令的差异是它们在空间内如何组织重复的模式以及在什么地方放置剩余的间距: + +%\ulist\compact +%\li For |\leaders|, \TeX\ aligns a row of leaders with the left end of +%the innermost \minref{box} $B$ that is to contain the result of the +%|\leaders| command. +%It aligns a column of leaders with the top of $B$. +%Those leaders that fall entirely within the window are retained. +%Any leftover space at the top and bottom of the window is left empty. +%\li For |\cleaders|, the leaders are centered within the window. +%\li For |\xleaders| the pattern is uniformly distributed throughout the window. +%If the leftover space is $l$ and the leader is repeated $n$ times, +%\TeX\ puts space of width or height $l/(n+1)$ between adjacent leaders and +%at the two ends (left and right or top and bottom) of the leaders. +%\endulist +\ulist\compact +\li 对于 |\leaders|,\TeX\ 将一行指引线与包含 |\leaders| 这一命令结果的最内侧的\minref{盒子} $B$ 的左侧对齐。它将一列指引线与 $B$ 的顶端对齐。整个落在窗体中的指引线将被保留。任何在窗体顶部或底部剩余的间隔将空着。 +\li 对于 |\cleaders|,指引线在窗体内是居中的。 +\li 对于 |\xleaders|,模式是均匀分布在窗体中的。如果剩余空间是 $l$,指引体被重复 $n$ 次,\TeX\ 将在相邻的指引线以及指引线的两个端点(左和右或者上和下)之间填充宽度或高度为 $l/(n+1)$ 的间隔。 +\endulist + +\example +\def\pattern{\hbox to 15pt{\hfil.\hfil}} +\line{Down the Rabbit-Hole {\leaders\pattern\hfil} 1} +\line{The Pool of Tears {\leaders\pattern\hfil} 9} +\line{A Caucus-Race and a Long Tale {\cleaders\pattern + \hfil} 19} +\line{Pig and Pepper {\xleaders\pattern\hfil} 27} +| +\produces +\def\pattern{\hbox to 15pt{\hfil.\hfil}}\par +\line{Down the Rabbit-Hole {\leaders\pattern\hfil} 1} +\line{The Pool of Tears {\leaders\pattern\hfil} 9} +\line{A Caucus-Race and a Long Tale {\cleaders\pattern + \hfil} 19} +\line{Pig and Pepper {\xleaders\pattern\hfil} 27} +\nextexample +\def\bulletfill{\vbox to 3ex{\vfil\hbox{$\bullet$}\vfil}}% +\def\mybox{\vbox to 1in} +\def\myrule{\hrule width 4pt}\hsize=2in +\hrule \line{% + \mybox{\myrule depth 8pt \leaders\bulletfill\vfill} + \hfil + \mybox{\myrule depth 15pt \leaders\bulletfill\vfill} + \hfil + \mybox{\myrule depth 18pt \cleaders\bulletfill\vfill} + \hfil + \mybox{\myrule depth 12pt \xleaders\bulletfill\vfill}% +}\hrule +| +\produces +\medskip +\def\bulletfill{\vbox to 3ex{\vfil\hbox{$\bullet$}\vfil}}% +\def\mybox{\vbox to 1in}\def\myrule{\hrule width 4pt}\hsize=2in +\hrule \line{% + \mybox{\myrule depth 8pt \leaders\bulletfill\vfill} + \hfil + \mybox{\myrule depth 15pt \leaders\bulletfill\vfill} + \hfil + \mybox{\myrule depth 18pt \cleaders\bulletfill\vfill} + \hfil + \mybox{\myrule depth 12pt \xleaders\bulletfill\vfill}% +}\hrule +\endexample\enddesc + +%\begindesc +%\cts dotfill {} +%\cts hrulefill {} +%\explain +%^^{fill} +%These commands respectively fill the enclosing horizontal space with +%a row of dots on the baseline and with +%a horizontal line on the baseline. +%It's usually a good idea to leave a space between +%|\dotfill| or |\hrulefill| +%and any text that precedes or follows it (see the example below). +\begindesc +\cts dotfill {} +\cts hrulefill {} +\explain +^^{填充} +这些命令分别采用一行位于基线上的点和水平线填充封闭的水平空间。 +通常,在 |\dotfill| 或 |\hrulefill| 与任何其之前或之后的文字之间留一个空格是一个好的主意(参见下面的例子)。 +\example +\hbox to 3in{开始 {\dotfill} 结束} +\hbox to 3in{瑞典语 {\hrulefill} 芬兰语} +| +\produces +\par\hbox to 3in{开始 {\dotfill} 结束} +\hbox to 3in{瑞典语 {\hrulefill} 芬兰语} +\endexample\enddesc + +%\begindesc +%\cts leftarrowfill {} +%\cts rightarrowfill {} +%\explain +%^^{fill} +%These commands fill the enclosing horizontal space with +%left-pointing or right-pointing ^{arrows}. +\begindesc +\cts leftarrowfill {} +\cts rightarrowfill {} +\explain +^^{填充} +这些命令用向左或向右的^{箭头}来填充封闭的水平空间。 +\example +\hbox to 3in{\vrule \rightarrowfill \ 3 in + \leftarrowfill\vrule} +| +\produces +\medskip +\hbox to 3in{\vrule \rightarrowfill \ 3 in + \leftarrowfill\vrule} +\endexample + +%\eix^^{leaders} +%\enddesc +\eix^^{指引线} +\enddesc + +%========================================================================== +%\section {Alignments} +\section {阵列} + +%========================================================================== +%\subsection {Tabbing alignments} +\subsection {制表阵列} + +%\begindesc +%\bix^^{tabbing alignments} +%\bix^^{alignments//commands for} +%% +%\ctspecial + {{\bt \<text>\thinspace\&\thinspace\<text>% +% \thinspace\& $\cdots$ \\cr}} +%\ctsxrdef{@plus} +%\cts tabalign {} +%\explain +\begindesc +\bix^^{制表阵列} +\bix^^{阵列//用于阵列的命令} +% +\ctspecial + {{\bt \<text>\thinspace\&\thinspace\<text>% + \thinspace\& $\cdots$ \\cr}} +\ctsxrdef{@plus} +\cts tabalign {} +\explain +%These commands begin a single line in a tabbed \minref{alignment}. +%The only difference between |\+| and |\tabalign| is that +%|\+| is an outer macro---you can't use it when \TeX\ is reading tokens at +%high speed \seeconcept{outer}. +在制表\minref{阵列}中,这些命令开始单独的一行。 +|\+| 与 |\tabalign| 之间唯一的不同在于 |\+| 是一个外部宏, +当 \TeX\ 高速读取记号时,你不能使用它\seeconcept{外部的}。 + +%If you place an `|&|' at a position +%to the right of all existing tabs in a tabbing alignment, +%the `|&|' establishes a new tab at that position. +在制表阵列中,如你将 `|&|' 放在所有已经存在的制表符的右侧,那么 `|&|' 将在那个位置上建立一个新的制表符。 +\example +\cleartabs % Nullify any previous \settabs. +\+ {\bf if }$a[i] < a[i+1]$ &{\bf then}&\cr +\+&&$a[i] := a[i+1]$;\cr +\+&&{\it found }$:=$ {\bf true};\cr +\+&{\bf else}\cr +\+&&{\it found }$:=$ {\bf false};\cr +\+&{\bf end if};\cr +| +\produces +\cleartabs % Nullify any previous \settabs. +\+ {\bf if }$a[i] < a[i+1]$ &{\bf then}&\cr +\+&&$a[i] := a[i+1]$;\cr +\+&&{\it found }$:=$ {\bf true};\cr +\+&{\bf else}\cr +\+&&{\it found }$:=$ {\bf false};\cr +\+&{\bf end if};\cr +\endexample +\enddesc + +\begindesc +\cts settabs {\<number> {\bt \\columns}} +\aux\cts settabs {{\bt \\+} \<sample line> {\bt \\cr}} +\explain +%The first form of +%this command defines a set of tab stops ^^{tabs} +%for a tabbing \minref{alignment}. +%It tells \TeX\ to set the tab stops so as to divide each line into +%\<number> equal parts. \TeX\ takes the length of a line to be +%|\hsize|, as usual. You can make the alignment narrower by decreasing +%|\hsize|. +这个命令的第一种形式为制表\minref{阵列}定义一系列制表符^^{制表符}的停止位置。 +它告诉 \TeX\ 设置制表符停止位置以便将每一行分成 \<number> 等份。 +\TeX\ 仍将行的长度设为 |\hsize|。你可以通过减小 |\hsize| 来使得阵列更加紧密。 +%\margin{paragraph ``The tab settings $\ldots$'' moved to below.} +\margin{``制表符设定 $\ldots$''一段被移到下面了。} +\example +{\hsize = 3in \settabs 3 \columns +\+$1$&一&第一\cr +\+$2$&二&第二\cr +\+$3$&三&第三\cr} +| +\produces +{\hsize = 3in \settabs 3 \columns +\+$1$&一&第一\cr +\+$2$&二&第二\cr +\+$3$&三&第三\cr} + +\noindent\doruler{\8\8\8}3{in} +\smallskip +\endexample + +%The second form of this command defines tab stops by setting the tab stops +%at the positions indicated by the `|&|'s in the sample line. +%The sample line itself does not appear in the output. When you +%use this form you'll usually want to put material into the sample line that is +%somewhat wider than the widest corresponding material in the alignment, +%in order to produce space between the columns. +%That's what we've done in the +%example below. The material following the last tab +%stop is irrelevant, since \TeX\ does not need to position +%anything at the place where the |\cr|~appears. +这个命令的第二利形式是利用样例行中的 `|&|' 指示的位置来定义制表符停止位置。样例行本身不会出现在最终输出中。当你使用这种形式,你通常希望将一些宽度大于需要排列的最宽的内容放在样例行中,以便在列之间产生间隔。正象我们在下面的例子中所做的那样。最后一个制表符后的内容是无关紧要的,因为 \TeX\ 在 |\cr| 出现的地方不需要任何位置指示。 + +%The tab settings established by |\settabs| remain in effect until +%you issue a new |\settabs| command or end a group containing +%the |\settabs| command. +%This is true for both forms of the command. +由 |\settabs| 建立起来的制表符设置一直有效,直到你使用一个新的 |\settabs| 命令或结束包含 |\settabs| 命令的编组。该命令的两种形式都是这样的。 + +\example +% The first line establishes the template. +\settabs \+$1$\qquad & three\quad & seventh\cr +\+$1$&一&第一\cr +\+$2$&二&第二\cr +\+$3$&三&第三\cr +| +\produces +\settabs \+$1$\qquad & three\quad & seventh\cr % the sample line +\+$1$&一&第一\cr +\+$2$&二&第二\cr +\+$3$&三&第三\cr +\smallskip +\endexample +\enddesc + +\begindesc + +\cts cleartabs {} +\explain +%This command clears all the tabs to the right of the current column. +%Its main use is in applications such as typesetting computer programs +%in which the tab positions change from line to line. +这个命令消除位于当前列右侧的所有制表符。它主要用于排版计算机程序等一些应用,在这类应用中,从一行至另一行,制表符的位置是变化的。 +\enddesc + +%\see |\cr|, |\endline|, |\crcr| (\xref \endline). +%\eix^^{tabbing alignments} +\see |\cr|、|\endline|、|\crcr|(\xref \endline )。 +\eix^^{制表阵列} + +%========================================================================== +%\subsection {General alignments} +\subsection {常规阵列} + +\begindesc +\cts halign {{\bt \rqbraces{\<preamble> \\cr \<row> \\cr $\ldots$ \<row> \\cr}}} + \xrdef{@and}\xrdef{@pound} +\aux\cts halign {{\bt to \<dimen>% + \rqbraces{\<preamble> \\cr \<row> \\cr $\ldots$ \<row> \\cr}}} +\aux\cts halign {{\bt spread \<dimen>% + \rqbraces{\<preamble> \\cr \<row> \\cr $\ldots$ \<row> \\cr}}} +\explain +%This command produces a horizontal \minref{alignment} consisting of a +%sequence of rows, where each row in turn contains a sequence of column +%entries. \TeX\ adjusts the widths of the column entries to accommodate +%the widest one in each column. +这一命令产生由一系列行组成的水平的\minref{阵列},每一行又包括了一系列的列。\TeX\ 调节列的宽度以容纳每一列中最宽的那一个条目。 + +%A horizontal alignment can only appear when \TeX\ is in a vertical +%\minref{mode}. We recommend that you first study alignments in general +%(\xref{alignment}) before you attempt to use this command. +只有当 \TeX\ 位于竖直\minref{模式}下水平阵列才能出现。 +我们建议你在使用该命令之前首先学习一下常见的阵列(\xref{阵列})。 + +%An alignment consists of a ^{preamble} +%followed by the text to be aligned. The preamble, +%which describes the layout of the rows that follow, consists of a +%sequence of column templates, separated by `|&|' and ended +%by |\cr|. +阵列由^{导言}和随后的需要排列的文字构成。导言描述随后行的版式, +由一系列列的模板构成,列之间由 `|&|' 分隔,用 |\cr| 作为结束标志。 +%\bix^^{template} +%\bix^^{entry (column or row)} +%Each row consists of a sequence of column +%entries, also separated by `|&|' and ended by |\cr|. Within +%a template, `|#|' indicates where \TeX\ should insert the +%corresponding text of a column entry. +%In contrast, |\settabs| uses a fixed implicit template of `|#|', +%i.e., it just inserts the text as is. +\bix^^{模板} +\bix^^{条目(在行或列中)} +每一行由一系列列的条目构成,也由 `|&|' 分隔,用 |\cr| 作为结束标志。 +在模板中,`|#|' 表示 \TeX\ 应该在一个列条目中插入相应文字的位置。 +与之相反,|\settabs| 使用 `|#|' 的固定隐式模板,即它只插入文字本身。 + +%\TeX\ typesets each column entry in restricted horizontal mode, +%i.e., as the contents of an \minref{hbox}, +%and implicitly encloses it in a group. +\TeX\ 在受限水平模式中对每一列条目进行排版,即像 \minref{hbox} 的内容一样,并且隐式地将它封闭在一个编组中。 + +%The |to| form of this command instructs \TeX\ +%to make the width of the alignment be \<dimen>, +%adjusting the space between columns as necessary. +%The |spread| form of this command instructs \TeX\ +%to make the alignment wider by \<dimen> than its natural width. +%These forms are like the corresponding forms of |\hbox| \ctsref\hbox. +这个命令的 |to| 形式指导 \TeX\ 构造一个宽度为 \<dimen> 的阵列,在需要的时候调节列的间距。 +这个命令的 |spread| 形式指导 \TeX\ 构造一个比其本身宽度再宽 \<dimen> 的阵列。 +这些形式与 |\hbox|\ctsref\hbox 相应的形式是类似的。 + +%See |\tabskip| \ctsref\tabskip{} for an example using the +%|to| form. +参见 |\tabskip| \ctsref\tabskip{}中使用 |to| 形式的例子。 + +\example +\tabskip = 1em \halign{% + \hfil\it#\hfil&\hfil#\hfil&#&\hfil\$#\cr + 美国&华盛顿&美元&1.00\cr + 法国&巴黎&法朗&0.174\cr + 以色列&耶路撒冷&新谢克尔&0.507\cr + 日本&东京&日元&0.0829\cr} +| +\produces +\tabskip = 1em \halign{% + \hfil\it#\hfil&\hfil#\hfil&#&\hfil\$#\cr + 美国&华盛顿&美元&1.00\cr + 法国&巴黎&法朗&0.174\cr + 以色列&耶路撒冷&新谢克尔&0.507\cr + 日本&东京&日元&0.0829\cr} +\endexample +\enddesc + +\begindesc +{\tighten +\cts valign {{\bt \rqbraces{\<preamble>\\cr \<column>\\cr $\ldots$ + \<column>\\cr}}} +\aux\cts valign {{\bt to \<dimen>% + \rqbraces{\<preamble>\\cr \<column>\\cr $\ldots$ \<column>\\cr}}} +\aux\cts valign {{\bt spread \<dimen>% + \rqbraces{\<preamble>\\cr \<column>\\cr $\ldots$ \<column>\\cr}}} +\par} +\explain +%This command produces a vertical \minref{alignment} +%consisting of +%a sequence of columns, where each column in turn contains a sequence +%of row entries. +%\TeX\ adjusts the heights of the row entries to accommodate the tallest one +%in each row. +这一命令产生由一系列列组成的竖直的\minref{阵列},每一列又包括了一系列的行。 +\TeX\ 调节行的高度以容纳每一列中最高的那一个条目。 + +%A vertical alignment +%can only appear when \TeX\ is in a horizontal \minref{mode}. +%Because vertical alignments are (a)~conceptually somewhat difficult and +%(b)~not often used, we recommend that you learn about +%alignments in general +%(\xref{alignment}) and the |\halign| command (see above) before +%you attempt to use the |\valign| command. +只有当 \TeX\ 位于水平\minref{模式}下竖直阵列才能出现。 +因为竖直阵列(a)在概念上有一些困难,并且(b)不经常使, +因此,我们建议在你试图使用 |\valign| 命令之前首先学习一下常见的阵列(\xref{阵列})% +以及 |\halign| 命令(参见上面的描述)。 + +%An alignment consists of a ^{preamble} +%followed by the text to be aligned. The preamble, +%which describes the layout of the columns that follow, +%consists of a +%sequence of row templates, separated by `|&|' and ended +%by |\cr|. +阵列由^{导言}和随后的需要排列的文字构成。导言描述随后列的版式, +由一系列行的模板构成,列之间由 `|&|' 分隔,用 |\cr| 作为结束标志。 +%\bix^^{template} +%Each column consists of a sequence of ^{row} +%entries, also separated by `|&|' and ended by |\cr|. Within +%a template, `|#|' indicates where \TeX\ should insert the +%corresponding text of a row entry. +\bix^^{模板} +每一列由一系列行的条目构成,也由 `|&|' 分隔,用 |\cr| 作为结束标志。 +在模板中,`|#|' 表示 \TeX\ 应该在一个行条目中插入相应文字的位置。 + +%\TeX\ typesets each row entry in internal vertical +%mode, i.e., as the contents of a \minref{vbox}, +%and implicitly encloses the entry in a group. +%It always gives the vbox zero depth. +%Any text or other horizontal mode material in a row entry then puts \TeX\ +%into ordinary horizontal mode. +%(This is just an application of the general rules for \TeX's behavior +%in internal vertical mode.) +%The usual paragraphing parameters apply in this case: +%the row entry has an initial +%indentation of |\parindent| (\xref\parindent) and +%its lines have the +%|\leftskip| and |\rightskip| (\xref\leftskip) \minref{glue} +%appended to~them. +\TeX\ 在内部竖直模式中对每一行条目进行排版,即像\minref{竖直盒子}的内容一样, +并且隐式地将它封闭在一个编组中。它总是将 vbox 的深度设为零。 +随后,列中的任何文字或其它水平模式内容将 \TeX\ 带回通常的水平模式。% +(这只是在内部竖直模式下 \TeX 行为常见准则的一个应用。)常见的段落参数适用于这种情形: +行条目具有 |\parindent|(\xref\parindent )的起始缩进, +而且它的每一行都附加了 |\leftskip| 和 |\rightskip|(\xref\leftskip )\minref{粘连}。 + +%Note in particular that a row entry containing text has +%a width of |\hsize| (\xref\hsize). Unless you reset +%|\hsize| to the row width that you want, you're likely to +%encounter overfull \minref{hbox}es, or find that +%the first column takes up the width of the entire page, or both. +尤其需要注意的是,列条目包含的文字具有 |\hsize|(\xref\hsize )的宽度。 +除非你重新设置 |\hsize| 到你希望得到的行宽,否则你总能遇到过满\minref{水平盒子}的情况, +或者发现第一列占据了整页的宽度,或者两种情况都会出现。 +\eix^^{条目(在行或列中)} + +%Normally, you need to include a \minref{strut} +%^^{struts//in vertical alignments} +%in each +%template so that the rows don't come out crooked as a result +%of the varying heights of the entries in the alignment. You +%can produce a strut with the |\strut| command. +正常情况下,你需要在每个模板中包括\minref{支架}^^{支架//在竖直阵列中}, +以便行不会由于阵列中条目高度的变化而变得弯曲。你可以使用 |\strut| 获得支架。 + +%The |to| form of this command instructs \TeX\ +%to make the vertical extent of the alignment be \<dimen>, +%adjusting the space between rows as necessary. +%The |spread| form of this command instructs \TeX\ +%to make the alignment taller by \<dimen> than its natural height. +%These forms are like the corresponding forms of |\vbox| \ctsref\vbox. +这个命令的 |to| 形式指导 \TeX\ 构造一个竖直伸展为 \<dimen> 的阵列,在需要的时候调节行的间距。 +这个命令的 |spread| 形式指导 \TeX\ 构造一个比其本身高度再高 \<dimen> 的阵列。 +这些形式与 |\vbox| \ctsref\vbox 相应的形式是类似的。 + +\example +{\hsize=1in \parindent=0pt +\valign{#\strut&#\strut&#\strut&#\strut\cr + bernaise&curry&hoisin&hollandaise\cr + ketchup&marinara&mayonnaise&mustard\cr + rarebit&tartar\cr}} +| +\produces +{\hsize=1in \parindent=0pt \leftskip=0pt +\valign{#\strut&#\strut&#\strut&#\strut\cr + bernaise&curry&hoisin&hollandaise\cr + ketchup&marinara&mayonnaise&mustard\cr + rarebit&tartar\cr}} +\nextexample +% 与上例相同的内容,但没有支架 +%(这个例子显示了支架存在的必要性)。 +{\hsize=1in \parindent=0pt +\valign{#&#&#&#\cr + bernaise&curry&hoisin&hollandaise\cr + ketchup&marinara&mayonnaise&mustard\cr + rarebit&tartar\cr}} +| +\produces +{\hsize=1in \parindent=0pt \leftskip=0pt +\valign{#&#&#&#\cr + bernaise&curry&hoisin&hollandaise\cr + ketchup&marinara&mayonnaise&mustard\cr + rarebit&tartar\cr}} +\endexample +\enddesc + +\begindesc +\cts ialign {} +\explain +%This command behaves just like ^|\halign|, +%except that it first sets the |\tabskip| glue to zero and +%sets |\everycr| empty. +除了首先将 |\tabskip| 粘连设为零,并将 |\everycr| 清空以外,这个命令的行为与 ^|\halign| 相似。 +\enddesc + +\begindesc +\cts cr {} +\explain +%This command ends the preamble of a horizontal or vertical +%alignment, a row of a horizontal or tabbing alignment, +%or a column of a vertical alignment. +%You can cause \TeX\ to take certain actions whenever it sees a |\cr| +%by setting the value of the ^|\everycr| parameter \ctsref\everycr. +这个命令用于结束水平或竖直阵列的导言、水平的或制表阵列的行,或竖直阵列的列。你可以通过设置 ^|\everycr|\ctsref\everycr 参数的值,引导 \TeX\ 采取特定的行动,无论什么时候它遇到 |\cr|。 +\enddesc + +\begindesc +\cts endline {} +\explain +%This command is a synonym for the ^|\cr| command. It is useful when +%you've redefined |\cr| but still need access to the original definition. +这个命令是 ^|\cr| 的另一种形式。在你重新定义了 |\cr|,但还需要利用其原始的定义是,这个命令是有用的。 +\enddesc + +\begindesc +\cts crcr {} +\explain +%This command behaves just like ^|\cr|, except that \TeX\ ignores it if +%it comes immediately after a |\cr| or a ^|\noalign|. +%Its main application is as a safety measure to avoid a misleading error +%message caused by a \minref{macro} that expects an argument ending in |\cr|. +%If you put |\crcr| after the `|#|$n$' that denotes such an argument +%in the macro's definition, the +%macro will work properly whether or not the argument ends with |\cr|. +如果该命令紧随 |\cr| 或 ^|\noalign| 之后出现,\TeX\ 会忽略它。除此之外,它的行为与 ^|\cr| 类似。它主要的应用是作为一种安全措施以避免由期望以 |\cr| 作为结束符的\minref{宏包}而引起的错误信息。如果你将 |\crcr| 放在用以表示宏定义中此类参数的后面,宏将正常工作,无论其参数是否以 |\cr| 作为结束标记。 +\enddesc + +\begindesc +\cts omit {} +\explain +%This command tells \TeX\ to ignore a template in a horizontal or vertical +%\minref{alignment} while processing a particular column or row entry +%respectively. +%|\omit| must appear as the first item in a column or row entry; in effect, +%it overrides the template from the preamble with the simple +%template `|#|'. +这个命令告诉 \TeX\ 在处理特定的列或行条目时,忽略水平的或竖直的\minref{阵列} 中的一个模板。|\omit| 必须以第一个项目出现在列或行条目中,它有效地使用简单的模板 `|#|' 覆盖来自导言中的模板。 + +\example +\tabskip = 2em\halign{% + \hfil\it#\hfil&\hfil#\hfil&#&\hfil\$#\cr + 美国&华盛顿&美元&1.00\cr + \omit \dotfill 法国\dotfill&巴黎&法朗&0.174\cr + 以色列&耶路撒冷&新谢克尔&0.507\cr + 日本&东京&日元&0.0829\cr} + +| +\produces +\tabskip = 2em\halign{% + \hfil\it#\hfil&\hfil#\hfil&#&\hfil\$#\cr + 美国&华盛顿&美元&1.00\cr + \omit \dotfill 法国\dotfill&巴黎&法朗&0.174\cr + 以色列&耶路撒冷&新谢克尔&0.507\cr + 日本&东京&日元&0.0829\cr} +\nextexample +{\hsize=1.2in \parindent=0pt +\valign{(#)\strut&(#)\strut&(#)\strut&(#)\strut\cr + bernaise&curry&hoisin&hollandaise\cr + ketchup&\omit\strut{\bf MARINARA!!}&mayonnaise&mustard\cr + rarebit&tartar\cr}} +| +\produces +{\hsize=1.2in \parindent=0pt \leftskip=0pt +\valign{(#)\strut&(#)\strut&(#)\strut&(#)\strut\cr + bernaise&curry&hoisin&hollandaise\cr + ketchup&\omit\strut{\bf MARINARA!}&mayonnaise&mustard\cr + rarebit&tartar\cr}} +\endexample +\enddesc + +\begindesc +\cts span {} +\explain +%The meaning of this command depends on whether it appears in a preamble +%or in an alignment entry. +%\ulist +%\li Normally, \TeX\ does not expand tokens in the preamble +%when it reads them. +%Putting |\span| in front of a token in the preamble causes +%that token to be expanded immediately according to \TeX's usual rules +%of \minref{macro} expansion. +%\li Putting |\span| instead of `|&|' between two column or row entries +%causes those columns or rows to be combined. +%For a horizontal alignment, +%the width of the combined column is the sum of the +%widths of the component columns. +%For a vertical alignment, +%the height of the combined row is the sum of the +%heights of the component rows. +%The template of the combined column or combined row forms a single group, +%so font-setting commands preceding a |\span| affect everything up to +%the next `|&|'. +%\endulist +%\noindent +%|\span| is rarely useful by itself outside of a template, +%but it provides the basic mechanism +%for defining ^|\multispan|. +这个命令的意义取决于它出现在导言中,还是在阵列条目中。 +\ulist +\li 通常,\TeX\ 并不扩展它读入的导言中的记号。将 |\span| 放在导言中记号的前面,根据\minref{宏}扩展的 \TeX 常用规则,会导致这些记号立即得到扩展。 +\li 用 |\span| 取代 `|&|',放在两列或两行条目之前,会导致这些列或行合并到一起。对于水平阵列,合并的列的宽度是列成员宽度之和。对于竖直阵列,合并的行的高度是行成员高度之和。合并的行或合并的列的模板形成一个编组,因此,在 |\span| 前的字体设置命令影响下一个 `|&|' 前的一切。 +\endulist +\noindent +|\span| 很少单独用在模板之外,但它为定义 ^|\multispan| 提供了基本的机制。 +\enddesc + +\begindesc +\cts multispan {\<number>} +\explain +%This command tells \TeX\ that the following +%\<number> columns in a row of a horizontal alignment, +%or +%\<number> rows in a column of a vertical alignment, +%should be combined into a single column or row (as with +%|\span|) and that their templates should be omitted (as with |\omit|). +该命令告诉 \TeX ,随后水平阵列的行中的 \<number> 列或竖直阵列的列中的 \<number> 行应该合并成一个单独的列或行(就像 |\span| 那样),并且它们的模板应该被忽略(就像 |\omit| 那样)。 + +\example +\tabskip = 13pt\halign{% + \hfil\it#\hfil&\hfil#\hfil&#&\hfil\$#\cr + 美国&华盛顿&美元&1.00\cr + 法国&巴黎&法朗&0.174\cr + 以色列&耶路撒冷& + \multispan 2 \hfil\it(无信息)\hfil \cr + 日本&东京&日元&0.0829\cr} +| +\produces +\tabskip = 13pt\halign{% + \hfil\it#\hfil&\hfil#\hfil&#&\hfil\$#\cr + 美国&华盛顿&美元&1.00\cr + 法国&巴黎&法朗&0.174\cr + 以色列&耶路撒冷& + \multispan 2 \hfil\it(无信息)\hfil \cr + 日本&东京&日元&0.0829\cr} +\nextexample +{\hsize=1.2in \parindent=0pt +\valign{(#)\strut&(#)\strut&(#)\strut&(#)\strut\cr + bernaise&curry&hoisin&hollandaise\cr + \multispan 3$$\left\{{{\rm ketchup}\atop{\rm marinara}} + \right\}$$&mustard\cr + rarebit&tartar\cr}} +| +\produces +{\hsize=1.2in \parindent=0pt \leftskip=0pt +\valign{(#)\strut&(#)\strut&(#)\strut&(#)\strut\cr + bernaise&curry&hoisin&hollandaise\cr + \multispan 3$$\left\{{{\rm ketchup}\atop{\rm marinara}} + \right\}$$&mustard\cr + rarebit&tartar\cr}} +\endexample + +%\eix^^{template} +%\enddesc +\eix^^{模板} +\enddesc + +\begindesc +\cts noalign {\rqbraces{\<vertical mode material>}} +\aux\cts noalign {\rqbraces{\<horizontal mode material>}} +\explain +%This command inserts +%\<vertical mode material> +%after the current row of a horizontal \minref{alignment} or +%\<horizontal mode material> after the current column of a vertical +%\minref{alignment}. +%The material can be text, glue, a rule, or anything else. +该命令在水平\minref{阵列}的当前行之后插入 \<vertical mode material>,或者在竖直\minref{阵列}的当前列之后插入 \<horizontal mode material>。插入的内容可以是文本、粘连、标线,或者其它任何东西。 + +%The most common use of |\noalign| +%is to put extra space after a row or column. +%If you want to put extra space after \emph{every\/} row of a horizontal +%alignment, use ^|\openup| (\xref\openup). +|\noalign| 最常见的用途是在一行或列后插入额外的间隔。如果你希望在水平阵列的\emph{每}行后都插入额外的间隔,可以使用 ^|\openup|(\xref\openup)。 + +\example +\halign{% + \hfil\it#\hfil\tabskip=2em&\hfil#\hfil&#& + \hfil\$#\tabskip=0em\cr + % 改变 \tabskip 将阻止下面的标线突出来。 + 美国&华盛顿&美元&1.00\cr + 法国&巴黎&法朗&0.174\cr + \noalign{\smallskip\hrule\smallskip} + 以色列&耶路撒冷&新谢克尔&0.507\cr + 日本&东京&日元&0.0829\cr} +| +\produces +\halign{% + \hfil\it#\hfil\tabskip=2em&\hfil#\hfil&#& + \hfil\$#\tabskip=0em\cr + % The \tabskip changes prevent the rule below + % from sticking out. + 美国&华盛顿&美元&1.00\cr + 法国&巴黎&法朗&0.174\cr + \noalign{\smallskip\hrule\smallskip} + 以色列&耶路撒冷&新谢克尔&0.507\cr + 日本&东京&日元&0.0829\cr} +\nextexample +{\hsize=1in \parindent=0pt +\valign{#\strut&#\strut&#\strut&#\strut\cr + \noalign{\vrule width 2pt\quad} + bernaise&curry&hoisin&hollandaise\cr + \noalign{\vrule width 2pt\quad} + ketchup&marinara&mayonnaise&mustard\cr + \noalign{\vrule width 2pt\quad} + rarebit&tartar\cr + \noalign{\vrule width 2pt\quad}}} +| +\produces +\medskip +{\hsize=1in \parindent=0pt +\valign{#\strut&#\strut&#\strut&#\strut\cr + \noalign{\vrule width 2pt\quad} + bernaise&curry&hoisin&hollandaise\cr + \noalign{\vrule width 2pt\quad} + ketchup&marinara&mayonnaise&mustard\cr + \noalign{\vrule width 2pt\quad} + rarebit&tartar\cr + \noalign{\vrule width 2pt\quad}}} +\endexample +\enddesc + +\begindesc +\cts tabskip {\param{glue}} +\explain +%This parameter specifies the amount of horizontal or vertical glue +%that \TeX\ puts between the +%columns of a horizontal alignment or between the +%rows of a vertical alignment. +%\TeX\ also puts the |\tabskip| glue +%to the left of the first column and to the right of the last column +%of a horizontal alignment, and +%above the first row +%and below the last row of a vertical alignment. +%You can change |\tabskip| within a template---% +%the change will affect the glue associated with all the following +%|&|'s as well as the glue after the last row or column. +该参数指定 \TeX 在水平阵列的列之间或竖直阵列的行之间放置水平或竖直粘连的量。\TeX\ 也在水平阵列的第一列的左侧和最后一行的右侧,以及竖直阵列的第一行的上端和最后一行的下端放置 |\tabskip| 粘连。你可以在模板中改变 |\tabskip|---这一改变将影响所有紧接其后的 |&| 的粘连以及最后一行或列之后的粘连。 +\example +\halign to 3.5in{% + \hfil\it#\tabskip = 2em plus 8pt + \hfil&\hfil#\hfil&#\tabskip = 1em + &\hfil\$#\tabskip = 0em\cr + 美国&华盛顿&美元&1.00\cr + 法国&巴黎&法朗&0.174\cr + 以色列&耶路撒冷&新谢克尔&0.507\cr + 日本&东京&日元&0.0829\cr} +| +\produces +\halign to 3.5in{% + \hfil\it#\tabskip = 2em plus 8pt + \hfil&\hfil#\hfil&#\tabskip = 1em + &\hfil\$#\tabskip = 0em\cr + 美国&华盛顿&美元&1.00\cr + 法国&巴黎&法朗&0.174\cr + 以色列&耶路撒冷&新谢克尔&0.507\cr + 日本&东京&日元&0.0829\cr} +\nextexample +{\hsize = 1in \parindent=0pt \tabskip=5pt +\valign{#\strut&#\strut\tabskip = 3pt + &#\strut&#\strut\cr + bernaise&curry&hoisin&hollandaise\cr + ketchup&marinara&mayonnaise&mustard\cr + rarebit&tartar\cr}} +| +\produces +{\hsize = 1in \parindent=0pt \tabskip=5pt +\valign{#\strut&#\strut\tabskip = 3pt + &#\strut&#\strut\cr + bernaise&curry&hoisin&hollandaise\cr + ketchup&marinara&mayonnaise&mustard\cr + rarebit&tartar\cr}} +\endexample +\enddesc + +\begindesc +\cts hidewidth {} +\explain +%This command tells \TeX\ to ignore the width of the next column entry in a +%horizontal alignment. It's useful when you have an entry that is longer +%than most of the others in the same column, +%and you'd rather have that entry stick out of the column than +%make all the entries +%in the column wider. If the |\hidewidth| is at the left of the +%entry, the entry sticks out to the left; if the |\hidewidth| is at the +%right of the entry, the entry sticks out to the~right. +该命令告诉 \TeX\ 忽略水平阵列中下一个列条目的宽度。如果你有一个条目长于同一列中其它大多数,并且 ,你希望条目伸到列外,而不是使得该条目所在列变得更宽时,该命令是有用的。如果 |\hidewidth| 在条目的左侧,则条目向左伸展;如果 |\hidewidth| 在条目的右侧,则条目向右伸展。 +\example +\tabskip = 25pt\halign{% + \hfil\it#\hfil&\hfil#\hfil&#&\hfil\$#\cr + 美国&\hidewidth 华盛顿&美元&1.00\cr + 法国&巴黎&法朗&0.174\cr + 以色列&耶路撒冷&新谢克尔&0.507\cr + 日本&东京&日元&0.0829\cr} +| +\produces +\tabskip = 25pt\halign{% + \hfil\it#\hfil&\hfil#\hfil&#&\hfil\$#\cr + 美国&\hidewidth 华盛顿&美元&1.00\cr + 法国&巴黎&法朗&0.174\cr + 以色列&耶路撒冷&新谢克尔&0.507\cr + 日本&东京&日元&0.0829\cr} +\endexample +\enddesc + +\begindesc +\cts everycr {\param{token list}} +\explain +%\TeX\ expands \<token list> whenever it executes +%a |\cr|---at the end of every preamble, +%at the end of every row of a horizontal alignment, +%and at the end of every column of a vertical alignment. +%The |\everycr| commands are expanded just after the |\cr|. +%Thus you can cause \TeX\ to +%execute certain commands at the end of a preamble, row, or column by +%assigning a list of those commands to |\everycr|. +无论什么时候,当 \TeX\ 遇到处于每个导言结尾处、水平阵列的每行结尾处以及竖直阵列的每列结尾处的|\cr| 时,它扩展 \<token list>。|\everycr| 只在 |\cr| 后扩展。因此,你可以通过向 |\everycr| 赋与导言、行、列相关列表,引导 \TeX\ 在导言、行或列的结尾处执行特定的命令。 + +%The |\everycr| tokens shouldn't include any commands other than |\no!-align|. +%That's because +%the |\everycr| tokens will reappear after the last +%|\cr| of the alignment. A command other than +%|\noalign| will then make \TeX\ think that it's starting a new +%row or column. +%\TeX\ will complain about a missing |\cr|, insert +%a |\cr|, insert the |\everycr| tokens again, and repeat these actions +%indefinitely. +|\everycr| 的记号不应该包括 |\no!-align| 以外的任何命令。这是因为,|\everycr| 记号会出现在阵列的最后一个 |\cr|。任何一个非 |\no!-align| 命令会导致 \TeX\ 认为它新开了一行或一列,因此,\TeX\ 会报怨丢失了 |\cr|,插入 |\cr|,再次插入 |\everycr| 记号,并且无限地重复这些动作。 + +\example +\everycr={\noalign{\smallskip\hrule\smallskip}} +\halign{#\tabskip = 11pt&\hfil#\hfil&\hfil#\hfil + \tabskip = 0pt\cr + $1$&一&第一\cr + $2$&二&第二\cr + $3$&三&第三\cr} +| +\produces +\medskip +\everycr={\noalign{\smallskip\hrule\smallskip}} +\halign{#\tabskip = 11pt&\hfil#\hfil&\hfil#\hfil + \tabskip = 0pt\cr + $1$&一&第一\cr + $2$&二&第二\cr + $3$&三&第三\cr} +\endexample + +%\eix^^{alignments//commands for} +%\enddesc +\eix^^{阵列//用于阵列的命令} +\enddesc + +\enddescriptions + +\ifoldeplain\else\ifcompletebook\else +\vskip4em{\sectionfonts\leftline{本章索引}} +\readindexfile{i} +\fi\fi + +\endchapter +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/pages.tex b/Master/texmf-dist/doc/plain/impatient-cn/pages.tex new file mode 100644 index 00000000000..108d267168d --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/pages.tex @@ -0,0 +1,1646 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\chapter {Commands for \linebreak composing pages} +\chapter {组页命令} + +\chapterdef{pages} + +这个章节介绍了与页, 页的组成部分以及输出程序相关的命令. +本章写作惯例的说明可以在\headcit{命令描述}{cmddesc}中找到. + +\begindescriptions + +%========================================================================== +%\section {Interline and interparagraph spaces} +\section {行间距和段间距} + +\begindesc +\cts baselineskip {\param{glue}} +\cts lineskiplimit {\param{dimen}} +\cts lineskip {\param{glue}} +\explain +%^^{line spacing} +%\bix^^{interline glue} +%\bix^^|\baselineskip| +%\bix^^|\lineskip| +%\bix^^|\lineskiplimit| +%These three parameters jointly determine how much space \TeX\ leaves between +%consecutive \minref{box}es of an ordinary \minref{vertical list}, +%e.g., the lines of a paragraph. +%This space is called ``\minref{interline glue}''. +%It is also inserted between the component boxes of a vbox constructed in +%internal vertical mode. +%^^{vboxes//interline glue for} +% +%In the usual case, when the boxes aren't abnormally high or deep, \TeX\ +%makes the distance from the baseline of one box to the baseline of the +%next one equal to |\baselineskip|. It does this by inserting interline +%glue equal to |\baselineskip| minus the depth of the upper box (as given +%by ^|\prevdepth|) and the height of the lower box. But if this +%interline glue would be less than |\lineskiplimit|, indicating that the +%two boxes are too close together, \TeX\ inserts the |\lineskip| glue +%instead.\footnote +%{\TeX\ actually accounts for the beginning of a +%vertical list by setting |\prevdepth| to $-1000$\pt\ and testing +%|\prevdepth| before \emph{every} box. If |\prevdepth|$\>\le-1000$\pt\ +%it does not insert any interline glue.} See \knuth{pages~79--80} for a +%precise description. +% +%Note that |\baselineskip| and |\lineskip| measure \emph{different +%things}: the distance between baselines on the one hand and the distance +%between the bottom of one box and the top of the next box on the other +%hand. See \knuth{page~78} for further details. The first example below +%shows the effects of |\lineskiplimit|. +% +%You can obtain the effect of ^{double spacing} by doubling the value +%of |\baselineskip| as illustrated in the second example below. +%A change to |\baselineskip| at any point before the end of a paragraph affects +%the entire paragraph. +^^{行间距} +\bix^^{行间粘连} +\bix^^|\baselineskip| +\bix^^|\lineskip| +\bix^^|\lineskiplimit| +在一个普通\minref{竖直列}(例如段落各行)中, +这三个参数共同确定了 \TeX\ 在相邻两个\minref{盒子}间插入的间隔。 +这个间隔称为“\minref{行间粘连}”。 +对于内部竖直模式中构造的竖直盒子,其中的组成盒子间同样会有此间隔。 +^^{竖直盒子//竖直盒子的行间粘连} + +在通常情况下,盒子的高度和深度不会太大, +此时 \TeX\ 让相邻盒子的两基线距离等于 |\baselineskip|。 +为此可以让行间粘连等于 |\baselineskip| 减去上盒子深度(由 ^|\prevdepth| 给出)% +和下盒子高度。 +但如果两个盒子靠得太近,即行间粘连小于 |\lineskiplimit|, +\TeX\ 将改为插入 |\lineskip| 大小的间距。\negthinspace\footnote +{\TeX\ 实际上在竖直列开头设定 |\prevdepth| 为 $-1000$\pt , +从而可以测定\emph{每个}盒子的 |\prevdepth|。 +若 |\prevdepth|$\>\le-1000$\pt , +它就不会插入任何行间粘连。}详情可见 \knuth{第~79--80~页}。 + +注意 |\baselineskip| 和 |\lineskip| 测量\emph{不同的东西}: +前者为两盒子基线之间的距离, +而后者为上盒子底部和下盒子顶部的距离。 +详情可看 \knuth{第~78~页}。 +下面第一个例子展示了|\lineskiplimit| 的作用。 + +如下面第二个例子所示,将 |\baselineskip| 加倍, +就能得到^{双倍行距}的效果。 +在段落结束前任何位置改变 |\baselineskip|,都会影响整个段落。 +\example +\baselineskip = 11pt \lineskiplimit = 1pt +\lineskip = 2pt plus .5pt +Sometimes you'll need to typeset a paragraph that has +tall material, such as a mathematical formula, embedded +within it. An example of such a formula is $n \choose k$. +Note the extra space above and below this line as +compared with the other lines. +(If the formula didn't project below the line, +we'd only get extra space above the line.) +| +\produces +\baselineskip = 11pt \lineskiplimit = 1pt +\lineskip = 2pt plus .5pt +Sometimes you'll need to typeset a paragraph that has +tall material, such as a mathematical formula, embedded +within it. An example of such a formula is $n \choose k$. +Note the extra space above and below this line as +compared with the other lines. +(If the formula didn't project below the line, +we'd only get extra space above the line.) +\endexample + +\example +\baselineskip = 2\baselineskip % Start double spacing. +| +\endexample + +%\eix^^{interline glue} +%\eix^^|\baselineskip| +%\eix^^|\lineskip| +%\eix^^|\lineskiplimit| +%\enddesc +\eix^^{行间粘连} +\eix^^|\baselineskip| +\eix^^|\lineskip| +\eix^^|\lineskiplimit| +\enddesc + +\begindesc +\cts prevdepth {\param{dimen}} +\explain +%When \TeX\ adds a box to a vertical list, it sets |\prevdepth| to the +%depth of that box. \TeX\ sets |\prevdepth| to $-1000$\pt\ at the start +%of a vertical list, indicating that the usual interline glue should be +%suppressed. +当 \TeX\ 将盒子添加到竖直列时,它设定 |\prevdepth| 为该盒子的深度。 +在竖直列的开始, \TeX\ 设定 |\prevdepth| 为 $-1000$\pt\ ,这表示不添加行间粘连。 +\enddesc + +\begindesc +\cts normalbaselineskip {\param{glue}} +\cts normallineskiplimit {\param{dimen}} +\cts normallineskip {\param{glue}} +\cts normalbaselines {} +\explain +%The three parameters contain values for |\base!-line!-skip|, +%|\line!-skip|, and |\line!-skip!-limit| respectively. +%^^|\baselineskip| ^^|\lineskip| ^^|\lineskiplimit| +%The |\normalbaselines| command sets |\base!-line!-skip|, +%|\line!-skip|, and |\line!-skip!-limit| to the values contained in the +%three parameters. +前三个参数分别包含 |\base!-line!-skip|,|\line!-skip| 和 |\line!-skip!-limit| 的值。 +^^|\baselineskip| ^^|\lineskip| ^^|\lineskiplimit| +而 |\normalbaselines| 命令将 |\base!-line!-skip|,|\line!-skip| 和 |\line!-skip!-limit| +分别设定为这三个参数的值。 +\enddesc + +\begindesc +\cts offinterlineskip {} +\explain +%This command tells \TeX\ to stop inserting interline glue from +%now on. Unless you want it to be in effect for the rest of the document +%(which you probably don't), you should enclose it in a group +%together with the text you want it to affect. +%Its main purpose is to let you do interline spacing yourself, +%e.g., using ^{struts}, +%without interference from \TeX's normal interline glue. +%|\offinterlineskip| is often useful when +%you're constructing a horizontal \minref{alignment}. +%^^{alignments//using \b\tt\\offinterlineskip\e\ in} +此命令让 \TeX\ 从此之后停止插入行间粘连。除非你希望对文档的剩余部分都生效(你多半不希望), +你应该将此命令和你希望生效的文本放在一个编组中。 +它的主要用处在于可以让你自己处理行间空隙,比如用^{支架}(struts), +而不影响 \TeX\ 的正常行间粘连。在构造水平\minref{阵列}时经常会用到|\offinterlineskip|。 +^^{阵列//在其中使用 \b\tt\\offinterlineskip\e} +\example +\def\entry#1:#2 {\strut\quad#1\quad&\quad#2\quad\cr} +\offinterlineskip \tabskip = 0pt \halign{% +\vrule\quad\hfil#\hfil\quad\vrule& + \quad\hfil#\hfil\quad\vrule\cr +\noalign{\hrule} +\vphantom{\vrule height 2pt}&\cr \noalign{\hrule} +\entry \it Opera:\it Composer +\vphantom{\vrule height 2pt}&\cr \noalign{\hrule} +\vphantom{\vrule height 2pt}&\cr +\entry Fidelio:Beethoven +\entry Peter Grimes:Britten +\entry Don Giovanni:Mozart +\vphantom{\vrule height 2pt}&\cr \noalign{\hrule}} +| +\produces +\medskip +\def\entry#1:#2 {\strut\quad#1\quad&\quad#2\quad\cr} +\offinterlineskip \tabskip = 0pt \halign{% +\vrule\quad\hfil#\hfil\quad\vrule& + \quad\hfil#\hfil\quad\vrule\cr +\noalign{\hrule} +\vphantom{\vrule height 2pt}&\cr \noalign{\hrule} +\entry \it Opera:\it Composer +\vphantom{\vrule height 2pt}&\cr \noalign{\hrule} +\vphantom{\vrule height 2pt}&\cr +\entry Fidelio:Beethoven +\entry Peter Grimes:Britten +\entry Don Giovanni:Mozart +\vphantom{\vrule height 2pt}&\cr \noalign{\hrule}} +\endexample +\enddesc + +\begindesc +\cts nointerlineskip {} +\explain +%This command tells \TeX\ not to insert interline glue in front of the +%next line. +%It has no effect on subsequent lines. +此命令让 \TeX\ 停止在下一行插入行间粘连。它不影响后续其他行。 +\enddesc + +\begindesc +\cts openup {\<dimen>} +\explain +%This command increases ^|\baselineskip| by \<dimen>. +%An |\openup| command before the end of a paragraph affects +%the entire paragraph, so you shouldn't use |\openup| to +%change |\baseline!-skip| within a paragraph. |\openup| is +%most useful for typesetting tables and math displays---a +%little extra space between rows often makes them more readable. +%^^{alignments//space between rows of} +此命令让 ^|\baselineskip| 增加 \<dimen>。 +在段尾之前的 |\openup| 命令将影响整个段落, +因此想在段落中间改变 |\baseline!-skip| 时不要用 |\openup| 命令。 +在排版表格和陈列公式时 |\openup| 非常有用——多点间隔将会增加它们的可读性。 +^^{阵列//各行之间的间隔} +\example +Alice picked up the White King very gently, and lifted him +across more slowly than she had lifted the Queen; but before +she put him on the table, she thought she might well dust +him a little, he was so covered with ashes. +\openup .5\baselineskip % 1.5 linespacing. +| +\produces +Alice picked up the White King very gently, and lifted him +across more slowly than she had lifted the Queen; but before +she put him on the table, she thought she might well dust +him a little, he was so covered with ashes. +\openup .5\baselineskip %1.5 linespacing +\endexample\enddesc + +%========================================================================== +\section{分页} %\section {Page breaks} + +%========================================================================== +%\subsection {Encouraging or discouraging page breaks} +\subsection{鼓励或阻碍分页} + +%\begindesc +%\bix^^{page breaks} +%\bix^^{page breaks//encouraging or discouraging} +%\ctspecial break {} \xrdef{vbreak} +%\explain +\begindesc +\bix^^{分页} +\bix^^{分页//鼓励或阻碍分页} +\ctspecial break {} \xrdef{vbreak} +\explain +% +\margin{Four commands identical to ones for line breaks (\xref{hbreak}) +have been added to correct an omission. The descriptions are exactly parallel.} +% +%This command forces a page break. +%Unless you do something to fill out the page, you're likely to +%get an underfull vbox. +%|\break| can also be used in horizontal mode. +此命令强制在此处分页。除非用某种方式填满该页,你将得到一个松散的 vbox。 +|\break| 也能用在水平模式中。 +\enddesc + +\begindesc +\ctspecial nobreak {} \xrdef{vnobreak} +\explain +%This command prevents a page break where it +%otherwise might occur. +%|\nobreak| can also be used in horizontal mode. +此命令阻止在此处分页。 +|\nobreak| 也能用在水平模式中。 +\enddesc + +\begindesc +\ctspecial allowbreak {} \xrdef{vallowbreak} +\explain +%This command tells \TeX\ to +%allow a page break where one could not ordinarily occur. +%|\allowbreak| can also be used in horizontal mode. +在通常不分页的地方允许 \TeX\ 分页。 +|\allowbreak| 也能用在水平模式中。 +\enddesc + +\begindesc +\ctspecial penalty {\<number>} \xrdef{vpenalty} +\explain +%This command produces a \minref{penalty} item. +%The penalty item makes \TeX\ more or less willing to break a page +%at the point where that item occurs. +%A negative penalty, i.e., a bonus, encourages a page break; +%a positive penalty discourages a page break. +%A penalty of $10000$ or more prevents a break altogether, +%while a penalty of $-10000$ or less forces a break. +%|\penalty| can also be used in horizontal mode. +此命令生成一个惩罚(\minref{penalty})项。 +惩罚项使得 \TeX\ 或多或少愿意在此处分页。 +负惩罚值,实际上是奖励值,鼓励分页;正惩罚值阻碍分页。 +大于或等于 $10000$ 的惩罚值彻底阻止分页, +而小于或等于 $-10000$ 的惩罚值强制分页。 +此命令也能用于水平模式。 +\example +\def\break{\penalty-10000 } % as in plain TeX +\def\nobreak{\penalty10000 } % as in plain TeX +\def\allowbreak{\penalty0 } % as in plain TeX +| +\endexample +\enddesc + +\begindesc +\cts goodbreak {} +\explain +%This command ends a paragraph and also indicates to \TeX\ that +%this is a good place to break the page. +此命令结束当前段落,并告诉 \TeX\ 这里是一个合适的分页位置。 +\enddesc + +\begindesc +\cts smallbreak {} +\cts medbreak {} +\cts bigbreak {} +\explain +%These commands indicate increasingly desirable places for \TeX\ to +%break a page. They also cause \TeX\ to +%insert a ^|\smallskip|, ^|\medskip|, or +%^|\bigskip| (\xref \smallskip) if the page break doesn't actually +%happen. \TeX\ suppresses this skip if it occurs just after an +%equal or larger skip. +这些命令指明了越来越合适的分页位置。如果实际上没在此处分页,\TeX\ 将分别 +插入大小为 ^|\smallskip|,^|\medskip| 或 ^|\bigskip| 的间距(\xref \smallskip )。 +但如果此位置之前已经有大于或等于此值的间距,\TeX\ 就不会再插入间距。 +\enddesc + +\begindesc +\easy\cts eject {} +\cts supereject {} +\explain +%These commands force a page break at the current position +%and end the current paragraph. +%If you don't precede them with |\vfil| (\xref \vfil), +%^^|\vfil//needed with {\tt\\eject}| +%\TeX\ will try to stretch out the page contents +%(and will probably complain about an underfull vbox). +%The |\supereject| command, in addition, +%instructs the \plainTeX\ output routine to +%force out any leftover insertions, +%^^{insertions//forced out by \b\tt\\supereject\e} +%such as long footnotes, +%so that they are produced before any more input +%is processed. Thus |\supereject| is a good command to use at the end of each +%chapter or other major unit of your document. +这两个命令将结束当前段落并强制在当前位置分页。如果你不在前面加上 +|\vfil| (\xref \vfil),^^|\vfil//在 {\tt\\eject} 时需要| +\TeX\ 将试着将伸展页面内容(很可能会警告有松散的竖直盒子)。 +|\supereject| 命令还让 \plainTeX\ 输出例行程序处理剩下的插入项, +^^{插入项//用 \b\tt\\supereject\e 强制排版}例如长脚注, +在处理其他输入之前生成它们。因而, +|\supereject| 更适合在文档各章或主要单元结束时使用。 +\enddesc + +\begindesc +\cts filbreak {} +\explain +%This command provides a kind of conditional page break. +%It tells \TeX\ to +%break the page---but not if the text up to a later |\filbreak| also +%fits on the same page. +%By enclosing a paragraph in a pair of |\filbreak|s, +%you can ensure that \TeX\ will keep a paragraph on a single page if it can. +%You should not use |\filbreak| within a paragraph, since it +%forces \TeX\ into vertical mode and thus ends the paragraph. +%See \xrefpg{filbreak} for more advice on this subject. +此命令规定了有条件的分页。它告诉 \TeX\ ,如果后面的 |\filbreak| 不能放在同一页,就在此处分页。 +用一对 |\filbreak| 将一个段落围起来,就可以确保 \TeX\ 尽量将该段落放在同一页。 +不要在段落中间使用 |\filbreak|,因为这将让 \TeX\ 进入竖直模式,从而结束该段落。 +在 \xrefpg{filbreak} 中有此主题的更多建议。 +\enddesc + +\begindesc +\cts raggedbottom {} +\cts normalbottom {} +\explain +%Normally \TeX\ tries hard to ensure that all pages have the same depth, +%i.e., that their bottom margins are equal. +%The |\raggedbottom| command tells \TeX\ to +%allow some variability among the bottom margins on different pages. +%It's often appropriate to use |\raggedbottom| when you have material that +%contains large blocks of material that should not be split across pages. +%The |\normalbottom| command cancels the effect of |\raggedbottom|. +%\eix^^{page breaks//encouraging or discouraging} +通常 \TeX\ 会尽全力让每页都一样高,即让它们的下边距相等。 +|\raggedbottom| 命令允许 \TeX\ 给不同页面的下边距一些差别。 +如果文档中有些不能跨页的大型内容,用 |\raggedbottom| 就比较合适。 +用 |\normalbottom| 命令可以取消 |\raggedbottom| 的效果. +\eix^^{分页//鼓励或阻碍分页} +\enddesc + +%========================================================================== +%\subsection {Page breaking parameters} +\subsection{分页参数} + +%\bix^^{page breaks//parameters for} +%\begindesc +%\cts interlinepenalty {\param{number}} +%\explain +%This parameter specifies the \minref{penalty} for +%breaking a page between the lines of a paragraph. +%By setting it to $10000$ you can force all page breaks to occur +%between paragraphs, provided that the pages have enough stretch so +%that \TeX\ can still compose them decently. +%\PlainTeX\ leaves |\inter!-linepenalty| at~$0$. +\bix^^{分页//分页参数} +\begindesc +\cts interlinepenalty {\param{number}} +\explain +此参数设定在段落内部各行间分页时的\minref{惩罚}值。 +将它设为 $10000$ 将强制在段落之间分页, +只要页面中有足够的伸展值让 \TeX\ 排版。 +\PlainTeX\ 设定 |\inter!-linepenalty| 为 ~$0$。 +\enddesc + +\begindesc +\cts clubpenalty {\param{number}} +\explain +%^^{club line} +%This parameter specifies the \minref{penalty} for +%breaking a page just after the first line of a paragraph. +%A line by itself at the bottom of a page is called a ``club line''. +%\PlainTeX\ sets |\clubpenalty| to $150$. +^^{孤行} +此参数设定在段落首行之后分页的\minref{惩罚}值。 +页面底部的单独一行称为``孤行''。 +\PlainTeX\ 设定 |\clubpenalty| 为 $150$。 +\enddesc + +\begindesc +\cts widowpenalty {\param{number}} +\explain +%^^{widow line} +%This parameter specifies the \minref{penalty} for +%breaking a page just before the last line of a paragraph. +%A line by itself at the top of a page is called a ``widow line''. +%\PlainTeX\ sets |\widowpenalty| to $150$. +^^{寡行} +此参数设定在段落尾行之前分页的\minref{惩罚}值。 +页面顶部的单独一行称为``寡行''。 +\PlainTeX\ 设定 |\widowpenalty| 为 $150$。 +\enddesc + +\begindesc +\cts displaywidowpenalty {\param{number}} +\explain +%^^{widow line}^^{math display} +%This parameter specifies the \minref{penalty} for +%breaking a page just before the last line of a partial paragraph +%that immediately precedes a math display. +%\PlainTeX\ sets |\displaywidowpenalty| to $50$. +^^{寡行}^^{陈列公式} +此参数设定在陈列公式上一行同时也是段落尾行之前分页的\minref{惩罚}值。 +\PlainTeX\ 设定 |\displaywidowpenalty| 为 $50$. +\enddesc + +\begindesc +\cts predisplaypenalty {\param{number}} +\explain +%^^{math display} +%This parameter specifies the \minref{penalty} for +%breaking a page just before a math display. +%\PlainTeX\ sets |\predisplaypenalty| to $10000$. +^^{陈列公式} +此参数设定在陈列公式之前分页的\minref{惩罚}值。 +\PlainTeX\ 设定\break |\pre!-display!-penalty| 为 $10000$。 +\enddesc + +\begindesc +\cts postdisplaypenalty {\param{number}} +\explain +%^^{math display} +%This parameter specifies the \minref{penalty} for +%breaking a page just after a math display. +%\PlainTeX\ leaves |\postdisplaypenalty| at $0$. +^^{陈列公式} +此参数设定在陈列公式之后分页的\minref{惩罚}值。 +\PlainTeX\ 设定\break |\postdisplaypenalty| 为 $0$。 +\enddesc + +\begindesc +\cts brokenpenalty {\param{number}} +\explain +%This parameter specifies the \minref{penalty} for +%breaking a page just after a line that ends in +%a discretionary item (usually a hyphen). +%^^{hyphenation} +%|\brokenpenalty| applies to page breaking, while +%^|\hyphenpenalty| \ctsref{\hyphenpenalty} applies to line breaking. +%\PlainTeX\ sets |\brokenpenalty| to $100$. +此参数设定在以自定连字项(通常是一个连字符)结尾的一行之后分页的\minref{惩罚}值。 +^^{连字} +|\brokenpenalty| 用于分页, 而 ^|\hyphenpenalty| \ctsref{\hyphenpenalty} 用于断行。 +\PlainTeX\ 设定 |\brokenpenalty| 为 $100$. +\enddesc + +\begindesc +\cts insertpenalties {\param{number}} +\explain +%\bix^^{insertions//penalties for} +%\bix^^{floating material} +%This parameter contains the sum of certain penalties \minrefs{penalty} +%that \TeX\ accumulates as it is placing insertions onto the +%current page. +%These penalties are incurred when \TeX\ is processing an |\insert| +%command +%and discovers that a previous insertion of the same kind on this page has +%been split, leaving part of it for subsequent pages. +%See \knuth{pages~123--125} for the details of this +%calculation. +% +%\margin{Material moved from a footnote to the main text.} +%|\insertpenalties| has an entirely different meaning during an +%^^{output routine//meaning of \b\tt\\insertpenalties\e\ in} +%output routine---it's the number of insertions that have been seen +%but that don't fit on the current page (see \knuth{page~125}). +\bix^^{插入项//插入项的惩罚} +\bix^^{浮动体} +此参数包含 \TeX\ 放置插入项到当前页面时所累积的某些\minref{惩罚}值之和。 +在 \TeX\ 处理 |\insert| 命令时, +如果发现前面有同类型插入项被分开,留下一部分到之后的页面, +就会算上这些惩罚值。 +详细的计算过程可以见 \knuth{第~123--125~页}。 + +\margin{Material moved from a footnote to the main text.} +在输出例行程序中, +^^{输出例行程序//\b\tt\\insertpenalties\e\ 的意义} +|\insertpenalties| 有完全不同的意义—— +它表示已经见到但未能放入当前页的插入项的总数(见 \knuth{第~125~页})。 +\enddesc + +\begindesc +\cts floatingpenalty {\param{number}} +\explain +%This parameter specifies the \minref{penalty} that +%\TeX\ adds to |\insertpenalties| +%^^|\insertpenalties| +%when the page builder is adding an insertion to the current page +%and discovers that a previous insertion of the same kind on this page has +%been split, leaving part of it for subsequent pages. +%\PlainTeX\ leaves |\floatingpenalty| at~$0$. +%\eix^^{insertions//penalties for} +%\eix^^{floating material} +在 \TeX\ 处理插入项时, +如果发现前面有同类型插入项被分开,留下一部分到之后的页面, +就会添加 |\floatingpenalty| \minref{惩罚}值到|\insertpenalties| +^^|\insertpenalties|。 +\PlainTeX\ 设定 |\floatingpenalty| 为 $0$。 +\eix^^{插入项//插入项的惩罚} +\eix^^{浮动体} +\enddesc + +\begindesc +\cts pagegoal {\param{dimen}} +\explain +%This parameter specifies the +%desired height for the current page. +%\TeX\ sets +%|\pagegoal| to the current value of |\vsize| +%when it first puts a box or an insertion on the current page. +%You can shorten a page while \TeX\ is working on it by +%changing the value of |\pagegoal|---even if the new value is +%less than the height of the material already on that page. +%\TeX\ will just put the extra material on the next page. +%But remember---|\pagegoal| is reset to |\vsize| again when \TeX\ +%starts the next page. +此参数设定当前页面所需的高度。 +当放入第一个盒子或者插入项到当前页面时, +\TeX\ 设定 |\pagegoal| 等于 |\vsize| 的当前值。 +改变 |\pagegoal| 的值可以让 \TeX\ 排版时缩短该页面的高度。 +即使新的值比页面已有内容的高度还小也可以, +此时 \TeX\ 将把多余的内容放在下一页。 +但记住——在下一页 \TeX\ 还是会重置 |\pagegoal| 为 |\vsize|。 +\enddesc + +\begindesc +\cts pagetotal {\param{dimen}} +\explain +%This parameter specifies the +%accumulated natural height of the current page. +%\TeX\ updates |\pagetotal| as it adds +%items to the main \minref{vertical list}. +此参数表示当前页面累积的自然高度。 +\TeX\ 添加内容到\minref{竖直列}时会更新 |\pagetotal| 的值。 +\enddesc + +\begindesc +\cts pagedepth {\param{dimen}} +\explain +%This parameter specifies the depth of the current page. +%\TeX\ updates |\pagedepth| as it adds +%items to the main \minref{vertical list}. +此参数表示当前页面的深度。 +\TeX\ 添加内容到\minref{竖直列}时会更新 |\pagedepth| 的值。 +\enddesc + +\begindesc +\cts pageshrink {\param{dimen}} +\explain +%This parameter specifies the amount of \minref{shrink} +%in the accumulated \minref{glue} on the current page. +%\TeX\ updates |\pageshrink| as it adds +%items to the main \minref{vertical list}. +此参数表示当前页面累积的粘连的可收缩量。 +\TeX\ 添加内容到\minref{竖直列}时会更新 |\pageshrink| 的值。 +\enddesc + +\begindesc +\cts pagestretch {\param{dimen}} +\cts pagefilstretch {\param{dimen}} +\cts pagefillstretch {\param{dimen}} +\cts pagefilllstretch {\param{dimen}} +\explain +%These four parameters together specify the amount of \minref{stretch} +%in the \minref{glue} on the current page. The amount of stretch has +%the form +%{\def\f#1{\hbox{\tt fi#1}}% +%$n_0 + n_1\f{l} + n_2\f{ll} + n_3\f{lll}$}, with the four parameters +%giving the values of the four $n_i$. +%\TeX\ updates these parameters as it adds +%items to the main \minref{vertical list}. +% +%\eix^^{page breaks//parameters for} +%\eix^^{page breaks} +这四个参数合起来表示当前页面累积的粘连的可伸长量。可伸长量总共等于 +{\def\f#1{\hbox{\tt fi#1}} +$n_0 + n_1\f{l} + n_2\f{ll} + n_3\f{lll}$}, +其中四个参数给出四个$n_i$的值。 +\TeX\ 添加内容到\minref{竖直列}时会更新这些参数的值。 +\eix^^{分页//分页参数} +\eix^^{分页} +\enddesc + +%========================================================================== +%\section{Page layout} +\section{页面布局} + +%\subsection {Page description parameters} +\subsection {页面描述参数} + +\begindesc +\bix^^{页面尺寸} +\margin{This command was also described in the `Paragraphs' section. +The combined description now appears there.} +\aux\cts hsize {\param{dimen}} +\explain +%This parameter specifies the current line length. +%See \xrefpg{\hsize} for a more complete explanation. +此参数指定当前行的长度。\PlainTeX\ 设定 |\hsize| 为 |6.5in|。 +在\xrefpg{\hsize} 有完整的解释。 +\enddesc + +\begindesc +\cts vsize {\param{dimen}} +\explain +%This parameter specifies the current vertical extent of a page. +%\TeX\ examines it only when it is starting a page. Thus if you change +%|\vsize| in the +%middle of a page, your change won't affect anything until the following page. +%If you want to change the vertical extent of a page when +%you're in the middle of it, you should assign the new +%height to ^|\pagegoal| (\xref \pagegoal) instead. (If you +%want the change to affect the following pages too, you should +%change \emph{both} |\vsize| and |\pagegoal|.) +%\PlainTeX\ sets |\vsize| to |8.9in|. +%\eix^^{page dimensions} +此参数指定页面的竖直长度。 +\TeX\ 仅在页面开始时检查此值。 +因此,在页面中间改变 |\vsize| 到下一页才会生效。 +若要在页面中间改变其竖直长度,应该修改 ^|\pagegoal|(\xref \pagegoal )的值。% +(若要改变当前页面开始的所有页面,你需要\emph{同时}修改 |\vsize| 和 |\pagegoal|。) +\PlainTeX\ 设定 |\vsize| 为 |8.9in|。 +\eix^^{页面尺寸} +\enddesc + +%\begindesc +%\cts hoffset {\param{dimen}} +%\cts voffset {\param{dimen}} +%\margin{These commands were moved up from later in the subsection.} +%^^{page origin} +%\idxsee{origin}{page origin} +%\explain +%\TeX\ normally takes the ``origin'' of a page, that is, the point where +%it starts printing, as being one inch down from the top of the page and one +%inch to the right of the left end of the page.\footnote{ +%\TeX\ itself is indifferent to where the origin of the page is, +%but this information has to be built into the device drivers +%^^{device drivers//page origin known to} +%that convert \dvifile s into printable form so that different devices +%will yield the same results.} +%The values of |\hoffset| and +%|\voffset| give the horizontal and vertical offset of the actual origin +%from this point. Thus if |\hoffset| and |\voffset| are both +%zero, \TeX\ uses its normal origin. +\begindesc +\cts hoffset {\param{dimen}} +\cts voffset {\param{dimen}} +\margin{These commands were moved up from later in the subsection.} +^^{页面起点} +\idxsee{origin}{page origin} +\explain +\TeX\ 通常设定页面的“起点”——即它开始打印的地方——在离上页边和左页边均为一英寸的地方。\footnote{ +\TeX\ 本身并不关心页面起点的位置, +但设备驱动程序将 \dvifile 转换为可打印形式时要用到, +此位置信息使得在不同的设备中能得到相同的结果。 +^^{设备驱动//它所知的页面起点}} +|\hoffset| 和 |\voffset| 的值分别给出实际起点相对该点的水平和竖直偏移量。 +因此,若 |\hoffset| 和 |\voffset| 均为零,\TeX\ 就使用正常起点。 +\example +\hoffset = -.3in + % Start printing .7 inches from left edge of paper. +\voffset = 1in + % Start printing 2 inches from top edge of paper. +| +\endexample +\enddesc + +\begindesc +\cts topskip {\param{glue}} +\explain +%\TeX\ inserts glue at the top of each +%page in order to ensure that the baseline of the first box on the page +%always is the same distance $d$ from the top of the page. +%|\topskip| determines the amount of that glue, +%called the ``|\topskip| glue'', by specifying +%what $d$ should be (provided that the first box +%on the page isn't too tall). +%$d$ is given by the natural size of the |\topskip| glue. +%If the height of the first box on the page exceeds $d$, +%so that the glue would be negative, \TeX\ simply inserts no +%|\topskip| glue at all on that page. +为确保页面第一个盒子的基线到上页边的距离总是 $d$, +\TeX\ 在每个页面顶部都插入粘连。 +|\topskip| 给出了 $d$ 的值,以此确定该粘连大小 +(只要页面第一个盒子不会太高)。 +$d$ 等于 |\topskip| 粘连的自然大小。 +如果页面第一个盒子的高度超过 $d$, +计算出的粘连将为负值,此时在该页顶部 \TeX\ 不插入|\topskip|粘连。 + +%To understand better the effect of these rules, assume that |\topskip| +%has no stretch or shrink and that the first item on the page is indeed a box. +%Then if the height of that box is no greater than |\topskip|, +%its baseline will be |\topskip| +%from the top of the page independently of its height. On the other hand, +%if the height of the box is $e$ greater than |\topskip|, its baseline will be +%|\topskip|\tplus$e$ from the top of the page. +%See \knuth{pages~113--114} for the remaining details of how +%|\topskip| works. +%\PlainTeX\ sets |\topskip| to |10pt|. +为更好地理解这些规则,我们假设 |\topskip| 无伸长量也无收缩量,且页面第一项就是个盒子。 +如果该盒子的高度不大于 |\topskip|,不管高度为多少, +它的基线和上页边的距离就始终等于 |\topskip|。 +反过来,如果该盒子的高度比 |\topskip| 大 $e$, +它的基线和上页边的距离就是 |\topskip|\tplus$e$。 +在 \knuth{第~113--114~页} 中详细解释了 |\topskip| 的作用。 +\PlainTeX\ 设定 |\topskip| 为 |10pt|。 +\enddesc + +\begindesc +\cts parskip {\param{glue}} +\explain +%This parameter specifies the ``^{paragraph skip}'', i.e., the +%vertical glue that \TeX\ inserts at the start of a paragraph. +%^^{paragraphs//glue between} +%See |\par| (\xref{\@par}) for more information about what happens +%when \TeX\ starts a paragraph. +%\PlainTeX\ sets |\parskip| to |0pt plus 0.1pt|. +此参数设定“^{段落间距}”,即 \TeX\ 在段落开头插入的竖直粘连。 +^^{段落//段落间的粘连} +在 |\par| (\xref{\@par}) 那里介绍了 \TeX\ 开始新段落时所作的事情。 +\PlainTeX\ 设定 |\parskip| 为 |0pt plus 0.1pt|。 +\enddesc + +\begindesc +\cts maxdepth {\param{dimen}} +\explain +%This parameter specifies the maximum depth of the bottom \minref{box} on +%a page. It is related to |\boxmaxdepth| (\xref \boxmaxdepth). If the +%depth of the bottom box on a page exceeds |\maxdepth|, \TeX\ moves the +%box's reference point down so that it's +%|\maxdepth| from the bottom of that box. +%Without this adjustment, the bottom box on +%a page could extend well into the bottom margin or even off +%the page entirely. \PlainTeX\ sets |\maxdepth| to |4pt|. +此参数设定页面底部\minref{盒子}的最大深度。 +它和 |\boxmaxdepth| 参数(\xref \boxmaxdepth )也有关系. +如果底部盒子的深度超过 |\maxdepth|, +\TeX\ 下移该盒子的基准点,让深度就等于 |\maxdepth|。 +若不作此调整,页面底部盒子可能大大超出下边距,甚至超出页面, +PlainTeX\ 设定 |\maxdepth| 为 |4pt|。 +\enddesc + +%========================================================================== +%\subsection{Page numbers} +\subsection{页码} + +%\begindesc +%\bix^^{page numbering} +%\cts pageno {\param{number}} +%\explain +%This parameter contains the current page number as an integer. The page +%number is normally negative for front-matter pages that are numbered +%with small roman numerals instead of arabic numerals. If you change the +%page number within a page, +%the changed number will be used in any headers or footers that +%appear on that page. +%The actual +%printing of page numbers is handled by \TeX's \minref{output routine}, +%which you can modify. +\begindesc +\bix^^{页码} +\cts pageno {\param{number}} +\explain +此参数以整数值记录当前页码。 +在前页(front matter)中页码通常是负数,我们用小写罗马数字而不用阿拉伯数字编号。 +在页面中间对页码的改动,会在该页的页眉和页脚中用到。 +页码事实上由 \TeX\ 的\minref{输出例行程序}打印,你可以修改它们。 + +%\PlainTeX\ keeps the page number in the \minref{register} ^|\count0|. +%(|\pageno| is, in fact, a synonym for |\count0|.) +%Whenever it ships out a page to the \dvifile, +%^^|\shipout//{\tt\\count} registers displayed at| +%\TeX\ displays the current value of |\count0| on your +%terminal so that you can tell which page it is working on. +%It's possible to use registers |\count1|--|\count9| for nested +%levels of page numbers (you must program this yourself). +%If any of these registers are nonzero, \TeX\ displays them on your +%terminal also.\footnote{ +%More precisely, it displays all registers in sequence from +%|\count0| to |\count9|, but omits trailing zero registers. +%For instance, if the values of |\count0|--|\count3| +%are $(17, 0 , 0, 7)$ and the others are $0$, +%\TeX\ displays the page number as {\tt [17.0.0.7]}.} +\PlainTeX\ 将页码记录在\minref{寄存器} ^|\count0| 中。% +(|\pageno| 实际上就是|\count0|的别名。) +当它输出一个页面到 \dvifile 时, +^^|\shipout//此时显示 {\tt\\count} 寄存器的值| +\TeX\ 在终端中显示 |\count0| 的值,让你知道它在排版哪一页。 +也可以把寄存器 |\count1|--|\count9| 用于嵌套的多级页码 +(但你必须自己编程)。 +如果这些寄存器的值非零,\TeX\ 在终端中也显示它们的值。\footnote{ +更准确来说,它从 |\count0| 到 |\count9| 依次显示各寄存器的值,但忽略末尾的零值。 +比如,若 |\count0| 到 |\count3| 为 $(17, 0 , 0, 7)$ 而其他值都为 $0$, +则 \TeX\ 显示页码为 {\tt [17.0.0.7]}。} +\example +This explanation appears on page \number\pageno\ +of our book. +| +\produces +This explanation appears on page \number\pageno\ +of our book. + +\nextexample +\pageno = 30 % Number the next page as 30. +Don't look for this explanation on page \number\pageno. +| +\produces +Don't look for this explanation on page 30. +\endexample +\enddesc + +\begindesc +\cts advancepageno {} +\explain +%This command adds $1$ to the page number +%$n$ in |\pageno| if $n\ge0$ +%and subtracts $1$ from it if $n<0$. +如果页码 $n\ge0$,此命令给 $n$ 加上 $1$; +如果 $n<0$ 则给 $n$ 减去 $1$。 +\enddesc + +\begindesc +\easy\cts nopagenumbers {} +\explain +%By default, \plainTeX\ produces a footer containing a centered page number. +%This command tells \TeX\ to produce a blank footer instead. +默认情况下,\plainTeX\ 会在页面的页脚生成居中的页码。 +此命令让 \TeX\ 生成空的页脚. +\enddesc + +\begindesc +\cts folio {} +\explain +%This command produces the current page number, whose value is the number +%$n$ contained in ^|\pageno|. +%If $n\ge0$, +%\TeX\ produces $n$ as a decimal number, +%while if $n<0$, +%\TeX\ produces $-n$ in lowercase roman numerals. +此命令生成当前页码,它的值等于记录在 ^|\pageno| 中的 $n$。 +若 $n\ge0$,\TeX\ 用十进制数形式生成 $n$; +若 $n<0$,\TeX\ 用小写罗马数字形式生成 $-n$。 +\example +This explanation appears on page \folio\ of the book. +| +\produces +This explanation appears on page \folio\ of the book. +\endexample + +%\eix^^{page numbering} +%\enddesc +\eix^^{页码} +\enddesc + +%========================================================================== +%\subsection{Header and footer lines} +\subsection{页眉和页脚} + +\begindesc\secondprinting{\vglue-.75\baselineskip\vskip0pt} +\cts headline {\param{token list}} +\cts footline {\param{token list}} +\explain +%These parameters +%contain, respectively, the current headline (header) and the current +%footline (footer). +%The \plainTeX\ output routine +%places the headline at the top of each page and the footline +%at the bottom of each page. +%The default headline is empty and the default footline is a centered +%page number. +这两个参数分别指定当前的页眉和页脚。 +\PlainTeX\ 输出例行程序将把页眉放在各页顶部,页脚放在各页底部。 +默认的页眉为空,而默认的页脚为居中的页码。 + +%The headline and footline should both +%be as wide as |\hsize| (use |\hfil|, \xref{\hfil}, for this +%if necessary). +%You should always include a font-setting command in these lines, since +%the current font is unpredictable when \TeX\ is calling the +%output routine. If you don't set the font explicitly, +%you'll get whatever font \TeX\ was using when it broke the page. +页眉和页脚的宽度应该和 |\hsize| 相等(必要时可以用 |\hfil|,\xref{\hfil})。 +在页眉和页脚中你永远应该加上字体设定命令, +因为你无法预知 \TeX\ 调用输出例行程序时的当前字体。 +如果你不明确指明字体,\TeX\ 将使用分页时所用的字体。 + +%You shouldn't try to use |\headline| or |\footline| +%to produce multiline headers or footers. +%Although \TeX\ won't complain, it will give you something that's very ugly. +%See \xrefpg{bighead} for a method of creating multiline headers or +%footers. +不要试图用 |\headline| 或 |\footline| 生成多行的页眉或页脚。 +即使 \TeX\ 不会报错,它也只会出很难看的结果。 +在\xrefpg{bighead}中有生成多行页眉或页脚的方法。 +\example +\headline = {\tenrm My First Reader\hfil Page \folio} +| +\produces +\pageno = 10 +\line{\tenrm \noindent My First Reader\hfil Page \folio} +\par ({\it at the top of page \folio}\/) +\nextexample +\footline = {\tenit\ifodd\pageno\hfil\folio + \else\folio\hfil\fi} +% Produce the page number in ten-point italic at +% the outside bottom corner of each page. +| +\endexample\enddesc + +%\secondprinting{\vfill\eject} + + +%========================================================================== +%\subsection {Marks} +\subsection {标记} + +\begindesc +\cts mark {\rqbraces{\<text>}} +\explain +%\bix^^{marks} +%This command causes \TeX\ to append a mark +%containing \<mark text> +%to whatever list it is currently constructing. +%Generally you shouldn't use |\mark| within an +%``inner'' construct such as a math formula or a \minref{box} +%you've built with an |\hbox|, |\vbox|, or |\vtop| command, because +%\TeX\ won't see the mark when it's constructing the main box of the page. But +%if you use |\mark| in ordinary horizontal \minref{mode} +%or directly in an hbox that's part of the main vertical list, +%the mark migrates out +%to the main \minref{vertical list}. +%See \knuth{pages~259--260} for examples showing how |\mark| can be used. +\bix^^{标记} +此命令让 \TeX\ 添加内容为 \<mark text> 的标记到当前正构造的列表中。 +一般地,此标记命令不应该在 “内部”构造中使用, +例如数学公式或者用 |\hbox|、|\vbox| 或 |\vtop| 构造的\minref{盒子}。 +这是因为 \TeX\ 构造页面主盒子时将看不到这样的标记。 +但是,若你在普通水平\minref{模式}中用 |\mark|, +或者在主竖直列的 hbox 中直接使用 |\mark|, +该标记将会被转移到主\minref{竖直列}。 +在\knuth{第~259--260~页}中有如何使用 |\mark| 的例子。 +\enddesc + +\begindesc +\cts firstmark {} +\cts botmark {} +\cts topmark {} +\explain +%These commands expand to the mark text in an item generated by an earlier +%^|\mark| command. +%The mark text has the form of a token list. +%\TeX\ sets the values of these commands when it +%finishes placing the contents of a page into ^|\box255|, +%just before calling the \minref{output routine} +%as part of its \minref{page break}ing actions. \TeX\ determines +%these values as follows: +%\ulist\compact +%\li |\firstmark| contains the tokens of the first mark on the page. +%\li |\botmark| contains the tokens of the last mark on the page. +%\li |\topmark| contains the tokens of the mark that is in effect at +%the very top of the page. +%That mark is the last mark +%that \emph{preceded} the page, +%i.e., the |\botmark| of the previous page. +%It is empty if no marks preceded the page. +%\endulist +%\noindent +%If a page has no marks on it, \TeX\ will set |\firstmark| and |\botmark| to +%the same mark as |\topmark|, i.e., the most recent preceding mark. +%The table at the bottom of \knuth{page~258} illustrates the relation among +%|\firstmark|, |\botmark|, and |\topmark|. +这些命令展开为之前用 ^|\mark| 生成的标记项的标记文本。 +标记文本以记号列形式表示。 +执行分页工作时,\TeX\ 需要将页面内容放入 ^|\box255|, +然后调用\minref{输出例行程序}; +在这两个步骤之间 \TeX\ 设定这些命令的值如下: +\ulist\compact +\li |\firstmark| 包含页面第一个标记的记号列。 +\li |\botmark| 包含页面最后一个标记的记号列。 +\li |\topmark| 包含紧跟在页面上边的那个标记的记号列。 +这个标记就是\emph{上一个}页面的最后一个标记,即上一页的 |\botmark|。 +如果上一页没有标记此命令为空。 +\endulist +\noindent +如果此页面没有任何标记,\TeX\ 设定 |\firstmark| 和 |\botmark| 都等于 |\topmark|, +即前面最近的那个标记。 +\knuth{第~258~页}底部的表格说明了 |\firstmark|、|\botmark| 和 |\topmark| 这三者的关系。 +\enddesc + +\begindesc +\cts splitfirstmark {} +\cts splitbotmark {} +\explain +%^^{marks//for split lists} +%These commands expand to the ^{mark text} generated by an earlier +%^|\mark| command that produced an item in the item list of a vbox $V$. +%The mark text has the form of a token list. +%When \TeX\ +%splits $V$ in response to a ^|\vsplit| command (\xref \vsplit), +%it sets the values of these commands as follows: +%\ulist\compact +%\li |\splitfirstmark| contains the tokens of the first mark in +%the item list of $V$. +%\li |\splitbotmark| contains the tokens of the last mark in +%the item list of $V$. +%\endulist +%These commands produce no tokens if there was no preceding |\vsplit|, +%or if the most recent preceding |\vsplit| didn't contain any marks. +%\eix^^{marks} +^^{标记//用于分割列表} +这两个命令展开为之前用 ^|\mark| 在竖直盒子 $V$ 中生成的标记项的标记文本。 +标记文本以记号列形式表示。 +当你用 ^|\vsplit| 命令(\xref \vsplit )分割 $V$ 时, +\TeX\ 按如下方式设定这两个命令的值: +\ulist\compact +\li |\splitfirstmark| 包含 $V$ 中第一个标记的记号列。 +\li |\splitbotmark| 包含 $V$ 中最后一个标记的记号列。 +\endulist +如果没有 |\vsplit| 命令,或者前面最近的 |\vsplit| 不包含任何标记, +这两个命令不生成记号列。 +\eix^^{标记} +\enddesc + +%========================================================================== +%\section {Insertions} +\section {插入项} + +%\subsection {Footnotes} +\subsection {脚注} + +\begindesc +\easy\cts footnote {\<argument$_1$> \<argument$_2$>} +\cts vfootnote {\<argument$_1$> \<argument$_2$>} +\explain +%These commands produce footnotes. +%\<argument$_1$> is the ``^{reference mark}'' +%for the footnote and \<argument$_2$> is its text. +%The text can be several paragraphs long if necessary and can contain +%constructs such as math displays, but it shouldn't contain any +%\minref{insertion}s (such as other footnotes). +这两个命令用于生成脚注。 +其中 \<argument$_1$> 是脚注的“^{参考符号}”, +而 \<argument$_2$> 是脚注文本。 +脚注文本必要时可以包含多个段落,也可以包含陈列公式等其他构造, +但不应该包含任何\minref{插入项}(比如其他脚注)。 + +%You shouldn't use these commands inside a subformula of a math formula, +%in a box within a box being contributed to a page, +%or in an insertion of any kind. +%If you're unsure whether these restrictions apply, you can be safe by +%only using |\footnote| and |\vfootnote| directly within a paragraph or +%between paragraphs. +在数学公式的子公式中,或者组成页面的盒子的子盒子中, +或者任何形式的插入项中,你都不应该使用这些命令。 +如果你不确定这些限制出现在哪里,为安全起见, +你可以只在段落内或者段落间直接使用 |\footnote| 和 |\vfootnote|。 + +%These restrictions aren't as severe as they seem because you can use +%|\vfootnote| to footnote most anything. +%Both |\foot!-note| and |\vfoot!-note| insert the reference mark in front of the +%footnote itself, but |\vfoot!-note| doesn't insert the reference mark into the +%text. +%Thus, when you use |\vfoot!-note| you can +%explicitly insert the reference mark +%wherever it belongs without concern about the context +%and place the |\vfootnote| in the next paragraph. +%If you find that the footnote lands on +%the page following the one where it belongs, move the |\vfootnote| back +%to the previous paragraph. +%There are rare circumstances where you'll need to +%alter the text of your document in order to get a footnote to appear on +%the same page as its reference mark. +这些限制没看起来那么严重,因为你可以用 |\vfootnote| 命令添加几乎任何内容的脚注。 +|\foot!-note| 和 |\vfoot!-note| 都会在脚注前面插入参考符号, +区别在于 |\vfoot!-note| 不会在正文中插入参考符号。 +因此,你可以不用考虑上下文的限制, +显式地将参考符号放到它应该在的地方,然后在下一个段落使用 |\vfootnote| 命令。 +这可能会导致脚注跑到下一页去,此时你可以将 |\vfootnote| 命令移动到上一个段落中。 +在极少情况下,你需要修改文档正文,以让脚注和参考符号出现在同一页中。 +\example +To quote the mathematician P\'olya is a ploy.\footnote +*{This is an example of an anagram, but not a strict one.} +| +\produces +To quote the mathematician P\'olya is a ploy.* +\par\line{\hskip .5in \vdots\hfil} +\nointerlineskip \bigskip +\footnoterule\par\parindent = 12pt +\textindent{*}This is +an example of an anagram, but not a strict one. +\endexample +\example +$$f(t)=\sigma\sigma t\;\raise 1ex \hbox{\dag}$$ +\vfootnote \dag{The $\sigma\sigma$ notation was explained in +the previous section.} +| +\produces +$$f(t)=\sigma\sigma t\>\raise 1ex \hbox{\dag}$$ +\par\line{\hskip .5in \vdots\hfil} +\nointerlineskip \bigskip +\footnoterule\par\parindent = 12pt +\textindent{\dag}{The $\sigma\sigma$ notation was explained in +the previous section.} +\endexample +\enddesc + +%========================================================================== +%\subsection {General insertions} +\subsection {一般插入项} + +%\begindesc +%\bix^^{insertions//commands for} +%\cts topinsert {\<vertical mode material> {\bt \\endinsert}} +%\cts midinsert {\<vertical mode material> {\bt \\endinsert}} +%\cts pageinsert {\<vertical mode material> {\bt \\endinsert}} +%\explain +%These commands produce different forms of insertions that +%instruct +%(or allow) \TeX\ to relocate the \<vertical mode material>: +%\ulist +%\li |\topinsert| attempts to put the material at the top of the current page. +%If it won't fit there, |\topinsert| +%will move the material to the next available top of page. +%\li |\midinsert| attempts to put the material at the current position. +%If it won't fit there, |\midinsert| +%will move the material to the next available top of page. +%\li |\pageinsert| puts the material by itself on the next page. +%To avoid an underfull page, be sure to end the inserted material with +%|\vfil| or fill out the excess space some other way. +%% Knuth doesn't say this, but I tried an experiment that verified it. +%% Nor does he say explicitly that an insertion does a \par. +%\endulist +%\noindent +%The \<vertical mode material> +%is said to be ``floating'' ^^{floating material} because \TeX\ +%can move it from one place to another. +%Insertions are very useful for material such as figures and tables because +%you can position such material where you want it without knowing where the +%page breaks will fall. +\begindesc +\bix^^{插入项//用于插入项的命令} +\cts topinsert {\<vertical mode material> {\bt \\endinsert}} +\cts midinsert {\<vertical mode material> {\bt \\endinsert}} +\cts pageinsert {\<vertical mode material> {\bt \\endinsert}} +\explain +这些命令生成不同形式的插入项, +它们指示(或者允许)\TeX\ 重新放置 \<vertical mode material>: +\ulist +\li |\topinsert| 试图将内容放在当前页的顶部。 +如果那里放不下,|\topinsert| 将把该内容移动到顶部可放下的下一个页面。 +\li |\midinsert| 试图将内容放在当前位置, +如果当前位置放不下,|\midinsert| 将把该内容移动到顶部可放下的下一个页面。 +\li |\pageinsert| 将把内容单独放在下一页。 +为免得到松散页面,不要忘记在内容最后用 |\vfil| 命令或者其他方式填满页面。 +% Knuth doesn't say this, but I tried an experiment that verified it. +% Nor does he say explicitly that an insertion does a \par. +\endulist +\noindent +由于 \TeX\ 可以移动\<vertical mode material>的位置,我们称它为“浮动体”。^^{浮动体} +插入项对于图形和表格非常有用, +因为你可以将它们放在所需的地方,而不用管哪里会分页。 + +%Each of these commands implicitly ends the current paragraph, so +%you should use them only between paragraphs. +%You should not use them within a box or within another insertion. +%If you have several insertions competing for +%the same space, \TeX\ will retain their relative order. +这些命令每个都会结束当前段落,因此你应该仅在段落之间使用它们。 +你也不要在盒子内部或者另一个插入项内部使用它们。 +如果有多个插入项要放在同一个位置,\TeX\ 将保持它们的先后顺序。 +\example +\pageinsert +% This text will appear on the following page, by itself. +This page is reserved for a picture of the Queen of Hearts +sharing a plate of oysters with the Walrus and +the Carpenter. +\endinsert +| +\endexample +\enddesc + +\begindesc +\cts endinsert {} +\explain +%This command ends an insertion started by +%|\topinsert|, |\midinsert|, or |\pageinsert|. +此命令结束由 |\topinsert|、|\midinsert| 或 |\pageinsert| 命令开始的插入项。 +\enddesc + +\begindesc +\cts insert {\<number> \rqbraces{\<vertical mode material>}} +\explain +%\minrefs{insertion} +%This primitive command provides the +%underlying mechanism for constructing insertions, but +%it is hardly ever used outside of a \minref{macro} definition. +%The definitions of the +%|\foot!-note|, |\vfoot!-note|, +%|\top!-insert|, |\mid!-insert|, and |\page!-insert| commands are +%all built around |\insert|. +%^^|\topinsert| +%^^|\midinsert| ^^|\pageinsert| ^^|\footnote| ^^|\vfootnote| +\minrefs{insertion} +这个原始命令提供了构造插入项的内部机制, +但除了在定义\minref{宏}时会用到,其他时候很少用到它。 +|\foot!-note|、|\vfoot!-note|、|\top!-insert|、|\mid!-insert| 和 +|\page!-insert| 命令的定义都建立在 |\insert| 命令之上。 +^^|\topinsert| +^^|\midinsert| ^^|\pageinsert| ^^|\footnote| ^^|\vfootnote| + +%When you design insertions for a document, you should assign a different +%integer code\footnote +%{\texbook{} uses the term ``class'' for a code. +%We use a different term to avoid confusion with the other meaning of +%``class'' (\xref{class}).} +%$n$ to each kind of insertion, +%using the ^|\newinsert| command (\xref{\@newinsert}) to obtain the +%integer codes. +%The |\insert| command itself appends the \<vertical mode material> +%to the current horizontal or \minref{vertical list}. +%Your \minref{output routine} is responsible for +%moving the inserted material from where it resides in |\box|$\,n$ +%to an output page. +%^^{output routine} +设计文档的插入项时,不同的插入项需要分配不同的整数代码\footnote +{\texbook{} 用“类”这个术语表示此代码。 +为避免和“类”(\xref{类})的其他意思混淆,我们用不同的术语。} +$n$,这个代码可以用 ^|\newinsert| 命令(\xref{\@newinsert})得到。 +|\insert|命令本身仅添加 \<vertical mode material> 到当前水平列或\minref{竖直列}。 +而\minref{输出例行程序}负责移动|\box|$\,n$中的插入内容到输出页面。 +^^{输出例行程序} + +%\TeX\ groups together all insertions having the same code +%number. Each insertion +%code $n$ has four \minref{register}s associated with it: +%\ulist +%\li |\box|$\,n$ is where \TeX\ accumulates the material for insertions +%with code $n$. When \TeX\ breaks a page, it puts into |\box|$\,n$ +%as much insertion $n$ material as will fit on the page. +%Your output routine should then move this material to the actual page. +%You can use ^|\ifvoid| \ctsref{\@ifvoid} +%to test if there is any material in |\box|$\,n$. +%If not all the material fits, \TeX\ saves the leftovers for the next page. +%\li |\count|$\,n$ is a magnification factor $f.$ When \TeX\ is computing +%the vertical space occupied on the page +%by insertion $n$ material, it multiplies the +%vertical extent of this material by $f/1000$. +%Thus you would ordinarily set $f$ to $500$ for a double-column insertion +%and to $0$ for a marginal~note. +%\li |\dimen|$\,n$ specifies the maximum amount +%of insertion $n$ material that \TeX\ will put on a single page. +%\li |\skip|$\,n$ specifies extra space that \TeX\ allocates on the page +%if the page contains any insertion $n$ material. +%This space is in addition to the space occupied by the insertion itself. +%For example, it would account for the space on a page above the footnotes +%(if there are~any). +%\endulist +%\noindent +%\TeX\ sets |\box|$\,n$, and you should set the other three registers +%so that \TeX\ can correctly compute the vertical space required by the +%insertion. +%See \knuth{pages~122--125} for further details of how \TeX\ processes this +%command and of how insertions interact with page breaking. +%\xrdef{endofinsert} +\TeX\ 将所有插入项按照它们的代码分组。每个插入代码关联四个\minref{寄存器}: +\ulist +\li |\box|$\,n$ 给 \TeX\ 用于累积第 $n$ 种插入内容。 +\TeX\ 分页时会尽可能多地往 |\box|$\,n$ 中放入第$n$ 种插入项。 +然后输出例行程序将把这些内容移动了实际页面上。 +你可以用 ^|\ifvoid| 命令\ctsref{\@ifvoid}检查 |\box|$\,n$ 中是否有任何内容。 +如果不能放下全部内容,\TeX\ 将把剩下内容留到下一页。 +\li |\count|$\,n$ 为放大因子 $f$。 +\TeX\ 计算第$n$种插入项所占用的页面纵向空间时,将把插入内容的纵向长度乘以$f/1000$。 +因此对双栏插入项通常设 $f$ 为 $500$,而对边注项设为 $0$。 +\li |\dimen|$\,n$ 设定每页放置的第$n$种插入项的最大数目。 +\li |\skip|$\,n$ 设定页面包含第 $n$ 种插入项时 \TeX\ 添加的额外间隔。 +这个间隔不包含该插入项本身占用的空间。 +例如,当页面包含脚注时,就会用到此间隔。 +\endulist +\noindent +\TeX\ 只设定 |\box|$\,n$,你需要设定其他三个寄存器, +以让 \TeX\ 正确计算插入项所需的竖直空间。 +\knuth{第~122--125~页} 中详细介绍了 \TeX\ 如何处理此命令, +以及插入项和分页方式之间的关系。 +\xrdef{endofinsert} +\enddesc + +%\see |\floatingpenalty| (\xref \floatingpenalty). +%\eix^^{insertions//commands for} +\see |\floatingpenalty| (\xref \floatingpenalty). +\eix^^{插入项//用于插入项的命令} + + +%========================================================================== +%\section{Modifying the output routine} +\section{修改输出例行程序} + +%\bix^^{output routine} +%\begindesc +%\cts output {\param{token list}} +%\explain +%This parameter contains the current \minref{output routine}, i.e., +%the token list that \TeX\ expands when it finds a page break. +%\TeX\ puts the page into ^|\box255|, so |\output| is responsible +%for doing something with |\box255|---either shipping it out or +%putting it somewhere else. +%The output routine is also responsible for attaching things such as +%headers and footers. +%\enddesc +\bix^^{输出例行程序} +\begindesc +\cts output {\param{token list}} +\explain +这个参数包含了当前的 \minref{输出例行程序}, +也就是 \TeX\ 当发现一个断页点的时候会展开的一个符号列表。 +\TeX\ 把当前页面放入 ^|\box255|,所以 |\output| 负责对 |\box255| 进行处理% +——不管是把它输出到 dvi 还是把它放到别的什么地方去。 +输出例行程序也负责把页眉和页脚附加到页面上。 +\enddesc + +%\begindesc +%\cts plainoutput {} +%\explain +%This command invokes \plainTeX's output routine. +%^^{output routine//default in \plainTeX} +%\PlainTeX\ defines ^|\output| as +%a token list containing the single token |\plainoutput|. +%\enddesc + +\begindesc +\cts plainoutput {} +\explain +这个命令调用 \plainTeX\ 的输出例行程序。 +^^{输出例行程序//\plainTeX\ 的默认程序} +\PlainTeX\ 把 ^|\output| 定义为一个仅仅包含 |\plainoutput| 的符号列表。 +\enddesc + + +%\begindesc +%\cts shipout {\<box>} +%\explain +%This command instructs \TeX\ to send \<box> to the \dvifile. +%^^{\dvifile//receives boxes from \b\tt\\shipout\e} +%\TeX\ expands any |\write| command in \<box> as part of |\shipout|. +%^^|\write//expanded during {\tt\\shipout}| +%The principal use of |\shipout| is in the output routine, but you can +%use it anywhere. +%\enddesc + +\begindesc +\cts shipout {\<box>} +\explain +这个命令让 \TeX\ 把 \<box> 输出到 \dvifile. +^^{\dvifile//接收 \b\tt\\shipout\e 的盒子} +\TeX\ 在 |\shipout| 时,把 \<box> 中的任何 |\write| 命令进行展开。 +^^|\write// 在 {\tt\\shipout} 时进行展开| +|\shipout| 的主要用途是在输出例行程序中,不过你可以在任何其他地方使用这个命令。 +\enddesc + + +%\begindesc +%\cts deadcycles {\param{number}} +%\explain +%This parameter contains the number of times that \TeX\ has initiated +%the \minref{output routine} since the last time it did a +%^^|\shipout| |\ship!-out|.\footnote{ +%More precisely, \TeX\ sets |\dead!-cyles| to $0$ whenever it executes +%|\ship!-out| +%and increments it by $1$ whenever it executes |\output|.} +%If |\deadcycles| gets too big, you've probably gotten +%\TeX\ into a loop, e.g., one where the page builder is trying the same page +%break over and over again. +%\enddesc + +\begindesc +\cts deadcycles {\param{number}} +\explain +这个参数包含这 \TeX\ 在上次 ^^|\shipout| |\ship!-out| +后已经初始化的\minref{输出例行程序}的个数。 +\footnote{更加准确地说, \TeX\ 在执行 |\ship!-out| 的时候, +把 |\dead!-cycles| 归 $0$,然后每次执行 |\output| 的时候把它增加 $1$。} +如果 |\deadcycles| 变得太大,那你很有可能把 \TeX\ 弄死循环了, +也就是说,循环往复地对同一个页面进行分页操作。 +\enddesc + + +%\begindesc +%\cts maxdeadcycles {\param{number}} +%\explain +%If the value of |\deadcycles| exceeds the value of |\maxdeadcycles|, +%\TeX\ assumes that the output routine has gotten into a loop. +%\TeX\ then complains and runs its own simple output routine, +%equivalent to |\shipout!allowbreak\box255|, +%that is likely to break the loop. +%\PlainTeX\ sets |\maxdeadcycles| \hbox{to $25$}. +%\enddesc + +\begindesc +\cts maxdeadcycles {\param{number}} +\explain +如果 |\deadcycles| 超过了 |\maxdeadcycles|,那 \TeX\ 就会假定输出例行程序被用户死循环了, +\TeX\ 这个时候就会报错,并且执行它自己默认的简单输出例行程序,也就是 |\shipout!allowbreak\box255|, +以期望从循环中跳出。\PlainTeX\ 把 |\maxdeadcycles| 设置为 \hbox{$25$}。 +\enddesc + +%\begindesc +%\cts outputpenalty {\param{number}} +%\explain +%\TeX\ sets this parameter when it breaks a page. If the breakpoint was at a +%\minref{penalty} item, \TeX\ removes the penalty item and +%sets |\outputpenalty| to the penalty value at +%the breakpoint; otherwise it sets |\outputpenalty| \hbox{to $0$}. +% +%Suppose that you are undoing a page break +%in order to break the page at a different place than the one that \TeX\ +%has just chosen. In order to reconstruct the page, you need to recreate +%the penalty at \TeX's chosen breakpoint. +%You can accomplish this with the command +%|\penalty!allowbreak\outputpenalty|. +%\enddesc + +\begindesc +\cts outputpenalty {\param{number}} +\explain +\TeX\ 在断页的时候设置这个参数。 +如果断点是在一个 \minref{惩罚} 的项目上,\TeX\ 就会移除这个惩罚, +然后把 |\outputpenalty| 设置成断点处的值, 否则 |\outputpenalty| 就被设成 \hbox{$0$}。 + +如果你希望在 \TeX\ 选择的断点之外的的其他地方断页,而不在该断点处断页, +那么在重构这个页面时,你就需要在 \TeX\ 选择的断点处重新设置这个惩罚。 +你可以通过 |\penalty!allowbreak\outputpenalty| 来达到这个目的。 +\enddesc + + +%\begindesc +%\cts holdinginserts {\param{number}} +%\explain +%If this parameter is greater than $0$ when \TeX\ +%is processing a page break, \TeX\ will refrain from processing insertions. +%Setting this parameter to $1$ +%can be useful when you're writing an output routine +%that needs to reprocess the contents of the page, e.g., +%an output routine that uses a value of |\vsize| (\xref \vsize) different from +%the one used by the page builder. +% +%\eix^^{output routine} +%\enddesc + +\begindesc +\cts holdinginserts {\param{number}} +\explain + +当 \TeX\ 在处理一个断页时,这个参数如果大于 $0$, 那么 \TeX\ 就会阻止处理插入。 +当你写一个输出例行程序的时候,如果你希望重新处理该页的内容, +(例如输出例行程序本身用的 |\vsize| (\xref \vsize) 和断页程序用的并非相同值), +那么把这个参数设为 $1$ 就会很有用。 + +\eix^^{输出例行程序} +\enddesc + + +%========================================================================== +%\section {Splitting vertical lists} +\section {分割竖直列表} + +%\begindesc +%\cts vsplit {\<number> {\bt to} \<dimen>} +%\explain +%This command causes \TeX\ to split the \minref{box} numbered +%\<number>, which we'll call $B_2$, into two parts. +%It uses the same algorithm that it would use if $B_2$ was a page +%and it was breaking that page; +%the division point then corresponds to the page break that it would find. +%The box $B_2$ must be a vbox, not an hbox. +%% we avoid starting the previous sentence with a symbol, a copyediting no-no. +%\TeX\ puts the material preceding the division point into +%another box $B_1$ and leaves the material after the division point in $B_2$. +%The |\vsplit| command then produces $B_1$. +%Normally you'd assign $B_1$ to a different +%box register, as in the example below. +%If the division point is at the end of $B_2$, +%$B_2$ will be empty after the |\vsplit|. + +\begindesc +\cts vsplit {\<number> {\bt to} \<dimen>} +\explain +这个命令使得 \TeX\ 把寄存器中编号为 \<number> 的\minref{盒子} $B_2$ 切割成两个部分。 +如果 $B_2$ 是一个页面,那这个命令会使用相同的算法来把这个页面分为两部分; +这种情况下,分割处就是断页的地方。 +$B_2$这个盒子必须是个竖直盒子,不是水平盒子。 +\TeX\ 把从开头到分割处的部分放到另一个盒子 $B_1$ 中,而把分割处到结尾的部分放到 $B_2$ 中。 +然后 |\vsplit| 就输出了 $B_1$ 这个盒子。 +一般情况下,你会用类似下面例子的方式,把 $B_1$ 盒子指定到另一个盒子寄存器中。 +如果分割处恰好是 $B_2$ 盒子的结尾部分,那 $B_2$ 盒子就会在 |\vsplit| 后变成一个空盒子。 + + +%\TeX\ employs its usual page-breaking algorithm +%^^{page breaks//in split lists} +%for the split. +%It uses \<dimen> for ^|\pagegoal|, the desired height of $B_1$. +%The vertical extent of $B_1$ may not be exactly +%\<dimen> because \TeX\ may not be able to achieve its page goal perfectly. +%\TeX\ does not consider insertions in calculating the split, +%so insertions in the original vertical list of $B_2$ will be retained +%but won't affect the split point. + +\TeX\ 使用它一贯的断页算法来分割这个竖直盒子。 +它使用 \<dimem> 的长度来指定 $B_1$ 盒子需要的高度 ^|\pagegoal|。 +而$B_1$ 的竖直长度未必就一定是 \<dimem>,因为 \TeX\ 不一定能完美地达到其分页的目标。 +\TeX\ 在计算这个竖直分割的时候,不考虑插入,因此 $B_2$ 插入的原本的竖直列表依然会被保留,但并不会受到分割的影响。 + + +%\example +%\setbox 20 = \vsplit 30 to 7in +%% Split off the first seven inches or so of material from +%% box 30 and place that material in box 20. +%| +%\endexample +%\enddesc + +\example +\setbox 20 = \vsplit 30 to 7in +% 把30号盒子截去7英寸,并放到20号盒子中。 +| +\endexample +\enddesc + + +%\begindesc +%\cts splitmaxdepth {\param{dimen}} +%\explain +%This parameter specifies the +%maximum allowable depth of a box resulting from a |\vsplit|. +%|\splitmaxdepth| plays the +%same role that ^|\maxdepth| (\xref \maxdepth) plays for a page. +%\enddesc + +\begindesc +\cts splitmaxdepth {\param{dimen}} +\explain +此参数指定|\vsplit|产生的盒子的最大允许深度。 +|\splitmaxdepth| 在盒子中和 ^|\maxdepth| (\xref \maxdepth) 在页面中扮演的角色相同。 +\enddesc + + +%\begindesc +%\cts splittopskip {\param{glue}} +%\explain +%This parameter specifies the glue that \TeX\ inserts at the top of +%a box resulting from a |\vsplit|. +%|\splittopskip| plays the +%same role that ^|\topskip| (\xref \topskip) plays for a page. +%\enddesc + +\begindesc +\cts splittopskip {\param{glue}} +\explain +这个参数指定 \TeX 在 |\vsplit| 产生的盒子的头部插入的粘连。 +|\splittopskip| 在盒子中和 ^|\topskip| (\xref \topskip) 在页面中扮演的角色相同。 +\enddesc + + +%\see |\splitbotmark|, |\splitfirstmark| (\xref \splitfirstmark). + +\see |\splitbotmark|, |\splitfirstmark| (\xref \splitfirstmark). + +\enddescriptions + +\ifoldeplain\else\ifcompletebook\else +\vskip4em{\sectionfonts\leftline{本章索引}} +\readindexfile{i} +\fi\fi + +\endchapter \byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/paras.tex b/Master/texmf-dist/doc/plain/impatient-cn/paras.tex new file mode 100644 index 00000000000..9609e9886a2 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/paras.tex @@ -0,0 +1,3536 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. +% 中文翻译:Zhaopeng Xing (zpxing@gmail.com) +% 中文翻译:zohooo (zohooo@yeah.net) + +\input macros + +% \chapter {Commands \linebreak for composing \linebreak paragraphs} +\chapter {组段命令} + +% \chapterdef{paras} + +% This section covers commands that +% deal with characters, words, lines, and entire paragraphs. +% For an explanation of the conventions used in this section, +% see \headcit{Descriptions of the commands}{cmddesc}. + +% \begindescriptions + +\chapterdef{paras} + +这一章介绍了与字符, 单词, 行以及整段相关的命令. +本章写作惯例的说明可以在\headcit{命令描述}{cmddesc}中找到. + +\begindescriptions + +% \section {Characters and accents} + +% %========================================================================== +% \subsection {Letters and ligatures for European alphabets} + +% \begindesc +% \xrdef{fornlets} +% \bix^^{ligatures} +% ^^{special symbols} +% ^^{European alphabets} +% % +% \ctsx AA {Scandinavian letter \AA} +% \ctsx aa {Scandinavian letter \aa} +% \ctsx AE {\AE\ ligature} +% \ctsx ae {\ae\ ligature} +% \ctsx L {Polish letter \L} +% \ctsx l {Polish letter \l} +% \ctsx O {Danish/Norwegian letter \O} +% \ctsx o {Danish/Norwegian letter \o} +% \ctsx OE {\OE\ ligature} +% \ctsx oe {\oe\ ligature} +% \ctsx ss {German letter \ss} +% \explain + +\section {字符和重音符} + +%========================================================================== +\subsection {欧洲语言字母和连写} + +\begindesc +\xrdef{fornlets} +\bix^^{连写} +^^{特殊符号} +^^{欧洲语言字母} +% +\ctsx AA {斯堪地纳维亚文字母 \AA} +\ctsx aa {斯堪地纳维亚文字母 \aa} +\ctsx AE {\AE\ 连写} +\ctsx ae {\ae\ 连写} +\ctsx L {波兰文字母 \L} +\ctsx l {波兰文字母 \l} +\ctsx O {丹麦/挪威文字母 \O} +\ctsx o {丹麦/挪威文字母 \o} +\ctsx OE {\OE\ 连写} +\ctsx oe {\oe\ 写写} +\ctsx ss {德文字母 \ss} +\explain + +% These commands produce various letters and ligatures from European +% alphabets. +% They are useful for occasional words and phrases in these +% languages---but if you need to typeset a large amount of text in a European +% language, you should probably be using a version of \TeX\ adapted +% to that language.\footnote{The \TeX\ Users Group (\xref{resources}) can +% provide you with information about European language versions of \TeX.} +这些命令可以产生欧洲语言的各种字符和连写。 +在文本中偶而出现这些语言的单词和词组时它们显得很有用。 +但是如果需要排印大量的欧洲语言文本时, +你可能会去使用一个为这些语言定制的 \TeX\ 版本。 +\footnote{\TeX\ 用户组织 (\xref{resources}) 可为你提供 \TeX\ 的欧洲语 + 言版本。} + +% You'll need a space after these commands when you use them within a word, +% so that +% \TeX\ will treat the following letters as part of the word +% rather than as part of the command. +% You needn't be in \minref{math mode} to use these commands. +% \example +% {\it les \oe vres de Moli\`ere} +% | +% \produces +% {\it les \oe vres de Moli\`ere} +% \endexample +% \eix^^{ligatures} +% \enddesc +当你在一个单词中使用这些命令时,需要在它们后面加上一个空格, +这样,\TeX\ 会把它后面的字母当作是这个词语的一部分而不是这个命令的一部分。 +你不需为了使用这些符号而进入\minref{数学模式}。 +\example +{\it les \oe vres de Moli\`ere} +| +\produces +{\it les \oe vres de Moli\`ere} +\endexample +\eix^^{连写} +\enddesc + +%========================================================================== +%\subsection {Special symbols} +\subsection {专用符号} + +% \begindesc +% ^^{special characters} +% % +% \easy\ctspecialx # \ctsxrdef{@pound} {pound sign \#} +% \ctspecialx $ \ctsxrdef{@bucks} {dollar sign \$} +% \ctspecialx % \ctsxrdef{@percent} {percent sign \%} +% \ctspecialx & \ctsxrdef{@and} {ampersand \&} +% \ctspecialx _ \ctsxrdef{@underscore} {underscore \_} +% \ctsx lq {left quote \lq} +% \ctsx rq {right quote \rq} +% \aux\ctsx lbrack left bracket [ +% \aux\ctsx rbrack right bracket ] +% \ctsx dag {dagger symbol \dag} +% \ctsx ddag {double dagger symbol \ddag} +% \ctsx copyright {copyright symbol \copyright} +% \ctsx P {paragraph symbol \P} +% \ctsx S {section symbol \S} +% \explain +% These commands produce various special characters and marks. The first +% five commands are necessary because \TeX\ by default +% attaches special meanings to +% the characters (|#|, |$|, |%|, |&|, |_|). +% You needn't be in \minref{math mode} to use these commands. +\begindesc +^^{特殊字符} +% +\easy\ctspecialx # \ctsxrdef{@pound} {英镑符号 \# \footnote{译注: +位于键盘的数字 3 之上,英式键盘为英镑符号,美式键盘为数字符号 \#。}} +\ctspecialx $ \ctsxrdef{@bucks} {美元符号 \$} +\ctspecialx % \ctsxrdef{@percent} {百分号 \%} +\ctspecialx & \ctsxrdef{@and} {和 \&} +\ctspecialx _ \ctsxrdef{@underscore} {下划线 \_} +\ctsx lq {左引号 \lq} +\ctsx rq {右引号 \rq} +\aux\ctsx lbrack 左中括号 [ +\aux\ctsx rbrack 右中括号 ] +\ctsx dag {短剑符号 \dag} +\ctsx ddag {双剑符号 \ddag} +\ctsx copyright {版权符号 \copyright} +\ctsx P {段落符号 \P} +\ctsx S {章节符号 \S} +\explain +这些命令可以产生各种特殊字符和符号。前五个是必需的, +因为 \TeX\ 默认地把符号 (|#|, |$|, |%|, |&|, |_|) 作特殊的用途。 +你不用为了使用这些符号而进入\minref{数学模式}。 + +% You can use the dollar sign in the Computer Modern +% italic fonts to get the ^{pound +% sterling} symbol, as shown in the example below. +你可以用计算机现代意大利字体中的美元符号来得到^{英镑}符号,例如: + +% \example +% \dag It'll only cost you \$9.98 over here, but in England +% it's {\it \$}24.98. +% | +% \produces +% \dag It'll only cost you \$9.98 over here, but in England +% it's {\it \$}24.98. +% \endexample +% \enddesc +\example +\dag 在这边它只要花费你 \$9.98,但在英格兰要 {\it \$}24.98。 +| +\produces +\dag 在这边它只要花费你 \$9.98,但在英格兰要 {\it \$}24.98。 +\endexample +\enddesc + +% \begindesc +% \cts TeX {} +% \explain +% This command produces the \TeX\ logo. Remember to follow it by +% |\!vs| or to enclose it in a \minref{group} when you want a space +% after it. + +\begindesc +\cts TeX {} +\explain +这个符号可以得到 \TeX\ 的标志. +如果你需要在后面加上空格, +请在其后加上 |\!vs| 或者把它放到一个\minref{组}中. + +% \example +% A book about \TeX\ is in your hands. +% | +% \produces +% A book about \TeX\ is in your hands. +% \endexample +% \enddesc + +\example +A book about \TeX\ is in your hands. +| +\produces +A book about \TeX\ is in your hands. +\endexample +\enddesc + +% \begindesc +% \cts dots {} +% \explain +% ^^{dots} +% This command produces an ^{ellipsis}, i.e., three dots, in ordinary text. +% It's intended for use in mathematical writing; for an ellipsis +% between ordinary words, you should use |$\ldots$| \ctsref{\ldots} instead. +% Since |\dots| includes its own space, you shouldn't follow it by +% |\!vs|. +% \example +% The sequence $x_1$, $x_2$, \dots, $x_\infty$ +% does not terminate. +% | +% \produces +% The sequence $x_1$, $x_2$, \dots, $x_\infty$ +% does not terminate. +% \endexample +% \enddesc + +\begindesc +\cts dots {} +\explain +^^{点号} +这个命令可以产生一个^{省略号}, 也就是在文本中的三个小点. +它必须使用在数学模式中; 如果你想在单词间加入省略号, +你应该使用 |$\ldots$| 命令\ctsref{\ldots}. +|\dots|已经插入了它所应有的空白, 所以你不必在后面加上|\!vs|. +\example +数列 $x_1$, $x_2$, \dots, $x_\infty$ +永远也不会结束 +| +\produces +数列 $x_1$, $x_2$, \dots, $x_\infty$ +永远也不会结束 +\endexample +\enddesc + +%\see ``Miscellaneous ordinary math symbols'' (\xref{specsyms}). +\see ``各种常用数学符号'' (\xref{specsyms}). +%========================================================================== +%\subsection {Arbitrary characters} +\subsection {任意字符} + +% \begindesc +% \bix^^{characters} +% \cts char {\<charcode>} +% \explain +% This command produces the character located at position \<charcode> +% of the current font. +% \example +% {\char65} {\char `A} {\char `\A} +% | +% \produces +% {\char65} {\char `A} {\char `\A} +% \endexample +% \enddesc + +\begindesc +\bix^^{字符} +\cts char {\<charcode>} +\explain +这个命令可以产生当前字体在 \<charcode> 位置的字符. +\example +{\char65} {\char `A} {\char `\A} +| +\produces +{\char65} {\char `A} {\char `\A} +\endexample +\enddesc + +% \begindesc +% \cts mathchar {\<mathcode>} +% \explain +% This command produces the math character whose class, family, and +% font position are given by \<mathcode>. +% It is only legal in math mode. +% \example +% \def\digger{\mathchar "027F} % Like \spadesuit in plain TeX. +% % Class 0, family 2, font position "7F. +% $\digger$ +% | +% \produces +% \def\digger{\mathchar "027F} +% % class 0, family 2, font position "7F +% $\digger$ +% \endexample +% \enddesc +\begindesc +\cts mathchar {\<mathcode>} +\explain +这个命令可以产生由 \<mathcode> 所指定的类,族以及位置的数学字符。 +这个命令仅能用在数学模式中。 +\example +\def\digger{\mathchar "027F} % 像 plain TeX 的 \spadesuit. +% 0类, 2族, "7F 位置. +$\digger$ +| +\produces +\def\digger{\mathchar "027F} +% 0类, 2族, "7F 位置. +$\digger$ +\endexample +\enddesc + +% \see |\delimiter| (\xref\delimiter). +% \eix^^{characters} +\see |\delimiter|(\xref\delimiter )。 +\eix^^{字符} + +%========================================================================== +%\subsection {Accents} +\subsection {重音符号} + +% \begindesc +% ^^{accents} +% \xrdef{accents} +% % +% \ctspecialx ' \ctsxrdef{@prime} {^{acute accent} as in \'e} +% \ctspecialx . \ctsxrdef{@dot} {^{dot accent} as in \.n} +% \ctspecialx = \ctsxrdef{@equal} {^{macron accent} as in \=r} +% \ctspecialx ^ \ctsxrdef{@hat} {^{circumflex accent} as in \^o} +% \ctspecialx ` \ctsxrdef{@lquote} {^{grave accent} as in \`e} +% \ctspecialx " \ctsxrdef{@quote} {^{umlaut accent} as in \"o} +% \ctspecialx ~ \ctsxrdef{@not} {^{tilde accent} as in \~a} +% \ctsx c {^{cedilla accent} as in \c c} +% \ctsx d {^{underdot accent} as in \d r} +% \ctsx H {^{Hungarian umlaut accent} as in \H o} +% \ctsx t {^{tie-after accent} as in \t uu} +% \ctsx u {^{breve accent} as in \u r} +% \ctsx v {^{check accent} as in \v o} +% \explain +% These commands produce accent marks in ordinary text. You'll usually +% need to leave a space after the ones denoted by a single letter +% (see ``Spaces'', \xref{spaces}). +\begindesc +^^{重音} +\xrdef{accents} +% +\ctspecialx ' \ctsxrdef{@prime} {^{锐音符} 比如 \'e} +\ctspecialx . \ctsxrdef{@dot} {^{上点符} 比如 \.n} +\ctspecialx = \ctsxrdef{@equal} {^{长音符} 比如 \=r} +\ctspecialx ^ \ctsxrdef{@hat} {^{扬抑符} 比如 \^o} +\ctspecialx ` \ctsxrdef{@lquote} {^{钝音符} 比如 \`e} +\ctspecialx " \ctsxrdef{@quote} {^{分音符} 比如 \"o} +\ctspecialx ~ \ctsxrdef{@not} {^{波浪符} 比如 \~a} +\ctsx c {^{软音符} 比如 \c c} +\ctsx d {^{下点符} 比如 \d r} +\ctsx H {^{匈牙利分音符} 比如 \H o} +\ctsx t {^{连音符} 比如 \t uu} +\ctsx u {^{短音符} 比如 \u r} +\ctsx v {^{抑扬符} 比如 \v o} +\explain +这些命令为普通文本产生重音记号。通常,你需要为其中以单个字母表示的音符后面留一 +个空格(参见 ``空格'', \xref{spaces})。 + +% \example +% Add a soup\c con of \'elan to my pin\~a colada. +% | +% \produces +% Add a soup\c con of \'elan to my pin\~a colada. +% \endexample + +% \margin{`see also' moved to end of group, replacing the one there.} +% \enddesc + +\example +Add a soup\c con of \'elan to my pin\~a colada. +| +\produces +Add a soup\c con of \'elan to my pin\~a colada. +\endexample + +\margin{`see also' moved to end of group, replacing the one there.} +\enddesc + +% \begindesc +% \cts i {} +% \cts j {} +% \explain +% These commands produce dotless versions of the letters `i' and `j'. +% You should use them instead of the ordinary `i' and `j' when you are putting +% an accent above those letters in ordinary text. +% ^^{dotless letters} +% Use the ^|\imath| and ^|\jmath| commands (\xref\imath) +% for dotless `i's and `j's in math formulas. +% \example +% long `i' as in l\=\i fe \quad \v\j +% | +% \produces +% long `i' as in l\=\i fe \quad \v\j +% \endexample +% \enddesc + +\begindesc +\cts i {} +\cts j {} +\explain +这些命令产生无点的字母 `i' 和 `j'。在普通文本中,如果需要为`i' 和 `j' +标记重音,就使用它们。 +^^{无点字母} +在数学公式里,无点的`i' 和 `j' 使用 ^|\imath| 和 ^|\jmath| 命令 (\xref\imath)。 +\example +long `i' as in l\=\i fe \quad \v\j +| +\produces +long `i' as in l\=\i fe \quad \v\j +\endexample +\enddesc + +% \begindesc +% \cts accent {\<charcode>} +% \explain +% ^^{accents} +% This command puts an accent over the character following this command. +% The accent is the character at position \<charcode> in the current font. +% \TeX\ assumes that the accent has been designed to fit over a character +% $1$\thinspace ex high in the same font as the accent. If the +% character to be accented +% is taller or shorter, \TeX\ adjusts the position accordingly. You can +% change \minref{font}s between the accent and the next character, thus +% drawing the accent character and the character to be accented +% from different fonts. If +% the accent character isn't really intended to be +% an accent, \TeX\ won't complain; it +% will just typeset something ridiculous. +% \example +% l'H\accent94 otel des Invalides +% % Position 94 of font cmr10 has a circumflex accent. +% | +% \produces +% l'H\accent94 otel des Invalides +% % Position 94 of font cmr10 has a circumflex accent. +% \endexample +% \see Math accents (\xref{mathaccent}). +% \enddesc + +\begindesc +\cts accent {\<charcode>} +\explain +^^{重音} +这个命令为后面的字符加上重音标记。重音是当前字体里 \<charcode> 位置的 +字符。\TeX\ 假定重音符号被设计的比同样字体里的字符高 $1$\thinspace ex。 +如果需要标记重音的字符过高或者过低,\TeX\ 自动调整重音位置。你可以在重 +音符号和其后的字符之间切换\minref{字体}。如果重音符号被设计的很另 +类,\TeX\ 将不会产生警告;只是排印出一些稀奇古怪的结果。 +\example +l'H\accent94 otel des Invalides +% Position 94 of font cmr10 has a circumflex accent. +| +\produces +l'H\accent94 otel des Invalides +% Position 94 of font cmr10 has a circumflex accent. +\endexample +\see 数学重音(\xref{mathaccent})。 +\enddesc +%========================================================================== +%\subsection {Defeating boundary ligatures} +\subsection 处理页边连写 + +% \begindesc +% \bix^^{ligatures} +% \cts noboundary {} +% \explain +% You can defeat a ligature +% or kern that \TeX\ applies to the +% first or last character of a word by putting |\noboundary| just before +% or just after the word. +% Certain fonts intended for languages other than English +% contain a special boundary +% character that \TeX\ puts at the beginning +% and end of each word. +% The boundary character occupies no space and is invisible when printed. +% It enables \TeX\ to provide different typographical +% treatment to characters at the beginning or end of a word, +% since +% the boundary character can be part of a sequence of +% characters to be kerned or replaced by a ligature. +% (None of the standard \TeX\ fonts contain this boundary character.) +% The effect of |\noboundary| is to delete the +% boundary character if it's there, thus preventing \TeX\ +% from recognizing the ligature or kern. +% \eix^^{ligatures} +% \enddesc + +\begindesc +\bix^^{连写} +\cts noboundary {} +\explain +某些时候,\TeX{} 对单词的开头或者末尾字符连写或者紧排。你可以紧接着单词 +前面或者后面放一个 |\noboundary| 来取消它们。有些非英文字体包含一个专 +门的边界字符,被 \TeX{} 放在单词的前后。这个边界字符不占空间,打印出来 +也不可见。它可以成为能被紧排或连写的一串字符的组成部分,所以有了 +它,\TeX{} 可以对单词的头尾做别致的处理。(标准的\TeX{} 字体不包含此边 +界字符) |\noboundary| 的效果是删除存在的边界字符,从而防止 \TeX{} 识 +别连写或紧排。 +\eix^^{连写} +\enddesc + +%========================================================================== +%\section {Selecting fonts} +\section {选择字体} + +%\xrdef{selfont} +\xrdef{selfont} +%========================================================================== +%\subsection {Particular fonts} +\subsection {特定字体} + +% \begindesc +% ^^{fonts} +% % +% \ctsx fivebf {use $5$-point bold font} +% \ctsx fivei {use $5$-point math italic font} +% \ctsx fiverm {use $5$-point roman font} +% \ctsx fivesy {use $5$-point math symbol font} +% \ctsx sevenbf {use $7$-point bold font} +% \ctsx seveni {use $7$-point math italic font} +% \ctsx sevenrm {use $7$-point roman font} +% \ctsx sevensy {use $7$-point math symbol font} +% \ctsx tenbf {use $10$-point bold text font} +% \ctsx tenex {use $10$-point math extension font} +% \ctsx teni {use $10$-point math italic font} +% \ctsx tenrm {use $10$-point roman text font} +% \ctsx tensl {use $10$-point slanted roman font} +% \ctsx tensy {use $10$-point math symbol font} +% \ctsx tenit {use $10$-point italic font} +% \ctsx tentt {use $10$-point typewriter font} +% \explain +% These commands cause \TeX\ to typeset the following text in the +% specified font. Normally you would enclose +% one of these font-selecting commands in a +% group, together with the text to be set in the selected font. +% Outside of a group a font-selecting command is +% effective until the end of the document +% (unless you override it with another such command). +% \example +% See how I've reduced my weight---from +% 120 lbs.\ to {\sevenrm 140 lbs}. +% | +% \produces +% See how I've reduced my weight---from +% 120 lbs.\ to {\sevenrm 140 lbs}. +% \endexample +% \enddesc + +\begindesc +^^{字体} +% +\ctsx fivebf {使用 $5$ 点粗体} +\ctsx fivei {使用 $5$ 点数学意大利体} +\ctsx fiverm {使用 $5$ 点罗马体} +\ctsx fivesy {使用 $5$ 点数学符号字体} +\ctsx sevenbf {使用 $7$ 点粗体} +\ctsx seveni {使用 $7$ 点数学意大利体} +\ctsx sevenrm {使用 $7$ 点罗马体} +\ctsx sevensy {使用 $7$ 点数学符号字体} +\ctsx tenbf {使用 $10$ 点粗体} +\ctsx tenex {使用 $10$ 点数学扩展字体} +\ctsx teni {使用 $10$ 点数学意大利体} +\ctsx tenrm {使用 $10$ 点罗马体} +\ctsx tensl {使用 $10$ 点斜罗马体} +\ctsx tensy {使用 $10$ 点数学符号字体} +\ctsx tenit {使用 $10$ 点意大利体} +\ctsx tentt {使用 $10$ 点打字机字体} +\explain +这些命令使 \TeX{} 用指定的字体排版后面的文本。一般你可以把字体选择命令 +和相应的文本置于同一个编组中。编组之外使用一个字体选择命令直到文档最后。 +(除非中途用另一个类似的命令覆盖掉它) +\example +See how I've reduced my weight---from +120 lbs.\ to {\sevenrm 140 lbs}. +| +\produces +See how I've reduced my weight---from +120 lbs.\ to {\sevenrm 140 lbs}. +\endexample +\enddesc + +% \begindesc +% \cts nullfont {} +% \explain +% This command selects a font, built into \TeX, +% that has no characters in it. \TeX\ uses it +% as a replacement for an undefined font in a family of math fonts. +% \enddesc + +\begindesc +\cts nullfont {} +\explain +这个命令选择一种 \TeX{} 内置的没有任何字符的空字体。在一族数学字体 +中,\TeX{} 将用它取代其中没有定义的字体。 +\enddesc + +%========================================================================== +%\subsection {Type styles} +\subsection {字体风格} + +% \xrdef{seltype} +% \begindesc +% ^^{type styles} +% \easy\ctsx bf {use boldface type} +% \ctsx it {use italic type} +% \ctsx rm {use roman type} +% \ctsx sl {use slanted type} +% \ctsx tt {use typewriter type} +% \explain +% These commands select a type style without changing the typeface or +% the point size.\footnote{ +% \TeX\ does not provide predefined commands for changing just the point +% size, e.g., |\eightpoint|. +% Supporting such commands would require a great number of fonts, +% most of which would never be used. +% Such commands were, however, used in typesetting \texbook.} +% Normally you would enclose +% one of these type style commands in a +% group, together with the text to be set in the selected font. +% Outside of a group a type style command is +% effective until the end of the document +% (unless you override it with another such command). +% \example +% The Dormouse was {\it not} amused. +% | +% \produces +% The Dormouse was {\it not} amused. +% \endexample +% \enddesc +\xrdef{seltype} +\begindesc +^^{字体风格} +\easy\ctsx bf {粗体} +\ctsx it {意大利体} +\ctsx rm {罗马体} +\ctsx sl {斜体} +\ctsx tt {打字机字体} +\explain +这些命令选择一种字体风格,而不改变字样或者字号。 +\footnote{译注:注意区分字样(typeface)和字体(font),字样指一整套统一设计的字体。} +\footnote{\TeX\ 并不提供预定义的命令来改变字号,比如,|\eightpoint|。要支持这样的命令, +需要大量的字体,可能很多从来都不会用到。这样的命令曾被用来排版\texbook。} +一般情况下,这些字体风格命令和相应的文本被一起包含在一个编组里。 +如果放在编组之外,效果将会作用于文档剩余部分(除非用另外一个这样的命令覆盖它)。 +\example +The Dormouse was {\it not} amused. +| +\produces +The Dormouse was {\it not} amused. +\endexample +\enddesc + +% \see ``Fonts in math formulas'' (\xref{mathfonts}). +\see ``数学公式字体''(\xref{mathfonts})。 + +%========================================================================== +% \section {Uppercase and lowercase} +\section {大写和小写} + +% \begindesc +% \bix^^{case conversion} +% \bix^^{uppercase//conversion to} +% \bix^^{lowercase//conversion to} +% \cts lccode {\<charcode> \tblentry{number}} +% \cts uccode {\<charcode> \tblentry{number}} +% \explain +% The |\lccode| and |\uccode| values for the $256$ possible input +% characters specify the correspondence between the lowercase and +% uppercase forms of letters. These values are used by the |\lowercase| +% and |\uppercase| commands respectively and by \TeX's hyphenation +% algorithm. + + +\begindesc +\bix^^{大小写转换} +\bix^^{大写字母//转换为大写字母} +\bix^^{小写字母//转换为小写字母} +\cts lccode {\<charcode> \tblentry{number}} +\cts uccode {\<charcode> \tblentry{number}} +\explain +|\lccode| 和 |\uccode| 的值为$256$个输入字符设定大小写的对应关系。 +|\lowercase| 和 |\uppercase| 命令以及 \TeX\ 的断词算法将会使用这些值。 + +% \TeX\ initializes the values of |\lccode| and |\uccode| as follows: +\TeX\ 这样初始化 |\lccode|和|\uccode|的值: +%\ulist\compact +%\li The |\lccode| of a lowercase letter is the {\ascii} code for that letter. +%\li The |\lccode| of an uppercase letter is the {\ascii} code for the +%corresponding lowercase letter. +%\li The |\uccode| of an uppercase letter is the {\ascii} code for that letter. +%\li The |\uccode| of a lowercase letter is the {\ascii} code for the +%corresponding uppercase letter. +%\li The |\lccode| and |\uccode| of a nonletter are both zero. +%\endulist +\ulist\compact +\li 小写字母的|\lccode|是它的{\ascii}代码。 +\li 大写字母的|\lccode|是它的小写形式的{\ascii}代码。 +\li 大写字母的|\uccode|是它的{\ascii}代码。 +\li 小写字母的|\lccode|是它的大写形式的{\ascii}代码。 +\li 非字母字符的|\lccode|和|\uccode|都是零。 +\endulist + +%Most of the time there's no reason to change these values, +%but you might want to change them if you're using a language +%that has more letters than English. +%\example +%\char\uccode`s \char\lccode`a \char\lccode`M +%| +%\produces +%\char\uccode`s \char\lccode`a \char\lccode`M +%\endexample +%\enddesc +大多数时候,没有必要改变这些值,除非你使用的语文的字母比英文多。 +\example +\char\uccode`s \char\lccode`a \char\lccode`M +| +\produces +\char\uccode`s \char\lccode`a \char\lccode`M +\endexample +\enddesc + + +%\begindesc +%\cts lowercase {\rqbraces{\<token list>}} +%\cts uppercase {\rqbraces{\<token list>}} +%\explain ^^{case conversion} +%These commands convert the letters in \<token list>, +%i.e., those tokens with category code $11$, to their lowercase +%and uppercase forms. +%The conversion of a letter is defined by its |\lccode| (for lowercase) +%or |\uccode| (for uppercase) table value. +%Tokens in the list that are not letters are not affected---even if the +%tokens are \minref{macro} calls or other commands that expand into letters. +%\example +%\def\x{Cd} \lowercase{Ab\x} \uppercase{Ab\x} +%| +%\produces +%\def\x{Cd} \lowercase{Ab\x} \uppercase{Ab\x} +% +%\eix^^{case conversion} +%\eix^^{uppercase//conversion to} +%\eix^^{lowercase//conversion to} +%\endexample +%\enddesc +\begindesc +\cts lowercase {\rqbraces{\<token list>}} +\cts uppercase {\rqbraces{\<token list>}} +\explain ^^{大小写转换} +这些命令按照|\lccode|和|\uccode|的值转换\<token list>中的字母(类别码为$11$的)为它们的大写和小写形式。 +非字母字符不受影响,即使它们是\minref{宏}调用或其他展开成字母的命令。 +\example +\def\x{Cd} \lowercase{Ab\x} \uppercase{Ab\x} +| +\produces +\def\x{Cd} \lowercase{Ab\x} \uppercase{Ab\x} + +\eix^^{大小写转换} +\eix^^{大写字母//转换为大写字母} +\eix^^{小写字母//转换为小写字母} +\endexample +\enddesc + + +%========================================================================== +%\section {Interword spacing} +\section {单词间距} + +%\begindesc +%\bix^^{spaces//interword} +%\easy\ctsbasic {\\\vs}{} +%\blankidxref\ctsxrdef{@space} +%\explain +%This command explicitly produces an interword +%space called a ``^{control space}''. +%A control space is useful when a +%letter occurs immediately after a control sequence, or in any other +%circumstance where you don't want two tokens to be run together in the +%output. +%The amount of space produced by |\!vs| +%is independent of preceding punctuation, i.e., its space factor +%(\xref\spacefactor) is $1000$. +\begindesc +\bix^^{间隔//单词间距} +\writeidxfalse +\easy\ctsbasic {\\\vs}{} +\blankidxref\ctsxrdef{@space} +\writeidxtrue +\explain +这个命令明确地产生一个单词间空格,称为``^{控制空格}''。 +当一个字母出现在一个控制序列之后或者其他情况下你不想让两个记号排在一起时,就要用到控制空格。 +由|\!vs|产生的空白不受前面标点的影响,即其距离因子 +(\xref\spacefactor)为$1000$。 + +%Incidentally, if you want to print the `\vs' ^^{visible space} +%character that we've used here to denote a space, you can get it by typing +%|{\tt \char `\ }|. +% +%\example +%The Dormouse was a \TeX\ expert, but he never let on. +%| +%\produces +%The Dormouse was a \TeX\ expert, but he never let on. +%\endexample +%\enddesc + + +如果你想打印出`\vs' ^^{可见空格}空格,可以输入 +|{\tt \char `\ }|. + +\example +The Dormouse was a \TeX\ expert, but he never let on. +| +\produces +The Dormouse was a \TeX\ expert, but he never let on. +\endexample +\enddesc +%\begindesc +%\cts space {} +%\explain +%This command is equivalent to an input space character. +%It differs from ^|\ | in that its +%width \emph{can} be affected by preceding punctuation. +%\example +%Yes.\space No.\space Maybe.\par +%Yes.\!vs!.No.\!vs!.Maybe. +% +%| +%\produces +%Yes.\space No.\space Maybe.\par +%Yes.\ No.\ Maybe. +%\endexample +%\enddesc + +\begindesc +\cts space {} +\explain +这个命令等价于一个输入的空格字符。和 \writeidxfalse^|\ |\writeidxtrue 不同, +它的宽度\emph{会}受到前面标点的影响。 +\example +Yes.\space No.\space Maybe.\par +Yes.\!vs!.No.\!vs!.Maybe. + +| +\produces +Yes.\space No.\space Maybe.\par +Yes.\ No.\ Maybe. +\endexample +\enddesc + +%\begindesc +%\ctsact ^^M \xrdef{@newline} +%\explain +%This construct produces the ^{end of line} character. +%It normally has two effects when \TeX\ encounters it in +%your input: +%\olist +%\li It acts as a command, producing either an input space +%(if it comes at the end of a nonblank line) +%or a |\par| token (if it comes at the end of a blank line). +%^^|\par//from empty line| +%\li It ends the input line, causing \TeX\ to ignore the remaining +%characters on the line. +%\endolist +%\noindent +%However, |^^M| does \emph{not} end the line when it appears in the +%context |`\^^M|, denoting the ASCII code for control-M (the number $13$). +%You can change the meaning of |^^M| +%by giving it a different \minref{category code}. +%See \xrefpg{twocarets} for a more general explanation of the |^^| notation. +%\example +%Hello.^^MGoodbye. +%Goodbye again.\par +%The \char `\^^M\ character.\par +%% The fl ligature is at position 13 of font cmr10 +%\number `\^^M\ is the end of line code.\par +%Again, \number `^^M is the end of line code, +%isn't it? % 32 is the ASCII code for a space +%| +%\produces +%{\catcode `\^ = 7 % disable indexing use within this display +%Hello.^^MGoodbye +%Goodbye again.\par +%The \char `\^^M\ character.\par +%\number `\^^M\ is the end of line code.\par +%Again, \number `^^M is the end of line code, +%isn't it?} +%\endexample +%\enddesc +% +\begindesc +\ctsact ^^M \xrdef{@newline} +\explain +这将产生^{行尾}字符。通常有两个效果: +\olist +\li 类似一个命令,产生一个输入的空格(如果它出现在一个非空行的尾部)或者一个 +|\par|记号(如果出现在空行的尾部)。^^|\par//来自空行| +\li 结束一行,使\TeX{}忽略剩余的字符。 +\endolist +\noindent +但是,如果以|`\^^M|(即 control-M 的 ASCII 代码 13)出现,|^^M|\emph{不会}结束一行。 +你可以修改\minref{类别码},从而赋予它新的含义。 +关于|^^|更多的解释请参见\xrefpg{twocarets}。 +\example +Hello.^^MGoodbye. +Goodbye again.\par +The \char `\^^M\ character.\par +% The fl ligature is at position 13 of font cmr10 +\number `\^^M\ is the end of line code.\par +Again, \number `^^M is the end of line code, +isn't it? % 32 is the ASCII code for a space +| +\produces +{\catcode `\^ = 7 % disable indexing use within this display +Hello.^^MGoodbye +Goodbye again.\par +The \char `\^^M\ character.\par +\number `\^^M\ is the end of line code.\par +Again, \number `^^M is the end of line code, +isn't it?} +\endexample +\enddesc + +%\begindesc +%\easy\ctsact ~ \xrdef{@not} +%\explain +%The \minref{active character} `|~|', called a ``^{tie}'', +%produces a normal interword space +%between two words and links those words so that +%a line break will not occur between them. +%You should use a tie in any context where a line break would be confusing, +%e.g., before a middle initial, after an abbreviation such as ``Dr.'', +%or after ``Fig.'' in ``Fig.~8''. +% +%\example +%P.D.Q.~Bach (1807--1742), the youngest and most +%imitative son of Johann~S. Bach, composed the +%{\sl Concerto for Horn and Hardart}. +%| +%\produces +%\margin{The inversion of dates is deliberate---cf. Peter Schickele.} +%P.D.Q.~Bach (1807--1742), the youngest and most +%imitative son of Johann~S. Bach, composed the +%{\sl Concerto for Horn and Hardart}. +%\endexample\enddesc + + +\begindesc +\easy\ctsact ~ \xrdef{@not} +\explain +\minref{活动字符}`|~|'称为``^{带子}''(tie),它产生一个正常的单词间空白, +同时保证前后两个单词之间不会断行。只要断行会有歧义,就应该使用带子。 +比如,在中间名之前,缩写词``Dr.''之后,或者``Fig.''之后:像``Fig.~8''。 + +\example +P.D.Q.~Bach (1807--1742), the youngest and most +imitative son of Johann~S. Bach, composed the +{\sl Concerto for Horn and Hardart}. +| +\produces +\margin{The inversion of dates is deliberate---cf. Peter Schickele.} +P.D.Q.~Bach (1807--1742), the youngest and most +imitative son of Johann~S. Bach, composed the +{\sl Concerto for Horn and Hardart}. +\endexample\enddesc +%\begindesc +%\easy\ctspecial / \ctsxrdef{@slash} +%\explain +%Every character in a \TeX\ \minref{font} +%has an ``^{italic correction}'' associated with it, although +%the italic correction +%is normally zero for a character in an unslanted (upright) font. +%The italic correction specifies the extra space that's needed +%when you're switching from a slanted font (not necessarily +%an italic font) to an unslanted font. +%The extra +%space is needed because a slanted character projects into the +%space that follows it, making the space look too small when the +%next character is unslanted. +%The metrics file for a font includes the italic correction of each +%character in the font. +%^^{metrics file//italic correction in} +\begindesc +\easy\ctspecial / \ctsxrdef{@slash} +\explain +\TeX\ \minref{字体}中每个字符都有``^{倾斜修正}''。直立字体的倾斜修正一般就是零。 +当从倾斜的字体(不一定是意大利体)切换到直立的字体时,倾斜修正会增加额外的空白。 +这个额外的空白之所以必要,是因为倾斜的字符略微挤占了后面的空格位置, +当后面跟着直立字体时,会显得中间的空格太小。 +所有字符的倾斜修正都包含在字体的度量文件里。 +^^{度量文件//其中的倾斜修正} + +%The |\/| command +%produces an ^{italic correction} for the preceding character. +%You should insert an italic correction when you're switching from +%a slanted font to an unslanted font, +%except when the next character is a period or comma. +%\example +%However, {\it somebody} ate {\it something}: that's clear. +% +%However, {\it somebody\/} ate {\it something\/}: +%that's clear. +%| +%\produces +%However, {\it somebody} ate {\it something}: that's clear. +% +%However, {\it somebody\/} ate {\it something\/}: +%that's clear. +%\endexample +%\enddesc +命令|\/|产生对前面字符的^{倾斜修正}。当从倾斜字体切换到直立字体的时候, +必须要插入倾斜修正,除非下一个字符是句点或逗号。 +\example +However, {\it somebody} ate {\it something}: that's clear. + +However, {\it somebody\/} ate {\it something\/}: +that's clear. +| +\produces +However, {\it somebody} ate {\it something}: that's clear. + +However, {\it somebody\/} ate {\it something\/}: +that's clear. +\endexample +\enddesc + +%\begindesc +%\cts frenchspacing {} +%\cts nonfrenchspacing {} +%\explain +%^^{interword spacing} +%\TeX\ normally adjusts the spacing between words to account for +%punctuation marks. For example, it inserts extra space at the end of a +%sentence and adds some stretch to the \minref{glue} following any +%punctuation mark there. The |\frenchspacing| command tells \TeX\ to make +%the interword spacing independent of punctuation, while the +%|\nonfrenchspacing| command tells \TeX\ to use its normal spacing rules. +%If you don't specify +%|\frenchspacing|, you'll get \TeX's normal spacing. +% +%See \xrefpg{periodspacing} for advice on how to control \TeX's treatment +%of punctuation at the end of sentences. +% +%\example +%{\frenchspacing An example: two sentences. Right? No.\par} +%{An example: two sentences. Right? No. \par}% +%| +%\produces +%{\frenchspacing An example: two sentences. Right? No.\par} +%{An example: two sentences. Right? No. \par}% +%\endexample +% +%\enddesc +% + + +\begindesc +\cts frenchspacing {} +\cts nonfrenchspacing {} +\explain +^^{单词间距} +\TeX{}一般会为了标点符号而调整单词间距。例如,一个句子的末尾会有额外的空白, +句尾标点符号之后的\minref{粘连}会被拉长。 +|\frenchspacing|命令让\TeX{}调整单词间距时忽略标点符号; +|\nonfrenchspacing|命令让\TeX{}使用正常间距,即不使用|\frenchspacing|效果。 + +%See \xrefpg{periodspacing} for advice on how to control \TeX's treatment +%of punctuation at the end of sentences. +% +%\example +%{\frenchspacing An example: two sentences. Right? No.\par} +%{An example: two sentences. Right? No. \par}% +%| +%\produces +%{\frenchspacing An example: two sentences. Right? No.\par} +%{An example: two sentences. Right? No. \par}% +%\endexample +% +%\enddesc + + +关于\TeX{}如何处理句尾标点,请参考\xrefpg{periodspacing}。 +\example +{\frenchspacing An example: two sentences. Right? No.\par} +{An example: two sentences. Right? No. \par}% +| +\produces +{\frenchspacing An example: two sentences. Right? No.\par} +{An example: two sentences. Right? No. \par}% +\endexample + +\enddesc +%\begindesc +%\cts obeyspaces {} +%\explain +%\TeX\ normally condenses a sequence of several spaces to a single space. +%|\obeyspaces| instructs \TeX\ to produce a space in the output +%for each space in the input. +%|\obeyspaces| does not cause spaces at the beginning of a line +%to show up, however; for that we recommend the |\obey!-white!-space| +%command defined in |eplain.tex| +%(\xref{ewhitesp}). +%^^|\obeywhitespace| +%|\obeyspaces| is often useful when you're typesetting something, +%computer input for example, +%in a monospaced font (one in which each character takes up the +%same amount of space) +%and you want to show exactly what each line of input looks like. +% +%You can use the |\obeylines| command (\xref{\obeylines}) to get \TeX\ +%to follow the line boundaries of your input. |\obeylines| is often +%used in combination with |\obeyspaces|. +%\example +%These spaces are closed up +%{\obeyspaces but these are not }. +%| +%\produces +%These spaces are closed up +%{\obeyspaces but these are not }. +%\endexample +%\enddesc +% + +\begindesc +\cts obeyspaces {} +\explain +\TeX\ 把连续的空格处理为一个空格。 +|\obeyspaces|的作用是输入多少空格,就输出多少。 +但是|\obeyspaces|不会显示行首的空格。这时候推荐使用|\obey!-white!-space|,其定义在|eplain.tex|中(\xref{ewhitesp})。 +^^|\obeywhitespace| +|\obeyspaces|主要用于以等宽字体打印计算机代码,以及显示所见即所得的内容。 + + +|\obeylines|命令(\xref{\obeylines})的作用是让\TeX{}输出跟你所输入的一模一样的行。|\obeylines|经常和|\obeyspaces|一起被使用。 +\example +These spaces are closed up +{\obeyspaces but these are not }. +| +\produces +These spaces are closed up +{\obeyspaces but these are not }. +\endexample +\enddesc + +%\begindesc +%\cts spacefactor {\param{number}} +%\cts spaceskip {\param{glue}} +%\cts xspaceskip {\param{glue}} +%\cts sfcode {\<charcode> \tblentry{number}} +%\explain +%These primitive \minref{parameter}s affect how much space \TeX\ +%puts between two adjacent words, i.e., the ^{interword spacing}. +%The normal interword spacing is supplied by the current font. +%As \TeX\ is processing a \minref{horizontal list}, it keeps track of the +%^{space factor} $f$ in |\spacefactor|. +%As it processes each input character $c$, it updates $f$ according to the +%value of $f_c$, the space factor code of $c$ (see below). +%For most characters, $f_c$ is $1000$ and \TeX\ sets $f$ to $1000$. +%(The initial value of $f$ is also $1000$.) +%When \TeX\ sees an interword space, it adjusts the size of that space +%by multiplying the stretch and shrink of that space by +%$f/1000$ and $1000/f$ respectively. +%Thus: +%\olist\compact +%\li If $f=1000$, the interword space keeps its normal value. +%\li If $f<1000$, the interword space gets less \minref{stretch} +%and more \minref{shrink}. +%\li If $f>1000$, the interword space gets more \minref{stretch} +%and less \minref{shrink}. +%\endolist +%% > changed to \ge on the next line after second edition was typeset. +%% Correction made by A-W production. +%In addition, if $f\ge2000$ the interword space is further increased by the +%``extra space'' parameter associated with the current font. +\begindesc +\cts spacefactor {\param{number}} +\cts spaceskip {\param{glue}} +\cts xspaceskip {\param{glue}} +\cts sfcode {\<charcode> \tblentry{number}} +\explain +这些基本\minref{参数}影响相邻单词之间的空白,即^{单词间距}。 +默认的单词间距由当前字体决定。 +当\TeX\ 处理一个\minref{水平列表}时,会监视 |\spacefactor| ^{间隔因子} $f$。 +每当一个输入字符$c$被处理时,$f$就会随$f_c$($c$的间隔因子代码)的值而更新。 +大多数的字符,$f_c$是$1000$,因此\TeX\ 设定$f$为$1000$。($f$的初始值也是$1000$。) +当\TeX\ 遇到一个单词间空格的时候,就会调整间隔的大小, +给该间隔的伸长量和收缩量分别乘以 $f/1000$ 和 $1000/f$。 +所以: +\olist\compact +\li 当$f=1000$时,单词间距为默认值。 +\li 当$f<1000$时,单词间距有更少\minref{伸长量}更多\minref{收缩量}。 +\li 当$f>1000$时,单词间距有更多\minref{伸长量}更少\minref{收缩量}。 +\endolist +% > changed to \ge on the next line after second edition was typeset. +% Correction made by A-W production. +另外,如果$f\ge2000$,当前字体的``额外空白''参数会让单词间距进一步增大。 + +%Each +%input character $c$ has an entry in the |\sfcode| (space factor code) +%table. +%The |\sfcode| table entry is independent of the font. +%Usually \TeX\ just sets $f$ to $f_c$ after it processes $c$. +%However: +%\ulist +%\li If $f_c$ is zero, \TeX\ leaves $f$ unchanged. +%Thus a character such as `|)|' in \plainTeX, +%for which $f_c$ is zero, is essentially transparent to +%the interword space calculation. +%\li If $f<1000<f_c$, \TeX\ sets $f$ to $1000$ rather than to $f_c$, +%i.e., it refuses to raise $f$ very rapidly. +%\endulist +%The |\sfcode| value for a period is normally $3000$, +%which is why \TeX\ usually puts extra space after a period +%% > to \ge here, too, as above. +%(see the rule above for the case $f\ge2000$). +%Noncharacter items in a horizontal list, e.g., vertical rules, +%generally act like characters with a space factor of $1000$. +每一个输入字符$c$对应于|\sfcode|(间隔因子代码)表中的一项。 +|\sfcode|表项与字体无关。通常\TeX\ 处理完$c$之后就让$f$等于$f_c$。 +但是: +\ulist +\li 如果$f_c$为零,$f$将不变。所以\plainTeX\ 中$f_c$为零的字符, +如`|)|',对于单词间距的计算毫无影响。 +\li 如果$f<1000<f_c$,\TeX\ 会让$f$为$1000$而不是$f_c$,也就是,不会让$f$快速地增加。 +\endulist +句号的|\sfcode|值通常是$3000$,所以\TeX\ 会在句号之后增加额外的空白。% +(参见上面$f\ge2000$的情形)。水平列表中的非字符, +比如竖直标线,一般视为间隔因子为 $1000$ 字符。 + +%You can change the space factor explicitly by assigning +%a different numerical value to |\spacefactor|. +%You can also override the normal +%interword spacing by assigning a different numerical +%value to |\xspaceskip| or to |\spaceskip|: +%\ulist +%\li |\xspaceskip| specifies the glue to be used when $f\ge2000$; +%in the case where +%|\xspaceskip| is zero, the normal rules apply. +%\li |\spaceskip| specifies the glue to be used when $f<2000$ or when +%\hbox{|\xspaceskip|} is zero; if |\spaceskip| is zero, the normal rules apply. +%The stretch and shrink of +%the |\spaceskip| glue, like that of the ordinary interword glue, +%is modified according to the value of $f$. +%\endulist +通过修改 |\spacefactor| 的值,就可以显式地调整间隔因子。 +通过修改 |\xspaceskip| 或者 |\spaceskip| 的值,你还可以覆盖默认的单词间距: +\ulist +\li |\xspaceskip| 设定 $f\ge2000$ 时的粘连;如果 |\xspaceskip| 是零,就取默认值。 +\li |\spaceskip| 设定 $f<2000$ 或者 |\xspaceskip| 为零时的粘连; +如果|\spaceskip|是零,就取默认值。 +|\spaceskip| 粘连的伸长或收缩依$f$的值而变,就像普通的单词间距一样。 +\endulist + +%See \knuth{page~76} for the precise rules that \TeX\ uses in calculating +%interword \minref{glue}, and \knuth{pages~285--287} for the adjustments +%made to |\spacefactor| after various items in a horizontal list. +%\eix^^{spaces//interword} +%\enddesc +\knuth{第~76~页} 对 \TeX\ 计算单词间\minref{粘连}的规则有一个具体的解释。 +\knuth{第~285--287~页}详细描述了水平列表的各种项目之后|\spacefactor|的调整。 +\eix^^{间隔//单词间距} +\enddesc + +%========================================================================== +%\section {Centering and justifying lines} +\section {行的居中和平均分布} + +%\begindesc +%\bix^^{centering} +%\bix^^{flush left} +%\bix^^{flush right} +%\bix^^{justification} +%\easy\cts centerline {\<argument>} +%\cts leftline {\<argument>} +%\cts rightline {\<argument>} +%\explain +%The |\centerline| command produces an \minref{hbox} exactly as wide +%as the current line and places \<argument> at the center of the box. +%The |\leftline| and |\rightline| commands are analogous; they +%place \<argument> at the left end or at the right end of the box. +%If you want to apply one of these commands to +%several consecutive lines, you must apply +%it to each one individually. +%See \xrefpg{eplaincenter} for an alternate approach. +\begindesc +\bix^^{居中对齐} +\bix^^{居左对齐} +\bix^^{居右对齐} +\bix^^{均匀对齐} +\easy\cts centerline {\<argument>} +\cts leftline {\<argument>} +\cts rightline {\<argument>} +\explain +命令 |\centerline| 产生产生一个与当前行同宽的\minref{水平盒子}, +并把 \<argument> 在里面居中放置。命令 |\leftline| 和|\rightline| 的作用类似: +把 \<argument> 放在盒子里靠左或者靠右的位置。如果想让几行内容都有同样的效果, +每一行都必须这样操作。其他的办法,请看\xrefpg{eplaincenter}。 + +%Don't use these commands within a paragraph---if you do, +%\TeX\ probably won't be able to break the paragraph into lines and +%will complain about an overfull hbox. +%\example +%\centerline{Grand Central Station} +%\leftline{left of Karl Marx} +%\rightline{right of Genghis Khan} +%| +%\produces +%\centerline{Grand Central Station} +%\leftline{left of Karl Marx} +%\rightline{right of Genghis Khan} +% +%\eix^^{centering} +%\eix^^{flush left} +%\eix^^{flush right} +%\eix^^{justification} +% +%\endexample +%\enddesc +这些命令不能用在段落里,否则分段成行的时候,\TeX\ 可能会遇到麻烦并警告盒子溢出了。 +\example +\centerline{Grand Central Station} +\leftline{left of Karl Marx} +\rightline{right of Genghis Khan} +| +\produces +\centerline{Grand Central Station} +\leftline{left of Karl Marx} +\rightline{right of Genghis Khan} +\eix^^{居中对齐} +\eix^^{居左对齐} +\eix^^{居右对齐} +\eix^^{均匀对齐} +\endexample +\enddesc + +%\begindesc +%\easy\cts line {\<argument>} +%\explain +%This command produces an \minref{hbox} containing \<argument>. +%The hbox is exactly as wide as the current line, i.e., it +%extends from the right margin to the left margin. +%\example +%\line{ugly \hfil suburban \hfil sprawl} +%%Without \hfil you'd get an `underfull box' from this. +%| +%\produces +%\line{ugly \hfil suburban \hfil sprawl}% +%\endexample +% +%\enddesc +\begindesc +\easy\cts line {\<argument>} +\explain +这个命令产生一个\minref{hbox}来包含\<argument>。 +hbox的宽度和当前行宽相同,即从左边距延伸到右边距。 +\example +\line{ugly \hfil suburban \hfil sprawl} +% Without \hfil you'd get an `underfull box' from this. +| +\produces +\line{ugly \hfil suburban \hfil sprawl}% +\endexample +\enddesc + +%\begindesc +%^^{overlapping text} +%\cts llap {\<argument>} +%\cts rlap {\<argument>} +%\explain +%These commands enable you to produce text that overlaps +%whatever happens to be to the left or to the right of the current +%position. |\llap| backspaces by the width of \<argument> and then +%typesets \<argument>. |\rlap| is similar, except that it typesets +%\<argument> first and then backspaces. |\llap| and |\rlap| are useful for +%placing text outside of the current margins. +%Both |\llap| and |\rlap| do their work by creating +%a \minref{box} of zero~width. + + +\begindesc +^^{覆盖文件} +\cts llap {\<argument>} +\cts rlap {\<argument>} +\explain +这些命令把文本覆盖到当前位置的左边或者右边。|\llap|会向左退\<argument>的宽度,然后开始排版\<argument>。|\rlap|类似,但是先排版\<argument>然后把后面的内容向左退。|\llap|和|\rlap|主要用于把文本放在现在的页边距之外。它们的工作原理是创建一个零宽度的\minref{盒子}。 +%You can also use |\llap| or |\rlap| to construct special characters by +%^{overprinting}, but don't try it unless you're sure that the characters +%you're using have the same width (which is the case for a monospaced +%font such as ^|cmtt10|, the Computer Modern $10$-point ^{typewriter font}). +%^^{Computer Modern fonts} +%\example +%\noindent\llap{off left }\line{\vrule $\Leftarrow$ +%left margin of examples\hfil right margin of examples +%$\Rightarrow$\vrule}\rlap{ off right} +%| +%\produces +%\noindent\llap{off left }\line{\vrule $\Leftarrow$ +%left margin of examples\hfil right margin of examples +%$\Rightarrow$\vrule}\rlap{ off right} +%\endexample +% +%%\example +%%{\tt O\llap{!|}} +%%| +%%\produces +%%{\cm \tt O\llap{\char `|}} +%%\endexample +% +%\nobreak % don't lose the \see +%\enddesc +% +%\see |\hsize| (\xref{\hsize}). +% + +|\llap|和|\rlap|可以被用来以^{叠印}的方式新建特殊字符。但是必须确保作原料的字符一般宽(等宽字体如^|cmtt10|和Computer Modern $10$-point的^{打字机字体}是这样的)。 +^^{计算机现代字体} +\example +\noindent\llap{off left }\line{\vrule $\Leftarrow$ +left margin of examples\hfil right margin of examples +$\Rightarrow$\vrule}\rlap{ off right} +| +\produces +\noindent\llap{off left }\line{\vrule $\Leftarrow$ +left margin of examples\hfil right margin of examples +$\Rightarrow$\vrule}\rlap{ off right} +\endexample + +%\example +%{\tt O\llap{!|}} +%| +%\produces +%{\cm \tt O\llap{\char `|}} +%\endexample + +\nobreak % don't lose the \see +\enddesc + +\see |\hsize| (\xref{\hsize}). + +%========================================================================== +%\section {Shaping paragraphs} +\section {塑段} + +%\subsection {Starting, ending, and indenting paragraphs} +\subsection {段落的开始、结束和缩进} + +%\begindesc +%\bix^^{paragraphs//shaping} +%\ctspecial par \ctsxrdef{@par} +%\explain +%This command ends a paragraph and puts \TeX\ into \minref{vertical mode}, +%ready to add more items to the page. Since \TeX\ converts a blank line in +%your input file into a |\par| \minref{token}, you don't ordinarily need to +%type an explicit |\par| in order to end a paragraph. + + +\begindesc +\bix^^{段落//塑造段落} +\ctspecial par \ctsxrdef{@par} +\explain +这个命令结束一个段落,并使\TeX{}进入\minref{竖直模式}来在页面上增加更多内容。 +因为\TeX{}把一个空行当作|\par|\minref{记号},所以不需要明确地键入|\par|。 + +%An important point is that |\par| doesn't tell +%\TeX\ to start a paragraph; it only tells \TeX\ to end a paragraph. +%\TeX\ starts a paragraph when it is in ordinary vertical mode (which it +%is after a |\par|) and encounters an inherently horizontal item such as +%a letter. As part of its ceremony for starting a paragraph, \TeX\ +%^^{paragraphs//starting} +%inserts an amount of vertical space given by the parameter |\parskip| +%(\xref{\parskip}) and indents the paragraph by a horizontal space given +%by |\parindent| (\xref{\parindent}). + + +必须指出|\par|不会让\TeX{}开始新的一段;它仅仅告诉\TeX{}去结束一段。 +要使\TeX{}开始新段落,需要处于竖直模式之下(在|\par|之后已经是了),并遇到一个水平项目比如一个字母。为了开始新段落,\TeX{} +^^{段落//开始段落} +将插入一些竖直空白,取决于|\parskip| +(\xref{\parskip});新段落缩进,取决于|\parindent| (\xref{\parindent})。 + +%You can usually cancel any interparagraph space produced by a |\par| by giving +%the command |\vskip -\lastskip|. It can often +%be helpful to do this when you're writing a \minref{macro} that is +%supposed to work the same way whether or not it is preceded by a blank +%line. + + +要想减小段落间|\par|产生的空白,通常可以使用命令|\vskip -\lastskip|。当你需要写一个\minref{宏}而让它与前面是不是空行无关的时候,这个命令就有用。 +%You can get \TeX\ to take some special action at the start of each paragraph +%by placing the instructions in ^|\everypar| (\xref\everypar). +% +%See \knuth{pages~283 and 286} for the precise effect of |\par|. +% +%\example +%\parindent = 2em +%``Can you row?'' the Sheep asked, handing Alice a pair of +%knitting-needles as she was speaking.\par ``Yes, a little% +%---but not on land---and not with needles---'' Alice was +%starting to say, when suddenly the needles turned into oars. +%| +%\produces +%\parindent = 2em +%``Can you row?'' the Sheep asked, handing Alice a pair of +%knitting-needles as she was speaking.\par ``Yes, a little% +%---but not on land---and not with needles---'' Alice was +%starting to say, when suddenly the needles turned into oars. +%\endexample +%\enddesc + + +你可以使用^|\everypar| (\xref\everypar)来让\TeX{}在每开始一个新段落的时候做一些事. + +|\par|的具体效果请参阅\knuth{pages~283 and 286}。 + +\example +\parindent = 2em +``Can you row?'' the Sheep asked, handing Alice a pair of +knitting-needles as she was speaking.\par ``Yes, a little% +---but not on land---and not with needles---'' Alice was +starting to say, when suddenly the needles turned into oars. +| +\produces +\parindent = 2em +``Can you row?'' the Sheep asked, handing Alice a pair of +knitting-needles as she was speaking.\par ``Yes, a little% +---but not on land---and not with needles---'' Alice was +starting to say, when suddenly the needles turned into oars. +\endexample +\enddesc +%\begindesc +%\cts endgraf {} +%\explain +%This command is a synonym for the ^|\par| primitive command. +%It is useful when you've redefined ^|\par| but still want access to the +%original definition of |\par|. +%\enddesc + + +\begindesc +\cts endgraf {} +\explain +这个命令与^|\par|同义。有时候你重新定义了^|\par|,但是又想取得|\par|的原始定义,这个命令就会有用。 +\enddesc +%\begindesc +%\cts parfillskip {\param{glue}} +%\explain +%^^{paragraphs//glue at end of} +%This parameter specifies the horizontal glue that +%\TeX\ inserts at the end of a paragraph. +%The default value of |\parfillskip| is |0pt plus 1fil|, +%which causes the last line of a paragraph to be +%filled out with blank space. A value of |0pt| forces +%\TeX\ to end the last line of a paragraph at the right margin. +%\enddesc + + +\begindesc +\cts parfillskip {\param{glue}} +\explain +^^{段落//段落末尾的粘连} +这个参数设定\TeX{}插入段落末尾的水平粘连。 +默认值是|0pt plus 1fil|,这使得最后一行被空格填满。如果设成|0pt|, +\TeX{}就会把段落的最后一行拉伸到右边距。 +\enddesc +%\bix^^{indentation} +%\begindesc +%\easy\cts indent {} +%\explain +%If \TeX\ is in vertical mode, as it is after ending a paragraph, +%this command inserts the ^|\parskip| interparagraph glue, +%puts \TeX\ into horizontal mode, starts a paragraph, and +%indents that paragraph by |\parindent|. +%If \TeX\ is already in horizontal mode, this command merely produces +%a blank space of width |\parindent|. +%Two |\indent|s in a row +%produce two indentations. +%^^{indentation} + + +\bix^^{缩进} +\begindesc +\easy\cts indent {} +\explain +当\TeX{}处于竖直模式时,比如段落结束以后,这个命令插入段落间粘连^|\parskip|,使\TeX{}进入水平模式,开始新的一段,并缩进|\parindent|大小。 +如果\TeX{}已经处于水平模式了,这个命令就只做缩进。 +一行中两个|\indent|产生两个缩进。 +^^{缩进} +%As the example below shows, an |\indent| at a point where \TeX\ +%would start a paragraph anyway is redundant. +%When \TeX\ is in vertical mode and sees a letter or some other +%inherently horizontal command, it starts a paragraph by +%switching to horizontal mode, +%doing an |\indent|, and processing the horizontal command. +% +%\example +%\parindent = 2em This is the first in a series of three +%paragraphs that show how you can control indentation. Note +%that it has the same indentation as the next paragraph.\par +%\indent This is the second in a series of three paragraphs. +%It has \indent an embedded indentation.\par +%\indent\indent This doubly indented paragraph +%is the third in the series. +%| +%\produces +%\parindent = 2em This is the first in a series of three +%paragraphs that show how you can control indentation. Note +%that it has the same indentation as the next paragraph.\par +%\indent This is the second in a series of three paragraphs. +%It has \indent an embedded indentation.\par +%\indent\indent This doubly indented paragraph +%is the third in the series. +%\endexample +%\enddesc + + +如下面的例子所示,新的段落开始之后的|\indent|是多余的。 +当\TeX{}处在竖直模式下,遇到一个字母或其他水平模式中的命令时,就会切换到水平模式缩进|\indent|,然后继续。 + +\example +\parindent = 2em This is the first in a series of three +paragraphs that show how you can control indentation. Note +that it has the same indentation as the next paragraph.\par +\indent This is the second in a series of three paragraphs. +It has \indent an embedded indentation.\par +\indent\indent This doubly indented paragraph +is the third in the series. +| +\produces +\parindent = 2em This is the first in a series of three +paragraphs that show how you can control indentation. Note +that it has the same indentation as the next paragraph.\par +\indent This is the second in a series of three paragraphs. +It has \indent an embedded indentation.\par +\indent\indent This doubly indented paragraph +is the third in the series. +\endexample +\enddesc + +% +%\begindesc +%\easy\cts noindent {} +%\explain +%If \TeX\ is in vertical mode, as it is after ending a paragraph, +%this command inserts the ^|\parskip| interparagraph glue, +%puts \TeX\ into horizontal mode, and starts an unindented paragraph. +%It has no effect in horizontal mode, i.e., within a paragraph. +%Starting a paragraph with |\noindent| thus cancels +%the indentation by |\parindent| +%that would normally occur there. +%^^{indentation} +% + +\begindesc +\easy\cts noindent {} +\explain +当\TeX{}结束一段后处于竖直模式时,这个命令插入段落间粘连 ^|\parskip|, +使\TeX{}进入水平模式,然后开始新段,不要缩进。 +在水平模式中,比如段落中,这个命令没有效果。 +|\noindent|开始的新段会取消通常的|\parindent|缩进。 +^^{缩进} +%A common use of |\noindent| is to cancel the indentation of +%the first line of a +%paragraph when the paragraph follows some displayed material. +% +%\example +%\parindent = 1em +%Tied round the neck of the bottle was a label with the +%words \smallskip \centerline{EAT ME}\smallskip +%\noindent beautifully printed on it in large letters. +%| +%\produces +%\parindent = 1em +%Tied round the neck of the bottle was a label with the +%words \smallskip \centerline{EAT ME}\smallskip +%\noindent beautifully printed on it in large letters. +%\endexample +%\enddesc + + +当新的段落是在某些独立显示的内容之后出现时,|\noindent|通常用于取消段落第一行的缩进。 + +\example +\parindent = 1em +Tied round the neck of the bottle was a label with the +words \smallskip \centerline{EAT ME}\smallskip +\noindent beautifully printed on it in large letters. +| +\produces +\parindent = 1em +Tied round the neck of the bottle was a label with the +words \smallskip \centerline{EAT ME}\smallskip +\noindent beautifully printed on it in large letters. +\endexample +\enddesc +%\margin{{\tt\\textindent} moved here from later in the section.} +%\begindesc +%\cts textindent {\<argument>} +%\explain +%^^{indentation} +%This command tells \TeX\ to start a paragraph and indent it by +%|\par!-indent|, +%as usual. +%\TeX\ then right-justifies \<argument> within the indentation +%and +%follows it with an en space (half an em). +%\PlainTeX\ uses this command to typeset footnotes (\xref\footnote) +%^^{footnotes//using \b\tt\\textindent\e\ with} +%and items in lists (see |\item|, \xref\item). +% +%\example +%\parindent = 20pt \textindent{\raise 1pt\hbox{$\bullet$}}% +%You are allowed to use bullets in \TeX\ even if +%you don't join the militia, and many peace-loving +%typographers do so. +%| +%\produces +%\parindent = 20pt \textindent{\raise 1pt\hbox{$\bullet$}}% +%You are allowed to use bullets in \TeX\ even if +%you don't join the militia, and many peace-loving +%typographers do so. +%\endexample\enddesc + + +\margin{{\tt\\textindent} 从此节的后面移到这里} +\begindesc +\cts textindent {\<argument>} +\explain +^^{缩进} +这个命令让\TeX\ 开始新段,正常缩进|\par!-indent|。 +然后\TeX\ 在缩进的地方向右对齐排版\<argument>并加入一个en大小的空白(em的一半)。 +\PlainTeX\ 使用这个命令来排版脚注(\xref\footnote ) +^^{脚注//在脚注中用 \b\tt\\textindent\e} +以及列表项(见 |\item|,\xref\item )。 + +\example +\parindent = 20pt \textindent{\raise 1pt\hbox{$\bullet$}}% +You are allowed to use bullets in \TeX\ even if +you don't join the militia, and many peace-loving +typographers do so. +| +\produces +\parindent = 20pt \textindent{\raise 1pt\hbox{$\bullet$}}% +You are allowed to use bullets in \TeX\ even if +you don't join the militia, and many peace-loving +typographers do so. +\endexample\enddesc +%\begindesc +%\cts parindent {\param{dimen}} +%\explain +%This \minref{parameter} specifies the amount by which +%the first line of each paragraph is to be indented. ^^{indentation} +%As the example below shows, it's a bad idea to set both |\parindent| +%and ^|\parskip| to zero since then the paragraph breaks are +%no longer apparent. +%\example +%\parindent = 2em This paragraph is indented by 2 ems. +%\par \parindent=0pt This paragraph is not indented at all. +%\par Since we haven't reset the paragraph indentation, +%this paragraph isn't indented either. +%| +%\produces +%\parindent = 2em This paragraph is indented by 2 ems. +%\par \parindent=0pt This paragraph is not indented at all. +%\par Since we haven't reset the paragraph indentation, +%this paragraph isn't indented either. +%\endexample\enddesc + + +\begindesc +\cts parindent {\param{dimen}} +\explain +这个\minref{参数}设定段落第一行缩进的大小。^^{缩进} +如下面的例子所示,最好不要同时使|\parindent|和^|\parskip|为零,否则两段的区别就不明显了。 +\example +\parindent = 2em This paragraph is indented by 2 ems. +\par \parindent=0pt This paragraph is not indented at all. +\par Since we haven't reset the paragraph indentation, +this paragraph isn't indented either. +| +\produces +\parindent = 2em This paragraph is indented by 2 ems. +\par \parindent=0pt This paragraph is not indented at all. +\par Since we haven't reset the paragraph indentation, +this paragraph isn't indented either. +\endexample\enddesc +%\begindesc +%\cts everypar {\param{token list}} +%\explain +%\TeX\ performs the commands in \<token list> whenever it +%enters horizontal mode, e.g., when it starts a paragraph. +%By default |\everypar| is empty, but you can +%take extra actions at the start of every paragraph by putting +%the commands for those actions into a token list +%% +%% This \vglue makes the example overwrite the example, but since we are +%% not reprinting this page, it doesn't matter. For reasons I did not +%% attempt to track down, a page break happened before the example, +%% unlike in the first printing. +%% +%\secondprinting{\vglue-48pt} +%and assigning that token list to |\everypar|. +%\example +%\everypar = {$\Longrightarrow$\enspace} +%Now pay attention!!\par +%I said, ``Pay attention!!''.\par +%I'll say it again!! Pay attention!! +%| +%\produces +%\everypar = {$\Longrightarrow$\enspace} +%Now pay attention!\par +%I said, ``Pay attention!''.\par +%I'll say it again! Pay attention! +%\endexample +%\enddesc +%\secondprinting{\vfill\eject} + + +\begindesc +\cts everypar {\param{token list}} +\explain +\TeX{}处于水平模式下,比如新段开始的时候,就会在\<记号列表>中执行这个命令。默认的|\everypar|为空,但是你可以添加一些命令,每一段开始的时候在记号列表中执行 +% +% This \vglue makes the example overwrite the example, but since we are +% not reprinting this page, it doesn't matter. For reasons I did not +% attempt to track down, a page break happened before the example, +% unlike in the first printing. +% +%%\secondprinting{\vglue-48pt} +并为|\everypar|分配记号列表。 +\example +\everypar = {$\Longrightarrow$\enspace} +Now pay attention!!\par +I said, ``Pay attention!!''.\par +I'll say it again!! Pay attention!! +| +\produces +\everypar = {$\Longrightarrow$\enspace} +Now pay attention!\par +I said, ``Pay attention!''.\par +I'll say it again! Pay attention! +\endexample +\enddesc +%%\secondprinting{\vfill\eject} + +%========================================================================== +%\subsection {Shaping entire paragraphs} +\subsection {形成段落} + +%\begindesc +%\margin{This command was also described in the `Pages' chapter. The +%description here now combines the two earlier descriptions.} +%\bix^^{line breaks//and paragraph shape} +%\easy\cts hsize {\param{dimen}} +%\explain +%This \minref{parameter} specifies the current ^{line length}, +%i.e., the usual width of lines in a paragraph +%starting at the left margin. +%A great many \TeX\ commands, e.g., |\centerline| (\xref{\centerline}) +%and |\hrule| (\xref{\hrule}), implicitly use the value of +%|\hsize|. By changing |\hsize| within a group +%you can change the width of the constructs produced by such commands. + + +\begindesc +\margin{这个命令在“页面”一章也有涉及。此处讲解结合了前面两个地方的内容。} +\bix^^{断行//断行与段落形状} +\easy\cts hsize {\param{dimen}} +\explain +这个\minref{参数}设定当前的^{行宽},即从左边距开始算起,段落里一行的宽度。 +很多\TeX{}命令,比如|\centerline| (\xref{\centerline})和|\hrule| (\xref{\hrule}),都间接使用了|\hsize|的值。改变|\hsize|的值,就相应地改变了这些命令的宽度效果。 +%If you +%set |\hsize| within a \minref{vbox} that contains text, the vbox will +%have whatever width you've given to |\hsize|. +%^^{vboxes//width determined by \b\tt\\hsize\e} +% +%\PlainTeX\ sets |\hsize| to |6.5in|. +% +%\example +%{\hsize = 3.5in % Set this paragraph 3.5 inches wide. +%The hedgehog was engaged in a fight with another hedgehog, +%which seemed to Alice an excellent opportunity for +%croqueting one of them with the other.\par}% +%| +%\produces +%{\hsize = 3.5in +%The hedgehog was engaged in a fight with another hedgehog, +%which seemed to Alice an excellent opportunity for croqueting +%one of them with the other.\par}% + + +如果|\hsize|的变化发生在一个非空的\minref{竖直盒子}里,盒子的宽度就是给定的|\hsize|。 +^^{竖直盒子//由 \b\tt\\hsize\e 确定宽度} + +\PlainTeX{}默认|\hsize|为|6.5in|。 + +\example +{\hsize = 3.5in % Set this paragraph 3.5 inches wide. +The hedgehog was engaged in a fight with another hedgehog, +which seemed to Alice an excellent opportunity for +croqueting one of them with the other.\par}% +| +\produces +{\hsize = 3.5in +The hedgehog was engaged in a fight with another hedgehog, +which seemed to Alice an excellent opportunity for croqueting +one of them with the other.\par}% + +%\doruler{\8\8\8\tick\1\tick\2\tick\1\tick\3}{3.5}{in} +%\nextexample +%\leftline{\raggedright\vtop{\hsize = 1.5in +%Here is some text that we put into a paragraph that is +%an inch and a half wide.}\qquad +%\vtop{\hsize = 1.5in Here is some more text that +%we put into another paragraph that is an inch and a +%half wide.}} +%| +%\produces +%\leftline{\raggedright\vtop{\hsize = 1.5in +%Here is some text that we put into a paragraph that is +%an inch and a half wide.}\qquad +%\vtop{\hsize = 1.5in Here is some more text that +%we put into another paragraph that is an inch and a +%half wide.}} +%\endexample +%\enddesc + + +\doruler{\8\8\8\tick\1\tick\2\tick\1\tick\3}{3.5}{in} +\nextexample +\leftline{\raggedright\vtop{\hsize = 1.5in +Here is some text that we put into a paragraph that is +an inch and a half wide.}\qquad +\vtop{\hsize = 1.5in Here is some more text that +we put into another paragraph that is an inch and a +half wide.}} +| +\produces +\leftline{\raggedright\vtop{\hsize = 1.5in +Here is some text that we put into a paragraph that is +an inch and a half wide.}\qquad +\vtop{\hsize = 1.5in Here is some more text that +we put into another paragraph that is an inch and a +half wide.}} +\endexample +\enddesc + +%\begindesc +%\easy\cts narrower {} +%\explain +%^^{paragraphs//narrow} +%This command makes paragraphs narrower, increasing the left and right +%margins by |\parindent|, the +%current paragraph ^{indentation}. +%It achieves this by increasing +%both |\leftskip| and |\rightskip| by |\parindent|. +%Normally you place |\narrower| at the +%beginning of a \minref{group} containing the paragraphs that you want to +%make narrower. If you forget to enclose |\narrower| within a group, +%you'll find that all the rest of your document will have narrow +%paragraphs. +\begindesc +\easy\cts narrower {} +\explain +^^{段落//窄段落} +这个命令产生较窄的段落,左右边距将会增加 |\parindent|(即当前段落^{缩进}的大小), +原因是|\leftskip|和|\rightskip|分别增加了|\parindent|。 +通常|\narrower|被放在一个\minref{编组}的开始,作用于其中的段落上。 +如果你忘记把|\narrower|封闭在编组里,就会发现文档所余部分全都变窄了。 + +%|\narrower| affects just those paragraphs that end after you invoke it. +%If you end a |\narrower| group before you've ended +%a paragraph, \TeX\ won't make that paragraph narrower. +% +%\example +%{\parindent = 12pt \narrower\narrower\narrower +%This is a short paragraph. Its margins are indented +%three times as much as they would be +%had we used just one ``narrower'' command.\par} +%| +%\produces +%{\parindent = 12pt \narrower\narrower\narrower +%This is a short paragraph. Its margins are indented +%three times as much as they would be +%had we used just one ``narrower'' command.\par} +%\endexample\enddesc + + +|\narrower|只影响其后的段落。如果包含|\narrower|的编组在段落末尾之前结束,\TeX{}将不会产生窄的段落。 + +\example +{\parindent = 12pt \narrower\narrower\narrower +This is a short paragraph. Its margins are indented +three times as much as they would be +had we used just one ``narrower'' command.\par} +| +\produces +{\parindent = 12pt \narrower\narrower\narrower +This is a short paragraph. Its margins are indented +three times as much as they would be +had we used just one ``narrower'' command.\par} +\endexample\enddesc + +%\begindesc +%\cts leftskip {\param{glue}} +%\cts rightskip {\param{glue}} +%\explain +%These parameters tell \TeX\ how much glue to place +%at the left and at the right end of each line of the current +%paragraph. We'll just explain how |\leftskip| works since |\rightskip| +%is analogous. +% +%^^{indentation} You can increase the left margin by setting |\leftskip| +%to a fixed nonzero \minref{dimension}. If you give |\leftskip| some +%stretch, you can produce ^{ragged left} text, i.e., +%text that has an uneven left margin. +% +%Ordinarily, you should enclose any \minref{assignment} to |\leftskip| +%in a \minref{group} together with the affected text +%in order to keep its effect from continuing to +%the end of your document. However, it's pointless to change +%|\leftskip|'s value inside a group that is in turn +%contained within a paragraph---the value of |\leftskip| at the +%\emph{end} of a paragraph +%is what determines how \TeX\ breaks the paragraph into lines. \minrefs{line +%break} +% +%\example +%{\leftskip = 1in The White Rabbit trotted slowly back +%again, looking anxiously about as it went, as if it had +%lost something. {\leftskip = 10in % has no effect +%It muttered to itself, ``The Duchess!! The Duchess!! She'll +%get me executed as sure as ferrets are ferrets!!''}\par}% +%| +%\produces +%{\leftskip = 1in The White Rabbit trotted slowly back +%again, looking anxiously about as it went, as if it had +%lost something. {\leftskip = 10in % has no effect +%It muttered to itself, ``The Duchess! The Duchess! +%She'll get me executed as sure as ferrets are ferrets!''}\par}% +%\nextexample +%\pretolerance = 10000 % Don't hyphenate. +%\rightskip = .5in plus 2em +%The White Rabbit trotted slowly back again, looking +%anxiously about as it went, as if it had lost something. +%It muttered to itself, ``The Duchess!! The Duchess!! She'll +%get me executed as sure as ferrets are ferrets!!'' +%| +%\produces +%\pretolerance = 10000 % Don't hyphenate. +%\rightskip = .5in plus 2em +%The White Rabbit trotted slowly back again, looking +%anxiously about as it went, as if it had lost something. +%It muttered to itself, ``The Duchess! The Duchess! She'll +%get me executed as sure as ferrets are ferrets!'' +%\endexample +%\enddesc + +\begindesc +\cts leftskip {\param{glue}} +\cts rightskip {\param{glue}} +\explain +这些参数告诉\TeX{}在当前段落每一行的左右各放多大的空白。我们将只解释|\leftskip|,因为|\rightskip|与其类似。 + +^^{缩进} 你可以通过设置|\leftskip|为一个固定的非零\minref{尺寸}来增加左边距。 +如果|\leftskip|是一个粘连,就会得到^{右对齐}的内容,即左边距参差不齐。 + +通常,你应该在一个\minref{编组}里为|\leftskip|\minref{赋值},来避免影响其余的文档部分。可是在一个段落内的编组里改变|\leftskip|的值是无意义的---只有段落\emph{末尾}处|\leftskip|的值才会被\TeX{}用来拆段成行。\minrefs{line +break} + +\example +{\leftskip = 1in The White Rabbit trotted slowly back +again, looking anxiously about as it went, as if it had +lost something. {\leftskip = 10in % has no effect +It muttered to itself, ``The Duchess!! The Duchess!! She'll +get me executed as sure as ferrets are ferrets!!''}\par}% +| +\produces +{\leftskip = 1in The White Rabbit trotted slowly back +again, looking anxiously about as it went, as if it had +lost something. {\leftskip = 10in % has no effect +It muttered to itself, ``The Duchess! The Duchess! +She'll get me executed as sure as ferrets are ferrets!''}\par}% +\nextexample +\pretolerance = 10000 % Don't hyphenate. +\rightskip = .5in plus 2em +The White Rabbit trotted slowly back again, looking +anxiously about as it went, as if it had lost something. +It muttered to itself, ``The Duchess!! The Duchess!! She'll +get me executed as sure as ferrets are ferrets!!'' +| +\produces +\pretolerance = 10000 % Don't hyphenate. +\rightskip = .5in plus 2em +The White Rabbit trotted slowly back again, looking +anxiously about as it went, as if it had lost something. +It muttered to itself, ``The Duchess! The Duchess! She'll +get me executed as sure as ferrets are ferrets!'' +\endexample +\enddesc +%\begindesc +%\easy\cts raggedright {} +%\cts ttraggedright {} +%\explain +%These commands cause \TeX\ to typeset your document +%``^{ragged right}''. Interword spaces all +%have their natural size, i.e., they all have the same width and +%don't stretch or shrink. +%Consequently the right margin is generally not even. +%The alternative, which is \TeX's default, is to typeset your document +%justified, +%^^{justification} +%i.e., with uniform left and right margins. +%In justified text, interword spaces are stretched in order to +%make the right margin even. +%Some typographers prefer ragged right because +%it avoids distracting ``rivers'' of white space on the printed page. +%\minrefs{justified text} + + +\begindesc +\easy\cts raggedright {} +\cts ttraggedright {} +\explain +这些命令让\TeX{}以“^{左对齐}”的方式排版文档,其中单词间距保持正常,即间距一样,不需伸缩。 +因此右边距是不均匀的。而 \TeX\ 默认的则是均匀对齐 ^^{均匀对齐},即左右边距一样。 +均匀对齐的文本单词间距将会有伸缩以产生均匀的右边距。有些排版者偏好使用左对齐。 +因为左对齐避免了页面上的空白参差不齐。 +\minrefs{均匀对齐的文本} +%You should use the |\ttraggedright| command when typesetting text in a +%monospaced font and the |\raggedright| command when typesetting text in any +%other font. +% +%Most of the time you'll want to apply these commands to an entire document, +%but you can limit their effects by enclosing them +%in a \minref{group}. +%\example +%\raggedright ``You couldn't have it if you {\it did\/} +%want it,'' the Queen said. ``The rule is, jam tomorrow +%and jam yesterday---but never jam {\it today\/}.'' +%``It {\it must\/} come sometimes to `jam today,% +%thinspace'' Alice objected. ``No, it can't'', said the +%Queen. ``It's jam every {\it other\/} day: today isn't +%any {\it other\/} day.'' +%| +%\produces +%\raggedright ``You couldn't have it if you {\it did\/} +%want it,'' the Queen said. ``The rule is, jam tomorrow +%and jam yesterday---but never jam {\it today\/}.'' +%``It {\it must\/} come sometimes to `jam today,% +%'\thinspace'' Alice objected. ``No, it can't'', said the +%Queen. ``It's jam every {\it other\/} day: today isn't +%any {\it other\/} day.'' +%\endexample +%\enddesc +% + +当使用等宽字体排版的时候,你需要用|\ttraggedright|命令;而使用其他字体时,需要用|\raggedright|命令。 + +通常你会希望对整篇文档使用这些命令,但是通过\minref{编组}就可以把效果局限在部分文本中。 +\example +\raggedright ``You couldn't have it if you {\it did\/} +want it,'' the Queen said. ``The rule is, jam tomorrow +and jam yesterday---but never jam {\it today\/}.'' +``It {\it must\/} come sometimes to `jam today,% +thinspace'' Alice objected. ``No, it can't'', said the +Queen. ``It's jam every {\it other\/} day: today isn't +any {\it other\/} day.'' +| +\produces +\raggedright ``You couldn't have it if you {\it did\/} +want it,'' the Queen said. ``The rule is, jam tomorrow +and jam yesterday---but never jam {\it today\/}.'' +``It {\it must\/} come sometimes to `jam today,% +'\thinspace'' Alice objected. ``No, it can't'', said the +Queen. ``It's jam every {\it other\/} day: today isn't +any {\it other\/} day.'' +\endexample +\enddesc +%\begindesc +%\cts hang {} +%\explain +%This command indents the second and subsequent lines of a paragraph +%by |\parindent|, the paragraph ^{indentation} +%(\xref{\parindent}). +%Since the first line is already indented by |\parindent| +%(unless you've cancelled the indentation with |\noindent|), the +%entire paragraph appears to be indented by |\parindent|. +% +%\example +%\parindent=24pt \hang ``I said you {\it looked} like an +%egg, Sir,'' Alice gently explained to Humpty Dumpty. ``And +%some eggs are very pretty, you know,'' she added. +%| +%\produces +%\parindent=24pt \hang ``I said you {\it looked} like an +%egg, Sir,'' Alice gently explained to Humpty Dumpty. ``And +%some eggs are very pretty, you know,'' she added. +%\endexample +%\enddesc + +\begindesc +\cts hang {} +\explain +此命令使段落第二行开始各行也缩进 |\parindent| 大小(\xref{\parindent})。 +因为第一行已经缩进了 |\parindent|(除非你使用 |\noindent| 取消了缩进), +所以整个段落呈现悬挂缩进。 + +\example +\parindent=24pt \hang ``I said you {\it looked} like an +egg, Sir,'' Alice gently explained to Humpty Dumpty. ``And +some eggs are very pretty, you know,'' she added. +| +\produces +\parindent=24pt \hang ``I said you {\it looked} like an +egg, Sir,'' Alice gently explained to Humpty Dumpty. ``And +some eggs are very pretty, you know,'' she added. +\endexample +\enddesc +%\begindesc +%\cts hangafter {\param{number}} +%\cts hangindent {\param{dimen}} +% +%\explain +%These two \minref{parameter}s jointly +%specify ``^{hanging indentation}'' for a paragraph. +%The hanging indentation indicates to \TeX\ that certain lines +%of the paragraph should +%be indented and the remaining lines should have their normal width. +%^^{indentation} +%|\hangafter| determines which lines +%are indented, while |\hangindent| determines the amount of indentation +%and whether it occurs on the left or on the right: + + +\begindesc +\cts hangafter {\param{number}} +\cts hangindent {\param{dimen}} + +\explain +这两个\minref{参数}一起决定段落的“^{悬挂缩进}”。悬挂缩进使\TeX{}产生某些行缩进而其他行依然正常的效果。 +^^{缩进} +|\hangafter|决定哪些行将被缩进;|\hangindent|决定缩进的大小以及位置是左边还是右边: +%\ulist +%\li Let $n$ be the value of |\hangafter|. If $n < 0$, +%the first $-n$ lines of the paragraph will be indented. +%If $n\ge0$, all but the first $n$ lines of the paragraph will be +%indented. +% +%\li Let $x$ be the value of |\hangindent|. +%If $x\ge0$, the lines will be indented +%by $x$ on the left. If $x<0$ the lines will be indented by $-x$ on +%the right. +%\endulist + + +\ulist +\li 设|\hangafter|的值为$n$。如果$n < 0$, +开始的$-n$行将被缩进。如果$n\ge0$,除开始的$n$行以外的各行将被缩进。 + +\li 设|\hangindent|的值为$x$。如果$x\ge0$,左边将缩进$x$;如果$x<0$,右边将缩进$-x$。 +\endulist +%When you specify hanging indentation, it applies +%only to the next paragraph (if you're in vertical mode) or to +%the current paragraph (if you're in horizontal mode). +%\TeX\ uses the values of |\hangafter| and |\hangindent| at the end of a +%paragraph, when it breaks that paragraph into lines.\minrefs{line +%break} + +当你设置悬挂缩进的时候,仅对下一段(如果处于竖直模式)或者当前段(如果处于水平模式)有效。 +\TeX{}拆段成行时,使用的是段落末尾的|\hangafter|和|\hangindent|的值。\minrefs{断行} +% Unlike most of the other paragraph-shaping parameters, +%|\hangafter| and |\hangindent| are reset to their default values +%at the start of each paragraph, namely, +%$1$ for |\hangafter| and $0$ for |\hangindent|. +%If you want to typeset a sequence of paragraphs with hanging +%indentation, use |\everypar| (\xref{\everypar}). +%^^|\everypar//for hanging indentation| +%If you specify |\hangafter| and |\hangindent| as well as ^|\parshape|, +%\TeX\ ignores the |\hangafter| and |\hangindent|. +% +%\example +%\hangindent=6pc \hangafter=-2 +%This is an example of a paragraph with hanging indentation. +%In this case, the first two lines are indented on the left, +%but after that we return to unindented text. +%| +%\produces +%\hangindent=6pc \hangafter=-2 +%This is an example of a paragraph with hanging indentation. +%In this case, the first two lines are indented on the left, +%but after that we return to unindented text. +%\nextexample +%\hangindent=-6pc \hangafter=1 +%This is another example of a paragraph with hanging +%indentation. Here, all lines after the first have been +%indented on the right. The first line, on the other +%hand, has been left unindented. +%| +%\produces +%\hangindent=-6pc \hangafter=1 +%This is another example of a paragraph with hanging +%indentation. Here, all lines after the first have been +%indented on the right. The first line, on the other +%hand, has been left unindented. +%\endexample +%\enddesc + + +与其他塑段参数不同的是, +|\hangafter|和|\hangindent|在每一段的开始都被重设为其默认值,即 +|\hangafter|为$1$,|\hangindent|为$0$。 +想要排版许多悬挂缩进的段落,可以使用|\everypar| (\xref{\everypar})。 +^^|\everypar//用于悬挂缩进| +如果你同时设定|\hangafter|,|\hangindent|以及^|\parshape|,\TeX{}将忽略|\hangafter|和|\hangindent|。 + +\example +\hangindent=6pc \hangafter=-2 +This is an example of a paragraph with hanging indentation. +In this case, the first two lines are indented on the left, +but after that we return to unindented text. +| +\produces +\hangindent=6pc \hangafter=-2 +This is an example of a paragraph with hanging indentation. +In this case, the first two lines are indented on the left, +but after that we return to unindented text. +\nextexample +\hangindent=-6pc \hangafter=1 +This is another example of a paragraph with hanging +indentation. Here, all lines after the first have been +indented on the right. The first line, on the other +hand, has been left unindented. +| +\produces +\hangindent=-6pc \hangafter=1 +This is another example of a paragraph with hanging +indentation. Here, all lines after the first have been +indented on the right. The first line, on the other +hand, has been left unindented. +\endexample +\enddesc + +\margin{{\tt\\textindent} has been moved to earlier in this section.} + +%\begindesc +%\cts parshape {$n\; i_1 l_1\; i_2 l_2\; \ldots \;i_n l_n$} +%\explain +%This command specifies the shape of the first $n$ lines of a paragraph--- +%the next paragraph if you're in vertical mode and the current paragraph +%if you're in horizontal mode. +%The $i$'s and $l$'s are all +%dimensions. The first line is indented by $i_1$ and has length $l_1$, +%the second line is indented by $i_2$ and has length $l_2$, and so forth. +%If the paragraph has more than $n$ lines, the last indentation\slash +%length pair is used for the extra lines. +%To achieve special effects such as the one +%shown here, you usually have to experiment a lot, insert kerns here and +%there, and choose your words to fit the shape. +% +%|\parshape|, like ^|\hangafter| and ^|\hangindent|, is effective only for one +%paragraph. +%If you specify |\hangafter| and |\hangindent| as well as |\par!-shape|, +%\TeX\ ignores the ^|\hangafter| and ^|\hangindent|. +%\ifodd\pageno\vfill\eject\fi % so the wineglass is on a single page. +\begindesc +\cts parshape {$n\; i_1 l_1\; i_2 l_2\; \ldots \;i_n l_n$} +\explain +此命令指定一个段落前$n$行的形状。如果处于水平模式,该命令作用于当前段落; +如果处于竖直模式,则作用于下一段落。其中的各个 $i$ 和 $l$ 都是尺寸。 +第$1$行的缩进为$i_1$,长度为 $l_1$;第$2$行的缩进为$i_2$,长度为$l_2$;依此类推。 +若该段落超过$n$行,后面各行都使用 $i_n$ 和 $l_n$。为达到这里展示的特殊效果, +你通常要反复调试,插入多个紧排,并且选择适合该形状的词语。 + +与 ^|\hangafter| 和 ^|\hangindent| 一样,|\parshape| 也仅对此段落有效。 +如果你同时指定 |\hangafter| 和 |\hangindent| 以及 |\par!-shape|, +\TeX\ 将忽略 ^|\hangafter| 和 ^|\hangindent|。 +\ifodd\pageno\vfill\eject\fi % so the wineglass is on a single page. + +\example +% A small font and close interline spacing make this work +\smallskip\font\sixrm=cmr6 \sixrm \baselineskip=7pt +\fontdimen3\font = 1.8pt \fontdimen4\font = 0.9pt +\noindent \hfuzz 0.1pt +\parshape 30 0pt 120pt 1pt 118pt 2pt 116pt 4pt 112pt 6pt +108pt 9pt 102pt 12pt 96pt 15pt 90pt 19pt 84pt 23pt 77pt +27pt 68pt 30.5pt 60pt 35pt 52pt 39pt 45pt 43pt 36pt 48pt +27pt 51.5pt 21pt 53pt 16.75pt 53pt 16.75pt 53pt 16.75pt 53pt +16.75pt 53pt 16.75pt 53pt 16.75pt 53pt 16.75pt 53pt 16.75pt +53pt 14.6pt 48pt 24pt 45pt 30.67pt 36.5pt 51pt 23pt 76.3pt +The wines of France and California may be the best +known, but they are not the only fine wines. Spanish +wines are often underestimated, and quite old ones may +be available at reasonable prices. For Spanish wines +the vintage is not so critical, but the climate of the +Bordeaux region varies greatly from year to year. Some +vintages are not as good as others, +so these years ought to be +s\kern -.1pt p\kern -.1pt e\kern -.1pt c\hfil ially +n\kern .1pt o\kern .1pt t\kern .1pt e\kern .1pt d\hfil: +1962, 1964, 1966. 1958, 1959, 1960, 1961, 1964, +1966 are also good California vintages. +Good luck finding them!! +| +%\margin{Wineglass text replaced because of permissions problem.} +\produces +% A small font and close interline spacing make this work +\smallskip\font\sixrm=cmr6 \sixrm \baselineskip=7pt +\fontdimen3\font = 1.8pt \fontdimen4\font = 0.9pt +\noindent \hfuzz 0.1pt +\parshape 30 0pt 120pt 1pt 118pt 2pt 116pt 4pt 112pt 6pt 108pt 9pt 102pt +12pt 96pt 15pt 90pt 19pt 84pt 23pt 77pt 27pt 68pt 30.5pt 60pt 35pt 52pt +39pt 45pt 43pt 36pt 48pt 27pt 51.5pt 21pt 53pt 16.75pt 53pt 16.75pt +53pt 16.75pt 53pt 16.75pt 53pt 16.75pt 53pt 16.75pt 53pt 16.75pt +53pt 16.75pt 53pt 14.6pt 48pt 24pt 45pt 30.67pt 36.5pt 51pt 23pt 76.3pt +The wines of France and California may be the best +known, but they are not the only fine wines. Spanish +wines are often underestimated, and quite old ones may +be available at reasonable prices. For Spanish wines +the vintage is not so critical, but the climate of the +Bordeaux region varies greatly from year to year. Some +vintages are not as good as others, +so these years ought to be +s\kern -.1pt p\kern -.1pt e\kern -.1pt c\hfil ially +n\kern .1pt o\kern .1pt t\kern .1pt e\kern .1pt d\hfil: +1962, 1964, 1966. 1958, 1959, 1960, 1961, 1964, +1966 are also good California vintages. +Good luck finding them! +\endexample +\eix^^{缩进} +\enddesc + +%\begindesc +%\cts prevgraf {\param{number}} +%\explain +%In horizontal mode, this parameter specifies the +%number of lines in the paragraph so far; in vertical mode, +%it specifies the number of lines in the previous paragraph. +%\TeX\ only sets |\prevgraf| after it has finished breaking some text into +%lines, i.e., at a math display or at the end of a paragraph. +%See \knuth{page~103} for more details about it. +%\enddesc +\begindesc +\cts prevgraf {\param{number}} +\explain +在水平模式中,此参数表示该段落的当前行数;在竖直模式中,它表示上个段落的行数。 +只有在完成一些文本断行后,例如在陈列公式前或者在段落结尾处,\TeX\ 才会设置 +|\prevgraf|。详见 \knuth{第103页}。 +\enddesc + +%\begindesc +%\cts vadjust {\rqbraces{\<vertical mode material>}} +%\explain +%This command inserts the specified \<vertical mode material> just after the +%output line containing the position where the command occurs. +%^^{vertical lists//inserting in paragraphs} +%You can use it, for instance, to cause a page eject or to insert extra +%space after a certain line. +\begindesc +\cts vadjust {\rqbraces{\<vertical mode material>}} +\explain +此命令在当前位置所在行下边插入指定的 \<vertical mode material>。 +^^{竖直列表//插入到段落中} +例如,你可以用它输出页面,或者在特定行添加额外空白。 + +\example +Some of these words are \vadjust{\kern8pt\hrule} to be +found above the line and others are to be found below it. +| +\produces +Some of these words are \vadjust{\kern8pt +\hbox to \hsize{\hfil\vbox{\advance\hsize by -\parindent +\hrule width \hsize}}} +to be found above the line and others are to be found below it. +\endexample +\enddesc + +%\see |\parindent| (\xref\parindent), +%|\parskip| (\xref\parskip), |\everypar| (\xref\everypar). +%\eix^^{line breaks//and paragraph shape} +%\eix^^{paragraphs//shaping} +\see |\parindent| (\xref\parindent), +|\parskip| (\xref\parskip), |\everypar| (\xref\everypar). +\eix^^{断行//断行与段落形状} +\eix^^{段落//形成段落} + +%========================================================================== +%\section {Line breaks} +\section {断行} + +%========================================================================== +%\subsection {Encouraging or discouraging line breaks} +\subsection {鼓励或阻碍断行} + +%\begindesc +%\bix^^{line breaks} +%\bix^^{line breaks//encouraging or discouraging} +%\ctspecial break {} \xrdef{hbreak} +%\explain +%This command forces a line break. +%Unless you do something to fill out the line, you're likely to +%get an ``underfull hbox'' complaint. +%|\break| can also be used in vertical mode. +\begindesc +\bix^^{断行} +\bix^^{断行//鼓励或阻碍断行} +\ctspecial break {} \xrdef{hbreak} +\explain +强制在此处断行。除非用某种方法填满该行, +否则你将得到 ``underfull hbox'' 的警告。 +此命令也能用于竖直模式。 +\example +Fill out this line\hfil\break and start another one.\par +% Use \hfil here to fill out the line. +This line is underfull---we ended it\break prematurely. +% This line causes an `underfull hbox' complaint. +| +\produces +\hbadness = 10000 % avoid hbadness message +Fill out this line\hfil\break and start another one.\par +% Use \hfil here to fill out the line. +This line is underfull---we ended it\break prematurely. +% This line causes an `underfull hbox' complaint. +\endexample\enddesc + +\begindesc +\ctspecial nobreak {} \xrdef{hnobreak} +\explain +%This command prevents a line break where it +%otherwise might occur. +%|\nobreak| can also be used in vertical mode. +阻止在此处断行。此命令也能用于竖直模式。 +\example +Sometimes you'll encounter a situation where +a certain space\nobreak\qquad must not get lost. +| +\produces +Sometimes you'll encounter a situation where +a certain space\nobreak\qquad must not get lost. +\endexample +\enddesc + +\begindesc +\ctspecial allowbreak {} \xrdef{hallowbreak} +\explain +%This command tells \TeX\ to +%allow a line break where one could not ordinarily occur. +%It's most often useful within a math formula, since \TeX\ +%is reluctant to break lines there. ^^{line breaks//in math formulas} +%|\allowbreak| can also be used in vertical mode. +在通常不断行的地方允许 \TeX\ 断行。它经常用于数学公式中, +因为 \TeX\ 通常不愿意在其中断行。^^{断行//在数学公式中} +此命令也能用于竖直模式。 +\example +Under most circumstances we can state with some confidence +that $2+2\allowbreak=4$, but skeptics may disagree. +\par For such moronic automata, it is not difficult to +analyze the input/\allowbreak output behavior in the limit. +| +\produces +Under most circumstances we can state with some confidence +that $2+2\allowbreak=4$, but skeptics may disagree. +\par For such moronic automata, it is not difficult to +analyze the input/\allowbreak output behavior in the limit. +\endexample\enddesc + +\begindesc +\ctspecial penalty {\<number>} \xrdef{hpenalty} +\explain +%This command produces a \minref{penalty} item. +%The penalty item makes \TeX\ more or less willing to break a line +%at the point where that item occurs. +%A negative penalty, i.e., a bonus, encourages a line break; +%a positive penalty discourages a line break. +%A penalty of $10000$ or more prevents a break altogether, +%while a penalty of $-10000$ or less forces a break. +%|\penalty| can also be used in vertical mode. +此命令生成一个惩罚(\minref{penalty})项。 +惩罚项使得 \TeX\ 或多或少愿意在此处断行。 +负惩罚值,实际上是奖励值,鼓励断行;正惩罚值阻碍断行。 +大于或等于 $10000$ 的惩罚值彻底阻止断行, +而小于或等于 $-10000$ 的惩罚值强制断行。 +此命令也能用于竖直模式。 +%\secondprinting{\vfill\eject} +\example +\def\break{\penalty -10000 } % as in plain TeX +\def\nobreak{\penalty 10000 } % as in plain TeX +\def\allowbreak{\penalty 0 } % as in plain TeX +| +\endexample +\enddesc + +\secondprinting{\vglue-\baselineskip\vskip0pt} +\begindesc +\cts obeylines {} +\explain +%\TeX\ normally treats an end of line as a space. +%|\obeylines| instructs \TeX\ to treat each end of line as +%an end of paragraph, thus forcing a line break. +%|\obeylines| is often useful when you're typesetting verse or +%computer programs. +%^^{verse, typesetting}^^{poetry, typesetting}^^{computer programs, typesetting} +%If any of your lines are longer than the effective line length +%(|\hsize|\tminus|\parindent|), +%however, +%you may get an extra line break within those lines. +% +%Because \TeX\ inserts the |\parskip| glue (\xref\parskip) +%between lines controlled by |\obeylines| (since it thinks each line is a +%paragraph), you should normally set |\parskip| to zero when you're using +%|\obeylines|. +% +%You can use the ^|\obeyspaces| command (\xref{\obeyspaces}) to get +%\TeX\ to take spaces within a line literally. |\obeylines| and |\obeyspaces| +%are often used together. +\TeX\ 通常将行结束符视为空格。 +|\obeylines| 让 \TeX\ 将每个行结束符都视为段落结束符,从而强制断行。 +在排版诗歌或者程序代码时 |\obeylines| 大有用处。 +^^{诗歌,排版}^^{程序代码,排版} +然而,如果某些行的长度超过行的实际长度(|\hsize|\tminus|\parindent|), +它们将会被自动断行。 + +\TeX\ 将在设定了 |\obeylines| 的各行间插入 |\parskip|(\xref\parskip )粘连 +(既然它认为每行都是一个段落)。 +因此,在使用 |\obeylines| 时一般应该设定 |\parskip| 为零。 + +用 ^|\obeyspaces| 命令(\xref{\obeyspaces})可以让 \TeX\ 按原样处理行中的空格。 +我们经常一起使用 |\obeylines| 和 |\obeyspaces|。 +\example +\obeylines +``Beware the Jabberwock, my son!! +\quad The jaws that bite, the claws that catch!! +Beware the Jubjub bird, and shun +\quad The frumious Bandersnatch!!'' +| +\produces +\obeylines +``Beware the Jabberwock, my son! +\quad The jaws that bite, the claws that catch! +Beware the Jubjub bird, and shun +\quad The frumious Bandersnatch!'' +\endexample +\enddesc + +\secondprinting{\vglue-\baselineskip\vskip0pt} + +\begindesc +\easy\cts slash {} +\explain +%This command produces a ^{solidus} (/) and also tells \TeX\ that it can +%break the line after the solidus, if necessary. +此命令生成一个^{斜线符号}(/),并且告诉 \TeX\ 必要时可以在该斜线后断行。 +\example +Her oldest cat, while apparently friendly to most people, +had a Jekyll\slash Hyde personality when it came to mice. +| +\produces +Her oldest cat, while apparently friendly to most people, +had a Jekyll\slash Hyde personality when it came to mice. +\endexample +\eix^^{断行//鼓励或阻碍断行} +\enddesc + +%\secondprinting{\vfill\eject} + + +%========================================================================== +%\subsection {Line breaking parameters} +\subsection {断行参数} + +\begindesc +\bix^^{断行//影响断行的参数} +% +\cts pretolerance {\param{number}} +\cts tolerance {\param{number}} +\explain +%These parameters determine the \minref{badness} that \TeX\ will tolerate +%on each line when it is choosing line breaks +%for a paragraph. +%The badness is a measure of how far the interword spacing deviates from +%the ideal. +%|\pretolerance| specifies the tolerable badness for +%line breaks without hyphenation; +%|\tolerance| specifies the tolerable badness for line breaks with +%hyphenation. +%The tolerable badness can be exceeded in either of two ways: +%a line is too tight (the interword spaces are too +%small) or it is too loose (the interword spaces are too big). +在 \TeX\ 选择段落断行点时, +这两个参数确定对各行\minref{劣度}(badness)的容许值(tolerance)。 +劣度衡量了单词间距和理想情形差别多大 +\footnote{译注:在中文排版中,“单词空隙”实际上是字间距。}。 +其中 |\pretolerance| 指定在不加连字符断行时对劣度的容许值, +而 |\tolerance| 指定加上连字符断行时对劣度的容许值。 +当某行排得太紧密(单词间距过小), +或者排得太松散(单词间距过大)时,劣度就会超过容许值。 + +%\ulist +%\li If \TeX\ must set a line too loosely, it +%complains about an ``underfull hbox''. +%\li If \TeX\ must set a line too rightly, +%it lets the line run past the right margin and +%complains about an ``overfull \minref{hbox}''. +%\endulist +\ulist +\li 如果 \TeX\ 将某一行排得太松散, +它将给出 ``underfull hbox'' 的警告。 +\li 如果 \TeX\ 将某一行排得太紧密, +它将让该行超出右边缘, +并给出 ``overfull \minref{hbox}'' 的警告。 +\endulist + +%\noindent \TeX\ chooses line breaks in the following steps: +%\olist +%\li It attempts to choose line breaks without hyphenating. +%If none of the +%resulting lines have a badness exceeding |\pretolerance|, the +%line breaks are acceptable and the paragraph can now be set. +%\li Otherwise, it tries another set of line breaks, this +%time allowing hyphenation. If none of the resulting lines have a badness +%exceeding |\tolerance|, the new set of line breaks is +%acceptable and the paragraph can now be set. +%\li Otherwise, it adds ^|\emergencystretch| (see below) to the stretch +%of each line and tries again. +%\li If none of these attempts have produced an acceptable +%set of line breaks, +%it sets the paragraph with one or more overfull hboxes +%and complains about them. +%\endolist +\noindent \TeX\ 按照如下步骤选择断行点: +\olist +\li 它试图选择无需添加连字符的一系列断点。 +如果结果中每行的劣度都不超过 |\pretolerance|, +这组断点是可接受的,该段落也就完成了断行。 +\li 否则,它在允许添加连字符的情况下再次寻找断点。 +如果结果中每行的劣度都不超过 |\tolerance|, 这组新 +断点是可接受的,该段落也就完成了断行。 +\li 否则,它给每行的伸长量增加 ^|\emergencystretch|(见下面), +然后重新尝试。 +\li 如果上述各种尝试都无法得到可接受的断点系列, +它给该段落设置一个或多个溢出的水平盒子,并给出警告。 +\endolist + +%\PlainTeX\ sets |\tolerance| to $200$ and |\pretolerance| to $100$. +%If you set |\tolerance| to $10000$, \TeX\ +%becomes infinitely tolerant and accepts any spacing, no matter how bad +%(unless it encounters a word that won't fit on a line, even with +%hyphenation). Thus by changing |\tolerance| you can avoid +%overfull and underfull hboxes, but at the cost of making the spacing worse. +%By making |\pretolerance| larger you can get \TeX\ to avoid hyphenation +%(and also run faster), +%again at the cost of possibly worse spacing. +%If you set |\pretolerance| to $-1$, +%\TeX\ will not even try to set the paragraph without hyphenation. +\PlainTeX\ 设置 |\tolerance| 为 $200$,|\pretolerance| 为 $100$。 +若你设置 |\tolerance| 为 $10000$, \TeX\ 将有无穷大的容许值, +可以接受任何空隙,不管它有多糟糕。% +(除非它遇到即使添加连字符也无法放在一行的单词)。 +因此,通过改变 |\tolerance| 值,你可以避免溢出的或者松散的水平盒子, +但会得到更糟糕的空隙。 +通过增大 |\pretolerance| 值你可以让 \TeX\ 不添加连字符(并且运行得更快), +但同样可能得到更糟糕的空隙。 +而如果你设置 |\pretolerance| 为 $-1$, +\TeX\ 将不再尝试不添加连字符的断行方式。 + +%The ^|\hbadness| parameter (\xref \hbadness) determines the level of badness +%that \TeX\ will tolerate before it complains, but |\hbadness| does not affect +%the way that \TeX\ typesets your document. +%The ^|\hfuzz| parameter (\xref \hfuzz) determines the amount that +%an hbox can exceed its specified width before \TeX\ considers it to be +%erroneous. +参数 ^|\hbadness|(\xref \hbadness )确定劣度达到多大时 \TeX\ 才给出警告, +但它不影响 \TeX\ 对文档的排版。 +参数 ^|\hfuzz|(\xref \hfuzz )确定水平盒子宽度超出多大时, +\TeX\ 才认为是错误的。 +\enddesc + +\begindesc +\cts emergencystretch {\param{dimen}} +\explain +%By setting this parameter to be greater than zero, +%you can make it easier for \TeX\ +%to typeset your document without generating overfull hboxes. +%^^{overfull boxes} +%This is a better alternative than setting |\tolerance=10000|, +%since that tends to produce really ugly lines. +%If \TeX\ can't typeset a paragraph without exceeding ^|\tolerance|, +%it will try again, adding |\emergencystretch| to the stretch of each +%line. +%The effect of the change is to scale down the badness of each +%line, enabling \TeX\ to make spaces wider than they would otherwise be +%and thus choose line breaks that are as +%good as possible under the circumstances. +设定此参数大于零,可以让 \TeX\ 更容易排版文档,而不是生成溢出的水平盒子。 +^^{溢出的水平盒子} +这样比设定 |\tolerance=10000| 更好,因为那样往往得到十分难看的行。 +如果 \TeX\ 排版段落时无法不超过 ^|\tolerance| 值, +它将给每行的伸长量增加 |\emergencystretch| 然后重新尝试。 +伸长量的增加将会缩减各行劣度,允许 \TeX\ 生成比原来更宽的间距, +从而选出当前情况下尽可能好的断行点。 +\enddesc + +\begindesc +\cts looseness {\param{number}} +\explain +\minrefs{line break} +%This parameter gives you a way +%to change the total number of lines in a paragraph from what they +%optimally would be. +%|\looseness| is so named because it's a +%measure of how loose the paragraph is, i.e., how much extra space there is in +%it. +此参数用于修改段落的行数,相对其最佳行数。 +之所以称为松散度(|\looseness|), +是因为它衡量该段落有多松散,即包含多少额外的间距。 + +%Normally, |\looseness| is $0$ and +%\TeX\ chooses line breaks in its usual way. But if +%|\looseness| is, say, $3$, \TeX\ does the following: +%\olist +%\li It chooses line breaks normally, resulting in a paragraph of $n$ lines. +%\li It discards these line breaks and +%tries to find a new set of line breaks that gives the paragraph $n+3$ lines. +%(Without the previous step, \TeX\ wouldn't know the value of $n$.) +%\li If the previous attempt results in lines whose badness exceeds +%|\tol!-er!-ance|, +%^^|\tolerance| +%it tries to get $n+2$ lines---and if that also fails, +%$n+1$ lines, and finally $n$ lines again. +%\endolist +%\noindent +%Similarly, if looseness is $-n$, +%\TeX\ attempts to set the paragraph with $n$ +%fewer lines than normal. +%The easiest way for \TeX\ to make a paragraph one line longer is to put +%a single word on the excess line. You can prevent this by +%putting a tie (\xref{@not}) between the last two words of the paragraph. +一般地,若 |\looseness| 等于 $0$,\TeX\ 将按通常方式选择断行点。 +但若 |\looseness| 等于,比如 $3$,\TeX\ 依下面步骤处理: +\olist +\li 按通常方式选择断行点,得到总行数为 $n$ 的段落。 +\li 丢弃这些断行点,并试着寻找总行数为 $n+3$ 的一系列新断点。% +(缺少上一步,\TeX\ 就无法知道 $n$ 的值。) +\li 如果上一步尝试无法得到行劣度不超过 |\tol!-er!-ance| 的结果, +^^|\tolerance| +它将试着将段落分为 $n+2$ 行;如果这也不行,试着分为 $n+1$ 行; +最终只能再次分为 $n$ 行。 +\endolist +\noindent +类似地,若松散度为 $-k$,\TeX\ 试着让段落的行数比正常情形少 $k$ 行。 +让段落多出一行的最简单方法是,将一个单词放到多出的那行。 +在最后两个单词之间加上一个带子(tie,\xref{@not})符号, +你就可以阻止此种断行方法。 + +%Setting |\looseness| is the best way to force a paragraph +%to occupy a given number of lines. +%Setting it to a negative value is useful when you're trying to +%increase the amount of text you can fit on a page. +%Similarly, setting it to a positive +%value is useful when you're trying to +%decrease the amount of text on a page. +设定 |\looseness| 是迫使段落占用给定行数的最好方法。 +想增加页面中的文本时,你可以将它设为负值。 +同样地,想减少页面中的文本时,可以将它设为正值。 + +%\TeX\ sets |\looseness| to $0$ when it ends a paragraph, after breaking +%the paragraph into lines. +%If you want to change the looseness of several paragraphs, you must do it +%individually for each one or put the change into |\everypar| +%\ctsref\everypar. +%^^|\everypar//for setting \b\tt\\looseness\e| +在结束段落并分段为行之后,\TeX\ 将 |\looseness| 重置为 $0$。 +若要改动多个段落的松散度,你必须对每个段落分别设置, +或者将改动放在 |\everypar| +\ctsref\everypar 命令中。 +^^|\everypar//用于设定 \b\tt\\looseness\e| +\enddesc + +\begindesc +\cts linepenalty {\param{number}} +\explain +\minrefs{line break} +%This parameter specifies \minref{demerits} that \TeX\ assesses for each line +%break when it is breaking a paragraph into lines. +%The penalty is independent of where the line break occurs. +%Increasing the value +%of this parameter causes \TeX\ to try harder to set a paragraph with a +%minimum number of lines, even at the cost of other aesthetic considerations +%such as avoiding overly tight interword spacing. +%Demerits are in units of \minref{badness} squared, so +%you need to assign a rather large value to this parameter (in the +%thousands) for it to have any effect. +%\PlainTeX\ sets |\linepenalty| to $10$. +此参数设定 \TeX\ 分段为行时各行的\minref{惩罚}值\thinspace% +\footnote{译注:原文中似乎将 penalty 误认为 demerit 了。}。 +此惩罚值与断行位置无关。 +增大此参数将让 \TeX\ 把段落压缩到最小的行数, +但会损害其它审美上的考虑,比如避免过紧的单词间距。 +\PlainTeX\ 设定 |\linepenalty| 为 $10$。 +\enddesc + +\begindesc +\cts adjdemerits {\param{number}} +\explain +%\minrefs{line break} +%^^{hyphenation//penalties for} +%{\tighten +%This parameter specifies additional \minref{demerits} that \TeX\ attaches to a +%breakpoint between two adjacent lines that are +%``visually incompatible''. +%Such a pair of lines makes a paragraph appear uneven. +%Incompatibility is evaluated in terms of the tightness or looseness +%of lines: +%} +%\olist\compact +%\li A line is tight if its \minref{glue} needs to shrink by at least $50\%$. +%\li A line is decent if its badness is $12$ or less. +%\li A line is loose if its glue needs to stretch by more than $50\%$. +%\li A line is very loose if its glue needs to stretch so much +%that its badness exceeds $100$. +%\endolist +%Two adjacent lines are visually incompatible +%if their categories are not adjacent, e.g., a tight line is next to a loose one +%or a decent line is next to a very loose one. +% +%Demerits are in units of \minref{badness} squared, so +%you need to assign a rather large value to this parameter (in the +%thousands) for it to have any effect. +%\PlainTeX\ sets |\adjdemerits| to~$10000$. +\minrefs{line break} +^^{连字//连字的惩罚} +{\tighten +此参数给行断点设定额外的\minref{缺陷}(demerit),只要该断点在“视觉不相容的”相邻两行间出现。 +这些相邻行使得段落看起来参差不齐。 +不相容性取决于各行的松紧度\thinspace% +\footnote{译注:如果粘连调整比例大于或等于$50\%$,其劣度必定大于或等于$13$。}: +} +\olist\compact +\li 此行是过紧的,如果其\minref{粘连}至少需要收缩$50\%$。 +\li 此行是适中的,如果它的劣度小于或等于$12$。 +\li 此行是松散的,如果其粘连至少需要伸长$50\%$。 +\li 此行是空荡的,如果其粘连需要伸长太多以致它的劣度超过$100$。 +\endolist +如果相邻的两行分类却不相近,比如, +松散的行后面跟着一个过紧的行,或者空荡的行后面是一个适中的行, +则称它们为视觉不相容的。 + +缺陷以\minref{劣度}的平方为单位, +因此只有在给定一个较大的数值时(比如数千)才会产生作用。 +\PlainTeX\ 设定 |\adjdemerits| 为~$10000$。 +\enddesc + +\begindesc +\bix^^{连字//连字的惩罚} +\cts exhyphenpenalty {\param{number}} +\explain +%\minrefs{line break} +%This parameter specifies the \minref{penalty} that \TeX\ attaches to a +%breakpoint at an explicit hyphen such as the one in +%``helter-skelter''. Increasing this parameter has the effect of discouraging +%\TeX\ from ending a line at an explicit hyphen. +%\PlainTeX\ sets |\exhyphenpenalty| to $50$. +\minrefs{line break} +此参数指定 \TeX\ 在显式连字符(比如``helter-skelter''的连字符)处断行时 +所附加的\minref{惩罚}值。 +增大此参数将阻碍 \TeX\ 在显式连字符处换行。 +\PlainTeX\ 设定 |\exhyphenpenalty| 为 $50$。 +\enddesc + +\begindesc +\cts hyphenpenalty {\param{number}} +\explain +%\minrefs{line break} +%This parameter specifies the \minref{penalty} that \TeX\ attaches to a +%breakpoint at an implicit hyphen. +%Implicit hyphens can come from \TeX's hyphenation dictionary or +%from ^{discretionary hyphens} that you've inserted with |\-|~(\xref{\@minus}). +%^^|-//leads to {\tt\\hyphenpenalty}| +%Increasing this parameter has the effect of discouraging +%\TeX\ from hyphenating words. +%\PlainTeX\ sets |\hyphenpenalty| to $50$. +\minrefs{line break} +此参数指定 \TeX\ 在隐式连字符处断行时所附加的\minref{惩罚}值。 +隐式连字符来自 \TeX\ 的连字词典,或者来自你用 |\-|~(\xref{\@minus}) +插入的^{任意连字符}。 +^^|-//导致 {\tt\\hyphenpenalty}| +增大此参数将阻碍 \TeX\ 将单词连字化。 +\PlainTeX\ 设定 |\hyphenpenalty| 为 $50$。 +\enddesc + +\begindesc +\cts doublehyphendemerits {\param{number}} +\explain +%\minrefs{line break} +%{\tighten +%This parameter specifies additional \minref{demerits} that \TeX\ +%attaches to a breakpoint when that breakpoint leads to +%two consecutive lines that end in a hyphen. +%Increasing the value of this parameter has the effect of discouraging +%\TeX\ from hyphenating two lines in a row. +%Demerits are in units of \minref{badness} squared, so +%you need to assign a rather large value to this parameter (in the +%thousands) for it to have any effect. +%\PlainTeX\ sets |\doublehyphendemerits| to $10000$. +%} +\minrefs{line break} +{\tighten +此参数指定 \TeX\ 在导致连续两行都以连字符结尾的断点处所附加的额外\minref{缺陷}值。 +增大此参数将阻碍 \TeX\ 将连续两行连字化。 +缺陷以\minref{劣度}的平方为单位, +因此只有在给定一个较大的数值时(比如数千)才会产生作用。 +\PlainTeX\ 设定 |\doublehyphendemerits| 为 $10000$。 +} +\enddesc + +\begindesc +\cts finalhyphendemerits {\param{number}} +\explain +%\minrefs{line break} +%{\tighten +%This parameter specifies additional \minref{demerits} that \TeX\ +%attaches to a breakpoint that causes +%the next to last line of a paragraph to end with a hyphen. +%Such a hyphen is generally considered to be unaesthetic +%because of the possible blank space from a short last line beneath it. +%Increasing the value of this parameter has the effect of discouraging +%\TeX\ from ending the next to the last line with a hyphen. +%Demerits are in units of \minref{badness} squared, so +%you need to assign a rather large value to this parameter (in the +%thousands) for it to have any effect. +%\PlainTeX\ sets |\finalhyphendemerits| to $5000$. +%} +%\eix^^{hyphenation//penalties for} +\minrefs{line break} +{\tighten +此参数指定 \TeX\ 在段落倒数第二行以连字符结尾时所附加的额外\minref{缺陷}值。 +由于该行下面可能有短行造成的空白,这样的连字符通常认为是缺乏美感的。 +增大此参数将阻碍 \TeX\ 将段落倒数第二行连字化。 +缺陷以\minref{劣度}的平方为单位, +因此只有在给定一个较大的数值时(比如数千)才会产生作用。 +\PlainTeX\ 设定 |\finalhyphendemerits| 为 $5000$。 +} +\eix^^{连字//连字的惩罚} +\enddesc + +\begindesc +\cts binoppenalty {\param{number}} +\explain +%^^{operators} +%This parameter specifies the penalty for breaking a math formula +%after a binary operator when the formula appears in a paragraph. +%\PlainTeX\ sets |\binoppenalty| to $700$. +^^{运算符} +此参数指定 \TeX\ 在段内公式的二元运算符后断行所附加的惩罚值。 +\PlainTeX\ 设定 |\binoppenalty| 为 $700$。 +\enddesc + +\begindesc +\cts relpenalty {\param{number}} +\explain +%^^{relations} +%This parameter specifies the penalty for breaking a math formula +%after a relation when the formula appears in a paragraph. +%\PlainTeX\ sets |\rel!-penal!-ty| to~$500$. +% +%\eix^^{line breaks//parameters affecting} +^^{关系符} +此参数指定 \TeX\ 在段内公式的二元关系符后断行所附加的惩罚值。 +\PlainTeX\ 设定 |\rel!-penal!-ty| 为~$500$。 + +\eix^^{断行//影响断行的参数} +\enddesc + +%========================================================================== +%\subsection {Hyphenation} +\subsection {连字} + +\begindesc +\bix^^{连字} +% +\easy\ctspecial - \ctsxrdef{@minus} +\explain +%The |\-| command inserts a ``discretionary hyphen'' +%^^{discretionary hyphens} +%into a word. +%The discretionary hyphen allows \TeX\ to hyphenate the word at that +%place. \TeX\ isn't obliged to hyphenate there---it does so +%only if it needs to. This command is useful when a word +%that occurs in one or two places in your document +%needs to be hyphenated, +%but \TeX\ can't find an appropriate hyphenation point on its own. +此命令在单词中加入“自定连字符”。 +^^{自定连字符} +自定连字符允许 \TeX\ 在该处连字化。 +但 \TeX\ 未必非得如此连字--它仅在必要时这样做。 +当某个单词在文档中出现一次或多次,而 \TeX\ 又找不到合适连字点时, +这个命令就比较有用了。 +\example +Alice was exceedingly reluctant to shake hands first +with either Twee\-dle\-dum or Twee\-dle\-dee, for +fear of hurting the other one's feelings. +| +\produces +Alice was exceedingly reluctant to shake hands first +with either Twee\-dle\-dum or Twee\-dle\-dee, for +fear of hurting the other one's feelings. +\endexample +\enddesc + +\begindesc +\cts discretionary {\rqbraces{\<pre-break text>} + \rqbraces{\<post-break text>} + \rqbraces{\<no-break text>}} +\explain +%\minrefs{line break} +%^^{hyphenation} +%This command specifies a ``discretionary break'', namely, +%a place where \TeX\ can break a line. +%It also tells \TeX\ what text to put on either side of the break. +%\ulist +%\li If \TeX\ does not break there, it uses the \<no-break text>. +%\li If \TeX\ does break there, it puts the \<pre-break text> just before +%the break and the \<post-break text> just after the break. +%\endulist +%\noindent +%Just as with |\-|, +%\TeX\ isn't obligated to break a line at a discretionary break. +%In fact, |\-| is ordinarily equivalent to |\discretionary!allowbreak{-}{}{}|. +% +%\TeX\ sometimes inserts discretionary breaks on its own. +%For example, it inserts |\discretionary!allowbreak{}{}{}| after +%an explicit hyphen or dash. +\minrefs{line break} +^^{连字} +此命令指定一个“自定断点”,即,\TeX\ 可以断行的位置。 +它还告诉 \TeX\ 在断点前后放置的文字。 +\ulist +\li 如果 \TeX\ 不在该处断行,它使用 \<no-break text>。 +\li 如果 \TeX\ 确实在该处断行,它把 \<pre-break text> 放在断点前, +而把 \<post-break text> 放在断点后。 +\endulist +\noindent +如同 |\-|,在自定断点处 \TeX\ 未必非得断行。 +实际上, |\-| 通常等同于 |\discretionary!allowbreak{-}{}{}|。 + +\TeX\ 有时也会加入自己的自定断点。 +例如,它在显式连字号或者破折号后加入|\discretionary!allowbreak{}{}{}|。 + +{%\hyphenchar\ententt=-1 % needed to avoid weirdnesses +\example +% An ordinary discretionary hyphen (equivalent to \-): +\discretionary{-}{}{} +% A place where TeX can break a line, but should not +% insert a space if the line isn't broken there, e.g., +% after a dash: +\discretionary{}{}{} +% Accounts for German usage: `flicken', but `flik- +% ken': +German ``fli\discretionary{k-}{k}{ck}en'' +| +^^{连字//德语连字} +\endexample} + +\enddesc + +\begindesc +\cts hyphenation {\rqbraces{\<word>\thinspace\vs\ $\ldots$\ \vs + \thinspace\<word>}} +\explain +%\TeX\ keeps a dictionary of exceptions to its ^{hyphenation} rules. +%Each dictionary entry indicates how a particular word should +%be hyphenated. +%The |\hyphenation| command adds words to the dictionary. +%Its argument is a sequence of words separated by blanks. +%Uppercase and lowercase letters are equivalent. +%The hyphens in each word indicate the places +%where \TeX\ can hyphenate that word. +%A word with no hyphens in it will never be hyphenated. +%However, you can still override the hyphenation dictionary by +%using |\-| in a particular occurrence of a word. +%You need to provide all the grammatical forms of a word +%that you want \TeX\ to handle, e.g., both the singular and the plural. +\TeX\ 中有个词典记录了它的^{连字}规则的例外情形。 +词典中每个条目指明了某个单词应该如何连字化。 +这个 |\hyphenation| 命令用于添加单词到该词典。 +它的参数是用空格分开的多个单词,不区分字母大小写。 +单词中的连字符指明 \TeX\ 可以在哪些地方将它连字化。 +一个不含连字符的单词将永远不会被连字化。 +然而,在特定单词中的 |\-| 还是优先于连字词典中对该单词的规定。 +你需要提供单词的各种语法形式给 \TeX\ 处理,比如单数和复数形式。 + +\example +\hyphenation{Gry-phon my-co-phagy} +\hyphenation{man-u-script man-u-scripts piz-za} +| +\endexample +\enddesc + +\begindesc +\cts uchyph {\param{number}} +\explain +%A positive value of |\uchyph| (uppercase hyphenation) +%permits hyphenation of words, such as proper names, +%that start with a capital letter. +%A zero or negative +%value inhibits such hyphenation. \PlainTeX\ sets |\uchyph| to $1$, +%so \TeX\ normally tries to hyphenate words that start with a capital letter. +取 |\uchyph|(大写单词连字化)为正数, +将允许对专有名词等以大写字母开始的单词连字化。 +取为零或者负数将禁止此类连字。 +\PlainTeX\ 设定 |\uchyph| 为 $1$, +因此 \TeX\ 一般会试着将大写字母开始的单词连字化。 +\enddesc + +\begindesc +\cts showhyphens {\rqbraces{\<word>\thinspace\vs\ $\ldots$\ \vs + \thinspace\<word>}} +\explain +%This command isn't normally used in documents, but you can use it at +%your terminal to see how \TeX\ would hyphenate some random set of words. +%The words, with hyphenations indicated, appear both in the log and at +%your terminal. You'll get a complaint about an underfull hbox---just +%ignore it. +此命令在文档中一般不会用到, +使用它你可以在终端输出中看到 \TeX\ 对一些单词是如何连字的。 +用连字符表示的单词将出现在编译记录和终端输出中。 +同时你也会看到关于“松散的盒子”的警告,忽略它即可。 +\example +\showhyphens{threshold quizzical draughts argumentative} +| +\logproduces +Underfull \hbox (badness 10000) detected at line 0 +[] \tenrm thresh-old quizzi-cal draughts ar-gu-men-ta-tive +| +\endexample +\enddesc + +\begindesc +\cts language {\param{number}} +\explain +%Different languages have different sets of hyphenation rules. +%This parameter determines the set of ^{hyphenation rules} that \TeX\ uses. +%By changing |\language| you can get \TeX\ +%to hyphenate portions of text or entire documents according to the +%hyphenation rules appropriate to a particular language. +%^^{European languages} +%Your ^{local information} about \TeX\ will tell you if any +%additional sets of hyphenation rules are available (besides the +%ones for English) +%and what the appropriate values of |\language| are. +%The default value of |\language| is $0$. +% +%\TeX\ sets the current language to $0$ at the start of every paragraph, +%and compares |\language| to the current language whenever it adds +%a character to the current paragraph. +%If they are not the same, \TeX\ adds a ^{whatsit} indicating the +%language change. +%This whatsit is the clue in later processing that the language rules +%should change. +不同的语言有不同的连字规则。此参数确定 \TeX\ 使用哪组^{连字规则}。 +通过改变 |\language|, +你可以让 \TeX\ 对部分或整个文档用特定语言的连字规则连字。 +^^{欧洲语言} +你所用的 \TeX\ 会说明 +是否还有另外的连字规则可用(除了英语), +以及适当的 |\language| 值是哪些。 +默认的 |\language| 值为 $0$。 + +在段落开始处,\TeX\ 设定当前语言值为 $0$。 +在添加字符到当前段落时,\TeX\ 会比较 |\language| 和当前语言值。 +如果两者不同,\TeX\ 添加一个^{小玩意},表明当前语言的变化。 +这个小玩意提示后续处理时所用的语言规则应该改变。 +\enddesc + +\begindesc +\cts setlanguage {\<number>} +\explain +%This command sets the current language to \<number> +%by inserting the same whatsit that you'd get by changing ^|\language|. +%However, it does not change the value of |\language|. +此命令通过添加小玩意设定当前语言值为 \<number>。 +该小玩意和修改 ^|\language| 时的一样。 +然而,此命令不会改动 |\language| 的值。 +\enddesc + +\begindesc +\cts lefthyphenmin {\param{number}} +\cts righthyphenmin {\param{number}} +\explain +%These parameters specify the smallest word fragments that \TeX\ allows +%at the left and at the right end of a hyphenated word. +%\PlainTeX\ defaults them to $2$ and $3$ respectively; +%these are the recommended values for English. +这两个参数指定,对于连字单词,\TeX\ 在连字符左右至少得有几个字母。 +\PlainTeX\ 中两者的默认值分别为 $2$ 和 $3$; +这是英语的建议值。 +\enddesc + +%\begindesc +%\bix^^{fonts//hyphenation characters for} +%\cts hyphenchar {\<font>\param{number}} +%\explain +\begindesc +\bix^^{字体//字体的连字符} +\cts hyphenchar {\<font>\param{number}} +\explain +%\TeX\ doesn't necessarily use the `-' character at hyphenation points. +%Instead, it uses the |\hyphenchar| of the current font, which is usually +%`-' but need not be. If a font has a negative |\hyphenchar| value, +%\TeX\ won't hyphenate words in that font. +% +%Note that \<font> is a control sequence +%that names a font, not a \<font\-name> that names font files. +%Beware: +%an assignment to |\hyphenchar| is \emph{not} undone at the end +%of a group. +%If you want to change |\hyphenchar| locally, you'll need to +%save and restore its original value explicitly. +\TeX\ 未必总是以 `-' 字符为连字符。 +实际上,它使用的是当前字体的 |\hyphenchar|, +此字符通常是 `-' 但未必总是。 +若某字体的 |\hyphenchar| 值为负数, +\TeX\ 将不会对该字体下的单词连字化。 + +注意 \<font> 指的是该字体的控制序列名称, +而不是字体文件名 \<font\-name>。 +谨记:在编组结束时所分配的 |\hyphenchar| \emph{不会}撤销。 +若要局部改变 |\hyphenchar|,你必须显式地保存和恢复原有取值。 +\example +\hyphenchar\tenrm = `- + % Set hyphenation for tenrm font to `-'. +\hyphenchar\tentt = -1 + % Don't hyphenate words in font tentt. +| +\endexample +\enddesc + +\begindesc +\cts defaulthyphenchar {\param{number}} +\explain +%When \TeX\ reads the metrics file +%^^{metrics file//default hyphen in} +%for a font in response to a +%^|\font| command, it sets the font's ^|\hyphenchar| to +%|\default!-hyphen!-char|. +%If the value of |\default!-hyphen!-char| is +%not in the range $0$--$255$ when you load a font, +%\TeX\ won't hyphenate any words in that font unless you +%override the decision by setting the font's |\hyphenchar| later on. +%\PlainTeX\ sets |\default!-hyphen!-char| to $45$, the \ascii\ code +%for `|-|'. +当 \TeX\ 碰到 ^|\font| 命令时,它读取该字体的度量文件, +并设置该字体的 ^|\hyphenchar| 为 |\default!-hyphen!-char|。 +^^{度量文件//其中的默认连字符} +如果载入字体时 |\default!-hyphen!-char| 的值不在 $0$--$255$ +范围中,\TeX\ 将不会对该字体下的任何单词连字化; +除非你以后用 |\hyphenchar| 命令设定此字体的连字符。 +\PlainTeX\ 设定 |\default!-hyphen!-char| 为 $45$, +即 `|-|' 字符的 \ascii\ 码。 +\example +\defaulthyphenchar = `- + % Assume `-' is the hyphen, unless overridden. +\defaulthyphenchar = -1 + % Don't hyphenate, unless overridden. +| +\endexample + +%\eix^^{fonts//hyphenation characters for} +%\enddesc +\eix^^{字体//字体的连字符} +\enddesc + +%\see |\pretolerance| (\xref \pretolerance). +%\eix^^{hyphenation} +%\eix^^{line breaks} +\see |\pretolerance|(\xref\pretolerance )。 +\eix^^{连字} +\eix^^{断行} + +%========================================================================== +%\section {Section headings, lists, and theorems} +\section {分节、列表和定理} + +%\begindesc +%^^{section headings} +%\easy\ctspecial beginsection {\<argument>\thinspace{\bt\\par}} +% \ctsxrdef{@beginsection} +%\explain +%You can use this command to begin a major subdivision of your document. +%\<argument> is intended to serve as a section title. +%|\beginsection| surrounds \<argument> +%by extra vertical space and sets it in +%boldface, left-justified. +%You can produce the |\par| that ends \<argument> with a blank line. +%\let\message = \gobble % Don't bother to tell us about Pig and Pepper. +\begindesc +^^{节标题} +\easy\ctspecial beginsection {\<argument>\thinspace{\bt\\par}} + \ctsxrdef{@beginsection} +\explain +此命令开始文档的一节。 +\<argument> 用于表示节标题。 +标题将用粗体显示,靠左对齐,而且上下有额外的竖直间距。 +你也可以在 \<argument> 后用一个空行得到 |\par|。 +\let\message = \gobble % Don't bother to tell us about Pig and Pepper. +\example +$\ldots$ till she had brought herself down to nine +inches high. + +\beginsection Section 6. Pig and Pepper + +For a minute or two she stood looking at the house $\ldots$ +| +\produces +$\ldots$ till she had brought herself down to nine +inches high. + +\beginsection Section 6. Pig and Pepper + +For a minute or two she stood looking at the house $\ldots$ +\endexample +\enddesc + +\begindesc +\cts item {\<argument>} +\cts itemitem {\<argument>} +\explain +%^^{itemized lists} +%These commands are useful for creating ^{itemized lists}. The entire paragraph +%following \<argument> is indented by |\parindent| +%^^|\parindent//indentation for itemized lists| +%(for |\item|) or by |2\parindent| (for |\itemitem|). +%(See \xrefpg{\parindent} for an explanation of |\parindent|.) +%Then \<argument>, +%followed by an en space, is placed just to +%the left of the text of the +%first line of the paragraph so that it falls within the paragraph indentation +%as specified by |\parindent|. +% +%If you want to include more than one +%paragraph in an item, put |\item{}| in front of the additional paragraphs. +^^{逐项列表} +这两个命令用于创建^{逐项列表}。 +在 \<argument> 后面的整个段落会有 |\parindent|(对于|\item|)或者 +|2\parindent|(对于 |\itemitem|)的缩进。% +(|\parindent| 的解释见\xrefpg{\parindent}。) +^^|\parindent//逐项列表的缩进| +\<argument> 加上 1en 的间距后被放置在段落首行文字的左边。 +也就是说,它总是落在由 |\parindent| 确定的段落缩进空白中。 + +要让一个列表项包含多个段落,可以将 |\item{}| 放在另外的段落前。 +\example +{\parindent = 18pt +\noindent Here is what we require: +\item{1.}Three eggs in their shells, +but with the yolks removed. +\item{2.}Two separate glass cups containing: +\itemitem{(a)}One-half cup {\it used} motor oil. +\itemitem{(b)}One cup port wine, preferably French. +\item{3.}Juice and skin of one turnip.} +| +\produces +{\parindent = 18pt +\noindent Here is what we require: +\item{1.}Three eggs in their shells, +but with the yolks removed. +\item{2.}Two separate glass cups containing: +\itemitem{(a)}One-half cup {\it used} motor oil. +\itemitem{(b)}One cup port wine, preferably French. +\item{3.}Juice and skin of one turnip.} +\endexample +\enddesc + +\begindesc +\easy\ctspecial proclaim {\<argument>{\tt.}\vs\thinspace + \<general text>\thinspace{\bt\\par}} + \ctsxrdef{@proclaim} +\explain +%^^{theorems} +%^^{lemmas} +%^^{hypotheses} +%This command ``proclaims'' a theorem, lemma, hypothesis, etc. +%It sets \<argument> in boldface type and the following paragraph in +%italics. \<arg\-u\-ment> must be followed by a period and a space token, +%which serve +%to set off \<argument> from \<general text>. +%\<general text> consists of the text up to the next paragraph +%boundary, except that you can include multiple paragraphs by putting them +%within braces and ending a paragraph after the closing right brace. +^^{定理} +^^{引理} +^^{假设} +此命令“陈述”一个定理、引理、假设等。 +它用粗体显示 \<argument>,并用斜体显示后面的段落。 +\<arg\-u\-ment> 后面必须跟着句号和空格, +以此区分开 \<argument> 和 \<general text>。 +\<general text> 到下一个段落之前截止; +若要包含多个段落,你可以将它们放在花括号中, +并且在右花括号后结束段落\thinspace% +\footnote{译注:原文关于包含多个段落这句似有错误。 +但改用 |\endgraf| 结束段落就可以包含多个段落。}。 +\example +\proclaim Theorem 1. +What I say is not to be believed. + +\proclaim Corollary 1. Theorem 1 is false.\par +| +\produces +\proclaim Theorem 1. +What I say is not to be believed. + +\proclaim Corollary 1. Theorem 1 is false.\par +\endexample +\enddesc + +\enddescriptions + +\ifoldeplain\else\ifcompletebook\else +\vskip4em{\sectionfonts\leftline{本章索引}} +\readindexfile{i} +\fi\fi + +\endchapter +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/preface.tex b/Master/texmf-dist/doc/plain/impatient-cn/preface.tex new file mode 100644 index 00000000000..fd2bd2a14bd --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/preface.tex @@ -0,0 +1,246 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\frontchapter{Preface} +\frontchapter{前言} + +%{\tighten +%Donald Knuth's \TeX, a computerized typesetting system, +%provides nearly everything +%needed for high-quality typesetting of mathematical +%notations as well as of ordinary text. +%It is particularly notable for its flexibility, its superb hyphenation, and its +%ability to choose aesthetically satisfying line breaks. +%Because +%of its extraordinary capabilities, \TeX\ has become the leading typesetting +%system for mathematics, science, and engineering and has been adopted as +%a standard by the American Mathematical Society. A companion program, +%^{\Metafont}, +%can construct arbitrary letterforms including, in particular, any symbols that +%might be needed in mathematics. +%Both \TeX\ and \Metafont\ are widely available within the +%scientific and engineering community and have been implemented on a +%variety of computers. +%\TeX\ isn't perfect---it lacks integrated support for graphics, and +%some effects such as ^{revision bars} are very difficult to produce---% +%but these drawbacks are far outweighed by its advantages. +%\par} +Donald Knuth 开发的计算机排版系统 \TeX , +提供了几乎所有排版高质量数学符号和普通文本的功能。 +它因为它独有的易用性,超群的分词处理和美观的断行而闻名天下。 +因为这些非凡的功能,\TeX\ 已经成为数学、自然科学和工程领域领先的排版系统, +并且被美国数学学会定为标准。 +同时,它的成对软件,^{\Metafont},可以用来设计任意的字体,尤其是数学排版所需要的符号。 +\TeX\ 和 \Metafont\ 在科学和工程领域有很广泛的应用, +也被移植到各种不同的计算机架构上。 +\TeX\ 当然不是全能的,它缺少对于图形的完整支持, +同时一些功能,比如修订线,在 \TeX\ 中实现起来也比较麻烦。 +但是,这些缺点和它的优点比较起来,是微不足道的。 + +%\thisbook\/ is intended to serve scientists, mathematicians, and +%technical typists for whom \TeX\ is a useful tool rather than a primary +%interest, as well as computer people who have a strong interest in \TeX\ +%for its own sake. We also intend it to serve both newcomers to \TeX\ +%and those who are already familiar with \TeX. We assume that our +%readers are comfortable working with computers and that they want to get +%the information they need as quickly as possible. Our aim is to provide +%that information clearly, concisely, and accessibly. +\thisbook 是为科学工作者、数学工作者和专业排印者而写的。 +对于这些人而言,\TeX\ 不是一个兴趣爱好,而是一个非常有用的工具。 +本书同时也面向那些对 \TeX\ 有很强烈兴趣的计算机行业工作者。 +我们希望不管是新手们还是熟悉 \TeX\ 的人,都能从本书获益。 +我们假定我们的读者群体己经熟悉了基本的计算机操作, +并且他们希望用最快的速度得到他们想要的信息。 +因此,我们的目标是提供简明的信息,并且让读者能够方便地获取它们。 + +%{\tighten This book therefore provides a bright searchlight, a stout +%walking-stick, and detailed maps for exploring and using \TeX. It will +%enable you to master \TeX\ at a rapid pace through inquiry and +%experiment, but it will not lead you by the hand through the entire +%\TeX\ system. Our approach is to provide you with a handbook for \TeX\ +%that makes it easy for you to retrieve whatever information you need. +%We explain both the full repertoire of \TeX\ commands and the concepts +%that underlie them. You won't have to waste your time plowing through +%material that you neither need nor want. \par} +因此,本书给读者提供了探索和使用 \TeX\ 所需要的明亮的探照灯,结识的手杖,以及详细的地图。 +他能让你通过查询和饰演,来快速掌握 \TeX ,但它不会牵着你的首带领你走过整个 \TeX\ 系统的荆棘地。 +我们的方法就是,提供给你一本 \TeX\ 的手册,来让你更方便地得到你所需要的任何信息。 +我们会同时详细介绍 \TeX\ 的命令,以及命令背后的原理。 +因此你不会费时费力地阅读你不需要看的信息。 + +%In the early sections we also provide you with enough orientation so +%that you can get started if you haven't used \TeX\ before. We assume +%that you have access to a \TeX\ implementation and that you know how to +%use a text editor, but we don't assume much else about your background. +%Because this book is organized for ready reference, you'll continue to +%find it useful as you become more familiar with \TeX. If you prefer to +%start with a carefully guided tour, we recommend that you first read +%Knuth's ^{\texbook} (see \xrefpg{resources} for a citation), passing +%over the ``dangerous bend'' sections, and then return to this book for +%additional information and for reference as you start to use \TeX. (The +%dangerous bend sections of \texbook\ cover advanced topics.) +如果你从未用过 \TeX ,在开头的章节中,我们给予充分的指导,来让你尽快上手。 +我们假定你手头上有一个能用的 \TeX\ 系统,并且知道如何用一个文本编辑器,对你其它的背景知识不做要求。 +由于本书是按照参考手册编排的,因此即使你熟悉了 \TeX\ 以后,依然会发现本书很有用。 +如果你希望看一个手把手的教程,我们建议你先阅读 ^{\texbook}(见\xrefpg{resources}部分的引用), +跳过所有的有“危险符号”的部分,然后再在开始使用 \TeX\ 的时候参考本书来获得更多的信息。% +(\texbook\ 中标明危险符号的部分讲述了更高阶的内容。) + +%The structure of \TeX\ is really quite simple: a \TeX\ input document +%consists of ordinary text interspersed with commands that give \TeX\ +%further instructions on how to typeset your document. Things like math +%formulas contain many such commands, while expository text contains +%relatively few of them. +\TeX\ 的结构是非常简单的:一个 \TeX\ 输入文档,是一些包括指令的普通文本, +这些命令来指导 \TeX\ 如何来排印你的文档。 +许多地方,比如数学公式,会包括大量的这些指令,而一般的解释性文本很少包括这些指令。 + +%The time-consuming part of learning \TeX\ is learning the commands and +%the concepts underlying their descriptions. Thus we've devoted most of +%the book to defining and explaining the commands and the concepts. +%We've also provided examples showing \TeX\ typeset output and the +%corresponding input, hints on solving common problems, information about +%error messages, and so forth. We've supplied extensive cross-references +%by page number and a complete index. +学习 \TeX\ 最花时间的地方就是学习命令和命令背后的原理。 +因此我们把本书大部分的篇幅郎在介绍命令的定义,和解释命令的原理上。 +我们也提供了一些例子,来展示 \TeX\ 排版的输出,以及其相关的输入,解决常见问题的小提示,以及错误信息的有关信息等等。 +我们提供了非常详尽的页码交叉引用和完整的索引列表。 + +%We've arranged the descriptions of the commands so that you can look +%them up either by function or alphabetically. The functional +%arrangement is what you need when you know what you want to do but you +%don't know what command might do it for you. The alphabetical arrangement +%is what you need when you know the name of a command but you don't know exactly +%what it does. +我们把命令和其解释进行了详细分类排列,因此你能够通过其功能或者字母顺序快速查找到它们。 +功能排列顺序,能够让你快速找到你能用什么命令来达到你的目的。 +而字母排列顺序,能够让你快速找到一个不理解的命令的实际功能。 + +%We must caution you that we haven't tried to provide a complete +%definition of \TeX. For that you'll need ^{\texbook}, which is the +%original source of information on \TeX. \texbook\ also contains a lot +%of information about the fine points of using \TeX, particularly on the +%subject of composing math formulas. We recommend it highly. +我们必须提醒读者,我们并没有尝试提供完整的 \TeX\ 行为的定义。 +如果你需要了解这些信息, 你应该看 \TeX\ 的经典著作—— ^{\texbook}。 +\texbook\ 同时还提供了很多如何更好使用 \TeX\ 做出漂亮文档的提示, +特别是讲精调数学共识的那部分。我们强烈读者阅读它。 + +%In 1989 Knuth made a major revision to \TeX\ in order to adapt it to +%$8$-bit character sets, needed to support typesetting for languages +%other than English. The description of \TeX\ in this book incorporates +%that revision (see \xref{newtex}). +在 1989 年,Knuth 对 \TeX\ 系统进行了一次大的修订,以使得它能够支持 $8$ 位的字符, +因此使得排版除了英语以外的其他一些语言成为了可能。 +本书对于 \TeX\ 的介绍,包括了这次修订的内容(见\xref{newtex})。 + +%{\tighten You may be using a specialized form of \TeX\ such as ^{\LaTeX} +%or ^{\AMSTeX} (see \xref{resources}). Although these specialized forms +%are self-contained, you may still want to use some of the facilities of +%\TeX\ itself now and then in order to gain the finer control that only +%\TeX\ can provide. This book can help you to learn what you need to +%know about those facilities without having to learn about a lot of other +%things that you aren't interested~in. \par} +你可能正在使用一个专门的 \TeX\ 封装形式, +比如 ^{\LaTeX} 或者 ^{\AMSTeX} (见 \xref{resources})。 +虽然这些封装形式是完整的, 你仍可能为更好地控制 \TeX\ 而去使用 \TeX\ 本身独有的一些功能, +你可以使用这本书来学习你想要知道的这些功能, +而把其它你不感兴趣的东西扔在一边。 + +%Two of us (K.A.H. and K.B.) were generously supported by the +%University of Massachusetts at Boston during the preparation of this +%book. In particular, Rick Martin kept the machines running, and +%Robert~A. Morris and Betty O'Neil made the machines available. Paul +%English of Interleaf helped us produce proofs for a cover design. +在准备本书写作时, +我们作者中的两位 (K.A.H. 和 K.B.) 获得波士顿麻省大学的鼎力帮助, +尤其是 Rick Martin 在此期间,保证计算机的正常运行, +以及 Robert~A. Morris 和 Betty O'Neil 能让我们使用这些计算机设备。 +Paul English of Interleaf 帮助我们做出了封面设计的校样。 + +%We wish to thank the reviewers of our book: Richard Furuta of the +%University of Maryland, John Gourlay of Arbortext, Inc., Jill Carter +%Knuth, and Richard Rubinstein of the Digital Equipment Corporation. We +%took to heart their perceptive and unsparing criticisms of the original +%manuscript, and the book has benefitted greatly from their insights. +我们需要感谢本书的这些审稿人:马里兰大学的 Richard Furuta, +Arbortext 公司的 John Gourlay, +电子设备公司的 Jill Carter Knuth 和 Richard Rubinstein。 +我们把他们对我们原稿的观点和批评铭记在心,本书从他们的洞见中获益良多。 + +%We are particularly grateful to our editor, Peter Gordon of +%Addison-Wesley. This book was really his idea, and throughout its +%development he has been a source of encouragement and valuable +%advice. We thank his assistant at Addison-Wesley, Helen Goldstein, for +%her help in so many ways, and Loren Stevens of Addison-Wesley for her +%skill and energy in shepherding this book through the production +%process. Were it not for our copyeditor, Janice Byer, a number of small +%but irritating errors would have remained in this book. We appreciate +%her sensitivity and taste in correcting what needed to be corrected +%while leaving what did not need to be corrected alone. Finally, we wish +%to thank Jim Byrnes of Prometheus Inc. for making this collaboration +%possible by introducing us to each other. +%\vskip1.5\baselineskip +我们感谢我们的编辑,Addison-Wesley 出版公司的 Peter Gordon。 +出版本书其实是他的注意,在本书的写作过程中,他也鼓励我们并且提供有价值的建议。 +我们感谢他在 Addison-Wesley 的助理, Helen Goldstein, 因为她在很多方面帮助我们。 +我们感谢 Addison-Wesley 的 Loren Stevens 在指导本书出版过程中的发挥的激情和技艺。 +如果没有我们的技术编辑 Janice Byer, 很多小却恼人的错误可能还留在这本书中。 +我们感谢她在区分需要和不需要改动的地方的敏感和品位。 +最后,我们需要感谢 Prometheus 有限公司的 Jim Byrnes,他介绍我们互相认识,使我们能够有机会进行合作。 +\vskip1.5\baselineskip + +%\line{\it Deerfield, Massachusetts\hfil\rm P.\thinspace W.\thinspace A.} +%\line{\it Manomet, Massachusetts\hfil\rm K.\thinspace A.\thinspace H., +% K.\thinspace B.} +% +%\vskip2\baselineskip + +\line{\it Deerfield, Massachusetts\hfil\rm P.\thinspace W.\thinspace A.} +\line{\it Manomet, Massachusetts\hfil\rm K.\thinspace A.\thinspace H., + K.\thinspace B.} + +\vskip2\baselineskip + +%\noindent {\bf Preface to the free edition:} This book was originally +%published in 1990 by Addison-Wesley. In 2003, it was declared out of +%print and Addison-Wesley generously reverted all rights to us, the +%authors. We decided to make the book available in source form, under +%the GNU Free Documentation License, as our way of supporting the +%community which supported the book in the first place. See the +%copyright page for more information on the licensing. +\noindent {\bf 自由版本前言:} 这本书本来是 Addison-Wesley 在 1990 年出版的。 +在 2003 年售空,Addison-Wesley 慷慨地把所有的权力归还给我们作者。 +没有社区,也不会有本书的存在,所以作为我们对社区的贡献, +我们打算在 GNU 的自由文档许可协议下把这本书开源, +更多的关于许可协议的信息,见本书的版权页。 + +%The illustrations which were part of the original book are not included +%here. Some of the fonts have also been changed; now, only +%freely-available fonts are used. We left the cropmarks and galley +%information on the pages, to serve as identification. An old version of +%Eplain was used to produce it; see the {\tt eplain.tex} file for +%details. +原本本书包括了一些插图,不过在自由版本中,我们没有把插图包括近来。 +此外我们还改变了一些字体,只使用可自由获取的字体。 +我们把剪裁线和长条校样保留在页面上以方便识别。 +本书使用老版本的 Eplain 宏包编写,更多信息见 {\tt eplain.tex} 文件。 + +%We don't plan to make any further changes or additions to the book +%ourselves, except for correction of any outright errors reported to us, +%and perhaps inclusion of the illustrations. +除了修正报告给我们的错误,以及可能加入原书的插图以外, +我们不打算修改或者增加本书的内容。 + +%Our distribution of the book is at {\tt +%ftp://tug.org/tex/impatient}. You can reach us by email at {\tt +%impatient@tug.org}. +我们把本书发布在 {\tt ftp://tug.org/tex/impatient} 上。 +你可以通过电子邮件 {\tt impatient@tug.org} 来和我们取得联系。 + +\pagebreak +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/read1st.tex b/Master/texmf-dist/doc/plain/impatient-cn/read1st.tex new file mode 100644 index 00000000000..03a4526c8b2 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/read1st.tex @@ -0,0 +1,69 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\frontchapter{Read this first} +\frontchapter{阅读指南} + +% We don't need anything but \rm here. +{\font\rm = cmr10 scaled \magstephalf \baselineskip = 1.1\baselineskip +%If you're new to \TeX: +%\ulist +%\li Read Sections \chapternum{usebook}--\chapternum{usingtex} first. +%\li Look at the examples in \chapterref{examples} +%for things that resemble what you want to do. +%Look up any related commands in ``Capsule summary of commands'', +%\chapterref{capsule}. +%Use the page references there to find the more complete descriptions of +%those commands and others that are similar. +%\li Look up unfamiliar words in ``Concepts'', \chapterref{concepts}, +%using the list on the back cover of the book to find the +%explanation quickly. +%\li Experiment and explore. +%\endulist +%\bigskip +如果你刚学习 \TeX : +\ulist +\li 首先阅读第\chapternum{usebook}--\chapternum{usingtex}章。 +\li 查看\chapterref{examples}中与你要做的事情相似的例子。 +查找\chapterref{capsule},“命令速查表”中相关的命令。 +利用页码索引找到这些命令及类似命令的更完整的描述。 +\li 查找\chapterref{concepts},“概念”中不熟悉的词语, +使用书背内页的概念列表快速找到这些词语的解释。 +\li 反复尝试和探索。 +\endulist +\bigskip +%\noindent +%If you're already familiar with \TeX, or if you're editing or +%otherwise modifying a \TeX\ document that someone else has created: +%\ulist +%\li For a quick reminder of what a command does, look in +%\chapterref{capsule}, ``Capsule summary of commands''. It's +%alphabetized and has page references for more complete descriptions of +%the commands. +%\li Use the functional groupings of command descriptions +%to find those related to a +%particular command that you already know, or to find a command that serves a +%particular purpose. +%\li Use \chapterref{concepts}, ``Concepts'', to get an explanation of +%any concept that you don't understand, or need to understand more +%precisely, or have forgotten. +%Use the list on the inside back cover of the book to find a concept quickly. +%\endulist +\noindent +如果你已经熟悉 \TeX ,或者你正在编辑或修改其他人创建的 \TeX\ 文档: +\ulist +\li 要得到某个命令用法的快速提示,看一下\chapterref{capsule},“命令速查表”。 +该表按照字母顺序排列,并给出了到命令的更完整介绍的页码索引。 +\li 利用命令描述中的功能组,找到与你知道的某个命令相关的其他命令, +或者找到某个有特殊用处的命令。 +\li 利用\chapterref{concepts},“概念”, +找到任何你不理解的,或想理解得更准确的,或已经遗忘的,概念的解释。 +用书背内页上的概念列表可以快速找到一个概念。 +\endulist +} +\pagebreak + +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/tips.tex b/Master/texmf-dist/doc/plain/impatient-cn/tips.tex new file mode 100644 index 00000000000..0b9dd4e74db --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/tips.tex @@ -0,0 +1,1685 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +% 中文翻译 by Zhaopeng Xing (zpxing@gmail.com) + +\input macros +%\chapter{Tips and techniques} + +\chapter{建议和技巧} + +\chapterdef{tips} + +% \TeX\ is a complex program that occasionally works its will in +% mysterious ways. In this section we offer some tips on solving +% problems that you might encounter and explain some handy techniques. + +\TeX{} 是一个复杂的程序,偶尔地会以你看不懂的方式变得不听话。这一章, +我们提供一些解决问题的小贴士并阐释一些有用的技巧。 + +%\section Correcting bad page breaks + +\section 纠正不良分页 + +% \bix^^{page breaks//bad} +% Sometimes \TeX\ breaks a page right in the middle of material that you +% want to keep together---for example, +% a section heading and the text that follows it, +% or a short list of related items. There are two ways to correct the +% situation: +% \ulist\compact +% \li You can force the material to be kept together. +% \li You can force a page break at a different place. +% \endulist + +\bix^^{分页//不良分页} +有时,\TeX{} 在你想要放在一起的素材中间分页——例如,章节标题和随后的文 +本,或者一个互有联系的项目列表。有两种校正方法: +\ulist\compact +\li 强制素材被放在一起。 +\li 在别的地方要求分页。 +\endulist + +% The simplest way to force \TeX\ to keep material together on a page is +% to enclose the material in a vbox using the |\vbox| command \ctsref{\vbox}. +% ^^|\vbox//fixing page breaks with| +% A vbox is ordinarily better than an hbox for this purpose because most +% often the material to be kept together, +% e.g., a sequence of paragraphs, will be vertical mode material. +% You should +% precede and follow the vbox by an implicit or explicit paragraph command +% (either a blank line or |\par|); otherwise +% \TeX\ may try to make the vbox part of an an adjacent paragraph. +% The vbox method has an important limitation: +% you can't apply it to portions of text smaller than a paragraph. + +要强制 \TeX{} 把素材放在同一页上,最简单的办法是 +使用 |\vbox| 命令\ctsref{\vbox}来使素材被封装在一个竖直盒子里。 +^^|\vbox//用它修正分页| +这里使用竖直盒子比水平盒子要好,因为大多数情况下, +需要放在一起的是竖直模式素材,比如连续的段落。 +竖直盒子的前后,你都要放一个隐含或明显的分段命令(或者空行,或者 |\par|); +否则的话,\TeX{} 会试图使竖直盒子成为相邻段落的一部分。 +竖直盒子的方法有一个重要的局限:不能用于不足一个段落的小部分文本。 + + +% You can sometimes keep the lines of a single paragraph together by enclosing +% the paragraph in a group and assigning |\interlinepenalty| +% \ctsref{\interlinepenalty} +% a value of $10000$ at the start of the group (or elsewhere before the +% end of the paragraph). +% This method causes \TeX\ to consider page breaks within that paragraph to be +% infinitely undesirable. +% However, if all the page breaks that \TeX\ can find are infinitely undesirable, +% it may break the page within the paragraph anyway. + +有时候,要把一个自然段的各行放置在一起,你可以把它封装在一个编组中,并 +在编组开始的地方(或者段落结束前的其它位置)令 |\interlinepenalty|% +\ctsref{\interlinepenalty}的值为 $10000$。这样就告诉了 \TeX{},“绝对不 +能”在段内分页。但是,如果 \TeX{} 发现所有要分页的地方都是“绝对不能”的, +它可能不管三七二十一,就在自然段里分页。 + +% A ^|\nobreak| command (\xref{vnobreak}) +% after the end of a paragraph prevents \TeX\ +% from breaking the page at the following item +% (unless that item happens to be a penalty of less than $10000$). +% This is also the best way to prevent a page break after a heading, +% since a heading usually behaves like a paragraph. +% The |\nobreak| must follow the blank line or |\par| that ends +% the paragraph so that \TeX\ won't treat the |\nobreak| as part of the +% paragraph. +% For the |\nobreak| to be effective, it must also come before +% any legal breakpoint at the end of the paragraph. +% The glue that \TeX\ inserts +% before the next paragraph is such a breakpoint, +% and so is any vertical glue that you insert explicitly after a paragraph. +% Thus the |\nobreak| should usually be +% the very first thing after the end of the paragraph or heading. + +在段落之后使用 ^|\nobreak| 命令 (\xref{vnobreak}) 会阻止 \TeX{} 在下一 +项内容之前分页(除非下一项恰好是一个小于 $10000$ 的 惩罚项)。这也是防 +止在章节标题之后分页的最佳方案,因为章节标题通常类似于一个自然段落。 +|\nobreak| 需要放在段落结束的空行或者 |\par| 之后,从而避免 \TeX{} 将 +|\nobreak| 作为段落的一部分处理。 |\nobreak| 还需要出现在段落末尾所有 +适合分页的断点之前才有效。\TeX{} 插入在下一个段落之前的粘连就是这样的 +一个断点,其他的还有你明确插入在段落后面的任何竖直粘连。 因 +此,|\nobreak| 通常出现在段落或者标题结束之后的第一个位置。 + +% You can use the ^|\eject| command \ctsref{\eject} +% to force \TeX\ to break a page at a +% particular place. Within a paragraph, you can use the combination +% `|\vadjust{\vfill\eject}|' +% \ctsref{\vadjust} +% ^^|\vadjust| +% to force a break after the next complete output line. +% The reason for preceding |\eject| by ^|\vfill| +% \ctsref{\vfill} is to +% get \TeX\ to fill out the page with blank space. +% However, using |\eject| to fix page break problems +% has a major disadvantage: +% if the page boundaries in your document change, +% the page breaks that you've inserted may no longer be where you want them. + +你可以使用 ^|\eject| 命令\ctsref{\eject},强制 \TeX{} 在特定的地方分 +页。在段落内部,你可以使用一个组合:`|\vadjust{\vfill\eject}|' +\ctsref{\vadjust} +^^|\vadjust| +在下一行之后强制断开。|\eject| 之前 ^|\vfill| +\ctsref{\vfill} 的作用是让 \TeX{} 使用空白来填充页面。但是,使用 +|\eject| 来纠正分页问题的主要缺点在于:如果文档的页边距改变,分页的地 +方可能未必就如你所愿那样。 + +% If you don't provide \TeX\ with a |\vfill| command to fill out the page +% after an |\eject|, +% \TeX\ redistributes the extra blank space as best it can and then usually +% complains that ``an +% underfull |\vbox| (badness $10000$) has occurred while |\output| is active.'' +% You may encounter a similar problem with +% any of the methods mentioned above for enclosing +% material that you want to keep together. + +如果你没有在 |\eject| 之后\footnote{译注:疑为笔误,应该是“之前”。}使用 |\vfill| 命令, +\TeX{} 将尽其所能地重新分配额外的空白间距,然后 +发牢骚:“an underfull |\vbox| (badness $10000$) has occurred while |\output| is + active.”上面讲的封装素材在一起的任一方法中,类似的问题也会出现。 + +% The ^|\filbreak| command \ctsref\filbreak{} +% \xrdef{filbreak} +% provides a way of keeping the lines of one or more paragraphs +% (or other vertical mode material) together on +% a page. If you enclose a paragraph in |\filbreak|s, \TeX\ will effectively +% ignore the |\filbreak|s if the paragraph fits on the current page and +% break the page before the first |\filbreak| if the paragraph doesn't fit. +% If you put |\filbreak|s around each paragraph in a sequence of paragraphs, +% like this: +% {\obeylines\display{ +% {\tt \\filbreak} +% \<paragraph> +% {\tt \\filbreak} +% \<paragraph> +% {\tt \\filbreak} +% \leavevmode\indent\vdots +% \<paragraph> +% {\tt \\filbreak} +% }} +% \vfil\eject +% \noindent +% \TeX\ will keep the lines of each paragraph together on a page. +% If \TeX{} breaks a page at a |\filbreak|, it will fill the bottom of the +% page with blank space. + +^|\filbreak| 命令 \ctsref\filbreak{} +\xrdef{filbreak} +提供了一种方式来把一个自然段或几个段落(或者其他竖直模式素材)放在同一 +页面上。当你用 |\filbreak| 来封闭一个自然段的时候,如果段落内容可以放 +置在一页, \TeX{} 会有效地忽略那些 |\filbreak|;如果不是,\TeX{} 将在 +第一个 |\filbreak| 之前分页。如果在连续段落中,每个自然段前后都有 +|\filbreak|,比如这样: +{\obeylines\display{ +{\tt \\filbreak} +\<paragraph> +{\tt \\filbreak} +\<paragraph> +{\tt \\filbreak} +\leavevmode\indent\vdots +\<paragraph> +{\tt \\filbreak} +}} +\vfil\eject +\noindent +\TeX{} 将使每一段都是同页。如果在 |\filbreak| 处分页, \TeX{} 将用空白 +填充页面底部。 + +% Sometimes you can get \TeX\ to modify the length of a page by changing +% the ^|\looseness| parameter \ctsref\looseness{} for one or more paragraphs. +% Setting |\looseness| negative within a paragraph causes \TeX\ to try to squeeze +% the paragraph into fewer lines; setting it positive causes \TeX\ to try to +% expand the paragraph into more lines. The disadvantage of changing |\looseness| +% is that the interword spacing in the affected region won't be optimal. +% You can get further information about \TeX's attempted line breaks by +% setting |\tracingpages| (\xref\tracingpages) to $1$. + +有时,你可以改变一个或几个段落的 ^|\looseness| 参数\ctsref{\looseness}% +以修改页面的长度。设置 |\looseness| 为负会让 \TeX{} 试图缩减段落的行数; +为正则增加其行数。改变 |\looseness| 的缺点在于:受影响区域的单词间距不是最佳的。 +要了解更多的断行信息,可以设置 |\tracingpages|(\xref\tracingpages )为 $1$。 + +% \section Preserving the end of a page + +\section 保留页尾 + +% Sometimes you need to modify something on a single page and you want to avoid +% reprinting the entire document. If your modification doesn't +% change the page length too much, there's hope. You need to fix the end +% of the page so that it falls in the same place; +% the methods are similar to the ones for fixing a bad page break. + +有时你需要在单个页面上修改某些地方但是又不想重排全部文档。如果页面长度 +没有因为修改而改变很多,那就可以实现。你要做的是固定页面的尾部不 +变,所需的办法跟纠正不良分页那里一样。 + +% If the original end of page came between paragraphs, you can +% force a page break at the same place +% using any of the methods we've described above. Otherwise, +% you must force \emph{both} a line break and a page break at a particular +% place. If the new page is shorter than the old one, the sequence: +% \csdisplay +% \vadjust{\vfill\eject}\break +% | +% ^^|\vadjust| +% should do the trick. +% But if the new page is longer, +% the problem is far more difficult because \TeX\ has probably already +% squeezed the page as tightly as it can. Your only hopes in this case are +% to set ^|\looseness| \ctsref\looseness{} to a negative value, +% to shorten some of the vertical skips on the page, to add some shrink to +% ^|\parskip| (\xref\parskip) if it was nonzero, or, as a last resort, +% to decrease |\baselineskip| \ctsref{\baselineskip} ever so slightly. +% ^^|\baselineskip//and preserving end of page| + +如果原来的页尾就是正好是两个段落中间,你可以用前面描述的方法在同样位置 +强制分页。其他情况下,你必须要在指定位置\emph{同时}强制断行和分页。如 +果新页面比旧页面要短,命令序列: +\csdisplay +\vadjust{\vfill\eject}\break +| +^^|\vadjust| +是一个捷径。但是,如果新的页面要长一些的话,问题就非常难办,因为 +\TeX{} 可能已经尽量使页面非常紧凑了。这时唯一的办法就是设定 +^|\looseness|\ctsref\looseness{}为负值,来缩短页面上的一些竖直间距, +如果 ^|\parskip| (\xref\parskip) 非零,压缩一下, 或者祭出压箱底的绝 +招:略微减小 |\baselineskip| \ctsref{\baselineskip}。 +^^|\baselineskip//用于保留页尾| + +% \section Leaving space at the top of a page + +\section 保留页首空白 + +% \null +% ^^{vertical space//reserving at top of page} +% You can usually use the |\vskip| command \ctsref\vskip{} +% to leave vertical space on a page. +% That doesn't work at the top of a page, however, since +% \TeX\ discards glue, kerns, and penalties that occur just after a page break. +% ^^{page breaks//glue at} +% Use the ^|\topglue| command \ctsref\topglue\ instead; it produces glue that +% never disappears. +% \eix^^{page breaks//bad} + +\null +^^{竖直间隔//保留页首空白} +通常你可以使用 |\vskip| 命令\ctsref\vskip{} 在页面上添加空白竖直间距, +但这一招对页首无效,因为在紧接着分页后的所有粘连,紧排和惩罚, +都会被 \TeX{} 会丢弃。 +^^{分页//分页处的粘连} +一个替代:^|\topglue| 命令 \ctsref\topglue\ ,能产生永不消失的粘连。 +\eix^^{分页//不良分页} + +% \section Correcting bad line breaks + +\section 纠正不良断行 + +% \null +% \bix^^{line breaks//bad} +% If \TeX\ breaks a line in the middle of material that you wanted to keep +% on a single line, there are several ways to correct the situation: +% \ulist\compact +% \li You can force a break in a nearby place with the +% |\break| command (\xref{hbreak}). +% ^^|\break//correcting line breaks with| +% \li You can insert a tie (|~|) between two words +% (see \xref{@not}) to prevent a break between them.\ttidxref{~} +% \li You can tell \TeX\ about hyphenations that it wouldn't +% otherwise consider by +% inserting one or more discretionary hyphens in various words +% (see |\-|, \xref{\@minus}). +% \ctsidxref{-//in line breaking} +% ^^{discretionary hyphens//bad line breaks, correcting with} +% \li You can enclose several words in an hbox using the ^|\hbox| +% command \ctsref{\hbox}. +% \endulist + +\null +\bix^^{断行//不良断行} +如果 \TeX{} 在需要放在一行的内容中间断行了,有好几种方法能纠正这种情况: +\ulist\compact +\li 你可以使用 |\break| 命令(\xref{hbreak}),在旁边强制断行。 + ^^|\break//纠正断行| +\li 你可以在两个单词之间插入一个带子(|~|)(见\xref{@not}),来防止在它们之间断开。\ttidxref{~} +\li 你可以在一些单词里插入一个或者多个自定连字符,来告诉 \TeX{} 新的断词规则(参考 |\-|,\xref{\@minus})。 +\ifoldeplain\ctsidxref{-//在断行中}\fi + ^^{自定连字符//纠正不良断行} +\li 你可以使用 ^|\hbox| 命令\ctsref{\hbox},把几个单词封装在一个水平盒子里。 +\endulist + +% The disadvantage of all of these methods, except for inserting discretionary +% hyphens, is that they may make it impossible for \TeX\ to find a +% satisfactory set of line breaks. Should that happen, \TeX\ will +% set one or more underfull or overfull boxes and complain about it. +% ^^{underfull boxes} ^^{overfull boxes} +% The hbox method has a further disadvantage: because \TeX\ sets an hbox +% as a single unit without considering its context, the interword space +% within the hbox may not be consistent with the interword space in the rest of +% the line. +% \eix^^{line breaks//bad} + +除了插入临时连字符以外, 其他几种方法都有这样的缺点:\TeX{} 不能产生最佳的断行设置。 +一旦如此,\TeX{} 将产生一个或多个未满或溢出盒子,并且对此抱怨。 +^^{未满盒子} ^^{过满盒子} +水平盒子的方法还有另外一个缺点: +因为 \TeX{} 处理一个水平盒子的方式是不考虑其中的内容而置其为一个基本单位, +结果盒子内部的单词间距可能会与一行内其它地方不一致。 +\eix^^{断行//不良断行} + +% \section Correcting overfull or underfull boxes +\section 纠正溢出或未满盒子 + +% \null +% \bix^^{overfull boxes} +% \bix^^{underfull boxes} +% \bix^^{boxes//overfull} +% \bix^^{boxes//underfull} +% If \TeX\ complains about an overfull box, it means you've put +% more material into a box than that box has room for. +% Similarly, if \TeX\ complains about an underfull box, it means you +% haven't put enough material into the box. You can encounter +% these complaints under many different circumstances, so let's look at the more +% common ones: + +\null +\bix^^{过满盒子} +\bix^^{未满盒子} +\bix^^{盒子//过满盒子} +\bix^^{盒子//未满盒子} +如果 \TeX{} 抱怨一个溢出盒子,那表示你在一个盒子里放置了超出盒子空间的内容。类似的,如果 \TeX{} 抱怨的是一个未满盒子,那是说你没有往盒子里加入足够多的内容。这些抱怨可以在许多情形下发生,所以,让我们先看看一般的情况: + +% \ulist +% \li An overfull hbox that's a line of a paragraph indicates that the line was +% too long and that +% \TeX\ couldn't rearrange the paragraph +% to make the line shorter. If you set ^|\emergencystretch| +% \ctsref{\emergencystretch} to some nonzero +% value, that may cure the problem by allowing \TeX\ to put more space between +% words. Another solution is to set |\tolerance| \ctsref{\tolerance} +% to $10000$, but that's likely +% to yield lines with far too much space in them. Yet another solution is to +% insert a discretionary hyphen +% ^^{discretionary hyphens//overfull boxes, correcting with} +% in a critical word that \TeX\ didn't know how to hyphenate. +% If all else fails, you might try rewording the paragraph. +% A solution that is rarely satisfactory is increasing ^|\hfuzz| \ctsref\hfuzz, +% allowing \TeX\ to construct lines that project beyond the right margin. + +\ulist +\li 一个水平溢出盒子,如果是段落中的一行,表示那一行太长而且 \TeX{} 不能重新安排段落来缩短它。 +如果你设置 ^|\emergencystretch|\ctsref{\emergencystretch} 的值非零, +\TeX{} 将在单词间插入更多的空白,可能会有助于解决这个问题。 +另一个办法是设置 |\tolerance| \ctsref{\tolerance} $10000$,但它往往会导致行内太多的空白。 +还有一个办法是对在 \TeX\ 里未定义断词规则的关键单词插入自定连字符。 +^^{自定连字符//纠正过满盒子} +如果这些都不管用,那你可能只好去重写那个段落了。 +一个不是很好的方法是增加 ^|\hfuzz|\ctsref\hfuzz ,来允许 \TeX{} 排版超出右边界的行。 + +% \li An underfull hbox that's a line of a paragraph indicates that the line was +% too short and that \TeX\ couldn't rearrange the paragraph to +% make the line longer. +% \TeX\ will set such a line by stretching its interword spaces +% beyond their normal +% limits. Two of the cures for overfull lines mentioned above +% also apply to underfull lines: +% inserting discretionary hyphens and rewording the paragraph. +% Underfull lines +% won't trouble you if you're using ragged right formatting, which you can get +% with the ^|\raggedright| command \ctsref\raggedright. + +\li 一个水平未满盒子,如果是段落里的一行,表示那一行太短了,\TeX{} 不能重新安排段落来使之变长。\TeX{} 将加大单词间的空白,甚至超过正常限度。上面提到的对付溢出行的两种纠正办法:插入临时的连字符和重写段落,都可以用于未满的行。对于使用 ^|\raggedright| 命令 \ctsref\raggedright 得到的左对齐格式,就没有未满行的问题。 + +% \li The complaint: +% \csdisplay +% Underfull \vbox (badness 10000) has occurred +% while \output is active +% | +% indicates that \TeX\ didn't have enough material to fill up a page. The +% likely cause is that you've been using vboxes to keep material together +% and \TeX\ has encountered a vbox near the bottom of a page that wouldn't fit on +% that page. +% It has put the vbox on the next page, but in doing so has left too much +% empty space in the current page. +% In this case you'll either have to insert some more space +% elsewhere on the current page or break up the vbox into smaller parts. + +\li 抱怨信息: +\csdisplay +Underfull \vbox (badness 10000) has occurred + while \output is active +| +表明 \TeX{} 因为没有足够的素材而没有填满一页。可能的原因是: +你使用了竖直盒子来把素材放在一起,但是在接近页面的底部时, +\TeX{} 遇到了一个不适合放在那里的竖直盒子。 +结果那个盒子被移至下一页,而在当前页上留下了太多空白。 +在这种情况下,或者你要在别的地方插入更多的空白, +或者将那个竖直盒子打破,变得小一点。 + +% Another possible cause of this complaint is having a long paragraph +% that occupies an entire page without a break. +% Since \TeX\ won't ordinarily vary the spacing between lines, +% it may be unable to fill a gap at the bottom of the page +% amounting to a fraction of the line spacing. +% This can happen if |\vsize| \ctsref{\vsize}, the page length, +% is not an even multiple of |\baselineskip| \ctsref{\baselineskip}, +% the space between consecutive +% baselines. + +出现这一抱怨信息的另一个可能原因是:一个长段落覆盖了整页而没有分段。 +通常 \TeX\ 不会自动调整基行距离,因此,在一页的末尾,就没法填满不足一个行间距的空白。 +如果页面长度 |\vsize|\ctsref{\vsize}恰好不是基线距离 +|\baselineskip|\ctsref{\baselineskip}的整数倍,这种情况就会出现。 + +% Yet another cause of this complaint, +% similar to the previous one, is setting ^|\parskip| \ctsref{\parskip}, +% the interparagraph glue, to a value that doesn't have any +% stretch or shrink. You can fix these last two problems by increasing ^|\vfuzz| +% \ctsref\vfuzz. + +关于这一抱怨信息还有一个原因:与上面相仿, +段落间的粘连 ^|\parskip|\ctsref{\parskip},被固定为不能拉伸或挤压的值。 +后面的这两种情况,你可以增加 ^|\vfuzz|\ctsref\vfuzz 予以解决。 + +% \li The complaint +% \csdisplay +% Overfull \vbox (296.30745pt too high) has occurred +% while \output is active +% | +% indicates that you constructed a vbox that was longer than the page. You'll +% just have to make it shorter. + +\li 抱怨信息: +\csdisplay +Overfull \vbox (296.30745pt too high) has occurred + while \output is active +| +说的是你构造了一个长于一页的竖直盒子。弄短一点吧。 + +% \li +% \bix^^|\hbox//overfull box from| +% \bix^^|\vbox//overfull box from| +% The only cures for an overfull hbox or vbox that you've constructed +% with the |\hbox| or |\vbox| commands +% (\pp\xrefn\hbox, \xrefn\vbox) +% are to take something out of the box, to insert some negative glue +% with ^|\hss| or ^|\vss| (\xref\hss), or to increase the size +% of the box. + +\li +\bix^^|\hbox//它导致的过满盒子| +\bix^^|\vbox//它导致的过满盒子| +对于 |\hbox| 或 |\vbox| 命令(第\xrefn\hbox ,\xrefn\vbox 页)所产生的 +溢出盒子问题,矫正的诀窍是:从盒子里拿一些东西出去;用 ^|\hss| 或 ^|\vss|(\xref\hss ) +插入负值的粘连;或者增加盒子的尺寸。 + +% \li If you encounter an underfull hbox or vbox that you've constructed +% with |\hbox| or |\vbox|, +% you're usually best off to fill out the box with ^|\hfil| +% or ^|\vfil| (\xref\hfil). +% \eix^^|\hbox//overfull box from| +% \eix^^|\vbox//overfull box from| + +\li 对于 |\hbox| 或 |\vbox| 命令(第\xrefn\hbox ,\xrefn\vbox 页)所产生的 +未满盒子问题,只需用 ^|\hfil| 或 ^|\vfil|(\xref\hfil )来填满即可。 +\eix^^|\hbox//它导致的过满盒子| +\eix^^|\vbox//它导致的过满盒子| + +% \endulist +% \eix^^{boxes//overfull} +% \eix^^{boxes//underfull} +% \eix^^{overfull boxes} +% \eix^^{underfull boxes} + +\endulist +\eix^^{盒子//过满盒子} +\eix^^{盒子//未满盒子} +\eix^^{过满盒子} +\eix^^{未满盒子} + +% \section Recovering lost interword spaces + +\section 恢复丢失的单词间距 + +% \null +% ^^{space//lost} +% ^^{words run together} +% If you find that \TeX\ has run two words together, the likely cause is a +% control sequence that's absorbed the spaces after it. +% Put a ^{control space} (|\!visiblespace|) after the control +% sequence. + +\null +^^{间隔//丢失的间隔} +^^{单词连在一起} +如果你发现 \TeX{} 把两个单词连在一起,可能的原因是有一个控制序列吃掉 +了其后所有的空格。在那个控制序列后面放一个^{控制空格} +(|\!visiblespace|) 即可。 + +% \section Avoiding unwanted interword spaces + +\section 避免多余的单词间空白 + +% \null +% \bix^^{space//unwanted}\xrdef{unwantedspace} +% If you get a space in your document where you don't want and don't +% expect one, the most likely cause, in our experience, +% is an end of line or a space following a brace. +% ^^{braces//space after} +% (If you're doing fancy things with category codes, +% ^^{category codes//cause of unwanted spaces} +% you've introduced lots of other likely causes.) +% \TeX\ ordinarily translates an end-of-line into a space, +% and it considers a space after a right or left brace to be significant. + +\null +\bix^^{间隔//不想要的间隔}\xrdef{unwantedspace} +如果在文档中有不想要或者未预料到的空白,以我们的经验,最可能的原因是一 +行的结尾或大括号后的空格。% +^^{花括号//花括号后的空格}% +(当你用类别码来做华丽的效果时, +^^{类别码//导致不想要的间隔} +还会有其他许多类似的原因。) +\TeX{} 通常将行尾处理为空格,并且会排出左右大括号后面的空格。 + +% If the unwanted space is caused by a space after a brace within +% an input line, then remove that space. +% If the unwanted space is caused by a brace at the end of an input line, +% put a `|%|' immediately after the brace. +% {\recat!ttidxref[%//to eliminate unwanted spaces]] +% The `|%|' starts a comment, but this comment needn't +% have any text. + +如果多余的空白是在一行内,由大括号后的空格引起的,那就移除它。如果多余的空 +白是在行尾,由大括号后的空格引起的,那就紧接着在大括号后放一个`|%|'。 +%{\recat!ttidxref[%//to eliminate unwanted spaces]] +`|%|' 用于注释开始,但不一定真的要有注释内容。 + +% A macro definition can also +% introduce unwanted spaces if you haven't written it +% carefully. If you're getting unwanted spaces when you call a macro, check +% its definition to be sure that you don't have an unintended space after a +% brace and that you haven't ended a line of the definition immediately +% after a brace. +% People often end lines of macro definitions after braces in order to make +% the definitions more readable. +% To be safe, put a `|%|' after any brace that ends a line of a macro +% definition. +% It may not be needed, but it won't do any harm.\footnote{ +% Admittedly there are rare cases where you really do want an end of line +% after a brace.} + +宏定义如果写的不仔细,也可能导致多余的空白。当你应用一个宏,但是有多余 +的空白,那就要检查其定义,确保大括号后没有额外的空格以及紧接着括号之后, +宏定义没有换行。人们经常在大括号后对宏定义换行,从而容易阅读。安全起见, +应该在所有大括号之后要换行的地方放一个`|%|'。可能有些地方不需要,但是这 +么做起码没有坏处。\footnote{当然,极为偶然的情况下,你可能真的需要在大括 + 号后直接换行。} + +% When you're having trouble locating the source of an unwanted space, +% try setting |\tracingcommands| \ctsref{\tracingcommands} to $2$. +% You'll get a |{blank space}| command in the log file for each space +% that \TeX\ sees. + +当你不能准确在源文档中定位多余的空白的时候,可以尝试设置 +|\tracingcommands|\ctsref{\tracingcommands}为 $2$。在日志文件里,每 +一处空格都会输出一个 |{blank space}| 命令。 + +% It helps to know \TeX's rules for spaces: + +知道 \TeX{} 关于空格的规则会有帮助。 + +% \olist +% \li Spaces are ignored at the beginnings of input lines. +% \li Spaces at the ends of input lines are ignored under \emph{all} +% circumstances, although the end of line itself is treated like a space. +% (A completely blank line, however, generates a |\par| token.) +% \li Multiple spaces are treated like a single space, but +% only if they appear together in your input. +% Thus a space following the arguments of a macro call is not combined +% with a final space produced by the macro call. Instead, you get two spaces. +% \li Spaces are ignored after control words. +% \li Spaces are in effect ignored after numbers, dimensions, +% and the `|plus|' and `|minus|' in glue specifications.% +% \footnote{Actually, \TeX\ ignores only a +% single space in these places. +% Since multiple spaces ordinarily reduce to a single space, however, the +% effect is that of ignoring any number of spaces.} +% \endolist +% \noindent If you've changed the category code of the space or the end-of-line +% character, all bets are off. +% \eix^^{space//unwanted} + +\olist +\li 输入行开始之前的空格将被忽略。 +\li 输入行结束之后的空格在任何情况下都被忽略。虽然行尾本身就被当作空格。 +(一个空白行产生的是 |\par| 标记) +\li 多于一个的空格,如果在一起,将被处理为一个空格。因此,引用一个宏之 +后的空格将不会和宏定义末尾的空格合并。你得到的是两个空格。 +\li 控制字符之后的空格将被忽略。 +\li 数字,尺寸以及粘连设定中的 `|plus|' 和 `|minus|' 之后的空格在执行 +中也被忽略。% +\footnote{实际上,\TeX{} 在这些地方只会忽略单个的空格。因为多个空格会 + 被处理为一个空格,所以结果就是忽略所有空格。} +\endolist + +%\section Avoiding excess space around a display +\section 避免陈列公式周围的额外空白 + +% \null +% ^^{math display} +% If you're getting too much space above a math display, it may be because +% you've left a blank line in your input above the display. +% The blank line starts a new paragraph and puts \TeX\ into +% vertical mode. When +% \TeX\ sees a '|$|' in vertical mode, it switches back to horizontal mode +% and inserts the interparagraph glue (|\parskip|) followed by +% the interline glue (|\baselineskip|). +% Then, when it starts the display itself, +% it inserts \emph{more} glue (either ^|\abovedisplayskip| +% or ^|\abovedisplayshortskip|, depending on the length of the preceding +% line). +% This last glue is the only glue that you want. +% To avoid getting the interparagraph glue as well, don't leave a blank line above a +% math display or otherwise +% end a paragraph (with |\par|, say) just before a math display. + +\null +^^{陈列公式} +如果在陈列公式之前有太多空白,有可能是因为你输入的时候在陈列公式之前留 +了一个空行。这个空行将开始一个新的段落,并且把 \TeX\ 转入竖直模式。当 +\TeX\ 在竖直模式里遇到一个 '|$|', 就会切换到水平模式并插入段间粘连 +(|\parskip|),接下来又插入一个行间粘连(|\baselineskip|)。然后当显 +示开始的时候,它插入\emph{更多}粘连(或者是 ^|\abovedisplayskip| 或者 +是 ^|\abovedisplayshortskip|,取决于前一行的长度)。只有最后一个粘连是你想 +要的。为了避免也得到段间粘连,在陈列公式之前不要留空行或者结束段落 +(比如用 |\par|)。 + +% Similarly, +% if you're getting too much space below a math display, it may be because +% you've left a blank line in your input below the display. +% Just remove it. + +类似的,如果在陈列公式之后有太多的空白,可能是因为在输入时留了一个空行。 +去掉它即可。 + +%\section Avoiding excess space after a paragraph +\section 避免段后的额外空白 + +% If you get too much vertical space after a paragraph that was produced by a +% macro, you may be getting the interparagraph glue produced by the macro, +% an empty paragraph, and then more interparagraph glue. +% You can get rid of the second paragraph skip by inserting: +% \csdisplay +% \vskip -\parskip +% \vskip -\baselineskip +% | +% just after the macro call. +% If you always get this problem with a certain macro, you can put these +% lines at the end of the macro definition instead. +% You may also be able to cure the problem by never leaving a blank line +% after the macro call---if you want a blank line just to make your input +% more readable, start it with a `|%|'. + +如果使用宏得到的段落之后有太多竖直空白,可能里头包含了宏产生的段间粘 +连,一个空段,以及另外一个段间粘连。你可以通过在那个宏之后插入 +\csdisplay +\vskip -\parskip +\vskip -\baselineskip +| +来消除第二个段落间距。 + +%\section Changing the paragraph shape +\section 改变段落形状 + +% \null +% \bix^^{paragraphs//shaping} +% Several \TeX\ parameters---^|\hangindent|, ^|\leftskip|, etc.---% +% affect the way that \TeX\ shapes paragraphs and breaks them into lines. +% ^^{line breaking} +% These parameters are used indirectly in \plainTeX{} commands such as +% ^|\narrower| and ^|\hang|; you can also assign to them directly. +% If you've used one of these commands (or changed one of these parameters), +% but the command or parameter change +% does not seem to be having any effect on a paragraph, +% the problem may be that you've ended a group before you've ended the +% paragraph. For example: +% \csdisplay +% {\narrower She very soon came to an open field, with +% a wood on the other side of it: it looked much darker +% than the last wood, and Alice felt a little timid +% about going into it.} +% | +% This paragraph won't be set narrower because the right brace at the end +% terminates the |\narrower| group before \TeX\ has had a chance to +% break the paragraph into lines. Instead, put a |\par| before the +% right brace; then you'll get the effect you want. +% ^^|\par//when changing paragraph shape| +% \eix^^{paragraphs//shaping} + +\null +\bix^^{段落//形成段落} +有几个 \TeX\ 的参数——^|\hangindent|, ^|\leftskip|, 等等——% +影响 \TeX\ 塑段和折行的方式。 +^^{断行} +\PlainTeX{} 的命令,如 ^|\narrower| 和 ^|\hang|, 会间接的用到这些参 +数;你也可以直接对它们赋值。 如果你已经使用了这些命令中的一个(或者改 +变了这些参数中的一个),但是看上去对段落没有任何效果,问题可能在于,段 +落结束之前你先结束了一个组。例如: +\csdisplay +{\narrower She very soon came to an open field, with +a wood on the other side of it: it looked much darker +than the last wood, and Alice felt a little timid +about going into it.} +| +这个段落不会变窄,因为最后那个右边大括号在 \TeX\ 拆段组行之前就结束了 +|\narrower| 的组。作为补救,放一个 |\par| 在右边大括号之前;这样你才能 +看到想要的效果。 +^^|\par//在修改段落形状时| +\eix^^{段落//形成段落} + + +%\section Putting paragraphs into a box +\section 把段落放入盒子 + +% Suppose you have a few paragraphs of text that you want to put in a +% particular place on the page. The obvious way to do it is to enclose +% the paragraphs in an hbox of an appropriate size, and then place the hbox +% where you want it to be. Alas, the obvious way doesn't work because +% \TeX\ won't do line breaking in restricted horizontal mode. +% ^^{restricted mode//horizontal} +% If you try it, +% you'll get a misleading error message that suggests you're +% missing the end of a group. +% The way around this restriction is to write: +% \csdisplay +% \vbox{\hsize = !<dimen> !dots !<paragraphs> !dots} +% | +% where \<dimen> is the line length that you want for the paragraphs. +% This is what you need to do, in particular, when you want to enclose some +% paragraphs in a box (a box enclosed in ruled lines, not a \TeX\ box). + +假设你有一些文字段落想放到页面的一个特定位置。显而易见的方式是用一个合 +适尺寸的水平盒子来封装段落,然后放到想要的位置。哎呀,这个办法不管用, +因为 \TeX\ 不能在受限水平模式下断行。 +^^{受限模式//水平受限模式} +这么做,你将得到一个有些误导的错误消息,声称 you're + missing the end of a group。摆脱这个限制的方法是使用: +\csdisplay +\vbox{\hsize = !<dimen> !dots !<paragraphs> !dots} +| +其中,\<dimen> 是你希望的一行的长度。这么做就可以了,特别是当你想用盒 +子(带线框的盒子,不是 \TeX 盒子)封装一些段落的时候。 + +%\section Drawing lines +\section 画线 + +% \null +% \bix^^{rules} +% You can use the ^|\hrule| and ^|\vrule| commands (\xref\hrule) +% to draw lines, i.e., rules. You'll need to +% know (a)~where you can use each command and +% (b)~how \TeX\ determines the lengths of rules when +% you haven't given the lengths explicitly. +\null +\bix^^{标线} +你可以使用 ^|\hrule| 和 ^|\vrule| 命令(\xref\hrule )来画线。 +所需知道的是 (a)~在什么地方可以用哪个命令, +以及 (b)~\TeX\ 如何在你未明确指出的情况下决定线的长度。 +% \ulist +% \li You can only use |\hrule| when \TeX\ is in a vertical mode and |\vrule| +% when \TeX\ is in a horizontal mode. +% This requirement means that +% you can't put a horizontal rule into an hbox or a vertical rule +% into a vbox. +% You can, however, construct a horizontal rule that looks vertical by +% specifying all three dimensions and making it tall and skinny. +% Similarly, you can construct a vertical rule that looks horizontal +% by making it short and fat. +\ulist +\li \TeX\ 处于竖直模式时,只能用 |\hrule|;\TeX\ 处于水平模式时,只能 +用 |\vrule|。所以你不能在水平盒子里使用横线或者在竖直盒子里使用竖线。 +然而,通过设定所有三个尺寸(dimension),你可以把横线画的又高又细,使 +它看起来像竖线。类似的,你也可以把竖线画的又矮又宽,使它看起来像横线。 + +% \li A horizontal rule inside a vbox +% has the same width as does the vbox if you haven't +% given the width of the rule explicitly. +% Vertical rules +% inside hboxes behave analogously. +% If your rules are coming out too long or too short, +% check the dimensions of the enclosing box. +% \endulist +\li 如果你没有明确设定宽度,竖直盒子里的横线就会和盒子一样宽。水平盒子 +里的竖线也类似。如果你得到的线太长或太短,请检查外面盒子的尺寸。 +\endulist + +% As an example, suppose we want to produce: +% \display{% +% \hbox{\vrule +% \vbox{\hrule\vskip 3pt +% \hbox{\hskip 3pt +% \vbox{\hsize .7in\raggedright +% \noindent Help! Let me out of here!}% +% \hskip 3pt} +% \vskip 3pt\hrule}% +% \vrule}} +% The following input will do it: +% \csdisplay +% \hbox{\vrule +% \vbox{\hrule \vskip 3pt +% \hbox{\hskip 3pt +% \vbox{\hsize = .7in \raggedright +% \noindent Help!! Let me out of here!!}% +% \hskip 3pt}% +% \vskip 3pt \hrule}% +% \vrule} +% | +% We need to put the text into a vbox in order to get \TeX\ to process it +% as a paragraph. +% The four levels of boxing are really +% necessary---if you doubt it, try to run this example with fewer levels. +% \eix^^{rules} + +一个例子,假设你想要 +\display{% +\hbox{\vrule + \vbox{\hrule\vskip 3pt + \hbox{\hskip 3pt + \vbox{\hsize .7in\raggedright + \noindent Help! Let me out of here!}% + \hskip 3pt} + \vskip 3pt\hrule}% +\vrule}} +The following input will do it: +\csdisplay +\hbox{\vrule + \vbox{\hrule \vskip 3pt + \hbox{\hskip 3pt + \vbox{\hsize = .7in \raggedright + \noindent Help!! Let me out of here!!}% + \hskip 3pt}% + \vskip 3pt \hrule}% +\vrule} +| +我们需要把文本放到竖直盒子里来让 \TeX\ 把它当作段落处理。四层盒子是必 +要的---如果你有所怀疑,可以尝试在更少的盒子情况下运行这个例子。 +\eix^^{标线} + +%\section Creating multiline headers or footers +\section 创建多行的页眉页脚 + +% \null +% \xrdef{bighead} +% \bix^^{headers//multiple-line} +% \bix^^{footers//multiple-line} +% You can use +% the ^|\headline| and ^|\footline| commands +% (\xref\footline) to produce headers and footers, but they don't work properly +% for headers and footers having more than one line. However, you can get +% multiline headers and footers by redefining some of the subsidiary +% macros in \TeX's output routine. + +\null +\xrdef{bighead} +\bix^^{页眉//多行页眉} +\bix^^{页脚//多行页脚} +你可以使用 ^|\headline| 和 ^|\footline| 命令(\xref\footline)来创建页 +眉和页脚,但是处理多于一行的页眉和页脚,就不大灵光。然而,通过重新定义 +\TeX\ 的输出例行程序的一些宏,就可以实现。 + +% For a multiline header, you need to do three things: +% \olist\compact +% \li Redefine the ^|\makeheadline| macro that's called from \TeX's +% output routine. +% \li Increase ^|\voffset| by the amount of vertical space consumed by the +% extra lines. +% \li Decrease ^|\vsize| by the same amount. +% \endolist +% \noindent The following example shows how you might do this: +% \csdisplay +% \advance\voffset by 2\baselineskip +% \advance\vsize by -2\baselineskip +% \def\makeheadline{\vbox to 0pt{\vss\noindent +% Header line 1\hfil Page \folio\break +% Header line 2\hfil\break +% Header line 3\hfil}% +% \vskip\baselineskip} +% | +% You can usually follow the pattern of this definition quite closely, just +% substituting your own header lines and choosing an appropriate multiple +% of |\baselineskip| (one less than the number of lines in the +% header). + +为了得到多行页眉,你需要做三件事: +\olist\compact +\li 重新定义 ^|\makeheadline| 宏,\TeX\ 的输出例行程序将会用到它。 +\li 把额外的行所需的竖直距离加给 ^|\voffset|。 +\li 对 ^|\vsize| 减少同样的大小。 +\endolist +\noindent 下面的例子演示了你可以怎样做: +\csdisplay +\advance\voffset by 2\baselineskip +\advance\vsize by -2\baselineskip +\def\makeheadline{\vbox to 0pt{\vss\noindent + Header line 1\hfil Page \folio\break + Header line 2\hfil\break + Header line 3\hfil}% + \vskip\baselineskip} +| +一般你照着这个定义的样子做就可以了,只需要替换你自己的页眉内容并选一个 +合适的倍数给 |\baselineskip| (页眉行数减一)。 + +% For a multiline footer, the method is similar: +% \olist +% \li Redefine the ^|\makefootline| macro that's called from \TeX's +% output routine. +% \li Decrease ^|\vsize| by the amount of vertical space consumed by the +% extra lines. +% \endolist +% \noindent The following example shows how you might do this: +% \csdisplay +% \advance\vsize by -2\baselineskip +% \def\makefootline{% +% \lineskip = 24pt +% \vbox{\raggedright\noindent +% Footer line 1\hfil\break +% Footer line 2\hfil\break +% Footer line 3\hfil}} +% | +% Again, you can usually follow the pattern of this definition quite closely. +% The value of |\lineskip| determines the amount of space between the +% baseline of the last line +% of the main text on the page and the baseline of the first line of the footer. +% \eix^^{headers//multiple-line} +% \eix^^{footers//multiple-line} + +对多行页脚的处理也类似: +\olist +\li 重新定义 ^|\makefootline| 宏,\TeX\ 的输出例行程序将会用到它。 +\li 把额外的行所需的竖直距离加给 ^|\voffset|。 +\li 从 ^|\vsize| 减去额外的行所需的竖直距离。 +\endolist +\noindent 下面的例子演示了你可以怎样做: +\csdisplay +\advance\vsize by -2\baselineskip +\def\makefootline{% + \lineskip = 24pt + \vbox{\raggedright\noindent + Footer line 1\hfil\break + Footer line 2\hfil\break + Footer line 3\hfil}} +| +同样,一般你照着这个定义的样子做就可以了。|\lineskip| 的值决定了页面上正文最 +后一行与页脚第一行的基行距离。 +\eix^^{页眉//多行页眉} +\eix^^{页脚//多行页脚} + +%\section Finding mismatched braces +\section 找出匹配错误的花括号 + +% \bix^^{braces//mismatched} +% \xrdef{mismatched} +% Most times when your \TeX\ input suffers from mismatched braces, you'll +% get a diagnostic from \TeX\ fairly near the place where you actually +% made the mistake. +% But one of the most frustrating errors you can get from a \TeX\ run, +% just before \TeX\ quits, is +% the following: +% \csdisplay +% (\end occurred inside a group at level 1) +% | +% This indicates that there is an extra left brace +% or a missing right brace somewhere +% in your document, but it gives you no hint at all +% about where the problem might be. So how can you find it? +\bix^^{花括号//不匹配的花括号} +\xrdef{mismatched} +大多数情况下,如果有花括号匹配错误, +\TeX\ 会在你的输入文档里非常接近错误发生的地方给出诊断信息。 +但是,\TeX\ 停止之前最令人沮丧的错误之一是 +\csdisplay +(\end occurred inside a group at level 1) +| +这表明在你的文档中有一个额外的左花括号或者缺少一个右花括号, +但是并没有提示可能出现问题的地方。那么,怎么找到它呢? + +% A debugging trick we've found useful +% is to insert the following line or its equivalent +% at five or six places equally spaced within the document (and not within +% a known group): +% \csdisplay +% }% a fake ending +% | +% Let's assume the problem is an extra left brace. +% If the extra left brace +% is, say, between the third and fourth fake ending, +% you'll get error messages from the first three fake endings but not from +% the fourth one. The reason is that \TeX\ will ignore the first three +% fake endings after complaining about them, +% but the fourth fake ending will match +% the extra left brace. +% Thus you know that the extra left brace +% is somewhere between the third and fourth +% fake ending. +% If the region of the error +% is still too large for you to find it, +% just remove the original set of fake endings and +% repeat the process within that region. +% If the problem is a missing right brace rather than an extra left brace, +% you should be able to track it down once you've found its mate. +一条有用的调试技巧是, +在文档内部等距离地插入五到六处类似下面的内容(不要放在已知的编组里): +\csdisplay +}% a fake ending +| +假设问题是多了一个左花括号。如果它在第三和第四个伪装结尾(fake ending)之间, +你将从前三个伪装结尾的地方得到出错消息,第四个则不会。 +原因是 \TeX\ 将抱怨并忽略前三个伪装结尾,但是第四个正好匹配了那个额外的左花括号。 +这样你就知道了那个额外的左花括号在第三和第四个伪装结尾之间某个地方。 +如果嫌疑区域仍然太大,就去除已有的伪装结尾,并在嫌疑区域内重复上述步骤。 +如果问题是缺少一个右花括号,一旦你发现左边那个,就能确定右边的了。 + +% This method doesn't work under all circumstances. In particular, it doesn't +% work if your document consists of several really large groups. But often +% you can find some variation on this method that will lead you to that +% elusive brace. +这个方法不是必杀技。特别是,如果文档中有几个很大的组,这个方法就不那么灵了。 +然而大多数情况下,你可以适当地变化一下这个方法来找出暗地捣乱的花括号。 + +% If all else fails, try shortening your input by removing +% the last half of the file +% (after stashing away the original version first!) or inserting a +% |\bye| command in the middle. +% If the error persists, you know it's in the first half; if it goes away, +% you know it's in the second half. +% By repeating this process you'll eventually find the error. +% \eix^^{braces//mismatched} +如果其他方法都不管用了, +那就试着删掉文档后半部分(注意备份!)或者在中间插入一个 |\bye| 命令。 +如果问题仍然存在,那你就可以确知它在前一半文档中; +如果没有问题了,你也可以确知问题在后一般文档里。 +重复这个过程,最终你将会发现错误所在。 +\eix^^{花括号//不匹配的花括号} + +% \section Setting dimensions +\section 设置尺寸 + +% \null +% \bix^^{\<dimen>} +% The simplest way to set a dimension is to specify it directly, e.g.: +% \csdisplay +% \hsize = 6in +% | +% You can also specify a dimension in terms of other dimensions or as a mixture +% of different units, but it's a little more work. There are two ways +% to construct a dimension as such a combination: +% \olist\compact +% \li You can add a dimension to a dimension parameter or to a dimension +% register. +% For example: +% \csdisplay +% \hsize = 6in \advance\hsize by 3pc % 6in + 3pc +% | +% \li You can indicate a dimension as a multiple of a dimension +% or glue parameter or register. +% In this case, \TeX\ converts glue to a dimension by throwing away +% the stretch and shrink. For example: +% \csdisplay +% \parindent = .15\hsize +% \advance\vsize by -2\parskip +% | +% \endolist +% \eix^^{\<dimen>} +\null +\bix^^{\<dimen>} +设置尺寸的最简单办法是直接赋值,比如: +\csdisplay +\hsize = 6in +| +你也可以用其他尺寸来设定或者混用多种长度单位,这要多费一点事。 +有两种方法来创建这样的尺寸组合: +\olist\compact +\li 你可以增加一个尺寸到另一个尺寸参数或寄存器。例如: +\csdisplay +\hsize = 6in \advance\hsize by 3pc % 6in + 3pc +| +\li 你可以将一个尺寸取为另一个尺寸(或粘连)参数或寄存器的倍数。 +这时候,\TeX\ 将丢掉粘连的伸长量和收缩量把它转换为尺寸。例如: +\csdisplay +\parindent = .15\hsize +\advance\vsize by -2\parskip +| +\endolist +\eix^^{\<dimen>} + + +%\section Creating composite fonts +\section 创建混合字体 + +% \null +% \bix^^{fonts//composite} +% It's sometimes useful to create a ``composite font'', +% named by a control sequence $\cal F$, in which all the characters +% are taken from a font $f_1$ except for a few that are +% borrowed from another font $f_2$. +% You can then set text in the composite font by using $\cal F$ just as +% you'd use any other font identifier. +\null +\bix^^{字体//混合字体} +有时候新建一种``混合字体''会很有用处。混合字体命名为一个控制序列 $\cal +F$, 它的字符基于一种字体 $f_1$,但是有一些来自另一种字体 $f_2$。然后你 +可以像调用其他字体一样使用 $\cal F$ 来设定文本使用混合字体。 + +% You can create such a composite font by defining $\cal F$ as a macro. +% In the definition of $\cal F$, you first select font $f_1$ and then +% define control sequences that produce the borrowed characters, +% set in $f_2$. +% For example, suppose that you want to +% create a composite font |\britrm| which has all the characters of |cmr10| +% except for the dollar sign, for which you want to borrow +% the pound sterling symbol +% from font |cmti10|. +% The pound sterling symbol in |cmti10| happens to be in the same font position +% as the dollar sign in |cmr10|. +% Here's how to do it: +% \csdisplay +% \def\britrm{% +% \tenrm % \tenrm names the cmr10 font +% \def\${{\tenit\char `\$}}% \tenit names the cmti10 font. +% } +% | +% Now whenever you start the font named |\britrm|, +% |\$| will produce a pound sterling symbol. + +要创建混合字体,你可以定义 $\cal F$ 为一个宏。宏定义中,首先选择字体 +$f_1$, 然后定义控制序列来产生从 $f_2$ 借来的字符。举个例子,假如你要创 +建一种混合字体 |\britrm|:基于 |cmr10| 但是其中的美元符号借用 |cmti10| +的英镑符号. 英镑符号在 |cmti10| 的位置恰好跟美元符号在 |cmr10| 里的位置一样。 +你可以这样做: +\csdisplay +\def\britrm{% + \tenrm % \tenrm names the cmr10 font + \def\${{\tenit\char `\$}}% \tenit names the cmti10 font. +} +| +现在,当你使用 |\britrm| 字体的时候,|\$| 将生成英镑符号。 + +% You can also get the same effect by changing the category codes +% of the characters in question to make those characters active and then +% providing a definition for the character. For example: +% \csdisplay +% \catcode `* = \active +% \def*{{\tentt \char `\*}} +% | +% In this case the asterisk will be taken from the |\tentt| font. +% If you then type the input line: +% \csdisplay +% Debbie was the * of the show. +% | +% it will be set as: +% {\font\tentt=cmtt10% +% \catcode `* = \active +% \def*{{\tentt \char `\*}}% +% \display{Debbie was the * of the show.}} +% \noindent + +% \eix^^{fonts//composite} + +另一种方法会有同样的效果:首先改动类别码(category codes)来激活所考 +虑的字符,然后定义它们。例如: +\csdisplay +\catcode `* = \active +\def*{{\tentt \char `\*}} +| +这个例子里,星号将从 |\tentt| 字体借用。如果接下来输入: +\csdisplay +Debbie was the * of the show. +| +效果将会是 +{\font\tentt=cmtt10% +\catcode `* = \active +\def*{{\tentt \char `\*}}% +\display{Debbie was the * of the show.}} +\noindent + +\eix^^{字体//混合字体} + +%\section Reproducing text verbatim +\section 原文呈现 +% \null +% ^^{verbatim text}\xrdef{verbatim} +% Verbatim text is text that is reproduced in a typeset +% document just as it appeared in the input. +% The most common use of verbatim text is in typesetting +% computer input, +% including both computer programs and input to \TeX\ itself. +% ^^{computer programs, typesetting} +% Computer input is not easy to produce verbatim for two reasons: +% \olist\compact +% \li Some characters (control symbols, escape characters, braces, +% etc.) have +% special meanings to \TeX. +% \li Ends of line and multiple spaces are translated to single spaces. +% \endolist +% \noindent +% In order to produce verbatim text, you have to cancel the special meanings +% and disable the translation. This is best done with macros. + +\null +^^{原文文本}\xrdef{verbatim} +原文是“输入什么样,就是什么样”的文本。比较常见的是排版计算机输入,包 +括计算机程序和 \TeX{} 输入。 +^^{计算机程序,排版} +计算机输入不易以原文呈现的原因是: +\olist\compact +\li 有些字符(控制字符,转义符,花括号等)在 \TeX{} 里有特殊的含义。 +\li 行尾和多个空格会被转换为一个空格。 +\endolist +\noindent +为了呈现原文,你必须取消这些特殊含义和转换。最好的办法是使用宏。 + +% To cancel the special meanings, you need to change the category codes +% of those characters that have special meanings. +% ^^{category codes//for verbatim text} +% The following macro illustrates how you might do it: +% \csdisplay +% \chardef \other = 12 +% \def\deactivate{% +% \catcode`\\ = \other \catcode`\{ = \other +% \catcode`\} = \other \catcode`\$ = \other +% \catcode`\& = \other \catcode`\# = \other +% \catcode`\% = \other \catcode`\~ = \other +% \catcode`\^ = \other \catcode`\_ = \other +% } +% | +% But beware! Once you've changed the category codes in this way, you've lost +% the ability to use control sequences since there's no longer an escape +% character. You need some way of getting back to the normal mode of +% operation. We'll explain how to do that in a moment, after considering +% the other problem: disabling the translation of spaces and ends of line. + +要取消特殊含义,你可以改变那些字符的类别码。 +^^{类别码//用于原文文本} +接下来的宏演示你如何做: +\csdisplay +\chardef \other = 12 +\def\deactivate{% + \catcode`\\ = \other \catcode`\{ = \other + \catcode`\} = \other \catcode`\$ = \other + \catcode`\& = \other \catcode`\# = \other + \catcode`\% = \other \catcode`\~ = \other + \catcode`\^ = \other \catcode`\_ = \other +} +| +小心!一旦这样改变了类别码,就不能再使用任何控制序列了,因为现在不 +再有转义符了。你需要想法回到正常的操作模式。接下来,介绍完另一个问 +题:取消多个空格和行尾的转换以后,我们将予以解释。 + +% \PlainTeX\ has two commands that together nearly solve the problem: +% ^|\obeyspaces| \ctsref{\obeyspaces} and ^|\obeylines| \ctsref{\obeylines}. +% The two things that they don't do are to preserve spaces at the start of +% a line +% and to preserve blank lines. +% For that you need stronger measures---which are provided by +% the ^|\obeywhitespace| macro that we are about to define. + +\PlainTeX{} 有两个命令:^|\obeyspaces|\ctsref{\obeyspaces}和 +^|\obeylines|\ctsref{\obeylines}, 几乎已经解决了上述问题, 除了两件 +事:保留行首的空格以及保留多个空白行。对此,你需要更强大的方法——使用 +我们将要定义的 ^|\obeywhitespace| 宏。 + +% \TeX\ normally insists on collecting lines into paragraphs. One way to +% convince it to take line boundaries literally is to turn individual lines +% into paragraphs.\footnote{% +% Another way is to turn the end of line character into a |\break| +% command and provide infinite glue at the end of each line. +% ^^|\break//end of line as| +% } +% You can do this by redefining the end of line character to produce +% the |\par| control sequence. The following three macro definitions +% show how: + +% ^^{whitespace, preserving} +% \xrdef{\obeywhitespace} +% \csdisplay +% \def\makeactive#1{\catcode`#1 = \active \ignorespaces} +% {% The group delimits the text over which ^^M is active. +% \makeactive\^^M % +% \gdef\obeywhitespace{% +% % Use \gdef so the definition survives the group. +% \makeactive\^^M % +% \let^^M = \newline % +% \aftergroup\removebox % Kill extra paragraph at end. +% \obeyspaces % +% }% +% } +% \def\newline{\par\indent} +% \def\removebox{\setbox0=\lastbox} + +% | +% A subtle point about the definition of |\obeywhitespace| is that +% |^^M| must be made active both +% when |\obeywhitespace| is being \emph{defined} and when +% it is being \emph{used}. + +\TeX{} 总是收集多行文本为段落。为了原文呈现各行,一个办法是把每一行转换 +为独立的段落。\footnote{% +另一个办法是把行尾字符变为 |\break| 命令,并且在每一行尾施加无穷大的粘连。 +^^|\break//将行尾字符变为它| +} +你可以重新定义行尾字符来产生一个控制序列 |\par|。下面三个宏定义演示了如 +何做: + +^^{空白,保留} +\xrdef{\obeywhitespace} +\csdisplay +\def\makeactive#1{\catcode`#1 = \active \ignorespaces} +{% The group delimits the text over which ^^M is active. + \makeactive\^^M % + \gdef\obeywhitespace{% + % Use \gdef so the definition survives the group. + \makeactive\^^M % + \let^^M = \newline % + \aftergroup\removebox % Kill extra paragraph at end. + \obeyspaces % + }% +} +\def\newline{\par\indent} +\def\removebox{\setbox0=\lastbox} + +| +一个要点是:|^^M| 必须被激活, 无论是\emph{定义} |\obeywhitespace| 还是\emph{使用}它的 +时候。 + +% In order to be able to get back to normal operation after verbatim text, +% you need to choose a character that +% appears rarely if at all in the verbatim text. This character serves as +% a temporary escape character. +% The vertical bar (|!||) is sometimes a good choice. +% With this choice, the macros: +% \csdisplay +% \def\verbatim{\par\begingroup\deactivate\obeywhitespace +% \catcode `\!| = 0 % Make !| the new escape character. +% } + +% \def\endverbatim{\endgroup\endpar} + +% \def\!|{!|} +% | +% will do the trick. Within the verbatim text, you can use a double +% vertical bar (|!|!||) to denote a single one, and you end the verbatim text +% with |!|endverbatim|. +为了在原文文本之后回到正常的操作模式,你需要选定一个原文文本中几乎不用 +的字符来作为临时的转义符。竖线(|!||)经常是一个好的选择。为此,需要宏定 +义: +\csdisplay +\def\verbatim{\par\begingroup\deactivate\obeywhitespace + \catcode `\!| = 0 % Make !| the new escape character. +} + +\def\endverbatim{\endgroup\endpar} + +\def\!|{!|} +| +在原文文本中,你可以用双竖线(|!|!||)表示单竖线, +并用 |!|endverbatim| 来结束原文部分。 + +% There are many variations on this technique: +% \ulist +% \li If a programming language has keywords, you can turn +% each keyword into a command that typesets +% that keyword in boldface. Each keyword in the input should then be +% preceded by the temporary escape character. +% \li If you have a character (again, let's assume it's the vertical bar) +% that +% \emph{never} appears in the verbatim text, you can make it active and +% cause it to end the verbatim text. The macro definitions then go like +% this: +% \csdisplay +% {\catcode `\!| = \active +% \gdef\verbatim{% +% \par\begingroup\deactivate\obeywhitespace +% \catcode `!| = \active +% \def !|{\endgroup\par}% +% }} +% | +% \endulist +这个技巧可以有很多变化: +\ulist +\li 如果一种编程语言有关键字,你可以把关键字变为一个命令,来产生粗体的 +关键字。这时候每一个关键字前面都要跟一个临时转义符。 +\li 如果有一个字符(假设是竖线)在原文文本中从来没有用到,你可以激活它 +并且用它结束原文部分。宏定义将类似于: +\csdisplay +{\catcode `\!| = \active +\gdef\verbatim{% + \par\begingroup\deactivate\obeywhitespace + \catcode `!| = \active + \def !|{\endgroup\par}% +}} +| +\endulist + +% The ideas presented here provide only a simple approach to typesetting +% computer programs. +% Verbatim reproduction is often not as revealing or easy to read as a version +% that uses typographical conventions to reflect the syntax +% and even the semantics of the program. +% If you'd like to pursue this subject further, we recommend the following book: + +% \smallskip{\narrower\noindent +% Baecker, Ronald M., and Marcus, Aaron, {\sl Human Factors +% and Typography for More Readable Programs}. Reading, Mass.: +% Addison-Wesley, 1990.\par} + +我们在这里只是提供了简单的办法来排版计算机程序。在反映程序的语法和语义 +环境方面,原文呈现经常不是一个清楚、易读的印刷习惯。如果你想在这个主题 +上走的更远,我们推荐阅读: + +\smallskip{\narrower\noindent +Baecker, Ronald M., and Marcus, Aaron, {\sl Human Factors +and Typography for More Readable Programs}. Reading, Mass.: +Addison-Wesley, 1990.\par} + +%\section Using outer macros +\section 使用外部宏 + +% \null +% ^^{forbidden control sequence}^^{incomplete conditional} +% If \TeX\ complains about a ``forbidden control sequence'', +% you've probably used an outer macro in a non-outer context +% \seeconcept{outer}. +% ^^{macros//outer} +% An outer macro is one whose definition is +% preceded by ^|\outer|. +% An outer macro can't be used in a macro argument, in a macro definition, +% in the preamble of an alignment, or in conditional +% text, i.e., text that will be expanded only when a conditional test +% has a particular outcome. +% ^^{alignments//outer control sequence in} +% Certain macros have been defined as outer because they aren't +% intended to be used in these contexts and such a use is probably an error. +% The only ways around this problem are to redefine the +% macro or to move its use to an acceptable context. + +\null +^^{禁止的控制序列}^^{不完整的条件句} +如果 \TeX{} 警告 ``forbidden control sequence'',很有可能你在非外部环境中 +使用了外部宏\seeconcept{外部的}。 +^^{宏//外部宏} +一个外部宏的定义总是以 ^|\outer| 开始. 外部宏不能被用于宏参量 +(argument)、宏定义、阵列的导言或者条件文本:只有当某个条件检 +验有特定的结果是才展开的文本。 +^^{阵列//其中的外部控制序列} +有些宏被以外部的方式定义是因为我们不想在这些环境里使用它们,一旦使用,必 +定出错。解决的办法就是重新定义宏或者移动它们到合适的环境里。 + +% Using an outer macro in an improper context can also cause +% \TeX\ to complain about a runaway situation or an incomplete conditional. +% The problem can be hard to diagnose because the error message +% gives no hint as to what it is. +% If you get such an error message, look around for a call on an outer macro. +% You may not always know that a particular macro is outer, but the +% command `^|\show||\a|' \ctsref{\show} +% will show you the definition of |\a| and also tell you +% if |\a| is outer. + +在不恰当的环境使用外部宏,还会引起 \TeX\ 警告:不受控制(runaway)的情 +形或者不完备的条件。因为错误消息提供不了线索,这些问题通常难于诊断。如 +果你得到了这样的错误消息,找找看哪里用了外部宏。可能你并不知道那些宏 +属于外部的,`^|\show||\a|'\ctsref{\show} 将显示 |\a| 的定义,并告之 |\a| +是否外部宏。 + + +%\section Changing category codes +\section 改变类别码 + +% \null +% \bix^^{category codes//changing} +% Sometimes it's useful to make local changes to the category code of a +% character in some part of your document. For instance, you might be +% typesetting a computer program +% ^^{computer programs, typesetting} +% or something else that uses normally active +% characters for special purposes. You'd then want to deactivate those +% characters so that \TeX\ will treat them as being like any other character. + +\null +\bix^^{类别码//改变类别码} +有时候需要在文档的部分内容里局部的改变类别码。例如,排版一个计算机程 +序 ^^{计算机程序,排版} 或者将激活的字符用于专门目的。你需 +要反激活那些字符来使 \TeX{} 可以像其他字符一样使用它们。 + +% If you make such a local change to the category code of a character, +% you may sometimes be dismayed to find that +% \TeX\ seems to be paying no attention whatsoever to your change. +% Two aspects of \TeX's behavior are likely causes: +如果局部地改变了类别码,你可能会悲哀地发现 \TeX{} 没有理会你的努力。通 +常,原因有两个: +% \olist +% \li \TeX\ determines the category code of an input character +% ^^{input characters} +% and attaches it to the character when it reads in the character. +% Let's say you read in a tilde (|~|) and later +% change the category code of tildes, +% but make the change +% before \TeX's stomach has actually processed that \emph{particular\/} +% tilde \seeconcept{\anatomy}. +% \TeX\ will still respond to that +% tilde using the category code as it was before the change. +% This difficulty typically arises +% when the tilde is part of an argument to a macro +% and the macro itself changes the category code of tilde. +\olist +\li \TeX{} 决定输入字符^^{输入字符}的类别码,读到字符的 +时候就贴上相应的类别码。假设读到波浪符(|~|),但是在 \TeX{} 的胃还 +没有实际消化\emph{那个}波浪符之前改变了它的类别码\seeconcept{\anatomy}。 +\TeX{} 将会继续认定原来贴上的类别码。这样的问题通常是因为波浪符是一个 +宏定义的一部分,而那个宏里改变了波浪符的类别码。 + + +% \li When \TeX\ is matching a call of a macro to the definition of that macro, +% it matches not just the characters in the parameter pattern but also their +% category codes. +% ^^{macros//arguments of} +% ^^{macros//parameters of} +% If the category code of a pattern character isn't equal to +% the category code of the same character in the call, \TeX\ won't consider +% the characters as matching. +% This effect can produce mysterious results because it +% \emph{looks} as though the pattern should match. +% For example, if you've defined a macro: +% \csdisplay +% \def\eurodate#1/#2/#3{#2.#1.#3} +% | +% then the slash character must have the same category code when you +% call |\eurodate| as it had when you defined |\eurodate|. +% \endolist +% If the problem arises because the troublesome character is an argument to +% a macro, then +% the usual cure is to redefine the macro as a pair +% of macros |\mstart| and |\mfinish|, where +% |\mstart| is to be called before the argument text +% and |\mfinish| is to be called after it. +% |\mstart| then sets up the category codes and |\mfinish| undoes the change, +% perhaps just by ending a group. +% \eix^^{category codes//changing} + +\li 当 \TeX{} 匹配一个宏引用和它的定义时,匹配的不仅仅是参数的字符而且包括他们的类别码。 +^^{宏//宏的参量} +^^{宏//宏的参数} +如果定义里字符的类别码与宏引用里的不同,\TeX{} 不会认为字符匹配正确。 +这样的效果匪夷所思,因为\emph{看起来}是匹配的。例如,如果你已经定义了宏: +\csdisplay +\def\eurodate#1/#2/#3{#2.#1.#3} +| +然后斜线字符在引用和定义 |\eurodate| 的时候必须有相同的类别码。 +\endolist +如果问题是因为嫌疑字符作为宏参量(argument),诊治方法是重新定义宏为一 +对宏 |\mstart| 和 |\mfinish|,分别在参量文本的前后应用。 +|\mstart| 设定类别码而 |\mfinish| 结束这一编组来取消变动。 +\eix^^{类别码//改变类别码} + +%\section Making macro files more readable +\section 使宏文档易读 +% \null +% \bix^^{macros//making readable} +% You can make a file of macros more readable by +% setting the category codes of space to $9$ (ignored +% character) and ^|\endlinechar| \ctsref{\endlinechar} to $-1$ +% at the beginning of the file. +% Then you can use spaces and ends of line freely in the +% macro definitions without getting +% unwanted spaces when you call the macros. +% The ignored characters won't generate spaces, but they'll still +% act as terminators for control sequences. +% If you really do want a space, you can still get it with the ^|\space| +% command \ctsref\space. + +\null +\bix^^{宏//使宏易读} +为了使得宏文档易读,你可以在文档开头设定空格的类别码为 $9$(忽略字符),^|\endlinechar| +\ctsref{\endlinechar}为 $-1$。然后,你就可以自由地使用空格和断行而不必 +担心产生多余的空白。忽略字符不会产生空白,但仍然决定控制序列定义。如果 +你真的需要一个空格,可以用 ^|\space| 命令\ctsref\space。 + +% Of course you'll need to restore the category codes of space and end of line +% to their normal values ($10$ and $5$, respectively) at the end of the file. +% You can do this either by enclosing the entire file in a group or by +% restoring the values explicitly. If you choose to enclose the file in a group, +% then you should also set ^|\globaldefs| to $1$ so that +% all the macro definitions will be global and thus visible outside of the group. +当然在文档最后,你需要恢复空格和行尾的类别码(分别是 $10$ 和 $5$):可 +以把整个文档封装在一个编组里,也可以明确地恢复其正常值。如果使用编组封 +装,你还需要设定 ^|\globaldefs| 为 $1$ 以使得整个宏定义是全局的,在编组之 +外可见。 + +% A miniature example of a macro file of this form is: + +% \csdisplay +% \catcode `\ = 9 \endlinechar = -1 + +% \def \makeblankbox #1 #2 { +% \hbox{\lower \dp0 \vbox{\hidehrule {#1} {#2} +% \kern -#1 % overlap rules +% \hbox to \wd0{\hidevrule {#1} {#2}% +% \raise \ht0 \vbox to #1{} % vrule height +% \lower \dp0 \vtop to #1{} % vrule depth +% \hfil \hidevrule {#2} {#1} } +% \kern -#1 \hidehrule {#2} {#1} } } + +% \def\hidehrule #1 #2 { +% \kern -#1 \hrule height#1 depth#2 \kern -#2 } +% \def\hidevrule #1 #2 { +% \kern -#1 {\dimen0 = #1 \advance \dimen0 by #2 +% \vrule width \dimen0 } \kern -#2 } + +% \catcode `\ = 10 \endlinechar = `\^^M +% | +% \noindent +% Without the changed category codes, +% these macros would have to be written much more compactly, using fewer +% spaces and more `|%|'s at the ends of lines. +% \eix^^{macros//making readable} + +下面是这种格式宏文档的一个小例子: + +\csdisplay +\catcode `\ = 9 \endlinechar = -1 + +\def \makeblankbox #1 #2 { + \hbox{\lower \dp0 \vbox{\hidehrule {#1} {#2} + \kern -#1 % overlap rules + \hbox to \wd0{\hidevrule {#1} {#2}% + \raise \ht0 \vbox to #1{} % vrule height + \lower \dp0 \vtop to #1{} % vrule depth + \hfil \hidevrule {#2} {#1} } + \kern -#1 \hidehrule {#2} {#1} } } + +\def\hidehrule #1 #2 { + \kern -#1 \hrule height#1 depth#2 \kern -#2 } +\def\hidevrule #1 #2 { + \kern -#1 {\dimen0 = #1 \advance \dimen0 by #2 + \vrule width \dimen0 } \kern -#2 } + +\catcode `\ = 10 \endlinechar = `\^^M +| +\noindent +不改变类别码的话,这些宏需要写的更加紧凑,使用很少的空格和行尾更多的 +`|%|'。 +\eix^^{宏//使宏易读} + +\ifoldeplain\else\ifcompletebook\else +\vskip4em{\sectionfonts\leftline{本章索引}} +\readindexfile{i} +\fi\fi + +%\endchapter\byebye +\endchapter\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/usebook.tex b/Master/texmf-dist/doc/plain/impatient-cn/usebook.tex new file mode 100644 index 00000000000..146044c0ffe --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/usebook.tex @@ -0,0 +1,413 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\chapter{Using this book} +\chapter{使用本书} + +\chapterdef{usebook} + +%This book is a do-it-yourself guide and handbook for \TeX. +%Here in this section we tell you how to use the book to maximum advantage. + +本书是一本介绍 \TeX{} 的自学手册。 +在本章中, 我们将指导你如何更好地使用本书。 + +% We recommend that you first either read or skim in sequence Sections +% \chapternum{usebook} through \chapternum{examples}, +% which tell you what you need to know in order to get started using \TeX. +% If you've already had experience using \TeX, it will still be helpful +% to know what kinds of information are in these sections of the book. +% Sections~\chapternum{concepts}--\chapternum{tips}, which +% occupy most of +% the rest of the book, are designed to be accessed randomly. +% Nevertheless, if you're the kind of person who likes to read reference manuals, +% you'll find that it \emph{is} possible to proceed sequentially if you're +% willing to take a lot of detours at first. + +我们建议你先阅读或浏览 \chapternum{usebook} 到 \chapternum{examples}章, +这些地方会告诉你如何上手 \TeX。 +如果你已经使用过 \TeX, 这些地方仍会值得一看, +至少你可以知道这些章节介绍了些什么内容。 +%本书的重头戏是\chapternum{concepts}--\chapternum{tips}章, +%这些章节可以任意选择地进行阅读. +其余部分,主要是\chapternum{concepts}--\chapternum{tips}章, +可以有选择地翻阅。 +当然, 如果你是一个很喜爱阅读参考手册的人, +你会发现从头到尾地把这本书阅读一遍\emph{是}完全可行的, +当然你会为此在开头学习时绕些弯路。 + +% In \chapterref{usingtex}, ``Using \TeX'', +% we explain how to produce a \TeX\ document from a +% \TeX{} input file. +% We also describe the conventions for preparing that input file, +% explain a little about how \TeX{} works, and tell you about additional +% resources that are available. +% Reading this section will help you understand +% the examples in the next section. + +在\chapterref{usingtex},``使用 \TeX'', +我们解释如何把一个 \TeX{} 输入文件转为一个 \TeX{} 文档。 +%我们还讲述了准备这个输入文件的惯例, +我们还讲述了准备输入文件的一些习惯, +简要地解释了 \TeX{} 是如何工作的, 告诉你可以获取的其它资源信息。 +阅读了这个章节, 会有助于你理解下一个章节的例子。 + +% \chapterref{examples}, ``Examples'', +% contains a sequence of +% examples that illustrate the use of \TeX. +% Each example consists of a page of output +% together with the input that we used to create it. +% These examples will orient you and help you +% locate the more detailed material that you'll need as you go. +% By seeing which commands are used in the input, you'll know +% where to look for more detailed information on how to achieve +% the effects shown in the output. +% The +% examples can also serve as models for simple documents, although we must +% caution you that +% because we've tried to pack a variety of \TeX\ commands into a small +% number of pages, +% the examples are not necessarily illustrations of good or complete +% document~design. + +\chapterref{examples}, ``例子'', +包括了一系列的例子来描述 \TeX{} 的功用. +每个例子包括了一页的输出内容, 也包括了输出该页内容所输入的源代码. +这些例子会指导你且帮助你找到你所需要的更详细的资料. +通过观察输入使用了什么命令, +你会知道在哪里能够找到输出效果所使用方法的更详细的信息. +这些例子也可以作为简单的文档的模版, 当然我们必需提醒你, +因为我们尝试把很多的 \TeX{} 命令放在这几页纸中, +这些例子不可能描述好的或者完整的文档设计. + +% As you read the explanation of a command, you may encounter +% some unfamiliar technical terms. +% In \chapterref{concepts}, ``Concepts'', +% we define and explain these terms. +% We also discuss other topics that aren't covered +% elsewhere in the book. +% The inside back cover of the book contains a list of all the +% concepts and the pages where they are described. +% We suggest that you make a copy of this list and keep it nearby +% so that you'll be able to identify and look up an unfamiliar +% concept immediately. + +当你看这些命令的解释时, 你会遇到很多不熟悉的技术术语. +在 \chapterref{concepts}, ``概念''中, 我们定义并解释了这些术语. +我们同时还讨论了本书其它地方没有涉及到的话题. +本书书背内页列出了所有的概念名称以及它们所出现的位置. +我们建议你把书背内页复印下来, 放在旁边, +这样你就能在遇到不熟悉的概念时马上查找到它们. + +% \TeX's commands are its primary vocabulary, +% and the largest part of this book is +% devoted to explaining them. In Sections~\chapternum{paras} +% through~\chapternum{general} we describe the commands. +% You'll find general information about the command descriptions +% on \xrefpg{cmddesc}. +% The command descriptions are arranged +% functionally, rather like a thesaurus, so if you know what you want to +% do but you don't know which command does it for you, you can use the +% table of contents to guide you to the right group of commands. +% Commands that we think are both particularly useful and easy to understand +% are indicated with a pointing~hand~(\hand). + +\TeX{} 的命令是它的主要词汇, 本书最主要的部分就是用来解释这些命令. +从第~\chapternum{paras}~章到第~\chapternum{general}~章, 我们解释了这些命令. +你可以在\xrefpg{cmddesc}找到命令描述的描述惯例. +这些命令根据功能分门别类, 而不是按字典顺序, +所以如果你知道你想做什么, 但不知那该用什么命令, +你可以使用目录来引导你找到正确的命令组. +我们给我们认为常用且容易理解的命令标上了一个手形符号~(\hand). + +%\chapterref{capsule}, ``Capsule summary of commands'', is a +%specialized index that complements the more complete descriptions +%in Sections~\chapternum{paras}--\chapternum{general}. +%It lists \TeX's commands +%alphabetically, with a brief explanation of each command +%and a reference to the page +%where it is described more completely. The capsule summary +%will help you when you just want a quick reminder of what a command +%does. +\chapterref{capsule}为``命令速查表'',这个专门的索引与% +第~\chapternum{paras}--\chapternum{general}~章的更完整描述相辅相成。 +在这一章中按字母顺序列出了各个 \TeX\ 命令及其简要解释, +并给出该命令的详细描述所在的页码。 +此速查表可以让你快速知道某个命令的作用。 + +%\TeX{} is a complex program that occasionally works its will in +%mysterious ways. +%In \chapterref{tips}, ``Tips and techniques'', +%we provide advice on solving a variety of specific +%problems that you may encounter from time to time. +%And if you're stumped by +%\TeX's error messages, you'll find succor in \chapterref{errors}, +%``Making sense of error messages''. +\TeX{} 是个复杂的程序,偶尔地会以诡异的方式工作。 +在\chapterref{tips},``建议和技巧''中, +对一系列你时不时会遇到的特定的问题,我们提供了一些建议。 +而若你被 \TeX\ 的错误信息难住了, +\chapterref{errors},``理解错误信息''将给你提供帮助。 + +%The gray tabs on the side of the book will help you locate parts of the +%book quickly. They divide the book into the following major parts: +%\olist +%\li general explanations and examples +%\li concepts +%\li descriptions of commands (five shorter tabs) +%\li advice, error messages, and the |eplain.tex| macros +%\li capsule summary of commands +%\li index +%\endolist +页边的灰色标签可以帮你快速定位到本书各个部分。 +它们将本书划分为下面几个主要部分: +\olist +\li 总体的说明和例子 +\li 概念 +\li 命令描述(五个短标签) +\li 建议,错误信息和 |eplain.tex| 宏集 +\li 命令速查表 +\li 索引 +\endolist + +%In many places we have provided page references to +%^{\texbook} (see \xrefpg{resources} for a citation). +%These references apply to the seventeenth edition of \texbook. +%For other editions, some references may be off by a page or two. +在很多地方我们都给出了到^{\texbook} 的页码索引 +(要引用该书可以见\xrefpg{resources})。 +这些索引适用于\texbook\ 第十七次印刷版。 +对于其它版本,有的索引可能相差一两页。 + + +%\section Syntactic conventions +\section 语法约定 + +%In any book about preparing input for a computer, +%it's necessary to indicate clearly the literal characters that should be typed +%and to distinguish those characters from the explanatory text. +%We use the Computer Modern typewriter font for {\tt literal input +%like this}, and also for the names of \TeX{} commands. +%When there's any possibility of confusion, we enclose \TeX{} +%input in single quotation marks, `{\tt like this}'. +%However, we occasionally use parentheses when we're indicating single +%characters such as (|`|) (you can see why). +在任何涉及到为计算机准备输入的书籍中, +都得明确区分哪些字符是需要逐字输入的,而哪些字符属于解释性文本。 +我们用计算机现代打字机字体显示文字输入,比如{\tt literal input}, +以及\TeX\ 命令名。在可能导致混淆的地方, +我们将 \TeX\ 命令用单引号围起来,比如`{\tt like this}'。 +然而,在表示单个字符时,我们偶尔也会用括号将它围起来, +比如(|`|)(其原因你容易明白)。 + +%For the sake of your eyes we usually just put spaces +%where you should put spaces. In some places where +%we need to emphasize the space, however, +%we use a `\visiblespace' character +%{\catcode `\ =\other\pix^^| |}% +%to indicate it. +%Naturally enough, this character is called a \emph{visible space}. +%\pix^^{spaces//visible} +通常我们按照你输入空格的方式显示空格,以免让你看花眼。 +但为了强调某些空格,我们用`\visiblespace'字符表示它。 +\ifoldeplain{\catcode `\ =\other\pix^^| |}\fi% +这个字符很自然地被称为\emph{可见空格}. +\pix^^{空格//可见空格} + + +%\section Descriptions of the commands +\section 命令描述 + +\xrdef{cmddesc} +%Sections~\chapternum{paras}--\chapternum{general} contain +%a description of what nearly every \TeX{} command does. ^^{commands} +%Both the primitive commands ^^{primitive//command} +%and those of ^{\plainTeX} are covered. +%The primitive commands are those built into the \TeX{} computer program, while +%the \plainTeX{} commands are defined in a standard file of +%auxiliary definitions (see \xref\plainTeX). +%The only commands we've omitted are those that are used purely locally +%in the definition of \plainTeX\ (\knuth{Appendix~B}). +%The commands are organized as follows: +第~\chapternum{paras}--\chapternum{general}~章描述了几乎每个\TeX\ 命令, +^^{命令}包括原始命令^^{原始的//原始命令}和 ^{\plainTeX} 命令。 +原始命令是那些内建于 \TeX\ 程序中的命令, +而 \plainTeX{} 命令是那些在标准辅助定义文件中定义的命令(见\xref\plainTeX )。 +我们仅仅忽略那些只在\plainTeX\ (\knuth{附录~B})定义中用到的局部命令。 +这些命令分为如下几部分: +%\ulist\compact +%\li ``Commands for composing paragraphs'', \chapterref{paras}, +%deal with characters, words, lines, and entire paragraphs. +%\li ``Commands for composing pages'', \chapterref{pages}, +%deal with pages, their components, and the output routine. +%\li ``Commands for horizontal and vertical modes'', \chapterref{hvmodes}, +%have corresponding or identical +%forms for both horizontal modes (paragraphs and hboxes) and vertical +%modes (pages and vboxes). +%These commands provide boxes, spaces, rules, leaders, +%and alignments. +%\li ``Commands for composing math formulas'', \chapterref{math}, +%provide capabilities for constructing math formulas. +%\li ``Commands for general operations'', \chapterref{general}, +%provide +%\TeX's programming features and +%everything else that doesn't fit into any of the other sections. +%\endulist +\ulist\compact +\li \chapterref{paras},``组段命令'',介绍字符、单词、文本行和整个段落。 +\li \chapterref{pages},``组页命令'',介绍页面及其组成部分,以及输出例行程序。 +\li \chapterref{hvmodes},``水平和竖直模式命令'', +介绍水平模式(段落和水平盒子)和竖直模式(页面和竖直盒子)中对应或等同的命令。 +这些命令提供了盒子、间隔、标线、指引线和对齐。 +\li \chapterref{math},``数学公式命令'',介绍构造数学公式的命令。 +\li \chapterref{general},``一般操作命令'', +介绍 \TeX\ 的编程功能以及不适合放在其他部分的命令。 +\endulist +%You should think of these categories as being suggestive rather than +%rigorous, because the commands don't really fit neatly into these +%(or any other) categories. +你应该将这些分类视为提示性的而不是严格的, +因为把命令都归入这些(或者其他)类别并不完全合适。 + +%Within each section, the descriptions of the commands are organized +%by function. When several commands are closely related, they are described as +%a group; otherwise, each command has its own explanation. +%The description of each command +%includes one or more examples and the output +%produced by each example when examples are appropriate (for +%some commands they aren't). +%When you are looking at a subsection containing functionally related +%commands, be sure to check the end of a subsection for a ``see also'' +%item that refers you to related commands that are described elsewhere. +各章的命令描述按照其功能组织。 +当几个命令密切相关时,它们合起来介绍;否则,每个命令分别解释。 +命令的描述中包含一个或多个例子,可能还有例子的输出% +(对有些例子这并不可行)。 +若某节内容涉及到功能上相关的其他命令时, +务必看看该节末尾的``参见''项, +那里给出了其它地方介绍到的相关命令所在的页码。 + +%Some commands are closely related to certain concepts. +%For instance, the |\halign| and |\valign| commands are related to +%``alignment'', the |\def| +%command is related to ``macro'', +%and the |\hbox| and |\vbox| commands are related to ``box''. +%In these cases we've usually given a bare-bones des\-crip\-tion of the +%commands themselves and explained the underlying ideas +%in the concept. +有些命令与特定的概念密切相关。 +例如,|\halign| 和 |\valign| 命令与``对齐''的概念相关, +|\def| 命令与``宏''相关, +而 |\hbox| 和 |\vbox| 命令与``盒子''相关。 +对此种情形,在命令这里我们通常只给出粗略介绍, +而将对基本原理的解释放在相关概念中。 + +%The examples associated with the commands have been typeset with +%^|\parindent|, the paragraph indentation, set to zero so that +%paragraphs are normally unindented. +%This convention makes the examples easier to read. +%In those examples where the paragraph indentation is essential, +%we've set it explicitly to a nonzero value. +命令相关的例子在排版时设定了段落缩进 ^|\parindent| 为零, +因而其中段落一般是不缩进的;这使得例子更加容易阅读。 +对有些例子段落缩进是必不可少的,我们显式设置缩进为非零值。 + +%The pointing hand in front of a command or a group of commands indicates +%that we judged this command or group of commands to be particularly useful +%and easy to understand. +在一个或一组命令前面的手形符号, +表示我们认为这个或这组命令是常用且容易理解的。 + +%Many commands expect ^{arguments} of one kind or another +%(\xref{arg1}). The arguments of +%a command give \TeX{} additional information that it needs in order to +%carry out the command. Each argument is indicated by an italicized +%term in angle brackets that indicates what kind of argument it~is: +某些命令需要特定类型的参量(\xref{arg1})。 +命令的参量提供 \TeX{} 执行该命令时所需的额外信息。 +每个参量都放在尖括号中,并用意大利体标明它的类型: + +%\display{% +%\halign{\<#>\quad&#\hfil\cr +%argument&a single token or some text enclosed in braces\cr +%charcode&a character code, i.e., an integer between $0$ and $255$\cr +%dimen&a dimension, i.e., a length\cr +%glue&glue (with optional stretch and shrink)\cr +%number&an optionally signed integer (whole number)\cr +%register&a register number between $0$ and $255$\cr +%}} +%^^{\<dimen>} +%^^{\<argument>} +%^^{\<charcode>} +%^^{\<glue>} +%^^{\<number>} +%^^{\<register>} +\display{% +\halign{\<#>\quad&#\hfil\cr +argument&单个记号或者放在花括号中的一些文本\cr +charcode&字符码,即在$0$到$255$之间的整数\cr +dimen&尺寸,即长度\cr +glue&粘连(有可选的伸展值和收缩值)\cr +number&可带符号的整型值(整数)\cr +register&寄存器编号,在$0$到$255$之间\cr +}} +^^{\<dimen>} +^^{\<argument>} +^^{\<charcode>} +^^{\<glue>} +^^{\<number>} +^^{\<register>} + +% \noindent +% All of these terms are explained in more detail in \chapterref{concepts}. +% In addition, we sometimes use terms such as \<token list> that are either +% self-explanatory or explained in the description of the command. +% Some commands have special formats that require either braces or +% particular words. +% These are set in the same bold font that we use +% for the command headings. + +\noindent +所有这些术语会在\chapterref{concepts}中进行详述. +除了这些以外, 我们会使用一些不言自明的或者在后文进行讲述的术语, 比如 \<token list>. +有些命令有自己独特的格式, 比如需要括孤或者特定的字词. +它们会使用和命令标题相同的黑体标出. + +% Some commands are parameters (\xref{introparms}) or table entries. +% ^^{parameters//as commands} +% This is indicated in the command's listing. +% You can either use a parameter as an argument or assign a value to it. +% The same holds for table entries. +% We use the term ``parameter'' to refer to entities such as |\pageno| +% that are actually registers but behave just like parameters. +% ^^{registers//parameters as} + +有些命令是参数 (\xref{introparms}) 或表格项. +^^{参数//作为命令} +这会在命令的列表中指示出来. +你可以将这个参数作为一个命令的参量,也可以给它赋值。 +表格项也是如此。 +我们使用``参数''这个术语来指代这些条目, 比如本是寄存器但可当参数使用的 |\pageno|. +^^{寄存器//作为参数} + + +\section 翻译说明 + +本书由 CTeX 论坛上多人翻译而成,包括 luoyi,yulewang,zoho 和 zpxing。 +中文翻译的最新源码可以在这里看到: +\csdisplay +https://bitbucket.org/zohooo/impatient +| +考虑到此书需要和 \texbook\ 一起阅读, +书中概念的翻译尽量保持和 \texbook\ 的翻译一致或接近。 + +\ifoldeplain\else\ifcompletebook\else +\vskip4em{\sectionfonts\leftline{本章索引}} +\readindexfile{i} +\fi\fi + +\endchapter +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/usermacs.tex b/Master/texmf-dist/doc/plain/impatient-cn/usermacs.tex new file mode 100644 index 00000000000..1ee49729615 --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/usermacs.tex @@ -0,0 +1,1455 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +%\chapter{A compendium \linebreak of useful macros} +\chapter{实用宏集概述} + +\chapterdef{eplain} + +%This section describes |eplain.tex|, a collection of macros and other +%definitions that extend plain \TeX. +%\bix^^|eplain.tex| +%The descriptions of the various macros explain their purposes, +%but usually do not explain how they +%work or provide explicit details on +%how to use them. That information is contained in the source files for +%|eplain.tex| and in the documentation that comes with it. +%See \headcit{Resources}{resources} for how to obtain |eplain.tex|. +这一章描述 |eplain.tex|,一组用于扩展 plain \TeX\ 的宏和其他定义。 +\bix^^|eplain.tex| +对各种宏的描述解释了它们的目的,但通常不解释它们的工作原理或给出如何使用它们的详情。 +那些信息包含在 |eplain.tex| 源码文件以及它的文档中。 +在\headcit{资源}{resources}中介绍了获取 |eplain.tex| 的方法。 + + +%\section{Preliminaries} +\section{预备定义} + +%We start with some macros for changing category codes and convenient +%definitions for two of the commonly used ones. +%^^{category codes//useful definitions for} +我们先介绍几个修改类别码及定义两种常用类别码的宏。 +^^{类别码//有用的类别码定义} + +%\pix^^|\makeactive| +%\pix^^|\letter| +%\pix^^|\other| +%\pix^^|\uncatcodespecials| +\pix^^|\makeactive| +\pix^^|\letter| +\pix^^|\other| +\pix^^|\uncatcodespecials| + +\csdisplay +\def\makeactive#1{\catcode`#1 = \active \ignorespaces}% +\chardef\letter = 11 \chardef\other = 12 +\def\uncatcodespecials{% + \def\do##1{\catcode`##1 = \other}% + \dospecials}% Defined in plain. +| + +%In order to define `|^^M|' as an active character, you need to encase +%the definition in a group and invoke some extra machinery. +%\ttidxref{^^M} +%The \pix^|\letreturn| macro lets you define `|^^M|' without that +%extra machinery (which you can see in the definition below). +为了将 `|^^M|' 定义为活动字符,你需要将定义放在编组中,并借助某些额外机制。 +\ttidxref{^^M} +\pix^|\letreturn| 宏让你无需额外机制就可以定义 `|^^M|'(它的定义在下面可以看到)。 + +\csdisplay +{\makeactive\^^M \long\gdef\letreturn#1{\let^^M = #1}}% +| + +%These macros consume one, two, or three arguments. +这些宏用于吸收一个、两个或三个参量。 + +%\pix^^|\gobble| +%\pix^^|\gobbletwo| +%\pix^^|\gobblethree| +%\csdisplay +%\def\gobble#1{}\def\gobbletwo#1#2{}% +%\def\gobblethree#1#2#3{}% +%| +\pix^^|\gobble| +\pix^^|\gobbletwo| +\pix^^|\gobblethree| +\csdisplay +\def\gobble#1{}\def\gobbletwo#1#2{}% +\def\gobblethree#1#2#3{}% +| + +%Now we establish some conventions for reading the rest of the file. +%Within the file we allow ``private'' control sequences that contain +%`|@|' in their names. +%These control sequences aren't accessible outside of this file (unless +%you change the category code of `|@|' again). +%\xrdef{eplainconv} +现在我们建立一些惯例,用于读取这个文件的其他部分。 +在这个文件中我们允许名称带有 `|@|' 的``私有''控制序列。 +这些控制序列在这个文件之外无法使用(除非你再次修改 `|@|' 的类别码)。 +\xrdef{eplainconv} + +\csdisplay +\catcode`@ = \letter % Allow control sequences with @. +\let\@plainwlog = \wlog % Don't log register allocations. +\let\wlog = \gobble +\newlinechar = `^^J +| + +%The next two macros provide convenient forms of diagnostic output. +%\pix^|\loggingall| turns on all tracing, but causes the trace +%output to appear only in the log file and not at your terminal. +%\pix^|\tracingboxes| causes boxes to be displayed completely when +%they're traced. (\TeX\ normally shows only three levels of boxing +%and five items within each box.) +接下来两个宏提供了诊断输出的便捷方式。 +\pix^|\loggingall| 打开所有追踪, +但让追踪输出仅写在日志文件中,而不在终端上显示。 +\pix^|\tracingboxes| 使得盒子被追踪时其内容完全显示。% +(\TeX\ 通常只显示嵌套到三层的盒子,每个盒子显示五个项目。) + +\csdisplay +\def\loggingall{\tracingcommands\tw@\tracingstats\tw@ + \tracingpages\@ne\tracingoutput\@ne + \tracinglostchars\@ne\tracingmacros\tw@ + \tracingparagraphs\@ne\tracingrestores\@ne + \showboxbreadth\maxdimen\showboxdepth\maxdimen}% +\def\tracingboxes{\showboxbreadth = \maxdimen + \showboxdepth = \maxdimen}% +| + +%The default thickness of rules is $0.4$\pt. +%You can produce rules of any default thickness you choose by redefining +%|\vruledefaultwidth|, |\hruledefaultheight|, and |\hruledefaultdepth| +%and then using +%\pix^^|\ehrule| +%|\eh!-rule| +%and \pix^|\evrule| +%instead of |\hrule| and |\vrule|. (The `e' stands for +%``eplain''.) +%^^{rules//thickness of} +%If you give an explicit +%dimension (e.g., |\ehrule height 16pt|), \TeX\ will use it. +标线的默认厚度为 $0.4$\pt 。 +要生成默认厚度为任何值的标线, +你可以重新定义 |\vruledefaultwidth|、|\hruledefaultheight| 及 |\hrule!-defaultdepth|, +并将 |\hrule| 和 |\vrule| 换为 \pix^|\ehrule| 和 \pix^|\evrule|。% +(名称中的 `e' 代表 ``eplain''。)% +^^{标线//标线的厚度} +如果你显式给出尺寸(比如 |\ehrule height 16pt|),\TeX\ 将使用它。 + +\csdisplay +\newdimen\hruledefaultheight \hruledefaultheight = 0.4pt +\newdimen\hruledefaultdepth \hruledefaultdepth = 0.0pt +\newdimen\vruledefaultwidth \vruledefaultwidth = 0.4pt +\def\ehrule{\hrule height\hruledefaultheight + depth\hruledefaultdepth}% +\def\evrule{\vrule width\vruledefaultwidth}% +| + +%The |\%| convention for writing a `|%|' character doesn't work when you +%want to include that character in the token list of |\write|. +%^^|\write//writing \b\tt\%\e\ with| +%^^|%//writing out| +%You can use ^|\percentchar| to achieve this. +%We also redefine ^|^^L| to be nonouter so that you can use it in a +%macro definition or argument. +|\%| 通常用于写出 `|%|' 字符,但它无法包含在 |\write| 的记号列中。 +^^|\write//用它写出 \b\tt\%\e\| +%^^|%//写出该字符| +你可以用 ^|\percentchar| 达到此目的。 +我们还将 ^|^^L| 重新定义为非外部宏,因此你可以在宏定义或者参量中使用它。 + +\csdisplay +{\catcode`\% = \other \gdef\percentchar{%}}% + \def^^L{\par +}% +| + +%\pix^|\tokstostring| converts its argument into a list of ^{character +%tokens}. +%It uses only expansions that are handled in \TeX's gullet. +%This property is necessary +%for it to work with |\edef|. It is used by the cross-referencing +%macros (\xref{xrefs}). +\pix^|\tokstostring| 将它的参量转换为一列^{字符记号}。 +它仅用到在 \TeX\ 的食道中处理的展开。 +此特性是和 |\edef| 一起使用时所必需的。它用于宏的交叉引用(\xref{xrefs})。 + +%In order to split the argument up at spaces, we have to use two +%subsidiary macros. |\@ttsA| finds the spaces, and |\@ttsB| handles a +%token sequence without any spaces. Each space is replaced by the +%expansion of \pix^|\spacesub|. +为了将参量在空格处分开,我们要用到两个子宏。 +|\@ttsA| 用于寻找空格,而 |\@ttsB| 用于处理不带空格的控制序列。 +每个空格都被替换为 \pix^|\spacesub| 的展开。 + +\csdisplay +\def\tokstostring#1{\@ttsA#1 \ttsmarkA}% +\def\@ttsA#1 #2\ttsmarkA{\ifempty{#1}\else + \@ttsB #1\@ttsmarkB + \ifempty{#2}\else + \spacesub\@ttsA#2\ttsmarkA\fi\fi}% +\def\@ttsB#1{\ifx #1\@ttsmarkB\else + \string #1% + \expandafter\@ttsB\fi}% +\def\@ttsmarkB{\@ttsmarkB}% should never be expanded +\def\spacesub{+}% +| + +%\noindent +%\pix^|\ifempty| tests if its argument is empty. +\noindent +\pix^|\ifempty| 检测它的参量是否为空。 + +\csdisplay +\def\ifempty#1{\@ifempty #1\@emptymarkA\@emptymarkB}% +\def\@ifempty#1#2\@emptymarkB{\ifx #1\@emptymarkA}% +\def\@emptymarkA{\@emptymarkA}% +| + +%The ^|\for| macro implements a \TeX\ version of the ^{for loop} in +%traditional programming languages. These macros come directly from +%\LaTeX. +^|\for| 宏实现了其他传统编程语言中的^{for循环}的 \TeX\ 版本。 +这些宏直接取自 \LaTeX 。 + +\csdisplay +\def\for#1:=#2\do#3{\edef\@fortmp{#2}% + \ifx\@fortmp\empty \else + \expandafter\@forloop#2,\@nil,\@nil\@@#1{#3}\fi}% +\def\@nnil{\@nil}% +\def\@fornoop#1\@@#2#3{}% +\def\@forloop#1,#2,#3\@@#4#5{\def#4{#1}\ifx #4\@nnil + \else #5\def#4{#2} ifx #4\@nnil \else + #5\@iforloop #3\@@#4{#5}\fi\fi}% +\def\@iforloop#1,#2\@@#3#4{\def#3{#1}\ifx #3\@nnil + \let\@nextwhile=\@fornoop \else #4\relax + \let\@nextwhile=\@iforloop\fi + \@nextwhile#2\@@#3{#4}}% +| + +%\pix^|\obeywhitespace| is useful for reproducing line breaks, blank lines, +%and spaces in your input. It combines the effects of |\obey!-lines| and +%|\obey!-spaces|, +%^^|\obeylines| ^^|\obeyspaces| +%and also causes spaces at the start of a line to +%be printed. Tab characters are not affected by this; they still produce +%normal glue. +%\xrdef{ewhitesp} +%^^{space characters} +%^^|\fontdimen| +%^^|\font| +%^^|\letreturn| +\pix^|\obeywhitespace| 用于重新生成你的输入中的换行、空行和空格。 +它结合了|\obey!-lines| 和 |\obey!-spaces| 的效果, +^^|\obeylines| ^^|\obeyspaces| +并把行首的空格也打印出来。制表符不受它影响;它们仍然生成正常的粘连。 +\xrdef{ewhitesp} +^^{空格符} +^^|\fontdimen| +^^|\font| +^^|\letreturn| + +\csdisplay +\def\alwaysspace{\hglue\fontdimen2\the\font \relax}% +{\makeactive\^^M \makeactive\ % +\gdef\obeywhitespace{% +\makeactive\^^M\def^^M{\par\indent}% +\aftergroup\@removebox% Kill extra paragraph at end. +\makeactive\ \let =\alwaysspace}}% +\def\@removebox{\setbox0=\lastbox} +| + +%\pix^|\frac| is a good way to print fractions in text when you don't +%want to use |\over| and +%``1/2'' just doesn't look right. This macro is the answer to +%\knuth{Exercise~11.6}.^^{fractions//slashed form} +当你不想用 |\over|,而 ``1/2'' 看来又不够好时, +你最好用 \pix^|\frac| 在正文中打印分式。 +这个宏是\knuth{练习~11.6}的答案。^^{分式//斜线形式} + +\csdisplay +\def\frac#1/#2{\leavevmode + \kern.1em \raise .5ex \hbox{\the\scriptfont0 #1}% + \kern-.1em $/$% + \kern-.15em \lower .25ex \hbox{\the\scriptfont0 #2}}% +| + +%The following macros produce logos that are useful in the \TeX\ world. +%The \AMSTeX\ logo is from \knuth{page~420}. The \LaTeX\ logo is +%slightly modified from the one in |latex.tex| (we use a different font +%for the `A'); similarly, the \BibTeX\ logo uses |\sevenrm| instead of a +%true caps-and-small-caps font. The |.mf| source file for the \MF\ logo +%is given in the \MF\ manual: +%\smallskip +%{\narrower\noindent +%^{Knuth, Donald E.},{\sl The {\logosl METAFONT}book}. +% Reading, Mass.: Addison-Wesley, 1986.\par} +%\smallskip +%\pix^^|\LaTeX| +%\pix^^|\AMSTeX| +%\pix^^|\BibTeX| +%\pix^^|\MF| +下面这些宏生成 \TeX\ 圈中常用的标识。 +\AMSTeX\ 标识取自 \knuth{第~420~页}。 +\LaTeX\ 标识取自 |latex.tex| 并稍作修改(我们修改了 `A' 的字体); +类似地,\BibTeX\ 标识用 |\sevenrm| 字体代替真正的小型大写字体。 +\MF\ 标识的 |.mf| 源文件出现在 \MF\ 手册中: +\smallskip +{\narrower\noindent +^{Knuth, Donald E.},{\sl The {\logosl METAFONT}book}. + Reading, Mass.: Addison-Wesley, 1986.\par} +\smallskip +\pix^^|\LaTeX| +\pix^^|\AMSTeX| +\pix^^|\BibTeX| +\pix^^|\MF| + +\csdisplay +\def\LaTeX{L\kern-.26em \raise.6ex\hbox{\fiverm A}% + \kern-.15em TeX}% +\def\AMSTeX{$\cal A\kern-.1667em \lower.5ex\hbox{$\cal M$}% + \kern-.125em S$-\TeX}% +\def\BibTeX{{\rm B\kern-.05em {\sevenrm I\kern-.025em B}% + \kern-.08em T\kern-.1667em \lower.7ex\hbox{E}% + \kern-.125emX}}% +\font\mflogo = logo10 +\def\MF{{\mflogo META}{\tenrm \-}{\mflogo FONT}}% +| + +%The next two macros produce boxes. \pix^|\blackbox| produces a ``square +%bullet'', used in the list macros (\xref{listmacs}). +%\pix^|\makeblankbox| (from \knuth{page~311}) produces an unfilled +%rectangle, with the thickness of the border rules given by the +%arguments. +接下来的两个宏用于生成盒子。 +\pix^|\blackbox| 生成一个方块,它用在列表宏中(\xref{listmacs})。 +\pix^|\makeblankbox|(取自\knuth{第~311~页})生成一个空心矩形, +它的边框厚度由参量指定。 + +\csdisplay +\def\blackbox{\vrule height .8ex width .6ex depth -.2ex}% +\def\makeblankbox#1#2{% + \hbox{\lower\dp0\vbox{\hidehrule{#1}{#2}% + \kern -#1% overlap rules + \hbox to \wd0{\hidevrule{#1}{#2}% + \raise\ht0\vbox to #1{}% vrule height + \lower\dp0\vtop to #1{}% vrule depth + \hfil\hidevrule{#2}{#1}}% + \kern-#1\hidehrule{#2}{#1}}}}% +\def\hidehrule#1#2{\kern-#1\hrule height#1 depth#2 + \kern-#2}% +\def\hidevrule#1#2{\kern-#1{\dimen0 = #1 + \advance\dimen0 by #2 \vrule width\dimen0}\kern-#2}% +| + +%\pix^|\numbername| produces the written-out form of a number. (If the +%number is greater than ten, the macro just reproduces the numerals +%of its argument.) +\pix^|\numbername| 从数字生成其书面名称% +(若数字大于十,这个宏仅重新生成参量的数值。) + +\csdisplay +\def\numbername#1{\ifcase#1% + zero\or one\or two\or three\or four\or five% + \or six\or seven\or eight\or nine\or ten\or #1\fi}% +| + +%\pix^|\testfileexistence| determines whether a file |\jobname.#1| is +%non\-empty and sets |\if!-fileexists| appropriately. +%^^{files//testing for existence of} +%The file name in the argument need not end in a space token since +%the macro provides the space token. +\pix^|\testfileexistence| 判定文件 |\jobname.#1| 是否非空, +并相应地设定 |\if!-fileexists| 的值。 +^^{文件//检测文件是否存在} +参量中的文件名无需以空格记号结尾,因为这个宏已经提供了空格记号。 + +\csdisplay +\newif\iffileexists +\def\testfileexistence#1{\begingroup + \immediate\openin0 = \jobname.#1\space + \ifeof 0\global\fileexistsfalse + \else \global\fileexiststrue\fi + \immediate\closein0 + \endgroup}% +| + + +%\section Displays +\section 陈列公式 + +%By default, \TeX\ centers displayed material (the material between +%|$$|'s). ^^{displays, formatting} \pix^|\leftdisplays| causes displays +%to be left-justified by default. You can return to centered displays +%with \pix^|\centereddisplays|. +\TeX\ 默认将陈列公式(放在 |$$| 之间的公式)居中显示。 +^^{陈列公式//显示形式}\pix^|\leftdisplays| 让陈列公式默认为左对齐显示。 +你也可以用 \pix^|\centereddisplays| 命令恢复居中显示。 + +%The macros here are more general than they need to be just for doing +%left-justified displays. For every display, +%\pix^|\ifeqno| will be true if an |\eqno| occurred in the display. +%\pix^|\ifleqno| will be true if an |\leqno| occurred. If either +%kind of equation number occurred, \pix^|\eqn| produces the text of the +%equation number. \pix^|\eq| always produces the text of the +%equation itself. +这些宏提供让陈列公式左对齐显示之外的更多功能。 +对每个陈列公式,若 |\eqno| 存在则 \pix^|\ifeqno| 为真, +若 |\leqno| 存在则 \pix^|\ifleqno| 为真。 +如果其中一种公式编号存在,\pix^|\eqn| 将排印公式编号的内容。 +而 \pix^|\eq| 始终排印公式本身的内容。 + +%These macros are based on the code on \knuth{page~376}. +这些宏基于\knuth{第~376~页}中的代码。 + +\csdisplay +\newif\ifeqno \newif\ifleqno +\newtoks\@eqtoks \newtoks\@eqnotoks +\def\eq{\the\@eqtoks}\def\eqn{\the\@eqnotoks}% +\def\displaysetup#1$${% + \@displaytest#1\eqno\eqno\@displaytest}% +\def\@displaytest#1\eqno#2\eqno#3\@displaytest{% + \if !#3!% No \eqno, check for \leqno: + \@ldisplaytest#1\leqno\leqno\@ldisplaytest + \else + \eqnotrue \leqnofalse % Have \eqno, not \leqno. + \@eqnotoks = {#2}\@eqtoks = {#1}% + \fi + \generaldisplay$$}% +\def\@ldisplaytest#1\leqno#2\leqno#3\@ldisplaytest{% + \@eqtoks = {#1}% + \if !#3!% + \eqnofalse % No \leqno; we're done. + \else + \eqnotrue \leqnotrue % Have \leqno. + \@eqnotoks = {#2}% + \fi}% +| + +%You can format displays differently by defining your own macro, +%analogous to \pix^|\leftdisplays|. +%The macro definition must +%place a call on |\display!-setup| in |\every!-display| ^^|\everydisplay| +%so as to ensure +%that |\dis!-play!-setup| ^^|\displaysetup| is called at the start of +%every display. The macro definition must also include a definition of +%^|\generaldisplay|. +通过自己定义类似 \pix^|\leftdisplays| 的宏,你可以给陈列公式设定不同的形式。 +这个宏定义中必须在 |\every!-display| ^^|\everydisplay|中调用 |\display!-setup|, +以确保 |\dis!-play!-setup| ^^|\displaysetup|在每个陈列公式开始都被调用。 +这个宏定义必须也包含 ^|\generaldisplay| 的定义。 + +\csdisplay +\newtoks\previouseverydisplay +\def\leftdisplays{% + \previouseverydisplay = \everydisplay + \everydisplay = + {\the\previouseverydisplay \displaysetup}% + \def\generaldisplay{% + \leftline{% + \strut \indent \hskip\leftskip + \dimen0 = \parindent + \advance\dimen0 by \leftskip + \advance\displaywidth by -\dimen0 + \@redefinealignmentdisplays + \ifeqno \ifleqno + \kern-\dimen0 + \rlap{$\displaystyle\eqn$}% + \kern\dimen0 + \fi\fi + $\displaystyle{\eq}$% + \ifeqno \ifleqno\else + \hfill $\displaystyle{\eqn}$% + \fi\fi}}}% +\def\centereddisplays{\let\displaysetup = \relax}% +| + +%\filbreak +%\pix^|\leftdisplays| must go to some pains to make sure that +%|\dis!-play!-lines|, ^^|\displaylines| +%^|\eqalignno|, and ^|\leqalignno| still work properly. +%|\eq| is typeset in math mode, +%and |\halign| is illegal in math mode. +%^^|\halign//illegal in math mode| +%We use ^|\vcenter| to change the context so that |\halign| becomes +%legal again. We also remove the |\hfil| commands at the left of the template +%to obtain the flush left formatting. Other than those changes, the macros +%are the same as in |plain.tex|. +%\filbreak +\pix^|\leftdisplays| 必须历经辛苦地确保 |\dis!-play!-lines|^^|\displaylines|、 +^|\eqalignno| 和 ^|\leqalignno| 还能正常使用。 +|\eq| 在数学模式中排版,而 |\halign| 在数学模式中是不合法的。 +^^|\halign//在数学模式中不合法| +我们用 ^|\vcenter| 改变环境,以让 |\halign| 重新变成合法的。 +我们还去掉模板左边的 |\hfil| 命令以得到左对齐格式。 +除这些改变之外,这些宏与 |plain.tex| 中的相同。 + +\csdisplay +\def\@redefinealignmentdisplays{% + \def\displaylines##1{\displ@y + \vcenter{\halign{\hbox to\displaywidth{$\@lign + \displaystyle####\hfil$}\crcr##1\crcr}}}% + \def\eqalignno##1{\displ@y + \vcenter{\halign to\displaywidth{% + $\@lign\displaystyle{####}$\tabskip\z@skip + &$\@lign\displaystyle{{}####}$ + \hfil\tabskip\centering + &\llap{$\@lign####$}\tabskip\z@skip\crcr + ##1\crcr}}}% + \def\leqalignno##1{\displ@y + \vcenter{\halign to\displaywidth{% + $\@lign\displaystyle{####}$\tabskip\z@skip + &$\@lign\displaystyle{{}####} + $\hfil\tabskip\centering + &\kern-\displaywidth + \rlap{\kern-\parindent\kern-\leftskip$ + \@lign####$}% + \tabskip\displaywidth\crcr + ##1\crcr}}}}% +| + + +%\section Time of day +\section 日期时间 + +%When \TeX\ starts up, it sets the values of the +%^|\time|, ^|\day|, ^|\month|, and ^|\year| parameters. +%^^{time of day}^^{date} +%\pix^|\monthname| +%produces the name of the month, abbreviated to three letters. +%\pix^|\timestring| produces the current time, as in ``1:14\thinspace +%p.m.''. \pix^|\timestamp| produces the text of the complete date, as +%in ``23 Apr 1964\quad 1:14\thinspace p.m.''. +\TeX\ 开始运行时设定了 ^|\time|、^|\day|、^|\month| 和 ^|\year| 参数的值。 +^^{日期时间}^^{日期} +\pix^|\monthname| 排印月份名称的三字母缩写。 +\pix^|\timestring| 排印类似当前时间,类似于 ``1:14\thinspace p.m.''。 +\pix^|\timestamp| 排印完整日期文本,类似于 ``23 Apr 1964\quad 1:14\thinspace p.m.''。 + +\csdisplay +\def\monthname{% + \ifcase\month + \or Jan\or Feb\or Mar\or Apr\or May\or Jun% + \or Jul\or Aug\or Sep\or Oct\or Nov\or Dec% + \fi}% +\def\timestring{\begingroup + \count0 = \time \divide\count0 by 60 + \count2 = \count0 % The hour. + \count4 = \time \multiply\count0 by 60 + \advance\count4 by -\count0 % The minute. + \ifnum\count4<10 \toks1 = {0}% Get a leading zero. + \else \toks1 = {}% + \fi + \ifnum\count2<12 \toks0 = {a.m.}% + \else \toks0 = {p.m.}% + \advance\count2 by -12 + \fi + \ifnum\count2=0 \count2 = 12 \fi % Make midnight `12'. + \number\count2:\the\toks1 \number\count4 + \thinspace \the\toks0 +\endgroup}% +\def\timestamp{\number\day\space\monthname\space + \number\year\quad\timestring}% +| + + +%\section Lists +\section 列表 + +%\null +%\xrdef{listmacs} +%\bix^^{itemized lists} +%\bix^^{enumerations} +%\pix^|\numberedlist| produces numbered lists; |\endnumberedlist| ends +%them. +%\pix^|\unorderedlist| is analogous. +%For either of these, items inside the lists begin +%with \pix^|\li| (``list item''). You can put \pix^|\listcompact| +%at the beginning of a list if +%you don't want any additional space between the items of that list. +%Lists can be nested arbitrarily. +\null +\xrdef{listmacs} +\bix^^{编号列表} +\bix^^{列举} +\pix^|\numberedlist| 排印编号列表;|\endnumberedlist| 结束该列表。 +类似地,\pix^|\unorderedlist| 排印无序列表。 +这两种列表中的项目以 \pix^|\li|(``list item'')开头。 +如果不需要列表项目间的额外间隔,你可以在列表开始处加上 \pix^|\listcompact|。 +列表可以任意嵌套。 + +%You can control the spacing between the items more generally by +%assigning values to the registers listed below. If the items in +%your lists tend to be long, you might want to make |\interitemskip| +%nonzero. +%The left indentation of each list item is given by |\par!-indent| plus +%|\list!-left!-indent|; the right indentation of each list item +%is given by |\list!-right!-indent|. +更一般地,你可以通过改变下列寄存器的值控制列表项目间的间隔。 +如果列表项目经常比较长,你也许希望设定非零的 |\interitemskip|。 +各列表项目的左缩进量等于 |\par!-indent| 加 |\list!-left!-indent|; +各列表项目的右缩进量等于 |\list!-right!-indent|。 + +\csdisplay +\newskip\abovelistskip \abovelistskip = .5\baselineskip +\newskip\interitemskip \interitemskip = 0pt +\newskip\belowlistskip \belowlistskip = .5\baselineskip +\newdimen\listleftindent \listleftindent = \parindent +\newdimen\listrightindent \listrightindent = 0pt +\def\listcompact{\interitemskip = 0pt \relax}% +| + +%Both numbered and unnumbered lists use the macros that follow. +%We don't change |\parindent|, since many existing macros, e.g., +%|\footnote|, depend on |\parindent|. +%We must account for the +%possibility that items are more than one paragraph long. In this case, all +%paragraphs after the first will be indented. +%We use +%|\leftskip| and |\rightskip| to indent the list items. +%Indentation of displays is accounted for by changes to |\every!-dis!-play|. +%^^|\everydisplay| +编号列表和无序列表都使用下面这些宏。 +我们并不改变 |\parindent| 的值, +因为很多现有的宏比如 |\footnote| 依赖于 |\parindent|。 +我们必须考虑到项目包含不止一个段落的可能性。 +在这种情形中,除第一个之外的所有段落都将被缩进。 +我们用 |\leftskip| 和 |\rightskip| 缩进列表项目。 +我们通过改变 |\every!-dis!-play| 设定陈列公式的缩进。 +^^|\everydisplay| + +\csdisplay +\newdimen\@listindent +\def\beginlist{% + \@listindent = \parindent + \advance\@listindent by \listleftindent + \everydisplay = \expandafter{\the\everydisplay + % Don't lose user's \everydisplay: + \advance\displayindent by \@listindent + \advance\displaywidth by -\@listindent + \advance\displaywidth by -\listrightindent}% + \nobreak\vskip\abovelistskip + \parskip = 0pt + % \leftskip shifts nested lists to the right on the page. + \advance\leftskip by \@listindent + \advance\rightskip by \listrightindent}% +\def\printitem{\par\noindent + \llap{\hskip-\listleftindent \marker \enspace}}% +\def\endlist{\vskip\belowlistskip}% +| + +%\noindent +%You can change the way the item labels are typeset by +%redefining the |\numbered!-marker| macro. +%\pix^^|\numberedmarker| +\noindent +通常重新定义 |\numbered!-marker| 宏,你可以改变项目标签的样式。 +\pix^^|\numberedmarker| + +\csdisplay +\newcount\numberedlistdepth \newcount\itemnumber +\newcount\itemletter +\def\numberedmarker{% + \ifcase\numberedlistdepth + (impossible)% + \or \itemnumberout)% + \or \itemletterout)% + \else *% + \fi}% +| + +%\noindent Here are the definitions of |\numberedlist| and +%|\unorderedlist|. +%Both definitions have the same structure. +\noindent 这里是 |\numberedlist| 和 |\unorderedlist| 的定义。 +这两个定义的结构是相同的。 + +\csdisplay +\def\numberedlist{\environment{@numbered-list}% + \advance\numberedlistdepth by 1 + \itemnumber = 1 \itemletter = `a + \beginlist \let\marker = \numberedmarker + \def\li{% + \ifnum\itemnumber=1\else \vskip\interitemskip \fi + \printitem + \advance\itemnumber by 1 \advance\itemletter by 1 + }}% +\def\itemnumberout{\number\itemnumber}% +\def\itemletterout{\char\itemletter}% +\def\endnumberedlist{\par + \endenvironment{@numbered-list}\endlist}% +!bigskip +\newcount\unorderedlistdepth +\def\unorderedmarker{% + \ifcase\unorderedlistdepth + (impossible)% + \or \blackbox + \or ---% + \else *% + \fi}% +\def\unorderedlist{\environment{@unordered-list}% + \advance\unorderedlistdepth by 1 + \beginlist \itemnumber = 1 + \let\marker = \unorderedmarker + \def\li{% + \ifnum\itemnumber=1\else \vskip\interitemskip \fi + \printitem \advance\itemnumber by 1 + }}% +\def\endunorderedlist{\par + \endenvironment{@unordered-list}\endlist}% +| + +%\eix^^{itemized lists} +%\eix^^{enumerations} +\eix^^{编号列表} +\eix^^{列举} + + +%\section Verbatim listing +\section 原文呈现 + +%The \pix^|\listing| macro produces a verbatim listing of a specified +%file in the |\tt| font. +%It is based on the code on \knuth{page~380}. +%Tabs produce a fixed amount of space, and form +%feeds produce a page break. Other control characters produce whatever +%happens to be at that font position, which is generally not very useful. +%By redefining |\setup!-listing!-hook|, +%\pix^^|\setuplistinghook| +%you can take additional actions that are appropriate for your particular +%fonts and\slash or environment before the file is read in. +\pix^|\listing| 宏用 |\tt| 字体排印指定文件的原文呈现。 +它基于\knuth{第~380~页}中的代码。 +制表符生成固定大小的间隔,而换页符生成一个分页。 +其他控制字符生成该字体所在位置的字符,这通常不太有用。 +通过重新定义 |\setup!-listing!-hook|\pix^^|\setuplistinghook|, +你可以在读入文件前针对特别字体和\slash 或使用环境作额外定制。 + +\csdisplay +\def\listing#1{% + \par \begingroup \@setuplisting \setuplistinghook + \input #1 \endgroup}% +\let\setuplistinghook = \empty +\def\@setuplisting{% + \uncatcodespecials + \obeywhitespace \makeactive\` \makeactive\^^I + \def^^L{\vfill\eject}\tt}% +{\makeactive\` \gdef`{\relax\lq}}% Defeat ligatures. +{\makeactive\^^I\gdef^^I{\hskip8\fontdimen2\tt \relax}}% +| + + +%\section Tables of contents +\section 目录 + +%\null ^^{table of contents} +%The macro \pix^|\writetocentry| writes a macro call to the file +%|\jobname.toc|. The first argument of |\writetocentry|, e.g., +%``chapter'', is used to compose the name of the called macro. The second +%argument is the text to appear in the table of contents entry. +%|\writetocentry| appends the page number to the macro call. For +%example: +\null ^^{目录} +\pix^|\writetocentry| 宏在 |\jobname.toc| 文件中写入一个宏调用。 +|\write!-tocentry| 的第一个参量,比如``chapter'',用于构成所调用的宏的名称。 +第二个参量是显示在目录项中的文本。 +|\writetocentry| 添加页码到宏调用中。例如: +\csdisplay +\writetocentry{chapter}{Introduction} +| +%\noindent +%will produce the line: +\noindent +将生成下列这行: +\csdisplay +\tocchapterentry{Introduction}{2} +| +%\noindent in the |.toc| file, indicating +%that `Introduction' started on page 2. +\noindent 到 |.toc| 文件中,表示 `Introduction' 从第2页开始。 + +%You can use |\writenumberedtocentry| to provide a third parameter, such +%as a chapter number. For example: +利用 |\writenumberedtocentry| 你还可以提供第三个参数,比如章编号。例如: +\csdisplay +\writenumberedtocentry{chapter}{The second chapter}{2} +| +%\noindent will write a line: +\noindent 将写入这一行: +\csdisplay +\tocchapterentry{The second chapter}{2}{14} +| +%\noindent +%You can also |\write| to |\tocfile| yourself. +\noindent +你也可以自己用 |\write| 命令写入 |\tocfile|。% +\footnote{译注:原文的代码中遗漏 |\writetocentry| 的定义, +而将 |\writenumberedtocentry| 的定义重复写了两遍,译文已修正此问题。 +实际上,在本书所用的 |eplain.tex| 1.9 中, +|\writetocentry| 调用 |\writenumberedtocentry|, +并在后者中根据第三个参数是否非空写入不同的目录项。 +但在 |\writenumberedtocentry| 的定义中有问题, +导致写入 |tocfile| 文件的目录项始终有三个参数。 +在翻译时译者也同时修正 |eplain.tex| 中的这个错误。} + +\csdisplay +\newwrite\tocfile \newif\iftocfileopened +\def\opentocfile{\iftocfileopened\else + \tocfileopenedtrue + \immediate\openout\tocfile = \jobname.toc +\fi}% +\def\writetocentry#1#2{\ifrewritetocfile + \opentocfile + \write\tocfile{% + \expandafter\noexpand \csname toc#1entry\endcsname + {#2}{\folio}}% +\ignorespaces\fi}% +\def\writenumberedtocentry#1#2#3{\ifrewritetocfile + \opentocfile + \write\tocfile{% + \expandafter\noexpand \csname toc#1entry\endcsname + {#2}{#3}{\folio}}% +\ignorespaces\fi}% +| + +%To produce a table of contents, read the |.toc| file with +%\pix^|\readtocfile|. You should call |\read!-tocfile| before the first +%|\write!-toc!-entry|. When you're processing the table of contents +%without regenerating it, you should not rewrite +%the |.toc| file---if you do, its contents will be lost. +%The command +%|\rewrite!-tocfile!-false| will prevent the rewrite. +要排印出目录,只需用 \pix^|\readtocfile| 读取 |.toc| 文件。 +你应该在首次使用 |\write!-toc!-entry| 之前调用 |\read!-tocfile|。 +在处理目录且不想重新生成它时, +务必不要改写 |.toc| 文件——如果你这样做,文件内容将会丢失。 +命令 |\rewrite!-tocfile!-false| 将禁止这种改写。 + +\csdisplay +\newif\ifrewritetocfile \rewritetocfiletrue +\def\readtocfile{\testfileexistence{toc}% + \iffileexists + \input \jobname.toc + \ifrewritetocfile \opentocfile \fi + \fi}% +| + +%Here are some definitions of possible |\toc|\dots|entry| macros. These +%definitions are meant only as examples---running leaders across the line +%is usually not the best way to typeset a table of contents. +这里给出可能出现的 |\toc|\dots|entry| 宏的一些定义。 +这些定义只是作为例子而已——在目录中使用指引线通常不是最好的做法。 + +\csdisplay +\def\tocchapterentry#1#2{\line{\bf #1 \dotfill\ #2}}% +\def\tocsectionentry#1#2{% + \line{\quad\sl #1 \dotfill\ \rm #2}}% +\def\tocsubsectionentry#1#2{% + \line{\qquad\rm #1 \dotfill\ #2}}% +| + + +%\section Cross-references +\section 交叉引用 + +%\null ^^{cross-references} +%\xrdef{xrefs} +%The macros that follow provide symbolic +%cross-referencing, so that you can refer to something in another part of +%a document by name instead of by its actual page number. +%\pix^|\xrdef||{foo}| defines a label |foo| to be the current page +%number, and \pix^|\xrefn||{foo}| produces that page number, e.g., $77$. +%More often you'll want to say something like ``see p.\thinspace77'', so +%\pix^|\xref||{foo}| produces ``p.\thinspace 77''. If |foo| is not +%defined, a warning message will be given. |\xrefwarningfalse| +%suppresses the warning. +\null ^^{交叉引用} +\xrdef{xrefs} +接下来的宏提供了符号式的交叉引用, +让你可以在文档中通过名称而非实际页码提及其它部分的东西。 +\pix^|\xrdef||{foo}| 定义标签 |foo| 为当前页码, +而 \pix^|\xrefn||{foo}| 生成该页码,比如 $77$。 +你更常用的是类似 ``see p.\thinspace77'' 的写法, +因此 \pix^|\xref||{foo}| 生成 ``p.\thinspace 77''。 +如果 |foo| 未定义,就会得到一个警告信息。 +|\xrefwarningfalse| 取消这种警告。 + +%These macros provide no protection against duplicate definitions. You can +%check for duplicate definitions by sorting the cross-reference file and +%checking, either mechanically or by eye, for adjacent definitions of +%the same symbol. +这些宏没有提供对重复定义的保护。要检查重复定义, +你可以将交叉引用文件排序,并用工具或肉眼检查同一个符号的相邻定义。 + +\csdisplay +\newif\ifxrefwarning \xrefwarningtrue +\def\xrdef#1{\begingroup + \xrlabel{#1}% + \edef\@wr{\@writexrdef{\the\@xrlabeltoks}}% + \@wr + \endgroup \ignorespaces}% +\def\@writexrdef#1{\write\reffile{% + \string\gdef + \expandafter\string\csname#1\endcsname + {\noexpand\folio}\percentchar}}% +\def\xrefnumber#1{% + \xrlabel{#1}% + % \@xrlabeltoks now has the control sequence name. + \toks0 = + \expandafter{\csname\the\@xrlabeltoks\endcsname}% + \expandafter \ifx\the\toks0\relax + \ifxrefwarning \message{Undefined label + `\tokstostring{#1}'.}\fi + {\let\spacesub = \space + \expandafter\xdef\the\toks0 + {`{\tt \tokstostring{#1}}'}}\fi + \the\toks0}% +\def\xref#1{p.\thinspace\xrefnumber{#1}}% +\def\xrefn#1{\xrefnumber{#1}}% +| + +%This macro turns a label into a list of character tokens in the token +%register |\labeltoks|. A label can include blanks and control sequences in +%it as well as normal characters, but it can't include braces. +这个宏将一个标签转换为一列字符记号,并放在寄存器 |\labeltoks| 中。 +除了普通字符之外,标签还可以包含空格和控制序列,但不能包含花括号。 + +\csdisplay +\newtoks\@xrlabeltoks +\def\xrlabel#1{\begingroup + \escapechar = `\_ \edef\tts{\tokstostring{#1_}}% + \global\@xrlabeltoks = \expandafter{\tts}% + \endgroup}% +| + +%It takes two passes to get the cross-references right, since the +%definitions are written out to the auxiliary file |\jobname.aux|. +%\pix^|\readreffile| reads them back in. If you don't issue this command +%before the first definition, you'll lose all the definitions from the +%previous run. +需要运行两遍才能得到正确的交叉引用, +因为这些定义是写出到辅助文件|\jobname.aux| 里的。 +\pix^|\readreffile| 命令用于将它们读取回来。 +如果你不在第一个定义之前执行此命令,你将丢失上一遍运行得到的定义。 + +\csdisplay +\newwrite\reffile \newif\ifreffileopened +\def\openreffile{\ifreffileopened\else + \reffileopenedtrue + \immediate\openout\reffile = \jobname.aux + \fi}% +\def\readreffile{% + \testfileexistence{aux}% + \iffileexists + \begingroup + \@setletters + \input \jobname.aux + \endgroup + \else + \message{No cross-reference file; I won't give you + warnings about undefined labels.}% + \xrefwarningfalse + \fi + \openreffile}% +\def\@setletters{% + \catcode`_ = \letter \catcode`+ = \letter + \catcode`- = \letter \catcode`@ = \letter + \catcode`0 = \letter \catcode`1 = \letter + \catcode`2 = \letter \catcode`3 = \letter + \catcode`4 = \letter \catcode`5 = \letter + \catcode`6 = \letter \catcode`7 = \letter + \catcode`8 = \letter \catcode`9 = \letter + \catcode`( = \letter \catcode`) = \letter}% +| + +%^^{equations, labelling} +%You can give symbolic names to equations in a similar way, using +%\pix^|\eqdef| and \pix^|\eqref|. |\eqdef| inserts its own |\eqno| +%command, so it must be invoked in a place where |\eqno| is legal. +^^{公式编号} +按同样的方式,你可以用 \pix^|\eqdef| 和 \pix^|\eqref| 给出公式的符号式名称。 +|\eqdef| 插入自己的 |\eqno| 命令,因此它必须用在能用 |\eqno| 的地方。 + +\csdisplay +\newcount\eqnumber +\def\eqdef#1{\global\advance\eqnumber by 1 + \expandafter\xdef + \csname#1eqref\endcsname{\the\eqnumber}% + \immediate\write\reffile{\string\def + \expandafter\string\csname#1eqref\endcsname + {\the\eqnumber}}% + \eqno + \eqprint{\the\eqnumber}}% +| + +%|\eqref| produces ``(equation number)''. You can handle fancier +%formatting by redefining \pix^|\eqprint|. For example, you could redefine +%it so that the equation numbers include +%the chapter number. +|\eqref| 生成``(公式编号)''。 +通过重新定义 \pix^|\eqprint|,你可以实现更加复杂的格式。 +举个例子,你可以重新定义它,使得公式编号中包含章编号。 + +\csdisplay +\def\eqref#1{% + \expandafter \ifx \csname#1eqref\endcsname \relax + \ifxrefwarning \message{Undefined equation label + `#1'.}\fi + \expandafter\def\csname#1eqref\endcsname{00}% + \else \eqprint{\csname#1eqref\endcsname}% + \fi}% +\def\eqprint#1{(#1)}% +| + + +%\section Environments +\section 环境 + +%\null ^^{environments} These macros let you define your own named groups +%(environments) for parts of your manuscript. Like \TeX\ groups, these +%groups can be nested, and in fact their nesting can be intertwined with +%the nesting of \TeX\ groups. If the names at the beginning and end of +%an environment don't match, you'll get an error message. The macros are +%designed so that the message you get when such an error occurs will give +%you a good chance of localizing the cause of the error easily. +\null ^^{环境}这些宏让你可以将手稿的一部分定义为命名编组(环境)。 +类似 \TeX\ 的编组,这些编组也可以嵌套, +而且实际上它们的嵌套可以与 \TeX\ 编组的嵌套相互交织。 +如果开始的名称和结束的名称不匹配,你将得到一个错误信息。 +这些宏如此设计,使得当你得到这种错误信息时,你有机会方便地定位错误的来源。 + +%You begin an environment with +%\pix^^|\environment| +%|\envi!-ron!-ment| |{foo}| and end it with |\endenvironment{foo}|, where +%|foo| is the name of the environment. Our macros slightly improve on +%the answer to Exercise~5.7 of \texbook, by doing some checks on +%|\begingroup| and |\endgroup| pairs, as well as making sure +%|\environment| and |\endenvironment| pairs match. +用 \pix^^|\environment||\envi!-ron!-ment| |{foo}| 开始一个环境, +用 |\endenvironment{foo}| 结束该环境,其中 |foo| 是该环境的名称。 +我们的宏稍微改进了 \texbook\ 练习~5.7, +添加对 |\begingroup| 和 |\endgroup| 是否配对的检查, +并确保 |\environment| 和 |\endenvironment| 能够匹配。 + +\csdisplay +\def\environment#1{\ifx\@groupname\undefined\else + \errhelp = \@unnamedendgrouphelp + \errmessage{`\@groupname' was not closed by + \string\endenvironment}\fi + \def\@groupname{#1}% + \begingroup + \let\@groupname = \undefined \ignorespaces}% +\def\endenvironment#1{\endgroup + \def\@thearg{#1}% + \ifx\@groupname\@thearg + \else + \ifx\@groupname\undefined + \errhelp = \@isolatedendenvironmenthelp + \errmessage{Isolated + \string\endenvironment\space for `#1'}% + \else + \errhelp = \@mismatchedenvironmenthelp + \errmessage{Environment `#1' ended, + but `\@groupname' started}% + \endgroup % Probably a typo in the names. + \fi + \fi + \let\@groupname = \undefined \ignorespaces}% +| + +%We also define help messages for each of the errors above. +%^^|\newhelp| +你也可以给上述这些错误定义它们各自的帮助信息。 +^^|\newhelp| + +\csdisplay +\newhelp\@unnamedendgrouphelp{% + Most likely, you just forgot an^^J% + \string\endenvironment. + Maybe you should try inserting another^^J% + \string\endgroup to recover.}% +\newhelp\@isolatedendenvironmenthelp{% + You ended an environment X, but^^J% + no \string\environment\space to start it + is anywhere in sight.^^J% + You might also be at an + \string\endenvironment\space that would match^^J% + a \string\begingroup, i.e., you forgot an + \string\endgroup.}% +\newhelp\@mismatchedenvironmenthelp{% + You started an environment X, but^^J% + you ended it with Y. Maybe you made a typo + in one or the other^^J% + of the names.}% +| + +%Some environments should not be allowed to occur within +%another environment. Let's call these environments +%``outer environments''. |\check!-env| checks that no outer environment +%is currently in effect and complains if one is. To use |\check!-env|, you +%must issue the command |\environment!-true| at the beginning of every +%outer environment. +某些环境应当不允许出现在其他环境内部。我们称这些环境为``外部环境''。 +|\check!-env| 检测是否不存在当前有效的外部环境,若存在的话给出警告信息。 +要使用 |\checkenv|,你必须在每个外部环境开头处执行 |\environment!-true| 命令。 + +\csdisplay +\newif\ifenvironment +\def\checkenv{% + \ifenvironment + \errhelp = \@interwovenenvhelp + \errmessage{Interwoven environments}% + \endgroup + \fi}% +\newhelp\@interwovenenvhelp{% + Perhaps you forgot to end the previous^^J% + environment? I'm finishing off the current group,^^J% + hoping that will fix it.}% +| + + +%\section Justification +\section 对齐 + +%\bix^^{flush left} +%\bix^^{flush right} +%\bix^^{centered text} +%The three macros \pix^|\flushleft|, \pix^|\flushright|, and +%\xrdef{eplaincenter} +%\pix^|\center| justify the text on the following lines in the indicated way. +%The command should appear on a line by itself. +%Both the command and the text should be enclosed in a group---% +%the end of the group indicates the end of the text. +%The entire group is set as a single paragraph, with lines filled out +%on one side or another as appropriate. Blank lines are reproduced. +\bix^^{居左对齐} +\bix^^{居右对齐} +\bix^^{居中文本} +这三个宏 \pix^|\flushleft|、\pix^|\flushright| 和 +\xrdef{eplaincenter}\pix^|\center| 将后面各行文本以指定方式对齐。 +这种命令必须单独写在一行中。 +命令和文本应该包含在一个编组中——编组的结束就表示文本的结束。 +整个编组作为一个段落排版,各行视情况在一边或两边用空白填充。 +空行依原样显示。 + +\csdisplay +\begingroup + \catcode `\^^M = \active + \globaldefs = 1 % + \def\flushleft{\beforejustify % + \aftergroup\@endflushleft % + \def^^M{\null\hfil\break}% + \def\@eateol^^M{}\@eateol}% + \def\flushright{\beforejustify % + \aftergroup\@endflushright % + \def^^M{\break\null\hfil}% + \def\@eateol^^M{\hfil\null}\@eateol}% + \def\center {\beforejustify % + \aftergroup\@endcenter % + \def^^M{\hfil\break\null\hfil}% + \def\@eateol^^M{\hfil\null}\@eateol}% +\endgroup +| + +%The following commands are called as a result of the |\after!-group| +%^^|\aftergroup| +%in the definitions of |\flush!-left|, |\flush!-right|, and |\center|. +%They perform the necessary cleanup operations. +在 |\flush!-left|、|\flush!-right| 和 |\center| 的定义中, +下述这些命令出现在 ^|\aftergroup| 的后面; +它们在编组结束后被调用,以执行一些必需的清理工作。 + +\csdisplay +\def\@endflushleft{\unpenalty + {\parfillskip = 0pt plus 1 fil\par}% + \ignorespaces}% +\def\@endflushright{% + % Remove the \hfil\null\break we just put on. + \unskip \setbox0=\lastbox \unpenalty + % We have fil glue at the left of the line; + % \parfillskip shouldn't affect that. + {\parfillskip = 0pt \par}\ignorespaces}% +\def\@endcenter{% + % Remove the \hfil\null\break we just put on. + \unskip \setbox0=\lastbox \unpenalty + % We have fil glue at the left of the line; + % \parfillskip must balance it. + {\parfillskip = 0pt plus 1fil \par}\ignorespaces}% +\def\beforejustify{% + \par\noindent + \catcode`\^^M = \active + \checkenv \environmenttrue}% +| + +%\eix^^{flush left} +%\eix^^{flush right} +%\eix^^{centered text} +\eix^^{居左对齐} +\eix^^{居右对齐} +\eix^^{居中文本} + + +%\section Tables +\section 表格 + +%The \pix^|\makecolumns| macro enables you to give all the entries in a +%table without having to worry about where the columns break. For +%example, if you're typing a long alphabetical list that will be +%formatted in several columns, you usually won't know in advance where +%one column ends and the next begins. Moreover, if another item gets +%added, the column breaks will change. +\pix^|\makecolumns| 宏允许你给出表格的所有元素,而无需担心如何分栏。 +例如,在输入一个冗长的按字母排序的名单,并分多栏显示时, +你通常不知道在何处结束一栏开始下一栏。 +另外,如果添加了另一项,各栏的划分将会改变。 + +%|\makecolumns| takes two (delimited) arguments: the total number of +%entries in the table and the number of columns in the table. For +%example, `|\makecolumns 37/3:|' specifies a three-column table whose +%entries are the next $37$ lines. You can adjust the positioning of the +%table on the page by changing |\parindent|, which determines the space +%to the left, and |\hsize|, which determines the space from the left +%margin of the page to the right of the block. You can allow a page +%break above the |\valign| +%^^|\valign//used in {\tt\\makecolumns}| +%by changing +%\pix^|\abovecolumnspenalty|. +|\makecolumns| 有两个(定界)参量:表格元素的总数以及表格的栏数。 +例如,`|\makecolumns 37/3:|' 指定一个三栏表格,其元素为接下来的 $37$ 行。 +要调整表格在页面上的位置,你可以修改 |\parindent| 以确定表格左侧的空白, +以及 |\hsize| 以确定从页面左边缘到表格右侧的距离。 +要允许在 |\valign| ^^|\valign//用于 {\tt\\makecolumns}| 之前分页, +你可以修改 \pix^|\abovecolumnspenalty|。 + +\csdisplay +\newcount\abovecolumnspenalty +\abovecolumnspenalty = 10000 +\newcount\@linestogo % Lines remaining to process. +\newcount\@linestogoincolumn % Lines remaining in column. +\newcount\@columndepth % Number of lines in a column. +\newdimen\@columnwidth % Width of each column. +\newtoks\crtok \crtok = {\cr}% +\def\makecolumns#1/#2: {\par \begingroup + \@columndepth = #1 \advance\@columndepth by #2 + \advance\@columndepth by -1 + \divide \@columndepth by #2 + \@linestogoincolumn = \@columndepth \@linestogo = #1 + \def\@endcolumnactions{% + \ifnum \@linestogo<2 + \the\crtok \egroup \endgroup \par + % End \valign and \makecolumns. + \else + \global\advance\@linestogo by -1 + \ifnum\@linestogoincolumn<2 + \global\@linestogoincolumn = \@columndepth + \the\crtok + \else &\global\advance\@linestogoincolumn by -1 + \fi + \fi}% + \makeactive\^^M\letreturn\@endcolumnactions + \@columnwidth = \hsize + \advance\@columnwidth by -\parindent + \divide\@columnwidth by #2 + \penalty\abovecolumnspenalty + \noindent % It's not a paragraph (usually). + \valign\bgroup + &\hbox to \@columnwidth{\strut ##\hfil}\cr +}% The next end-of-line starts everything going. +| + + +%\section Footnotes +\section 脚注 + +%\null ^^{footnotes} +%Footnotes are most commonly typeset by using a raised number as the +%reference mark. We define the \pix^|\numberedfootnote| macro to do +%this. It also redefines ^|\vfootnote| to allow slightly more general +%formatting of footnotes than \plainTeX\ does. The dimension register +%\pix^^|\footnotemarkseparation| |\foot!-note!-mark!-sepa!-ra!-tion| +%controls the space between the footnote mark (e.g., the number) and the +%beginning of the text. The \pix^|\everyfootnote| tokens are inserted +%before producing the footnote. +\null ^^{脚注} +脚注通常用升高的数字作为参考符号。 +我们定义的 \pix^|\numberedfootnote| 宏就是这样的。 +它还重新定义了 ^|\vfootnote|,以支持比 \plainTeX\ 更一般的脚注格式。 +尺寸寄存器 \pix^^|\footnotemarkseparation| |\foot!-note!-mark!-sepa!-ra!-tion| +控制脚注符号(比如数字)与脚注文本之间的间隔。 +\pix^|\everyfootnote| 记号在每个脚注之前插入。 + +%The \plainTeX\ definitions of |\footnote| and |\vfootnote| are +%preserved in |\@plain!-footnote| and |\@plain!-vfootnote| in case you should +%need them. +\PlainTeX\ 中的 |\footnote| 和 |\vfootnote| 定义保留在 +|\@plain!-footnote| 和 |\@plain!-vfootnote| 中,以备不时之需。 + +\csdisplay +\newcount\footnotenumber \newtoks\everyfootnote +\newdimen\footnotemarkseparation +\footnotemarkseparation = .5em +\let\@plainfootnote = \footnote +\let\@plainvfootnote = \vfootnote +\def\vfootnote#1{\insert\footins\bgroup + \interlinepenalty\interfootnotelinepenalty + \splittopskip\ht\strutbox \splitmaxdepth\dp\strutbox + \floatingpenalty\@MM + \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip + \xspaceskip\z@skip + \everypar = {}% + \the\everyfootnote + \indent\llap{#1\kern\footnotemarkseparation}\footstrut + \futurelet\next\fo@t}% +\def\numberedfootnote{\global\advance\footnotenumber by 1 + \@plainfootnote{$^{\number\footnotenumber}$}}% +| + + +%\section Double columns +\section 双栏 + +%\null ^^{double columns} The |\doublecolumns| command begins +%double-column output, while the |\single!-column| +%\pix^^|\singlecolumn| +%command restores +%single-column output. You can switch back and forth between them +%on a single page. +%The glue specified by |\above!-double!-column!-skip| and +%|\below!-double!-column!-skip| is inserted before and after the +%double-column material. +\null ^^{双栏} |\doublecolumns| 命令开始双栏输出, +而 |\single!-column| \pix^^|\singlecolumn| 命令恢复单栏输出。 +两者可以在同个页面上相互切换。 +用 |\above!-double!-column!-skip| 和 |\below!-double!-column!-skip| +指定的粘连插入到双栏素材的前面和后面。 + +%The approach is derived from \knuth{page~417}. +它们的实现方式来源于\knuth{第~417~页}。 + +\csdisplay +\newskip\abovedoublecolumnskip +\newskip\belowdoublecolumnskip +\abovedoublecolumnskip = \bigskipamount +\belowdoublecolumnskip = \bigskipamount +\newdimen\gutter \gutter = 2pc +\newdimen\doublecolumnhsize \doublecolumnhsize = \hsize +\newbox\@partialpage \newdimen\singlecolumnhsize +\newdimen\singlecolumnvsize \newtoks\previousoutput +\def\doublecolumns{\par % Don't start in horizontal mode. + \previousoutput = \expandafter{\the\output} + \advance\doublecolumnhsize by -\gutter + \divide\doublecolumnhsize by 2 + \output = {\global\setbox\@partialpage = + \vbox{\unvbox255\vskip\abovedoublecolumnskip}}% + \pagegoal = \pagetotal \break % Expands \output above. + \output = {\doublecolumnoutput}% + \singlecolumnhsize = \hsize + \singlecolumnvsize = \vsize + \hsize = \doublecolumnhsize \vsize = 2\vsize}% +| + +%The |\@double!-column!-split| macro does the actual splitting. +%Insertions are assumed to be single-column material. If you don't want +%this to be the case, you'll have to modify the output routine. After +%|\@double!-column!-split| has done its work, |\box255| will have the +%double-column material. The double-column material will be preceded by +%any single-column material that was typeset before |\doublecolumns| was +%invoked. |\box4| will have the material that didn't fit on the page. +|\@double!-column!-split| 宏执行实际的分栏。插入项被当作单栏素材; +如果这不是你想要的,你需要修改输出例行程序。 +在 |\@double!-column!-split| 完成之后,|\box255| 将包含双栏素材。 +双栏素材前面是调用 |\doublecolumns| 前的单栏素材。 +|\box4| 将包含无法放入该页面的素材。 + +\csdisplay +\def\@doublecolumnsplit{% + \splittopskip = \topskip \splitmaxdepth = \maxdepth + \dimen0 = \singlecolumnvsize + \advance\dimen0 by -\ht\@partialpage + \advance\dimen0 by -\ht\footins + \advance\dimen0 by -\skip\footins + \advance\dimen0 by -\ht\topins + \begingroup + \vbadness = 10000 + \global\setbox1=\vsplit255 to \dimen0 \wd1=\hsize + \global\setbox3=\vsplit255 to \dimen0 \wd3=\hsize + \endgroup + \global\setbox4=\vbox{\unvbox255 + \penalty\outputpenalty}% + \global\setbox255=\vbox{\unvbox\@partialpage + \hbox to \singlecolumnhsize{\box1\hfil\box3}% + \vfill}}% +| +%\needspace{.5in} +%|\double!-column!-out!-put| is the real output routine. We call the old +%|\output| to do the work of actually shipping out the box. +\needspace{.5in} +|\double!-column!-out!-put| 是真正的输出例行程序。 +我们调用 |\output| 执行实际的盒子送出工作。 + +\csdisplay +\def\doublecolumnoutput{\@doublecolumnsplit + \hsize = \singlecolumnhsize \vsize = \singlecolumnvsize + \previousoutput \unvbox4}% +| + +%|\singlecolumn| resumes typesetting in one column. It assumes that +%|\doublecolumns| has been called. +|\singlecolumn| 恢复单栏排版。它假定已调用了 |\doublecolumns|。 + +\csdisplay +\def\singlecolumn{\par % Don't start in horizontal mode. + \output = {\global\setbox1 = + \vbox{\unvbox255\vskip\abovedoublecolumnskip}}% + \pagegoal = \pagetotal \break \setbox255 = \box1 + {\singlecolumnvsize = \ht255 + \divide\singlecolumnvsize by 2 + \advance\singlecolumnvsize by +\ht\@partialpage + \advance\singlecolumnvsize by +\ht\footins + \advance\singlecolumnvsize by +\skip\footins + \advance\singlecolumnvsize by +\ht\topins + \@doublecolumnsplit}% + \hsize = \singlecolumnhsize + \vsize = \singlecolumnvsize + \output = \expandafter{\the\previousoutput}% + \unvbox255}% +| + +%\margin{`Sensible paragraph skips' section deleted} +\margin{`Sensible paragraph skips' section deleted} + + +%\section Finishing up +\section 收尾 + +%We now must undo the changes that we made when we started (see +%\xref{eplainconv}). We also give a version identification, which is +%subsequently available in |\fmt!-name| and |\fmt!-version|. +现在我们必须撤销开始的修改(见\xref{eplainconv})。 +我们还给出版本标识,它可以在 |\fmt!-name| 和 |\fmt!-version| 中得到。 + +\csdisplay +\let\wlog = \@plainwlog \catcode`@ = \other +\def\fmtname{eplain}% +{\edef\plainversion{\fmtversion}% + \xdef\fmtversion{1.0: 15 May 1990 + (and plain \plainversion)}% +}% +| + +%\eix^^|eplain.tex| +\eix^^|eplain.tex| + +\ifoldeplain\else\ifcompletebook\else +\vskip4em{\sectionfonts\leftline{本章索引}} +\readindexfile{i} +\fi\fi + +\endchapter +\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/usingtex.tex b/Master/texmf-dist/doc/plain/impatient-cn/usingtex.tex new file mode 100644 index 00000000000..8be5d5df47c --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/usingtex.tex @@ -0,0 +1,1393 @@ +% -*- coding: utf-8 -*- +% This is part of the book TeX for the Impatient. +% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +% See file fdl.tex for copying conditions. + +\input macros +\chapter{使用 \TeX} + +\chapterdef{usingtex} + +% Avoid underfull box complaint about the empty paragraph +% that precedes the first section heading. +% +\def\par{{\parfillskip = 0pt plus 1fil\endgraf}\let\par=\endgraf} +\vglue-\abovesectionskip % we've skipped enough already +\vskip0pt % Make \combineskips work. + +%\section Turning input into ink +\section 从键盘输入变到油墨 + +%\subsection Programs and files you need +\subsection 所需的程序和文件 + +%In order to produce a \TeX\ document, you'll need to run the \TeX\ +%program and several related programs as well. You'll also need +%supporting files for \TeX\ and possibly for these other programs. In +%this book we can tell you about \TeX, but we can't tell you about the +%other programs and the supporting files except in very general terms +%because they depend on your local \TeX\ environment. The people who +%provide you with \TeX\ should be able to supply you with what we call +%\emph{local information}. +%\pix^^{local information} +%The local information tells you how to +%start up \TeX, how to use the related programs, and how to gain access +%to the supporting files. +为了制作一个 \TeX\ 文档, 你必需运行 \TeX\ 及其相关软件. +你同时也需要一些 \TeX\ 及其相关软件所用到的辅助文件. +在这本书中, 我们仅仅谈论 \TeX\ 和一些通用的软件及辅助文件, +不过我们不会介绍其它的, 因为它们仅仅和你自己的 \TeX\ 环境相关. +为你提供 \TeX\ 的人可以为你提供我们所说的\emph{本地信息}. +\pix^^{本地信息} +这些本地信息可以告诉你如何去启动 \TeX, 如何去使用相关的程序, +以及如何去访问这些所用到的辅助文件. + +%Input to \TeX\ consists of a file of ordinary text that you can prepare +%with a ^{text editor}. A \TeX\ input file, unlike an input file for a +%typical word processor, doesn't ordinarily contain any invisible +%^{control characters}. +%Everything that \TeX\ sees is visible to you too if you +%look at a listing of the file. +你可以使用一个 ^{文本编辑器} 来编写一个可以输入到 \TeX\ 的普通文本文件. +一个 \TeX\ 输入文件和一个文字处理软件的输入文件不同, 它通常并不存在任何不可见的^{控制字符}. +任何 \TeX\ 读到的字符对你来说, 都是你可以看到的. + +%Your input file may turn out to be little more than a skeleton that +%calls for other input files. \TeX\ users often organize large documents +%such as books this way. You can use the ^|\input| command (\xref\input) +%to embed one input file within another. In particular, you can use +%|\input| to incorporate files containing \emph{macro definitions}---% +%^^{macros//in auxiliary files} +%auxiliary definitions that enhance \TeX's capabilities. +%If any macro files are available at your \TeX\ installation, the local +%information about \TeX\ should tell you how to get at the macro files +%and what they can do for you. The standard form of \TeX, +%the one described in this book, incorporates a +%collection of macros and other definitions known as ^{\plainTeX} +%(\xref{\plainTeX}). +你的输入文件, 可以仅仅是一个引用其它输入文件的框架. +\TeX\ 用户往往把大的文档, 比如说这本书, 组织成这种形式. +你可以使用 ^|\input| 命令 (\xref\input) 来把一个输入文件篏入到另一个中. +特别地, 你可以使用 |\input|来调入包含\emph{宏定义}的文件, +^^{宏//在辅助文件中} +宏定义是一些辅助的定义, 它可以来增强 \TeX\ 的功能. +如果你的 \TeX\ 系统中包含任何的宏文件, +和 \TeX\ 相关的本地信息会告诉你如何得到这些宏文件, +以及它们的功能. +\TeX\ 的标准安装形式, 也就是在这本书中所描述的, +包括了一个被称为 ^{\plainTeX} (\xref{\plainTeX}) 的宏集. + +%When \TeX\ processes your document, it produces a file called the +%^{\dvifile}. The abbreviation ``|dvi|'' stands for ``device +%independent''. The abbreviation was chosen because the information in +%the \dvifile\ is independent of the device that you use to print or +%display your document. +当 \TeX\ 处理你的文档时, 它会产生一种叫做 ^{\dvifile} 的文件. +其中, ``|dvi|'' 的全称为 ``device independent (设备无关)''. +之所以选用这个缩写, 是因为 \dvifile\ 中所包含的信息和你的打印或显示设备无关. + +%To print your document or view it with a \emph{previewer}, +%^^{previewer} +%you need to process the ^{\dvifile} with +%a \emph{device driver\/} program. +%^^{device drivers} +%(A previewer is a program that +%enables you to see on a screen some approximation of what the typeset +%output will look like.) +%Different output devices usually +%require different device drivers. +%After running the device driver, +%you may also need to transfer the output of the device driver to the +%printer or other output device. +%^^{printers} ^^{output devices} +%The local information about \TeX\ should tell +%you how to get the correct device driver and use it. +当你需要打印或使用\emph{阅览器}查看你的文档时, ^^{阅览器} +你需要使用相应的\emph{设备驱动}来处理之. ^^{设备驱动} +(阅览器是一个程序, 它能把和打印出来的结果差不多的排版内容显示在屏幕上.) +不同的输出设备往往需要不同的设备驱动. 在运行设备驱动以后, +你还需要把设备驱动输出的内容传输到打印机或者其它输出设备上. +^^{打印机} ^^{输出设备} +和 \TeX\ 相关的本地信息会告诉你如何得到正确的设备驱动和如何使用它. + +%Since \TeX\ has no built-in knowledge of particular fonts, it uses +%\emph{font files} +%^^{font files} +%to obtain information about the fonts used in your +%document. The font files should also be part of your local \TeX\ +%environment. Each font normally requires two files: one containing the +%dimensions of the characters in the font (the \emph{metrics file}) +%^^{metrics file} +%and one containing the shapes of the characters (the \emph{shape file}). +%^^{shape file} +%Magnified versions of a font share the metrics file but have +%different shape files. ^^{magnification} Metrics files are sometimes +%referred to as ^{\tfmfile}s, and the different varieties of shape files +%are sometimes referred to as ^{\pkfile}s, ^{\pxlfile}s, and ^{\gffile}s. +%These names correspond to the names of the files that \TeX\ and its +%companion programs use. For example, |cmr10.tfm| is the metrics file +%for the |cmr10| font (10-point Computer Modern Roman). +因为 \TeX\ 内部并没有任何关于一个特定字体的任何信息, +它使用\emph{字体文件} +^^{字体文件} +来得到你文档中所使用的字体的信息. +字体文件也是你本地 \TeX\ 环境的一个组成部分. +一个字体一般对应两个文件: +一个文件 (\emph{字体度量文件}) ^^{度量文件} 包括了字体中每个字符的大小信息, +另一个文件 (\emph{字体轮廓文件}) ^^{轮廓文件} 则描述了字体中字符的形状. +一个字体的缩放版本使用同样的字体度量文件, 不过并不使用相同的字体轮廓文件. +^^{放大率} +字体度量文件往往用来指称 ^{\tfmfile}, +而字体轮廓文件则往往用来指称 ^{\pkfile}, ^{\pxlfile} 和 ^{\gffile} 等不同的种类. +这些名称和 \TeX\ 以及相关软件所使用的文件的文件名所对应. +比如, |cmr10.tfm| 为 |cmr10| 字体的字体度量文件 (10-点的计算机现代字体). + +%\TeX\ itself uses only the metrics file, since it doesn't care what the +%characters look like but only how much space they occupy. The device +%driver ordinarily uses the shape file, since it's responsible for +%creating the printed image of each typeset character. Some device +%drivers need to use the metrics file as well. Some device drivers can +%utilize fonts that are resident in a printer and don't need shape files +%for those fonts. +%\secondprinting{\vfill\eject} +\TeX\ 本身仅使用字体度量文件, 因为它只关心这个字体的字符占用了多大的空间, +而并不关心这个字体的外形是什么样子的. +设备驱动则往往需要使用字体轮廓文件, +因为它需要负责把每个排出的字符变成印出的图形. +某些设备驱动也需要使用字体度量文件. +一些设备驱动可以使用打印机中包含的字体, +所以可以不需要这些字体的字体轮廓文件. +%\secondprinting{\vfill\eject} + + +%\subsection Running {\TeX} +\subsection{运行 \TeX} + +%\bix^^{running \TeX} +%You can run \TeX\ on an input file |screed.tex| by typing +%^^{input files} +%something like `|run tex|' or just `|tex|' (check your local information). +%\TeX\ will respond with something like: +%% 4/23/90 is Shakespeare's 426th birthday, and Karl's 26th. +%\csdisplay +%This is TeX, Version 3.0 (preloaded format=plain 90.4.23) +%** +%| +%The ``preloaded format'' here refers to a predigested form of the +%^{\plainTeX} macros that come with \TeX. +%You can now type `|screed|' to get \TeX\ to process your file. +%When it's done, you'll see something like: +%\csdisplay +%(screed.tex [1] [2] [3] ) +%Output written on screed.dvi (3 pages, 400 bytes). +%Transcript written on screed.log. +%| +%displayed on your terminal, or printed in the record of your +%run if you're not working at a terminal. Most of this output is +%self-explanatory. +%The numbers in brackets are page numbers that \TeX\ displays when it +%ships out each page of your document to the \dvifile. +%\TeX\ will usually assume an +%extension `|.tex|' to an input file name +%if the input file name you gave doesn't +%have an extension. For some forms of \TeX\ you may be able to +%invoke \TeX\ directly for an input file by typing: +%\csdisplay +%tex screed +%| +%or something like this. +\bix^^{运行 \TeX} +你可以通过输入类似 `|run tex|' 或 `|tex|' (查看你的本地信息) 来运行 \TeX\ 来处理一个输入文件 |screed.tex|. +^^{输入文件} +\TeX\ 会作出如下显示 +% 4/23/90 is Shakespeare's 426th birthday, and Karl's 26th. +\csdisplay +This is TeX, Version 3.0 (preloaded format=plain 90.4.23) +** +| +在这里, ``preloaded format'' (已预先载入的格式) 指的是 \TeX\ 提供的 ^{\plainTeX} 宏集的一个己预先产生的形式. +现在你可以输入 `|screed|' 来让 \TeX\ 来处理你的文件. +当处理结束时, 你可以在终端或者打印机印出的记录上 (如果你不使用终端) 得到类似下面的输出: +\csdisplay +(screed.tex [1] [2] [3] ) +Output written on screed.dvi (3 pages, 400 bytes). +Transcript written on screed.log. +| +这个输出大部分是不言自明的. +在括号中的数字是 \TeX\ 在把每页内容输入 \dvifile\ 时所显示的当前页码. +当你提供的名件名不含扩展名时, \TeX\ 往往会把你的文件扩展名当作 `|.tex|'. +在某些 \TeX\ 环境中, 你可能可以直接执行类似下面的语句: +\csdisplay +tex screed +| +来直接处理文档. + +%Instead of providing your \TeX\ input from a file, you can type it directly at +%your terminal. To do so, type `^|\relax|' instead of `|screed|' at the +%`|**|' prompt. +%\TeX\ will now prompt you with a `|*|' for each line of input and interpret +%each line of input as it sees it. +%To terminate the input, type a command such as `|\bye|' that tells \TeX\ +%you're done. +%Direct input is sometimes a handy way of experimenting with \TeX. +\TeX\ 不仅可以读取文件输入,也可以直接读取你在终端中的输入: +只需将 `|**|' 提示后的输入从 `|screed|' 改为 `^|\relax|'。 +\TeX\ 将在你输入的各行前面给出 `|*|' 提示, +并且逐行解释你的输入。 +输入类似 `|\bye|' 这样的命令可以结束输入。 +在试验 \TeX\ 时直接输入有时更方便。 + +%When your input file contains other embedded input files, the displayed +%information indicates when \TeX\ begins and ends processing each +%embedded file. +%^^{input files//embedded} +%\xrdef{infiles} +%\TeX\ displays a left parenthesis and the file name +%when it starts working on a file and displays the corresponding right +%parenthesis when it's done with the file. +%If you get any ^{error messages} in the displayed output, you can match +%them with a file by looking for the most recent unclosed left parenthesis. +当你的输入文件包含其他嵌入的输入文件时, +显示的信息中表明了 \TeX\ 何时开始和结束处理每个嵌入文件。 +^^{输入文件//嵌入输入文件} +\xrdef{infiles} +当 \TeX\ 开始处理一个文件时它显示一个左圆括号和该文件名, +而结束时显示一个对应的右圆括号。 +如果在所显示的输出中有任何^{错误信息}, +你就能从最接近的未配对左圆括号中确定是哪个文件引起的。 + +%For a more complete explanation of how to run \TeX, +%see \knuth{Chapter~6} and your ^{local information}. +%\eix^^{running \TeX} +要得到如何运行\TeX\ 的更完整解释, +可以见\knuth{第~6~章}以及你的^{本地信息}. +\eix^^{运行 \TeX} + + +%\section Preparing an input file +\section 准备输入文件 + +%In this section we explain some of the conventions that you must follow in +%preparing input for \TeX\null. Some of the information given here also +%appears in the examples in \chapterref{examples} of this book. +%^^{input, preparing} +在这一节中,我们解释准备 \TeX\ 输入文件时必须遵循的一些约定。 +其中的有些信息同样出现在本书\chapterref{examples}的例子中。 +^^{输入文件//准备输入文件} + +%\subsection Commands and control sequences +\subsection 命令和控制序列 + +%\bix^^{commands} +%\bix^^{control sequences} +%Input to \TeX\ consists of a sequence of commands that tell \TeX\ how to +%typeset your document. Most characters act as commands of a particularly +%simple kind: ``typeset me''. The letter `|a|', for instance, is a +%command to typeset an `a'. But there's another kind of command---a +%\emph{control sequence}---that gives \TeX\ a more elaborate +%instruction. A control sequence ordinarily starts with a backslash +%(|\|), though you can change that convention if you need to. +%\xrdef{@backslash} +%For instance, the input: +\bix^^{命令} +\bix^^{控制序列} +\TeX\ 的输入由一系列指引 \TeX\ 如何排版文档的命令组成。 +大部分字符如同一种特别简单的命令:``排版我''。 +比如,字母 `|a|' 是作为命令将排版出 `a'。 +但有另一种命令——\emph{控制序列}(control sequence)——将给 \TeX\ 提供更细致的指令。 +控制序列通常以反斜杠(|\|)开头,但必要时你也可以更改此约定。 +\xrdef{@backslash} +例如,下列输入: + +%\csdisplay +%She plunged a dagger (\dag) into the villain's heart. +%| +%contains the control sequence |\dag|; it produces the typeset output: +%\display{% +%She plunged a dagger (\dag) into the villain's heart. +%} +%\noindent Everything in this example except for the |\dag| and the spaces +%acts like a ``typeset me'' command. We'll explain more about spaces +%on \xrefpg{spaces}. +\csdisplay +She plunged a dagger (\dag) into the villain's heart. +| +包含一个控制序列|\dag|;它排版出下列的输出: +\display{% +She plunged a dagger (\dag) into the villain's heart. +} +\noindent 在这个例子中, +除 |\dag| 和空格之外的每个字符都如同一个``排版我''命令。 +在\xrefpg{spaces}中我们将更详细地解释空格的作用。 + +%There are two kinds of control sequences: \emph{control words} +%^^{control words} +%and \emph{control symbols}: +%^^{control symbols} +%\ulist\compact +%\li A control word consists of a +%backslash followed by one or more letters, e.g., `|\dag|'. +%The first character that isn't a letter marks the end +%of the control word. +%\li A control symbol consists of a backslash followed by a single character +%that isn't a letter, e.g., `|\$|'. +%The character can be a space or even the end of a line (which is a perfectly +%legitimate character). +%\endulist +控制序列可分为\emph{控制词}(control word)^^{控制词}% +和\emph{控制符}(control symbol)^^{控制符}这两种类型: +\ulist\compact +\li 控制词由反斜杠后跟一个或多个字母组成,例如`|\dag|'。 +其后用一个非字母字符结束该控制词。 +\li 控制符由反斜杠后跟一个单个的非字母字符组成,例如`|\$|'。 +该非字母字符可以是空格符,甚或是行结束符(这也是合乎规则的字符)。 +\endulist +%\noindent +%A control word (but not a control symbol) +%absorbs any spaces or ends of line that follow it. +%^^{control sequences//absorbing spaces} +%If you don't want to lose a space after a control word, +%follow the control sequence with a ^{control space} +%(|\!visiblespace|) or with `|{}|'. Thus either: +%\csdisplay +%The wonders of \TeX\!visiblespace!.shall never cease!! +%| +%or:\hfil\ +%\csdisplay +%The wonders of \TeX{} shall never cease!! +%| +%produces: +%\display{% +%The wonders of \TeX{} shall never cease! +%} +%\noindent rather than: +%\display{% +%The wonders of \TeX shall never cease! +%} +%\noindent +%which is what you'd get if you left out the `|\|\visiblespace' +%or the `|{}|'. +\noindent +控制词后的任何空格或行结束符将被忽略(但控制符后不会这样)。 +^^{控制序列//忽略空格} +如果你真要在控制词后得到一个空格, +可以在该控制词后键入一个^{控制空格}(|\!visiblespace|)或者`|{}|'。 +因而这样输入: +\csdisplay +The wonders of \TeX\!visiblespace!.shall never cease!! +| +或者这样输入:\hfil\ +\csdisplay +The wonders of \TeX{} shall never cease!! +| +将得到同样的结果: +\display{% +The wonders of \TeX{} shall never cease! +} +\noindent 作为对比,下面的结果: +\display{% +The wonders of \TeX shall never cease! +} +\noindent +是你去掉上面输入中的`|\|\visiblespace'或者`|{}|'后得到的。 + +%Don't run a control word together with the text that follows it---\TeX\ +%won't know where the control word ends. For instance, the |\c| control +%sequence places a cedilla accent on the character that follows it. The +%French word {\it gar\c con\/} must be typed as +%`|gar\c!visiblespace!.con|', not `|gar\ccon|'; if you write the latter, +%\TeX\ will complain about an undefined control sequence |\ccon|. +不要将控制词和其后的文本连在一起---这样\TeX\ 无法知道控制词在哪里结束。 +比如,控制词|\c|给其后的字符加上软音符。 +要得到法文单词{\it gar\c con\/},你必须输入`|gar\c!visiblespace!.con|', +而不是`|gar\ccon|';若你输入后者,\TeX\ 将抱怨有未定义的控制序列|\ccon|。 + +%A control symbol, on the other hand, doesn't absorb anything that +%follows it. Thus you must type `\$13.56' as `|\$13.56|', not +%`|\$!vs13.56|'; the latter form would produce `\hbox{\$ 13.56}'. +%However, those accenting commands that are named by control symbols are +%defined in such a way that they produce the effect of absorbing a +%following space. Thus, for example, you can type the French word {\it +%d\'eshabiller\/} either as `|d\'eshabiller|' or as +%`|d\'!visiblespace!.eshabiller|'. +另一方面,控制符后面的任何字符都不会被忽略。 +因此,要得到`\$13.56'你必须键入`|\$13.56|', +而不是`|\$!vs13.56|';后者将生成`\hbox{\$ 13.56}'。 +然而,那些作为控制符的重音命令,是以忽略其后空格的方式定义的。 +例如,要得到法文单词{\it d\'eshabiller\/},键入`|d\'eshabiller|', +或者`|d\'!visiblespace!.eshabiller|'都可以。 + +%Every control sequence is also a command, +%but not the other way around. +%^^{commands//versus control sequences} +%^^{control sequences//versus commands} +%For instance, the letter `|N|' +%is a command, but it isn't a control sequence. +%In this book we ordinarily use ``command'' rather than +%``control sequence'' when either term would do. +%We use ``control sequence'' when we want to emphasize aspects of \TeX\ +%syntax that don't apply to commands in general. +每个控制序列同时也是一个命令,但反之未必。 +^^{命令//与控制序列对比} +^^{控制序列//与命令对比} +例如字母`|N|'是一个命令,但它不是一个控制序列。 +在本书里面,当两者都适用时我们用``命令''而不用``控制序列''。 +在强调 \TeX\ 的语法层面时,我们用``控制序列'', +因为此时用``命令''一般并不合适。 + +%\eix^^{control sequences} +%\eix^^{commands} +\eix^^{控制序列} +\eix^^{命令} + +%\subsection Arguments +\subsection 参量 + +%\xrdef{arg1} +%Some commands need to be followed by one or more +%\emph{arguments} ^^{arguments} +%that help to determine what the command does. +%For instance, the |\vskip| command, which +%tells \TeX\ to skip down (or up) the page, +%expects an argument specifying how much space to skip. To skip +%down two inches, you would type `|\vskip 2in|', where |2in| +%is the argument of |\vskip|. +\xrdef{arg1} +有些命令的运行依赖于其后的一个或多个\emph{参量}(argument)^^{参量}。 +例如,|\vskip|命令告诉 \TeX\ 在页面中往上(或往下)跳过一定间距, +它需要一个参量来指定所跳过间距的大小。 +要往下跳过两英寸,你需要键入`|\vskip 2in|', +其中的|2in|就是|\vskip|的参量。 + +%Different commands expect different kinds of arguments. Many commands +%expect dimensions, such as the |2in| in the example above. +%Some commands, particularly those defined by macros, +%expect arguments that are either a single character or some +%text enclosed in braces. +%Yet others require that their arguments be enclosed in braces, i.e., +%they don't accept single-character arguments. +%The description of each command in this book tells you what kinds of arguments, +%if any, the command expects. +%In some cases, required braces define a group (see \xref{bracegroup}). +不同的命令要求不同类型的参量。 +很多命令的参量要求是长度值,比如上面例子中的|2in|。 +有些命令,特别是用宏定义的命令, +其参量可以是单个字符或者放在花括号中的文本。 +而对其他有些命令,其参量只能放在花括号中,而不能是单个字符。 +在本书对各个命令的描述中,若一个命令需要参量, +我们都说明了该命令所需参量的类型。 +在有些情形中,命令的参量所需的花括号定义了一个编组(见\xref{bracegroup})。 + +%\secondprinting{\vfill\eject} + + +%\subsection Parameters +\subsection 参数 + +%\xrdef{introparms} +%Some commands are parameters (\xref{parameter}). +%^^{parameters//as commands} +%You can use a parameter in either of two ways: +%\olist +%\li You can use the value of a parameter +%as an argument to another command. For example, the command +%\hbox{|\vskip\parskip|} +%causes a vertical skip by the value of the |\parskip| (paragraph skip) +%glue parameter. +%\li You can change the value of the parameter by assigning +%something to it. For example, the assignment \hbox{|\hbadness=200|} +%causes the value of the |\hbadness| number parameter to be $200$. +%\endolist +%\noindent +%We also use the term ``parameter'' to refer to entities such as |\pageno| +%that are actually registers but behave just like parameters. +%^^{registers//parameters as} +\xrdef{introparms} +有些命令实际上是参数(parameter,见\xref{参数})。 +^^{参数//作为命令} +你可以按下面两种方式使用这种参数: +\olist +\li 将该参数的值用作其他命令的参量。 +例如 \hbox{|\vskip\parskip|} 这个命令生成大小% +等于粘连参数|\parskip|(段落间距)的竖直间距。 +\li 通过赋值修改该参数的值。 +例如 \hbox{|\hbadness=200|} 这个赋值使得|\hbadness|参数的值变为$200$. +\endolist +\noindent +有些命令,例如|\pageno|,虽然是寄存器但和参数的用法一样。 +因此我们同样使用``参数''这个术语来指代这些命令。 +^^{寄存器//作为参数} + +%Some commands are names of tables. These commands are used like +%parameters, except that they require an additional argument that +%specifies a particular entry in the table. For example, |\catcode| names +%a table of category codes (\xref{category code}). Thus +%the command +%\hbox{|\catcode`~=13|} sets the category code of the `|~|' +%character to $13$. +有些命令是表名。这些命令的用法和参数类似, +只是它们需要额外的参量指定表格项。 +例如,|\catcode| 是类别码表格的名称(\xref{类别码})。 +因此,\hbox{|\catcode`~=13|} 这个命令设置字符`|~|'的类别码为$13$。 + + +%\subsection Spaces +\subsection 空格 + +%\xrdef{spaces} +%\bix^^{spaces} +%You can freely use extra spaces in your input. Under nearly all circumstances +%\TeX\ treats several spaces in a row as being equivalent to a +%single space. For instance, it doesn't matter whether you put one space +%or two spaces after a ^{period} in your input. Whichever you do, \TeX\ +%performs its end-of-sentence maneuvers and leaves the appropriate +%(in most cases) amount of space after the period. +%\TeX\ also treats the end of an input line as equivalent to a space. +%Thus you can end your input lines wherever it's convenient---% +%\TeX\ makes input +%lines into +%paragraphs in the same way no matter where the line breaks are in your +%input. +\xrdef{spaces} +\bix^^{空格} +在输入文件中你可以任意加上额外的空格。 +在几乎所有情形中 \TeX\ 都将同一行的连续多个空格看成一个空格。 +例如,在^{句号}后加上一个或两个空格是没有差别的。 +不论按照哪种写法,\TeX\ 都会执行其句子结束操作, +并在句号后加上适当(在多数情形下)大小的间隔。 +\TeX\ 同样将输入中的行结束符视为一个空格。 +因此在输入时你可以在方便的地方换行——% +\TeX\ 按照此方式将各输入行转换为段落,而不在乎输入中的换行位置。 + +%A blank line in your input marks the end of a paragraph. +%^^{paragraphs//ending} +%Several blank lines are equivalent to a single one. +输入中的一个空行结束当前段落。 +^^{段落//结束段落} +多个空行也等同于一个空行。 + +%\TeX\ ignores input spaces within math formulas (see below). Thus you can +%include or omit spaces anywhere within a math formula---\TeX\ doesn't care. +%Even within a math formula, however, +%you must not run a control word together with a following letter. +\TeX\ 忽略数学公式中的空格(见后面)。 +因此,你可以加上或者省去公式中的空格——\TeX\ 不在乎这个。 +但即使在数学公式中,你也不要将控制词和其后的字母连在一起。 + +%If you are defining your own macros, you need to be particularly careful about +%where you put ends of line in their definitions. +%It's all too easy to define a macro that produces an +%^{unwanted space} in addition to whatever else it's supposed to produce. +%We discuss this problem elsewhere since it's somewhat +%technical; see \xrefpg{unwantedspace}. +在定义自己的宏时,你必须小心定义中的行结束符位置。 +因为一不小心该宏就在你希望的空格之外生成了^{不需要的空格}。 +因为这是个有些技术性的问题,我们在其他地方也讨论到此问题;见\xrefpg{unwantedspace}。 + +%A space or its equivalent between two words in your input doesn't simply turn +%into a space character in your output. +%A few of these input spaces turn into ends of lines +%in the output, +%since input lines generally don't correspond to output lines. +%The others turn into spaces of variable width called ``glue'' (\xref{glue}), +%which has a natural size (the size it ``wants to be'') +%but can stretch or shrink. +%When \TeX\ is typesetting a paragraph +%that is supposed to have an even right margin (the usual +%case), it adjusts the widths of the glue in each line +%to get the lines to end at the margin. +%(The last line of a paragraph is an exception, since it isn't ordinarily +%required to end at the right margin.) +输入文件中两单词间的一个空格或其等价字符, +并不简单地变成输出中的一个空格。 +由于输入行和输出行通常不会正好对应, +输入中的这些空格有的变成输出中的行结束符, +另外有些空格则变成宽度可变的间隔即``粘连'' (\xref{粘连}); +粘连有其自然宽度(它希望的宽度),但也可以伸展或者收缩。 +\TeX\ 排版要求右页边对齐(通常如此)的段落时, +将调整各行的粘连的宽度以让各行正好在页边结束。% +(段落的最后一行是个例外,因为一般不要求它在右页边结束。) + +%You can prevent an input space from turning into an end of line by using a +%^{tie} (^|~|). +%For example, you wouldn't want \TeX\ to put a line break between the +%`Fig.' and `8' of `Fig.~8'. +%By typing `|Fig.~8|' you can prevent such a line break. +%\eix^^{spaces} +%\needspace{2in} +要阻止输入中的空格在输出中变成行结束符,你可以用^{带子} (^|~|)。 +比如,你不会希望 \TeX\ 在`Fig.~8'的 `Fig.' 和 `8' 之间断行。 +输入 `|Fig.~8|' 就可以禁止这样断行。 +\eix^^{空格} +%\needspace{2in} + +%\subsection Comments +\subsection 注释 + +%\xrdef{comments} +%\pix\bix^^{comments} +%You can include comments in your \TeX\ input. +%When \TeX\ sees a comment it just passes over it, so +%what's in a comment doesn't affect your typeset document in any way. +%Comments are useful for +%providing extra information about what's in your input file. +%For example: +%\csdisplay +%% ========= Start of Section `Hedgehog' ========= +%| +\xrdef{comments} +\pix\bix^^{注释} +在\TeX\ 输入中可以包含注释。\TeX\ 跳过它所碰到的注释, +因此注释中的内容不会以任何方式影响到排版的文档。 +注释用于在输入文件中提供更多的信息。 +例如: +\csdisplay +% ========= Start of Section `Hedgehog' ========= +| + +%{\indexchar % }% +%A comment starts with a percent sign (|%|) and extends to the end of the +%input line. +%\TeX\ ignores not just the comment but the end of the line as well, so +%comments have another very +%important use: connecting two lines so that the end of line +%^^{line breaks//deleting} +%between them is invisible to \TeX\ and doesn't generate +%an output space or an end of line. +%For instance, if you type: +%\csdisplay +%A fool with a spread% +%sheet is still a fool. +%| +%you'll get: +%\display{ +%A fool with a spread% +%sheet is still a fool. +%} +%\eix^^{comments} +{\indexchar % }% +注释以百分号(|%|)开始,一直延续到该输入行结束。 +\TeX\ 既忽略注释也忽略该行的结束符, +因此注释有另外的重要用法:将两个输入行连接起来, +^^{断行//删除断行} +使得 \TeX\ 看不到两行间的行结束符, +从而不会在输出中生成空格或换行。 +例如,对如下的输入: +\csdisplay +A fool with a spread% +sheet is still a fool. +| +你得到的输出为: +\display{ +A fool with a spread% +sheet is still a fool. +} +\eix^^{注释} + +%\subsection Punctuation +\subsection 标点 + +%\null +%\xrdef{periodspacing} +%\TeX\ normally adds some extra space after what it thinks is a +%^{punctuation} mark at the end of a sentence, +%namely, `^|.|', `^|?|', or `|!!|' \indexchar ! +%^^{period} ^^{question mark} ^^{exclamation point} +%followed by an input space. +%\TeX\ doesn't add +%the extra space if the punctuation mark follows +%a capital letter, though, because it assumes the capital +%letter to be an initial in someone's name. +%You can force the extra space where it wouldn't otherwise occur by +%typing something like: +%\csdisplay +%A computer from IBM\null? +%| +\null +\xrdef{periodspacing} +若 `^|.|',`^|?|' 或 `|!!|' 之后有个输入空格,\indexchar ! +^^{句号} ^^{问号} ^^{感叹号} +\TeX\ 认为它是句末^{标点}符号,并在其后添加额外间隔。 +但若该标点符号之前为大写字母,\TeX\ 就不会添加额外间隔, +因为它认为大写字母是人名的首字母。 +如若不然你可以强制生成额外间隔,例如: +\csdisplay +A computer from IBM\null? +| +%The |\null| doesn't produce any output, but it does prevent \TeX\ +%from associating the capital `M' with the question mark. +%On the other hand, you can cancel the +%extra space where it doesn't belong by typing a control space +%after the punctuation mark, e.g.: +%\csdisplay +%Proc.\!visiblespace!.Royal Acad.\!visiblespace!.of Twits +%| +%so that you'll get: +%\display{Proc.\ Royal Acad.\ of Twits} +%\noindent rather than: +%\display{Proc. Royal Acad. of Twits} +命令 |\null| 不生成任何输出, +但它阻止 \TeX\ 将大写字母`M'和问号结合在一起。 +反过来,如果某标点符号不为句末标点, +你也能够取消该标点之后的额外间隔; +这可以通过在其后键入控制空格达到,例如: +\csdisplay +Proc.\!visiblespace!.Royal Acad.\!visiblespace!.of Twits +| +得到的正确结果为: +\display{Proc.\ Royal Acad.\ of Twits} +\noindent 而去掉控制空格后的结果是: +\display{Proc. Royal Acad. of Twits} + +%Some people prefer not to leave more space after punctuation at the +%end of a sentence. You can get this effect with the +%^|\frenchspacing| command (\xref\frenchspacing). +%|\frenchspacing| is often recommended for ^{bibliographies}. +有些人更喜欢不在句末标点后留下更多间隔。 +利用 ^|\frenchspacing| 命令(\xref\frenchspacing )你就可达成此效果。 +在^{参考文献}中通常建议使用这个 |\frenchspacing| 命令。 + +%For single ^{quotation marks}, you should use the left and right +%single quotes +%(|`| and |'|) on your keyboard. For left and right +%double quotation marks, use two left single +%quotes or two right single quotes (|``| or |''|) rather +%than the double quote (|"|) on your keyboard. +%The keyboard double quote +%will in fact give you a right double quotation mark in +%many fonts, but the two right single quotes +%are the preferred \TeX\ style. +%For example: +对于单^{引号}, 用键盘上的左右单引号(|`| 和 |'|)就可以得到。 +对于左双引号或右双引号, +需要用两个左单引号(|``|)或右单引号(|''|)得到, +不能直接用键盘上的双引号(|"|)。 +键盘上的双引号在多数字体中将得到一个右双引号, +但两个右单引号是 \TeX\ 中首选的写法。例如: + +%\vbox{% +%\csdisplay +%There is no `q' in this sentence. +%``Talk, child,'' said the Unicorn. +%She said, ``\thinspace`Enough!!', he said.'' +%| +%}% +%These three lines yield: +%\display{\par\restoreplainTeX +%There is no `q' in this sentence. +%\par ``Talk, child,'' said the Unicorn. +%\par She said, ``\thinspace`Enough!', he said.'' +%} +%\noindent +%The |\thinspace| in the third input line prevents +%the single quotation mark from coming +%too close to the double quotation marks. +%Without it, you'd just see three +%nearly equally spaced quotation marks in a row. +\vbox{% +\csdisplay +There is no `q' in this sentence. +``Talk, child,'' said the Unicorn. +She said, ``\thinspace`Enough!!', he said.'' +| +}% +这三行输入得到的结果为: +\display{\par\restoreplainTeX +There is no `q' in this sentence. +\par ``Talk, child,'' said the Unicorn. +\par She said, ``\thinspace`Enough!', he said.'' +} +\noindent +第三个输入行中的 |\thinspace| 避免单引号和双引号太过靠近。 +否则,你将看到三个并排的间隔相近的引号。 + +%\TeX\ has three kinds of ^{dashes}: +%\ulist\compact +%\li Short ones (hyphens) like this ( - ). You get them by typing~`^|-|'. +%\li Medium ones (en-dashes) like this ( -- ). You get them by typing~`^|--|'. +%\li Long ones (em-dashes) like this ( --- ). You get them by typing~`^|---|'. +%\endulist +%\noindent +%Typically you'd use hyphens to indicate compound words like +%``will-o'-the-wisp'', +%en-dashes to indicate +%page ranges such as ``pages~81--87'', and em-dashes to indicate +%a break in continuity---like this. +在 \TeX\ 中有三种^{横线号}(dash): +\ulist\compact +\li 短横线即连字号(hyphen)如这样( - )。键入~`^|-|'~可以得到。 +\li 中横线即连接号(en-dash)如这样( -- )。键入~`^|--|'~可以得到。 +\li 长横线即破折号(em-dash)如这样( --- )。键入~`^|---|'~可以得到。 +\endulist +\noindent +一般地,你将用连字号表示像“will-o'-the-wisp”(鬼火)这样的复合词, +用连接号表示像“第~81--87~页”这样的页码起止, +而用破折号表示语气转折\null{---}像这样。 +% 用 \null 和 {} 绕开 xecjk 的问题 + + +%\subsection Special characters +\subsection 特殊字符 + +%Certain characters have special meaning to \TeX, so you shouldn't use them +%in ordinary text. They are: +在 \TeX\ 中某些字符有特殊的含义, +因而不能在普通文本中使用。这些特殊字符为: + +%\csdisplay +% $ # & % _ ^ ~ { } \ +%| +%^^|$//in ordinary text| +%^^|#//in ordinary text| +%^^|&//in ordinary text| +%^^|_//in ordinary text| +%^^|^//in ordinary text| +%^^|~//in ordinary text| +%^^|%//in ordinary text| +%^^|{//in ordinary text| +%^^|}//in ordinary text| +%{\recat!ttidxref[\//in ordinary text]] +%\noindent +%In order to produce them in your typeset document, +%you need to use circumlocutions. For the first five, +%you should instead type: +%^^|\$| +%^^|\#| +%^^|\&| +%^^|\%| +%^^|\_| +%\csdisplay +% \$ \# \& \% \_ +%| +\csdisplay + $ # & % _ ^ ~ { } \ +| +\ifoldeplain +^^|$//在普通文本中| +^^|#//在普通文本中| +^^|&//在普通文本中| +^^|_//在普通文本中| +^^|^//在普通文本中| +^^|~//在普通文本中| +^^|%//在普通文本中| +^^|{//在普通文本中| +^^|}//在普通文本中| +{\recat!ttidxref[\//在普通文本中]] +\fi +\noindent +要在排版的文档中生成它们,你需要使用间接的方法。 +对前面五个字符,你需要键入: +\ifoldeplain +^^|\$| +^^|\#| +^^|\&| +^^|\%| +^^|\_| +\fi +\csdisplay + \$ \# \& \% \_ +| + +%\noindent +%For the others, you need something more elaborate: +\noindent +而对另外五个字符,你需要键入更多: + +\csdisplay + \^{!visiblespace} \~{!visiblespace} $\{$ $\}$ $\backslash$ +| + + +%\subsection Groups +\subsection 编组 + +%\bix^^{groups} +%A \emph{group} +%consists of material enclosed in matching left and right braces (|{| and +%|}|). +%^^|{//starting a group| +%^^|}//ending a group| +%By placing a command within a group, you can limit its effects to +%the material within the group. +%For instance, the |\bf| command tells \TeX\ to set +%something in {\bf boldface} type. If you were to put |\bf| into your input +%and do nothing else to counteract it, everything in your document following the +%|\bf| would be set in boldface. +%By enclosing |\bf| in a group, +%you limit its effect to the group. For example, if you type: +%\csdisplay +%We have {\bf a few boldface words} in this sentence. +%| +%\noindent you'll get: +%\display{We have {\bf a few boldface words} in this sentence.} +\bix^^{编组} +包含在配对的左右花括号(|{| 和 |}|)中的内容组成一个\emph{编组}。 +^^|{//开始编组| +^^|}//结束编组| +编组内部的命令,其作用范围被限制在该编组内部。 +例如,|\bf| 命令让 \TeX\ 将某些内容用粗体显示。 +如果你将 |\bf| 放在你的输入中,而没有用任何方式取消它, +|\bf| 之后的所有内容都将以粗体显示。 +如果将 |\bf| 包含在一个编组中, +就可以将它的作用限制在此编组中。 +比如,如果你键入: +\csdisplay +We have {\bf a few boldface words} in this sentence. +| +\noindent 你将会得到如下的结果: +\display{We have {\bf a few boldface words} in this sentence.} + +%\noindent You can also use a group to limit the effect of +%an assignment to one of \TeX's parameters. +%These parameters contain values that affect how \TeX\ typesets your document. +%For example, the value of the |\parindent| +%parameter specifies the indentation at the beginning of a paragraph. +%The assignment |\parindent = 15pt| +%sets the indentation to $15$ printer's points. +%By placing this assignment at the beginning +%of a group containing a few paragraphs, you can change +%the indentation of just those paragraphs. If you don't enclose +%the assignment in a group, +%the changed indentation will apply to the rest of the document (or up to the +%next assignment to |\parindent|, if there's a later one). +\noindent 利用编组,你可以限制 \TeX\ 某个参数的取值的作用范围。 +这些参数的取值影响 \TeX\ 对文档的排版。 +例如,|\parindent| 参数的值指定了段首缩进量, +赋值 |\parindent = 15pt| 将设定该缩进量为 $15$ 点。 +若将该赋值放在包含几个段落的编组开始处, +你就可以仅仅改变这几个段落的段首缩进。 +若不将该赋值包含在编组中, +对缩进量的修改将作用到文档的剩余部分% +(或者作用到下个对|\parindent|的赋值为止,若还有下个赋值的话)。 + +%\xrdef{bracegroup} +%Not all pairs of braces indicate a group. +%In particular, the braces associated with an argument for which the +%braces are \emph{not} required don't indicate a group---they just +%serve to delimit the argument. +%Of those commands that do require braces for their arguments, +%some treat the braces as defining a group +%and the others interpret the argument in some special way that depends on +%the command.\footnote +%{More precisely, for primitive commands either +%the braces define a group or they enclose tokens that aren't processed in +%\TeX's stomach. +%For |\halign| and |\valign| the group has a trivial +%effect because everything within the braces either doesn't reach the stomach +%(because it's in the template) or is enclosed in a further inner group. +%^^|\halign//grouping for| +%^^|\valign//grouping for| +%} +%\eix^^{groups} +\xrdef{bracegroup} +并非所有配对花括号都表示一个编组。 +特别地,若参量\emph{不要求}有花括号, +则与该参量一起的花括号并不表示一个编组% +——它们仅用于确定该参量的界限。 +对于那些参量中确实需要花括号的命令, +有些命令将花括号作为编组的定义, +而其他命令用各自的特殊方式解释该参量。\footnote +{更准确地说,对于原始命令, +花括号要么定义了一个编组,要么不会在 \TeX\ 的胃中被处理。 +对于 |\halign| 和 |\valign| 命令,编组只有平凡的效果; +这是由于编组中的一切东西要么不会到达胃里(因为它在模板中), +要么包含在更深一层的编组中。 +^^|\halign//阵列中的编组| +^^|\valign//阵列中的编组| +} +\eix^^{编组} + + +%\subsection Math formulas +\subsection 数学公式 + +%\bix^^{math} +%\xrdef{mathform} +%A math formula can appear in text (\emph{text math}) +%^^{text math} +%or set off on a line by itself +%with extra vertical space around it (\emph{display math}). +%^^{display math} +%You enclose a text formula in single dollar signs (|$|) +%and a displayed formula in double dollar signs (|$$|). +%\ttidxref{$}\ttidxref{$$} +%For example: +\bix^^{数学} +\xrdef{mathform} +数学公式可以出现在正文中(\emph{文内公式}), +^^{文内公式} +或者出现在留出额外上下间距的单独一行中(\emph{陈列公式})。 +^^{陈列公式} +文内公式两边用单个美元符(|$|)括起来, +而陈列公式两边用双个美元符(|$$|)括起来。 +\ifoldeplain\ttidxref{$}\ttidxref{$$}\fi +例如: + +%\csdisplay +%If $a<b$, then the relation $$e^a < e^b$$ holds. +%| +%\noindent This input produces: +%\display{\centereddisplays +%If $a<b$, then the relation $$e^a < e^b$$ holds.} +%\smallskip +%\noindent \chapterref{math} describes the commands that are useful +%in math formulas. +%\eix^^{math} +\csdisplay +If $a<b$, then the relation $$e^a < e^b$$ holds. +| +\noindent 此输入得到的结果是: +\display{\centereddisplays +If $a<b$, then the relation $$e^a < e^b$$ holds.} +\smallskip +\noindent \chapterref{math}描述了数学公式中常用的命令。 +\eix^^{数学} + + +%\section How \TeX\ works +\section \TeX\ 如何工作 + +%In order to use \TeX\ effectively, it helps to +%have some idea of how \TeX\ goes about +%its activity of transmuting input into output. +%You can imagine \TeX\ as a kind of organism with ``eyes'', +%``mouth'', ``gullet'', +%``stomach'', and ``intestines''. +%Each part of the organism transforms its input in some way and passes +%the transformed input to the next stage. +为了更有效地使用 \TeX , +对 \TeX\ 着手将输入转换为输出的活动有所了解是有益的。 +你可以将 \TeX\ 想象为一种有“眼睛”、“嘴巴”、“食道”、“胃”以及“肠道”的生物体。 +该生物体的每个器官都以某种方式转换它的输入,并将转换的结果送到下个器官中。 + +%The ^{eyes} transform an input file into a sequence of characters. +%The ^{mouth} transforms the sequence of characters into a sequence of +%\emph{tokens}, +%^^{tokens} +%where each token is either a single character or a control sequence. +%^^{control sequences//as tokens} +%The gullet expands the tokens into a sequence of +%\emph{primitive commands}, which are also tokens. +%^^{expanding tokens} +%The ^{stomach} carries out the operations specified by the primitive commands, +%producing a sequence of pages. +%Finally, the ^{intestines} transform each page into the form required +%for the \dvifile\ and send it there. +%^^{\dvifile//created by \TeX's intestines} +%These actions are described in more detail +%in \chapterref{concepts} under \conceptcit{\anatomy}. +%^^{\anatomy} +^{眼睛}将输入文件转换为一系列字符。 +^{嘴巴}将这串字符转换为一系列\emph{记号}, +^^{记号} +其中每个记号是单个字符或者一个控制序列。 +^^{控制序列//作为记号} +食道将该串记号展开为一系列\emph{原始命令}记号。 +^^{展开记号} +^{胃}执行原始命令指定的操作,生成一些页面。 +最后,^{肠道}将每个页面转换为 \dvifile 所需的形式并发送给它。 +^^{\dvifile//由 \TeX\ 的肠道生成} +这些活动在\chapterref{concepts}的\conceptcit{\anatomy}中有更详细的描述。 +^^{\anatomy} + +%The real typesetting goes on in the stomach. +%The commands instruct \TeX\ to typeset such-and-such a character in +%such-and-such a font, to insert an interword space, to end a paragraph, and +%so on. +%Starting with individual typeset characters and other simple typographic +%elements, \TeX\ builds up a page ^^{pages} as a nest of +%^{boxes} within boxes within boxes \seeconcept{box}. +%Each typeset character occupies a box, and so does an entire page. +%A box can contain not just smaller boxes but also \emph{glue} ^^{glue} +%(\xref{glue}) and a few other things. +%The glue produces +%space between the smaller boxes. +%An important property of glue is that it can stretch and shrink; +%thus \TeX\ can make a box +%larger or smaller by stretching or shrinking +%the glue within~it. +实际的排版活动出现在胃中。 +这些命令指导 \TeX\ 用这样或那样的字体排版这个或那个字符, +插入单词间空隔,结束一个段落,等等。 +从单个排版字符及其他简单排印元素开始, +\TeX\ 将^{盒子}一层层放入其他盒子中\seeconcept{盒子}, +这一整套盒子构造了一个页面^^{页面}。 +每个排版字符占用一个盒子,整个页面也一样。 +盒子中不仅包含更小的盒子,也包含\emph{粘连}^^{粘连} +(\xref{粘连})和一些其他东西。 +粘连生成小盒子之间的间距。 +粘连的一个重要属性在于它可以伸展和收缩; +因此通过伸缩盒子中的粘连,\TeX\ 可以让盒子变大或变小。 + +%Roughly speaking, a line is a box containing a sequence of character boxes, +%and a page is a box containing a sequence of line boxes. +%There's glue between the words of a line and between the lines of a page. +%\TeX\ stretches or shrinks +%the glue on each line so as to make the right margin +%of the page come out even and the glue on each page +%so as to make the bottom margins of different pages be equal. +%Other kinds of typographical elements can also appear in a line or in a page, +%but we won't go into them here. +粗略说来,文本行是一个包含一系列字符盒子的盒子, +而页面是一个包含一系列行盒子的盒子。 +一行的各单词之间以及页面的各行之间都有粘连。 +\TeX\ 伸缩各行中的粘连以让右页边对齐, +伸缩各页中的粘连以让各页的下边距相等。 +其他类型的排印元素也可以出现在行内或页内,但我们不在这里讨论。 + +%As part of the process of assembling pages, \TeX\ needs to break paragraphs +%into lines and lines into pages. The stomach first sees a paragraph as one +%long line, in effect. It inserts \emph{line breaks} +%^^{line breaking} +%in order to transform +%the paragraph into a sequence of lines of the right length, performing a +%rather elaborate analysis in order to choose the set of breaks +%that makes the paragraph look best +%\seeconcept{line break}. +%The stomach carries out a similar +%but simpler process in order to transform a sequence of lines into a page. +%Essentially the stomach accumulates lines until no more lines can fit on the +%page. It then chooses a single place to break the page, putting the lines +%before the break on the current page +%and saving the lines after the break for the +%next page \seeconcept{page break}. ^^{page breaks//inserted by \TeX's stomach} +作为组装页面过程的一部分, +\TeX\ 需要将段落分为多行,将多行组成页面。 +事实上,\TeX\ 的胃刚开始将段落看成一个很长的行。 +它插入\emph{断行点}以将段落分为长度合适的一些行, +^^{断行} +通过复杂的分析以找到最佳的断行点的集合\seeconcept{断行点}。 +\TeX\ 的胃也执行类似但简单些的分析以将一些行组成页面。 +基本上,胃累加各行直到页面上放不下更多的行。 +然后它选择一个分页位置,将该分页位置之前的各行放在当前页面, +将之后的各行留给下个页面\seeconcept{分页点}。% +^^{分页//由 \TeX\ 的胃插入} + +%When \TeX\ is assembling an entity from a list of items (boxes, glue, etc.), +%it is in one of six +%\emph{modes} ^^{modes} (\xref{mode}). +%The kind of entity it is assembling defines the mode that it is in. +%There are two ordinary modes: ordinary horizontal mode for assembling +%paragraphs (before they are broken into lines) +%and ordinary vertical mode for assembling pages. +%There are two restricted modes: +%restricted horizontal mode for appending items horizontally to form +%a horizontal box +%and internal vertical mode for appending items vertically to form +%a vertical box (other than a page). +%Finally, there are two math modes: text math mode for assembling math formulas +%within a paragraph and display math mode for assembling math formulas that are +%displayed on lines by themselves (see ``Math formulas'', \xref{mathform}). +在 \TeX\ 组装一个列表项(盒子,粘连等)中的某个东西时, +它总处于六种\emph{模式}^^{模式}(\xref{模式})的其中一种模式中。 +它所组装的东西的类型定义了它所在的模式。 +首先有两种普通模式:普通水平模式用于组装段落(在它们分为多行之前), +普通竖直模式用于组装页面。 +其次有两种限制模式:受限水平模式用于水平地添加元素形成水平盒子, +内部竖直模式用于竖直地添加元素以形成竖直盒子(非页面盒子)。 +最后还有两种数学模式:文内数学模式用于组装段落内部的数学公式, +陈列数学模式用于组装单独一行显示的数学公式(见“数学公式”,\xref{mathform})。 + + +%\section New \TeX\ versus old {\TeX} +\section{新 \TeX\ 和老 \TeX} + +%\xrdef{newtex} +%In 1989 Knuth made a major revision to \TeX\ in order to +%adapt it to the +%character sets needed to support typesetting for languages other than +%English.\space ^^{foreign languages} +%The revision included a few minor extra features that could be added +%without disturbing anything else. +%This book describes ``^{\newTeX}''. +%If you're still using an older version +%of \TeX\ (version $2.991$ or earlier), +%you'll want to know what features of {\newTeX} you can't use. +%The following features aren't available in the older versions: +%\ulist\compact +%\li ^|\badness| (\xref\badness) +%\li ^|\emergencystretch| (\xref\emergencystretch) +%\li ^|\errorcontextlines| (\xref\errorcontextlines) +%\li ^|\holdinginserts| (\xref\holdinginserts) +%\li ^|\language|, ^|\setlanguage|, and |\new!-lan!-guage| +%(\pp\xrefn\language, \xrefn{\@newlanguage}) ^^|\newlanguage| +%\li ^|\lefthyphenmin| and ^|\righthyphenmin| (\xref\lefthyphenmin) +%\li ^|\noboundary| (\xref\noboundary) +%\li ^|\topglue| (\xref\topglue) +%\li The |^^|$xy$ notation for hexadecimal digits (\xref{hexchars}) +%\endulist +%\noindent +%We recommend that you obtain new \TeX\ if you can. +\xrdef{newtex} +在 1989 年,Knuth 对 \TeX\ 做了一次大幅修改, +使得它能够处理非英语排版所需的字符集。^^{外语} +这次修改还包括了一些额外的不干扰其它东西的小功能, +这本书介绍 ``^{\newTeX}''。 +如果你仍使用旧版本的 \TeX ($2.991$ 版或以前的版本), +你可能会想知道哪些 {\newTeX} 的功能你是没法使用的。 +以下这些功能无法在旧版中使用: +\ulist\compact +\li ^|\badness|(\xref\badness ) +\li ^|\emergencystretch|(\xref\emergencystretch ) +\li ^|\errorcontextlines|(\xref\errorcontextlines ) +\li ^|\holdinginserts|(\xref\holdinginserts ) +\li ^|\language|、^|\setlanguage| 和 |\new!-lan!-guage|% +(第 \xrefn\language 和 \xrefn{\@newlanguage}页)^^|\newlanguage| +\li ^|\lefthyphenmin| 和 ^|\righthyphenmin|(\xref\lefthyphenmin ) +\li ^|\noboundary|(\xref\noboundary ) +\li ^|\topglue|( \xref\topglue ) +\li 十六进制的数字表达方式 |^^|$xy$(\xref{hexchars}) +\endulist +\noindent +我们建议你尽可能地使用新版本的 \TeX 。 + +%\section Resources +\section 资源 + +%\xrdef{resources} +%A number of resources are available to help you in using \TeX. +%\texbook\ is the definitive source of information on \TeX: +\xrdef{resources} +有很多资源可以帮助你使用 \TeX ,其中 \texbook\ 是最可靠的 \TeX\ 信息来源。 + +%\smallskip +%{\narrower\noindent +%^{Knuth, Donald E.}, \texbook. Reading, Mass.: Addison-Wesley, 1984.\par} +%\smallskip +%\noindent +%Be sure to get the seventeenth printing (January 1990) or later; +%the earlier printings don't cover the features of new \TeX. +\smallskip +{\narrower\noindent +^{Knuth, Donald E.}, \texbook. Reading, Mass.: Addison-Wesley, 1984.\par} +\smallskip +\noindent +请务必使用第十七次(1990 年 1 月)及以后的印刷版本。 +早先的印刷版本不包括新 \TeX\ 的许多功能。 + +%^{\LaTeX} is a very popular collection of commands designed to simplify the use +%of \TeX. It is described in: +%\smallskip +%{\narrower\noindent\frenchspacing\spaceskip = 3.33pt plus 2pt minus 1.2pt +%^{Lamport, Leslie}, {\sl The \LaTeX\ Document Preparation System}. +%Reading, Mass.: Addison-Wesley, 1986.\par} +%\smallskip +%\noindent +%^{\AMSTeX} is the collection of commands adopted by the American Mathematical +%Society as a standard for submitting mathematical man\-u\-scripts +%electronically. +%It is described in: +%\smallskip +%{\narrower\noindent +%^{Spivak, Michael~D.}, {\sl The Joy of \TeX}. Providence, R.I.: +%American Mathematical Society, 1986. +%\par} +%\smallskip +%\noindent +%You can join the ^{\TUG} (TUG), which publishes a newsletter +%called {\it ^{TUGBoat}}. +%TUG is an excellent source not only for information about \TeX\ but also +%for collections of macros, including \AMSTeX. +%Its address is: +%\smallskip +%{\obeylines +%^{\TUG} +%c/o American Mathematical Society +%P.O. Box 9506 +%Providence, RI 02940 +%U.S.A. +%} +%\smallskip +%\noindent +%Finally, you can obtain copies of the ^|eplain.tex| macros +%described in \chapterref{eplain} as well as the macros used in typesetting +%this book. +%They are available through the Internet network by anonymous \ftp\ from the +%following hosts: +%{\obeylines\display{\tt +%labrea.stanford.edu [36.8.0.47] +%ics.uci.edu [128.195.1.1] +%june.cs.washington.edu [128.95.1.4]}} +^{\LaTeX} 是一套为了简化 \TeX\ 的使用而设计的命令集, +它在这本书里面有介绍\footnote{译注: 这本书中介绍的 \LaTeX\ 己经过时。}: +\smallskip +{\narrower\noindent\frenchspacing\spaceskip = 3.33pt plus 2pt minus 1.2pt +^{Lamport, Leslie}, {\sl The \LaTeX\ Document Preparation System}. +Reading, Mass.: Addison-Wesley, 1986.\par} +\smallskip +\noindent +^{\AMSTeX} 是一套美国数学学会定义的提交电子数学手稿的命令标准, +它在这里有介绍: +\smallskip +{\narrower\noindent +^{Spivak, Michael D.}, {\sl The Joy of \TeX}. Providence, R.I.: +American Mathematical Society, 1986. +\par} +\smallskip +\noindent +你可以加入 ^{\TUG}(TUG),这个组织出版一本名为 {\it ^{TUGBoad}} 的通讯。 +TUG 是一个很好的信息来源渠道,它同时也提供包括 \AMSTeX\ 在内的很多 \TeX\ 宏包资源。 +它的地址是: +\smallskip +{\obeylines +^{\TUG} +c/o American Mathematical Society +P.O. Box 9506 +Providence, RI 02940 +U.S.A. +} +\smallskip +\noindent +最后,你可以获取在\chapterref{eplain}介绍的用来排版本书的宏包 ^|eplain.tex|。 +它可以通过使用 \ftp 匿名登录获取: +{\obeylines\display{\tt +labrea.stanford.edu [36.8.0.47] +ics.uci.edu [128.195.1.1] +june.cs.washington.edu [128.95.1.4]}} + +%The electronic version includes additional macros +%that format input for the +%^{\BibTeX}\ computer program, written by Oren Patashnik at Stanford +%University, ^^{Patashnik, Oren} +%and print the output from that program. +%If you find bugs in the macros, or think of improvements, you can send +%electronic mail to Karl at {\tt karl@cs.umb.edu}. +电子版本还包括了为 ^{\BibTeX} 程序处理输入并排印其输出的宏—— +\thinspace\BibTeX 程序是斯坦弗大学的 Oren Patashnik ^^{Patashnik, Oren} 编写的。 +如果你在这个宏包中发现了错误,或者想改进它, +你可以给 Karl 发电子邮件。Karl 的电子邮箱地址是 {\tt karl@cs.umb.edu}。 + +%The macros are also available for US \$10.00 on $5\frac1/4$\inches\ +%or $3\frac1/2$\inches\ PC-format diskettes from: +%\smallskip +%{\obeylines +%Paul Abrahams +%214 River Road +%Deerfield, MA 01342 +%\vskip\tinyskipamount +%Email: {\tt Abrahams\%Wayne-MTS@um.cc.umich.edu} +%} +%\smallskip +%\noindent +%These addresses are correct as of June 1990; please be aware that they may +%change after that, particularly the electronic addresses. +这个宏包还提供了 $5\frac1/4$\inches\ 或 $3\frac1/2$\inches\ 软盘, +你可以向以下地址邮寄 10.00 美元购买: +\smallskip +{\obeylines +Paul Abrahams +214 River Road +Deerfield, MA 01342 +\vskip\tinyskipamount +Email: {\tt Abrahams\%Wayne-MTS@um.cc.umich.edu} +} +\smallskip +\noindent +这个地址在 1990 年 6 月是正确的;请注意在这之后它可能发生改变,尤其是电子邮件地址。 + +\ifoldeplain\else\ifcompletebook\else +\vskip4em{\sectionfonts\leftline{本章索引}} +\readindexfile{i} +\fi\fi + +\endchapter\byebye diff --git a/Master/texmf-dist/doc/plain/impatient-cn/xeCJK-base.tex b/Master/texmf-dist/doc/plain/impatient-cn/xeCJK-base.tex new file mode 100644 index 00000000000..8ca04827d1a --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/xeCJK-base.tex @@ -0,0 +1,645 @@ +\input miniltx +\def\settowidth#1#2{% + \setbox\@tempboxa\hbox{{#2}}#1\wd\@tempboxa + \setbox\@tempboxa\box\voidb@x} + +\endlinechar \m@ne + +\newif\ifxeCJK@checksingle +\newif\ifxeCJK@space@ + +\def\xeCJK@patch#1#2#3{ + \edef#1{\unexpanded{#2}\unexpanded\expandafter{#1}\unexpanded{#3}}} +\def\makexeCJKactive{\XeTeXinterchartokenstate=1\relax} +\def\makexeCJKinactive{\XeTeXinterchartokenstate=0\relax} +\makexeCJKactive +\def\xeCJKsetcharclass#1#2#3{ + \@tempcnta=#1 + \loop + \XeTeXcharclass \@tempcnta #3\relax + \advance\@tempcnta 1\relax + \unless\ifnum\the\@tempcnta>#2 \repeat + \xeCJK@setpunctcharclass} +\def\xeCJK@prePunct#1#2{\xeCJK@setPunct{2}{#1}{#2}} +\def\xeCJK@postPunct#1#2{\xeCJK@setPunct{3}{#1}{#2}} +\def\xeCJK@setPunct#1#2#3{ + \def\xeCJK@class{#1} + \@tempcnta "#2\relax + \multiply\@tempcnta 256\relax + \xeCJK@setPunct@#3,,} +\def\xeCJK@setPunct@#1,{ + \edef\xeCJK@temp{#1}% + \unless\ifx\xeCJK@temp\@empty + \@tempcntb "#1\relax + \advance\@tempcntb\@tempcnta\relax + \XeTeXcharclass \@tempcntb=\xeCJK@class\relax + \def\xeCJK@temp{\xeCJK@setPunct@} + \fi + \xeCJK@temp} +\def\xeCJK@setpunctcharclass{ + \xeCJK@prePunct{20}{18,1C} + \xeCJK@postPunct{20}{19,1D,14,26} + \xeCJK@postPunct{25}{00} + \xeCJK@prePunct{30}{08,0A,0C,0E,10,12,14,16,18,1A,1D,1F,36} + \xeCJK@postPunct{30}{01,02,05,06,09,0B,0D,0F,11,15,17,19,1B,1E, + 41,43,45,47,49,63,83,85,87,8E, + 9B,9C,9D,9E,A1,A3,A5,A7,A9,C3,E3,E5,E7,EE,F5,F6,FB,FC,FD,FE} + \xeCJK@prePunct {FE}{59,5B,5D,5F,60,69,6B} + \xeCJK@postPunct{FE}{50,51,52,54,55,56,57,5A,5C,5E,6A} + \xeCJK@prePunct {FF}{03,04,08,20,3B,5B,E0,E1,E5,E6} + \xeCJK@postPunct{FF}{01,05,09,0C,0E,1A,1B,1F,3D,5D, + 61,63,64,65,67,68,69,6A,6B,6C,6D,6E,6F,70,9E,9F} + \xeCJK@setPunct{1}{0}{B7} + \xeCJK@setPunct{4}{0}{28,2D,5B,60,7B} + \xeCJK@setPunct{5}{0}{21,22,25,27,29,2C,2E,3A,3B,3F,5D,7D}} +\xeCJKsetcharclass{"1100}{"11FF}{1} +\xeCJKsetcharclass{"2E80}{"2EFF}{1} +\xeCJKsetcharclass{"2F00}{"2FDF}{1} +\xeCJKsetcharclass{"2FF0}{"2FFF}{1} +\xeCJKsetcharclass{"3000}{"303F}{1} +\xeCJKsetcharclass{"3040}{"309F}{1} +\xeCJKsetcharclass{"30A0}{"30FF}{1} +\xeCJKsetcharclass{"3100}{"312F}{1} +\xeCJKsetcharclass{"3130}{"318F}{1} +\xeCJKsetcharclass{"3190}{"319F}{1} +\xeCJKsetcharclass{"31A0}{"31BF}{1} +\xeCJKsetcharclass{"31C0}{"31EF}{1} +\xeCJKsetcharclass{"31F0}{"31FF}{1} +\xeCJKsetcharclass{"3200}{"32FF}{1} +\xeCJKsetcharclass{"3300}{"33FF}{1} +\xeCJKsetcharclass{"3400}{"4DBF}{1} +\xeCJKsetcharclass{"4E00}{"9FFF}{1} +\xeCJKsetcharclass{"A000}{"A4CF}{1} +\xeCJKsetcharclass{"AC00}{"D7AF}{1} +\xeCJKsetcharclass{"F900}{"FAFF}{1} +\xeCJKsetcharclass{"FE30}{"FE4F}{1} +\xeCJKsetcharclass{"FF00}{"FFEF}{1} +\xeCJKsetcharclass{"20000}{"2A6DF}{1} +\xeCJKsetcharclass{"2A700}{"2B73F}{1} +\xeCJKsetcharclass{"2B740}{"2B81F}{1} +\xeCJKsetcharclass{"2F800}{"2FA1F}{1} +\def\CJK@stop{\CJK@stop} +\def\normalspacedchars#1{ + \xeCJK@setnormalspacedchar#1\CJK@stop} +\def\xeCJK@setnormalspacedchar#1{ + \unless\ifx#1\CJK@stop + \XeTeXcharclass`#1=6 + \expandafter\xeCJK@setnormalspacedchar + \fi} +\normalspacedchars{/} +\XeTeXinterchartoks 1 0{\egroup\CJKecglue} +\XeTeXinterchartoks 1 1{\xeCJK@i@i} +\XeTeXinterchartoks 1 2{\xeCJK@i@ii} +\XeTeXinterchartoks 1 3{\xeCJK@i@iii} +\XeTeXinterchartoks 1 4{\egroup\CJKecglue} +\XeTeXinterchartoks 1 5{\egroup} +\XeTeXinterchartoks 1 255{\xeCJK@i@cclv} +\XeTeXinterchartoks 2 0{\xeCJK@ii@} +\XeTeXinterchartoks 2 1{\xeCJK@ii@i} +\XeTeXinterchartoks 2 2{\xeCJK@ii@ii} +\XeTeXinterchartoks 2 3{\xeCJK@ii@iii} +\XeTeXinterchartoks 2 4{\xeCJK@ii@iv} +\XeTeXinterchartoks 2 5{\xeCJK@ii@v} +\XeTeXinterchartoks 2 255{\xeCJK@ii@cclv} +\XeTeXinterchartoks 3 0{\xeCJK@iii@} +\XeTeXinterchartoks 3 1{\xeCJK@iii@i} +\XeTeXinterchartoks 3 2{\xeCJK@iii@ii} +\XeTeXinterchartoks 3 3{\xeCJK@iii@iii} +\XeTeXinterchartoks 3 4{\xeCJK@iii@iv} +\XeTeXinterchartoks 3 5{\xeCJK@iii@v} +\XeTeXinterchartoks 3 255{\xeCJK@iii@cclv} +\XeTeXinterchartoks 0 1{\xeCJK@@i} +\XeTeXinterchartoks 0 2{\xeCJK@@ii} +\XeTeXinterchartoks 0 3{\xeCJK@@iii} +\XeTeXinterchartoks 0 255{\xeCJK@@cclv} +\XeTeXinterchartoks 4 1{\xeCJK@iv@i} +\XeTeXinterchartoks 4 2{\xeCJK@iv@ii} +\XeTeXinterchartoks 4 3{\xeCJK@iv@iii} +\XeTeXinterchartoks 5 1{\xeCJK@v@i} +\XeTeXinterchartoks 5 2{\xeCJK@v@ii} +\XeTeXinterchartoks 5 3{\xeCJK@v@iii} +\XeTeXinterchartoks 5 255{\xeCJK@v@cclv} +\XeTeXinterchartoks 255 0{\xeCJK@cclv@} +\XeTeXinterchartoks 255 1{\xeCJK@cclv@i} +\XeTeXinterchartoks 255 2{\xeCJK@cclv@ii} +\XeTeXinterchartoks 255 3{\xeCJK@cclv@iii} +\XeTeXinterchartoks 255 4{\xeCJK@cclv@iv} +\XeTeXinterchartoks 255 6{\xeCJK@cclv@vi} +\XeTeXinterchartoks 1 6{\xeCJK@i@vi} +\XeTeXinterchartoks 2 6{\xeCJK@ii@vi} +\XeTeXinterchartoks 3 6{\xeCJK@iii@vi} +\XeTeXinterchartoks 6 1{\xeCJK@vi@i} +\XeTeXinterchartoks 6 2{\xeCJK@vi@ii} +\XeTeXinterchartoks 6 3{\xeCJK@vi@iii} +\XeTeXinterchartoks 6 255{\xeCJK@vi@cclv} +\def\xeCJK@vi@i{ + \bgroup + \xeCJK@emptyCJKtoks + \xeCJK@setfont + \CJKsymbol} +\def\xeCJK@i@vi{ + \egroup} +\let\xeCJK@ii@vi \xeCJK@i@vi +\let\xeCJK@iii@vi\xeCJK@i@vi +\let\xeCJK@vi@ii \xeCJK@vi@i +\let\xeCJK@vi@iii\xeCJK@vi@i +\def\xeCJK@i@i{ + \CJKglue + \CJKsymbol} +\let\xeCJK@i@i@save\xeCJK@i@i +\def\xeCJK@i@ii#1{ + \xeCJK@punctrule{#1}{l} + \hskip \csname xeCJK\xeCJK@punctstyle\xeCJK@bboxname @lglue@#1\endcsname + plus 0.1em minus 0.1 em + \xeCJK@setprepunct{#1}} +\def\xeCJK@i@iii#1{ + \xeCJK@punctrule{#1}{r} + \ifcsname xeCJK@specialpunct#1\endcsname + \CJKglue % breakable + \else + \nobreak + \fi + \xdef\xeCJK@lastpunct{#1} + \CJKpunctsymbol{#1}} +\def\xeCJK@setprepunct#1{ + \edef\xeCJK@lastpunct{#1} + \vrule width \csname xeCJK\xeCJK@punctstyle\xeCJK@bboxname + @lrule@#1\endcsname depth \z@ height \z@ + \CJKpunctsymbol{#1}} +\def\xeCJK@i@cclv{ + \egroup + {\xeCJK@CJKkern} + \xeCJK@ignorespaces} +\def\xeCJK@ii@i{ + \nobreak + \CJKsymbol} +\def\xeCJK@ii@ii#1{ + \nobreak + \xeCJK@punctrule{#1}{l} + \xeCJK@setkern{\xeCJK@lastpunct}{#1} + \kern \csname xeCJK\xeCJK@punctstyle\xeCJK@bboxname @kern\xeCJK@lastpunct#1\endcsname + \xeCJK@setprepunct{#1}} +\def\xeCJK@ii@iii#1{ + \nobreak + \xeCJK@punctrule{#1}{r} + \xeCJK@setkern{\xeCJK@lastpunct}{#1} + \kern \csname xeCJK\xeCJK@punctstyle\xeCJK@bboxname @kern\xeCJK@lastpunct#1\endcsname + \nobreak + \edef\xeCJK@lastpunct{#1} + \CJKpunctsymbol{#1}} +\def\xeCJK@ii@{ + \nobreak + \egroup} +\let\xeCJK@ii@iv\xeCJK@ii@ +\let\xeCJK@ii@v\xeCJK@ii@ +\def\xeCJK@ii@cclv{ + \nobreak + \egroup + \ignorespaces} +\def\xeCJK@iii@{ + \xeCJK@afterpostpunct + \egroup} +\def\xeCJK@iii@i{ + \xeCJK@afterpostpunct + \CJKsymbol} +\def\xeCJK@iii@ii#1{ + \vrule width \csname xeCJK\xeCJK@punctstyle\xeCJK@bboxname + @rrule@\xeCJK@lastpunct\endcsname depth \z@ height \z@ + \xeCJK@punctrule{#1}{l} + \xeCJK@setkern{\xeCJK@lastpunct}{#1} + \kern \csname xeCJK\xeCJK@punctstyle\xeCJK@bboxname @kern\xeCJK@lastpunct#1\endcsname + \xeCJKpunctnobreak + \xeCJK@setprepunct{#1}} +\def\xeCJK@iii@iii#1{ + \vrule width \csname xeCJK\xeCJK@punctstyle\xeCJK@bboxname + @rrule@\xeCJK@lastpunct\endcsname depth \z@ height \z@ + \xeCJK@punctrule{#1}{r} + \xeCJK@setkern{\xeCJK@lastpunct}{#1} + \kern \csname xeCJK\xeCJK@punctstyle\xeCJK@bboxname @kern\xeCJK@lastpunct#1\endcsname + \nobreak + \edef\xeCJK@lastpunct{#1} + \CJKpunctsymbol{#1}} +\def\xeCJK@iii@iv{ + \xeCJK@afterpostpunct + \egroup} +\def\xeCJK@afterpostpunct{ + \vrule width \csname xeCJK\xeCJK@punctstyle\xeCJK@bboxname + @rrule@\xeCJK@lastpunct\endcsname depth \z@ height \z@ + \hskip \csname xeCJK\xeCJK@punctstyle\xeCJK@bboxname @rglue@\xeCJK@lastpunct\endcsname + plus 0.1em minus 0.1 em} +\let\xeCJK@iii@v\xeCJK@iii@iv +\def\xeCJK@iii@cclv{ + \xeCJK@afterpostpunct + \egroup + \ignorespaces} +\def\xeCJK@@i{ + \CJKecglue + \bgroup + \xeCJK@setfont + \xeCJK@emptyCJKtoks + \CJKsymbol} +\def\xeCJK@@ii{ + \bgroup + \xeCJK@setfont + \XeTeXinterchartoks 0 2{\relax} + \xeCJK@emptyCJKtoks + \xeCJK@i@ii} +\def\xeCJK@@iii{ + \bgroup + \xeCJK@setfont + \XeTeXinterchartoks 0 3{\relax} + \xeCJK@emptyCJKtoks + \xeCJK@i@iii} +\def\xeCJK@iv@i{ + \bgroup + \xeCJK@setfont + \XeTeXinterchartoks 4 1{\relax} + \xeCJK@emptyCJKtoks + \CJKsymbol} +\def\xeCJK@iv@ii{ + \bgroup + \xeCJK@setfont + \XeTeXinterchartoks 4 2{\relax} + \xeCJK@emptyCJKtoks + \xeCJK@i@ii} +\def\xeCJK@iv@iii{ + \bgroup + \xeCJK@setfont + \XeTeXinterchartoks 4 3{\relax} + \xeCJK@emptyCJKtoks + \xeCJK@i@iii} +\def\xeCJK@v@i{ + \CJKecglue + \bgroup + \xeCJK@setfont + \xeCJK@emptyCJKtoks + \CJKsymbol} +\def\xeCJK@v@ii{ + \bgroup + \xeCJK@setfont + \XeTeXinterchartoks 5 2{\relax} + \xeCJK@emptyCJKtoks + \xeCJK@i@ii} +\def\xeCJK@v@iii{ + \bgroup + \xeCJK@setfont + \XeTeXinterchartoks 5 3{\relax} + \xeCJK@emptyCJKtoks + \xeCJK@i@iii} +\def\xeCJK@emptyCJKtoks{ + \XeTeXinterchartoks 255 1{\relax} + \XeTeXinterchartoks 255 2{\relax} + \XeTeXinterchartoks 255 3{\relax}} +\def\xeCJK@@cclv{ + \futurelet\xeCJK@nexttoken\xeCJK@zz@cclv} +\def\xeCJK@zz@cclv{ + \ifx\xeCJK@nexttoken\@sptoken + {\xeCJK@spkern} + \else + {\xeCJK@zerokern} + \fi} +\let\xeCJK@v@cclv\xeCJK@@cclv +\let\xeCJK@vi@cclv\xeCJK@@cclv +\def\xeCJK@cclv@{ + \ifnum\lastkern=\@ne + \CJKecglue + \fi} +\let\xeCJK@cclv@iv\xeCJK@cclv@ +\let\xeCJK@cclv@vi\xeCJK@cclv@ +\def\xeCJK@cclv@i{{ + \ifnum\lastkern=\@ne + \CJKglue + \else + \ifnum\lastkern=\xeCJK@four + \CJKecglue + \else + \ifnum\lastnodetype=\xeCJK@ten + \CJKecglue + \else + \ifnum\lastnodetype=\xeCJK@eleven + \settowidth\@tempdima\@sptoken + \ifdim\lastskip=\@tempdima + \@tempskipa=\lastskip + \unskip + \ifnum\lastkern=\tw@ + \CJKecglue + \else + \ifnum\lastnodetype=\xeCJK@ten + \CJKecglue + \else + \ifnum\lastkern=\xeCJK@four + \CJKecglue + \else + \hskip\@tempskipa + \fi\fi\fi\fi\fi\fi\fi\fi} + \bgroup + \xeCJK@emptyCJKtoks + \xeCJK@setfont + \CJKsymbol} +\def\xeCJK@cclv@ii{ + \bgroup + \xeCJK@emptyCJKtoks + \xeCJK@setfont + \xeCJK@i@ii} +\def\xeCJK@cclv@iii{ + \bgroup + \xeCJK@emptyCJKtoks + \xeCJK@setfont + \xeCJK@i@iii} +\def\CJKglue{\hskip \z@ \@plus .08\baselineskip} +\def\CJK@nobreakglue{\nobreak\CJKglue\nobreak} +\edef\xeCJK@CJKkern{\kern -1sp\kern 1sp} +\edef\xeCJK@spkern{\kern -2sp\kern 2sp} +\edef\xeCJK@zerokern{\kern -4sp\kern 4sp} +\chardef\xeCJK@four=4 +\chardef\xeCJK@ten=10 +\chardef\xeCJK@eleven=11 +\def\CJKspace{\let\xeCJK@ignorespaces\@empty} +\def\CJKnospace{\def\xeCJK@ignorespaces{\xeCJK@@ignorespaces}} +\ifxeCJK@space@ + \CJKspace +\else + \CJKnospace +\fi +\def\xeCJK@@ignorespaces{ + \futurelet\xeCJK@nexttoken\xeCJK@checknext} +\def\xeCJK@checknext{ + \ifx\xeCJK@nexttoken\@sptoken + \expandafter\xeCJK@@checknext + \else + \ifx $\xeCJK@nexttoken + \CJKecglue + \fi + \fi} +{ + \def\:{\xeCJK@@checknext} + \global\expandafter\def\: {\futurelet\@let@token\xeCJK@@@checknext} +} +\def\xeCJK@@@checknext{ + \ifx $\@let@token + \CJKecglue + \else + \if\relax\noexpand\@let@token + \unless\ifx\@let@token\xeCJK@par + \CJKecglue + \fi + \fi + \fi + \let\xeCJK@nexttoken\relax} +\def\xeCJKenablechecksingle{\def\xeCJK@i@i{\xeCJK@checksingle}} +\def\xeCJKdisablechecksingle{\let\xeCJK@i@i\xeCJK@i@i@save} +\ifxeCJK@checksingle + \AtEndOfPackage{\xeCJKenablechecksingle} +\fi +\def\xeCJK@checksingle#1{ + \def\xeCJK@setcurrentchar@i{ + \CJKglue + \CJKsymbol{#1}} + \def\xeCJK@setcurrentnobreakchar@i{ + \CJKsymbol{#1}} + \futurelet\@let@token\xeCJK@@checksingle} +\def\xeCJK@@checksingle{ + \ifcat 。\noexpand\@let@token + \expandafter\xeCJK@@@checksingle + \else + \expandafter\xeCJK@setcurrentchar@i + \fi} +\def\xeCJK@@@checksingle#1{ + \def\xeCJK@setcurrentchar@ii{ + \xeCJK@setcurrentchar@i #1} + \def\xeCJK@setcurrentchar@ii@s{ + \xeCJK@setcurrentchar@i #1 } + \def\xeCJK@setcurrentnobreakchar@ii{ + \xeCJK@setcurrentnobreakchar@i #1} + \futurelet\@let@token\xeCJK@@@@checksingle} +\def\xeCJK@@@@checksingle{ + \ifx\@let@token\@sptoken + \expandafter\xeCJK@checkpar + \else + \expandafter\xeCJK@setcurrentchar@ii + \fi} +\let\xeCJK@par\par +\def\xeCJK@checkpar{ + \@ifnextchar\xeCJK@par{\xeCJK@setcurrentnobreakchar@ii}{\xeCJK@setcurrentchar@ii@s}} +\def\xeCJKsetecglue#1{ + \def\CJK@ecglue{#1} + \let\CJKecglue\CJK@ecglue} +\let\CJKsetecglue\xeCJKsetecglue +\CJKsetecglue{ } +\def\xeCJKallowbreakbetweenpuncts{ + \def\xeCJKpunctnobreak{ + \hskip \z@\relax}} +\def\xeCJKnobreakbetweenpuncts{ + \let\xeCJKpunctnobreak\nobreak} +\xeCJKnobreakbetweenpuncts +\let\xeCJK@itcorr\/ +\def\/{% + \relax + \ifnum\lastkern=4 % + \unkern\unkern + \fi + \xeCJK@itcorr} +\let\@@italiccorr=\/ +\newcount\xeCJK@cnta +\newcount\xeCJK@cntb +\newcount\xeCJK@cntc +\newcount\xeCJK@cntd +\newcount\xeCJK@cnte +\newdimen\xeCJK@dima +\newif\ifxeCJK@dokerning +\def\xeCJK@punctrule#1#2{ + \xdef\xeCJK@bboxname{\xeCJK@fontname} + \unless\ifcsname xeCJK\xeCJK@punctstyle\xeCJK@bboxname @#2rule@#1\endcsname + \unless\ifcsname xeCJK@\xeCJK@bboxname @lspace@#1\endcsname + {\xeCJK@setfont\xeCJK@setpunctbounds{#1}} + \fi + \xeCJK@dokerningtrue + \ifnum\xeCJK@punctstyle=\xeCJK@ps@plain\relax + \xeCJK@dokerningfalse + \else + \ifcsname xeCJK@specialpunct#1\endcsname + \xeCJK@dokerningfalse + \fi + \fi + \ifxeCJK@dokerning + \xeCJK@cnta=\csname xeCJK@\xeCJK@bboxname @#2space@#1\endcsname\relax + \xeCJK@cntc=\xeCJK@cnta + \ifcase\xeCJK@punctstyle + % hangmobanjiao + \or % quanjiao + \or % banjiao + \advance\xeCJK@cntc -50\relax + \or % kaiming + \ifcsname xeCJK@kaiming#1\endcsname + \advance\xeCJK@cntc -20\relax + \else + \advance\xeCJK@cntc -50\relax + \fi + \or % CCT + \ifcsname xeCJK@kaiming#1\endcsname + \advance\xeCJK@cntc -20\relax + \else + \advance\xeCJK@cntc -30\relax + \fi + \fi + \xeCJK@cntd=\xeCJK@cntc + \ifnum\xeCJK@cntc<0\relax + \xeCJK@cntc=0\relax + \fi + \else + \xeCJK@cnta=0\relax + \xeCJK@cntc=0\relax + \xeCJK@cntd=0\relax + \fi + \xeCJK@numtodim{\xeCJK@cnta} + \expandafter\xdef\csname + xeCJK\xeCJK@punctstyle\xeCJK@bboxname @#2rule@#1\endcsname{ + -\xeCJK@temp em} + \xeCJK@numtodim{\xeCJK@cntc} + \expandafter\xdef\csname + xeCJK\xeCJK@punctstyle\xeCJK@bboxname @#2glue@#1\endcsname{ + \xeCJK@temp em} + \expandafter\xdef\csname + xeCJK\xeCJK@punctstyle\xeCJK@bboxname @#2oglue@#1\endcsname{ + \the\xeCJK@cntd} + \fi} +\def\xeCJK@numtodim#1{ + \xeCJK@cnte=#1\relax + \ifnum\the\xeCJK@cnte<100\relax + \def\xeCJK@temp{0} + \else + \advance\xeCJK@cnte -100\relax + \def\xeCJK@temp{1} + \fi + \ifnum\the\xeCJK@cnte<10 + \edef\xeCJK@temp{\xeCJK@temp.0\the\xeCJK@cnte} + \else + \edef\xeCJK@temp{\xeCJK@temp.\the\xeCJK@cnte} + \fi} +\expandafter\def\csname xeCJK@kaiming.\endcsname{} +\expandafter\def\csname xeCJK@kaiming。\endcsname{} +\expandafter\def\csname xeCJK@kaiming?\endcsname{} +\expandafter\def\csname xeCJK@kaiming!\endcsname{} +\expandafter\def\csname xeCJK@specialpunct—\endcsname{}% U+2014 +\expandafter\def\csname xeCJK@specialpunct─\endcsname{}% U+2500 +\expandafter\def\csname xeCJK@specialpunct…\endcsname{} +\def\xeCJK@setkern#1#2{ + \unless\ifcsname xeCJK\xeCJK@punctstyle\xeCJK@bboxname @kern#1#2\endcsname + \xeCJK@cnta=0\relax + \ifcsname xeCJK\xeCJK@punctstyle\xeCJK@bboxname @roglue@#1\endcsname + \advance\xeCJK@cnta\csname + xeCJK\xeCJK@punctstyle\xeCJK@bboxname @roglue@#1\endcsname + \fi + \ifcsname xeCJK\xeCJK@punctstyle\xeCJK@bboxname @loglue@#2\endcsname + \advance\xeCJK@cnta\csname xeCJK\xeCJK@punctstyle\xeCJK@bboxname + @loglue@#2\endcsname + \fi + \relax + \ifcase\xeCJK@punctstyle + % hangmobanjiao + \or % quanjiao + \advance\xeCJK@cnta -50\relax + \or % banjiao + \advance\xeCJK@cnta -50\relax + \or % kaiming + \advance\xeCJK@cnta -50\relax + \or % CCT + \advance\xeCJK@cnta -50\relax + \fi + \ifnum\xeCJK@cnta<0\relax + \xeCJK@cnta=0\relax + \fi + \xeCJK@numtodim{\xeCJK@cnta} + \expandafter\xdef\csname + xeCJK\xeCJK@punctstyle\xeCJK@bboxname @kern#1#2\endcsname{ + \xeCJK@temp em} + \fi} +\def\xeCJKsetkern#1#2#3{ + \xdef\xeCJK@bboxname{\xeCJK@fontname} + \expandafter\xdef\csname + xeCJK\xeCJK@punctstyle\xeCJK@bboxname @kern#1#2\endcsname{#3}} +\def\punctstyle#1{ + \ifcsname xeCJK@ps@#1\endcsname + \edef\xeCJK@punctstyle{\csname xeCJK@ps@#1\endcsname} + \ifnum\xeCJK@punctstyle=\xeCJK@ps@plain\relax + \xeCJKallowbreakbetweenpuncts + \fi + \else + \PackageWarning{xeCJK}{Punctstyle #1\space is not defined.} + \fi} +\def\xeCJK@ps@hangmobanjiao{0} +\def\xeCJK@ps@marginkerning{0} +\def\xeCJK@ps@quanjiao{1} +\def\xeCJK@ps@fullwidth{1} +\def\xeCJK@ps@banjiao{2} +\def\xeCJK@ps@halfwidth{2} +\def\xeCJK@ps@kaiming{3} +\def\xeCJK@ps@mixedwidth{3} +\def\xeCJK@ps@CCT{4} +\def\xeCJK@ps@plain{5} +\punctstyle{quanjiao} +\def\xeCJKplainchr{\punctstyle{plain}} +\def\xeCJK@sidespace{10} +\def\xeCJK@getglyphbounds#1{ + \xeCJK@cnta=\number\XeTeXglyphbounds #1 \xeCJK@gid + \xeCJK@dima 1em\relax + \xeCJK@cntb=\number\xeCJK@dima + \multiply\xeCJK@cnta 100\relax + \divide\xeCJK@cnta\xeCJK@cntb + \advance\xeCJK@cnta -15\relax + \edef\xeCJK@temp{\the\xeCJK@cnta} + \ifnum\xeCJK@temp<0\relax + \def\xeCJK@temp{0} + \fi} +\def\xeCJK@setpunctbounds#1{ + \edef\xeCJK@gid{\the\XeTeXcharglyph`#1} + \xeCJK@getglyphbounds{1} + \expandafter\xdef\csname xeCJK@\xeCJK@bboxname @lspace@#1\endcsname{ + \xeCJK@temp} + \xeCJK@getglyphbounds{3} + \expandafter\xdef\csname xeCJK@\xeCJK@bboxname @rspace@#1\endcsname{ + \xeCJK@temp} + \ifcsname xeCJK@specialpunct#1\endcsname + \unless\ifx#1… + \xeCJK@cnta=\number\XeTeXglyphbounds 1 \xeCJK@gid + \advance\xeCJK@cnta\number\XeTeXglyphbounds 3 \xeCJK@gid + \xeCJK@dima 1em\relax + \xeCJK@cntb=\number\xeCJK@dima + \multiply\xeCJK@cnta 100\relax + \divide\xeCJK@cnta\xeCJK@cntb + \advance\xeCJK@cnta 1\relax + \ifnum\xeCJK@cnta>9 + \edef\xeCJK@temp{-0.\the\xeCJK@cnta em} + \else + \ifnum\xeCJK@cnta>1 + \edef\xeCJK@temp{-0.0\the\xeCJK@cnta em} + \else + \edef\xeCJK@temp{-0.01 em} + \fi + \fi + \xeCJK@cnta=0 + \loop + \global\expandafter\edef\csname xeCJK\the\xeCJK@cnta\xeCJK@bboxname + @kern#1#1\endcsname{\xeCJK@temp} + \advance \xeCJK@cnta 1\relax + \ifnum\xeCJK@cnta<6\repeat + \fi + \fi} +\unless\ifcsname XeTeXglyphbounds\endcsname + \PackageError{xeCJK}{\string\XeTeXglyphbounds \space not defined.^^J + You have to update XeTeX to the version 0.9995.0 or later}{} +\fi + +\def\CJKsymbol#1{#1} +\def\CJKpunctsymbol#1{#1} + +% For pure plain TeX +\def\xeCJK@setfont{\CJKfont} +\def\xeCJK@fontname{\fontname\CJKfont} + +\def\CJKfont{\errmessage{xeCJK Error: You must define \noexpand\CJKfont first}} + +\endlinechar=`\^^M +\resetatcatcode +\endinput +% vim:ft=plaintex diff --git a/Master/texmf-dist/doc/plain/impatient-cn/xmptext.tex b/Master/texmf-dist/doc/plain/impatient-cn/xmptext.tex new file mode 100644 index 00000000000..0d97ccd653f --- /dev/null +++ b/Master/texmf-dist/doc/plain/impatient-cn/xmptext.tex @@ -0,0 +1,706 @@ +~% -*- coding: utf-8 -*- +~% This is part of the book TeX for the Impatient. +~% Copyright (C) 2003 Paul W. Abrahams, Kathryn A. Hargreaves, Karl Berry. +~% See file fdl.tex for copying conditions. +~% TeX ignores anything on a line after a % +~% The next two lines define fonts for the title +% TeX 忽略一行中 % 之后的任何内容 +% 下面两行定义标题所用的字体 +\font\xmplbx = cmbx10 scaled \magstephalf +\font\xmplbxti = cmbxti10 scaled \magstephalf +~% Now here's the title. +% 现在是标题行 +~%\leftline{\xmplbx Example !xmpnum:\quad\xmplbxti Entering simple text} +~\bookmark{2}{例!xmpnum:输入简单文本}% +\leftline{\xmplbx 例!xmpnum:\quad\xmplbxti 输入简单文本} +\vglue .5\baselineskip % skip an extra half line +~\count255 = \pageno +~\xdef\examplepage{\number\count255} +~\markinfo{Example 1: Entering simple text} +~\ifrewritetocfile +~\write\tocfile{\string\tocsectionentry{输入简单文本}{\examplepage}}% +~\fi +~^^{脚注} ^^{注释} ^^{标点} ^^{引号} +~^^{空格符} ^^{横线号} ^^{段落//结束段落} +~\edef\examplepageno{\number\count255}% +~%It's easy to prepare ordinary text for \TeX\ since +~%\TeX\ usually doesn't care about how you break up your input into +~%lines. It treats the end of a line of text like a space.% +~%\footnote \dag{\TeX\ treats a tab like a space too, as we point +~%out in this {\it footnote}.} If you don't want a space there, +~%put a per% +~%cent sign (the comment character) at the end of the line. +~% \TeX\ ignores spaces at the start of a line, and treats more +~%than one space as equivalent to a single space, +~%even after a period. You indicate a new paragraph by +~%skipping a line (or more than one line). + +由于 \TeX\ 并不关心原始的输入文本中的换行,因此,我们无须关心 +应该给其提供何种格式化的文本。在 \TeX\ 看来,输入文本中的换行符 +和空格等价。% +\footnote \dag{\TeX\ 将 Tab 也当作空格处理, 就如你在这个 +{\it 脚注}所见到的一样。} 如果你不想在行尾处看到空格, +可以在行尾处写一个百分号(注释符号)。\TeX\ 忽略行首的空格, +对多于一个的空格当做一个单独的空格看待 --- 哪怕这些空格位于 +句号后面。你可以用一个或者多个空白行表示一个新的段落的开始。 + +~%When \TeX\ sees a period followed by a space (or the end of the +~%line, which is equivalent), it ordinarily assumes you've ended a +~%sentence and inserts a little extra space after the period. It +~%treats question marks and exclamation points the same way. +当 \TeX\ 看见一个句号后面紧接着一个空格(或者是一个行结束符,这 +两者等价)时,它通常会认为此句号代表一句话的结束,并在句号的后面 +加上一点小小的空格。同样的处理还适用于问号和惊叹号。 + +~% But \TeX's rules for handling periods sometimes need fine +~%tuning. \TeX\ assumes that a capital letter before a period +~%doesn't end the sentence, so you have to do something a little +~%different if, say, you're writing about DNA\null. +有时需要微调 \TeX\ 处理句号的方式。当句号前面紧跟着标题字 +母(大写字母)时,\TeX\ 会认为这个句号并不做为句子的结束符, +因此在这种情况下,你需要作一些小改动。例如:我们这样写 DNA\null. +~% The \null prevents TeX from perceiving the capital `A' +~% as being next to the period. +% \null 可以阻止 \TeX\ 感知句号前面的标题字母 `A'。 +~%It's a good idea to tie words together in references such as +~%``see Fig.~8'' and in names such as V.~I\null. Lenin and in +~%$\ldots$ so that \TeX\ will never split them in an awkward place +~%between two lines. (The three dots indicate an ellipsis.) +~% 这个 references 不知道这样翻译对不对 +如果想将多个单词绑定到一起,中间不分行,则可以将它们放入一个引用中, +例如:``见 Fig.~8'';或者名字中,例如:V.~I\null. Lenin; +或者省略号 $\ldots$。在这样的情况下,\TeX\ 不会在它们之间断行 +(三个点表示省略号)。 + +~%You should put quotations in pairs of left and right +~%single ``quotes'' so that you get the correct left and right +~%double quotation marks. ``For adjacent single and double +~%quotation marks, insert a `thinspace'\thinspace''. You can +~%get en-dashes--like so, and em-dashes---like so. +为得到正确的左右双引号,你需要用两个左右单``引号''。 +``在相邻的单引号和双引号之间,要插入一个`小间隔'\thinspace''。 +连接号--可以这样写,而破折号---可以这样写。 + +~%\bye % end the document +\bye % 结束此文档 +::: +~%\xmpheader !xmpnum/{Indentation}% !xmpheaddef +\xmpheader !xmpnum/{缩进}% !xmpheaddef +~^^{缩进} ^^{边距} ^^{段落//窄段落} +~%\noindent Now let's see how to control indentation. If an +~%ordinary word processor can do it, so surely can \TeX. Note +~%that this paragraph isn't indented. +\noindent 现在让我们来看看如何控制缩进。如果一个普通的文字处理 +程序都能处理缩进的话,那 \TeX\ 一定也能。请注意,本段并未缩进。 + +~%Usually you'll either want to indent paragraphs or to leave +~%extra space between them. Since we haven't changed anything +~%yet, this paragraph is indented. +通常来说,你会想在段落的起始处安排缩进,在段落之间安排一些额外 +的空白。由于我们在此尚未做任何特殊处理,因此本段是缩进的。 + +{\parindent = 0pt \parskip = 6pt +~% The left brace starts a group containing the unindented text. +% 这里的左括弧包裹了一组不缩进的文本 + +~%Let's do these two paragraphs a different way, +~%with no indentation and six printer's points of extra space +~%between paragraphs. +让我们对这两个段落作一些特殊处理,这两段将不缩进,并且两段 +之间有 6pt 宽的空白。 + +~%So here's another paragraph that we're typesetting without +~%indentation. If we didn't put space between these paragraphs, +~%you would have a hard time knowing where one ends +~%and the next begins. +这是第二段不缩进的文字。如果不在这两段之间插入空白的话,将很难 +分辨段与段之间的结束和起始。 + +\par % The paragraph *must* be ended within the group. +}% The right brace ends the group containing unindented text. + +~%It's also possible to indent both sides of entire paragraphs. +~%The next three paragraphs illustrate this: +你也能在段落的两边同时缩进,下面的 3 段文字演示了双边缩进的效果: + +\smallskip % Provide a little extra space here. +% Skips like this and \vskip below end a paragraph. +{\narrower +~% ``We've indented this paragraph on both sides by the paragraph +~% indentation. This is often a good way to set long quotations.'' +``我们对这一段作了双边缩进的处理。在长段引用时,通常都会这么做。'' + +~%``You can do multiple paragraphs this way if you choose. This +~%is the second paragraph that's singly indented.''\par} +``如果你愿意的话,可以同时对多个段落作如此处理. 这是 +第二个轻微缩进的段落.''\par} + +~%{\narrower \narrower You can even make paragraphs doubly narrow +~%if that's what you need. This is an example of a doubly +~%narrowed paragraph.\par} +{\narrower \narrower 如果需要,你也可以让段落缩进双倍长度。 +这就是一个双倍缩进段落的例子.\par} +\vskip 1pc % Skip down one pica for visual separation. +~%In this paragraph we're back to the normal margins, as you can +~%see for yourself. We'll let it run on a little longer so that +~%the margins are clearly visible. +在这一段,如你所见,我们返回到正常的边距状态。我们尽量让这一段 +稍微长一点,这样你可以更清楚地看到边距的效果。 + +~%{\leftskip .5in Now we'll indent the left margin by half +~%an inch and leave the right margin at its usual position.\par} +{\leftskip .5in 现在这一段,我们将其调整为左边距为半英尺,而 +右边距保持原样。\par} + +~%{\rightskip .5in Finally, we'll indent the right margin by half +~%an inch and leave the left margin at its usual position.\par} +{\rightskip .5in 最后,我们将本段调整为右边距半英尺,而左边距保持 +原样。\par} +~%\bye % end the document +\bye % 结束此文档 +::: +~%\xmpheader !xmpnum/{Fonts and special characters}% !xmpheaddef +\xmpheader !xmpnum/{字体和特殊字符}% !xmpheaddef +\chardef \\ = `\\ % Let \\ denote a backslash. +~^^{字体} ^^{字符//特殊字符} ^^{重音} +~^^{音符} ^^{花色} +~\ifoldeplain +~^^|$| ^^|&| ^^|#| ^^|_| ^^|%| ^^|^| ^^|~| ^^|{| ^^|}| \indexchar \ +~\fi +~%{\it Here are a few words in an italic font}, {\bf a +~%few words in a boldface font}, {\it and a\/ {\bf mixture} +~%of the two, with two\/ {\rm roman words} inserted}. +~%Where an italic font is followed by a nonitalic font, we've +~%inserted an ``italic correction'' ({\tt \\/}) to make the +~%spacing look right. +{\it 这是一些斜体字词}, {\bf 一些粗体字词}, +{\it 以及一些 {\bf 二者混合的效果}, +我们在中间插入一些 {\rm 正常的字词} }. +当斜体字后面紧跟非斜体字时, 我们在其间插入一个``倾斜校正'' +({\tt \\/}),使得中间的空白看起来较舒适。 +~%Here's a {\sevenrm smaller} word---but the standard \TeX\ +~%fonts won't give you anything smaller than {\fiverm this}. +这是一些{\sevenrm 更小的} 字词---可是标准的 \TeX\ +字体并不会给出小于 {\fiverm 如此大小}的字体。 + +~%If you need any of the ten characters: +如果你需要以下十个字符任意之一: +\medskip +\centerline{\$ \quad \& \quad \# \quad \_ \quad \% \quad + \char `\^ \quad \char `\~ \quad $\{$ \quad + $\}$ \quad $\backslash$} +% The \quad inserts an em space between characters. +\medskip +~%\noindent you'll need to write them a special way. Look at +~%the facing page to see how to do it. +\noindent 你需要通过特殊的方式来写他们。参照对开页, +学习正确的记录这些特殊字符的方法. + +~%\TeX\ has the accents and letters that you'll need +~%for French words such as {\it r\^ ole\/} and {\it \' +~%el\` eve\/}, for German words such as {\it Schu\ss\/}, +~%and for words in several other languages as well. +~%You'll find a complete list of \TeX's accents and letters +~%of European languages on !xrefdelim[accents] and !xrefdelim[fornlets]. +\TeX\ 拥有一些语音和字母,可以用于某些法语词, +例如:{\it r\^ ole\/} 以及{\it \'el\` eve\/}, +或者德语词,例如 {\it Schu\ss\/},或者某些别的什么语言。 +你可以在 !xrefdelim[accents] 和 !xrefdelim[fornlets] 处 +找到 \TeX\ 的 欧洲语音和字母表。 + +~%You can also get Greek letters such as ``$\alpha$'' and +~%``$\Omega$'' for use in math, card suits such as +~%``$\spadesuit$'' and ``$\diamondsuit$'', music symbols +~%such as ``$\sharp$'' and ``$\flat$'', and many other special +~%symbols that you'll find listed on !xrefdelim[specsyms]. +~%\TeX\ will only accept these sorts of special symbols in its +~%``math mode'', so you'll need to enclose them +~%within `{\tt \$}' characters. +你也可以写一些希腊字母,例如数学中的 ``$\alpha$'' 以及 +``$\Omega$'' , 扑克牌中的 +``$\spadesuit$'' 以及 ``$\diamondsuit$'', 一些音乐符号,例如: +``$\sharp$'' 和 ``$\flat$'', 以及一些你可以在 !xrefdelim[specsyms] +找到的各种符号。\TeX\ 仅在 ``数学模式'' 下接受这些符号, 因此, +你需要将它们放在两个 `{\tt \$}' 字符中间。 +~%\bye % end the document +\bye % 结束此文档 +::: +~%\xmpheader !xmpnum/{Interline spacing}% !xmpheaddef +\xmpheader !xmpnum/{行间距}% !xmpheaddef +~^^{间隔//行间距} ^^{基线} +\baselineskip = 2\baselineskip % double spacing +\parskip = \baselineskip % Skip a line between paragraphs. +\parindent = 3em % Increase indentation of paragraphs. + +% The following macro definition gives us nice inline +% fractions. You'll find it in our eplain macros. +\def\frac#1/#2{\leavevmode + \kern.1em \raise .5ex \hbox{\the\scriptfont0 #1}% + \kern-.1em $/$% + \kern-.15em \lower .25ex \hbox{\the\scriptfont0 #2}% +}% + +~%Once in a while you may want to print a document with extra +~%space between the lines. For instance, bills before Congress +~%are printed this way so that the legislators can mark them up. +~%For the same reason, book publishers usually insist that +~%manuscripts be double-spaced. Double spacing is rarely +~%appropriate for finished documents, however. +有的时候,你会想在文档的文字行之间增加一些空白。例如:议会的 +某些讨论稿需要这样做,使得议院们能够在其上作一些标记。书商们 +也基于同样的理由,要求作者提交的手稿具有双倍的行间距。当然, +对最终的出版物来说,双倍行间距的情形极其少见。 + +~%A baseline is an imaginary line that acts like the lines +~%on a pad of ruled paper. You can control the interline +~%spacing---what printers call ``leading''---% +~%by setting the amount of space between baselines. Take a +~%look at the input to see how to do it. You could use +~%the same method for $1\;1/2$ spacing as well, using {\tt 1.5} +~%instead of {\tt 2}. (You can also write $1\frac 1/2$ +~%a nicer way.) +基线是一条想象出来的线,其作用类似于带横格标记的纸张上 +横格线的作用。你可以通过控制基线间的距离来控制两行文字 +之间的距离 --- 打印机管这个距离叫做 ``起始空白''。具体 +的做法可以参看这段的源文件。你可以用{\tt 1.5}取代{\tt 2} +获得 $1\;1/2$空白的效果。(或者可以写成更好看的 $1\frac 1/2$ +形式。) + +% Here we've used the macro definition given above. + +~%For this example we've also increased the paragraph indentation +~%and skipped an extra line between paragraphs. +做为举例,我们这里增加了段落的缩进,并且在两段之间增加了一个空行。 + +~%\bye % end the document +\bye % 结束此文档 +::: +~%\xmpheader !xmpnum/{Spacing, rules, and boxes}% !xmpheaddef +\xmpheader !xmpnum/{间隔、标线和盒子}% !xmpheaddef +~^^{描述列表} ^^{盒子//绘制盒子} ^^{修订线} +~%Here's an example of a ``description list''. In practice you'd +~%be better off using a macro to avoid the repetitive constructs +~%and to make sure that the subhead widths are wide enough: +这里展示的是 ``描述列表''的实例。实际使用时,最好将这些重复结构 +定义成宏,并且保证子标题的宽度足够宽。 + +\bigskip +~% Call the indentation for descriptions \descindent +~% and set it to 8 picas. +% 用 \descindent 表示描述列表的缩进量,并设定它的值为 8 派卡。 +\newdimen\descindent \descindent = 8pc +~% Indent paragraphs by \descindent. +~% Skip an additional half line between paragraphs. +% 整个段落缩进 \descindent。段落间增加半个行距的间距。 +{\noindent \leftskip = \descindent \parskip = .5\baselineskip +~% Move the description to the left of the paragraph. +% 将描述放在段落的左边。 +\llap{\hbox to \descindent{\bf Queen of Hearts\hfil}}% +An ill-tempered woman, prone to saying ``Off with his +head!!''\ at the slightest provocation.\par +\noindent\llap{\hbox to \descindent{\bf Cheshire Cat\hfil}}% +A cat with an enormous smile that Alice found +in a tree.\par +\noindent\llap{\hbox to \descindent{\bf Mock Turtle\hfil}}% +A lachrymose creature, quite a storyteller, who was a +companion to the Gryphon. Reputedly the prin\-cipal ingredient +of Mock Turtle Soup. +\par} +\bigskip\hrule\bigskip % A line with vertical space around it. +~%Here's an example of some words in a ruled box, just as +~%Lewis Carroll wrote them: +这个例子在一个标线盒子中放入一些词句,它们是路易斯·卡罗所写的: +\bigskip +~% Put 8pt of space between the text and the surrounding rules. +% 在文本和四周标线之间留有 8pt 宽的间隔。 +\hbox{\vrule\vbox{\hrule + \hbox spread 8pt{\hfil\vbox spread 8pt{\vfil +~% \hbox{Who would not give all else for twop}% +~% \hbox{ennyworth only of Beautiful Soup?}% + \hbox{谁不是最想尝一尝,}% + \hbox{两便士一碗的好汤?}% + \vfil}\hfil} +\hrule}\vrule}% + +\bigskip\line{\hfil\hbox to 3in{\leaders\hbox{ * }\hfil}\hfil} +\bigskip + +\line{\hskip -4pt\vrule\hfil\vbox{ +~%Here we've gotten the effect of a revision bar on the material +~%in this paragraph. The revision bar might indicate a change.}} +我们给此段落内容添加了修订线效果。修订线用于表示内容改动。}} +~%\bye % end the document +\bye % 结束此文档 +::: +~%\xmpheader !xmpnum/{Odds and ends}% !xmpheaddef +\xmpheader !xmpnum/{杂项}% !xmpheaddef +~^^{连字} ^^{定理} ^^{引理} ^^{有序列表} +~^^{居左对齐} ^^{居右对齐} ^^{居中对齐} +~%\chardef \\ = `\\ % Let \\ denote a backslash. +\chardef \\ = `\\ % 用 \\ 表示反斜杠。 +\footline{\hfil{\tenit - \folio -}\hfil} +~\global\footline{\hfil{\tenit - \folio\ -}\hfil} +~% \footline provides a footer line. +~% Here it's a centered, italicized page number. +% \footline 给出页脚行;此处为居中的意大利体页码。 +~%\TeX\ knows how to hyphenate words, but it isn't infallible. +~%If you are discussing the chemical +~%${\it 5}$-[p-(Flouro\-sul\-fonyl)ben\-zoyl]-l,% +~%$N^6$-ethe\-no\-adeno\-sine +~%and \TeX\ complains to you about an ``overfull hbox'', try +~%inserting some ``discretionary hyphens''. The notation +~%`{\tt \\-}' tells \TeX\ about a dis\-cre\-tion\-ary hyphen, +~%that is, one that it might not have inserted otherwise. +\TeX\ 懂得如何将单词连字化,但它并非绝对可靠的。若你在讨论化学 +${\it 5}$-[p-(Flouro\-sul\-fonyl)ben\-zoyl]-l,% +$N^6$-ethe\-no\-adeno\-sine 时, +\TeX\ 给出关于``水平盒子溢出''的警告, +你可以尝试插入某些``自定连字符''。 +`{\tt \\-}'记号告诉 \TeX\ 一个自定连字符位置; +在此位置 \TeX\ 本来是不会插入连字符的。 +\medskip +~%{\raggedright You can typeset text unjustified, i.e., with +~%an uneven right margin. In the old days, before word +~%processors were common, typewritten documents were +~%unjustified because there was no convenient alternative. +~%Some people prefer text to be unjustified so that the +~%spacing between words can be uniform. Most books are set +~%with justified margins, but not all. \par} +{\raggedright 你可以不对齐地排版文字,即让右页边不对齐。 +在过去,文字处理软件还未普及, +因为没有其他方便的选择,排版的文档都是不对齐的。 +有些人更喜欢不对齐地排版文字,因为此时单词间距是一致的。 +大部分书籍都设置为页边对齐,但并非都是。\par} + +~%\proclaim Assertion 27. There is an easy way to typeset +~%the headings of assertions, lemmas, theorems, etc. +\proclaim 断言 27. 有很简单的方法排版断言、引理、定理等的标题。 + +~%Here's an example of how to typeset an itemized list two +~%levels deep. If you need more levels, you'll have to +~%program it yourself, alas. +~%\smallskip +~%\item {1.} This is the first item. +~%\item {2.} This is the second item. It consists of two +~%paragraphs. We've indented the second paragraph so that +~%you can easily see where it starts. +这个例子显示如何排版两层的有序列表。 +如果需要更多层级,唉,你得自己编程。 +\smallskip +\item {1.} 这是第一个列表项。 +\item {2.} 这是第二个列表项。它由两个段落组成。 +为让你看清楚第二个段落从哪里开始,我们缩进了该段落。 + +~%\item{} \indent The second paragraph has three subitems +~%underneath it. +~%\itemitem {(a)} This is the first subitem. +~%\itemitem {(b)} This is the second subitem. +~%\itemitem {(c)} This is the third subitem. +~%\item {$\bullet$} This is a strange-looking item because it's +~%completely different from the others. +\item{} \indent 第二个段落下边有三个子列表项。 +\itemitem {(a)} 这是第一个子列表项。 +\itemitem {(b)} 这是第二个子列表项。 +\itemitem {(c)} 这是第三个子列表项。 +\item {$\bullet$} 这是一个看起来很奇怪的列表项, +因为它和其他列表项不同。 +\smallskip +~%\leftline{Here's a left-justified line.$\Leftarrow$} +~%\rightline{$\Rightarrow$Here's a right-justified line.} +~%\centerline{$\Rightarrow$Here's a centered line.$\Leftarrow$} +\leftline{这是一个左对齐的行。$\Leftarrow$} +\rightline{$\Rightarrow$这是一个右对齐的行。} +\centerline{$\Rightarrow$这是一个居中的行。$\Leftarrow$} +~% Don't try to use these commands within a paragraph. +% 不要在段落内部使用这些命令。 +~%\bye % end the document +\bye % 结束此文档 +::: +~%\xmpheader !xmpnum/{Using fonts from other sources}% !xmpheaddef +\xmpheader !xmpnum/{使用其他来源的字体}% !xmpheaddef +~\xrdef{palatino} +~\idxref{Palatino 字体} +~\idxref{Zapf, Hermann} +~\idxref{计算机现代字体} ^^{\Metafont} +\font\tenrm = pplr % Palatino +% Define a macro for invoking Palatino. +\def\pal{\let\rm = \tenrm \baselineskip=12.5pt \rm} +\pal % Use Palatino from now on. + +~%You aren't restricted to using the Computer Modern fonts that +~%come with \TeX. Other fonts are available from many sources, +~%and you may prefer them. For instance, we've set this page +~%in 10-point Palatino Roman. Palatino was designed by +~%Hermann Zapf, considered to be one of the greatest type +~%designers of the twentieth century. This page will +~%give you some idea of what it looks like. +你并不局限于只能使用随 \TeX 发行的 Computer Modern 系列字体。 +从其他很多渠道你都可以得到一些你可能会更喜欢的字体。例如我们 +当前页面就被设置为 10p 大小的 Palatino Roman 字体。Palatino +是一种由 Hermann Zapf 所设计的字体,它被认为是二十世纪最伟大的 +字体设计之一。从本页的输出可以获得关于这个字体的一些直观印 +象(由于译本的缘故,本页的字体并未被设为 Palatino 字体)。 + +~%Fonts can be provided either as outlines or as bitmaps. An +~%outline font describes the shapes of the characters, while a +~%bitmap font specifies each pixel (dot) that makes up each +~%character. A font outline can be used to generate many +~%different sizes of the same font. The Metafont program +~%that's associated with \TeX\ provides a particularly +~%powerful way of generating bitmap fonts, but it's not the +~%only way. +字体既可以是轮廓字体,也可以是位图字体。轮廓字体的意思是它 +描述的是各个字符的形状,而位图字体则是标识了每个字符形状所 +占据的像素点。轮廓字体可用来产生同一种字体的多种不同大小。 +随 \TeX\ 而发行的 metafont 程序是一个产生位图字体的强大工具, +而且它并不是唯一的工具。 + +~%The fact that a single outline can generate a great range of +~%point sizes for a font tempts many vendors of digital +~%typefaces to provide just one set of outlines for a typeface +~%such as Palatino Roman. This may be a sensible economic +~%decision, but it is an aesthetic sacrifice. Fonts cannot be +~%scaled up and down linearly without loss of quality. +~%Larger sizes of letters should not, in general, have the +~%same proportions as smaller sizes; they just don't look +~%right. For example, a font that's linearly scaled down will +~%tend to have too little space between strokes, and its +~%x-height will be too~small. % tie added to avoid widow word +由于单一的轮廓字体文件既可生成多种不同大小的字体,因此很多 +数字字体提供商倾向于仅提供字体的单一文件 ——例如 Palatino +Roman 即是如此。这也许是个经济的决定,可它却同时是个美学上 +的重大牺牲。字体无法做到在不损害其显示质量的前提下,线性地 +放大或者缩小。一个字符的大字体版本,通常来说,与小字体的版 +本应该有不同的比例 —— 而如果我们坚持这么做的话,其结果看 +起来将不会那么好看。例如:如果将一个字体线性缩小的话,其各 +笔画间的间距将会显得过窄,而它的 x-height 值也会显得过小。 + +~%A type designer can compensate for these changes by +~%providing different outlines for different point sizes, but +~%it's necessary to go to the expense of designing these +~%different outlines. One of the great advantages of Metafont +~%is that it's possible to parameterize the descriptions of +~%characters in a font. Metafont can then maintain the +~%typographical quality of characters over a range of point +~%sizes by adjusting the character shapes accordingly. +字体的设计者可以为不同大小的字体设计不同的轮廓形状,从而 +对这个问题进行弥补,可这同时需要付出额外的代价。使用 Metafont +程序的一个巨大的好处就是可以将字符符号形状的描述参数化。 +这样在改变字体大小的时候,Metafont 可以视情况做一些自动处理, +从而得到较好的效果。 +~%\bye % end the document +\bye % 结束此文档 +::: +~\idxref{蘑菇} +~%\xmpheader !xmpnum/{A ruled table}% !xmpheaddef +\xmpheader !xmpnum/{标线表格}% !xmpheaddef +\bigskip +~%\offinterlineskip % So the vertical rules are connected. +\offinterlineskip % 让竖直标线连接起来 +~% \tablerule constructs a thin rule across the table. +% \tablerule 构造横穿表格的细标线 +\def\tablerule{\noalign{\hrule}} +~% \tableskip creates 9pt of space between entries. +% \tableskip 在单元格之间生成 9pt 的空隙 +\def\tableskip{\omit&height 9pt&&&\omit\cr} +~% & separates templates for each column. TeX substitutes +~% the text of the entries for #. We must have a strut +~% present in every row of the table; otherwise, the boxes +~% won't butt together properly, and the rules won't join. +% 用 & 分开模版各列。TeX 将把 # 替换为单元格的文本。 +% 在表格每行都要有一个支架(strut); +% 否则盒子将不能良好接合,标线也不能连接起来。 +~%\halign{\tabskip = .7em plus 1em % glue between columns +~% Use \vtop for short multiline entries in the first column. +~% Typeset the lines ragged right, without hyphenation. +~% \vtop{\hsize=6pc\pretolerance = 10000\hbadness = 10000 +~% \normalbaselines\noindent\it#\strut}% +~% &\vrule #&#\hfil &\vrule #% the rules and middle column +\halign{\tabskip = .7em plus 1em % 各列之间的粘连 +% 用 \vtop 得到表格第一列中的多行单元格。 +% 让多行文本右边不对齐,且不连字化。 + \vtop{\hsize=6pc\pretolerance = 10000\hbadness = 10000 + \normalbaselines\noindent\it#\strut}% + &\vrule #&#\hfil &\vrule #% 标线和中间各列 +~%% Use \vtop to get whole paragraphs in the last column. +~% &\vtop{\hsize=11pc \parindent=0pt \normalbaselineskip=12pt +~% \normalbaselines \rightskip=3pt plus2em #}\cr +% 用 \vtop 得到表格最后一列中的段落。 + &\vtop{\hsize=11pc \parindent=0pt \normalbaselineskip=12pt + \normalbaselines \rightskip=3pt plus2em #}\cr +~% The table rows begin here. +% 表格各行从这里开始。 +~%\noalign{\hrule height2pt depth2pt \vskip3pt} +~% % The header row spans all the columns. +~% \multispan5\bf Some Choice Edible Mushrooms\hfil\strut\cr +\noalign{\hrule height2pt depth2pt \vskip3pt} + % 表头行横跨各列。 + \multispan5\bf 一些上等的食用蘑菇\hfil\strut\cr +~%\noalign{\vskip3pt} \tablerule +~% \omit&height 3pt&\omit&&\omit\cr +~% \bf Botanical&&\bf Common&&\omit \bf Identifying \hfil\cr +~%\noalign{\vskip -2pt}% close up lines of heading +~% \bf Name&&\bf Name &&\omit \bf Characteristics \hfil\cr +\noalign{\vskip3pt} \tablerule + \omit&height 3pt&\omit&&\omit\cr + \bf 学名&&\bf 常用名&&\omit \bf 识别特征 \hfil\cr +~%\tableskip Pleurotus ostreatus&&Oyster mushroom&& +~% Grows in shelf\kern 1pt like clusters on stumps or logs, +~% % without the kern, the `f' and `l' would be too close +~% pink-gray oyster-shaped caps, stem short or absent.\cr +\tableskip Pleurotus ostreatus&&平菇&& + Grows in shelf\kern 1pt like clusters on stumps or logs, + % 若不加上 \kern ,`f' 和 `l' 将挨得太近 + pink-gray oyster-shaped caps, stem short or absent.\cr +~%\tableskip Lactarius hygrophoroides&&Milky hygroph&& +~% Butterscotch-brown cap and stem, copious white latex, +~% often on ground in woods near streams.\cr +\tableskip Lactarius hygrophoroides&&稀褶乳菇&& + Butterscotch-brown cap and stem, copious white latex, + often on ground in woods near streams.\cr +~%\tableskip Morchella esculenta&&White morel&&Conical cap +~% with black pits and white ridges; no gills. Often found +~% near old apple trees and dying elms in the spring.\cr +\tableskip Morchella esculenta&&羊肚菌&&Conical cap + with black pits and white ridges; no gills. Often found + near old apple trees and dying elms in the spring.\cr +~%\tableskip Boletus edulus&&King bolete&&Reddish-brown to +~% tan cap with yellow pores (white when young), +~% bulbous stem, often near conifers, birch, or~aspen.\cr +\tableskip Boletus edulus&&美味牛肝菌&&Reddish-brown to + tan cap with yellow pores (white when young), + bulbous stem, often near conifers, birch, or~aspen.\cr +\tableskip \tablerule \noalign{\vskip 2pt} \tablerule +}\bye +::: +~%\xmpheader !xmpnum/{Typesetting mathematics}% !xmpheaddef +\xmpheader !xmpnum/{排版数学公式}% !xmpheaddef +~^^{数学} +~%For a spherical triangle with sides $a$, $b$, and $c$, and +~%opposite angles $\alpha$, $\beta$, and $\gamma$, we have: +设球面三角形的三条边长度分别为$a$,$b$ 和 $c$, +它们的对角分别为 $\alpha$,$\beta$ 和 $\gamma$,我们有: +~%$$\cos \alpha = -\cos \beta \cos \gamma + +~% \sin \beta \sin \gamma \cos \alpha \quad +~% \hbox{(Law of Cosines)}$$ +$$\cos \alpha = -\cos \beta \cos \gamma + + \sin \beta \sin \gamma \cos \alpha \quad + \hbox{(余弦定理)}$$ +~%and: +且有: +~%$$\tan {\alpha \over 2} = \sqrt{ +~% {- \cos \sigma \cdot \cos(\sigma - \alpha)} \over +~% {\cos (\sigma - \beta) \cdot \cos (\sigma - \gamma)}},\quad +~% \hbox{where $\sigma = {1 \over 2}(a+b+c)$}$$ +$$\tan {\alpha \over 2} = \sqrt{ + {- \cos \sigma \cdot \cos(\sigma - \alpha)} \over + {\cos(\sigma - \beta) \cdot \cos(\sigma - \gamma)}},\quad + \hbox{其中 $\sigma = {1 \over 2}(a+b+c)$}$$ +~%We also have:$$\sin x = {{e^{ix}-e^{-ix}}\over 2i}$$ +~%and: +~%$$\int _0 ^\infty {{\sin ax \sin bx}\over{x^2}}\,dx +~%% The \, above produces a thin space +~% = {\pi a\over 2}, \quad \hbox{if $a < b$}$$ +我们还有:$$\sin x = {{e^{ix}-e^{-ix}}\over 2i}$$ +且有: +$$\int _0 ^\infty {{\sin ax \sin bx}\over{x^2}}\,dx +% 上面的 \, 生成一个小间隔 + = {\pi a\over 2}, \quad \hbox{如果 $a < b$}$$ + +~%\noindent The number of combinations ${}_nC_r$ of $n$ +~%things taken $r$ at a time is: +\noindent 从 $n$ 个物品中任取 $r$ 个的组合数 ${}_nC_r$ 为: +$$C(n,r) = {}_nC_r = {n \choose r} = + {{n(n-1) \cdots (n-r+1)} \over {r(r-1) \cdots (1)}} = + {{n!!}\over {r!!(n-r)!!}}$$ + +\noindent +~%The value of the determinant $D$ of order $n$: +$n$ 阶行列式 $D$ 的值: +$$D = \left|\matrix{a_{11}&a_{12}&\ldots&a_{1n}\cr + a_{21}&a_{22}&\ldots&a_{2n}\cr + \vdots&\vdots&\ddots&\vdots\cr + a_{n1}&a_{n2}&\ldots&a_{nn}\cr}\right| $$ +~%is defined as the sum of $n!!$ terms: +定义为下面$n!!$项的和: +$$\sum\>(\pm)\>a_{1i}a_{2j} \ldots a_{nk}$$ +~% The \> above produces a medium space. +~%where $i$, $j$, \dots,~$k$\/ take on all possible values +~%between $1$ and $n$, and the sign of the product is +~%$+$ if the sequence $i$, $j$, \dots,~$k$\/ is an +~%even permutation and $-$ otherwise. Moreover: +其中 $i$, $j$, \dots,~$k$\/ 取遍 $1$ 到 $n$ 的所有可能值, +且当排列 $i$, $j$, \dots,~$k$\/ 为偶置换时乘积取 $+$ 号, +否则取 $-$ 号。此外: +$$Q(\xi) = \lambda_1 y_1^2 \sum_{i=2}^n \sum_{j=2}^n y_i +b_{ij} y_j,\qquad B = \Vert b_{ij} \Vert = B'$$ +\bye +::: +~%\xmpheader !xmpnum/{More mathematics}% !xmpheaddef +\xmpheader !xmpnum/{更多数学内容}% !xmpheaddef +%^^{math} +^^{数学} +~%The absolute value of $X$, $|x|$, is defined by: +~%$$|x| = \cases{x, &if $x\ge 0$;\cr +~%-x,&otherwise.\cr}$$ +~%Now for some numbered equations. +~%It is the case that for $k \ge 0$: +~%$$x^{k^2}=\overbrace{x\>x\>\cdots\> x}^{2k\ \rm times} +~%\eqno (1)$$ +$X$ 的绝对值 $|x|$ 定义为:: +$$|x| = \cases{x, &if $x\ge 0$;\cr +-x,&otherwise.\cr}$$ +现在写一些标号了的公式。 +在 $k \ge 0$ 时,我们有: +$$x^{k^2}=\overbrace{x\>x\>\cdots\> x}^{2k\ \rm times} +\eqno (1)$$ + +~%Here's an example that shows some spacing controls, with +~%a number on the left: +这是一个展示空格间距调整和公式左编号的例子: +~%$$[u]!negthin[v][w]\,[x]\>[y]\;[z]\leqno(2a)$$ +$$[u]!negthin[v][w]\,[x]\>[y]\;[z]\leqno(2a)$$ +~%The amount of space between the items in brackets +~%gradually increases from left to right. (We've made +~%the space between the first two items be {\it less\/} +~%than the natural space.) +从做到右公式中的项和括号的距离逐步增大。 +(我们把前两项的距离设定得比正常距离 {\it 少\/}。 +~%It is sometimes the case that $$\leqalignno{ +~%u'_1 + tu''_2 &= u'_2 + tu''_1&(2b)\cr +~%\hat\imath &\ne \hat \jmath&(2c)\cr +~%\vec {\vphantom{b}a}&\approx \vec b\cr}$$ +~%% The \vphantom is an invisible rule as tall as a `b'. +有时候, $$\leqalignno{ +u'_1 + tu''_2 &= u'_2 + tu''_1&(2b)\cr +\hat\imath &\ne \hat \jmath&(2c)\cr +\vec {\vphantom{b}a}&\approx \vec b\cr}$$ +% \vphantom 是一个不可见的和“b”一样高的盒子。 +~%The result is of order $O(n \log\log n)$. Thus +~%$$\sum_{i=1}^n x_i = x_1+x_2+\cdots+x_n +~%= {\rm Sum}(x_1,x_2,\ldots,x_n). \eqno(3)$$ +结果为 $O(n \log\log n)$. 因此 +$$\sum_{i=1}^n x_i = x_1+x_2+\cdots+x_n += {\rm Sum}(x_1,x_2,\ldots,x_n). \eqno(3)$$ +~%and +~%$$dx\,dy = r\,dr\,d\theta!negthin.\eqno(4)$$ +~%The set of all $q$ such that $q\le0$ is written as: +~%$$\{\,q\mid q\le0\, \}$$ +且 +$$dx\,dy = r\,dr\,d\theta!negthin.\eqno(4)$$ +满足 $q\le0$ 的所有的 $q$ 可以被写作: +$$\{\,q\mid q\le0\, \}$$ +~%Thus +~%$$\forall x\exists y\;P(x,y)\Rightarrow +~%\exists x\exists y\;P(x,y)$$ +~%where +~%$$P(x,y) \buildrel \rm def \over \equiv +~%\hbox{\rm any predicate in $x$ and $y$} . $$ +因此 +$$\forall x\exists y\;P(x,y)\Rightarrow +\exists x\exists y\;P(x,y)$$ +其中 +$$P(x,y) \buildrel \rm def \over \equiv +\hbox{\rm 任何一个能够得出 $x$ 和 $y$} . $$ +\bye +::: |