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