summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-13 19:16:35 +0000
committerKarl Berry <karl@freefriends.org>2010-09-13 19:16:35 +0000
commit8ac4866fb38af45e87b21dff99b0d56b506721a6 (patch)
treeca1b1afa5303dd8db10076f8046bef5b82ac5fe1
parent815cea44e9f0f8cdc1b7b8d69dcd507d010301c2 (diff)
cite update (12sep10)
git-svn-id: svn://tug.org/texlive/trunk@19710 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/cite/README5
-rw-r--r--Master/texmf-dist/doc/latex/cite/chapterbib.ltx243
-rw-r--r--Master/texmf-dist/doc/latex/cite/chapterbib.pdfbin0 -> 147894 bytes
-rw-r--r--Master/texmf-dist/doc/latex/cite/cite.ltx248
-rw-r--r--Master/texmf-dist/doc/latex/cite/cite.pdfbin0 -> 141446 bytes
-rw-r--r--Master/texmf-dist/tex/latex/cite/chapterbib.sty124
-rw-r--r--Master/texmf-dist/tex/latex/cite/cite.sty178
-rw-r--r--Master/texmf-dist/tex/latex/cite/drftcite.sty258
-rw-r--r--Master/texmf-dist/tex/latex/cite/overcite.sty423
9 files changed, 1159 insertions, 320 deletions
diff --git a/Master/texmf-dist/doc/latex/cite/README b/Master/texmf-dist/doc/latex/cite/README
index 698a2c1b236..02ad1217160 100644
--- a/Master/texmf-dist/doc/latex/cite/README
+++ b/Master/texmf-dist/doc/latex/cite/README
@@ -10,9 +10,8 @@ drftcite.sty Print the tags instead of the numbers for \cite and \bibitem.
chapterbib.sty Do multiple bibliographies--one for each \include file.
-The documentation is included as plain text after the definitions in
-each file (below \endinput). It can be read online or printed directly,
-but don't try to typeset it with LaTeX!
+The user manuals for cite and chapterbib are LaTeX files cite.ltx
+and chapterbib.ltx, and already typeset pdf versions.
They are all released under a very simple permissive license in
the MIT/BSD style: They may be freely used, transmitted, reproduced,
diff --git a/Master/texmf-dist/doc/latex/cite/chapterbib.ltx b/Master/texmf-dist/doc/latex/cite/chapterbib.ltx
new file mode 100644
index 00000000000..d0ac5dcf98a
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cite/chapterbib.ltx
@@ -0,0 +1,243 @@
+%
+% chapterbib.ltx Manual for chapterbib.sty
+%
+%
+% Copyright (c) 1993-2010 by Donald Arseneau
+%
+% Version 1.16 (5-Sep-2010)
+%
+\documentclass[12pt,a4paper]{ltxdoc}
+
+\setcounter{secnumdepth}{4}
+\renewcommand\theparagraph{\arabic{paragraph}}
+\newcommand\snugger{\vspace{-7pt}}
+
+\MakeShortVerb{\"}
+\hyphenpenalty=500
+\sloppy
+
+\setlength\parskip{2pt}
+\raggedbottom
+
+\title{chapterbib\\ multiple bibliographies in \LaTeX}
+\author{Donald Arseneau\\ asnd@triumf.ca}
+\date{2010/09/05}
+\begin{document}
+\maketitle
+
+\begin{footnotesize}
+\noindent Chapterbib is copyright \copyright\ 1989--2010 by
+Niel Kempson and Donald Arseneau.\\
+The package (chapterbib.sty) and this documentation (chapterbib.ltx,
+chapterbib.pdf) may be freely transmitted, reproduced, or modified
+for any purpose provided that the copyright notice is left intact.
+(Small excerpts may of course be taken and used without any restriction.)
+\par
+\end{footnotesize}
+
+\section*{Introduction}
+
+ The chapterbib package facilitates multiple bibliographies in a
+ \LaTeX\ document, including items \cs{cite}d (cited) in more than
+ one bibliography. Despite the name `chapterbib',
+ the \emph{bibliographies are for each included file}, not necessarily
+ for each chapter, although a bibliography per chapter is the usual
+ application. The main point is to allow you to use \BibTeX: Each
+ included file should have its own \cs{bibliographystyle} and
+ \cs{bibliography} commands, and you should run bibtex on each included
+ file separately rather than on the main or root file.
+
+ Chapterbib also provides the environment |cbunit|, and the command
+ \cs{cbinput} to allow multiple bibliographies without using \cs{include}
+ (see item~\ref{cbinput}).
+ There are two added hooks, \cs{citeform} and \cs{citepunct}, which you can
+ redefine to customize the formatting of each entry in a citation list,
+ and the declaration \cs{CitationPrefix} to use in preference to \cs{citeform}
+ for numbering-by-chapter.
+
+ Alternative packages: bibunits, biblatex.
+
+\clearpage
+
+\section*{Usage, Restrictions, and Options}
+
+\paragraph{Normal use: } \leavevmode \label{normaluse}% 1.
+Put \cs{bibliographystyle} and \cs{bibliography} commands in
+ each \cs{include}d file. Run \LaTeX; run \BibTeX\ on each included file;
+ run \LaTeX; run \LaTeX.
+
+\snugger\paragraph{Whole bibliography: } \label{whole} % 2.
+ With chapterbib, the \cs{bibliography} and |\bibliography|\-|style|
+ commands are not normally used in the root file, only in files that
+ have been \cs{include}d. To have a whole-document bibliography, see
+ items \ref{separate}--\ref{duplicate}, depending on which style of
+ whole-document bib.
+
+\snugger\paragraph{Without \textbackslash include: } \label{cbinput} % 3.
+ If you can't use \cs{include} because a new section must start below the
+ preceding bibliography on the same page (odd format!), then you can
+ use |\begin{cbunit}|\dots|\end{cbunit}| (for everything in one file)
+ or \cs{cbinput}, with a |thebibliography| environment in each unit
+ or input file.
+
+ To use \BibTeX, input separate files using \cs{cbinput}; at first use
+ the package or global option |[draft]|, run \LaTeX\ on the document,
+ then \BibTeX\ on each file that was \cs{cbinput}; finally, remove
+ the |[draft]| option and run \LaTeX\ again (maybe twice to get page
+ references right). The |[draft]| option only affects the treatment
+ of \cs{cbinput}, not \cs{include} or |\begin{cbunit}|.
+
+\snugger\paragraph{Package compatability: }\label{compatability} % 4.
+ Your preferred citation style (call it xxx.sty) may not work with
+ chapterbib at first, but it is easy to make it compatible:
+ In `xxx.sty' change every `|@\@citeb|' to `|@\@citeb\@extra@b@citeb|',
+ and insert the line\\[3pt]
+ \indent
+ |\@ifundefined{@extra@b@citeb}{\def\@extra@b@citeb{}}{}|\\[3pt]
+ somewhere (but not as a comment or as part of another definition!).
+
+ If the package also redefines \cs{bibcite} then you should change that
+ definition, replacing `|@#1|' with `|@#1\@extra@binfo|', and insert
+ \\[3pt]\indent
+ |\gdef\@extra@binfo{}|\\[3pt]
+ somewhere in the file. If the package defines a command that acts
+ similarly to \cs{bibcite} (being written to the aux file, and then
+ executed as the aux file is processed), then it should
+ have `|\@extra@binfo|' inserted in the same way.
+
+ Some citation packages deviate quite far from \LaTeX's own method
+ of organizing cite tags using `|b@\@citeb|'. The instructions above
+ catch such extensions as `|Y@\@citeb|', but not more radical differences.
+ In such cases, try contacting the author of the citation package.
+
+ If a citation style does not (re)define \cs{nocite}, then that command
+ would not be converted when you make the patches at `|@\@citeb|'.
+ Chapterbib will try to detect the presence of \cs{@extra@b@citeb}
+ in \cs{nocite} and insert it, but if that fails you may need to
+ redefine \cs{nocite} changing any `|@\@citeb|' to
+ `|@\@citeb\@extra@b@citeb|' in that sty file.
+
+\snugger\paragraph{Sectionbib: }\label{sectionbib} % 5.
+ The report and book document classes usually treat the bibliography as
+ an unnumbered chapter (|\chapter*|), which is not so good for
+ bibliographies \emph{in} a chapter. You can specify\\[3pt]
+ \indent
+ |\usepackage[sectionbib]{chapterbib}| \\[3pt]
+ to convert your bibliographies from |\chapter*| to |\section*|, with an
+ entry in the table of contents and the page-header. A bibliography in
+ the root file remains as a |\chapter*|. The |[sectionbib]| option modifies
+ the existing |thebibliography| environment (or the \cs{bibsection}
+ command, if present already), so the other formatting in the bibliography
+ should remain unchanged. On the other hand, if you already have a
+ non-standard bibliography defined, or if you want them numbered, it
+ may be easier to redefine \cs{thebibliography} directly, without any
+ tricky modification of existing commands.
+
+ Alternatively, you can use the \cs{sectionbib} command directly in the
+ document preamble. It takes two parameters: the sectioning command, and
+ the name of the sectioning level. For instance, the |[sectionbib]| option
+ executes |\sectionbib{\section*}{section}|. Again, for the most control,
+ it is better to redefine \cs{thebibliography} entirely.
+
+
+\snugger\paragraph{Overall separate bibliography: } \label{separate} %6.
+ If you want a completely unrelated bibliography in the root file, perhaps
+ for a general reading list, you can provide your own bibliography there
+ using the |thebibliography| environment. I don't suppose this will appeal
+ to \BibTeX\ users!
+
+\snugger\paragraph{Overall bibliography: }\label{overall}% 7.
+ To have a cohesive bibliography for the whole document, plus individual
+ bibs in the chapters, put \cs{bibliography} commands in the included
+ chapters plus in the root file. Make sure the \cs{bibliographystyle}
+ for the overall bibliography appears \emph{first}, before any chapters
+ are included. Run \LaTeX; run \BibTeX\ on the root file; run \BibTeX\ on
+ each included file; run \LaTeX; run \LaTeX.
+ This produces an independent `overall' bibliography which only
+ makes sense for various `named' bibliography styles; a numbered style, or
+ one with any type of automatic enumeration (like Me2007a, Me2007b) will
+ give unrelated numbers in each bibliography and lead to confusion.
+
+ \BibTeX\ will complain about multiple \cs{bibdata} commands when it makes
+ the whole bibliography, but it should obey the first. If you don't
+ want to see any error messages from bibtex, or if you don't want to put
+ the main \cs{bibliographystyle} command first in the document, then use
+ |\usepackage[rootbib]{chapterbib}| when you run \LaTeX\ first; run
+ \BibTeX\ on the root file; change to |\usepackage{chapterbib}|; run
+ \LaTeX; run \BibTeX\ on each included file; run \LaTeX; run \LaTeX.
+
+\snugger\paragraph{Chapter bibs gathered to end: }\label{gather} % 8.
+ To have a bibliography-by-chapter at the end instead of separate
+ bibs in the chapters, use |\usepackage[gather]{chapterbib}|, put
+ \cs{bibliography} commands in each file, and at the end of the main
+ file. Run \LaTeX\ as in item~\ref{normaluse}. You can control the
+ titling of the final bibliographies by defining \cs{FinalBibTitles},
+ such as\\[3pt]
+ \indent|\newcommand\FinalBibTitles|\\
+ \indent \indent |{References for Chapter \thechapter}|\\[3pt]
+ A similar effect may be achieved by re-defining \cs{FinalBibPrefix} as
+ \\[3pt] \indent
+ |\renewcommand\FinalBibPrefix{References for }|\\[3pt]
+ Even more control is achieved by redefining \cs{StartFinalBibs}.
+ The default definition is (like)
+\begin{verbatim}
+ \newcommand{\StartFinalBibs}{%
+ \renewcommand{\bibname}{Bibliography for chapter n}}
+\end{verbatim}
+ normally, but when using the [sectionbib] option it becomes
+\begin{verbatim}
+ \newcommand{\StartFinalBibs}{\chapter*{\bibname}%
+ \addcontentsline{toc}{chapter}{\bibname}%
+ \@mkboth{\bibname}{\bibname}%
+ \renewcommand{\bibname}{Chapter n}}
+\end{verbatim}
+ where the \cs{bibname} text is now provided by \cs{@auto@bibname},
+ which relies on bookkeeping and \cs{FinalBibPrefix}.
+
+ If your document class has neither section nor chapter, then you must
+ define \cs{StartFinalBibs} and also indicate the sectioning: for example,
+ if the main sectioning command in your document class is \cs{motif}:
+ \\[3pt]\indent
+ |\newcommand\CBMainSectioning{motif}|
+
+\snugger\paragraph{Duplicate bibliographies at end: } \label{duplicate}% 9
+ To have bibliographies in each chapter \emph{plus} a
+ bibliography-by-chapter at the end, follow item~\ref{gather},
+ but declare\\[3pt]
+ \indent |\usepackage[duplicate]{chapterbib}|\\
+ \indent (or |\usepackage[duplicate,sectionbib]{chapterbib}|).
+
+\snugger\paragraph{Babel: } % 10
+ If you use Babel, load chapterbib before babel.
+
+\section*{Formatting extensions}
+\snugger\paragraph*{\textbackslash citeform}
+ Normally, the citations are formatted as given, but you can define
+ \cs{citeform} (with one parameter) to reformat every citation.
+ Some possibilities:\\[3pt]
+ \quad |\renewcommand\citeform[1]{\romannumeral 0#1}| \hfill [iv,x]\\
+ \quad |\renewcommand\citeform[1]{(#1)} | \hfill [(3),(4),(7)]\\[3pt]
+ If you change \cs{citeform}, you should really define \cs{@biblabel} to match.
+
+ A not-so-good way to provide a chapter-number prefix is\\[3pt]
+ \indent |\renewcommand\citeform[1]{\thechapter.#1}| \\[3pt]
+ This partially works, but has only limited applicability: it does not
+ work with cites in the front-matter (TOC, LOF) or with hyperref.
+
+\snugger\paragraph*{\textbackslash CitationPrefix}
+ Instead, there is a \cs{CitationPrefix} command to apply a prefix to the
+ citation numbers (or names) in the bibliographies and \cs{cite} commands
+ for the included files. Use it by declaring something like\\[3pt]
+ \indent |\CitationPrefix{\thechapter.}| \\[3pt]
+ in the preamble. The prefix will be applied to all the chapter-bibs
+ but will not be used in an overall (root) bibliography, if you have one.
+ This not only affects the formatting but the actual citation, therefore
+ it immediately applies to \cs{bibitem} (no need to change \cs{@biblabel})
+ and works with hyperref. (The \cs{CitationPrefix} mechanism may be
+ prone to conflicts with other packages.)
+
+\snugger\paragraph*{\textbackslash citepunct}
+ The \cs{citepunct} command gives the punctuation (comma-penalty-space)
+ between items in the \cs{cite} list, and you can redefine it.
+
+\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/cite/chapterbib.pdf b/Master/texmf-dist/doc/latex/cite/chapterbib.pdf
new file mode 100644
index 00000000000..9cdeb1d6f0c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cite/chapterbib.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/cite/cite.ltx b/Master/texmf-dist/doc/latex/cite/cite.ltx
new file mode 100644
index 00000000000..285569ad6f4
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cite/cite.ltx
@@ -0,0 +1,248 @@
+%
+% cite.ltx Manual for cite.sty
+%
+%
+% Copyright (c) 1989-2010 by Donald Arseneau
+%
+% Version date (Sep 2010)
+%
+\documentclass[12pt,a4paper]{ltxdoc}
+%\overfullrule=1pt
+\addtolength{\textwidth}{1cm}
+\MakeShortVerb{\"}
+\hyphenpenalty=600
+\newcommand\snugger{\vspace{-7pt}}
+\sloppy
+
+\setlength\parskip{2pt}
+
+\title{The cite package:\\ well formed numeric citations}
+\author{Donald Arseneau\\ asnd@triumf.ca}
+\date{2010/09/10}
+\begin{document}
+\maketitle
+
+\begin{abstract}
+ The cite package modifies \LaTeX's normal citation mechanism for
+improved handling of numeric citations. It provides compressed, sorted
+lists of numerical or partly-numerical citations, as regular text or
+superscripts. Generally, no changes to the usage of \cs{cite} commands
+is required.
+\end{abstract}
+
+
+\begin{footnotesize}
+\noindent The cite package is Copyright \copyright\ 1989--2010 by
+Donald Arseneau (Vancouver, Canada).\\
+The package (cite.sty) and this documentation (cite.ltx,cite.pdf) may be
+freely transmitted, reproduced, or modified for any purpose provided that the
+copyright notice is left intact.
+(Small excerpts may of course be taken and used without any restriction.)
+\par
+\end{footnotesize}
+
+\section*{Normal Use}
+Insert "\usepackage{cite}" in the document's preamble for improved handling
+of numeric citations, behaving as follows:
+
+\snugger\paragraph*{Spacing} Put a comma and a small space between
+ each citation number. The option [nospace] removes that space, and
+ the option [space] replaces it with an ordinary inter-word space.
+
+\snugger\paragraph*{Compress groups} Compress lists of three or more
+ consecutive numbers to one number range which can be split, with
+ difficulty, after the dash. All numbers should be greater than zero.
+ E.g., if you used to get the (nonsense) list
+ [7,5,6,?,4,9,8,Einstein,6], then this style will give [?,Einstein,4--6,6--9].
+ Compression of ranges is disabled by the [nocompress] package option.
+
+\snugger\paragraph*{Sorting} Sort citations into ascending order
+ (this is the default, but may also be declared with the package
+ option [sort]). The [nosort] package option turns off sorting.
+ Sortable citations must fit one of these forms:
+ \begin{enumerate}\itemsep=-\parsep
+ \item \meta{number}
+ \item \meta{optional-char}\meta{number}\meta{optional-char}
+ \item \meta{number}\meta{separator-char}\meta{number}
+ \end{enumerate}
+ Forms 1 and 2 are really the same, and they mix well, but form 3 is
+ different, so it can't be mixed with the other forms (not that you
+ would want to).
+ Non-sortable forms (those not listed) are printed before
+ all sortable forms. Here \meta{number} means a positive integer (natural
+ number) less than some limit (different for each form), \meta{optional-char}
+ is a single printable character (or nothing), and \meta{separator-char}
+ is also a single printable character.
+
+\snugger\paragraph*{Prefix/suffix letters} Sort citations with prefix
+ and/or suffix characters (form~2) such that
+ different prefixes are grouped separately, and suffixes form sub-lists
+ for the same number. Compression knows about suffixes, so you can get
+ lists like [18a--18c,19] or [A2,Q1,Q3--Q5].
+
+\snugger\paragraph*{Numbers alone} The command "\citen" is provided to give
+ just the citation numbers without the brackets or superscript
+ and other formatting. Aliases are "\citenum" and "\citeonline" for easy
+ conversion to other citation packages.
+
+\snugger\paragraph*{Breaks} Allow, but discourage, line breaks within
+ the group of citations (after dashes, and after punctuation).
+ Penalties are "\citepunctpenalty" and "\citemidpenalty".
+
+\snugger\paragraph*{Breaks and spaces before} Allow but strongly discourage
+ line-breaks before the entire citation, provided it is a regular text
+ cite (not superscript) and no different penalty was specified there
+ (thus, "~\cite{X}" will not permit a line break). Also, adjust the
+ spacing: if there is no space or if there is extra space due to some
+ punctuation, then change to one inter-word space; e.g.,
+ "A space will be inserted here\cite{Larry,Curly,Moe}".
+
+\snugger\paragraph*{Prohibiting breaks} All breaks can be forbidden
+ with the [nobreak] package option. Allowance of any type of line break can
+ be adjusted independently by setting the parameters "\citeprepenalty",
+ "\citemidpenalty", and "\citepunctpenalty" (see Customization below).
+
+\snugger\paragraph*{Superscript} With package option [superscript]
+ (or [super] for short), display citation numbers as superscripts.
+ But if the citation has an optional note, it is printed on-line
+ with brackets. Superscripted citations follow these additional rules:
+ \begin{itemize}
+ \setlength\itemsep{0pt}
+
+\item Superscript citations use \emph{the same input format} as ordinary
+ citations to produce different output. Blank space before the |\cite|
+ command is discarded, and trailing punctuation is moved to come before
+ the superscript citation. For example, `"information \cite{source};"'
+ ignores the space before "\cite" and puts the semicolon before the number
+ to give `information;$^{12}$\,', just as if you typed `"information;$^{12}$"'.
+ You may disable movement with the [nomove] package option.
+
+\item The punctuation characters that will migrate before the superscript are
+ listed in the macro "\CiteMoveChars", which you can redefine (using
+ "\renewcommand"). The default set of characters is ".,;:"; Perhaps
+ "!"~and~"?" should be included too, but
+ they weren't listed in the APS style manual I looked at, and I agree with
+ that design choice because they put too much visual separation between the
+ cite and what it applies to. Feel free to redefine "\CiteMoveChars". Quotes
+ were listed as coming before the cite notation, but they should be typed
+ before the "\cite" command in any case because both on-line and superscript
+ cites come after what is quoted (when citing a quotation). This gives one
+ difficulty~-- punctuation following quotes won't migrate inside the
+ quotation: e.g., "``Transition State Theory''\cite{Eyring}." gives out
+ ``Transition State Theory''.$^8$, but you may want the period inside the
+ quotes, thus: ``Transition State Theory.''$^8$.
+
+\item Doubling of periods (.., ?., !.) is checked for and suppressed.
+ The spacing after the citation is set according to the final punctuation
+ mark moved. There is a problem with double periods after a capitalized
+ abbreviation or directly after "\@" : Both of `"N.S.A. \cite{space}."' and
+ `"et al.\@ \cite{many}."' will give doubled periods. Type `"\ "' (backslash
+ space) after abbreviations like `et al.' ("et al.\ \cite{many}.")
+ to get the right spacing within a sentence whether or not a citation follows,
+ and prevent double periods with the superscript cite. You could use "\@" to
+ fix the N.S.A. example ("N.S.A\@. \cite{space}.") but that gives the wrong
+ spacing when there is no citation, so it should be inserted only where a
+ cite follows.
+
+\item Remember, these rules regarding punctuation only apply when the [super]
+ or [superscript] option was given (or overcite.sty used) and the [nomove]
+ option was \emph{not} given.
+
+\end{itemize}
+
+\section*{Customization}
+
+There are several options for "\usepackage{cite}", some already mentioned.
+\begin{center}
+\begin{tabular}{lp{0.75\linewidth}}
+ [superscript]& use superscripts for cites without optional notes\\\relax
+ [super] & alias for [superscript] (like natbib)\\\relax
+ [ref] & uses the format "[Ref.~12, given note]" (useful with
+ the superscript option)\\\relax
+ [nospace] & eliminates the spaces after commas in the number list\\\relax
+ [space] & uses a full inter-word space after the commas\\\relax
+ [nobreak] & eliminate all line-breaks\\\relax
+ [nosort] & prevents sorting of the numbers (default is to sort, and the\dots\\\relax
+ [sort] & option is provided for completeness).\\\relax
+ [nomove] & prevents moving the superscript cite after punctuation\\\relax
+ [move] & is the default\\\relax
+ [noadjust] & disables `smart' handling of space before a cite\\\relax
+ [adjust] & is the default\\\relax
+ [nocompress] & inhibit compression of consecutive numbers into ranges\\\relax
+ [compress] & is the default\\\relax
+ [biblabel] & define the bibliography label as a superscript
+\end{tabular}
+\end{center}
+
+If your citations are not numeric, and not of any near-numeric sortable form,
+then you should probably not use cite.sty; but if you must, then at least
+use the [nosort,nocompress] options.
+
+There are several commands that you may redefine to change the
+formatting of citation lists:
+
+\begin{center}
+\begin{tabular}{@{}lll@{}}
+command & function & default\\
+\hline
+\cs{citeform} & reformats each number & nothing\\
+\cs{citepunct} & printed between numbers & comma, penalty, thin space\\
+\cs{citeleft} & left delimiter of list & [\\
+\cs{citeright} & right delimeter of list & ]\\
+\cs{citemid} & printed before note & comma, penalty, space\\
+\cs{citedash} & used in compressed range & endash, penalty\\
+\cs{CiteMoveChars} & characters that move & \texttt{.,:;}\\
+\cs{OverciteFont} & font sel. for superscripts & \relax"\fontsize{\sf@size}"\dots\\
+\end{tabular}
+\end{center}
+
+The left/mid/right commands don't affect the formatting of superscript
+citations. You may use "\renewcommand" to change any of these. Remember,
+these commands are extensions made by this package; they are not regular
+LaTeX. Some examples of changes:
+
+\begin{flushleft}
+"\renewcommand\citeform[1]{\romannumeral 0#1}}" $\to$ roman i,vi\\
+"\renewcommand\citeform[1]{(#1)}" $\to$ parentheses (1)--(5),(9)\\
+"\renewcommand\citeform{\thechapter.}" $\to$ by chapter: \textsuperscript{2.18--2.21}\\
+"\renewcommand\citepunct{,}" $\to$ no space and no breaks at commas\\
+"\renewcommand\citemid{; }" $\to$ semicolon before optional note\\
+"\renewcommand\citeleft{(}" $\to$ parentheses around whole\\
+"\renewcommand\citeright{)}" $\to$ parentheses around whole list\\
+\end{flushleft}
+
+The appearance of the whole citation list is governed by "\@cite", (for
+full-sized cites) and "\@citess" (for superscripts). For more extensive changes
+to the formatting, redefine these. For example, to get brackets around the
+list of superscript numbers you can do:\\[2pt]
+\indent "\renewcommand\@citess[1]{\textsuperscript{[#1]}}"\\[2pt]
+(after "\makeatletter").
+
+Related Note: The superscript option does not affect the numbering format
+of the bibliography; the "[12]" style is still the default. To get
+superscripts in the bibliography (at any time) you can define\\[2pt]
+\indent
+ "\renewcommand\@biblabel[1]{\textsuperscript{#1}}"\\[2pt]
+Aw, OK, for your convenience, there is the [biblabel] package option that
+just performs this definition (sort of).
+
+Line breaking can be turned off using the [nobreak] option. It can be
+controlled more precisely by changing three numeric values for the
+line-break penalties:
+\begin{center}
+\begin{tabular}{lll}
+Command & Location & Default \\
+\hline
+\cs{citeprepenalty} & before entire cite & "\@highpenalty"\\
+\cs{citemidpenalty} & used in "\citemid" & "\@medpenalty"\\
+\cs{citepunctpenalty}& used in "\citepunct" & 1000
+\end{tabular}
+\end{center}
+Use "\mathchardef" to change these penalty values! E.g., \\
+\indent "\mathchardef\citeprepenalty=9999"\\
+(Yes, that is obscure but I don't want to use up counters or to
+pretend they are counters.) Alternatively, the commands "\citemid",
+"\citedash", and "\citepunct" can be redefined to use different
+penalty parameters, or none at all.
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/cite/cite.pdf b/Master/texmf-dist/doc/latex/cite/cite.pdf
new file mode 100644
index 00000000000..4702476963f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/cite/cite.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/cite/chapterbib.sty b/Master/texmf-dist/tex/latex/cite/chapterbib.sty
index 573d3eb12e4..fe302365bc6 100644
--- a/Master/texmf-dist/tex/latex/cite/chapterbib.sty
+++ b/Master/texmf-dist/tex/latex/cite/chapterbib.sty
@@ -1,9 +1,9 @@
-% chapterbib.sty Version 1.14 (31-Mar-2009) Donald Arseneau
+% chapterbib.sty Version 1.16 (5-Sep-2010) Donald Arseneau
%
% Allow multiple bibliographies in a LaTeX document, including items
% \cite'd in more than one bibliography.
%
-% Copyright (C) 1989-2009 by Donald Arseneau and Niel Kempson
+% Copyright (C) 1989-2010 by Donald Arseneau and Niel Kempson
% These macros may be freely transmitted, reproduced, or modified
% provided that this notice is left intact.
%
@@ -104,20 +104,7 @@
\cb@dobiblio{\@currentipfile.bbl}%
\endgroup}
-\long\def\@firstofone#1{#1}
-\@ifundefined{reset@font}{\let\reset@font\relax}{}
-\@ifundefined{bfseries}{\def\bfseries{\bf}}{}
-\@ifundefined{G@refundefinedtrue}{\let\G@refundefinedtrue\relax}{}
-\@ifundefined{PackageWarning}{\let\cb@warning\@warning}%
- {\def\cb@warning{\PackageWarning{chapterbib}}}
-
-\@ifundefined{@newl@bel}{% pre-1995; must redefine \@testdef
- \let\@test@defiii\@testdef
- \def\@testdef#1#2#3{%
- \if#1b\relax\@test@defiii b{#2\@extra@binfo}{#3}%
- \else \@test@defiii #1{#2}{#3}\fi}%
- \let\cb@dobiblio\@input}%
- {\let\cb@dobiblio\@input@}
+\let\cb@dobiblio\@input@
\def\FinalBibPrefix{\bibname\space for\space}%
\def\@auto@bibname{Bibliography}
@@ -157,22 +144,26 @@
\expandafter\def\expandafter\cb@sectionbib\@tempc{#1}%
}}
-\long\def\@gobblethree#1#2#3{}%
-\def\strip@prefix#1>{}
+\@ifundefined{G@refundefinedtrue}{\let\G@refundefinedtrue\relax}{}
\@ifundefined{bibname}{\def\bibname{Bibliography}}{}
% The following very messy hacking is to apply a prefix to each
% cite value, shown in the cites and the bibitems, and active
% with hyperref. The user should declare something like:
% \CitationPrefix{\thechapter.}
+% Because this hooking-in is so tricky and specific, it is best
+% to regard this feature as perpetually "experimental".
%
\let\@cb@use@prefix\@empty
\let\@CitationPrefix\@empty
%
-\newcommand\bibitemPrefix[1]{%
+\newcommand\CitationPrefix[1]{%
\def\@CitationPrefix{#1}%
- \@ifundefined{cb@emptytoks}{\newtoks\cb@emptytoks}{}%
- \cb@emptytoks={}%
+ \@ifundefined{cb@emptytoks}{\newtoks\cb@emptytoks}{}\cb@emptytoks={}%
+ \def\@cb@use@prefix{% Performed at the first \bibitem of each (sub-)bibliography
+ \let\value\@cb@valuehack
+ \def\@itemlabel{\@biblabel {\the\value\@listctr}}%
+ \let\@cb@use@prefix\@empty}%
\def\@cb@valuehack##1{% hook into "\the\value\@listctr"
\ifx\@listctr##1% only affect "\value\@listctr"
\cb@emptytoks % use up the preceding \the
@@ -180,26 +171,19 @@
\the % restore \the
\fi
\csname c@\@listctr\endcsname}% regular \value
-%
-% This is performed once, at the first \bibitem of each (sub-)bibliography
- \def\@cb@use@prefix{%
- \let\value\@cb@valuehack
- \def\@itemlabel{\@biblabel {\the\value\@listctr}}%
- \let\@cb@use@prefix\@empty}
}
-% redefine \@lbibitem to use prefixed number; set hook to use prefix
-% (through \value) in \@bibitem also.
-\def\@cb@insertprefix{%
+% redefine \@lbibitem to use prefixed number; set hook (through \value)
+% to use prefix in \@bibitem also. This \@cb@insertprefix is executed
+% by \bibliography.
+\def\@cb@insertprefix{%
\let\@cborg@lbibitem\@lbibitem \let\@cborg@bibitem\@bibitem
\def\@bibitem{\@cb@use@prefix\@cborg@bibitem}%
\def\@lbibitem[##1]{\@cb@use@prefix\@cborg@lbibitem[\@CitationPrefix##1]}%
+ \let\@cb@insertprefix\@empty % ensure no recursive use
}
-\@ifundefined{DeclareOption}{% LaTeX2.09
- \def\@CB@wtoc#1{}% disable; broken in 2.09
-}{% LaTeX2e option
-\ProvidesPackage{chapterbib}[2009/03/31 \space v 1.14]
+\ProvidesPackage{chapterbib}[2010/09/05 \space v 1.16]
\DeclareOption{sectionbib}{\AtBeginDocument{\sectionbib{\section*}{section}}%
\let\FinalBibPrefix\@empty
\providecommand\StartFinalBibs{\chapter*{\bibname}%
@@ -213,9 +197,12 @@
\DeclareOption{gather}{\gdef\cb@biblist{}\let\cb@sub@input\@gobble}
\ProcessOptions
-\@ifundefined{chapter}{%
- \@ifundefined{section}{}{\providecommand\CBMainSectioning{section}}%
-}{\providecommand\CBMainSectioning{chapter}}
+\@ifundefined{chapter}%
+{\@ifundefined{section}%
+ {\providecommand\CBMainSectioning{page}}% silly default to prevent errors
+ {\providecommand\CBMainSectioning{section}}%
+}{\providecommand\CBMainSectioning{chapter}}%
+
\ifx\cb@sub@input\@input@ % For [duplicate]
\def\cb@dofinalbibs{\if@filesw
@@ -231,11 +218,12 @@
\ifx\cb@biblist\@empty % duplicate or gather declared
\providecommand\StartFinalBibs{\def\bibname{\@auto@bibname}}%
- \def\cb@dobiblio#1{\begingroup\makeatletter
+ \def\cb@dobiblio#1{% defined to save local context for later "dofinalbibs"
+ \begingroup\makeatletter
\ifx\the@ipfilectr\@empty % in root
\StartFinalBibs \cb@dofinalbibs
- \else % in chapter, or section
- \let\cb@elt\relax % list \cb@elt{title}{input#}{file}
+ \else % in chapter, or section; append to \cb@biblist
+ \let\cb@elt\relax % list \cb@elt{title}{input#}{file}{citeprefix}
\let\@ifchapapp\@secondoftwo % provide a *possible* title
\expandafter\ifx\csname the\CBMainSectioning\endcsname\thechapter
\@ifundefined{@chapapp}{}{\let\@ifchapapp\@firstoftwo}\fi
@@ -243,25 +231,31 @@
{\FinalBibPrefix
\@ifchapapp{\@chapapp}{\csname the\CBMainSectioning\endcsname}\space
\csname the\CBMainSectioning\endcsname}}{}%
- \protected@xdef\cb@biblist{\cb@biblist
- \cb@elt{\FinalBibTitles}{\the\c@inputfile}{\@currentipfile}}%
+ \protected@xdef\cb@biblist{\cb@biblist\cb@elt
+ {\FinalBibTitles}{\the\c@inputfile}{\@currentipfile}{\@CitationPrefix}}%
\cb@sub@input{#1}%
- \fi\endgroup}
- \def\cb@dogatherbib#1#2#3{% Title, count, fname
+ \fi\endgroup}% end \cb@dobiblio
+ \def\cb@dogatherbib#1#2#3#4{% Title, count, fname, prefix
+ \begingroup
\protected@edef\@auto@bibname{#1}%
+ \def\@CitationPrefix{#4}%
+ \ifx\@CitationPrefix\@empty\else \@cb@insertprefix \fi
\global\c@inputfile#2\global\advance\c@inputfile\m@ne
- \IfFileExists{#3.bbl}{\cb@input{#3.bbl}}{}}
+ \IfFileExists{#3.bbl}{\cb@input{#3.bbl}}{}%
+ \endgroup}
\fi
\AtBeginDocument{\let\sectionbib\undefined}
-}
+
\endinput
%====================== BEGIN INSTRUCTIONS ===========================
chapterbib.sty Version
- ~~~~~~~~~~~~~~ 1.14 (31-MAR-2009) DA (\nocite*, \CitationPrefix, etc)
+ ~~~~~~~~~~~~~~ 1.16 (05-SEP-2010) DA \CitationPrefix with [gather], drop 2.09
+ 1.15 (30-JUL-2009) DA (typo \CitationPrefix)
+ 1.14 (31-MAR-2009) DA (\nocite*, \CitationPrefix, etc)
1.13 (11-DEC-2007) DA (new final-bib titling)
1.12 (21-MAR-2004) DA
1.11 (29-FEB-2004) DA (allow \nocite check)
@@ -289,7 +283,8 @@
to allow multiple bibliographies without using \include (see item 4).
There are two added hooks, \citeform and \citepunct, which you can
redefine to customise the formatting of each entry in a citation list,
- and the declaration \CitationPrefix to use in preference to \citeform.
+ and the declaration \CitationPrefix to use in preference to \citeform
+ for numbering-by-chapter.
Usage, Restrictions, and Options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -320,15 +315,18 @@
"@\@citeb" to "@\@citeb\@extra@b@citeb", and insert the line
\@ifundefined{@extra@b@citeb}{\def\@extra@b@citeb{}}{}
somewhere (but not as a comment or as part of another definition!).
+
If the package also redefines \bibcite then you should change that
definition, replacing "@#1" with "@#1\@extra@binfo", and insert
\gdef\@extra@binfo{}
- somewhere in the file.
- Some citation packages deviate quite far from LaTeX's own method of
- organizing cite tags using "b@\@citeb". The instructions above catch
- such extensions as "Y@\@citeb", but not more radical differences.
+ somewhere in the file. If the package defines a command that acts
+ similarly to \bibcite (being written to the aux file), then it should
+ have "\@extra@binfo" inserted the same way.
+ Some citation packages deviate quite far from LaTeX's own method
+ of organizing cite tags using "b@\@citeb". The instructions above
+ catch such extensions as "Y@\@citeb", but not more radical differences.
In such cases, try contacting the author of the citation package.
- If a citation style does not define "\nocite", then that command
+ If a citation style does not define "\nocite", then that command
would not be converted when you make the patches to "@\@citeb".
Chapterbib will try to detect the hook in "\nocite", but if this fails
you may need to redefine "\nocite" (with any "@\@citeb" changed to
@@ -407,7 +405,7 @@
\newcommand\CBMainSectioning{motif}
9. To have bibliographies in each chapter PLUS a bibliography-by-chapter at
- the end, follow item 9, but declare \usepackage[duplicate]{chapterbib}
+ the end, follow item 8, but declare \usepackage[duplicate]{chapterbib}
(or \usepackage[duplicate,sectionbib]{chapterbib}).
10. If you use Babel, load chapterbib before babel.
@@ -430,7 +428,9 @@
\CitationPrefix{\thechapter.}
in the preamble. The prefix will be applied to all the chapter-bibs
but will not be used in an overall (root) bibliography, if you have one.
-
+ (The \CitationPrefix mechanism is likely to break often if it conflicts
+ with other packages.)
+
\citepunct gives the punctuation (comma-penalty-space) between items
in the \cite list.
@@ -515,13 +515,17 @@
% a chapter-identifier on each cite. It locally redefines both
% \@bibitem and \@lbibitem at each \bibliography. The insertion
% of the prefix is straightforward for \@lbibitem, but for \@bibitem
-% the prefix is inserted by a redefined \value macro (eeek!).
+% the prefix is inserted by a redefined \value macro (eeek!). It has
+% a deficiency in not being sorted as a simple number by cite.sty.
%
%---------------------------------------------------------------
%
% Authors Niel Kempson (original)
-% ~~~~~~~ Donald Arseneau <asnd@triumf.ca> March 1993 - Mar 2009
+% ~~~~~~~ Donald Arseneau <asnd@triumf.ca> March 1993 - Sept 2010
%
+% Changes with ver 1.16: Propagate prefix info to final bibs;
+% drop support for ancient LaTeX versions
+% Changes with ver 1.15: Fix typo \bibitemPrefix -> \CitationPrefix
% Changes with ver 1.14: No warning from \nocite* in chapters, \CitationPrefix
% Changes with ver 1.13: Rewrite final-bibs titling
% Changes with ver 1.12: Update \@citex \bfseries
@@ -529,9 +533,9 @@
% Changes with ver 1.10: \CBMainSectioning; \bibsection hook
% Changes with ver 1.9: sectionbib remove \@mkboth
% Changes with ver 1.8: options gather and duplicate; babel workarounds; toc
-% Changes with ver 1.7: change the \sectionbib command re. headings.
-% update \nocite and alter \citeform
-% Changes with ver 1.6: change the \sectionbib command to take arguments.
+% Changes with ver 1.7: Change the \sectionbib command re. headings.
+% Update \nocite and alter \citeform
+% Changes with ver 1.6: Change the \sectionbib command to take arguments.
% Changes with ver 1.5: rootbib option; item 8 in instructions.
% Changes with ver 1.4: sectionbib and draft options
% Changes with ver 1.3: rewrite:
diff --git a/Master/texmf-dist/tex/latex/cite/cite.sty b/Master/texmf-dist/tex/latex/cite/cite.sty
index bedd4eb169e..e8187781788 100644
--- a/Master/texmf-dist/tex/latex/cite/cite.sty
+++ b/Master/texmf-dist/tex/latex/cite/cite.sty
@@ -1,11 +1,11 @@
% C I T E . S T Y
%
-% version 5.2 (Aug 2009)
+% version 5.3 (Sep 2010)
%
% Compressed, sorted lists of on-line or superscript numerical citations.
% see also drftcite.sty (And the stub overcite.sty)
%
-% Copyright (C) 1989-2009 by Donald Arseneau
+% Copyright (C) 1989-2010 by Donald Arseneau
% These macros may be freely used, transmitted, reproduced, or modified
% provided that this notice is left intact.
%
@@ -128,11 +128,9 @@
% be added later.
%
\def\@addto@cite@list{%
- \ifcat _\ifnum\z@<0\@B@citeB _\else A\fi % a positive number, put in list
- \@addnumto@cite@list\@B@citeB
- \else % citation is not a pure positive number, test for number+more combo
- \@cite@combo@num
- \fi
+ \@cite@posnumtest\@B@citeB
+ {\@addnumto@cite@list\@B@citeB}% a positive number, put in list
+ {\@cite@combo@num}% not a pure positive number, test for combo forms
}
% With this \@cite@combo@num we delve into handling of numbers combined
@@ -143,21 +141,22 @@
% definition leads down the road of sorting mostly-numbers but with
% optional single-character prefix and/or suffix.
-\def\@cite@combo@num{\expandafter\@cite@add@letnum\@B@citeB\delimiter}
+\def\@cite@combo@num{\expandafter\@cite@try@combo\@B@citeB\delimiter}
% First of many stages for sorting numbers with prefix/suffix characters.
-% Test for a leading token of category letter or other.
+% Test for a leading token of category letter or other (appropriate for
+% all combination types).
%
-\def\@cite@add@letnum{%
- \@if@printable@char{\@cite@add@letnumB}{\@cite@dump@now}%
- }
+\def\@cite@try@combo{%
+ \@if@printable@char{\@cite@try@prefix}{\@cite@gobbledump@now}}
+% First token is good, so test for a character prefix before a number.
% Process first token, either a first digit or a prefix
%
-\def\@cite@add@letnumB#1{%
- \ifcat _\ifnum\z@<0#1_\else A\fi % a digit else prefix
- \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi
- {\@cite@add@letnumD {\z@}#1}{\@cite@add@letnumC {`#1}}%
+\def\@cite@try@prefix#1{% #1 is first character of citation
+ \@cite@posnumtest{#1}% a digit else prefix
+ {\@cite@add@letnumD {\z@}#1}% no prefix character (use zero)
+ {\@cite@add@letnumC {`#1}}% prefix char; use the char code
}
% Examine character after prefix to ensure it is a number. First must
@@ -165,52 +164,70 @@
%
\def\@cite@add@letnumC#1{\@if@printable@char%
{\@cite@add@letnumD{#1}}% continue with prefix (perhaps zero)
- {\@cite@dump@now}% else abandon fancy processing
+ {\@cite@gobbledump@now}% else abandon fancy processing
}
% Save prefix (if any) numerically in \@tempcnta, test next character for being
% a digit, then collect main number
%
-\def\@cite@add@letnumD#1#2{%
+\def\@cite@add@letnumD#1#2{% #1 = numeric code for prefix, #2 = next char
\@tempcnta=#1\multiply\@tempcnta 16384 %
- \ifcat _\ifnum\z@<0#2_\else A\fi % at least one digit given, so continue
- \afterassignment\@cite@add@letnumE \advance\@tempcnta #2%
- \else \expandafter\@cite@dump@now \fi
+ \@cite@posnumtest{#2}% if next char is a digit, continue with number:
+ {\afterassignment\@cite@add@letnumE \advance\@tempcnta #2}%
+ {\@cite@gobbledump@now}% No number so output citation
}
-% Have collected number. Now look for a single-character suffix.
+% Have collected number. Now look for a non-number suffix or separator.
%
\gdef\@cite@add@letnumE{%
\multiply\@tempcnta\@cclvi
- \@if@printable@char{% a suffix given
+ \@if@printable@char{% a suffix or separator given
\@cite@add@letnumF
}{% else, maybe nothing remains
\ifx\@let@token\delimiter % use number, and remove trailing \delimiter
\@citeaddcnta \expandafter\@gobble
- \else % else abandon fancy processing
- \expandafter\@cite@dump@now
+ \else % non-printable char found, so abandon fancy processing
+ \expandafter\@cite@gobbledump@now
\fi
}}
-% Have a complete compilation, but must ensure there is no trailing garbage
-% (expect \delimiter as next token)
+% Have everything up to a suffix or separator character. Check
+% following to see which. Three possibilites are (1) noting =>
+% a suffix; (2) number => separator-number; (3) other => garbage.
%
-\def\@cite@add@letnumF#1#2{%
- \ifx\delimiter#2\@empty % nothing left but \delimiter
- \advance\@tempcnta`#1\relax \@citeaddcnta
- \else % abandon all fancy processing
- \expandafter\@cite@dump@now
- \fi
-}
+\def\@cite@add@letnumF#1#2\delimiter{% #1 = suffix/separator #2=rest
+ \advance\@tempcnta`#1\relax
+ \@cite@posnumtest{#2}{\@cite@add@numsepnum{#2}}% handle as num sep num
+ {% else...
+ \ifx\delimiter#2\delimiter % nothing left, so #1 is a suffix
+ \@citeaddcnta
+ \else % some non-number; dump it
+ \@cite@dump@now
+ \fi
+}}
+
+% Handle citation as number separator number.
+% Yes, there is a bug that the list 1.1,1.258,1.515 will be compressed as
+% 1.1-1.515; so sue me.
+
+\def\@cite@add@numsepnum#1{% #1 = last number
+ \ifnum\@tempcnta<262144 % OK numeric range
+ \multiply\@tempcnta 4096
+ \advance\@tempcnta #1 % num,sep,num have maximum numbers: 1023, 255, 4095
+ \@citeaddcnta
+ \else % out of range, treat as raw string
+ \@cite@dump@now
+ \fi}
% This is our bail-out when the citation cannot be processed as
-% [prefix]number[suffix]: it outputs the citation immediately
-% (unsorted) and consumes tokens to the \delimiter tag used as an
-% end-marker
+% [prefix]number[suffix] or number[sep]number: it outputs the citation
+% immediately (unsorted) and consumes tokens to the \delimiter tag used
+% as an end-marker
%
-\def\@cite@dump@now#1\delimiter{%
- \@citea \@cite@out{b@\@citeb\@extra@b@citeb}\let\@citea\citepunct
-}
+\def\@cite@gobbledump@now#1\delimiter{\@cite@dump@now}%
+
+\def\@cite@dump@now{%
+ \@citea \@cite@out{b@\@citeb\@extra@b@citeb}\let\@citea\citepunct}
% add an entry to the sorted list, using its sort-number \@tempcnta, and
% also saving the plain-text value \@B@citeB as well as the csname
@@ -384,13 +401,17 @@
\def\@is@fil@ #1FIL#2\relax#3#4\@nil{#3}
}
-% Test if next char is "printable" categories other or letter or active
+% Test if next token is a char of "printable" categories other or letter or
+% active. Syntax:
+% \@if@printable@char {do if printable}{do if not printable}<char>
+%
\def\@if@printable@char#1#2{%
\def\reserved@a{#1}%
\def\reserved@b{#2}%
\futurelet\@let@token\@test@print@char
}
+% Note side-effect of redefining \reserved@a and \reserved@b
\def\@test@print@char{%
\ifnum
\ifcat\noexpand\@let@token A1\fi
@@ -401,6 +422,12 @@
\expandafter\reserved@b \fi
}
+% Test for a pure positive number: {possible number}{true}{false}
+\def\@cite@posnumtest#1{%
+ \ifcat _\ifnum\z@<0#1_\else A\fi
+ \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi
+}
+
\let\nocitecount\relax % in case \nocitecount was used for drftcite
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -432,7 +459,7 @@
\DeclareOption{noadjust}{\let\cite@adjust\@empty}% Don't change spaces
\DeclareOption{adjust}{}% adjust space before [ ]
\DeclareOption{biblabel}{\def\@biblabel#1{\@citess{#1}\kern-\labelsep\,}}
-\ProvidesPackage{cite}[2009/08/29 \space v 5.2]
+\ProvidesPackage{cite}[2010/09/10 \space v 5.3]
\ProcessOptions
\ifx\@citey\oc@movep\else % we are moving punctuation; must ensure sfcodes
@@ -447,7 +474,7 @@
\ifx\@compress@cite\@empty
\ifx\@citeaddcnta\@empty
% [nosort,nocompress] -- short-circuit much processing
- \def\@addto@cite@list{\@cite@dump@now\delimiter}
+ \def\@addto@cite@list{\@cite@dump@now}
\else
% [sort,nocompress]
\def\@compress@cite#1#2#3{% % This is executed for each number
@@ -467,7 +494,7 @@
\fi
\fi
-% Compatability with chapterbib (see use of \@extra@b@citeb)
+% Compatability with chapterbib (see use of \@extra@b@citeb above and in chapterbib)
\@ifundefined{@extra@b@citeb}{\def\@extra@b@citeb{}}{}
% Compatability with multibib (see use of \@newciteauxhandle) (Yes, this is
@@ -516,19 +543,30 @@ o Put a comma and a small space between each citation number. The option
[nospace] removes that space, and the option [space] replaces it with
an ordinary inter-word space.
-o Sort citation numbers into ascending order, printing non-numbers before
- numbers. All numbers should be greater than zero. The [nosort] package
- option turns off sorting.
-
o Compress lists of three or more consecutive numbers to one number range
which can be split, with difficulty, after the dash. All numbers should
be greater than zero. E.g., if you used to get the (nonsense) list
[7,5,6,?,4,9,8,Einstein,6], then this style will give [?,Einstein,4-6,6-9].
Compression of ranges is disabled by the [nocompress] package option.
-o Sort numeric citations with prefix and/or suffix characters so different
- prefixes are grouped together, and suffixes form sub-lists for the same
- number; so you could get [18a-18c,19] or [A48,Q1,Q3-Q5].
+o Sort citations into ascending order (this is the default, but may also
+ be declared with the package option [sort]). The [nosort] package option
+ turns off sorting. Sortable citations must fit one of these forms:
+ 1. <number>
+ 2. <optional-char><number><optional-char>
+ 3. <number><separator-char><number>
+ Forms 1 and 2 are really the same, and they mix well, but form 3 is
+ separate and if used simultaneously with form 1 the citations become,
+ ummm, mixed. Non-sortable forms (those not listed) are printed before
+ all sortable forms. Here <number> means a positive integer (natural
+ number) less than some limit (different for each form), <optional-char>
+ is a single printable character (or nothing), and <separator-char> is also
+ a single printable character.
+
+o Sorting of citations with prefix and/or suffix characters is done so so
+ different prefixes are grouped separately, and suffixes form sub-lists
+ for the same number. Compression knows about suffixes, so you can get
+ lists like [18a-18c,19] or [A2,Q1,Q3-Q5].
o Allow, but discourage, line breaks within the group of citations (after
dashes, and after punctuation). Penalties are \citepunctpenalty and
@@ -544,7 +582,7 @@ o All breaks can be forbidden with the [nobreak] package option. They can
be adjusted independently by setting the parameters \citeprepenalty,
\citemidpenalty, and \citepunctpenalty. Use \mathchardef to change these
penalty values! E.g., \mathchardef\citeprepenalty=9999 (Yes, that is
- obscure but I don't want to pretend they are counters.)
+ obscure but I don't want to use up counters or to pretend they are counters.)
o With package option [superscript] (or [super] for short), display citation
numbers as superscripts (unless they have optional notes, causing them to
@@ -559,17 +597,18 @@ o With package option [superscript] (or [super] for short), display citation
with the [nomove] package option (only relevant with [superscript]).
-> The punctuation characters that will migrate before the superscript are
- listed in the macro \CiteMoveChars, which you can redefine. The default is
- .,;:. Perhaps ! and ? should too, but they weren't listed in the APS style
- manual I looked at, and I agree with that choice because they put too
- much visual separation between the cite and what it applies to. Feel free
- to redefine \CiteMoveChars. Quotes were listed as coming before the
- cite notation, but they should be typed before the \cite command in any
- case because both on-line and superscript cites come after the quotation.
- This gives one difficulty --- punctuation following quotes won't migrate
- inside the quotation: e.g., "``Transition State Theory''\cite{Eyring}."
- gives "``Transition State Theory''.$^8$", but you may want the period inside
- the quotes, thus: ``Transition State Theory.''$^8$.
+ listed in the macro \CiteMoveChars, which you can redefine. The default
+ set of characters is ".,;:"; Perhaps ! and ? should be included too, but
+ they weren't listed in the APS style manual I looked at, and I agree with
+ that design choice because they put too much visual separation between the
+ cite and what it applies to. Feel free to redefine \CiteMoveChars. Quotes
+ were listed as coming before the cite notation, but they should be typed
+ before the \cite command in any case because both on-line and superscript
+ cites come after what is quoted (when citing a quotation). This gives one
+ difficulty -- punctuation following quotes won't migrate inside the
+ quotation: e.g., "``Transition State Theory''\cite{Eyring}." gives out
+ ``Transition State Theory''.$^8$, but you may want the period inside the
+ quotes, thus: ``Transition State Theory.''$^8$.
-> Doubling of periods (.., ?., !.) is checked for and suppressed. The spacing
after the citation is set according to the final punctuation mark moved.
@@ -577,7 +616,7 @@ o With package option [superscript] (or [super] for short), display citation
or directly after \@ : Both of "N.A.S.A. \cite{space}." and "et al.\@
\cite{many}." will give doubled periods. These can be fixed as follows:
"N.S.A\@. \cite{space}." and "et al.\ \cite{many}.". The NSA example
- gives the wrong spacing when there is no citation. Sorry. Use \ after
+ gives the wrong spacing when there is no citation. Sorry. Use "\ " after
abbreviations like et al. to get the right spacing within a sentence whether
or not a citation follows.
@@ -681,8 +720,6 @@ These were chosen so as to not waste registers.) Alternatively, the
commands \citemid, \citedash, and \citepunct can be redefined to use
different penalty parameters, or none at all.
-\@extra@b@citeb is a hook for other style files to further specify
-citations; for example, to number by chapter (see chapterbib.sty).
@@ -713,10 +750,13 @@ citations; for example, to number by chapter (see chapterbib.sty).
% option and \CiteMoveChars; multibib hooks.
% 4.01 \bf -> \bfseries
% 4.02 Bury undouble action in a separate macro to avoid extra \fi error.
-% 5.0 hyperref and backref compatability! Penalty parameters and [nobreak].
+% 5.0 Hyperref and backref compatability! Penalty parameters and [nobreak].
% Letter prefix and suffix sorting. Stop suppressing multiple warnings.
% 5.1 Fix a missing "b@" (disappearing named cites), fix nosort
-% 5.2 more robust treatment of non-numbers
+% 5.2 More robust treatment of non-numbers
+% 5.3 Handle sort/compress of compound citation numbers (number by chapter)
+% such as 3.18 or 5-3. Note that these compounds cannot have prefix or
+% suffix letters (not enough bits in the maximum TeX number).
%
% TODO: other sorting, like dictionary or roman numeral
% TODO: create special "final punct" that could be ", and " and likewise
@@ -725,4 +765,4 @@ citations; for example, to number by chapter (see chapterbib.sty).
% Send problem reports to asnd@triumf.ca
Test file integrity: ASCII 32-57, 58-126: !"#$%&'()*+,-./0123456789
-:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
+:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ \ No newline at end of file
diff --git a/Master/texmf-dist/tex/latex/cite/drftcite.sty b/Master/texmf-dist/tex/latex/cite/drftcite.sty
index bc20deac0a3..21b557efbd5 100644
--- a/Master/texmf-dist/tex/latex/cite/drftcite.sty
+++ b/Master/texmf-dist/tex/latex/cite/drftcite.sty
@@ -1,27 +1,17 @@
% D R F T C I T E . S T Y
%
-% version 3.91 (Dec 2007)
+% version 3.5 (Jan 1995)
%
-% Print the tags instead of the numbers for \cite. This is meant as a
-% companion to cite.sty and overcite.sty, when used without bibtex,
-% and is not fully general.
+% Print the tags instead of the numbers for \cite.
+% See also CITE.STY and OVERCITE.STY.
%
-% Copyright (C) 1989,1991-1997,2001,2007 by Donald Arseneau
+% Copyright (C) 1989,1991-1995 by Donald Arseneau
% These macros may be freely transmitted, reproduced, or modified
% provided that this notice is left intact.
%
% Instructions are below, after \endinput.
% ........................
%
-% First, ensure that some catcodes have the expected values
-\edef\citenum{% to restore funny codes
- \catcode\string`\string ` \the\catcode\string`\`
- \catcode\string`\string ' \the\catcode\string`\'
- \catcode\string`\string = \the\catcode\string`\=
- \catcode\string`\string _ \the\catcode\string`\_
- \catcode\string`\string : \the\catcode\string`\:}
-\catcode\string`\`12 \catcode`\'12 \catcode`\=12 \catcode`\_8 \catcode`\:12
-
% Handle formatting hooks:
% \citeform,\citeleft,\citeright,\citemid,\citepunct
%
@@ -48,14 +38,32 @@
% Do not repeat warnings. [verbose] reverses
\let\oc@verbo\relax
-% Use \citen to give citation name without the other formatting.
+% \citen gives the citation tag in the text and writes the aux file entry.
+% Use \citen to give citation name without the other formatting; e.g.,
+% "See also ref.~\citen{junk}" gives "See also ref. junk".
%
\edef\citen{\noexpand\protect \expandafter\noexpand\csname citen \endcsname}
\@namedef{citen }#1{%
-\begingroup
-\@docite{#1}% do everything
-\endgroup}
+\edef\@tempa{\@ignspaftercomma,#1, \@end, }% ignore spaces in parameter list.
+\edef\@tempa{\expandafter\@ignendcommas\@tempa\@end}%
+\if@filesw \immediate\write \@auxout {\string\citation {\@tempa}}\fi
+\def\@citea{}%
+\@for \@citeb:=\@tempa\do {\@citea
+ \@ifundefined {b@\@citeb\@extra@b@citeb}%
+ {{\bf \@citeverb{\@citeb}?}%% issue warning only for first mis-use:
+ \@dftc@ifund {DCN@\@citeb\@extra@b@citeb}{% delete to warn always
+ \@warning {Citation `\@citeb' on page \thepage\space undefined}%
+ }{}% delete to warn always
+ }% else, defined
+ {\@dftc@hbox{\@citeverb{\@citeb}}}%
+ \let\@citea\citepunct\@advancecitecount
+ }}
+
+% for ignoring spaces in the input:
+\def\@ignspaftercomma#1, {\ifx\@end#1\@empty\else
+ #1,\expandafter\@ignspaftercomma\fi}
+\def\@ignendcommas,#1,\@end{#1}
% Make \cite robust.
%
@@ -69,103 +77,32 @@
\def\@citex[#1]#2{\@cite{\citen{#2}}{#1}}%
% Replacement for \@cite which defines the formatting normally done
-% around the citation list. Minor changes can be done by changing
-% \citeleft, \citemid, and \citeright; but in other cases it might
-% be necessary to redefine the whole macro.
+% around the citation list. Adjust the spacing before the citation:
+% if no space or if there is extra space due to some punctuation, then
+% change to one inter-word space. The way to change this is by changing
+% \citeleft, \citemid, and \citeright; but in extreme cases it might be
+% necessary to redefine the whole macro.
%
-\def\@cite#1#2{\leavevmode \cite@adjust
- \citeleft{#1\if@tempswa \@safe@activesfalse\citemid{#2}\fi
- \spacefactor\@m % punctuation in note doesn't affect outside
- }\citeright}
-
-% Put a penalty before the citation, and adjust the spacing: if no space
-% already or if there is extra space due to some punctuation, then change
-% to one inter-word space.
-%
-\@ifundefined{cite@adjust}{\def\cite@adjust{\begingroup
+\def\@cite#1#2{\leavevmode
\@tempskipa\lastskip \edef\@tempa{\the\@tempskipa}\unskip
- \ifnum\lastpenalty=\z@ \penalty\@highpenalty \fi
\ifx\@tempa\@zero@skip \spacefactor1001 \fi % if no space before, set flag
\ifnum\spacefactor>\@m \ \else \hskip\@tempskipa \fi
- \endgroup}}{}
-
+ \citeleft{#1\if@tempswa \citemid #2\fi}\citeright
+ \spacefactor\@m % punctuation in note doesn't affect outside
+}
\edef\@zero@skip{\the\z@skip}
-
-% \nocite: This is changed to ignore *ALL* spaces and be robust. The
-% parameter list, with spaces removed, is `returned' in \@no@sparg, which
-% is used by \citen.
-%
-\edef\nocite{\noexpand\protect\expandafter\noexpand\csname nocite \endcsname}
-
-\@namedef{nocite }#1{\@bsphack \begingroup
- \let\@dftc@hbox\@gobble \let\citepunct\@empty
- \@docite{#1}\endgroup\@esphack}
-
-% \@docite: Does most of the work for both \cite and \nocite.
-%
-\def\@docite#1{\begingroup\let\protect\string% normalize active chars
- \xdef\@no@sparg{\expandafter\@ignsp#1 \: }% and remove ALL spaces
- \if@filesw \immediate\write\@auxout {\string\citation{\@no@sparg}}\fi
- \endgroup
- \let\@citea\@empty % no punctuation preceding first
- \gdef\dftc@prenum{-1}%
- \@for \@citeb:=\@no@sparg\do{%
- \ifnum\dftc@cnum{\@citeb}<\z@ % undefined
- \dftc@vdef{b@\@citeb\@extra@b@citeb}{\dftc@tag{-1}?}%
- \G@refundefinedtrue \dftc@warn
- \else % defined (0 or num)
- \dftc@checksort
- \fi
- \@advancecitecount
- \@citea \@dftc@hbox{\@dftc@nums\@citeverb{\@citeb}}%
- \let\@citea\citepunct
- }}
-
-\def\dftc@warn{\@warning{Citation `\@citeb' on page \thepage\space undefined}}
-
-% for ignoring *ALL* spaces in the input. This presumes there are no
-% \outer tokens and no \if-\fi constructs in the parameter. Spaces inside
-% braces are retained.
-%
-\def\@ignsp#1 {\ifx\:#1\@empty\else #1\expandafter\@ignsp\fi}
-
%
% Give the citation tag as the label (even if another label is specified)
%
\def\@lbibitem[#1]#2{\global\@HighCite\z@
- \item[\@biblabel{%
- \ifnum\dftc@cnum{#2}>\z@ % cited
- \DC@llap{$^{\dftc@cnum{#2}}$\ \ }%
- \ifnum\dftc@cnum{#2}=\number 0#1\relax \else
- \@warning {Bib item `#2' is in wrong order}%
- \fi
- \else % never cited
- \@warning {Reference `#2' was never cited}%
- \fi
- \@citeverb{#2}}\hfill]%
- \if@filesw {\let\protect\string
- \immediate\write\@auxout{\string\bibcite{#2}{#1}}}\fi
- \ignorespaces}
+ \item[\@biblabel{\@ifundefined{DCN@#2\@extra@b@citeb}{\@warning
+ {Reference `#2' on page \thepage\space was never cited}}{}%
+ \DC@llap{$^{\@nameuse{DCN@#2\@extra@b@citeb}}$\ \ }%%o
+ \@citeverb{#2}}\hfil]\if@filesw{\def\protect##1{\string ##1\space}%
+ \immediate\write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
\def\@bibitem#1{\refstepcounter{\@listctr}\@lbibitem[\the\value{\@listctr}]{#1}}
-\def\@testdef #1#2#3{%
- \def\reserved@a{#3}\protected@edef\@tempa{\csname #1@#2\endcsname}%
- \ifx \@tempa\reserved@a \else \@tempswatrue \fi}
-
-% Citations are tagged with their order of first-citation by prefacing
-% \dftc@tag{<number>} to their definition. If reference "foo" is number
-% 11 in the bibliography, and is first-cited 7th in the text, then
-% \b@foo will be redefined from "11" to "\dftc@tag{7}11" when foo is
-% first cited. A (pretend) tag number of 0 is used to indicate an uncited
-% reference, and -1 indicates that "foo" was not defined by the bibliography
-% (also when LaTeX isn't run enough times).
-%
-\def\dftc@cnum#1{\expandafter\expandafter\expandafter \dftc@cnumx
- \csname b@#1\@extra@b@citeb\endcsname \dftc@tag 0\:}
-\def\dftc@cnumx#1\dftc@tag#2#3\:{\ifx\relax#1-1\else#2\fi}
-
-%
% make the special characters in the citation tag printable
%
\def\@citeverb#1{%
@@ -174,9 +111,7 @@
\expandafter \string\csname b@#1\endcsname}% % \@gobble, in that order.
}}%
-\long\def\@gobblethree#1#2#3{}
-
-\let\dftc@tag\@gobble
+\def\@gobblethree#1#2#3{}
% \@extra@b@citeb is a hook for other style files to further specify
% citations; for example, to number by chapter.
@@ -184,72 +119,41 @@
\@ifundefined{@extra@b@citeb}{\def\@extra@b@citeb{}}{}
-% count the citations as they appear in the text
-%
-\def\@advancecitecount{\begingroup
- \ifcase\dftc@cnum\@citeb % not cited yet
- \global\advance\@HighCite\@ne
- \toks@\expandafter\expandafter\expandafter
- {\csname b@\@citeb\@extra@b@citeb\endcsname}%
- \expandafter\xdef\csname b@\@citeb\@extra@b@citeb\endcsname{%
- \noexpand\dftc@tag{\the\@HighCite}\the\toks@}%
- \fi\endgroup}
-
-
%------------------------------------
% Handle optional variations:
-\newcount\@HighCite \global\@HighCite\z@
-\let\@dftc@hbox\hbox
-\let\@dftc@nums\@empty
-\def\dftc@vdef{\global\@namedef}
-\let\DC@llap=\llap
-\let\dftc@checksort\@empty
-
\def\nocitecount{%
- \let\DC@llap=\@gobble
- \let\@dftc@nums\@empty
- \let\@advancecitecount\@empty
- \let\dftc@checksort\@empty}
+ \def\@advancecitecount{\global\@namedef{DCN@\@citeb\@extra@b@citeb}{}}%
+ \let\DC@llap\@gobble}
+\nocitecount % in case what follows gets removed
+\newcount\@HighCite \global\@HighCite\z@
+\let\@dftc@ifund\@ifundefined
+\let\@dftc@hbox\hbox
\@ifundefined{DeclareOption}{}%
-{ \DeclareOption{nocitecount}{\nocitecount}
- \DeclareOption{verbose}{\let\dftc@vdef\@gobbletwo}
- \DeclareOption{tt}{\def\citeform{\texttt}}
+{ \DeclareOption{nocitecount}{\endinput}
+ \toks@={\def\@dftc@ifund#1#2#3{#2}}
+ \DeclareOption{verbose}{\the\toks@}
+ \DeclareOption{tt}{\def\citeform{\tt}}
\DeclareOption{nospace}{\def\citepunct{,\penalty\z@}}
\DeclareOption{space}{\def\citepunct{,\ }}
\DeclareOption{breakcites}{\let\@dftc@hbox\relax}
- \DeclareOption{shownumbers}{\let\@dftc@nums\relax}
- \DeclareOption{manualsort}{\let\dftc@checksort\relax}
- \ProvidesPackage{drftcite}[2007/12/11 \space v 3.91]
+ \ProvidesPackage{drftcite}[1995/01/23 \space v 3.5]
\ProcessOptions }
+% The rest deals only with counting, and can be removed if counting is never
+% desired.
-\ifx\@dftc@nums\relax
-\def\@dftc@nums{\leavevmode\raise1.4ex\rlap{\the\scriptfont\z@
- \csname b@\@citeb\@extra@b@citeb\endcsname\
- (\dftc@cnum\@citeb)}}%
-\fi
-
-\ifx\@advancecitecount\@empty \nocitecount \endinput \fi
-
+\let\DC@llap=\llap
+%
+% count the citations as they appear in the text
+%
+\def\@advancecitecount{\@ifundefined {DCN@\@citeb\@extra@b@citeb}%
+{\global\advance\@HighCite\@ne
+\expandafter\xdef\csname DCN@\@citeb\@extra@b@citeb\endcsname{\the\@HighCite}}%
+{}}
%
-% Check if cites in a \cite{a,b,c} are increasing.
-%
-\ifx\dftc@checksort\relax
-\def\dftc@checksort{%
- \edef\dftc@enum{\number0\csname b@\@citeb\@extra@b@citeb\endcsname}%
- \ifnum \z@<\dftc@enum\relax % is numeric
- \ifnum\dftc@prenum<\dftc@enum\relax
- \else
- \@warning {Citation `\@citeb' number \dftc@enum\space
- cited on page \thepage\space is given out of order}%
- \fi
- \global\let\dftc@prenum\dftc@enum%
- \fi}
-\fi
-
% The remainder handles (counting over) input files skipped by \includeonly.
% It adds code to LaTeX's \include to re-read the .aux file checking the
% \citation commands.
@@ -280,13 +184,14 @@
% D R F T C I T E . S T Y
%
-% version 3.91 (Dec 2007)
+% version 3.5 (Jan 1995)
%
% This package makes LaTeX use the identifying label instead of the number
% for citations, as if the bibliography had entries like \bibitem[name]{name}
% but LaTeX writes the proper citation number to the aux file for later runs.
-% This package is meant for draft copies documents using numeric citations,
-% particularly those that will use cite.sty or overcite.sty but not bibtex.
+% Spaces before the \cite command are ignored, and an ordinary interword
+% space is used. This package is particularly useful for draft (draught)
+% versions of documents.
%
% The \citen command is provided, as in cite.sty, to print just the citation
% or list of citations without the brackets and other formatting.
@@ -295,29 +200,30 @@
% for bibliography items that were never cited in the text.
%
% This package also keeps track of the order of first-citations in the text
-% for easy sorting (in lieu of BibTeX). The cite-order is displayed in the
-% bibliography along with the tags.
+% for easy sorting (in lieu of BibTeX). To omit this counting...
+% LaTeX 2.09: declare \nocitecount before the first \cite; or, for
+% a more permanent removal, comment-out the lines ending with %%o
+% below, and omit everything following the line that begins with %%o.
+% LaTeX2e: specify \usepackage[nocitecount]{drftcite}, or perform the
+% editing described above.
%
-% Both the cite-order number and the bibliography numbers can be displayed
-% as superscripts with the citations; use option [shownumbers].
-%
% The characters <>|_{}\ are not present in the cm roman fonts, so if you use
% them in identifiers, they will have to be typeset in typewriter style.
-% To do this, give package option [tt], or redefine \citeform as {\tt}.
+% To do this,...
+% LaTeX 2.09: insert \renewcommand\citeform{\tt} in your preamble
+% LaTeX2e: specify \usepackage[tt]{drftcite}
%
% `Citation...undefined' warnings are only given once per undefined
% citation name. In the text, missing numbers are represented with a
-% bold `name?'. To restore multiple warnings, use option [verbose].
+% bold `name?'. To restore multiple warnings...
+% LaTex 2.09: edit this file, removing the lines with the comments:
+% "delete to warn always"
+% LaTeX2e: specify \usepackage[verbose]{drftcite}
%
-% Options for \usepackage are:
+% Other options for \usepackage are:
% [space] - Separate printed names with comma-space (Default).
% [nospace] - Print just a comma (not comma-space) after each name.
% [breakcites] - Allow each printed name to be broken (hyphenated).
-% [verbose] - Give warning every time an undefined citation is used.
-% [tt] - Use tt font for citation tags
-% [shownumbers] - show superscript: bib-number (cite-order) with the cite tags
-% [manualsort] - Issue warnings when \cite tags are out of numeric order.
-% [nocitecount] - Disable all numbering/sorting functions.
%
% There are several commands that you may redefine (using \renewcommand)
% to change the formatting of citation lists:
@@ -349,10 +255,8 @@
% names; better chapterbib support.
% Version 3.5 (1995): Add tests before removing space + options from cite.sty.
% change \@citeverb to not eat hash space.
-% Version 3.9 (2001): Change a whole lot...and not thoroughly checked.
-% Version 3.91 (2007): Use \hfill and \texttt; update email.
%
-% Send problem reports to asnd@triumf.ca
+% Send problem reports to asnd@Reg.triumf.ca
%
% Test integrity of file:
% brackets: round, square, curly, angle: () [] {} <>
diff --git a/Master/texmf-dist/tex/latex/cite/overcite.sty b/Master/texmf-dist/tex/latex/cite/overcite.sty
index ccec9ccdde4..565ac4cd3aa 100644
--- a/Master/texmf-dist/tex/latex/cite/overcite.sty
+++ b/Master/texmf-dist/tex/latex/cite/overcite.sty
@@ -1,21 +1,422 @@
% O V E R C I T E . S T Y
%
-% version 4.0 (May 2003)
+% version 3.8 (Apr 1999)
%
% Compressed, sorted lists of superscript numerical citations.
+% see also CITE.STY and DRFTCITE.STY
%
-% Copyright (C) 2003 by Donald Arseneau
+% Copyright (C) 1989-1999 by Donald Arseneau
% These macros may be freely transmitted, reproduced, or modified
% provided that this notice is left intact.
%
-% This package is provided for compatibility with the original
-% overcite.sty. All it does is invoke cite.sty with the option
-% [superscript].
-%
-% It would be a shame to lose this pun.
-%
+% Instructions follow \endinput.
% ------------------------------------
- \ProvidesPackage{overcite}[2003/05/27 \space v 4.0]
- \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{cite}}
+% First, ensure that some catcodes have the expected values
+\edef\citenum{% to restore funny codes
+ \catcode\string`\string ` \the\catcode\string`\`
+ \catcode\string`\string ' \the\catcode\string`\'
+ \catcode\string`\string = \the\catcode\string`\=
+ \catcode\string`\string _ \the\catcode\string`\_
+ \catcode\string`\string : \the\catcode\string`\:}
+\catcode\string`\` 12
+\catcode`\' 12
+\catcode`\= 12
+\catcode`\_ 8
+\catcode`\: 12
+
+% Handle optional variations:
+% [ verbose, nospace, space, ref, nosort, nomove, noadjust],
+% \citeform,\citeleft,\citeright,\citemid,\citepunct,\citedash
+%
+% Set defaults:
+
+% [ on the left. Option [ref] does: [Ref. 12, note]
+\@ifundefined{citeleft}{\let\citeleft=[}{}
+
+% ] on the right:
+\@ifundefined{citeright}{\let\citeright=]}{}
+
+% , (comma space) before note
+\@ifundefined{citemid}{\def\citemid{,\penalty\@medpenalty\ }}{}
+
+% , (comma thin-space) between entries; [nospace] eliminates the space
+\@ifundefined{citepunct}{
+ \def\citepunct{,\penalty\@m\hskip.13emplus.1emminus.1em}%
+ }{}
+
+% -- (endash) designating range of numbers:
+% (using \hbox avoids easy \exhyphenpenalty breaks)
+\@ifundefined{citedash}{\def\citedash{\hbox{--}\penalty\@m }}{}
+
+% Each number left as-is:
+\@ifundefined{citeform}{\def\citeform{}}{}
+
+% Do not repeat warnings. [verbose] reverses
+\let\oc@verbo\relax
+
+% Default is to move punctuation:
+\def\oc@movep#1{\futurelet\@tempb\@citey}
+\let\@citey\oc@movep % Temporary
+
+\@ifundefined{DeclareOption}{}%
+{ \toks@={\def\oc@verbo#1#2#3#4{}}
+ \DeclareOption{verbose}{\the\toks@}
+ \DeclareOption{nospace}{\def\citepunct{,\penalty\@m}}
+ \DeclareOption{space}{\def\citepunct{,\penalty\@highpenalty\ }}
+ \DeclareOption{ref}{\def\citeleft{[Ref.\penalty\@M\ }}
+ \DeclareOption{nosort}{\def\@addto@cite@list
+ {\edef\@cite@list{\@cite@list \@celt{\@B@citeB}}}}
+ \DeclareOption{sort}{\let\@cite@list\relax}% default!
+ \DeclareOption{nomove}{\def\oc@movep{\@tempa}}% Don't move punctuation
+ \DeclareOption{move}{\let\oc@movep\@citey}% default definition
+ \DeclareOption{noadjust}{\let\cite@adjust\@empty}% Don't change spaces
+ \DeclareOption{adjust}{\let\cite@adjust\relax}% adjust space before [ ]
+ \ProvidesPackage{overcite}[1999/04/23 \space v 3.8]
\ProcessOptions
- \RequirePackage[superscript]{cite}
+}
+
+%----------------------
+% \citen uses \nocite to ignore spaces after commas, and write the aux file
+% \citation. \citen then loops over the citation tags, using \@make@cite@list
+% to make a sorted list of numbers. Finally, \citen executes \@citelist to
+% compress ranges of numbers and print the list. \citen can be used by itself
+% to give citation numbers without the brackets and other formatting; e.g.,
+% "See also ref.~\citen{junk}."
+%
+\edef\citen{\noexpand\protect \expandafter\noexpand\csname citen \endcsname}
+
+\@namedef{citen }#1{%
+\begingroup
+\let\@safe@activesfalse\@empty
+\@nocite{#1}% ignores spaces, writes to .aux file, returns #1 in \@no@sparg
+\@tempcntb\m@ne % \@tempcntb tracks highest number
+\let\@h@ld\relax % nothing held from list yet
+\let\@citea\@empty % no punctuation preceding first
+\let\@celt\delimiter % an unexpandable, but identifiable, token
+\def\@cite@list{}% % empty list to start
+\@for \@citeb:=\@no@sparg\do{\@make@cite@list}% make a sorted list of numbers
+% After sorted citelist is made, execute it to compress citation ranges.
+\@tempcnta\m@ne % no previous number
+\let\@celt\@compress@cite \@cite@list % output number list with compression
+\@h@ld % output anything held over
+\endgroup}
+
+% For each citation, check if it is defined and if it is a number.
+% if a number: insert it in the sorted \@cite@list
+% otherwise: output it immediately.
+%
+\def\@make@cite@list{%
+ \expandafter\let \expandafter\@B@citeB
+ \csname b@\@citeb\@extra@b@citeb \endcsname
+ \ifx\@B@citeB\relax % undefined: output ? and warning
+ \@citea {\bf{?}}\let\@citea\citepunct \G@refundefinedtrue
+ \@warning {Citation `\@citeb' on page \thepage\space undefined}%
+ \oc@verbo \global\@namedef{b@\@citeb\@extra@b@citeb}{?}%
+ \else % defined % remove previous line to repeat warnings
+ \ifcat _\ifnum\z@<0\@B@citeB _\else A\fi % a positive number, put in list
+ \@addto@cite@list
+ \else % citation is not a number, output immediately
+ \@citea \citeform{\@B@citeB}%
+ \let\@citea\citepunct
+ \fi\fi}
+
+% Regular definition for adding entry to cite list, with sorting
+
+\@ifundefined{@addto@cite@list}{% sort option either declared or defaulted
+ \def\@addto@cite@list{\@tempcnta\@B@citeB \relax
+ \ifnum \@tempcnta>\@tempcntb % new highest, add to end (efficiently)
+ \edef\@cite@list{\@cite@list \@celt{\@B@citeB}}%
+ \@tempcntb\@tempcnta
+ \else % arbitrary number: insert appropriately
+ \edef\@cite@list{\expandafter\@sort@celt \@cite@list \@gobble @}%
+ \fi}
+%
+% \@sort@celt inserts number (\@tempcnta) into list of \@celt{num} (#1{#2})
+% \@celt must not be expandable; list should end with two vanishing tokens.
+%
+ \def\@sort@celt#1#2{\ifx \@celt #1% parameters are \@celt {num}
+ \ifnum #2<\@tempcnta % number goes later in list
+ \@celt{#2}%
+ \expandafter\expandafter\expandafter\@sort@celt % continue
+ \else % number goes here
+ \@celt{\number\@tempcnta}\@celt{#2}% stop comparing
+ \fi\fi}
+}% end sort option definitions
+{}% nosort definition is done in options processing
+
+% Check if each number follows previous and can be put in a range
+%
+\def\@compress@cite#1{% % This is executed for each number
+ \advance\@tempcnta\@ne % Now \@tempcnta is one more than the previous number
+ \ifnum #1=\@tempcnta % Number follows previous--hold on to it
+ \ifx\@h@ld\relax % first pair of successives
+ \edef\@h@ld{\@citea \noexpand\citeform{#1}}%
+ \else % compressible list of successives
+ \def\@h@ld{\citedash \citeform{#1}}%
+ \fi
+ \else % non-successor -- dump what's held and do this one
+ \@h@ld \@citea \citeform{#1}\let\@h@ld\relax
+ \fi \@tempcnta#1\let\@citea\citepunct
+}
+
+% Make \cite robust and choose superscript or normal
+%
+\edef\cite{\noexpand\protect\expandafter\noexpand\csname cite \endcsname}
+
+\@namedef{cite }{\@ifnextchar[{\@tempswatrue\@citex}{\@tempswafalse\@citew}}
+
+% \cite command has optional note, so do on line.
+%
+\def\@citex[#1]#2{\leavevmode
+ \cite@adjust
+ \citeleft{\citen{#2}\citemid{#1}%
+ \spacefactor\@m % punctuation in note doesn't affect outside
+ }\citeright}
+
+% Put a penalty before the citation, and adjust the spacing: if no space
+% already or if there is extra space due to some punctuation, then change
+% to one inter-word space.
+%
+\@ifundefined{cite@adjust}{\def\cite@adjust{%
+ \@tempskipa\lastskip \edef\@tempa{\the\@tempskipa}\unskip
+ \ifnum\lastpenalty=\z@ \penalty\@highpenalty \fi
+ \ifx\@tempa\@zero@skip \spacefactor1001 \fi % if no space before, set flag
+ \ifnum\spacefactor>\@m \ \else \hskip\@tempskipa \fi}}{}
+
+% No note, so superscript, but check for punctuation first.
+%
+\def\@citew#1{\begingroup \leavevmode \unskip
+ \def\@tempa{\@tempcnta\spacefactor
+ \/% this allows the last word to be hyphenated, and it looks better.
+ \@cite{\citen{#1}}\spacefactor\@tempcnta\endgroup}%
+ \oc@movep\relax}% check for following punctuation (depending on options)
+
+% Move trailing punctuation before the citation:
+%
+\def\@citey{\let\@tempc\oc@movep
+ % Watch for double periods and suppress them
+ \ifx\@tempb.\ifnum\spacefactor<3000 .\fi
+ % Move other punctuation
+ \else\ifx\@tempb,,%
+ \else\ifx\@tempb::% add other punctuation as necessary,
+ \else\ifx\@tempb;;% with balancing \fi s
+ \else\let\@tempc\@tempa
+ \fi\fi\fi\fi
+ \@tempc}%
+%
+% Replacement for \@cite which defines the formatting normally done
+% around the citation list. This uses superscripts with no brackets.
+% HOWEVER, trailing punctuation has already been moved over. The
+% format for cites with note is given by \@citex. Redefine \@cite and/
+% or \@citex to get different appearance. I don't use \textsuperscript
+% because it is defined badly in compatibility mode.
+
+\def\@cite#1{\mbox{$\m@th^{\hbox{\@ove@rcfont#1}}$}}
+
+\@ifundefined{selectfont}{% original LaTeX 2.09
+ \def\@ove@rcfont{\the\scriptfont\z@ \def\bf{\the\scriptfont\bffam}}
+ }{% NFSS
+ \@ifundefined{fontsize}{% \fontsize undefined: strange NFSS
+ \def\@ove@rcfont{\the\scriptfont\z@}\let\bf\relax % hope this works
+ }{% `normal' NFSS LaTeX2e, including compatibility mode
+ \def\@ove@rcfont{% not needed: \csname S@\f@size\endcsname
+ \fontsize\sf@size\baselineskip\selectfont}
+ }}
+
+\edef\@zero@skip{\the\z@skip}
+
+% \nocite: This is changed to ignore *ALL* spaces and be robust. The
+% parameter list, with spaces removed, is `returned' in \@no@sparg, which
+% is used by \citen.
+%
+\edef\nocite{\noexpand\protect\expandafter\noexpand\csname nocite \endcsname}
+
+\@namedef{nocite }#1{\@bsphack \@nocite{#1}%
+ \@for \@citeb:=\@no@sparg\do{\@ifundefined{b@\@citeb\@extra@b@citeb}%
+ {\G@refundefinedtrue\@warning{Citation `\@citeb' undefined}%
+ \oc@verbo \global\@namedef{b@\@citeb\@extra@b@citeb}{?}}{}}%
+ \@esphack}
+
+\def\@nocite#1{\xdef\@no@sparg{\@ignsp#1 \! }% remove *ALL* spaces
+ \if@filesw \immediate\write\@auxout {\string\citation {\@no@sparg}}\fi}
+
+% for ignoring *ALL* spaces in the input. This presumes there are no
+% \outer tokens and no \if-\fi constructs in the parameter. Spaces inside
+% braces are retained.
+%
+\def\@ignsp#1 {\ifx\!#1\@empty\else #1\expandafter\@ignsp\fi}
+
+\let\nocitecount\relax % in case \nocitecount was used for drftcite
+
+\@ifundefined{@extra@b@citeb}{\def\@extra@b@citeb{}}{}
+% in case no fancy bib package (chapterbib) defines this
+
+\@ifundefined{G@refundefinedtrue}{\let\G@refundefinedtrue\relax}{}
+
+\citenum % execute restore-catcodes
+
+% Aliases:
+\let\citenum\citen
+\let\citeonline\citen
+
+\endinput
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+ OVERCITE.STY
+
+Modify LaTeX's normal citation mechanism to:
+
+o Display citations as superscript numbers, with a comma and a small space
+ between each number, and with three or more consecutive numbers compressed
+ into a range like 3-7.
+
+o By default, sort citation numbers into ascending order; print non-numbers
+ before numbers. All numbers should be greater than zero. (The [nosort]
+ package option turns off sorting.)
+
+o If an optional note is given, typeset the whole list of citations at regular
+ size as if cite.sty was in effect. (See cite.sty).
+
+o Use THE SAME INPUT FORMAT as for ordinary citations; this style will ignore
+ spaces before the citation, and move trailing punctuation to before the
+ citation. For example, "...information \cite{source};" ignores the space
+ before \cite and puts the semicolon before the number, just as if you typed
+ "...information;$^{12}$".
+
+o The punctuation that will migrate before the superscript is .,;:. Perhaps
+ ! and ? should too, but they weren't listed in the APS style manual I looked
+ at. Quotes were listed, but they should never have to migrate because both
+ on-line and superscript versions put quotes before the citation. This gives
+ one difficulty --- punctuation following quotes won't migrate inside the
+ quotation. For example, "``Transition State Theory''\cite{Eyring}." gives
+ "``Transition State Theory''.$^8$", but you may want the period inside the
+ quotes, thus: ``Transition State Theory.''$^8$.
+
+o Doubling of periods (.., ?., !.) is checked for and suppressed. The spacing
+ after the citation is set according to the final punctuation mark moved.
+ There is a problem with double periods after a capitalized abbreviation
+ or directly after \@ : Both of "N.A.S.A. \cite{space}." and "et al.\@
+ \cite{many}." will give doubled periods. These can be fixed as follows:
+ "N.A.S.A\@. \cite{space}." and "et al.\ \cite{many}.". These work properly
+ for both cite.sty and overcite.sty, but the NASA example gives the wrong
+ spacing when there is no citation. Sorry. Use \ after abbreviations like
+ et al. to get the right spacing within a sentence whether or not a citation
+ follows.
+
+o All the special handling of punctuation can be disabled by specifying the
+ [nomove] option.
+
+o Define \citen to get just the numbers without the brackets or superscript
+ and extra formatting. Aliases are \citenum and \citeonline for easy
+ conversion to other citation packages.
+
+o `Citation...undefined' warnings are only given once per undefined citation
+ tag. In the text, missing numbers are represented with a bold `?' at the
+ first occurrence, and with a normal `?' thenceforth. The package option
+ [verbose] restores the usual repeated warnings.
+
+o Make \nocite, \cite, and \citen all ignore spaces in the input tags.
+
+Although each \cite command sorts its numbers, better compression into
+ranges can usually be achieved by carefully selecting the order of the
+\bibitem entries or the order of initial citations when using BibTeX.
+Having the entries pre-sorted will also save processing time, especially
+for long lists of numbers.
+
+Customization:
+~~~~~~~~~~~~~~
+Under LaTeX2e, there are six options for \usepackage{overcite}:
+
+ [verbose] causes warnings for undefined citations to be repeated each time
+ they are used.
+ [ref] uses the format `[Ref.~12, optional note]' when \cite[]{} appears.
+ [nospace] eliminates the spaces after commas in the number list.
+ [space] uses a full inter-word space with no penalty after the commas
+ [nosort] prevents sorting of the numbers (default is to sort, and a
+ [sort] option is provided for completeness).
+ [nomove] prevents moving the superscript cite after punctuation.
+ [noadjust] disables `smart' handling of space before a cite with note.
+
+There are several commands that you may redefine to change the formatting
+of citation lists:
+
+command function default
+---------- ----------------------- ----------------------------
+\citeform reformats each number nothing
+\citepunct printed between numbers comma + penalty + thin space
+\citeleft left delimiter of list [
+\citeright right delimeter of list ]
+\citemid printed before note comma + space
+\citedash used in a compressed range endash + penalty
+
+The left/mid/right commands only affect the formatting of citations with
+optional notes: \cite[xxx]{yyy}. You may use \renewcommand to change any
+of these. Remember, these commands are extensions made by this package;
+they are not regular LaTeX. Some examples of changes:
+
+1: \renewcommand\citeform[1]{\romannumeral 0#1}} % roman numerals ^{i,vi}
+2: \renewcommand\citeform[1]{(#1)} % parenthesized numbers ^{(1)-(5)}
+3: \renewcommand\citeform{\thechapter.} % by chapter: ^{2.18-2.21}
+4: \renewcommand\citepunct{,} % no space and no breaks at commas
+5: \renewcommand\citemid{; } % semicolon before optional note
+6: \renewcommand\citeleft{(} % parentheses around list with note
+ \renewcommand\citeright{)} % parentheses around list with note
+
+The appearance of the whole citation list is governed by \@cite, (for no
+note) and \@citex (when a note is given). For more extensive changes to the
+formatting, redefine \@cite and/or \@citex. For example, to get brackets
+around the list of superscript numbers you can do:
+
+ \def\@cite#1{\mbox{$\m@th^{\hbox{\@ove@rcfont[#1]}}$}}
+or
+ \def\@cite#1{\textsuperscript{[#1]}}
+
+after \makeatletter.
+
+Related Note: overcite.sty does not affect the numbering format of
+the bibliography; the "[12]" style is still the default. To get
+superscripts in the bibliography (at any time) you can include
+
+ \renewcommand\@biblabel[1]{$^{#1}$}
+
+in your personal style file, or include
+
+ \makeatletter \renewcommand\@biblabel[1]{$^{#1}$} \makeatother
+
+directly in your document. If this does not work, your LaTeX and/or
+document style are very outdated.
+
+\@extra@b@citeb is a hook for other style files to further specify
+citations; for example, to number by chapter (see chapterbib.sty).
+
+See also cite.sty for enhanced [5-9] type citations, and drftcite.sty
+for draft mode citations.
+
+% Version 1991: Ignore spaces after commas in the parameter list. Move most of
+% \citen into \@cmpresscites for speed. Give the proper \spacefactor afterwards.
+% Version 1992: make \citepunct hold the punctuation between numbers (for ease
+% of changing). Add \/ to allow hyphenation of previous word, and look better
+% in italics.
+% 1992a: Make it work with NFSS. (Thank you C. Hamlin and Rainer Schoepf)
+%
+% Version 3.0 (1992): Rewrite, including sorting. Make entries like "4th"
+% be treated properly as text.
+% 3.1: Bug fixes (and Joerg-Martin Schwarz also convinced me to use \ifcat)
+% 3.2: NFSS support was wrong--added \reset@font. Suppress repetitions of
+% warnings. Include \@extra@b@citeb hook.
+% 3.3: Handle LaTeX2e options. Introduce various customization hooks.
+% 3.4: Heuristics to avoid removing \hspace glue before on-line \cite.
+% Make \nocite ignore spaces in list, simplify. Aliases for \citen.
+% Compatability with amsmath (which defines \over).
+% 3.5: Replace \reset@font with \selectfont so italics are preserved
+% Include \G@refundefinedtrue. Fix cite-with-note bug (Lars Engebretsen).
+% 3.6: Add nosort option.
+% 3.7: Add nomove option; catcode preservation and global \@no@sparg for
+% french.sty; warnings in \nocite.
+% 3.8: \citedash hook, fix token look-ahead (Heiko Selber), noadjust, babel.
+%
+% Send problem reports to asnd@Reg.triumf.ca
+
+Test file integrity: ASCII 32-57, 58-126: !"#$%&'()*+,-./0123456789
+:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~