<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% -*- 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{} ćŻä¸€ä¸Şĺ¤Ťćť‚çš„ç¨‹ĺşŹďĽŚĺ¶ĺ°”ĺś°äĽšä»Ąä˝&nbsp;çś‹ä¸Ťć‡‚çš„ć–ąĺĽŹĺŹĺľ—ä¸Ťĺ¬čŻťă€‚čż™ä¸€ç«&nbsp;ďĽŚ
ć‘ä»¬ćŹäľ›ä¸€äş›č§Łĺ†łé—®é˘çš„ĺ°Źč´´ĺŁ«ĺą¶éé‡Šä¸€äş›ćś‰ç”¨çš„ćŠ€ĺ·§ă€‚

%\section  Correcting bad page breaks

\section çş&nbsp;ć­Łä¸Ťč‰Żĺ†éˇµ

% \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{} ĺś¨ä˝&nbsp;ćłč¦ć”ľĺś¨ä¸€čµ·çš„ç´&nbsp;ćťä¸­é—´ĺ†éˇµâ€”â€”äľ‹ĺ¦‚ďĽŚç«&nbsp;čŠ‚ć&nbsp;‡é˘ĺ’ŚéšŹĺŽçš„ć–‡
ćś¬ďĽŚć–č€…ä¸€ä¸Şäş’ćś‰č”çł»çš„éˇąç›®ĺ—čˇ¨ă€‚ćś‰ä¸¤ç§Ťć&nbsp;ˇć­Łć–ąćł•ďĽš
\ulist\compact
\li ĺĽşĺ¶ç´&nbsp;ćťč˘«ć”ľĺś¨ä¸€čµ·ă€‚
\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{} ćŠŠç´&nbsp;ćťć”ľĺś¨ĺŚä¸€éˇµä¸ŠďĽŚćś€ç®€ĺŤ•çš„ĺŠžćł•ćŻ
ä˝żç”¨ |\vbox| ĺ‘˝ä»¤\ctsref{\vbox}ćťĄä˝żç´&nbsp;ćťč˘«ĺ°čŁ…ĺś¨ä¸€ä¸Şç«–ç›´ç›’ĺ­é‡Śă€‚
^^|\vbox//ç”¨ĺ®äż®ć­Łĺ†éˇµ|
čż™é‡Śä˝żç”¨ç«–ç›´ç›’ĺ­ćŻ”ć°´ĺąłç›’ĺ­č¦ĺĄ˝ďĽŚĺ›&nbsp;ä¸şĺ¤§ĺ¤šć•°ć…ĺ†µä¸‹ďĽŚ
éś€č¦ć”ľĺś¨ä¸€čµ·çš„ćŻç«–ç›´ć¨ˇĺĽŹç´&nbsp;ćťďĽŚćŻ”ĺ¦‚čżžç»­çš„ć®µč˝ă€‚
ç«–ç›´ç›’ĺ­çš„ĺ‰ŤĺŽďĽŚä˝&nbsp;é˝č¦ć”ľä¸€ä¸Şéšĺ«ć–ćŽćľçš„ĺ†ć®µĺ‘˝ä»¤ďĽć–č€…ç©şčˇŚďĽŚć–č€… |\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.

ćś‰ć—¶ĺ€™ďĽŚč¦ćŠŠä¸€ä¸Şč‡Şç„¶ć®µçš„ĺ„čˇŚć”ľç˝®ĺś¨ä¸€čµ·ďĽŚä˝&nbsp;ĺŹŻä»ĄćŠŠĺ®ĺ°čŁ…ĺś¨ä¸€ä¸ŞçĽ–ç»„ä¸­ďĽŚĺą¶
ĺś¨çĽ–ç»„ĺĽ€ĺ§‹çš„ĺś°ć–ąďĽć–č€…ć®µč˝ç»“ćťźĺ‰Ťçš„ĺ…¶ĺ®ä˝Ťç˝®ďĽ‰ä»¤ |\interlinepenalty|%
\ctsref{\interlinepenalty}çš„ĺ€Ľä¸ş $10000$ă€‚čż™ć&nbsp;·ĺ°±ĺ‘ŠčŻ‰äş† \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$ çš„ ć©ç˝šéˇąďĽ‰ă€‚čż™äąźćŻé˛
ć­˘ĺś¨ç«&nbsp;čŠ‚ć&nbsp;‡é˘äą‹ĺŽĺ†éˇµçš„ćś€ä˝łć–ąćˇďĽŚĺ›&nbsp;ä¸şç«&nbsp;čŠ‚ć&nbsp;‡é˘é€šĺ¸¸ç±»äĽĽäşŽä¸€ä¸Şč‡Şç„¶ć®µč˝ă€‚
|\nobreak| éś€č¦ć”ľĺś¨ć®µč˝ç»“ćťźçš„ç©şčˇŚć–č€… |\par| äą‹ĺŽďĽŚä»Žč€Śéżĺ…Ť \TeX{} ĺ°†
|\nobreak| ä˝śä¸şć®µč˝çš„ä¸€é¨ĺ†ĺ¤„ç†ă€‚ |\nobreak| čżéś€č¦ĺ‡şçŽ°ĺś¨ć®µč˝ćś«ĺ°ľć‰€ćś‰
é€‚ĺĺ†éˇµçš„ć–­ç‚ąäą‹ĺ‰Ťć‰Ťćś‰ć•ă€‚\TeX{} ćŹ’ĺ…Ąĺś¨ä¸‹ä¸€ä¸Şć®µč˝äą‹ĺ‰Ťçš„ç˛čżžĺ°±ćŻčż™ć&nbsp;·çš„
ä¸€ä¸Şć–­ç‚ąďĽŚĺ…¶ä»–çš„čżćś‰ä˝&nbsp;ćŽçˇ®ćŹ’ĺ…Ąĺś¨ć®µč˝ĺŽéť˘çš„ä»»ä˝•ç«–ç›´ç˛čżžă€‚ ĺ›&nbsp;
ć­¤ďĽŚ|\nobreak| é€šĺ¸¸ĺ‡şçŽ°ĺś¨ć®µč˝ć–č€…ć&nbsp;‡é˘ç»“ćťźäą‹ĺŽçš„ç¬¬ä¸€ä¸Şä˝Ťç˝®ă€‚

% 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.

