diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-protect.html')
-rw-r--r-- | Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-protect.html | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-protect.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-protect.html index fe8c8307f86..13c8d9ed087 100644 --- a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-protect.html +++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-protect.html @@ -1,30 +1,30 @@ <head> <title>UK TeX FAQ -- question label protect</title> </head><body> -<h3>What’s the reason for ‘protection’?</h3> +<h3>What’s the reason for ‘protection’?</h3> <p/>Sometimes LaTeX saves data it will reread later. These data are often the argument of some command; they are the so-called moving -arguments. (‘Moving’ because data are moved around.) Candidates +arguments. (‘Moving’ because data are moved around.) Candidates are all arguments that may go into table of contents, list of figures, <em>etc</em>.; namely, data that are written to an auxiliary file and read in later. Other places are those data that might appear in head- or footlines. Section headings and figure captions are the most -prominent examples; there’s a complete list in Lamport’s book +prominent examples; there’s a complete list in Lamport’s book (see <a href="FAQ-books.html">TeX-related books</a>). -<p/>What’s going on really, behind the scenes? The commands in moving +<p/>What’s going on really, behind the scenes? The commands in moving arguments are normally expanded to their internal structure during the process of saving. Sometimes this expansion results in invalid TeX code, which shows either during expansion or when the code is processed again. Protecting a command, using -“<code>\</code><code>protect</code><code>\</code><code>cmd</code>” tells LaTeX to save <code>\</code><code>cmd</code> as +“<code>\</code><code>protect</code><code>\</code><code>cmd</code>” tells LaTeX to save <code>\</code><code>cmd</code> as <code>\</code><code>cmd</code>, without expanding it at all. -<p/>So, what is a ‘fragile command’? — it’s a command that expands into +<p/>So, what is a ‘fragile command’? — it’s a command that expands into illegal TeX code during the save process. -<p/>What is a ‘robust command’? — it’s a command that expands into legal +<p/>What is a ‘robust command’? — it’s a command that expands into legal TeX code during the save process. -<p/>Lamport’s book says in its description of every LaTeX command whether -it is ‘robust’ or ‘fragile’; it also says that every command with an -optional argument is fragile. The list isn’t reliable, and neither +<p/>Lamport’s book says in its description of every LaTeX command whether +it is ‘robust’ or ‘fragile’; it also says that every command with an +optional argument is fragile. The list isn’t reliable, and neither is the assertion about optional arguments; the statements may have been true in early versions of LaTeX2e but are not any longer necessarily so: @@ -33,7 +33,7 @@ necessarily so: in later revisions of LaTeX. <li> Some commands, such as <code>\</code><code>end</code> and <code>\</code><code>nocite</code>, are fragile even though they have no optional arguments. -<li> The “user’s way” of creating a command with an optional +<li> The “user’s way” of creating a command with an optional argument (using <code>\</code><code>newcommand</code> or <code>\</code><code>newcommand*</code>) now always creates a robust command (though macros without optional arguments may still be fragile if they do things that are themselves fragile). @@ -42,7 +42,7 @@ necessarily so: <li> Some robust commands are redefined by certain packages to be fragile (the <code>\</code><code>cite</code> command commonly suffers this treatment). </ul> -Further, simply “hiding” a fragile command in another command, has +Further, simply “hiding” a fragile command in another command, has no effect on fragility. So, if <code>\</code><code>fred</code> is fragile, and you write: <blockquote> <pre> @@ -63,7 +63,7 @@ trick above as: then <code>\</code><code>jim</code> is robust. <p/>Finally, we have the <i>makerobust</i> package, which defines <code>\</code><code>MakeRobustCommand</code> to convert a command to be robust. With the -package, the “wrapping” above can simply be replaced by: +package, the “wrapping” above can simply be replaced by: <blockquote> <pre> \MakeRobustCommand\fred @@ -78,8 +78,8 @@ protection of some things, but the techniques available in current LaTeX mean that this is an expensive exercise. It remains a long-term aim of the team to remove all need for <code>\</code><code>protect</code>ion. <dl> -<dt><tt><i>makerobust.sty</i></tt><dd>Distributed with Heiko Oberdiek’s packages - <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/oberdiek.zip">macros/latex/contrib/oberdiek</a> (or <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/oberdiek/">browse the directory</a>) +<dt><tt><i>makerobust.sty</i></tt><dd>Distributed as part of Heiko Oberdiek’s bundle + <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/oberdiek.zip">macros/latex/contrib/oberdiek</a> (or <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/oberdiek/">browse the directory</a>); <a href="http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/makerobust.html">catalogue entry</a> </dl> <p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=protect">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=protect</a> </body> |