summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-verbwithin.html
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-verbwithin.html')
-rw-r--r--Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-verbwithin.html26
1 files changed, 20 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-verbwithin.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-verbwithin.html
index 94731459f7a..e53d6391b0f 100644
--- a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-verbwithin.html
+++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-verbwithin.html
@@ -45,7 +45,8 @@ provokes errors like ‘File ended while scanning use of
matching <code>\</code><code>end{verbatim}</code>.
<p/>This is why the LaTeX book insists that verbatim
commands must not appear in the argument of any other command; they
-aren&#8217;t just fragile, they&#8217;re quite unusable in any command parameter,
+aren&#8217;t just fragile, they&#8217;re quite unusable in any &#8220;normal&#8221; command
+parameter,
regardless of <a href="FAQ-protect.html"><code>\</code><code>protect</code>ion</a>. (The <code>\</code><code>verb</code>
command tries hard to detect if you&#8217;re misusing it; unfortunately, it
can&#8217;t always do so, and the error message is therefore not a reliable
@@ -63,7 +64,7 @@ necessary?&#8221;.
&#8220;<a href="FAQ-setURL.html">typesetting URLs</a>&#8221; offers advice here.
<li> If you&#8217;re putting <code>\</code><code>verb</code> into the argument of a boxing
command (such as <code>\</code><code>fbox</code>), consider using the <code>lrbox</code>
- environment:
+ environmen)t:
<blockquote>
<pre>
\newsavebox{\mybox}
@@ -75,7 +76,21 @@ necessary?&#8221;.
</pre>
</blockquote><p>
</ul>
-<p/>Otherwise, there are three partial solutions to the problem.
+<p/>If you can&#8217;t avoid verbatim, the <code>\</code><code>cprotect</code> command (from the
+package <i>cprotect</i>) might help. The package manages to make a
+macro read a verbatim argument in a &#8220;sanitised&#8221; way by the simple
+medium of prefixing the macro with <code>\</code><code>cprotect</code>:
+<blockquote>
+<pre>
+\cprotect\section{Using \verb|verbatim|}
+</pre>
+</blockquote><p>
+The package (at the time this author tested it) was still under
+development (though it <em>does</em> work in this simple case) and
+deserves consideration in most cases; the package documentation gives
+more details.
+<p/>Other than the <i>cprotect</i> package, there are three partial
+solutions to the problem:
<ul>
<li> Some packages have macros which are designed to be responsive
to verbatim text in their arguments. For example,
@@ -118,13 +133,12 @@ necessary?&#8221;.
like percent signs for which (La)TeX already provides
robust macros).
</ul>
-Documentation of both <i>url</i> and <i>verbdef</i> is in the
-package files.
<dl>
+<dt><tt><i>cprotect.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/cprotect.zip">macros/latex/contrib/cprotect</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/cprotect/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/cprotect.html">catalogue entry</a>
<dt><tt><i>fancyvrb.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/fancyvrb.zip">macros/latex/contrib/fancyvrb</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/fancyvrb/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/fancyvrb.html">catalogue entry</a>
<dt><tt><i>memoir.cls</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/memoir.zip">macros/latex/contrib/memoir</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/memoir/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/memoir.html">catalogue entry</a>
<dt><tt><i>url.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/url.zip">macros/latex/contrib/url</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/url/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/url.html">catalogue entry</a>
-<dt><tt><i>verbdef.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/verbdef.zip">macros/latex/contrib/verbdef</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/verbdef/">browse the directory</a>)
+<dt><tt><i>verbdef.sty</i></tt><dd><a href="http://mirror.ctan.org/macros/latex/contrib/verbdef.zip">macros/latex/contrib/verbdef</a> (or <a href="http://mirror.ctan.org/macros/latex/contrib/verbdef/">browse the directory</a>); <a href="http://mirror.ctan.org/help/Catalogue/entries/verbdef.html">catalogue entry</a>
</dl>
<p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbwithin">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbwithin</a>
</body>