summaryrefslogtreecommitdiff
path: root/Master/texmf-doc/doc/english/FAQ-en/faqbody.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-doc/doc/english/FAQ-en/faqbody.tex')
-rw-r--r--Master/texmf-doc/doc/english/FAQ-en/faqbody.tex371
1 files changed, 311 insertions, 60 deletions
diff --git a/Master/texmf-doc/doc/english/FAQ-en/faqbody.tex b/Master/texmf-doc/doc/english/FAQ-en/faqbody.tex
index 01bf67ffedf..f0d68addcb0 100644
--- a/Master/texmf-doc/doc/english/FAQ-en/faqbody.tex
+++ b/Master/texmf-doc/doc/english/FAQ-en/faqbody.tex
@@ -1,4 +1,4 @@
-\def\faqfileversion{3.16b-1} \def\faqfiledate{2006/10/04}
+\def\faqfileversion{3.16c} \def\faqfiledate{2006-12-11}
%
% The above line defines the file version, and must remain the first
% line with any `assignment' in the file, or things will blow up
@@ -8,9 +8,7 @@
%
% configuration for the lists, if we're going to need to generate urls
% for the files
-\ifpdf
\InputIfFileExists{archive.cfg}{}{}
-\fi
%
% ... directories
\input{dirctan}
@@ -35,7 +33,8 @@ You may use the \acro{FAQ}
\item by using the \acro{FAQ}'s web interface (base \acro{URL}:
\URL{http://www.tex.ac.uk/faq}); this version provides simple search
capabilities, as well as a link to Google for a more sophisticated
- search restricted to the \acro{FAQ} itself.
+ search restricted to the \acro{FAQ} itself, or
+\item via Scott Pakin's \CTANhref{visualFAQ}{Visual FAQ}.
\end{itemize}
\begin{htmlversion}
@@ -107,7 +106,7 @@ Michael Downes, % (RIP) on (ams)maths stuff
Jean-Pierre Drucbert, % corrected my interpretation of minitoc
Thomas Esser,
Ulrike Fischer, % spotted boondoggle in q-tabcellalign
- % args like \section improvement
+ % args like \section improvement; general typos
Anthony Goreham,
Norman Gray,
Eitan Gurari, % comparative html translators
@@ -1540,6 +1539,13 @@ excellent introduction to graphics use. It's available on
\acro{CTAN}, but the sources aren't available (promised ``some time
soon'').
+Kjell Magne Fauske offers a set of examples of the use of the drawing
+packages % ! line break
+\Qref*{\acro{PGF} and \acro{T}ik\acro{Z}}{Q-drawing}; the % ! line break
+\href{http://www.fauskes.net/pgftikzexamples/}{examples catalogue}
+includes examples (with output) from the package documentation as well
+as code written by the author himself.
+
Vincent Zoonekynd provides a set of excellent (and graphic) tutorials
on the programming of % !line breaks, ...
\href{http://zoonek.free.fr/LaTeX/LaTeX_samples_title/0.html}{title page styles},
@@ -1812,6 +1818,12 @@ itself be formatted with \LaTeX{}). Classes that are not part of the
distribution are commonly based on ones that are, and start by loading
the standard class with \csx{LoadClass}~--- an example of this
technique may be seen in \Package{ltxguide.cls}
+
+An % !!! line break
+\href{http://www.tug.org/pracjourn/2006-4/flynn/flynn.pdf}{annotated version of \Class{article}},
+as it appears in \File{classes.dtx}, was published in the Prac\TeX{}
+Journal 2006, No.\,4. The article is by Peter Flynn, and offers a
+slightly easier way in to understanding \File{classes.dtx}
\begin{ctanrefs}
\item[classes.dtx]\CTANref{latex-classes}
\item[ltxguide.cls]\CTANref{ltxguide}
@@ -3315,8 +3327,7 @@ also have email, and normal telephone and fax support.
East Lothian, \acro{EH}33 1\acro{AS}\\
\acro{UK}\\[0.25\baselineskip]
Tel: 0845 766\,0340 (within the \acro{UK}) \\
- Tel: +44 1875 616516 \\
- Fax: 01875 613513 (within the \acro{UK}) \\
+ Fax: 0845 603\,9443 (within the \acro{UK}) \\
Email: \mailto{christopher@sciword.demon.co.uk} \\
Web: \URL{http://www.sciword.demon.co.uk}
\end{quote}
@@ -7093,6 +7104,7 @@ the question\dots{}
\begin{ctanrefs}
\item[mps2eps]\CTANref{mps2eps}
\item[mpsproof.tex]\CTANref{mpsproof}
+\item[mptopdf]Part of \CTANref{pdftex-graphics}
\end{ctanrefs}
\Question[Q-drawing]{Drawing with \TeX{}}
@@ -7161,7 +7173,7 @@ of drawing, and setup, here are a few systems you may consider:
\item[dratex.sty]\CTANref{dratex}
\item[mfpic]\CTANref{mfpic}
\item[pdftricks.sty]\CTANref{pdftricks}
-\item[pspicture.sty]Distributed as part of \CTANref{carlisle}
+\item[pspicture.sty]\CTANref{pspicture}
\item[pgf.sty]\CTANref{pgf}
\item[pict2e.sty]\CTANref{pict2e}
\item[pstricks]\CTANref{pstricks}
@@ -7605,21 +7617,25 @@ entry will look like:
\end{quote}
A possible alternative approach is to use \BibTeX{} styles other than
the standard ones, that already have \acro{URL} entry types.
-Pre-eminent are the \Package{natbib} styles (\Package{plainnat},
-\Package{unsrtnat} and \Package{abbrevnat}). These styles are
-extensions of the standard styles, principally for use with
-\Package{natbib} itself, but they've acquired \acro{URL}s and other
-``modern'' entries along the way. The same author's
-\Package{custom-bib} is also capable of generating styles that honour
-\acro{URL} entries.
-
-Another candidate is the \Package{harvard} package (if its citation
-styles are otherwise satisfactory for you). \Package{Harvard}
-bibliography styles all include a ``|url|'' field in their
-specification; however, the typesetting offered is somewhat feeble
-(though it does recognise and use \ProgName{LaTeX2HTML} macros if they
-are available, to create hyperlinks).
-
+Candidates are:
+\begin{itemize}
+\item The \Package{natbib} styles (\Package{plainnat},
+ \Package{unsrtnat} and \Package{abbrevnat}), which are extensions of
+ the standard styles, principally for use with \Package{natbib}
+ itself. However, they've acquired \acro{URL}s and other ``modern''
+ entries along the way. The same author's \Package{custom-bib} is
+ also capable of generating styles that honour \acro{URL} entries.
+\item The \Package{babelbib} bundle, which offers % ! line break
+ \Qref*{multilingual bibliographies}{Q-i18nbib}, similarly provides a
+ set of standard-style equivalents that have \acro{URL} entries.
+\item More modern styles such as the \Package{harvard} package (if the
+ citation styles are otherwise satisfactory for you).
+ \Package{Harvard} bibliography styles all include a ``\texttt{url}''
+ field in their specification; however, the typesetting offered is
+ somewhat feeble (though it does recognise and use
+ \ProgName{LaTeX2HTML} macros if they are available, to create
+ hyperlinks).
+\end{itemize}
You can also acquire new \BibTeX{} styles by use of Norman Gray's
\Package{urlbst} system, which is based on a \ProgName{Perl} script
that edits an existing \BibTeX{} style file to produce a new
@@ -7661,6 +7677,7 @@ is an acceptable character in an \acro{URL}. Any current version of the
``\texttt{\textpercent}--end-of-line'' structure in its argument, and
removes it.
\begin{ctanrefs}
+\item[babelbib \nothtml{\rmfamily}bundle]\CTANref{babelbib}
\item[custom-bib \nothtml{\rmfamily}bundle]\CTANref{custom-bib}
\item[harvard.sty]\CTANref{harvard}
\item[hyperref.sty]\CTANref{hyperref}
@@ -7731,21 +7748,68 @@ follows:
@ARTICLE{Rayleigh1,
AUTHOR = "{\noopsort{Rayleigh}}{Lord Rayleigh}",
...
+}
\end{verbatim}
\end{wideversion}
\begin{narrowversion}
\begin{verbatim}
@PREAMBLE{
{\providecommand{\noopsort}[1]{}}
- }
+}
...
@ARTICLE{Rayleigh1,
AUTHOR =
"\noopsort{Rayleigh}{Lord Rayleigh}",
...
+}
\end{verbatim}
\end{narrowversion}
\end{quote}
+Note that this \csx{noopsort} applies to the last name in this kind of
+construct, so an author with an Arabic name might be rendered:
+\begin{wideversion}
+\begin{quote}
+\begin{verbatim}
+...
+AUTHOR = "Ali {\noopsort{Hadiidii}}{al-Hadiidii}",
+...
+\end{verbatim}
+\end{quote}
+\end{wideversion}
+\begin{narrowversion}
+\begin{quote}
+\begin{verbatim}
+...
+AUTHOR =
+ "Ali {\noopsort{Hadiidii}}{al-Hadiidii}",
+...
+\end{verbatim}
+\end{quote}
+\end{narrowversion}
+A further use might deal with word order games, as in the famous
+Vietnamese name:
+\begin{wideversion}
+\begin{quote}
+\begin{verbatim}
+...
+AUTHOR = "\noopsort{Thanh Han The}{Han The Thanh}",
+...
+\end{verbatim}
+\end{quote}
+\end{wideversion}
+\begin{narrowversion}
+\begin{quote}
+\begin{verbatim}
+...
+AUTHOR =
+ "\noopsort{Thanh Han The}{Han The Thanh}",
+...
+\end{verbatim}
+\end{quote}
+\end{narrowversion}
+though that author seems well-acquainted with Western confusion about
+the significance of the parts of his name (even to the extent of
+missing out the accentuation, as above\dots{}).
\Question[Q-bibtranscinit]{Transcribed initials in \BibTeX{}}
@@ -7947,12 +8011,12 @@ Fortunately, help is at hand, on the Web, with this problem:
sorted into their nominal topics as well as providing a good range
of examples, is the Reed College % ! line break
\begin{narrowversion}
- ``Bibliographies in \LaTeX{}''
- (\URL{http://web.reed.edu/cis/help/BibTeXstandard.html}).
+ ``Choosing a \BibTeX{} style''
+ (\URL{http://web.reed.edu/cis/help/LaTeX/bibtexstyles.html}).
\end{narrowversion}
\begin{wideversion}
% ! line break
- ``\href{http://web.reed.edu/cis/help/BibTeXstandard.html}{Bibliographies in \LaTeX{}}''.
+ ``\href{http://web.reed.edu/cis/help/LaTeX/bibtexstyles.html}{Choosing a \BibTeX{} style}''.
\end{wideversion}
\end{itemize}
@@ -9017,12 +9081,16 @@ and then use \csx{ssection} and \csx{ssubsection} in place of
\csx{section} and \csx{subsection}. This isn't perfect: section numbers
remain in bold, and starred forms need a separate redefinition.
-The package \Package{sectsty} provides an easy-to-use set of tools to
-do this job, while the package \Package{titlesec} has a structured
-approach based on redefinition of the sectioning and chapter commands
-themselves. \Package{Titlesec}'s approach allows it to offer far more
-radical adjustment: its options provide (in effect) a toolbox for
-designing your own sectioning commands' output.
+The \Package{titlesec} package offers a structured approach to the
+problem, based on redefinition of the sectioning and chapter commands
+themselves. This approach allows it to offer radical adjustment: its
+options provide (in effect) a toolbox for designing your own
+sectioning commands' output.
+
+The \Package{sectsty} package provides a more simply structured set of
+tools; while it is less powerful than is \Package{titlesec}, it is
+perhaps preferable for minor adjustments, since you can use it after
+having read a smaller proportion of the manual.
The \Package{fncychap} package provides a nice collection of customised
chapter heading designs. The \Package{anonchap} package provides a
@@ -9636,9 +9704,9 @@ those situations: even if your corrections add a whole page to the
chapter, the most you have to redistribute is that chapter.)
The problem, at first sight, seems pretty much the same as that in
-another answer on \nothtml{running numbers within a chapter (}%
+another answer on
% beware line break
-\Qref[question]{running numbers within a chapter}{Q-running-nos}\nothtml{)},
+\Qref*{running numbers within a chapter}{Q-running-nos},
and the basic technique is indeed pretty similar.
However, tidying-up loose ends, making sure the page number gets reset
@@ -10025,24 +10093,38 @@ be achieved with the \Package{draftcopy} package. This can deal with
many types of \acro{DVI} processors (in the same way that the graphics
package does) and knows translations for the word `DRAFT' into a wide
range of languages (though you can choose your own word, too).
+Unfortunately, however, the package relies on \PS{} specials, and will
+therefore fail if you are viewing your document with \ProgName{xdvi},
+and won't even compile if you're using \PDFLaTeX{}. (\PDFLaTeX{}
+users need one of the other solutions below.)
+
+The \Package{wallpaper} package builds on \Package{eso-pic} (see
+below). Apart from the single-image backdrops described above
+(``wallpapers'', of course, to this package), the package provides
+facilities for tiling images. All its commands come in pairs: one for
+``general'' use, and one applying to the current page only.
+
+The \Package{draftwatermark} package uses the same author's
+\Package{everypage} package to provide a simple interface for adding
+textual (`DRAFT'-like) watermarks.
More elaborate watermarks may be achieved using the \Package{eso-pic}
-package, which in turn uses the package \Package{everyshi}, part of
-Martin Schr\"oder's \Package{ms} bundle. \Package{Eso-pic} attaches a
+package, which in turn uses the package \Package{everyshi}, or by
+using \Package{everypage}. \Package{Eso-pic} attaches a
\environment{picture} environment to every page as it is shipped out;
you can put things into that environment. The package provides
commands for placing things at certain useful points (like ``text
upper left'' or ``text centre'') in the picture, but you're at liberty
to do what you like.
-The \Package{wallpaper} package builds, as above, on
-\Package{eso-pic}. Apart from the single-image backdrops described
-above (``wallpapers'', of course, to this package), the package
-provides facilities for tiling images. All its commands come in
-pairs: on for ``general'' use, and one applying to the current page only.
+\Package{Everypage} allows you to add ``something'' to every page, or
+to a particular page; you therefore need to construct your own
+apparatus for anything complicated.
\begin{ctanrefs}
\item[draftcopy.sty]\CTANref{draftcopy}
+\item[draftwatermark.sty]\CTANref{draftwatermark}
\item[eso-pic.sty]\CTANref{eso-pic}
+\item[everypage.sty]\CTANref{everypage}
\item[everyshi.sty]Distributed as part of \CTANref{ms}
\item[wallpaper.sty]\CTANref{wallpaper}
\end{ctanrefs}
@@ -10440,7 +10522,7 @@ version 6.0 onwards) you have installed:
\Question[Q-linespace]{Double-spaced documents in \LaTeX{}}
A quick and easy way of getting inter-line space for copy-editing is
-to change \csx{baselinestretch}~--- \cmdinvoke{linestretch}{1.2} (or,
+to change \csx{baselinestretch}~--- \cmdinvoke{linespread}{1.2} (or,
equivalently \cmdinvoke{renewcommand}{\csx{baselinestretch}}{1.2}) may
be adequate. Note that \csx{baselinestretch} changes don't take
effect until you select a new font, so make the change in the preamble
@@ -11082,16 +11164,15 @@ documents is \href{http://www.lilypond.org}{Lilypond}. Lilypond is
does most of its work without TeX. Lilypond's input syntax is far
less cryptic than is Musix\TeX{}'s, and it handles much more stuff
automatically, yielding the same or better quality with less effort.
-Lilypond can also produce basic \acro{MIDI} oputput.
+Lilypond can also produce basic \acro{MIDI} output.
\begin{ctanrefs}
\item[abc2mtex]\CTANref{abc2mtex}
\item[M-Tx]\CTANref{mtx}
\item[midi2tex]\CTANref{midi2tex}
\item[musictex]\CTANref{musictex}
-\item[musixtex \nothtml{\rmfamily}(Taupin's
- version)]\CTANref{musixtex-taupin}
-\item[musixtex \nothtml{\rmfamily}(Egler's
- version)]\CTANref{musixtex-egler}
+% ! line breaks
+\item[musixtex \nothtml{\rmfamily}(Taupin's version)]\CTANref{musixtex-taupin}
+\item[musixtex \nothtml{\rmfamily}(Egler's version)]\CTANref{musixtex-egler}
\item[mutex]\CTANref{mutex}
\item[pmx]\CTANref{pmx}
\end{ctanrefs}
@@ -13491,6 +13572,38 @@ down one or other side of a table (with the help of the
(which gives text going upwards; use angle |-90| for text going
downwards, of course).
+To make a \csx{multicolumn} multi-row ``cell'' in a table, you have to
+enclose a \csx{multirow} inside a \csx{multicolumn}~--- the other way
+around does not work, so:
+\begin{quote}
+\begin{wideversion}
+\begin{verbatim}
+\begin{tabular}{|c|c|c|}\hline
+\multicolumn{2}{|c|}{\multirow{2}{*}{combined cells}}
+ &top right\\ \cline{3-3}
+\multicolumn{2}{|c|}{}
+ &middle right\\ \hline
+bottom left
+ &bottom center
+ &bottom right\\ \hline
+\end{tabular}
+\end{verbatim}
+\end{wideversion}
+\begin{narrowversion}
+\begin{verbatim}
+\begin{tabular}{|c|c|c|}\hline
+\multicolumn{2}{|c|}{\multirow{2}{*}%
+ {combined cells}}
+ &top right\\ \cline{3-3}
+\multicolumn{2}{|c|}{}
+ &middle right\\ \hline
+bottom left
+ &bottom center
+ &bottom right\\ \hline
+\end{tabular}
+\end{verbatim}
+\end{narrowversion}
+\end{quote}
\Package{Multirow} is set up to interact with the \Package{bigstrut}
package (which is also discussed in the answer to % beware line break
\Qref[question]{spacing lines in tables}{Q-struttab}). You use an
@@ -13550,15 +13663,18 @@ list-handling code; and lists always separate themselves from the
material around them. Meanwhile, there are parameters provided to
adjust the spacing between floating environments and their
surroundings; so if we have:
+\begin{quote}
\begin{verbatim}
\begin{figure}
\begin{center}
\includegraphics{...}
- \caption{...}
+ \caption{...}
\end{center}
\end{figure}
\end{verbatim}
+\end{quote}
\nothtml{\noindent}or worse still:
+\begin{quote}
\begin{verbatim}
\begin{figure}
\begin{center}
@@ -13567,17 +13683,21 @@ surroundings; so if we have:
\caption{...}
\end{figure}
\end{verbatim}
+\end{quote}
unwarranted vertical space is going to appear.
The solution is to let the float and the objects in it position
themselves, and to use ``generic'' layout commands rather than their
list-based encapsulations.
+\begin{quote}
\begin{verbatim}
\begin{figure}
- \centering \includegraphics{...}
- \caption{...}
+ \centering
+ \includegraphics{...}
+ \caption{...}
\end{figure}
\end{verbatim}
+\end{quote}
(which even involves less typing).
This alternative code will work with any \LaTeX{} package. It will
@@ -13588,7 +13708,7 @@ genesis of \csx{includegraphics}.
\Question[Q-2colfloat]{Placing two-column floats at bottom of page}
-You specified placement `|[htbp]|' for your full-width figure or
+You specified placement `\texttt{[htbp]}' for your full-width figure or
table, but they always get placed at the top of the page\dots{} Well,
it \emph{is} what the documentation says: \LaTeX{}, unadorned, only
allows full-width floats at the top of a page, or occupying (part of) a
@@ -13628,18 +13748,22 @@ something approximating the effect it would have.)
\Question[Q-mcfloat]{Floats in multicolumn setting}
If you use
+\begin{quote}
\begin{verbatim}
\begin{figure}
...
\end{figure}
\end{verbatim}
+\end{quote}
in a \environment{multicols} environment, the figure won't appear. If
instead you use
+\begin{quote}
\begin{verbatim}
\begin{figure*}
...
\end{figure*}
\end{verbatim}
+\end{quote}
the figure will stretch right across the page (just the same as a
\environment{figure*} in standard \LaTeX{}'s |twocolumn| option).
@@ -14507,8 +14631,8 @@ following minimal solution:
\begin{wideversion}
\begin{verbatim}
\def\RCS$#1: #2 ${\expandafter\def\csname RCS#1\endcsname{#2}}
-\RCS$Revision: 1.409 $ % or any RCS keyword
-\RCS$Date: 2006/10/05 07:24:34 $
+\RCS$Revision: 1.423 $ % or any RCS keyword
+\RCS$Date: 2006/12/11 23:23:07 $
...
\date{Revision \RCSRevision, \RCSDate}
\end{verbatim}
@@ -14518,8 +14642,8 @@ following minimal solution:
\def\RCS$#1: #2 ${\expandafter
\def\csname RCS#1\endcsname{#2}%
}
-\RCS$Revision: 1.409 $ % or any RCS keyword
-\RCS$Date: 2006/10/05 07:24:34 $
+\RCS$Revision: 1.423 $ % or any RCS keyword
+\RCS$Date: 2006/12/11 23:23:07 $
...
\date{Revision \RCSRevision, \RCSDate}
\end{verbatim}
@@ -16820,6 +16944,110 @@ and away we go.
The form \csx{mypkg@...} is (sort of) blessed for \LaTeX{} package
internal names, which is why this example uses macros of that form.
+\Question[Q-isdef]{Is this command defined?}
+
+Macro sets from the earliest days of \TeX{} programming may be
+observed to test whether commands exist by using
+\begin{quote}
+\csx{ifx} \csx{}\texttt{\emph{command}} \csx{undefined} \meta{stuff} \dots{}
+\end{quote}
+(which of course actually tests that the command \emph{doesn't}
+exist). \LaTeX{} programmers can make use of the internal command
+\begin{quote}
+ \cmdinvoke*{@ifundefined}{cmd name}{action1}{action2}
+\end{quote}
+which executes \texttt{action1} if the command is undefined, and
+\texttt{action2} if it is defined
+(\emph{cmd name} is the command name only, omitting the `|\|' character).
+
+The \csx{@ifundefined} command is based on the sequence
+\begin{quote}
+\begin{narrowversion}
+\begin{verbatim}
+\expandafter
+ \ifx\csname cmd name\endcsname\relax
+\end{verbatim}
+\end{narrowversion}
+\begin{wideversion}
+\begin{verbatim}
+\expandafter \ifx \csname cmd name\endcsname \relax
+\end{verbatim}
+\end{wideversion}
+\end{quote}
+which relies on the way \csx{csname} works: if the command doesn't
+exist, it simply creates it as an alias for \csx{relax}.
+
+So: what is wrong with these techniques?
+
+Using \csx{undefined} blithely assumes that the command is indeed not
+defined. This isn'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 \csx{@undefined}, adding a single
+level of obscurity.
+
+The \csx{@ifundefined} 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 ``\csx{relax}''
+names serve no purpose whatever. Even so (sadly) there are places in
+the code of \LaTeX{} where the existence of the \csx{relax} is relied
+upon, after the test, so we can't get away from \csx{@ifundefined}
+altogether.
+
+David Kastrup offers the (rather tricky)
+\begin{quote}
+\begin{wideversion}
+\begin{verbatim}
+{\expandafter}\expandafter\ifx \csname cmd name\endcsname\relax ...
+\end{verbatim}
+\end{wideversion}
+\begin{narrowversion}
+\begin{verbatim}
+{\expandafter}\expandafter
+ \ifx \csname cmd name\endcsname \relax ...
+\end{verbatim}
+\end{narrowversion}
+\end{quote}
+which ``creates'' the \csx{relax}-command inside the group of the first
+\csx{expandafter}, therefore forgets it again once the test is done.
+The test is about as good as you can do with macros.
+
+The \Qref*{\eTeX{} system}{Q-etex} system comes to our help here: it
+defines two new primitives:
+\begin{itemize}
+\item \csx{ifdefined}, which tests whether a thing is defined (the
+ negative of comparing with \csx{undefined}, as it were), and
+\item \csx{ifcsname} \texttt{cmd name}\csx{endcsname}, which does the
+ negative of \csx{@ifundefined} without the \csx{relax}-command
+ side-effect.
+\end{itemize}
+So, in an \eTeX{}-based system, the following two conditional clauses do
+the same thing:
+\begin{quote}
+\begin{verbatim}
+\ifdefined\foo
+ \message{\string\foo\space is defined}%
+\else
+ \message{no command \string\foo}%
+\fi
+%
+\ifcsname foo\endcsname
+ \message{\string\foo\space is defined}%
+\else
+ \message{no command \string\foo}%
+\fi
+\end{verbatim}
+\end{quote}
+However, after using the \LaTeX{}
+\cmdinvoke{@ifundefined}{foo}\dots{}, the conditionals will detect the
+command as ``existing'' (since it has been \csx{let} to \csx{relax});
+so it is important not to mix mechanisms for detecting the state of a
+command.
+
+Since most distributions nowadays use \eTeX{} as their base executable
+for most packages, these two primitives may be expected appear widely
+in new macro packages.
+
\subsection{\LaTeX{} macro tools and techniques}
\Question[Q-plninltx]{Using Plain or primitive commands in \LaTeX{}}
@@ -17159,6 +17387,7 @@ mandatory argument, but \csx{newcommand} requires that you `know' the
value of the default beforehand.
The requisite trick is to use a macro in the optional argument:
+\begin{quote}
\begin{verbatim}
\documentclass{article}
\newcommand\thing[2][\DefaultOpt]{%
@@ -17171,6 +17400,21 @@ The requisite trick is to use a macro in the optional argument:
\thing[opti]{manda}% #1="opti"
\end{document}
\end{verbatim}
+\end{quote}
+\LaTeX{} itself has a trickier (but less readily understandable)
+method, using a macro \csx{@dblarg}; inside \LaTeX{}, the example
+above would have been programmed:
+\begin{quote}
+\begin{verbatim}
+\newcommand\thing{\@dblarg\@thing}
+\newcommand\@thing[2][\@error]{%
+ optional arg: #1, mandatory arg: #2%
+}
+\end{verbatim}
+\end{quote}
+In that code, \csx{@thing} is only ever called with an optional and a
+mandatory argument; if the default from the \csx{newcommand} is
+invoked, a bug in user code has bitten\dots{}
\Question[Q-twooptarg]{More than one optional argument}
@@ -17576,12 +17820,14 @@ writes something like:
\begin{verbatim}
\makeatletter
\@removefromreset{figure}{chapter}
+\makeatother
\end{verbatim}
\end{quote}
-and the automatic renumbering stops. You then need to redefine the
+and the automatic renumbering stops. You may then need to redefine the
way in which the figure number (in this case) is printed:
\begin{quote}
\begin{verbatim}
+\makeatletter
\renewcommand{\thefigure}{\@arabic\c@figure}
\makeatother
\end{verbatim}
@@ -17596,17 +17842,21 @@ numbered per chapter, try:
\begin{quote}
\begin{wideversion}
\begin{verbatim}
+\makeatletter
\@removefromreset{figure}{section}
\@addtoreset{figure}{chapter}
\renewcommand{\thefigure}{\thechapter.\@arabic\c@figure}
+\makeatother
\end{verbatim}
\end{wideversion}
\begin{narrowversion}
\begin{verbatim}
+\makeatletter
\@removefromreset{figure}{section}
\@addtoreset{figure}{chapter}
\renewcommand{\thefigure}%
{\thechapter.\@arabic\c@figure}
+\makeatother
\end{verbatim}
\end{narrowversion}
\end{quote}
@@ -18743,7 +18993,7 @@ are needed.
\begin{ctanrefs}
\item[dblfloatfix.sty]\CTANref{dblfloatfix}
\item[fix2col.sty]Distributed as part of \CTANref{carlisle}
-\item[fixltx2e.sty]Part of the \LaTeX{} distribution.
+\item[fixltx2e.sty]Part of the \LaTeX{} distribution
\end{ctanrefs}
\Question[Q-tabacc]{Accents misbehave in \environment{tabbing}}
@@ -21847,8 +22097,9 @@ which could quite reasonably (and indeed correctly) have been typed:
But if you've not made that mistake (even with several lines
separating the \csx{usepackage} commands, it's pretty easy to spot),
the problem could arise from something else loading the package for
-you. How do you find the culprit? Well, it's down to the log
-analysis games discussed in % ! line break
+you. How do you find the culprit? The "\texttt{h}" response to the
+error message tells you which options were loaded each time.
+Otherwise, it's down to the log analysis games discussed in % ! line break
``\Qref*{How to approach errors}{Q-erroradvice}''; the trick to remember
is that that the process of loading each file is parenthesised in the
log; so if package \Package{foo} loads \Package{graphics}, the log