ä˝&nbsp;ĺŹŻä»Ąä˝żç”¨ ^|\eject| ĺ‘˝ä»¤\ctsref{\eject}ďĽŚĺĽşĺ¶ \TeX{} ĺś¨ç‰ąĺ®šçš„ĺś°ć–ąĺ†
éˇµă€‚ĺś¨ć®µč˝ĺ†…é¨ďĽŚä˝&nbsp;ĺŹŻä»Ąä˝żç”¨ä¸€ä¸Şç»„ĺďĽš`|\vadjust{\vfill\eject}|'
\ctsref{\vadjust}
^^|\vadjust|
ĺś¨ä¸‹ä¸€čˇŚäą‹ĺŽĺĽşĺ¶ć–­ĺĽ€ă€‚|\eject| äą‹ĺ‰Ť ^|\vfill|
\ctsref{\vfill} çš„ä˝śç”¨ćŻč®© \TeX{} ä˝żç”¨ç©şç™˝ćťĄĺˇ«ĺ……éˇµéť˘ă€‚ä˝†ćŻďĽŚä˝żç”¨
|\eject| ćťĄçş&nbsp;ć­Łĺ†éˇµé—®é˘çš„ä¸»č¦çĽşç‚ąĺś¨äşŽďĽšĺ¦‚ćžść–‡ćˇŁçš„éˇµčľąč·ťć”ąĺŹďĽŚĺ†éˇµçš„ĺś°
ć–ąĺŹŻč˝ćśŞĺż…ĺ°±ĺ¦‚ä˝&nbsp;ć‰€ć„żé‚Łć&nbsp;·ă€‚

% 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.

ĺ¦‚ćžśä˝&nbsp;ć˛ˇćś‰ĺś¨ |\eject| äą‹ĺŽ\footnote{čŻ‘ćł¨ďĽšç–‘ä¸şç¬”čŻŻďĽŚĺş”čŻĄćŻâ€śäą‹ĺ‰Ťâ€ťă€‚}ä˝żç”¨ |\vfill| ĺ‘˝ä»¤ďĽŚ
\TeX{} ĺ°†ĺ°˝ĺ…¶ć‰€č˝ĺś°é‡Ťć–°ĺ†é…Ťé˘ťĺ¤–çš„ç©şç™˝é—´č·ťďĽŚç„¶ĺŽ
ĺŹ‘ç‰˘éŞšďĽšâ€śan underfull |\vbox| (badness $10000$) has occurred while |\output| is
 active.â€ťä¸Šéť˘č®˛çš„ĺ°čŁ…ç´&nbsp;ćťĺś¨ä¸€čµ·çš„ä»»ä¸€ć–ąćł•ä¸­ďĽŚç±»äĽĽçš„é—®é˘äąźäĽšĺ‡şçŽ°ă€‚

% 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}
% \&lt;paragraph&gt;
% {\tt \\filbreak}
% \&lt;paragraph&gt;
% {\tt \\filbreak}
% \leavevmode\indent\vdots
% \&lt;paragraph&gt;
% {\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}
ćŹäľ›äş†ä¸€ç§Ťć–ąĺĽŹćťĄćŠŠä¸€ä¸Şč‡Şç„¶ć®µć–ĺ‡&nbsp;ä¸Şć®µč˝ďĽć–č€…ĺ…¶ä»–ç«–ç›´ć¨ˇĺĽŹç´&nbsp;ćťďĽ‰ć”ľĺś¨ĺŚä¸€
éˇµéť˘ä¸Šă€‚ĺ˝“ä˝&nbsp;ç”¨ |\filbreak| ćťĄĺ°é—­ä¸€ä¸Şč‡Şç„¶ć®µçš„ć—¶ĺ€™ďĽŚĺ¦‚ćžść®µč˝ĺ†…ĺ®ąĺŹŻä»Ąć”ľ
ç˝®ĺś¨ä¸€éˇµďĽŚ \TeX{} äĽšćś‰ć•ĺś°ĺż˝ç•Ąé‚Łäş› |\filbreak|ďĽ›ĺ¦‚ćžśä¸ŤćŻďĽŚ\TeX{} ĺ°†ĺś¨
ç¬¬ä¸€ä¸Ş |\filbreak| äą‹ĺ‰Ťĺ†éˇµă€‚ĺ¦‚ćžśĺś¨čżžç»­ć®µč˝ä¸­ďĽŚćŻŹä¸Şč‡Şç„¶ć®µĺ‰ŤĺŽé˝ćś‰
|\filbreak|ďĽŚćŻ”ĺ¦‚čż™ć&nbsp;·ďĽš
{\obeylines\display{
{\tt \\filbreak}
\&lt;paragraph&gt;
{\tt \\filbreak}
\&lt;paragraph&gt;
{\tt \\filbreak}
\leavevmode\indent\vdots
\&lt;paragraph&gt;
{\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$.

ćś‰ć—¶ďĽŚä˝&nbsp;ĺŹŻä»Ąć”ąĺŹä¸€ä¸Şć–ĺ‡&nbsp;ä¸Şć®µč˝çš„ ^|\looseness| ĺŹ‚ć•°\ctsref{\looseness}%
ä»Ąäż®ć”ąéˇµéť˘çš„é•żĺş¦ă€‚č®ľç˝® |\looseness| ä¸şč´źäĽšč®© \TeX{} čŻ•ĺ›ľçĽ©ĺ‡Źć®µč˝çš„čˇŚć•°ďĽ›
ä¸şć­Łĺ™ĺ˘žĺŠ&nbsp;ĺ…¶čˇŚć•°ă€‚ć”ąĺŹ |\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.

ćś‰ć—¶ä˝&nbsp;éś€č¦ĺś¨ĺŤ•ä¸Şéˇµéť˘ä¸Šäż®ć”ąćźäş›ĺś°ć–ąä˝†ćŻĺŹä¸Ťćłé‡ŤćŽ’ĺ…¨é¨ć–‡ćˇŁă€‚ĺ¦‚ćžśéˇµéť˘é•żĺş¦
ć˛ˇćś‰ĺ›&nbsp;ä¸şäż®ć”ąč€Ść”ąĺŹĺľĺ¤šďĽŚé‚Łĺ°±ĺŹŻä»Ąĺ®žçŽ°ă€‚ä˝&nbsp;č¦ĺšçš„ćŻĺ›şĺ®šéˇµéť˘çš„ĺ°ľé¨ä¸Ť
ĺŹďĽŚć‰€éś€çš„ĺŠžćł•č·źçş&nbsp;ć­Łä¸Ťč‰Żĺ†éˇµé‚Łé‡Śä¸€ć&nbsp;·ă€‚

% 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|

ĺ¦‚ćžśĺŽźćťĄçš„éˇµĺ°ľĺ°±ćŻć­ŁĺĄ˝ćŻä¸¤ä¸Şć®µč˝ä¸­é—´ďĽŚä˝&nbsp;ĺŹŻä»Ąç”¨ĺ‰Ťéť˘ćŹŹčż°çš„ć–ąćł•ĺś¨ĺŚć&nbsp;·ä˝Ťç˝®
ĺĽşĺ¶ĺ†éˇµă€‚ĺ…¶ä»–ć…ĺ†µä¸‹ďĽŚä˝&nbsp;ĺż…éˇ»č¦ĺś¨ćŚ‡ĺ®šä˝Ťç˝®\emph{ĺŚć—¶}ĺĽşĺ¶ć–­čˇŚĺ’Śĺ†éˇµă€‚ĺ¦‚
ćžść–°éˇµéť˘ćŻ”ć—§éˇµéť˘č¦çź­ďĽŚĺ‘˝ä»¤ĺşŹĺ—ďĽš
\csdisplay
\vadjust{\vfill\eject}\break
|
^^|\vadjust|
ćŻä¸€ä¸ŞćŤ·ĺľ„ă€‚ä˝†ćŻďĽŚĺ¦‚ćžść–°çš„éˇµéť˘č¦é•żä¸€äş›çš„čŻťďĽŚé—®é˘ĺ°±éťžĺ¸¸éšľĺŠžďĽŚĺ›&nbsp;ä¸ş
\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
^^{ç«–ç›´é—´éš”//äżťç•™éˇµé¦–ç©şç™˝}
é€šĺ¸¸ä˝&nbsp;ĺŹŻä»Ąä˝żç”¨ |\vskip| ĺ‘˝ä»¤\ctsref\vskip{} ĺś¨éˇµéť˘ä¸Šć·»ĺŠ&nbsp;ç©şç™˝ç«–ç›´é—´č·ťďĽŚ
ä˝†čż™ä¸€ć‹›ĺŻąéˇµé¦–ć—&nbsp;ć•ďĽŚĺ›&nbsp;ä¸şĺś¨ç´§ćŽĄçť€ĺ†éˇµĺŽçš„ć‰€ćś‰ç˛čżžďĽŚç´§ćŽ’ĺ’Ść©ç˝šďĽŚ
é˝äĽšč˘« \TeX{} äĽšä¸˘ĺĽă€‚
^^{ĺ†éˇµ//ĺ†éˇµĺ¤„çš„ç˛čżž}
ä¸€ä¸Şć›żä»ŁďĽš^|\topglue| ĺ‘˝ä»¤ \ctsref\topglue\ ďĽŚč˝äş§ç”źć°¸ä¸Ťć¶ĺ¤±çš„ç˛čżžă€‚
\eix^^{ĺ†éˇµ//ä¸Ťč‰Żĺ†éˇµ}

% \section Correcting bad line breaks

\section çş&nbsp;ć­Łä¸Ťč‰Żć–­čˇŚ

% \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{} ĺś¨éś€č¦ć”ľĺś¨ä¸€čˇŚçš„ĺ†…ĺ®ąä¸­é—´ć–­čˇŚäş†ďĽŚćś‰ĺĄ˝ĺ‡&nbsp;ç§Ťć–ąćł•č˝çş&nbsp;ć­Łčż™ç§Ťć…ĺ†µďĽš
\ulist\compact
\li ä˝&nbsp;ĺŹŻä»Ąä˝żç”¨ |\break| ĺ‘˝ä»¤ďĽ\xref{hbreak}ďĽ‰ďĽŚĺś¨ć—čľąĺĽşĺ¶ć–­čˇŚă€‚
 ^^|\break//çş&nbsp;ć­Łć–­čˇŚ|
\li ä˝&nbsp;ĺŹŻä»Ąĺś¨ä¸¤ä¸ŞĺŤ•čŻŤäą‹é—´ćŹ’ĺ…Ąä¸€ä¸Şĺ¸¦ĺ­(|~|)ďĽč§\xref{@not}ďĽ‰ďĽŚćťĄé˛ć­˘ĺś¨ĺ®ä»¬äą‹é—´ć–­ĺĽ€ă€‚\ttidxref{~}
\li ä˝&nbsp;ĺŹŻä»Ąĺś¨ä¸€äş›ĺŤ•čŻŤé‡ŚćŹ’ĺ…Ąä¸€ä¸Şć–č€…ĺ¤šä¸Şč‡Şĺ®ščżžĺ­—ç¬¦ďĽŚćťĄĺ‘ŠčŻ‰ \TeX{} ć–°çš„ć–­čŻŤč§„ĺ™ďĽĺŹ‚č€ |\-|ďĽŚ\xref{\@minus}ďĽ‰ă€‚
\ifoldeplain\ctsidxref{-//ĺś¨ć–­čˇŚä¸­}\fi
 ^^{č‡Şĺ®ščżžĺ­—ç¬¦//çş&nbsp;ć­Łä¸Ťč‰Żć–­čˇŚ}
\li ä˝&nbsp;ĺŹŻä»Ąä˝żç”¨ ^|\hbox| ĺ‘˝ä»¤\ctsref{\hbox}ďĽŚćŠŠĺ‡&nbsp;ä¸ŞĺŤ•čŻŤĺ°čŁ…ĺś¨ä¸€ä¸Şć°´ĺąłç›’ĺ­é‡Śă€‚
\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}

é™¤äş†ćŹ’ĺ…Ąä¸´ć—¶čżžĺ­—ç¬¦ä»Ąĺ¤–ďĽŚ ĺ…¶ä»–ĺ‡&nbsp;ç§Ťć–ąćł•é˝ćś‰čż™ć&nbsp;·çš„çĽşç‚ąďĽš\TeX{} ä¸Ťč˝äş§ç”źćś€ä˝łçš„ć–­čˇŚč®ľç˝®ă€‚
ä¸€ć—¦ĺ¦‚ć­¤ďĽŚ\TeX{} ĺ°†äş§ç”źä¸€ä¸Şć–ĺ¤šä¸ŞćśŞć»ˇć–ćş˘ĺ‡şç›’ĺ­ďĽŚĺą¶ä¸”ĺŻąć­¤ćŠ±ć€¨ă€‚
^^{ćśŞć»ˇç›’ĺ­} ^^{čż‡ć»ˇç›’ĺ­}
ć°´ĺąłç›’ĺ­çš„ć–ąćł•čżćś‰ĺŹ¦ĺ¤–ä¸€ä¸ŞçĽşç‚ąďĽš
ĺ›&nbsp;ä¸ş \TeX{} ĺ¤„ç†ä¸€ä¸Şć°´ĺąłç›’ĺ­çš„ć–ąĺĽŹćŻä¸Ťč€č™‘ĺ…¶ä¸­çš„ĺ†…ĺ®ąč€Śç˝®ĺ…¶ä¸şä¸€ä¸Şĺźşćś¬ĺŤ•ä˝ŤďĽŚ
ç»“ćžśç›’ĺ­ĺ†…é¨çš„ĺŤ•čŻŤé—´č·ťĺŹŻč˝äĽšä¸Žä¸€čˇŚĺ†…ĺ…¶ĺ®ĺś°ć–ąä¸Ťä¸€č‡´ă€‚
\eix^^{ć–­čˇŚ//ä¸Ťč‰Żć–­čˇŚ}

% \section Correcting overfull or underfull boxes
\section çş&nbsp;ć­Łćş˘ĺ‡şć–ćśŞć»ˇç›’ĺ­

% \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{} ćŠ±ć€¨ä¸€ä¸Şćş˘ĺ‡şç›’ĺ­ďĽŚé‚Łčˇ¨ç¤şä˝&nbsp;ĺś¨ä¸€ä¸Şç›’ĺ­é‡Ść”ľç˝®äş†č¶…ĺ‡şç›’ĺ­ç©şé—´çš„ĺ†…ĺ®ąă€‚ç±»äĽĽçš„ďĽŚĺ¦‚ćžś \TeX{} ćŠ±ć€¨çš„ćŻä¸€ä¸ŞćśŞć»ˇç›’ĺ­ďĽŚé‚ŁćŻčŻ´ä˝&nbsp;ć˛ˇćś‰ĺľ€ç›’ĺ­é‡ŚĺŠ&nbsp;ĺ…Ąč¶łĺ¤źĺ¤šçš„ĺ†…ĺ®ąă€‚čż™äş›ćŠ±ć€¨ĺŹŻä»Ąĺś¨č®¸ĺ¤šć…ĺ˝˘ä¸‹ĺŹ‘ç”źďĽŚć‰€ä»ĄďĽŚč®©ć‘ä»¬ĺ…çś‹çś‹ä¸€č¬çš„ć…ĺ†µďĽš

% \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{} ä¸Ťč˝é‡Ťć–°ĺ®‰ćŽ’ć®µč˝ćťĄçĽ©çź­ĺ®ă€‚
ĺ¦‚ćžśä˝&nbsp;č®ľç˝® ^|\emergencystretch|\ctsref{\emergencystretch} çš„ĺ€Ľéťžé›¶ďĽŚ
\TeX{} ĺ°†ĺś¨ĺŤ•čŻŤé—´ćŹ’ĺ…Ąć›´ĺ¤šçš„ç©şç™˝ďĽŚĺŹŻč˝äĽšćś‰ĺŠ©äşŽč§Łĺ†łčż™ä¸Şé—®é˘ă€‚
ĺŹ¦ä¸€ä¸ŞĺŠžćł•ćŻč®ľç˝® |\tolerance| \ctsref{\tolerance} $10000$ďĽŚä˝†ĺ®ĺľ€ĺľ€äĽšĺŻĽč‡´čˇŚĺ†…ĺ¤Şĺ¤šçš„ç©şç™˝ă€‚
čżćś‰ä¸€ä¸ŞĺŠžćł•ćŻĺŻąĺś¨ \TeX\ é‡ŚćśŞĺ®šäą‰ć–­čŻŤč§„ĺ™çš„ĺ…łé”®ĺŤ•čŻŤćŹ’ĺ…Ąč‡Şĺ®ščżžĺ­—ç¬¦ă€‚
^^{č‡Şĺ®ščżžĺ­—ç¬¦//çş&nbsp;ć­Łčż‡ć»ˇç›’ĺ­}
ĺ¦‚ćžśčż™äş›é˝ä¸Ťç®ˇç”¨ďĽŚé‚Łä˝&nbsp;ĺŹŻč˝ĺŹŞĺĄ˝ĺŽ»é‡Ťĺ†™é‚Łä¸Şć®µč˝äş†ă€‚
ä¸€ä¸Şä¸ŤćŻĺľĺĄ˝çš„ć–ąćł•ćŻĺ˘žĺŠ&nbsp; ^|\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{} ĺ°†ĺŠ&nbsp;ĺ¤§ĺŤ•čŻŤé—´çš„ç©şç™˝ďĽŚç”šč‡łč¶…čż‡ć­Łĺ¸¸é™ĺş¦ă€‚ä¸Šéť˘ćŹĺ°çš„ĺŻąä»ćş˘ĺ‡şčˇŚçš„ä¸¤ç§Ťçş&nbsp;ć­ŁĺŠžćł•ďĽšćŹ’ĺ…Ąä¸´ć—¶çš„čżžĺ­—ç¬¦ĺ’Śé‡Ťĺ†™ć®µč˝ďĽŚé˝ĺŹŻä»Ąç”¨äşŽćśŞć»ˇçš„čˇŚă€‚ĺŻąäşŽä˝żç”¨ ^|\raggedright| ĺ‘˝ä»¤ \ctsref\raggedright ĺľ—ĺ°çš„ĺ·¦ĺŻąé˝ć&nbsp;ĽĺĽŹďĽŚĺ°±ć˛ˇćś‰ćśŞć»ˇčˇŚçš„é—®é˘ă€‚

% \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{} ĺ›&nbsp;ä¸şć˛ˇćś‰č¶łĺ¤źçš„ç´&nbsp;ćťč€Ść˛ˇćś‰ĺˇ«ć»ˇä¸€éˇµă€‚ĺŹŻč˝çš„ĺŽźĺ›&nbsp;ćŻďĽš
ä˝&nbsp;ä˝żç”¨äş†ç«–ç›´ç›’ĺ­ćťĄćŠŠç´&nbsp;ćťć”ľĺś¨ä¸€čµ·ďĽŚä˝†ćŻĺś¨ćŽĄčż‘éˇµéť˘çš„ĺş•é¨ć—¶ďĽŚ
\TeX{} é‡ĺ°äş†ä¸€ä¸Şä¸Ťé€‚ĺć”ľĺś¨é‚Łé‡Śçš„ç«–ç›´ç›’ĺ­ă€‚
ç»“ćžśé‚Łä¸Şç›’ĺ­č˘«ç§»č‡łä¸‹ä¸€éˇµďĽŚč€Śĺś¨ĺ˝“ĺ‰Ťéˇµä¸Šç•™ä¸‹äş†ĺ¤Şĺ¤šç©şç™˝ă€‚
ĺś¨čż™ç§Ťć…ĺ†µä¸‹ďĽŚć–č€…ä˝&nbsp;č¦ĺś¨ĺ«çš„ĺś°ć–ąćŹ’ĺ…Ąć›´ĺ¤šçš„ç©şç™˝ďĽŚ
ć–č€…ĺ°†é‚Łä¸Şç«–ç›´ç›’ĺ­ć‰“ç&nbsp;´ďĽŚĺŹĺľ—ĺ°Źä¸€ç‚ąă€‚

% 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.

ĺ‡şçŽ°čż™ä¸€ćŠ±ć€¨äżˇćŻçš„ĺŹ¦ä¸€ä¸ŞĺŹŻč˝ĺŽźĺ›&nbsp;ćŻďĽšä¸€ä¸Şé•żć®µč˝č¦†ç›–äş†ć•´éˇµč€Ść˛ˇćś‰ĺ†ć®µă€‚
é€šĺ¸¸ \TeX\ ä¸ŤäĽšč‡ŞĺŠ¨č°ć•´ĺźşčˇŚč·ťç¦»ďĽŚĺ›&nbsp;ć­¤ďĽŚĺś¨ä¸€éˇµçš„ćś«ĺ°ľďĽŚĺ°±ć˛ˇćł•ĺˇ«ć»ˇä¸Ťč¶łä¸€ä¸ŞčˇŚé—´č·ťçš„ç©şç™˝ă€‚
ĺ¦‚ćžśéˇµéť˘é•żĺş¦ |\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.

ĺ…łäşŽčż™ä¸€ćŠ±ć€¨äżˇćŻčżćś‰ä¸€ä¸ŞĺŽźĺ›&nbsp;ďĽšä¸Žä¸Šéť˘ç›¸ä»żďĽŚ
ć®µč˝é—´çš„ç˛čżž ^|\parskip|\ctsref{\parskip}ďĽŚč˘«ĺ›şĺ®šä¸şä¸Ťč˝ć‹‰äĽ¸ć–ćŚ¤ĺŽ‹çš„ĺ€Ľă€‚
ĺŽéť˘çš„čż™ä¸¤ç§Ťć…ĺ†µďĽŚä˝&nbsp;ĺŹŻä»Ąĺ˘žĺŠ&nbsp; ^|\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
|
čŻ´çš„ćŻä˝&nbsp;ćž„é€&nbsp;äş†ä¸€ä¸Şé•żäşŽä¸€éˇµçš„ç«–ç›´ç›’ĺ­ă€‚ĺĽ„çź­ä¸€ç‚ąĺ§ă€‚

% \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 ďĽ‰
ćŹ’ĺ…Ąč´źĺ€Ľçš„ç˛čżžďĽ›ć–č€…ĺ˘žĺŠ&nbsp;ç›’ĺ­çš„ĺ°şĺŻ¸ă€‚

% \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
^^{é—´éš”//ä¸˘ĺ¤±çš„é—´éš”}
^^{ĺŤ•čŻŤčżžĺś¨ä¸€čµ·}
ĺ¦‚ćžśä˝&nbsp;ĺŹ‘çŽ° \TeX{} ćŠŠä¸¤ä¸ŞĺŤ•čŻŤčżžĺś¨ä¸€čµ·ďĽŚĺŹŻč˝çš„ĺŽźĺ›&nbsp;ćŻćś‰ä¸€ä¸ŞćŽ§ĺ¶ĺşŹĺ—ĺćŽ‰
äş†ĺ…¶ĺŽć‰€ćś‰çš„ç©şć&nbsp;Ľă€‚ĺś¨é‚Łä¸ŞćŽ§ĺ¶ĺşŹĺ—ĺŽéť˘ć”ľä¸€ä¸Ş^{ćŽ§ĺ¶ç©şć&nbsp;Ľ}
(|\!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}
ĺ¦‚ćžśĺś¨ć–‡ćˇŁä¸­ćś‰ä¸Ťćłč¦ć–č€…ćśŞé˘„ć–™ĺ°çš„ç©şç™˝ďĽŚä»Ąć‘ä»¬çš„ç»ŹéŞŚďĽŚćś€ĺŹŻč˝çš„ĺŽźĺ›&nbsp;ćŻä¸€
čˇŚçš„ç»“ĺ°ľć–ĺ¤§ć‹¬ĺŹ·ĺŽçš„ç©şć&nbsp;Ľă€‚%
^^{čŠ±ć‹¬ĺŹ·//čŠ±ć‹¬ĺŹ·ĺŽçš„ç©şć&nbsp;Ľ}%
ďĽĺ˝“ä˝&nbsp;ç”¨ç±»ĺ«ç&nbsp;ćťĄĺšĺŤŽä¸˝çš„ć•ćžść—¶ďĽŚ
^^{ç±»ĺ«ç&nbsp;//ĺŻĽč‡´ä¸Ťćłč¦çš„é—´éš”}
čżäĽšćś‰ĺ…¶ä»–č®¸ĺ¤šç±»äĽĽçš„ĺŽźĺ›&nbsp;ă€‚ďĽ‰
\TeX{} é€šĺ¸¸ĺ°†čˇŚĺ°ľĺ¤„ç†ä¸şç©şć&nbsp;ĽďĽŚĺą¶ä¸”äĽšćŽ’ĺ‡şĺ·¦ĺŹłĺ¤§ć‹¬ĺŹ·ĺŽéť˘çš„ç©şć&nbsp;Ľă€‚

% 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.

ĺ¦‚ćžśĺ¤šä˝™çš„ç©şç™˝ćŻĺś¨ä¸€čˇŚĺ†…ďĽŚç”±ĺ¤§ć‹¬ĺŹ·ĺŽçš„ç©şć&nbsp;ĽĺĽ•čµ·çš„ďĽŚé‚Łĺ°±ç§»é™¤ĺ®ă€‚ĺ¦‚ćžśĺ¤šä˝™çš„ç©ş
ç™˝ćŻĺś¨čˇŚĺ°ľďĽŚç”±ĺ¤§ć‹¬ĺŹ·ĺŽçš„ç©şć&nbsp;ĽĺĽ•čµ·çš„ďĽŚé‚Łĺ°±ç´§ćŽĄçť€ĺś¨ĺ¤§ć‹¬ĺŹ·ĺŽć”ľä¸€ä¸Ş`|%|'ă€‚
%{\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.}

