summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-isdef.html
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-04-07 22:47:28 +0000
committerKarl Berry <karl@freefriends.org>2010-04-07 22:47:28 +0000
commit3f1971c9b7717818766692c9aa497e20e7472f2c (patch)
tree678de0190b6643b1b21fd9441fa1387bce180726 /Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-isdef.html
parentc7c3b090320a234149dbe23315e2a15a2773ac79 (diff)
FAQ-en 3.19d (7apr10)
git-svn-id: svn://tug.org/texlive/trunk@17742 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-isdef.html')
-rw-r--r--Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-isdef.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-isdef.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-isdef.html
index ae9732462f9..76a2c5ca5d8 100644
--- a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-isdef.html
+++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-isdef.html
@@ -5,16 +5,16 @@
<p/>Macro sets from the earliest days of TeX programming may be
observed to test whether commands exist by using
<blockquote>
-<code>\</code><code>ifx</code> csx<code><em>command</em></code> <code>\</code><code>undefined</code> &lt;<i>stuff</i>&gt; &hellip;
+<code>\</code><code>ifx</code> csx<code><em>command</em></code> <code>\</code><code>undefined</code> &lt;<i>stuff</i>&gt; &#8230;
</blockquote><p>
-(which of course actually tests that the command <em>doesn&rsquo;t</em>
+(which of course actually tests that the command <em>doesn&#8217;t</em>
exist). LaTeX programmers can make use of the internal command
<blockquote>
<code>\</code><code>@ifundefined{</code><em>cmd name</em><code>}{</code><em>action1</em><code>}{</code><em>action2</em><code>}</code>
</blockquote><p>
which executes <code>action1</code> if the command is undefined, and
<code>action2</code> if it is defined
-(<em>cmd name</em> is the command name only, omitting the &lsquo;<code>\</code>&rsquo; character).
+(<em>cmd name</em> is the command name only, omitting the &#8216;<code>\</code>&#8217; character).
<p/>The <code>\</code><code>@ifundefined</code> command is based on the sequence
<blockquote>
@@ -22,21 +22,21 @@ which executes <code>action1</code> if the command is undefined, and
\expandafter \ifx \csname cmd name\endcsname \relax
</pre>
</blockquote><p>
-which relies on the way <code>\</code><code>csname</code> works: if the command doesn&rsquo;t
+which relies on the way <code>\</code><code>csname</code> works: if the command doesn&#8217;t
exist, it simply creates it as an alias for <code>\</code><code>relax</code>.
<p/>So: what is wrong with these techniques?
<p/>Using <code>\</code><code>undefined</code> blithely assumes that the command is indeed not
-defined. This isn&rsquo;t entirely safe; one could make the name more
+defined. This isn&#8217;t entirely safe; one could make the name more
improbable, but that may simply make it more difficult to spot a
problem when things go wrong. LaTeX programmers who use the
technique will typically employ <code>\</code><code>@undefined</code>, adding a single
level of obscurity.
<p/>The <code>\</code><code>@ifundefined</code> mechanism has the unfortunate property of
polluting the name space: each test that turns out undefined adds a
-name to the set TeX is holding, and often all those &ldquo;<code>\</code><code>relax</code>&rdquo;
+name to the set TeX is holding, and often all those &#8220;<code>\</code><code>relax</code>&#8221;
names serve no purpose whatever. Even so (sadly) there are places in
the code of LaTeX where the existence of the <code>\</code><code>relax</code> is relied
-upon, after the test, so we can&rsquo;t get away from <code>\</code><code>@ifundefined</code>
+upon, after the test, so we can&#8217;t get away from <code>\</code><code>@ifundefined</code>
altogether.
<p/>David Kastrup offers the (rather tricky)
<blockquote>
@@ -45,7 +45,7 @@ altogether.
</pre>
</blockquote><p>
-which &ldquo;creates&rdquo; the <code>\</code><code>relax</code>-command inside the group of the first
+which &#8220;creates&#8221; the <code>\</code><code>relax</code>-command inside the group of the first
<code>\</code><code>expandafter</code>, therefore forgets it again once the test is done.
The test is about as good as you can do with macros.
<p/>The <a href="FAQ-etex.html">e-TeX system</a> system comes to our help here: it
@@ -75,8 +75,8 @@ the same thing:
</pre>
</blockquote><p>
However, after using the LaTeX
-<code>\</code><code>@ifundefined{foo}</code>&hellip;, the conditionals will detect the
-command as &ldquo;existing&rdquo; (since it has been <code>\</code><code>let</code> to <code>\</code><code>relax</code>);
+<code>\</code><code>@ifundefined{foo}</code>&#8230;, the conditionals will detect the
+command as &#8220;existing&#8221; (since it has been <code>\</code><code>let</code> to <code>\</code><code>relax</code>);
so it is important not to mix mechanisms for detecting the state of a
command.
<p/>Since most distributions nowadays use e-TeX as their base executable