summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-patch.html
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-patch.html')
-rw-r--r--Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-patch.html28
1 files changed, 14 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-patch.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-patch.html
index 9b98b33c632..233b15aab10 100644
--- a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-patch.html
+++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-patch.html
@@ -15,9 +15,9 @@ would naturally write:
</blockquote><p>
However, this would not work: a call to <code>\</code><code>splat</code> would execute
<code>\</code><code>mumble</code>, and the call the redefined <code>\</code><code>splat</code> again; this is an
-unterminated recursion, that will quickly exhaust TeX&rsquo;s memory.
+unterminated recursion, that will quickly exhaust TeX&#8217;s memory.
<p/>Fortunately, the TeX primitive <code>\</code><code>let</code> command comes to our
-rescue; it allows us to take a &ldquo;snapshot&rdquo; of the current state of a
+rescue; it allows us to take a &#8220;snapshot&#8221; of the current state of a
command, which we can then use in the redefinition of the command.
So:
<blockquote>
@@ -38,20 +38,20 @@ pass them on:
</blockquote><p>
<p/>The general case may be achieved in two ways. First, one can use the
LaTeX command <code>\</code><code>CheckCommand</code>; this compares an existing command
-with the definition you give it, and issues a warning if two don&rsquo;t
+with the definition you give it, and issues a warning if two don&#8217;t
match. Use is therefore:
<blockquote>
<code>\CheckCommand{\complex}{</code>&lt;<i>original definition</i>&gt;<code>}</code><br>
<code>\renewcommand{\complex}{</code>&lt;<i>new definition</i>&gt;<code>}</code>
</blockquote><p>
This technique is obviously somewhat laborious, but if the original
-command comes from a source that&rsquo;s liable to change under the control
+command comes from a source that&#8217;s liable to change under the control
of someone else, it does at least warn you that your patch is in
danger of going wrong.
<p/>Otherwise, LaTeX users may use one of the <i>patchcmd</i>,
<i>ted</i> or <i>etoolbox</i> packages.
<p/>The <i>patchcmd</i> package addresses a slightly simpler task, by
-restricting the set of commands that you may patch; you mayn&rsquo;t patch
+restricting the set of commands that you may patch; you mayn&#8217;t patch
any command that has an optional argument, though it does deal with
the case of commands defined with <code>\</code><code>DeclareRobustCommand</code>. The
package defines a <code>\</code><code>patchcommand</code> command, that takes three
@@ -64,8 +64,8 @@ after
\patchcmd\b{a}{c}
</pre>
</blockquote><p>
-we will have a new version of <code>\</code><code>b</code> defined as &ldquo;<code>abc</code>&rdquo;.
-<p/>The <i>ted</i> package is a &lsquo;token list editor&rsquo;, and provides a
+we will have a new version of <code>\</code><code>b</code> defined as &#8220;<code>abc</code>&#8221;.
+<p/>The <i>ted</i> package is a &#8216;token list editor&#8217;, and provides a
command <code>\</code><code>substitute</code> which will patch the
contents of a macro, putting the result in a token-list, or
(in the form <code>\</code><code>Substitute*</code>) using the result to (re)define a
@@ -79,7 +79,7 @@ its definition:
{\Large\sffamily}{\huge\itshape}
</pre>
</blockquote><p>
-The macro&rsquo;s definition is now:
+The macro&#8217;s definition is now:
<blockquote>
<pre>
\huge\itshape\selectfont
@@ -87,8 +87,8 @@ The macro&rsquo;s definition is now:
</blockquote><p>
<p/>The package also offers a command <code>\</code><code>ShowTokens</code>, which shows the
content of its argument, one token to a line, with details of the
-token&rsquo;s category code, etc. This is recommended as a debugging tool.
-<p/>The <i>etoolbox</i> (which provides user access to e-TeX&rsquo;s
+token&#8217;s category code, etc. This is recommended as a debugging tool.
+<p/>The <i>etoolbox</i> (which provides user access to e-TeX&#8217;s
programming facilities) provides a command <code>\</code><code>patchcmd</code> which is
very similar to <code>\</code><code>Substitute</code>, except that it only replaces a
single instance of the token(s) in its search pattern. Since not all
@@ -98,19 +98,19 @@ package also provides commands that prepend (<code>\</code><code>pretocmd</code>
(<code>\</code><code>apptocmd</code>) to the definition of a command. Not all commands may
be patched in this way; the package provides a command
<code>\</code><code>ifpatchable</code> which checks the prerequisites, and checks that the
-target command&rsquo;s body does indeed include the patch string you propose
+target command&#8217;s body does indeed include the patch string you propose
to use. (The command <code>\</code><code>ifpatchable*</code> omits the test on the patch
string.)
-<p/>Finally, we&rsquo;ll briefly consider a package that is (just about)
+<p/>Finally, we&#8217;ll briefly consider a package that is (just about)
usable, but not really recommendable. <i>Patch</i> gives you an
ingenious (and difficult to understand) mechanism, and comes as an
old-style LaTeX documented macro file, which can no longer be
processed to <a href="FAQ-install-doc.html">produce formatted documentation, etc.</a>.
Fortunately, the file (<i>patch.doc</i>) may be input directly, and
-&ldquo;documentation&rdquo; may found by reading the source of the package.
+&#8220;documentation&#8221; may found by reading the source of the package.
Roughly speaking, one gives the command a set of instructions
analogous to <i>sed</i> substitutions, and it regenerates the
-command thus amended. Unless you can&rsquo;t do your job any other way,
+command thus amended. Unless you can&#8217;t do your job any other way,
<i>patch</i> is best avoided.
<dl>
<dt><tt><i>etoolbox.sty</i></tt><dd><a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/etoolbox.zip">macros/latex/contrib/etoolbox</a> (or <a href="http://www.tex.ac.uk/tex-archive/macros/latex/contrib/etoolbox/">browse the directory</a>)