ĺ®Źĺ®šäą‰ĺ¦‚ćžśĺ†™çš„ä¸Ťä»”ç»†ďĽŚäąźĺŹŻč˝ĺŻĽč‡´ĺ¤šä˝™çš„ç©şç™˝ă€‚ĺ˝“ä˝&nbsp;ĺş”ç”¨ä¸€ä¸Şĺ®ŹďĽŚä˝†ćŻćś‰ĺ¤šä˝™
çš„ç©şç™˝ďĽŚé‚Łĺ°±č¦ćŁ€ćźĄĺ…¶ĺ®šäą‰ďĽŚçˇ®äżťĺ¤§ć‹¬ĺŹ·ĺŽć˛ˇćś‰é˘ťĺ¤–çš„ç©şć&nbsp;Ľä»ĄĺŹŠç´§ćŽĄçť€ć‹¬ĺŹ·äą‹ĺŽďĽŚ
ĺ®Źĺ®šäą‰ć˛ˇćś‰ćŤ˘čˇŚă€‚äşşä»¬ç»Źĺ¸¸ĺś¨ĺ¤§ć‹¬ĺŹ·ĺŽĺŻąĺ®Źĺ®šäą‰ćŤ˘čˇŚďĽŚä»Žč€Śĺ®ąć“é…čŻ»ă€‚ĺ®‰ĺ…¨čµ·č§ďĽŚ
ĺş”čŻĄĺś¨ć‰€ćś‰ĺ¤§ć‹¬ĺŹ·äą‹ĺŽč¦ćŤ˘čˇŚçš„ĺś°ć–ąć”ľä¸€ä¸Ş`|%|'ă€‚ĺŹŻč˝ćś‰äş›ĺś°ć–ąä¸Ťéś€č¦ďĽŚä˝†ćŻčż™
äąĺščµ·ç&nbsp;ć˛ˇćś‰ĺťŹĺ¤„ă€‚\footnote{ĺ˝“ç„¶ďĽŚćžä¸şĺ¶ç„¶çš„ć…ĺ†µä¸‹ďĽŚä˝&nbsp;ĺŹŻč˝çśźçš„éś€č¦ĺś¨ĺ¤§ć‹¬
  ĺŹ·ĺŽç›´ćŽĄćŤ˘čˇŚă€‚}

% 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.

ĺ˝“ä˝&nbsp;ä¸Ťč˝ĺ‡†çˇ®ĺś¨ćşć–‡ćˇŁä¸­ĺ®šä˝Ťĺ¤šä˝™çš„ç©şç™˝çš„ć—¶ĺ€™ďĽŚĺŹŻä»Ąĺ°ťčŻ•č®ľç˝®
|\tracingcommands|\ctsref{\tracingcommands}ä¸ş $2$ă€‚ĺś¨ć—Ąĺż—ć–‡ä»¶é‡ŚďĽŚćŻŹ
ä¸€ĺ¤„ç©şć&nbsp;Ľé˝äĽščľ“ĺ‡şä¸€ä¸Ş |{blank space}| ĺ‘˝ä»¤ă€‚

% It helps to know \TeX's rules for spaces:

çźĄé“ \TeX{} ĺ…łäşŽç©şć&nbsp;Ľçš„č§„ĺ™äĽšćś‰ĺ¸®ĺŠ©ă€‚

% \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 čľ“ĺ…ĄčˇŚĺĽ€ĺ§‹äą‹ĺ‰Ťçš„ç©şć&nbsp;Ľĺ°†č˘«ĺż˝ç•Ąă€‚
\li čľ“ĺ…ĄčˇŚç»“ćťźäą‹ĺŽçš„ç©şć&nbsp;Ľĺś¨ä»»ä˝•ć…ĺ†µä¸‹é˝č˘«ĺż˝ç•Ąă€‚č™˝ç„¶čˇŚĺ°ľćś¬čş«ĺ°±č˘«ĺ˝“ä˝śç©şć&nbsp;Ľă€‚
ďĽä¸€ä¸Şç©şç™˝čˇŚäş§ç”źçš„ćŻ |\par| ć&nbsp;‡č®°ďĽ‰
\li ĺ¤šäşŽä¸€ä¸Şçš„ç©şć&nbsp;ĽďĽŚĺ¦‚ćžśĺś¨ä¸€čµ·ďĽŚĺ°†č˘«ĺ¤„ç†ä¸şä¸€ä¸Şç©şć&nbsp;Ľă€‚ĺ›&nbsp;ć­¤ďĽŚĺĽ•ç”¨ä¸€ä¸Şĺ®Źäą‹
ĺŽçš„ç©şć&nbsp;Ľĺ°†ä¸ŤäĽšĺ’Śĺ®Źĺ®šäą‰ćś«ĺ°ľçš„ç©şć&nbsp;Ľĺĺą¶ă€‚ä˝&nbsp;ĺľ—ĺ°çš„ćŻä¸¤ä¸Şç©şć&nbsp;Ľă€‚
\li ćŽ§ĺ¶ĺ­—ç¬¦äą‹ĺŽçš„ç©şć&nbsp;Ľĺ°†č˘«ĺż˝ç•Ąă€‚
\li ć•°ĺ­—ďĽŚĺ°şĺŻ¸ä»ĄĺŹŠç˛čżžč®ľĺ®šä¸­çš„ `|plus|' ĺ’Ś `|minus|' äą‹ĺŽçš„ç©şć&nbsp;Ľĺś¨ć‰§čˇŚ
ä¸­äąźč˘«ĺż˝ç•Ąă€‚%
\footnote{ĺ®žé™…ä¸ŠďĽŚ\TeX{} ĺś¨čż™äş›ĺś°ć–ąĺŹŞäĽšĺż˝ç•ĄĺŤ•ä¸Şçš„ç©şć&nbsp;Ľă€‚ĺ›&nbsp;ä¸şĺ¤šä¸Şç©şć&nbsp;ĽäĽš
  č˘«ĺ¤„ç†ä¸şä¸€ä¸Şç©şć&nbsp;ĽďĽŚć‰€ä»Ąç»“ćžśĺ°±ćŻĺż˝ç•Ąć‰€ćś‰ç©şć&nbsp;Ľă€‚}
