summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/faq-wdidt.tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-02-19 00:37:41 +0000
committerKarl Berry <karl@freefriends.org>2011-02-19 00:37:41 +0000
commit8f846f8a8c7b2774059df2db0f153948e98cccf1 (patch)
treeff1781fa9b83db1e66c931962c18f57ae3428294 /Master/texmf-dist/doc/generic/FAQ-en/faq-wdidt.tex
parent09eb455bf0a899e9231b600e1326d5e0e4a67aca (diff)
FAQ-en 3.21 (18feb11)
git-svn-id: svn://tug.org/texlive/trunk@21459 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/faq-wdidt.tex')
-rw-r--r--Master/texmf-dist/doc/generic/FAQ-en/faq-wdidt.tex45
1 files changed, 31 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/faq-wdidt.tex b/Master/texmf-dist/doc/generic/FAQ-en/faq-wdidt.tex
index 42b53018a4a..8b998fc5ce3 100644
--- a/Master/texmf-dist/doc/generic/FAQ-en/faq-wdidt.tex
+++ b/Master/texmf-dist/doc/generic/FAQ-en/faq-wdidt.tex
@@ -1,4 +1,4 @@
-% $Id: faq-wdidt.tex,v 1.5 2010/04/28 06:13:10 rf10 Exp rf10 $
+% $Id: faq-wdidt.tex,v 1.10 2011/02/10 23:01:29 rf10 Exp rf10 $
\section{Why does it \emph{do} that?}
@@ -156,7 +156,8 @@ matching \cmdinvoke{end}{verbatim}.
This is why the \LaTeX{} book insists that verbatim
commands must not appear in the argument of any other command; they
-aren't just fragile, they're quite unusable in any command parameter,
+aren't just fragile, they're quite unusable in any ``normal'' command
+parameter,
regardless of \Qref*{\csx{protect}ion}{Q-protect}. (The \csx{verb}
command tries hard to detect if you're misusing it; unfortunately, it
can't always do so, and the error message is therefore not a reliable
@@ -175,7 +176,7 @@ necessary?''.
``\Qref*{typesetting \acro{URL}s}{Q-setURL}'' offers advice here.
\item If you're putting \csx{verb} into the argument of a boxing
command (such as \csx{fbox}), consider using the \environment{lrbox}
- environment:
+ environmen)t:
\begin{quote}
\begin{verbatim}
\newsavebox{\mybox}
@@ -188,7 +189,22 @@ necessary?''.
\end{quote}
\end{itemize}
-Otherwise, there are three partial solutions to the problem.
+If you can't avoid verbatim, the \csx{cprotect} command (from the
+package \Package{cprotect}) might help. The package manages to make a
+macro read a verbatim argument in a ``sanitised'' way by the simple
+medium of prefixing the macro with \csx{cprotect}:
+\begin{quote}
+\begin{verbatim}
+\cprotect\section{Using \verb|verbatim|}
+\end{verbatim}
+\end{quote}
+The package (at the time this author tested it) was still under
+development (though it \emph{does} work in this simple case) and
+deserves consideration in most cases; the package documentation gives
+more details.
+
+Other than the \Package{cprotect} package, there are three partial
+solutions to the problem:
\begin{itemize}
\item Some packages have macros which are designed to be responsive
to verbatim text in their arguments. For example,
@@ -234,9 +250,8 @@ Otherwise, there are three partial solutions to the problem.
like percent signs for which \AllTeX{} already provides
robust macros).
\end{itemize}
-Documentation of both \Package{url} and \Package{verbdef} is in the
-package files.
\begin{ctanrefs}
+\item[cprotect.sty]\CTANref{cprotect}
\item[fancyvrb.sty]\CTANref{fancyvrb}
\item[memoir.cls]\CTANref{memoir}
\item[url.sty]\CTANref{url}
@@ -499,11 +514,13 @@ before your first \csx{chapter}.
What happens is, that the class numbers sections as % ! line break
``\meta{chapter no}.\meta{section no}'', and until the first
-chapter has appeared, the chapter number is 0.
+\csx{chapter} has appeared, the chapter number is 0. (If you
+use\csx{chapter*}, which doesn't number the chapter it produces, the
+problem still arises.)
-If you're doing this, it's quite likely that the \Class{article} class
-is for you; try it and see. Otherwise, give your sections a
-`superior' chapter, or do away with section numbering by using
+If you're doing this, it's possible that the \Class{article} class
+is for you; try it and see. Otherwise, put a \csx{chapter} before
+your sections, or do away with section numbering by using
\csx{section*} instead. An alternative way of avoiding numbering is
discussed in % ! line break
``\Qref*{unnumbered sections in the table of contents}{Q-secnumdep}''.
@@ -1350,7 +1367,7 @@ Paragraph text ...
\end{verbatim}
\end{quote}
This technique \emph{only} works for such very short intrusions; if
-you need several lines, you should convert your intrusion into an
+you need several lines, you should convert your intrusion into a
\environment{quote} environment, since it's not possible to provide a
\csx{strut} command for every line of the intrusion, in a sensible
way, so proceed by:
@@ -1424,8 +1441,8 @@ is different from those around it:
Main body of text...
\end{verbatim}
\end{quote}
-Again, the problem is solved by inserting a paragraph marker in
-the text with a different size:
+Again, the problem is solved by ending the paragraph in the same group
+as the text with a different size:
\begin{quote}
\begin{verbatim}
{\Large (Extended) IMPORTANT DETAILS ...\par}
@@ -1547,7 +1564,7 @@ One doesn't do this for a variety of small reasons:
\begin{description}
\item[Confusion] You've been happily working in this mode, and for
some reason find you're to switch to writing in German: the effect
- of using ``\texttt{\ss}'' is somewhat startling, since \acro{T}1
+ of using ``\texttt{\ss {}}'' is somewhat startling, since \acro{T}1
and Latin-1 treat the codepoint differently.
\item[Compatibility] You find yourself needing to work with a
colleague in Eastern Europe: their keyboard is likely to be set to