summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/FAQ-en/faq-how-do-i.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/faq-how-do-i.tex')
-rw-r--r--Master/texmf-dist/doc/generic/FAQ-en/faq-how-do-i.tex208
1 files changed, 110 insertions, 98 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/faq-how-do-i.tex b/Master/texmf-dist/doc/generic/FAQ-en/faq-how-do-i.tex
index a10e82d6899..f767d3959d5 100644
--- a/Master/texmf-dist/doc/generic/FAQ-en/faq-how-do-i.tex
+++ b/Master/texmf-dist/doc/generic/FAQ-en/faq-how-do-i.tex
@@ -1,4 +1,4 @@
-% $Id: faq-how-do-i.tex,v 1.37 2012/02/07 21:46:08 rf10 Exp $
+% $Id: faq-how-do-i.tex,v 1.45 2012/12/07 19:34:33 rf10 Exp rf10 $
\section{How do I do\dots{}?}
@@ -761,16 +761,18 @@ The \Class{memoir} class includes functions that match those in the
\Qref*{Lamport's book}{Q-latex-books} lists various
parameters for the layout of list (things like \csx{topsep},
\csx{itemsep} and \csx{parsep}), but fails to mention that they're set
-automatically within the list itself. This happens because each list
+automatically within the standard (\latex{}-defined) lists. This
+happens because each list
executes a command \csx{@list}\texttt{\meta{depth}} (the depth
appearing as a lower-case roman numeral); what's more, the top-level
\csx{@listi} is usually reset when the font size is changed. As a
result, it's rather tricky for
the user to control list spacing. Of course, the real answer is to use
a document class designed with more modest list spacing, but we all
-know such things are hard to come by. The \Class{memoir} class wasn't
-designed for more compact lists \emph{per se}, but offers the user
-control over the list spacing.
+know such things are hard to come by. The \Class{memoir} class doesn't
+provide more compact lists, but offers the user control over the list
+spacing using \csx{firmlist} and \csx{tightlist} (and \texttt{*}-ed
+versions of them); see section~8.6 of the memoir manual.
There are packages that provide some control of list spacing, but they
seldom address the separation from surrounding text (defined by
@@ -819,11 +821,6 @@ appear at positions on that grid. The effect is somewhat like that of
the `tab' keys on traditional typewriters; the package was designed
for example sheets, or lists of answers in the appendices of a book.
-The ultimate in compaction (of every sort) is offered by the
-\Package{savetrees} package; compaction of lists is included. The
-package's prime purpose is to save space at every touch and turn:
-don't use it if you're under any design constraint whatever!
-
The \Package{expdlist}, \Package{mdwlist} and \Package{paralist}
packages all offer other facilities for list configuration: you should
probably not try the ``do-it-yourself'' approaches outlined below if
@@ -859,17 +856,23 @@ to set spacing between items and between paragraphs within items.
\Package{Enumitem} also permits manipulation of the label format in a
more ``basic'' (and therefore more flexible) manner than the % ! line break
\Qref*{\Package{enumerate} package}{Q-enumerate} does.
+
+The ultimate in compaction (of every sort) is offered by the
+\Package{savetrees} package; compaction of lists is included. The
+package's prime purpose is to save space at every touch and turn:
+don't use it if you're under any design constraint whatever!
\begin{ctanrefs}
\item[enumerate.sty]Distributed as part of \CTANref{2etools}[enumitem]
\item[enumitem.sty]\CTANref{enumitem}
\item[expdlist.sty]\CTANref{expdlist}
\item[memoir.cls]\CTANref{memoir}
+\item[memoir \nothtml{\rmfamily}manual]\CTANref{memoir-man}
\item[mdwlist.sty]Distributed as part of \CTANref{mdwtools}[mdwlist]
\item[multenum.sty]\CTANref{multenum}
\item[paralist.sty]\CTANref{paralist}
\item[savetrees.sty]\CTANref{savetrees}
\end{ctanrefs}
-\LastEdit{2011-06-01}
+\LastEdit{2012-10-30}
\Question[Q-interruptlist]{Interrupting enumerated lists}
@@ -1311,15 +1314,11 @@ The \Package{cellspace} package does a (possibly inferior) job by
defining a new table/array column type ``S'', which you apply to each
column specification. So, for example,
\begin{quote}
-\begin{verbatim}
\cmdinvoke{begin}{tabular}{l l l p{3cm}}
-\end{verbatim}
\end{quote}
would become
\begin{quote}
-\begin{verbatim}
\cmdinvoke{begin}{tabular}{Sl Sl Sl Sp{3cm}}
-\end{verbatim}
\end{quote}
and so on. This technique shows
promise of not interfering so much with other packages, but this
@@ -1933,63 +1932,6 @@ the separation between floats really big:
\end{verbatim}
\end{quote}
-\Question[Q-vertspacefloat]{Extra vertical space in floats}
-
-A common complaint is that extra vertical space has crept into
-\environment{figure} or \environment{table} floating environments.
-More common still are users who post code that introduces this extra
-space, and \emph{haven't noticed the problem}!
-
-The trouble arises from the fact that the \environment{center}
-environment (and its siblings \environment{flushleft} and
-\environment{flushright}) are actually based on \LaTeX{}'s
-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{...}
- \end{center}
-\end{figure}
-\end{verbatim}
-\end{quote}
-\nothtml{\noindent}or worse still:
-\begin{quote}
-\begin{verbatim}
-\begin{figure}
- \begin{center}
- \includegraphics{...}
- \end{center}
- \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{...}
-\end{figure}
-\end{verbatim}
-\end{quote}
-(which even involves less typing).
-
-This alternative code will work with any \LaTeX{} package. It will
-not work with obsolete (pre-\LaTeXe{}) packages such as
-\Package{psfig} or \Package{epsf}~--- see % beware line break
-\Qref[question]{graphics inclusion}{Q-impgraph} for discussion of the
-genesis of \csx{includegraphics}.
-
\Question[Q-wideflt]{Centring a very wide figure or table}
The normal means of centring a figure or table object is to include
@@ -2148,14 +2090,43 @@ specially designed for the job:
\end{quote}
That example should produce a caption
\begin{quote}
- Figure \emph{n (facing page)}: Whew! \dots{}
+ Figure \meta{n} \emph{(facing page)}: Whew! \dots{}
\end{quote}
(Note, however, that the package is an old one, and declares itself to
-be a beta release. I seems to work, but\dots{})
+be a beta release, and contains no valid licence statement so that it
+is not in \texlive{}. It seems to work, but\dots{})
+
+A alternative route is the ``continued'' mechanism of the
+\Package{caption} package. The \csx{ContinuedFloat} macro makes a
+small tweak to the next \csx{caption} command, so that the command
+makes no increment to the caption number. This does not (of course)
+have any effect on actual placement of the float, but it makes the
+caption texts read `sensibly':
+\begin{quote}
+\begin{verbatim}
+\begin{table}
+ \caption{A table}
+ ...
+\end{table}
+...
+\begin{table}\ContinuedFloat
+ \caption{A table (cont.)}
+ ...
+\end{table}
+\end{verbatim}
+\end{quote}
+which would produce:
+\begin{quote}
+ Table 3: A table
+ \dots
+ Table 3: A table (cont.)
+\end{quote}
\begin{ctanrefs}
+\item[caption.sty]\CTANref{caption}
\item[dpfloat.sty]\CTANref{dpfloat}
\item[fltpage.sty]\CTANref{fltpage}
\end{ctanrefs}
+\LastEdit{2013-02-01}
\Question[Q-vertposfp]{Vertical layout of float pages}
@@ -2325,7 +2296,7 @@ advice, you can:
tools distribution; they're noticeably less efficient than the
standard \environment{tabular} environment, but they do allow
footnotes.
-\item Use \Package{tablefootnote}; it provides a \csx{tablefootnote},
+\item Use \Package{tablefootnote}; it provides a command \csx{tablefootnote},
which does the job without fuss.
\item Use \Package{footnote}, which provides an
\environment{savenotes} which collects all footnotes and emits them
@@ -2422,16 +2393,33 @@ If you \emph{are} going to proceed:
\end{itemize}
so we have:
\begin{quote}
+\begin{wideversion}
\begin{verbatim}
\begin{figure}
\begin{minipage}{\textwidth}
...
- \caption[Caption for LOF]%
- {Real caption\footnote{blah}}
+ \caption[Compact Routing Example]%
+ {Compact Routing\footnote{something} Example}
\end{minipage}
\end{figure}
\end{verbatim}
+\end{wideversion}
+\begin{narrowversion}
+\begin{verbatim}
+\begin{figure}
+ \begin{minipage}{\textwidth}
+ ...
+ \caption[Compact Routing Example]%
+ {Compact Routing\footnote{something}
+ Example}
+ \end{minipage}
+\end{figure}
+\end{verbatim}
+\end{narrowversion}
\end{quote}
+So, we make an entry for the List of Figures, which doesn't hold
+troublesome commands, such as \csx{footnote}.
+
However, \emph{as well as} all of the above, one \emph{also} has to
deal with the tendency of the \csx{caption} command to produce the
footnote's text twice. For this last problem, there is no tidy
@@ -2440,7 +2428,7 @@ solution this author is aware of.
If you're suffering the problem, a well-constructed \csx{caption}
command in a \environment{minipage} environment within a float (as
in the example above) can produce \emph{two} copies of the footnote
-body ``blah''. (In fact, the effect only occurs with captions that are
+body ``something''. (In fact, the effect only occurs with captions that are
long enough to require two lines to be typeset, and so wouldn't appear
with such a short caption as that in the example above.)
@@ -2450,6 +2438,7 @@ rather awful work-around for this problem.
\item[ccaption.sty]\CTANref{ccaption}
\item[threeparttable.sty]\CTANref{threeparttable}
\end{ctanrefs}
+\LastEdit{2012-04-12}
\Question[Q-repfootnote]{Footnotes whose texts are identical}
@@ -2928,7 +2917,7 @@ compiler, people regularly want to do compiler-like things using it.
Common requirements are conditional `compilation' and `block
comments', and several \LaTeX{}-specific means to this end are available.
-The simple \cmdinvoke{newcommand}{\csx{gobble}}[1]\texttt{\{}\texttt{\}}
+The simple \cmdinvoke{newcommand}{\csx{gobble}}[1]\texttt{\{\}}
and \csx{iffalse}\texttt{ ... }\csx{fi} aren't really satisfactory (as
a general solution) for comments, since the matter being skipped is
nevertheless scanned by \TeX{}, not always as you would expect. The
@@ -2964,6 +2953,24 @@ and other numbers are not disturbed. Note that you can choose which
sections you want included interactively, using the
\Package{askinclude} package.
+A variant on the \csx{includeonly} mechanism is offered by the
+\Package{stampinclude} package, which takes advantage of the \pdftex{}
+\csx{pdffilemoddate} command. When an \csx{include}d file is
+processed in a \latex{} document, an \extension{aux} file is created
+holding data such as page-number ranges and chapter/section numbers.
+When \csx{stampinclude} is included in a document, it compares the
+file system modification times for each file and its corresponding
+\extension{aux} file; the file is only compiled in ``this run'' of the
+document if the file is newer than its corresponding \extension{aux}
+file. The package requires a current \pdftex{}, and will also run on
+\luatex{} if the \Package{pdftexcmds} package is available
+(\Package{pdftexcmds} emulates the requisite \pdftex{} commands using
+\texttt{lua}. Apart from this requirement, \Package{stampinclude} is
+a low-maintenace object; include it in your document and it silently
+does its job. When you want a final version of your document, delete
+all the \extension{aux} files, and and \Package{stampinclude} won't
+interfere.)
+
The inverse can be done using the \Package{excludeonly} package: this
allows you to exclude a (list of) \csx{include}d files from your
document, by means of an \csx{excludeonly} command.
@@ -3092,11 +3099,13 @@ ready-to-run \LaTeX{} documents with stuff you've extracted.
\item[pagesel.sty]Distributed as part of \CTANref{oberdiek}[pagesel]
\item[pdfpages.sty]\CTANref{pdfpages}
\item[selectp.sty]\CTANref{selectp}
+\item[stampinclude.sty]Distributed as part of \CTANref{oberdiek}[stampinclude]
\item[verbatim.sty]Distributed as part of \CTANref{2etools}[verbatim]
\item[version.sty]\CTANref{version}
\item[versions.sty]\CTANref{versions}
\item[xcomment.sty]\CTANref{xcomment}
\end{ctanrefs}
+\LastEdit{2012-11-28}
\Question[Q-docotherdir]{Bits of document from other directories}
@@ -3189,8 +3198,8 @@ following minimal solution:
\begin{wideversion}
\begin{verbatim}
\def\RCS$#1: #2 ${\expandafter\def\csname RCS#1\endcsname{#2}}
-\RCS$Revision: 1.37 $ % or any RCS keyword
-\RCS$Date: 2012/02/07 21:46:08 $
+\RCS$Revision: 1.45 $ % or any RCS keyword
+\RCS$Date: 2012/12/07 19:34:33 $
...
\date{Revision \RCSRevision, \RCSDate}
\end{verbatim}
@@ -3200,8 +3209,8 @@ following minimal solution:
\def\RCS$#1: #2 ${\expandafter
\def\csname RCS#1\endcsname{#2}%
}
-\RCS$Revision: 1.37 $ % or any RCS keyword
-\RCS$Date: 2012/02/07 21:46:08 $
+\RCS$Revision: 1.45 $ % or any RCS keyword
+\RCS$Date: 2012/12/07 19:34:33 $
...
\date{Revision \RCSRevision, \RCSDate}
\end{verbatim}
@@ -3281,6 +3290,14 @@ solution (and was used in generating printable versions of these
many bells and whistles that allow it to operate as if it were a poor
man's \WYSIWYG{} system.
+A recent strong contender is \ProgName{arara}, written in
+\ProgName{Java}. It is (the documentation says) based on ``rules''
+and ``directives''; its aim is to determine what to do from explicit
+instructions in its source code, rather than secondary sources such as
+log file analysis. \ProgName{Arara} is relatively new on CTAN, and
+comes with recommendations from many of the great and good of the
+\latex{} world.
+
Apparently along the same lines, is Auto\LaTeX{}. The \File{README}
of the distribution is actual a Unix-type man-page output, and shows
great attention to the details of the document production process.
@@ -3310,6 +3327,7 @@ The curious may examine the rules employed to run the present
\acro{FAQ} through \LaTeX{}: we don't present them as a complete
solution, but some of the tricks employed are surely re-usable.
\begin{ctanrefs}
+\item[\nothtml{\rmfamily}arara]\CTANref{arara}
\item[\nothtml{\rmfamily}AutoLaTeX]\CTANref{autolatex}
\item[\nothtml{\rmfamily}\acro{FAQ} distribution]\CTANref{faq}
\item[\nothtml{\rmfamily}latexmake]\CTANref{latexmake}
@@ -3318,6 +3336,7 @@ solution, but some of the tricks employed are surely re-usable.
\item[latexmk]\CTANref{latexmk}
\item[texi2dvi]Distributed as part of \CTANref{texinfo}
\end{ctanrefs}
+\LastEdit{2013-02-08}
\Question[Q-howmanypp]{How many pages are there in my document?}
@@ -3520,19 +3539,12 @@ to the preamble of their document. Other encodings (notably
in place of \acro{T}1. Indeed, most current 8-bit \TeX{} font
encodings will `work' with the relevant sets of hyphenation patterns.
-One might hope that, with the many aspirant successors to \TeX{} such
-as
-\begin{wideversion}
- \Qref{Omega}{Q-omegaleph}, \Qref{\LuaTeX{}}{Q-luatex} and
- \Qref{Ex\TeX{}}{Q-extex},
-\end{wideversion}
-\begin{narrowversion}
- Omega, \LuaTeX{} and Ex\TeX{}
- (\Qref[see questions]{}{Q-omegaleph}\Qref[,]{}{Q-luatex}
- \Qref[and]{}{Q-extex}),
-\end{narrowversion}
-all of which base their operations on Unicode, that the whole basis of
-encodings will change.
+With the advance of \xetex{} and \luatex{} to the mainstream, a new
+regime for generating hyphenation tables is in place. For each
+language, a table is written in Unicode, and ``8-bit'' versions are
+generated for use with various \latex{} font encodings. Original sets
+of patterns remain on \acro{CTAN}, for use when an older environment
+is needed.
\Question[Q-newlang]{Using a new language with Babel}
@@ -3872,7 +3884,7 @@ the selections before setting up hyphenation exceptions.
Knuth was making a particular point about the capabilities of \TeX{}
when he defined the logo. Unfortunately (in some people's opinion) he thereby
opened floodgates to give the world a whole range of rather silly
-`bumpy road' logos for \TeX{} entities such as \AMSTeX{}, \PiCTeX{},
+`bumpy road' logos for \TeX{} entities such as \AMSTeX{}, \pictex{},
\BibTeX{}, and so on, produced in a flurry of different fonts, sizes,
and baselines~--- indeed, everything one might hope to cause them to
obstruct the reading process. In particular, Lamport invented
@@ -3918,7 +3930,7 @@ the especially weird mirrored ``E'' in \xetex{}).
For those who don't wish to acquire the `proper' logos, the canonical
thing to do is to say \texttt{AMS-}\cmdinvoke{TeX}{}
for \AMSTeX{}, \texttt{Pic}\cmdinvoke{TeX}{}
-for \PiCTeX{}, \texttt{Bib}\cmdinvoke{TeX}{}
+for \pictex{}, \texttt{Bib}\cmdinvoke{TeX}{}
for \BibTeX{}, and so on.
\begin{ctanrefs}
\item[hologo.sty]Distributed as part of \CTANref{oberdiek}[hologo]