\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
^^{é™ĺ—ĺ…¬ĺĽŹ}
ĺ¦‚ćžśĺś¨é™ĺ—ĺ…¬ĺĽŹäą‹ĺ‰Ťćś‰ĺ¤Şĺ¤šç©şç™˝ďĽŚćś‰ĺŹŻč˝ćŻĺ›&nbsp;ä¸şä˝&nbsp;čľ“ĺ…Ąçš„ć—¶ĺ€™ĺś¨é™ĺ—ĺ…¬ĺĽŹäą‹ĺ‰Ťç•™
äş†ä¸€ä¸Şç©şčˇŚă€‚čż™ä¸Şç©şčˇŚĺ°†ĺĽ€ĺ§‹ä¸€ä¸Şć–°çš„ć®µč˝ďĽŚĺą¶ä¸”ćŠŠ \TeX\ č˝¬ĺ…Ąç«–ç›´ć¨ˇĺĽŹă€‚ĺ˝“
\TeX\ ĺś¨ç«–ç›´ć¨ˇĺĽŹé‡Śé‡ĺ°ä¸€ä¸Ş '|$|', ĺ°±äĽšĺ‡ćŤ˘ĺ°ć°´ĺąłć¨ˇĺĽŹĺą¶ćŹ’ĺ…Ąć®µé—´ç˛čżž
ďĽ|\parskip|ďĽ‰ďĽŚćŽĄä¸‹ćťĄĺŹćŹ’ĺ…Ąä¸€ä¸ŞčˇŚé—´ç˛čżžďĽ|\baselineskip|ďĽ‰ă€‚ç„¶ĺŽĺ˝“ćľ
ç¤şĺĽ€ĺ§‹çš„ć—¶ĺ€™ďĽŚĺ®ćŹ’ĺ…Ą\emph{ć›´ĺ¤š}ç˛čżžďĽć–č€…ćŻ ^|\abovedisplayskip| ć–č€…
ćŻ ^|\abovedisplayshortskip|ďĽŚĺŹ–ĺ†łäşŽĺ‰Ťä¸€čˇŚçš„é•żĺş¦ďĽ‰ă€‚ĺŹŞćś‰ćś€ĺŽä¸€ä¸Şç˛čżžćŻä˝&nbsp;ćł
č¦çš„ă€‚ä¸şäş†éżĺ…Ťäąźĺľ—ĺ°ć®µé—´ç˛čżžďĽŚĺś¨é™ĺ—ĺ…¬ĺĽŹäą‹ĺ‰Ťä¸Ťč¦ç•™ç©şčˇŚć–č€…ç»“ćťźć®µč˝
ďĽćŻ”ĺ¦‚ç”¨ |\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.

ç±»äĽĽçš„ďĽŚĺ¦‚ćžśĺś¨é™ĺ—ĺ…¬ĺĽŹäą‹ĺŽćś‰ĺ¤Şĺ¤šçš„ç©şç™˝ďĽŚĺŹŻč˝ćŻĺ›&nbsp;ä¸şĺś¨čľ“ĺ…Ąć—¶ç•™äş†ä¸€ä¸Şç©şčˇŚă€‚
ĺŽ»ćŽ‰ĺ®ĺŤłĺŹŻă€‚

