diff options
author | Karl Berry <karl@freefriends.org> | 2010-09-09 00:14:44 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-09-09 00:14:44 +0000 |
commit | 1059b463280c735f4e6a9fc6af666c4c8a311139 (patch) | |
tree | dfe1a8cf2f65c90c9b42c80b82d7f52b9630ffae /Master/texmf-dist/doc/generic/FAQ-en/faq-how-do-i.tex | |
parent | 0ce2c8b8193308d090a2c319fae8e6b6b348d62a (diff) |
faq 3.20 (18aug10)
git-svn-id: svn://tug.org/texlive/trunk@19623 c570f23f-e606-0410-a88d-b1316a301751
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.tex | 65 |
1 files changed, 41 insertions, 24 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 af25715e63a..6dfa7525cd6 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.13 2010/04/02 18:20:00 rf10 Exp rf10 $ +% $Id: faq-how-do-i.tex,v 1.16 2010/08/14 20:22:55 rf10 Exp rf10 $ \section{How do I do\dots{}?} @@ -2450,20 +2450,22 @@ common requirement for footnotes marked by symbols (with painfully small symbol sets). There are four packages that manage it, one way or another. -The \Package{perpage} package provides a general mechanism for -resetting counters per page, so can obviously be used for this task. -The interface is pretty simple: \cmdinvoke{MakePerPage}{footnote} will -do the job. If you want to restart the counter at something other -than~1 (for example to avoid something in the \LaTeX{} footnote symbol -list), you can use: \cmdinvoke{MakePerPage}[2]{footnote}. It's a -first-rate package, small and efficient. - -The \Package{zref} package provides the same facilities with its -\pkgoption{perpage} module, which defines a command \csx{zmakeperpage} -whose syntax is identical to that of \Package{perpage}, above. You can -load the module by \cmdinvoke{usepackage}[perpage]{zref} (or as -\cmdinvoke{usepackage}{zref-perpage}, if your needs so require~--- -look at \Package{zref}'s documentation for details). +The \Package{perpage} and \Package{zref-perpage} packages provide a +general mechanism for resetting counters per page, so can obviously be +used for this task. The interface is pretty simple: +\cmdinvoke{MakePerPage}{footnote} (in \Package{perpage}) or +\cmdinvoke{zmakeperpage}{footnote} (in \Package{zref-perpage}). If +you want to restart the counter at something other than~1 (for example +to avoid something in the \LaTeX{} footnote symbol list), you can use: +\cmdinvoke{MakePerPage}[2]{footnote} (in \Package{perpage}) or +\cmdinvoke{zmakeperpage}[2]{footnote} (in \Package{zref-perpage}). +Note that you can also load \Package{zref-perpage} + +\Package{Perpage} is a compact and efficient package; +\Package{zref-perpage}, being a \Package{zref} ``module'', comes with +\Package{zref}'s general mechanism for extending the the +\csx{label}---\csx{[page]ref} of \latex{}, which can offer many other +useful facilities. The \Package{footmisc} package provides a variety of means of controlling footnote appearance, among them a package option @@ -2478,7 +2480,7 @@ probably not particularly useful any more. \item[footmisc.sty]\CTANref{footmisc} \item[footnpag.sty]\CTANref{footnpag} \item[perpage.sty]Distributed as part \CTANref{bigfoot}[perpage] -\item[zref.sty]Distributed as part of \CTANref{oberdiek}[zref] +%\item[zref.sty]Distributed as part of \CTANref{oberdiek}[zref] \item[zref-perpage.sty]Distributed as part of \Package{zref} in \CTANref{oberdiek}[zref] \end{ctanrefs} @@ -2540,14 +2542,29 @@ the job is almost trivial: \let\OldInput\input \renewcommand{\input}[1]{% \renewcommand{\ThisFile}{#1}% - \OldInput{#1}% + \OldInput#1% } \end{verbatim} \end{quote} With that, the macro \csx{ThisFile} always contains the last thing input: it starts pointing at the base file of your document (\csx{jobname}), and thereafter changes every time you use -\cmdinvoke*{input}{file}. +\cmdinvoke*{input}{file}. Note that this is not satisfactory if your +document contains things \emph{other} than \csx{input} commands. For +example, in: +\begin{quote} +\begin{verbatim} +\documentclass{article} +... (macros above) +\begin{document} +\input{preamble} +<body of document> +\input{postamble} +\end{document} +\end{verbatim} +\end{quote} +\csx{ThisFile} contains \texttt{postamble} throughout the % !line break +\meta{body of document}. Most ordinary users will quickly become irritated with the simplicity of of the \csx{ThisFile} mechanism above. The following code is more @@ -2568,7 +2585,7 @@ previous file was before returning. \csname NameStack\theFileStack\endcsname \ThisFile \def\ThisFile{#1}% - #2{#1}% + #2#1% \expandafter\let\expandafter \ThisFile \csname NameStack\theFileStack\endcsname @@ -2922,7 +2939,7 @@ ready-to-run \LaTeX{} documents with stuff you've extracted. \item[verbatim.sty]Distributed as part of \CTANref{2etools}[verbatim] \item[version.sty]\CTANref{version} \item[versions.sty]\CTANref{versions} -\item[xcomment.sty]Distributed as part of \CTANref{seminar}[xcomment] +\item[xcomment.sty]\CTANref{xcomment} \end{ctanrefs} \Question[Q-docotherdir]{Bits of document from other directories} @@ -3016,8 +3033,8 @@ following minimal solution: \begin{wideversion} \begin{verbatim} \def\RCS$#1: #2 ${\expandafter\def\csname RCS#1\endcsname{#2}} -\RCS$Revision: 1.13 $ % or any RCS keyword -\RCS$Date: 2010/04/02 18:20:00 $ +\RCS$Revision: 1.16 $ % or any RCS keyword +\RCS$Date: 2010/08/14 20:22:55 $ ... \date{Revision \RCSRevision, \RCSDate} \end{verbatim} @@ -3027,8 +3044,8 @@ following minimal solution: \def\RCS$#1: #2 ${\expandafter \def\csname RCS#1\endcsname{#2}% } -\RCS$Revision: 1.13 $ % or any RCS keyword -\RCS$Date: 2010/04/02 18:20:00 $ +\RCS$Revision: 1.16 $ % or any RCS keyword +\RCS$Date: 2010/08/14 20:22:55 $ ... \date{Revision \RCSRevision, \RCSDate} \end{verbatim} |