%\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 `|%|'.

ĺ¦‚ćžśä˝żç”¨ĺ®Źĺľ—ĺ°çš„ć®µč˝äą‹ĺŽćś‰ĺ¤Şĺ¤šç«–ç›´ç©şç™˝ďĽŚĺŹŻč˝é‡Śĺ¤´ĺŚ…ĺ«äş†ĺ®Źäş§ç”źçš„ć®µé—´ç˛
čżžďĽŚä¸€ä¸Şç©şć®µďĽŚä»ĄĺŹŠĺŹ¦ĺ¤–ä¸€ä¸Şć®µé—´ç˛čżžă€‚ä˝&nbsp;ĺŹŻä»Ąé€ščż‡ĺś¨é‚Łä¸Şĺ®Źäą‹ĺŽćŹ’ĺ…Ą
\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^^{ć®µč˝//ĺ˝˘ćć®µč˝}
ćś‰ĺ‡&nbsp;ä¸Ş \TeX\ çš„ĺŹ‚ć•°â€”â€”^|\hangindent|ďĽŚ ^|\leftskip|ďĽŚ ç­‰ç­‰â€”â€”%
ĺ˝±ĺ“Ť \TeX\ ĺˇ‘ć®µĺ’ŚćŠčˇŚçš„ć–ąĺĽŹă€‚
^^{ć–­čˇŚ}
\PlainTeX{} çš„ĺ‘˝ä»¤ďĽŚĺ¦‚ ^|\narrower| ĺ’Ś ^|\hang|ďĽŚ äĽšé—´ćŽĄçš„ç”¨ĺ°čż™äş›ĺŹ‚
ć•°ďĽ›ä˝&nbsp;äąźĺŹŻä»Ąç›´ćŽĄĺŻąĺ®ä»¬čµ‹ĺ€Ľă€‚ ĺ¦‚ćžśä˝&nbsp;ĺ·˛ç»Źä˝żç”¨äş†čż™äş›ĺ‘˝ä»¤ä¸­çš„ä¸€ä¸ŞďĽć–č€…ć”ą
ĺŹäş†čż™äş›ĺŹ‚ć•°ä¸­çš„ä¸€ä¸ŞďĽ‰ďĽŚä˝†ćŻçś‹ä¸ŠĺŽ»ĺŻąć®µč˝ć˛ˇćś‰ä»»ä˝•ć•ćžśďĽŚé—®é˘ĺŹŻč˝ĺś¨äşŽďĽŚć®µ
č˝ç»“ćťźäą‹ĺ‰Ťä˝&nbsp;ĺ…ç»“ćťźäş†ä¸€ä¸Şç»„ă€‚äľ‹ĺ¦‚ďĽš
\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.}
|
čż™ä¸Şć®µč˝ä¸ŤäĽšĺŹçŞ„ďĽŚĺ›&nbsp;ä¸şćś€ĺŽé‚Łä¸ŞĺŹłčľąĺ¤§ć‹¬ĺŹ·ĺś¨ \TeX\ ć‹†ć®µç»„čˇŚäą‹ĺ‰Ťĺ°±ç»“ćťźäş†
|\narrower| çš„ç»„ă€‚ä˝śä¸şčˇĄć•‘ďĽŚć”ľä¸€ä¸Ş |\par| ĺś¨ĺŹłčľąĺ¤§ć‹¬ĺŹ·äą‹ĺ‰ŤďĽ›čż™ć&nbsp;·ä˝&nbsp;ć‰Ťč˝
çś‹ĺ°ćłč¦çš„ć•ćžśă€‚
^^|\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 = !&lt;dimen&gt; !dots !&lt;paragraphs&gt; !dots}
% |
% where \&lt;dimen&gt; 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).

ĺ‡č®ľä˝&nbsp;ćś‰ä¸€äş›ć–‡ĺ­—ć®µč˝ćłć”ľĺ°éˇµéť˘çš„ä¸€ä¸Şç‰ąĺ®šä˝Ťç˝®ă€‚ćľč€Ść“č§çš„ć–ąĺĽŹćŻç”¨ä¸€ä¸Şĺ
é€‚ĺ°şĺŻ¸çš„ć°´ĺąłç›’ĺ­ćťĄĺ°čŁ…ć®µč˝ďĽŚç„¶ĺŽć”ľĺ°ćłč¦çš„ä˝Ťç˝®ă€‚ĺ“Žĺ‘€ďĽŚčż™ä¸ŞĺŠžćł•ä¸Ťç®ˇç”¨ďĽŚ
ĺ›&nbsp;ä¸ş \TeX\ ä¸Ťč˝ĺś¨ĺŹ—é™ć°´ĺąłć¨ˇĺĽŹä¸‹ć–­čˇŚă€‚
^^{ĺŹ—é™ć¨ˇĺĽŹ//ć°´ĺąłĺŹ—é™ć¨ˇĺĽŹ}
čż™äąĺšďĽŚä˝&nbsp;ĺ°†ĺľ—ĺ°ä¸€ä¸Şćś‰äş›čŻŻĺŻĽçš„é”™čŻŻć¶ćŻďĽŚĺŁ°ç§° you're
 missing the end of a groupă€‚ć‘†č„±čż™ä¸Şé™ĺ¶çš„ć–ąćł•ćŻä˝żç”¨ďĽš
\csdisplay
\vbox{\hsize = !&lt;dimen&gt; !dots !&lt;paragraphs&gt; !dots}
|
ĺ…¶ä¸­ďĽŚ\&lt;dimen&gt; ćŻä˝&nbsp;ĺ¸Śćś›çš„ä¸€čˇŚçš„é•żĺş¦ă€‚čż™äąĺšĺ°±ĺŹŻä»Ąäş†ďĽŚç‰ąĺ«ćŻĺ˝“ä˝&nbsp;ćłç”¨ç›’
ĺ­ďĽĺ¸¦çşżćˇ†çš„ç›’ĺ­ďĽŚä¸ŤćŻ \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^^{ć&nbsp;‡çşż}
ä˝&nbsp;ĺŹŻä»Ąä˝żç”¨ ^|\hrule| ĺ’Ś ^|\vrule| ĺ‘˝ä»¤ďĽ\xref\hrule ďĽ‰ćťĄç”»çşżă€‚
ć‰€éś€çźĄé“çš„ćŻ (a)~ĺś¨ä»€äąĺś°ć–ąĺŹŻä»Ąç”¨ĺ“Şä¸Şĺ‘˝ä»¤ďĽŚ
ä»ĄĺŹŠ (b)~\TeX\ ĺ¦‚ä˝•ĺś¨ä˝&nbsp;ćśŞćŽçˇ®ćŚ‡ĺ‡şçš„ć…ĺ†µä¸‹ĺ†łĺ®šçşżçš„é•żĺş¦ă€‚
% \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|ă€‚ć‰€ä»Ąä˝&nbsp;ä¸Ťč˝ĺś¨ć°´ĺąłç›’ĺ­é‡Śä˝żç”¨ć¨Şçşżć–č€…ĺś¨ç«–ç›´ç›’ĺ­é‡Śä˝żç”¨ç«–çşżă€‚
ç„¶č€ŚďĽŚé€ščż‡č®ľĺ®šć‰€ćś‰ä¸‰ä¸Şĺ°şĺŻ¸ďĽdimensionďĽ‰ďĽŚä˝&nbsp;ĺŹŻä»ĄćŠŠć¨Şçşżç”»çš„ĺŹé«ĺŹç»†ďĽŚä˝ż
ĺ®çś‹čµ·ćťĄĺŹç«–çşżă€‚ç±»äĽĽçš„ďĽŚä˝&nbsp;äąźĺŹŻä»ĄćŠŠç«–çşżç”»çš„ĺŹçź®ĺŹĺ®˝ďĽŚä˝żĺ®çś‹čµ·ćťĄĺŹć¨Şçşżă€‚

% \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 ĺ¦‚ćžśä˝&nbsp;ć˛ˇćś‰ćŽçˇ®č®ľĺ®šĺ®˝ĺş¦ďĽŚç«–ç›´ç›’ĺ­é‡Śçš„ć¨Şçşżĺ°±äĽšĺ’Śç›’ĺ­ä¸€ć&nbsp;·ĺ®˝ă€‚ć°´ĺąłç›’ĺ­
é‡Śçš„ç«–çşżäąźç±»äĽĽă€‚ĺ¦‚ćžśä˝&nbsp;ĺľ—ĺ°çš„çşżĺ¤Şé•żć–ĺ¤Şçź­ďĽŚčŻ·ćŁ€ćźĄĺ¤–éť˘ç›’ĺ­çš„ĺ°şĺŻ¸ă€‚
\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}

ä¸€ä¸Şäľ‹ĺ­ďĽŚĺ‡č®ľä˝&nbsp;ćłč¦
\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\ ćŠŠĺ®ĺ˝“ä˝ść®µč˝ĺ¤„ç†ă€‚ĺ››ĺ±‚ç›’ĺ­ćŻĺż…
č¦çš„---ĺ¦‚ćžśä˝&nbsp;ćś‰ć‰€ć€€ç–‘ďĽŚĺŹŻä»Ąĺ°ťčŻ•ĺś¨ć›´ĺ°‘çš„ç›’ĺ­ć…ĺ†µä¸‹čżčˇŚčż™ä¸Şäľ‹ĺ­ă€‚
\eix^^{ć&nbsp;‡çşż}

%\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^^{éˇµč„š//ĺ¤ščˇŚéˇµč„š}
ä˝&nbsp;ĺŹŻä»Ąä˝żç”¨ ^|\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).

ä¸şäş†ĺľ—ĺ°ĺ¤ščˇŚéˇµçś‰ďĽŚä˝&nbsp;éś€č¦ĺšä¸‰ä»¶äş‹ďĽš
\olist\compact
\li é‡Ťć–°ĺ®šäą‰ ^|\makeheadline| ĺ®ŹďĽŚ\TeX\ çš„čľ“ĺ‡şäľ‹čˇŚç¨‹ĺşŹĺ°†äĽšç”¨ĺ°ĺ®ă€‚
\li ćŠŠé˘ťĺ¤–çš„čˇŚć‰€éś€çš„ç«–ç›´č·ťç¦»ĺŠ&nbsp;ç»™ ^|\voffset|ă€‚
\li ĺŻą ^|\vsize| ĺ‡Źĺ°‘ĺŚć&nbsp;·çš„ĺ¤§ĺ°Źă€‚
\endolist
\noindent ä¸‹éť˘çš„äľ‹ĺ­ćĽ”ç¤şäş†ä˝&nbsp;ĺŹŻä»Ąć€Žć&nbsp;·ĺšďĽš
\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}
|
ä¸€č¬ä˝&nbsp;ç…§çť€čż™ä¸Şĺ®šäą‰çš„ć&nbsp;·ĺ­ĺšĺ°±ĺŹŻä»Ąäş†ďĽŚĺŹŞéś€č¦ć›żćŤ˘ä˝&nbsp;č‡Şĺ·±çš„éˇµçś‰ĺ†…ĺ®ąĺą¶é€‰ä¸€ä¸Ş
ĺé€‚çš„ĺ€Ťć•°ç»™ |\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 ćŠŠé˘ťĺ¤–çš„čˇŚć‰€éś€çš„ç«–ç›´č·ťç¦»ĺŠ&nbsp;ç»™ ^|\voffset|ă€‚
\li ä»Ž ^|\vsize| ĺ‡ŹĺŽ»é˘ťĺ¤–çš„čˇŚć‰€éś€çš„ç«–ç›´č·ťç¦»ă€‚
\endolist
\noindent ä¸‹éť˘çš„äľ‹ĺ­ćĽ”ç¤şäş†ä˝&nbsp;ĺŹŻä»Ąć€Žć&nbsp;·ĺšďĽš
\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}}
|
ĺŚć&nbsp;·ďĽŚä¸€č¬ä˝&nbsp;ç…§çť€čż™ä¸Şĺ®šäą‰çš„ć&nbsp;·ĺ­ĺšĺ°±ĺŹŻä»Ąäş†ă€‚|\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\ äĽšĺś¨ä˝&nbsp;çš„čľ“ĺ…Ąć–‡ćˇŁé‡Śéťžĺ¸¸ćŽĄčż‘é”™čŻŻĺŹ‘ç”źçš„ĺś°ć–ąç»™ĺ‡şčŻŠć–­äżˇćŻă€‚
ä˝†ćŻďĽŚ\TeX\ ĺść­˘äą‹ĺ‰Ťćś€ä»¤äşşć˛®ä¸§çš„é”™čŻŻäą‹ä¸€ćŻ
\csdisplay
(\end occurred inside a group at level 1)
|
čż™čˇ¨ćŽĺś¨ä˝&nbsp;çš„ć–‡ćˇŁä¸­ćś‰ä¸€ä¸Şé˘ťĺ¤–çš„ĺ·¦čŠ±ć‹¬ĺŹ·ć–č€…çĽşĺ°‘ä¸€ä¸ŞĺŹłčŠ±ć‹¬ĺŹ·ďĽŚ
ä˝†ćŻĺą¶ć˛ˇćś‰ćŹç¤şĺŹŻč˝ĺ‡şçŽ°é—®é˘çš„ĺś°ć–ąă€‚é‚ŁäąďĽŚć€Žäąć‰ľĺ°ĺ®ĺ‘˘ďĽź

% 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ďĽ‰äą‹é—´ďĽŚ
ä˝&nbsp;ĺ°†ä»Žĺ‰Ťä¸‰ä¸ŞäĽŞčŁ…ç»“ĺ°ľçš„ĺś°ć–ąĺľ—ĺ°ĺ‡şé”™ć¶ćŻďĽŚç¬¬ĺ››ä¸Şĺ™ä¸ŤäĽšă€‚
ĺŽźĺ›&nbsp;ćŻ \TeX\ ĺ°†ćŠ±ć€¨ĺą¶ĺż˝ç•Ąĺ‰Ťä¸‰ä¸ŞäĽŞčŁ…ç»“ĺ°ľďĽŚä˝†ćŻç¬¬ĺ››ä¸Şć­ŁĺĄ˝ĺŚąé…Ťäş†é‚Łä¸Şé˘ťĺ¤–çš„ĺ·¦čŠ±ć‹¬ĺŹ·ă€‚
čż™ć&nbsp;·ä˝&nbsp;ĺ°±çźĄé“äş†é‚Łä¸Şé˘ťĺ¤–çš„ĺ·¦čŠ±ć‹¬ĺŹ·ĺś¨ç¬¬ä¸‰ĺ’Śç¬¬ĺ››ä¸ŞäĽŞčŁ…ç»“ĺ°ľäą‹é—´ćźä¸Şĺś°ć–ąă€‚
ĺ¦‚ćžśĺ«Śç–‘ĺŚşĺźźä»Ťç„¶ĺ¤Şĺ¤§ďĽŚĺ°±ĺŽ»é™¤ĺ·˛ćś‰çš„äĽŞčŁ…ç»“ĺ°ľďĽŚĺą¶ĺś¨ĺ«Śç–‘ĺŚşĺźźĺ†…é‡Ťĺ¤Ťä¸Ščż°ć­ĄéŞ¤ă€‚
ĺ¦‚ćžśé—®é˘ćŻçĽşĺ°‘ä¸€ä¸ŞĺŹłčŠ±ć‹¬ĺŹ·ďĽŚä¸€ć—¦ä˝&nbsp;ĺŹ‘çŽ°ĺ·¦čľąé‚Łä¸ŞďĽŚĺ°±č˝çˇ®ĺ®šĺŹłčľąçš„äş†ă€‚

% 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.
čż™ä¸Şć–ąćł•ä¸ŤćŻĺż…ćť€ćŠ€ă€‚ç‰ąĺ«ćŻďĽŚĺ¦‚ćžść–‡ćˇŁä¸­ćś‰ĺ‡&nbsp;ä¸Şĺľĺ¤§çš„ç»„ďĽŚčż™ä¸Şć–ąćł•ĺ°±ä¸Ťé‚Łäąçµäş†ă€‚
ç„¶č€Śĺ¤§ĺ¤šć•°ć…ĺ†µä¸‹ďĽŚä˝&nbsp;ĺŹŻä»Ąé€‚ĺ˝“ĺś°ĺŹĺŚ–ä¸€ä¸‹čż™ä¸Şć–ąćł•ćťĄć‰ľĺ‡şćš—ĺś°ćŤŁäą±çš„čŠ±ć‹¬ĺŹ·ă€‚

% 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}
ĺ¦‚ćžśĺ…¶ä»–ć–ąćł•é˝ä¸Ťç®ˇç”¨äş†ďĽŚ
é‚Łĺ°±čŻ•çť€ĺ&nbsp;ćŽ‰ć–‡ćˇŁĺŽĺŤŠé¨ĺ†ďĽćł¨ć„Źĺ¤‡ä»˝ďĽďĽ‰ć–č€…ĺś¨ä¸­é—´ćŹ’ĺ…Ąä¸€ä¸Ş |\bye| ĺ‘˝ä»¤ă€‚
ĺ¦‚ćžśé—®é˘ä»Ťç„¶ĺ­ĺś¨ďĽŚé‚Łä˝&nbsp;ĺ°±ĺŹŻä»Ąçˇ®çźĄĺ®ĺś¨ĺ‰Ťä¸€ĺŤŠć–‡ćˇŁä¸­ďĽ›
ĺ¦‚ćžść˛ˇćś‰é—®é˘äş†ďĽŚä˝&nbsp;äąźĺŹŻä»Ąçˇ®çźĄé—®é˘ĺś¨ĺŽä¸€č¬ć–‡ćˇŁé‡Śă€‚
é‡Ťĺ¤Ťčż™ä¸Şčż‡ç¨‹ďĽŚćś€ç»ä˝&nbsp;ĺ°†äĽšĺŹ‘çŽ°é”™čŻŻć‰€ĺś¨ă€‚
\eix^^{čŠ±ć‹¬ĺŹ·//ä¸ŤĺŚąé…Ťçš„čŠ±ć‹¬ĺŹ·}

% \section Setting dimensions
\section č®ľç˝®ĺ°şĺŻ¸

% \null
% \bix^^{\&lt;dimen&gt;}
% 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^^{\&lt;dimen&gt;}
\null
\bix^^{\&lt;dimen&gt;}
č®ľç˝®ĺ°şĺŻ¸çš„ćś€ç®€ĺŤ•ĺŠžćł•ćŻç›´ćŽĄčµ‹ĺ€ĽďĽŚćŻ”ĺ¦‚ďĽš
\csdisplay
\hsize = 6in
|
ä˝&nbsp;äąźĺŹŻä»Ąç”¨ĺ…¶ä»–ĺ°şĺŻ¸ćťĄč®ľĺ®šć–č€…ć··ç”¨ĺ¤šç§Ťé•żĺş¦ĺŤ•ä˝ŤďĽŚčż™č¦ĺ¤šč´ąä¸€ç‚ąäş‹ă€‚
ćś‰ä¸¤ç§Ťć–ąćł•ćťĄĺ›ĺ»şčż™ć&nbsp;·çš„ĺ°şĺŻ¸ç»„ĺďĽš
\olist\compact
\li ä˝&nbsp;ĺŹŻä»Ąĺ˘žĺŠ&nbsp;ä¸€ä¸Şĺ°şĺŻ¸ĺ°ĺŹ¦ä¸€ä¸Şĺ°şĺŻ¸ĺŹ‚ć•°ć–ĺŻ„ĺ­ĺ™¨ă€‚äľ‹ĺ¦‚ďĽš
\csdisplay
\hsize = 6in \advance\hsize by 3pc % 6in + 3pc
|
\li ä˝&nbsp;ĺŹŻä»Ąĺ°†ä¸€ä¸Şĺ°şĺŻ¸ĺŹ–ä¸şĺŹ¦ä¸€ä¸Şĺ°şĺŻ¸ďĽć–ç˛čżžďĽ‰ĺŹ‚ć•°ć–ĺŻ„ĺ­ĺ™¨çš„ĺ€Ťć•°ă€‚
čż™ć—¶ĺ€™ďĽŚ\TeX\ ĺ°†ä¸˘ćŽ‰ç˛čżžçš„äĽ¸é•żé‡Źĺ’Ść”¶çĽ©é‡ŹćŠŠĺ®č˝¬ćŤ˘ä¸şĺ°şĺŻ¸ă€‚äľ‹ĺ¦‚ďĽš
\csdisplay
\parindent = .15\hsize
\advance\vsize by -2\parskip
|
\endolist
\eix^^{\&lt;dimen&gt;}


%\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$ă€‚ç„¶ĺŽä˝&nbsp;
ĺŹŻä»ĄĺŹč°ç”¨ĺ…¶ä»–ĺ­—ä˝“ä¸€ć&nbsp;·ä˝żç”¨ $\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.

č¦ĺ›ĺ»şć··ĺĺ­—ä˝“ďĽŚä˝&nbsp;ĺŹŻä»Ąĺ®šäą‰ $\cal F$ ä¸şä¸€ä¸Şĺ®Źă€‚ĺ®Źĺ®šäą‰ä¸­ďĽŚé¦–ĺ…é€‰ć‹©ĺ­—ä˝“
$f_1$ďĽŚ ç„¶ĺŽĺ®šäą‰ćŽ§ĺ¶ĺşŹĺ—ćťĄäş§ç”źä»Ž $f_2$ ĺ€źćťĄçš„ĺ­—ç¬¦ă€‚ä¸ľä¸Şäľ‹ĺ­ďĽŚĺ‡ĺ¦‚ä˝&nbsp;č¦ĺ›
ĺ»şä¸€ç§Ťć··ĺĺ­—ä˝“ |\britrm|ďĽšĺźşäşŽ |cmr10| ä˝†ćŻĺ…¶ä¸­çš„çľŽĺ…ç¬¦ĺŹ·ĺ€źç”¨ |cmti10|
çš„č‹±é•‘ç¬¦ĺŹ·. č‹±é•‘ç¬¦ĺŹ·ĺś¨ |cmti10| çš„ä˝Ťç˝®ć°ĺĄ˝č·źçľŽĺ…ç¬¦ĺŹ·ĺś¨ |cmr10| é‡Śçš„ä˝Ťç˝®ä¸€ć&nbsp;·ă€‚
ä˝&nbsp;ĺŹŻä»Ąčż™ć&nbsp;·ĺšďĽš
\csdisplay
\def\britrm{%
   \tenrm % \tenrm names the cmr10 font
   \def\${{\tenit\char `\$}}% \tenit names the cmti10 font.
}
|
çŽ°ĺś¨ďĽŚĺ˝“ä˝&nbsp;ä˝żç”¨ |\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}

ĺŹ¦ä¸€ç§Ťć–ąćł•äĽšćś‰ĺŚć&nbsp;·çš„ć•ćžśďĽšé¦–ĺ…ć”ąĺŠ¨ç±»ĺ«ç&nbsp;ďĽ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}
ĺŽźć–‡ćŻâ€śčľ“ĺ…Ąä»€äąć&nbsp;·ďĽŚĺ°±ćŻä»€äąć&nbsp;·â€ťçš„ć–‡ćś¬ă€‚ćŻ”čľĺ¸¸č§çš„ćŻćŽ’ç‰č®ˇç®—ćśşčľ“ĺ…ĄďĽŚĺŚ…
ć‹¬č®ˇç®—ćśşç¨‹ĺşŹĺ’Ś \TeX{} čľ“ĺ…Ąă€‚
^^{č®ˇç®—ćśşç¨‹ĺşŹďĽŚćŽ’ç‰}
č®ˇç®—ćśşčľ“ĺ…Ąä¸Ťć“ä»ĄĺŽźć–‡ĺ‘çŽ°çš„ĺŽźĺ›&nbsp;ćŻďĽš
\olist\compact
\li ćś‰äş›ĺ­—ç¬¦ďĽćŽ§ĺ¶ĺ­—ç¬¦ďĽŚč˝¬äą‰ç¬¦ďĽŚčŠ±ć‹¬ĺŹ·ç­‰ďĽ‰ĺś¨ \TeX{} é‡Śćś‰ç‰ąć®Šçš„ĺ«äą‰ă€‚
\li čˇŚĺ°ľĺ’Śĺ¤šä¸Şç©şć&nbsp;ĽäĽšč˘«č˝¬ćŤ˘ä¸şä¸€ä¸Şç©şć&nbsp;Ľă€‚
\endolist
\noindent
ä¸şäş†ĺ‘çŽ°ĺŽźć–‡ďĽŚä˝&nbsp;ĺż…éˇ»ĺŹ–ć¶čż™äş›ç‰ąć®Šĺ«äą‰ĺ’Śč˝¬ćŤ˘ă€‚ćś€ĺĄ˝çš„ĺŠžćł•ćŻä˝żç”¨ĺ®Źă€‚

% 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`\&amp; = \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.

č¦ĺŹ–ć¶ç‰ąć®Šĺ«äą‰ďĽŚä˝&nbsp;ĺŹŻä»Ąć”ąĺŹé‚Łäş›ĺ­—ç¬¦çš„ç±»ĺ«ç&nbsp;ă€‚
^^{ç±»ĺ«ç&nbsp;//ç”¨äşŽĺŽźć–‡ć–‡ćś¬}
ćŽĄä¸‹ćťĄçš„ĺ®ŹćĽ”ç¤şä˝&nbsp;ĺ¦‚ä˝•ĺšďĽš
\csdisplay
\chardef \other = 12
\def\deactivate{%
   \catcode`\\ = \other   \catcode`\{ = \other
   \catcode`\} = \other   \catcode`\$ = \other
   \catcode`\&amp; = \other   \catcode`\# = \other
   \catcode`\% = \other   \catcode`\~ = \other
   \catcode`\^ = \other   \catcode`\_ = \other
}
|
ĺ°ŹĺżďĽä¸€ć—¦čż™ć&nbsp;·ć”ąĺŹäş†ç±»ĺ«ç&nbsp;ďĽŚĺ°±ä¸Ťč˝ĺ†Ťä˝żç”¨ä»»ä˝•ćŽ§ĺ¶ĺşŹĺ—äş†ďĽŚĺ›&nbsp;ä¸şçŽ°ĺś¨ä¸Ť
ĺ†Ťćś‰č˝¬äą‰ç¬¦äş†ă€‚ä˝&nbsp;éś€č¦ćłćł•ĺ›žĺ°ć­Łĺ¸¸çš„ć“Ťä˝ść¨ˇĺĽŹă€‚ćŽĄä¸‹ćťĄďĽŚä»‹ç»Ťĺ®ŚĺŹ¦ä¸€ä¸Şé—®
é˘ďĽšĺŹ–ć¶ĺ¤šä¸Şç©şć&nbsp;Ľĺ’ŚčˇŚĺ°ľçš„č˝¬ćŤ˘ä»ĄĺŽďĽŚć‘ä»¬ĺ°†äşä»Ąč§Łé‡Šă€‚

% \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}ďĽŚ ĺ‡&nbsp;äąŽĺ·˛ç»Źč§Łĺ†łäş†ä¸Ščż°é—®é˘ďĽŚ é™¤äş†ä¸¤ä»¶
äş‹ďĽšäżťç•™čˇŚé¦–çš„ç©şć&nbsp;Ľä»ĄĺŹŠäżťç•™ĺ¤šä¸Şç©şç™˝čˇŚă€‚ĺŻąć­¤ďĽŚä˝&nbsp;éś€č¦ć›´ĺĽşĺ¤§çš„ć–ąćł•â€”â€”ä˝żç”¨
ć‘ä»¬ĺ°†č¦ĺ®šäą‰çš„ ^|\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| ĺ‘˝ä»¤ďĽŚĺą¶ä¸”ĺś¨ćŻŹä¸€čˇŚĺ°ľć–˝ĺŠ&nbsp;ć—&nbsp;ç©·ĺ¤§çš„ç˛čżžă€‚
^^|\break//ĺ°†čˇŚĺ°ľĺ­—ç¬¦ĺŹä¸şĺ®|
}
ä˝&nbsp;ĺŹŻä»Ąé‡Ťć–°ĺ®šäą‰čˇŚĺ°ľĺ­—ç¬¦ćťĄäş§ç”źä¸€ä¸ŞćŽ§ĺ¶ĺşŹĺ— |\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| ĺż…éˇ»č˘«ćż€ć´»ďĽŚ ć—&nbsp;č®şćŻ\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|.
ä¸şäş†ĺś¨ĺŽźć–‡ć–‡ćś¬äą‹ĺŽĺ›žĺ°ć­Łĺ¸¸çš„ć“Ťä˝ść¨ˇĺĽŹďĽŚä˝&nbsp;éś€č¦é€‰ĺ®šä¸€ä¸ŞĺŽźć–‡ć–‡ćś¬ä¸­ĺ‡&nbsp;äąŽä¸Ťç”¨
çš„ĺ­—ç¬¦ćťĄä˝śä¸şä¸´ć—¶çš„č˝¬äą‰ç¬¦ă€‚ç«–çşżďĽ|!||ďĽ‰ç»Źĺ¸¸ćŻä¸€ä¸ŞĺĄ˝çš„é€‰ć‹©ă€‚ä¸şć­¤ďĽŚéś€č¦ĺ®Źĺ®š
äą‰ďĽš
\csdisplay
\def\verbatim{\par\begingroup\deactivate\obeywhitespace
   \catcode `\!| = 0 % Make !| the new escape character.
}

\def\endverbatim{\endgroup\endpar}

\def\!|{!|}
|
ĺś¨ĺŽźć–‡ć–‡ćś¬ä¸­ďĽŚä˝&nbsp;ĺŹŻä»Ąç”¨ĺŹŚç«–çşżďĽ|!|!||ďĽ‰čˇ¨ç¤şĺŤ•ç«–çşżďĽŚ
ĺą¶ç”¨ |!|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 ĺ¦‚ćžśä¸€ç§ŤçĽ–ç¨‹čŻ­č¨€ćś‰ĺ…łé”®ĺ­—ďĽŚä˝&nbsp;ĺŹŻä»ĄćŠŠĺ…łé”®ĺ­—ĺŹä¸şä¸€ä¸Şĺ‘˝ä»¤ďĽŚćťĄäş§ç”źç˛—ä˝“çš„
ĺ…łé”®ĺ­—ă€‚čż™ć—¶ĺ€™ćŻŹä¸€ä¸Şĺ…łé”®ĺ­—ĺ‰Ťéť˘é˝č¦č·źä¸€ä¸Şä¸´ć—¶č˝¬äą‰ç¬¦ă€‚
\li ĺ¦‚ćžśćś‰ä¸€ä¸Şĺ­—ç¬¦ďĽĺ‡č®ľćŻç«–çşżďĽ‰ĺś¨ĺŽźć–‡ć–‡ćś¬ä¸­ä»ŽćťĄć˛ˇćś‰ç”¨ĺ°ďĽŚä˝&nbsp;ĺŹŻä»Ąćż€ć´»ĺ®
ĺą¶ä¸”ç”¨ĺ®ç»“ćťźĺŽźć–‡é¨ĺ†ă€‚ĺ®Źĺ®šäą‰ĺ°†ç±»äĽĽäşŽďĽš
\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}

ć‘ä»¬ĺś¨čż™é‡ŚĺŹŞćŻćŹäľ›äş†ç®€ĺŤ•çš„ĺŠžćł•ćťĄćŽ’ç‰č®ˇç®—ćśşç¨‹ĺşŹă€‚ĺś¨ĺŹŤć&nbsp;ç¨‹ĺşŹçš„čŻ­ćł•ĺ’ŚčŻ­äą‰
çŽŻĺ˘ć–ąéť˘ďĽŚĺŽźć–‡ĺ‘çŽ°ç»Źĺ¸¸ä¸ŤćŻä¸€ä¸Şć¸…ćĄšă€ć“čŻ»çš„ĺŤ°ĺ·äą&nbsp;ćŻă€‚ĺ¦‚ćžśä˝&nbsp;ćłĺś¨čż™ä¸Şä¸»é˘
ä¸Ščµ°çš„ć›´čżśďĽŚć‘ä»¬ćŽ¨čŤé…čŻ»ďĽš

\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''ďĽŚĺľćś‰ĺŹŻč˝ä˝&nbsp;ĺś¨éťžĺ¤–é¨çŽŻĺ˘ä¸­
ä˝żç”¨äş†ĺ¤–é¨ĺ®Ź\seeconcept{ĺ¤–é¨çš„}ă€‚
^^{ĺ®Ź//ĺ¤–é¨ĺ®Ź}
ä¸€ä¸Şĺ¤–é¨ĺ®Źçš„ĺ®šäą‰ć€»ćŻä»Ą ^|\outer| ĺĽ€ĺ§‹. ĺ¤–é¨ĺ®Źä¸Ťč˝č˘«ç”¨äşŽĺ®ŹĺŹ‚é‡Ź
ďĽargumentďĽ‰ă€ĺ®Źĺ®šäą‰ă€éµĺ—çš„ĺŻĽč¨€ć–č€…ćťˇä»¶ć–‡ćś¬ďĽšĺŹŞćś‰ĺ˝“ćźä¸Şćťˇä»¶ćŁ€
éŞŚćś‰ç‰ąĺ®šçš„ç»“ćžśćŻć‰Ťĺ±•ĺĽ€çš„ć–‡ćś¬ă€‚
^^{éµĺ—//ĺ…¶ä¸­çš„ĺ¤–é¨ćŽ§ĺ¶ĺşŹĺ—}
ćś‰äş›ĺ®Źč˘«ä»Ąĺ¤–é¨çš„ć–ąĺĽŹĺ®šäą‰ćŻĺ›&nbsp;ä¸şć‘ä»¬ä¸Ťćłĺś¨čż™äş›çŽŻĺ˘é‡Śä˝żç”¨ĺ®ä»¬ďĽŚä¸€ć—¦ä˝żç”¨ďĽŚĺż…
ĺ®šĺ‡şé”™ă€‚č§Łĺ†łçš„ĺŠžćł•ĺ°±ćŻé‡Ťć–°ĺ®šäą‰ĺ®Źć–č€…ç§»ĺŠ¨ĺ®ä»¬ĺ°ĺé€‚çš„çŽŻĺ˘é‡Śă€‚

% 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ďĽ‰çš„ć…
ĺ˝˘ć–č€…ä¸Ťĺ®Śĺ¤‡çš„ćťˇä»¶ă€‚ĺ›&nbsp;ä¸şé”™čŻŻć¶ćŻćŹäľ›ä¸Ťäş†çşżç´˘ďĽŚčż™äş›é—®é˘é€šĺ¸¸éšľäşŽčŻŠć–­ă€‚ĺ¦‚
ćžśä˝&nbsp;ĺľ—ĺ°äş†čż™ć&nbsp;·çš„é”™čŻŻć¶ćŻďĽŚć‰ľć‰ľçś‹ĺ“Şé‡Śç”¨äş†ĺ¤–é¨ĺ®Źă€‚ĺŹŻč˝ä˝&nbsp;ĺą¶ä¸ŤçźĄé“é‚Łäş›ĺ®Ź
ĺ±žäşŽĺ¤–é¨çš„ďĽŚ`^|\show||\a|'\ctsref{\show} ĺ°†ćľç¤ş |\a| çš„ĺ®šäą‰ďĽŚĺą¶ĺ‘Šäą‹ |\a|
ćŻĺ¦ĺ¤–é¨ĺ®Źă€‚


%\section Changing category codes
\section ć”ąĺŹç±»ĺ«ç&nbsp;

% \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^^{ç±»ĺ«ç&nbsp;//ć”ąĺŹç±»ĺ«ç&nbsp;}
ćś‰ć—¶ĺ€™éś€č¦ĺś¨ć–‡ćˇŁçš„é¨ĺ†ĺ†…ĺ®ąé‡Śĺ±€é¨çš„ć”ąĺŹç±»ĺ«ç&nbsp;ă€‚äľ‹ĺ¦‚ďĽŚćŽ’ç‰ä¸€ä¸Şč®ˇç®—ćśşç¨‹
ĺşŹ ^^{č®ˇç®—ćśşç¨‹ĺşŹďĽŚćŽ’ç‰} ć–č€…ĺ°†ćż€ć´»çš„ĺ­—ç¬¦ç”¨äşŽä¸“é—¨ç›®çš„ă€‚ä˝&nbsp;éś€
č¦ĺŹŤćż€ć´»é‚Łäş›ĺ­—ç¬¦ćťĄä˝ż \TeX{} ĺŹŻä»ĄĺŹĺ…¶ä»–ĺ­—ç¬¦ä¸€ć&nbsp;·ä˝żç”¨ĺ®ä»¬ă€‚

% 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:
ĺ¦‚ćžśĺ±€é¨ĺś°ć”ąĺŹäş†ç±»ĺ«ç&nbsp;ďĽŚä˝&nbsp;ĺŹŻč˝äĽšć‚˛ĺ“€ĺś°ĺŹ‘çŽ° \TeX{} ć˛ˇćś‰ç†äĽšä˝&nbsp;çš„ĺŠŞĺŠ›ă€‚é€š
ĺ¸¸ďĽŚĺŽźĺ›&nbsp;ćś‰ä¸¤ä¸ŞďĽš
% \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{} ĺ†łĺ®ščľ“ĺ…Ąĺ­—ç¬¦^^{čľ“ĺ…Ąĺ­—ç¬¦}çš„ç±»ĺ«ç&nbsp;ďĽŚčŻ»ĺ°ĺ­—ç¬¦çš„
ć—¶ĺ€™ĺ°±č´´ä¸Šç›¸ĺş”çš„ç±»ĺ«ç&nbsp;ă€‚ĺ‡č®ľčŻ»ĺ°ćł˘ćµŞç¬¦ďĽ|~|ďĽ‰ďĽŚä˝†ćŻĺś¨ \TeX{} çš„ččż
ć˛ˇćś‰ĺ®žé™…ć¶ĺŚ–\emph{é‚Łä¸Ş}ćł˘ćµŞç¬¦äą‹ĺ‰Ťć”ąĺŹäş†ĺ®çš„ç±»ĺ«ç&nbsp;\seeconcept{\anatomy}ă€‚
\TeX{} ĺ°†äĽšç»§ç»­č®¤ĺ®šĺŽźćťĄč´´ä¸Šçš„ç±»ĺ«ç&nbsp;ă€‚čż™ć&nbsp;·çš„é—®é˘é€šĺ¸¸ćŻĺ›&nbsp;ä¸şćł˘ćµŞç¬¦ćŻä¸€ä¸Ş
ĺ®Źĺ®šäą‰çš„ä¸€é¨ĺ†ďĽŚč€Śé‚Łä¸Şĺ®Źé‡Ść”ąĺŹäş†ćł˘ćµŞç¬¦çš„ç±»ĺ«ç&nbsp;ă€‚


% \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{} ĺŚąé…Ťä¸€ä¸Şĺ®ŹĺĽ•ç”¨ĺ’Śĺ®çš„ĺ®šäą‰ć—¶ďĽŚĺŚąé…Ťçš„ä¸Ťä»…ä»…ćŻĺŹ‚ć•°çš„ĺ­—ç¬¦č€Śä¸”ĺŚ…ć‹¬ä»–ä»¬çš„ç±»ĺ«ç&nbsp;ă€‚
^^{ĺ®Ź//ĺ®Źçš„ĺŹ‚é‡Ź}
^^{ĺ®Ź//ĺ®Źçš„ĺŹ‚ć•°}
ĺ¦‚ćžśĺ®šäą‰é‡Śĺ­—ç¬¦çš„ç±»ĺ«ç&nbsp;ä¸Žĺ®ŹĺĽ•ç”¨é‡Śçš„ä¸ŤĺŚďĽŚ\TeX{} ä¸ŤäĽšč®¤ä¸şĺ­—ç¬¦ĺŚąé…Ťć­Łçˇ®ă€‚
čż™ć&nbsp;·çš„ć•ćžśĺŚŞĺ¤·ć‰€ć€ťďĽŚĺ›&nbsp;ä¸ş\emph{çś‹čµ·ćťĄ}ćŻĺŚąé…Ťçš„ă€‚äľ‹ĺ¦‚ďĽŚĺ¦‚ćžśä˝&nbsp;ĺ·˛ç»Źĺ®šäą‰äş†ĺ®ŹďĽš
\csdisplay
\def\eurodate#1/#2/#3{#2.#1.#3}
|
ç„¶ĺŽć–śçşżĺ­—ç¬¦ĺś¨ĺĽ•ç”¨ĺ’Śĺ®šäą‰ |\eurodate| çš„ć—¶ĺ€™ĺż…éˇ»ćś‰ç›¸ĺŚçš„ç±»ĺ«ç&nbsp;ă€‚
\endolist
ĺ¦‚ćžśé—®é˘ćŻĺ›&nbsp;ä¸şĺ«Śç–‘ĺ­—ç¬¦ä˝śä¸şĺ®ŹĺŹ‚é‡ŹďĽargumentďĽ‰ďĽŚčŻŠć˛»ć–ąćł•ćŻé‡Ťć–°ĺ®šäą‰ĺ®Źä¸şä¸€
ĺŻąĺ®Ź |\mstart| ĺ’Ś |\mfinish|ďĽŚĺ†ĺ«ĺś¨ĺŹ‚é‡Źć–‡ćś¬çš„ĺ‰ŤĺŽĺş”ç”¨ă€‚
|\mstart| č®ľĺ®šç±»ĺ«ç&nbsp;č€Ś |\mfinish| ç»“ćťźčż™ä¸€çĽ–ç»„ćťĄĺŹ–ć¶ĺŹĺŠ¨ă€‚
\eix^^{ç±»ĺ«ç&nbsp;//ć”ąĺŹç±»ĺ«ç&nbsp;}

%\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^^{ĺ®Ź//ä˝żĺ®Źć“čŻ»}
ä¸şäş†ä˝żĺľ—ĺ®Źć–‡ćˇŁć“čŻ»ďĽŚä˝&nbsp;ĺŹŻä»Ąĺś¨ć–‡ćˇŁĺĽ€ĺ¤´č®ľĺ®šç©şć&nbsp;Ľçš„ç±»ĺ«ç&nbsp;ä¸ş $9$ďĽĺż˝ç•Ąĺ­—ç¬¦ďĽ‰ďĽŚ^|\endlinechar|
\ctsref{\endlinechar}ä¸ş $-1$ă€‚ç„¶ĺŽďĽŚä˝&nbsp;ĺ°±ĺŹŻä»Ąč‡Şç”±ĺś°ä˝żç”¨ç©şć&nbsp;Ľĺ’Ść–­čˇŚč€Śä¸Ťĺż…
ć‹…ĺżäş§ç”źĺ¤šä˝™çš„ç©şç™˝ă€‚ĺż˝ç•Ąĺ­—ç¬¦ä¸ŤäĽšäş§ç”źç©şç™˝ďĽŚä˝†ä»Ťç„¶ĺ†łĺ®šćŽ§ĺ¶ĺşŹĺ—ĺ®šäą‰ă€‚ĺ¦‚ćžś
ä˝&nbsp;çśźçš„éś€č¦ä¸€ä¸Şç©şć&nbsp;ĽďĽŚĺŹŻä»Ąç”¨ ^|\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.
ĺ˝“ç„¶ĺś¨ć–‡ćˇŁćś€ĺŽďĽŚä˝&nbsp;éś€č¦ć˘ĺ¤Ťç©şć&nbsp;Ľĺ’ŚčˇŚĺ°ľçš„ç±»ĺ«ç&nbsp;ďĽĺ†ĺ«ćŻ $10$ ĺ’Ś $5$ďĽ‰ďĽšĺŹŻ
ä»ĄćŠŠć•´ä¸Şć–‡ćˇŁĺ°čŁ…ĺś¨ä¸€ä¸ŞçĽ–ç»„é‡ŚďĽŚäąźĺŹŻä»ĄćŽçˇ®ĺś°ć˘ĺ¤Ťĺ…¶ć­Łĺ¸¸ĺ€Ľă€‚ĺ¦‚ćžśä˝żç”¨çĽ–ç»„ĺ°
čŁ…ďĽŚä˝&nbsp;čżéś€č¦č®ľĺ®š ^|\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}

ä¸‹éť˘ćŻčż™ç§Ťć&nbsp;ĽĺĽŹĺ®Źć–‡ćˇŁçš„ä¸€ä¸Şĺ°Źäľ‹ĺ­ďĽš

\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
ä¸Ťć”ąĺŹç±»ĺ«ç&nbsp;çš„čŻťďĽŚčż™äş›ĺ®Źéś€č¦ĺ†™çš„ć›´ĺŠ&nbsp;ç´§ĺ‡‘ďĽŚä˝żç”¨ĺľĺ°‘çš„ç©şć&nbsp;Ľĺ’ŚčˇŚĺ°ľć›´ĺ¤šçš„
`|%|'ă€‚
\eix^^{ĺ®Ź//ä˝żĺ®Źć“čŻ»}

\ifoldeplain\else\ifcompletebook\else
\vskip4em{\sectionfonts\leftline{ćś¬ç«&nbsp;ç´˘ĺĽ•}}
\readindexfile{i}
\fi\fi

%\endchapter\byebye
\endchapter\byebye
</pre></body></html>