diff options
author | Karl Berry <karl@freefriends.org> | 2006-07-15 20:53:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-07-15 20:53:33 +0000 |
commit | 00d3726f248819a1d04d536214efdbc2ffde7e12 (patch) | |
tree | d140c0d6854c161902962d3b6f358afe6872de80 | |
parent | 11c5cef3a0ba92a334d609d3122886eb109e56ab (diff) |
natbib 7.3 update (22mar06)
git-svn-id: svn://tug.org/texlive/trunk@1849 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-x | Build/cdbuild/ctan2tds.pl | 1 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/natbib/README.1st | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/natbib/README.v73 (renamed from Master/texmf-dist/doc/latex/natbib/README.v71) | 25 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/natbib/natbib.pdf | bin | 0 -> 184770 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/natbib/natnotes.tex | 11 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/natbib/natbib.drv | 6 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/natbib/natbib.dtx | 684 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/natbib/natbib.ins | 32 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/natbib/natbib.sty | 55 | ||||
-rw-r--r-- | Master/texmf-dist/tpm/natbib.tpm | 13 | ||||
-rw-r--r-- | Master/texmf/lists/natbib | 3 |
11 files changed, 474 insertions, 360 deletions
diff --git a/Build/cdbuild/ctan2tds.pl b/Build/cdbuild/ctan2tds.pl index 9cc3741cafb..62c306b0214 100755 --- a/Build/cdbuild/ctan2tds.pl +++ b/Build/cdbuild/ctan2tds.pl @@ -722,7 +722,6 @@ $standardtex='\.cfg|\.sty|\.clo|\.ldf|\.cls|\.def|\.fd$'; 'mfpic', 'NULL', 'midnight', '\.doc', 'minutes', 'Sample.tex', - 'natbib', 'natbib.dtx|natnotes.tex', 'newlfm', 'NULL', 'ocherokee', 'NULL', 'ofs', 'ofsdoc-e\.tex|ofsdoc\.tex|ofs-slt\.tex', diff --git a/Master/texmf-dist/doc/latex/natbib/README.1st b/Master/texmf-dist/doc/latex/natbib/README.1st index 1d44a64310e..1ea739ee85c 100644 --- a/Master/texmf-dist/doc/latex/natbib/README.1st +++ b/Master/texmf-dist/doc/latex/natbib/README.1st @@ -31,6 +31,6 @@ See my parallel custom-bib system for generating customized bst files. For installation instructions and more details, see README.vxx. Patrick W. Daly -Max-Planck-Institut f\"ur Aeronomie +Max-Planck-Institut f\"ur Sonnensystemforschung D-37191 Katlenburg-Lindau, Germany -E-mail: daly@linmpi.mpg.de +E-mail: daly@mps.mpg.de diff --git a/Master/texmf-dist/doc/latex/natbib/README.v71 b/Master/texmf-dist/doc/latex/natbib/README.v73 index 96012c66efd..7a9b3228e0e 100644 --- a/Master/texmf-dist/doc/latex/natbib/README.v71 +++ b/Master/texmf-dist/doc/latex/natbib/README.v73 @@ -1,8 +1,10 @@ NATBIB Package +Version 7.3 Revised user's manual. -Version 7.1 (See list of changes below) - The bst files have been upgraded to contain - doi and eid fields for electronic journals +Version 7.2 (See list of changes below) + Allow numerical cite compression without sorting + Hyperref package does not suppress compression + Compatibility with citeref package This is the natbib package for handling both author-year and numerical BibTeX styles. It contains the following files: @@ -11,8 +13,7 @@ BibTeX styles. It contains the following files: ltxdoc class distributed with LaTeX2e. May be docstripped with option `package,all' to get the - natbib.sty package file, or with `package,all,209' to obtain - a LaTeX 2.09 style file. + natbib.sty package file. natbib.ins -- A docstrip batch job to extract natbib.sty and natnotes.tex from the source file natbib.dtx. @@ -123,6 +124,14 @@ For full details, print out the documentation in natbib.dtx by LaTeXing it. ------------------------------------------------------------------------- List of changes + v7.3 Go over the manual documentation and update it for 2006 rather than 1993. + No changes to code. + + v7.2 Allow numerical cite compression without sorting (option compress) + Hyperref package no longer suppresses compression + Compatibility with citeref package + Superscript citations may have braces, defined in \bibpunct + v7.1 Add warning when multiple citations with common authors and year are missing distinguishing extra letter. @@ -394,8 +403,8 @@ Changes from previous (4.x) versions: Under LaTeX2e, punctuation can be selected with options in \usepackage ------------------------------------------------------------------------- -2003 June 6 +2006 Jan 12 Patrick W. Daly -Max-Planck-Institut f\"ur Aeronomie +Max-Planck-Institut f\"ur Sonnensystemforschung D-37191 Katlenburg-Lindau, Germany -E-mail: daly@linmpi.mpg.de +E-mail: daly@mps.mpg.de diff --git a/Master/texmf-dist/doc/latex/natbib/natbib.pdf b/Master/texmf-dist/doc/latex/natbib/natbib.pdf Binary files differnew file mode 100644 index 00000000000..abefe38c5b0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/natbib/natbib.pdf diff --git a/Master/texmf-dist/doc/latex/natbib/natnotes.tex b/Master/texmf-dist/doc/latex/natbib/natnotes.tex index 556ef7db044..76ee1b099d4 100644 --- a/Master/texmf-dist/doc/latex/natbib/natnotes.tex +++ b/Master/texmf-dist/doc/latex/natbib/natnotes.tex @@ -21,8 +21,8 @@ %% %% For more details, LaTeX the source natbib.dtx. %% ============================================== -%% Copyright 1993-2003 Patrick W Daly -%% Max-Planck-Institut f\"ur Aeronomie +%% Copyright 1993-2006 Patrick W Daly +%% Max-Planck-Institut f\"ur Sonnensystemforschung %% Max-Planck-Str. 2 %% D-37191 Katlenburg-Lindau %% Germany @@ -31,7 +31,7 @@ \def\DescribesFile#1 [#2 #3 #4] {\def\filename{#1}\def\filedate{#2}\def\fileversion{#3}} \DescribesFile{natbib} - [2003/06/06 7.1 (PWD)] + [2006/03/22 7.3 (PWD)] \documentclass{article} \setlength{\parindent}{0pt} @@ -281,7 +281,7 @@ contain a |\bibliographystyle| command, \emph{preferably with the same style argument}. \head{Sorting and compressing citations} Do not use the \texttt{cite} package with \thestyle; rather use one of the -options \texttt{sort} or \texttt{sort\&compress}. +options \texttt{sort}, \texttt{compress}, or \texttt{sort\&compress}. These also work with author--year citations, making multiple citations appear in their order in the reference list. @@ -314,6 +314,9 @@ is read in after the main package file. which they appear in the list of references; \item[\ttfamily sort\&compress] as \texttt{sort} but in addition multiple numerical citations are compressed if possible (as 3--6, 15); +\item[\ttfamily compress] to compress without sorting, so compression only + occurs when the given citations would produce an ascending sequence of + numbers; \item[\ttfamily longnamesfirst] makes the first citation of any reference the equivalent of the starred variant (full author list) and subsequent citations normal (abbreviated list); diff --git a/Master/texmf-dist/source/latex/natbib/natbib.drv b/Master/texmf-dist/source/latex/natbib/natbib.drv index 2e17b3770a4..f6fb11e578f 100644 --- a/Master/texmf-dist/source/latex/natbib/natbib.drv +++ b/Master/texmf-dist/source/latex/natbib/natbib.drv @@ -11,15 +11,15 @@ %% %% Make changes to it as needed. (Never change the file natbib.dtx!) %% ============================================ -%% Copyright 1993-2003 Patrick W Daly -%% Max-Planck-Institut f\"ur Aeronomie +%% Copyright 1993-2006 Patrick W Daly +%% Max-Planck-Institut f\"ur Sonnensystemforschung %% Max-Planck-Str. 2 %% D-37191 Katlenburg-Lindau %% Germany %% E-mail: daly@linmpi.mpg.de \NeedsTeXFormat{LaTeX2e} \ProvidesFile{natbib.drv} - [2003/06/06 7.1 (PWD)] + [2006/03/22 7.3 (PWD)] \documentclass{ltxdoc} %\documentclass[twoside]{ltxdoc} %\documentclass[a4paper]{ltxdoc} diff --git a/Master/texmf-dist/source/latex/natbib/natbib.dtx b/Master/texmf-dist/source/latex/natbib/natbib.dtx index 50a6640ccaa..df12988d3b5 100644 --- a/Master/texmf-dist/source/latex/natbib/natbib.dtx +++ b/Master/texmf-dist/source/latex/natbib/natbib.dtx @@ -5,8 +5,8 @@ {NATBIB.DTX} %======================================================================== %</dtx> -%% Copyright 1993-2003 Patrick W Daly -%% Max-Planck-Institut f\"ur Aeronomie +%% Copyright 1993-2006 Patrick W Daly +%% Max-Planck-Institut f\"ur Sonnensystemforschung %% Max-Planck-Str. 2 %% D-37191 Katlenburg-Lindau %% Germany @@ -17,19 +17,19 @@ % archives in directory macros/latex/base/lppl.txt; either % version 1 of the License, or any later version. % -% This is a contributed file to the LaTeX2e system. +% This is a contributed file to the LaTeX system. % ------------------------------------------------- % This is a LaTeX package to modify \cite and \thebibliography for author-year % systems of bibliographic citation; will also work with % numerical systems, allowing simplified style changes for them too. % Installation: % LaTeX this file: creates docstrip installation file natbib.ins -% AND the (LaTeX2e) documentation +% AND the documentation % (La)TeX natbib.ins: creates package file natbib.sty % and optionally documentation driver natbib.drv % (natbib.ins may be edited as needed) % Docstrip options available: -% package - to produce a (LaTeX2e) package .sty file +% package - to produce a package .sty file % notes - to produce a reference sheet for natbib usage % driver - to produce a driver file to print the documentation % 209 - (with package) for style file that runs under LaTeX 2.09 @@ -68,7 +68,7 @@ % *** The DATE, VERSION, and other INFO %\fi %\ProvidesFile{natbib} - [2003/06/06 7.1 (PWD)] + [2006/03/22 7.3 (PWD)] % \changes{4.0}{1993 Aug 19}{First documented release} % \changes{4.1}{1993 Oct 4}{Simplification of \cs{@citeapalk}} % \changes{4.1a}{1993 Oct 14}{Add \texttt{rev} option for reversed comments @@ -174,8 +174,12 @@ % \changes{7.0a}{2000 Jul 24}{Argument of \cs{citenumfont} always in braces} % \changes{7.0b}{2002 Feb 27}{Fix bug with superscripts} % \changes{7.1}{2003 June 6}{Add test for missing extra letter in multi-cites} +% \changes{7.2}{2006 Jan 12}{Allow \texttt{hyperref} with compression} +% \changes{7.2}{2006 Jan 12}{Add compression without sorting} +% \changes{7.2}{2006 Jan 12}{Add compatibility with \texttt{citeref} package} +% \changes{7.3}{2006 Mar 22}{Revise and update the manual documentation} % -% \CheckSum{2367} +% \CheckSum{2420} % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z @@ -201,17 +205,13 @@ %^^A ============================================= \begin{filecontents*}{natbib.ins} % File: natbib.ins -% Copyright 1999 Patrick W. Daly +% Copyright 2006 Patrick W. Daly % -% This file can be redistributed and/or modified under the terms -% of the LaTeX Project Public License Distributed from CTAN -% archives in directory macros/latex/base/lppl.txt; either -% version 1 of the License, or any later version. -% -% It is an installation file for extracting package and driver +% This is the natbib installation file for extracting package and driver % files from the original source file. Simply process it under -% TeX or LaTeX. It works with Docstrip versions before and after -% December 1995. +% TeX or LaTeX. +% +% This installation works with docstrip 2.4 or later. \def\batchfile{natbib.ins} \input docstrip @@ -238,18 +238,6 @@ Only a few abbreviated comments remain here to describe the usage. \endpostamble \keepsilent -% Docstrip before Dec 95 does not have \generate syntax, nor -% \declarepreamble. Must redefine them. The \generateFile called -% for each output file individually. -% Docstrip before Dec 96 cannot interprete multiline \if..\fi -% Thus for maximum compatibility, have only one-line conditionals - -\let\oldDS F\relax -\expandafter\ifx\csname generate\endcsname\relax \let\oldDS T\relax\fi -\if\oldDS T \def\declarepreamble#1{\preamble}\fi -\if\oldDS T \def\declarepostamble#1{\postamble}\fi -\if\oldDS T \generateFile{natbib.sty}{f}{\from{natbib.dtx}{package,all}} \fi - \declarepreamble\refsheet ============================================= IMPORTANT NOTICE: @@ -275,8 +263,6 @@ End of Reference Sheet file \endpostamble -\ifx\oldDS T \generateFile{natnotes}{f}{\from{natbib.dtx}{notes}}\fi - \declarepreamble\driver ============================================ This is the driver file to produce the LaTeX documentation @@ -291,10 +277,6 @@ Make changes to it as needed. (Never change the file \inFileName!) End of documentation driver file. \endpostamble -\ifx\oldDS T \generateFile{natbib.drv}{f}{\from{natbib.dtx}{driver}}\fi - -\ifx\oldDS T \let\askforoverwritefalse\relax\def\generate#1{}\fi - \askforoverwritefalse \generate{\file{natbib.sty}{\from{natbib.dtx}{package,all}} \file{natnotes}{\usepreamble\refsheet\usepostamble\refsheetq @@ -499,12 +481,16 @@ with those for \texttt{harvard}, \texttt{apalike}, \texttt{chicago}, % styles can be defined for local \texttt{.bst} files by means of a % configuration file \thestyle\texttt{.cfg}. % -% It is compatible with the packages: \texttt{babel}, \texttt{index}, +% It is compatible with the packages: \texttt{babel}, \texttt{index}, \texttt{citeref}, % \texttt{showkeys}, \texttt{chapterbib}, \texttt{hyperref}, \texttt{koma} and % with the classes \texttt{amsbook} and \texttt{amsart}. It can also emulate the % sorting and compressing functions of the \texttt{cite} package (with which it % is otherwise incompatible). % +% Note that the \texttt{citeref} package (for adding citation page numbers in the +% bibliography) must be loaded after \thestyle. (The \texttt{hyperref} package with +% the option \texttt{pagebackref} also provides this feature, but with hyperlinks.) +% % The \thestyle\ package therefore acts as a single, flexible interface for % most of the available bibliographic styles. % @@ -513,228 +499,97 @@ with those for \texttt{harvard}, \texttt{apalike}, \texttt{chicago}, % \newpage\tableofcontents\newpage % % \section{Introduction} -% The first problem of using author--year literature citations with standard -% \LaTeX{} is that the two forms of citations are not supported. These are: -% \begin{quote} -% textual: \dots\ as shown by Jones et al. (1990) \dots\\ -% parenthetical: It has been shown (Jones et al., 1990) that \dots -% \end{quote} -% There is only one |\cite| command to do both jobs. -% -% A second problem is that the \texttt{thebibliography} environment for -% listing the references insists on including the {\em labels\/} in the -% list. These labels are normally the numbers, needed for referencing. In -% the author--year system, they are superfluous and should be left off. -% Thus, if one were to make up a bibliography with the author--year as -% label, as -% \begin{quote} -% \begin{verbatim} -% \begin{thebibliography}{...} -% \bibitem[Jones et al., 1990]{jon90} -% Jones, P. K., . . . -% \end{thebibliography} -% \end{verbatim} -% \end{quote} -% then |\cite{jon90}| produces the parenthetical citation [Jones et al., -% 1990], but there is no way to get the textual citation. Furthermore, -% the citation text will also be included in the list of references. -% -% The final problem is to find a \btx{} bibliography style that will be -% suitable. -% -% \section{Previous Solutions} -% \begin{quote}\slshape -% This section may not be of interest to all users. To find out how to use -% \thestyle\ without reading about the historical background, go to -% Section~\ref{sec:usage}. -% \end{quote} -% -% Although the author--year citation mode is not supported by -% \emph{standard} \LaTeX, there are a number of contributed packages that -% try to solve this problem. The various bibliographic styles -% (\texttt{.bst} files) that exist are usually tailored to be used with a -% particular \LaTeX{} package. -% -% I have found a large number of \texttt{.bst} files on file servers that may -% act as indicators of the various systems available. -% -% \subsection{The \texttt{natsci.bst} Style} -% What gave me my first inspiration was Stephen Gildea's \texttt{natsci.bst} -% for use with his \texttt{agujgr.sty} file. This showed me that the problem -% was solvable. However, Gildea's style formats |\bibitem| just as I -% illustrated above: with an optional label consisting of abbreviated -% authors and year. Thus only parenthetical citations can be accommodated. -% The list of references, however, is fixed up in his style files. -% -% \subsection{The \texttt{apalike.bst} Style} -% Oren Patashnik, the originator of \btx{} and the standard \texttt{.bst} -% files, has also worked on an author--year style, called \texttt{apalike.bst} -% with a corresponding \texttt{apalike.sty} to support it. Again, only the -% parenthetical citation is provided. Except for the fact that his style -% works with version~0.99 of \btx, its functionality is identical to that -% of the \texttt{natsci} files. -% -% Patashnik does not like author--year citations. He makes this very clear -% in his \btx{} manuals and in the header to \texttt{apalike.bst}. -% Nevertheless, one should respect his work in this area, simply because he -% should be the best expert on matters of \btx. Thus \texttt{apalike.bst} -% could be the basis for other styles. -% -% The form of the \texttt{thebibliography} entries in this system is -% \begin{quote} -% |\bibitem[Jones et al., 1990]{jon90}...| -% \end{quote} -% the same as I illustrated earlier. This is the most minimal form that can -% be given. I name it the \texttt{apalike} variant, after Patashnik's -% \texttt{apalike.bst} and \texttt{apalike.sty}. However, there could be many -% independent \texttt{.bst} files that follow this line. -% -% The bibliography style files belonging to this group include: -% \begin{quote} -% \texttt{apalike}, \texttt{apalike2}, \texttt{cea}, \texttt{cell}, -% \texttt{jmb}, \texttt{phapalik}, \texttt{phppcf}, \texttt{phrmp} -% \end{quote} -% -% \subsection{The \texttt{newapa} Style} -% A major improvement has been achieved with \texttt{newapa.bst} and the -% accompanying \texttt{newapa.sty} files by Stephen N. Spencer and Young U. -% Ryu. Under their system, three separate items of information are included -% in the |\bibitem| label, to be used as required. These are: the full -% author list, the abbreviated list, and the year. This is accomplished by -% means of a |\citeauthoryear| command included in the label, as -% \begin{quote} -% |\bibitem[\protect\citeauthoryear{Jones, Barker,|\\ -% | and Williams}{Jones et al.}{1990}]{jon90}...| -% \end{quote} -% Actually, this only illustrates the basic structure of |\citeauthoryear|; -% the \texttt{newapa} files go even further to replace some words and -% punctuation -% with commands. For example, the word `and' above is really -% |\betweenauthors|, something that must be defined in the \texttt{.sty} file. -% Of course, |\citeauthoryear| is also defined in that file. A -% number of different |\cite| commands are available to print out the -% citation with complete author list, with the short list, with or without -% the date, the textual or parenthetical form. -% -% Thus the |\citeauthoryear| entry in |\bibitem| is very flexible, -% permitting the style file to generate every citation form that one might -% want. It is used by a number of other styles, with corresponding -% \texttt{.sty} files. They all appear to have been inspired by -% \texttt{newapa.bst}, although they lack the extra punctuation commands. -% -% Bibliographic style files belonging to the \texttt{newapa} group include -% \begin{quote} -% \texttt{newapa}, \texttt{chicago}, \texttt{chicagoa}, \texttt{jas99}, -% \texttt{named} -% \end{quote} -% Note: the last of these, \texttt{named.bst}, uses |\citeauthoryear| in a -% slightly different manner, with only two arguments: the short list and -% year. % -% \subsection{The Harvard Family} -% The same effect is achieved by a different approach in the Harvard family -% of bibliographic styles. Here a substitute for |\bibitem| is used, as +% The \thestyle{} package is an extension to \LaTeX\ to allow author--year +% citations along with numerical citations. Standard \LaTeX\ permits only +% numerical, whereas all extensions for author--year prior to the release of +% \thestyle{} in 1993 were limited to just that. Since they normally added new +% commands (as does \thestyle{} too), documents written with them could only be +% used with numerical citations after extensive editing. +% +% The \thestyle{} package has changed that; switching from author--year to +% numerical citations is a matter of an option, with no alterations to the +% source text. It has now become part of the standard \LaTeX\ installations, +% and is supported (demanded) by many journals. It is the citation package of +% choice by most of the \LaTeX\ community, mainly because of its flexibility +% and configurability. +% +% Like all packages, it is loaded the document preamble, with possible options, +% with, e.g.\ % \begin{quote} -% |\harvarditem[Jones et al.]{Jones, Baker, and|\\ -% | Williams}{1990}{jon90}...| +% |\usepackage[sectionbib,square]{natbib}| % \end{quote} -% The accompanying interface package file is called \texttt{harvard.sty} -% and is written by Peter Williams and Thorsten Schnier. It -% defines |\harvarditem| as well as the citation commands |\cite|, for -% parenthentical, and |\citeasnoun|, for textual citations. The first -% citation uses the long author list, following ones the shorter list, if -% it has been given in the optional argument to |\harvarditem|. -% -% Bibliography styles belonging to the Harvard family are -% \begin{quote} -% \texttt{agsm}, \texttt{dcu}, \texttt{kluwer} -% \end{quote} -% -% This package has been updated for \LaTeXe, with many additions to -% add flexibility. The result is a powerful interface that should meet most -% citation needs. (It does not suppress repeated authors, though, -% as \thestyle{} does.) -% -% \subsection{The Astronomy Style} -% Apparently realizing the limitations of his \texttt{apalike} system, Oren -% Patashnik went on to develop a `true' \texttt{apa} bibliographic style, -% making use of the method already employed by an astronomy journal. This -% is actually very similar to the \texttt{newapa} label but with only the -% short list of authors: -% \begin{quote} -% |\bibitem[\protect\astroncite{Jones et al.}{1990}]{jon90}|\\ -% | ...| -% \end{quote} -% It requires the package file \texttt{astron.sty} -% or any other style that defines |\astroncite| appropriately. +% The option \texttt{sectionbib} specifies that, when used with the package +% \texttt{chapterbib}, the bibliography will appear as a section at the end of +% each chapter (Section~\ref{sec:chapbib}). The \texttt{square} option says +% that references are to be enclosed in square bracket rather than round +% parentheses. See Section~\ref{sec:opts} for a complete list of options. % -% Bibliographic styles belonging to the astronomy group are +% The document text itself begins with, e.g. % \begin{quote} -% \texttt{apa}, \texttt{astron}, \texttt{bbs}, \texttt{cbe}, -% \texttt{humanbio}, \texttt{humannat}, \texttt{jtb} +% \begin{verbatim} +% \begin{document} +% \bibliographystyle{plainnat} +% \end{verbatim} % \end{quote} +% which specifies \texttt{plainnat} to be the bibliography style used by the +% \btx\ program that generates the actual bibliography from a database. The +% style \texttt{plainnat} is the \thestyle{} version of the standard \texttt{plain} +% (numerical only) style. See Section~\ref{sec:plainnat} for other styles, or +% search the installation for \texttt{.bst} files. % -% This is as good as the |\citeauthoryear| command, although not as -% flexible since the full list of authors is missing. +% The |\bibliographystyle| command can be given anywhere in the document, but +% it makes sense to add it at the start where it can be easily identified (and +% modified). % -% \subsection{The \texttt{authordate} Style} -% Finally, I have also found some packages making use of a label command -% called |\citename| in the form +% To make a citation in the text, use % \begin{quote} -% |\bibitem[\protect\citename{Jones et al., }1990]{jon90}|\\ -% | ...| +% |\citep{jon90}| for a \emph{parenthetical} citation (Jones et al., +% 1990),\\ +% |\citet{jon90}| for a \emph{textual} one, as Jones et al. (1990). % \end{quote} -% -% This is not a good system since the author list and date are not cleanly -% separated as individual arguments, and since the punctuation is included -% in the label text. It is better to keep the punctuation fully removed, as -% part of the definitions in the \texttt{.sty} file, for complete flexibility. -% -% Bibliographic styles belonging to this group are +% Both |\citep| and |\citet| are defined by \thestyle{} and are thus not +% standard. The standard \LaTeX\ command |\cite| should be avoided, because it +% behaves like |\citet| for author--year citations, but like |\citep| for +% numerical ones. There are many other commands for other special effects +% (Section~\ref{sec:excite}). +% +% In the above examples, \texttt{jon90} is the identifying key for the +% reference, as found in the \btx\ database, or in the \texttt{thebibliography} +% environment, Section~\ref{sec:bibitem}: % \begin{quote} -% \texttt{authordate1}, \texttt{authordate2}, \texttt{authordate3}, -% \texttt{authordate4}, \texttt{aaai-named} +% \begin{verbatim} +% \begin{thebibliography}{1} +% \bibitem[Jones et al.(1990)]{jon90} +% . . . . . +% \end{thebibliography} +% \end{verbatim} % \end{quote} -% with accompanying style file \texttt{authordate1-4.sty}. -% -% \section{The \thestyle{} System} -% The form of the |\bibitem| entry that I have used for all my -% bibliographic styles is only slightly more complicated than the minimal -% one, but allows a clean separation between authors and date: +% This environment prints the actual bibliography, and the |\bibitem| commands +% link the entries to the citations via the key, here \texttt{jon90}. The key +% may be perfectly arbitrary as long as it is unique. The text in square +% brackets contains the pieces of citation information, the authors \texttt{Jones et +% al.} and the year \texttt{1990}. Note that these are two pieces of text that +% may be packaged together in several different ways, depending on the citation +% command. In fact, if numerical citations are selected, they are (almost) +% ignored and only the sequence number is used as citation. +% +% The \texttt{thebibliography} environment can be made by hand, but it is +% better and safer to let \btx\ do it. For this, one needs the +% |\bibliographystyle| command already mentioned, and near the end of the +% document: % \begin{quote} -% |\bibitem[Jones et al.(1990)]{jon90}...|\\[1ex] -% or alternatively\\[1ex] -% |\bibitem[Jones et al.(1990)Jones, Baker, |\\ -% \hspace*{2em}|and Williams]{jon90}...| +% \begin{verbatim} +% \bibliography{mybib} +% \end{document} +% \end{verbatim} % \end{quote} +% Here \texttt{mybib} is the root name of the \btx\ database file +% (\texttt{mybib.bib}) containing the data for the references needed in the +% document. % -% (One weakness of the \thestyle{} format is that it fails if the author -% list itself contains parentheses! This may be fixed up if the author list -% is grouped in curly braces.) -% -% I wanted to name the system something like `natural sciences bibliography', -% intending it to be a variant of \texttt{natsci.sty}. Since that name -% was already taken, I resorted to the rather cryptic, and definitely ugly, -% \thestyle. -% -% The \thestyle\texttt{.sty} package\footnote{Formerly called a \emph{style -% file} in the older \LaTeX~2.09 terminology.} supports not only my own -% |\bibitem| format, but also all the others described here, plus numerical -% citation modes. The additional questions of citation style (type of brackets, -% commas or semi-colons between citations) can be defined once and for all for -% each \texttt{.bst} file and need never be specified explicitly in the source -% text. The |\cite| commands and syntax are always those of \thestyle, even -% when used with a \texttt{.bst} file such as \texttt{chicago.bst} that would -% normally have a different set of commands (defined in \texttt{chicago.sty}). -% The result is a single \LaTeX{} package to handle {\em all\/} the -% bibliographic styles in a uniform manner. -% -% All the author--year bibliographic style files can also be used for -% \emph{numerical} citations, by simply selecting the mode in one of the -% ways described in Sections~\ref{sec:bibpunct} and \ref{sec:opts}. It is -% not possible to employ author-year citations with pure numerical -% \texttt{.bst} files, and never will be. -% See Section~\ref{sec:6.0} for more information. +% The rest of this document presents all the gorey details about everything +% possible with \thestyle. % % \section{Using this Package}\label{sec:usage} % @@ -774,8 +629,46 @@ numerical ones: % style files conforming to the \thestyle{} format exist, or may be generated % with my \texttt{custom-bib} (also known as \texttt{makebst}) program. % +% +% \subsection{The Syntax of the \texttt{thebibliography}} +% \label{sec:bibitem} +% +% The information on the cited author names and year are given as part of the +% |\bibitem| commands within the \texttt{thebibliography} environment. The +% \thestyle{} package expects that information to be in a certain format, which +% is maintained by the above bibliography styles. (It will also be able to +% interpret formats used by some earlier packages, such as \texttt{harvard} and +% \texttt{chicago}.) If one wishes to bypass \btx, one must make up the +% \texttt{thebibliography} oneself, such that it conforms to \thestyle. +% +% This syntax looks as follows: +% \begin{quote} +% |\bibitem[Jones et al.(1990)]{jon90}...|\\[1ex] +% or alternatively\\[1ex] +% |\bibitem[Jones et al.(1990)Jones, Baker, |\\ +% \hspace*{2em}|and Williams]{jon90}...| +% \end{quote} +% The text in square brackets contains the pieces of citation texts, the short +% author list, \texttt{Jones et al.}, the year \texttt{1990}, and the optional long +% author list \texttt{Jones, Baker and Williams}. If the long list is missing, +% the short list will be used instead. The parentheses around the year are +% \emph{not} part of the text, but merely delimit the year from the author +% lists. Round parentheses must always be used, even if square brackets are +% wanted for the citations. And there must be no space before or after the year +% parentheses, else it will become part of the author list. +% +% \medskip\noindent +% \textbf{Note:} if any single |\bibitem| entry does not conform to a syntax that +% \thestyle{} understands, it switches stubbornly to numerical mode, since it +% otherwise has no idea what the author and year texts could be. +% % \subsection{Basic Citation Commands} % +% The \thestyle{} package can be used with bibliography styles that were +% intended for other, older packages, like \texttt{harvard}. However, +% the commands described in this and the next sections are defined by +% \thestyle{} and must be used even with those other bibliography styles. +% % \DescribeMacro{\citet} % \DescribeMacro{\citep} % \iffalse @@ -998,15 +891,16 @@ with the command |\Citet| instead. Other upper case commands also exist. \end{quote} These commands also exist in starred versions for full author names. +% \medskip\noindent % \textbf{Note:} the coding for the upper casing commands is tricky and likely % buggy. It operates on the names that are stored in the |\bibitem| entry, and -% works even if old style font commands are used; however, NFSS commands will -% cause it to crash. Thus -% \begin{tabular}{ll} +% works even if old style font commands are used; however, \LaTeXe\ commands will +% cause it to crash. Thus\\ +% \begin{tabular}[t]{ll} % |\bibitem[{\it della Robbia}(1998)]{dRob98}| & is okay, but \\ % |\bibitem[\textit{della Robbia}(1998)]{dRob98}| & crashes. % \end{tabular} -% I hope to improve this situation in future. +% ^^A I hope to improve this situation in future. % % \iffalse %</notes> @@ -1086,6 +980,7 @@ hyperlinks. % Similarly, if the year is missing, it will be left blank in the |\bibitem| % entry; thus citing such a work will only produce the authors' names. % +% \medskip\noindent % \textbf{Note:} there are many other possibilities with this feature. One can % even produce citations like those of the \texttt{alpha} bibliography style, % by placing the citation code in place of the authors in the |\bibitem| entry @@ -1101,16 +996,23 @@ hyperlinks. % The special \texttt{.bst} files for \thestyle\ mentioned in % Section~\ref{sec:plainnat} have a number of extra fields compared to the % original files: \\ -% \begin{tabular}{ll} +% \begin{tabular}{lp{10.5cm}} % \texttt{ISBN} & for the ISBN number in books,\\ % \texttt{ISSN} & for the ISSN number in periodicals,\\ -% \texttt{URL} & for the Internet address of on-line documents. -% \end{tabular} -% The URL address is set in a typewriter font and often leads to line-breaking -% problems. It is advisable to load the \texttt{url} package of Donald -% Arseneau, which allows typewriter text to be broken at punctuation marks. The -% URL addresses are set with the |\url| command in this package, but if it is -% not loaded, then |\url| is defined to be |\texttt|, with no line breaks. +% \texttt{URL} & for the Internet address of online documents,\\ +% \texttt{DOI} & the \emph{Digital Object Identifier} now being used by many +% journals as a more robust alternative to URL,\\ +% \texttt{EID} & \emph{electronic ID}, a substitute for page numbers for online journals +% that also appear in print; also known as the \emph{sequence number} +% within the paper volume. +% \end{tabular}\\ +% +% Both the DOI and URL tend to be very long, causing ugly line breaks or +% sticking out into the margin. This can be avoided by loading the \texttt{url} +% package by Donald Arseneau, which allows text to be broken at punctuation +% marks without a hyphen. This package is automatically detected by \thestyle{} +% and appropriate commands redefined. URLs are printed in typewriter font, DOI +% in roman. Without the \texttt{url} package, these numbers are never broken. % % As pointed out in Section~\ref{sec:yearless}, the \texttt{KEY} field is % treated differently by \texttt{plainnat} than in \texttt{plain}. Whereas the @@ -1227,11 +1129,10 @@ into (Jones et al. 1990; and references therein). % file for the subsequent run. % % The user may add more such definitions of his own, to accommodate those -% journals and \texttt{.bst} files that he has. He may either add them to -% his local copy of \thestyle\texttt{.sty}, or better put them into a file -% named \thestyle\texttt{.cfg}. This file will be read in if it exists, +% journals and \texttt{.bst} files that he has. He should put them into a file +% named \thestyle\texttt{.cfg}, which is read in if it exists, % adding any local configurations. Thus such configurations can survive -% future updates of the package. (This is for \LaTeXe{} only.) +% future updates of the package. % % \medskip % \noindent\textbf{Note:} @@ -1263,13 +1164,13 @@ into (Jones et al. 1990; and references therein). % \subsection{Priority of Style Commands}\label{sec:priority} % The citation style (punctuation and mode) can be selected by means of the % |\bibpunct|, |\citestyle|, and predefined |\bibstyle@|\textit{bst} -% commands. They can also be selected by \LaTeXe{} options +% commands. They can also be selected by package options % (Section~\ref{sec:opts}). What happens if there are several conflicting % selections? % % The lowest priority is assigned to the predefined |\bibstyle@|\textit{bst} % commands, since they are implicit and not obvious to the user. The -% \LaTeXe{} options have the next priority. Finally, any selection by +% package options have the next priority. Finally, any selection by % |\bibpunct| and/or |\citestyle| overrides those of the other methods. % % \subsection{Other Formatting Options} @@ -1553,7 +1454,7 @@ style argument}. %<*notes> \head{Sorting and compressing citations} Do not use the \texttt{cite} package with \thestyle; rather use one of the -options \texttt{sort} or \texttt{sort\&compress}. +options \texttt{sort}, \texttt{compress}, or \texttt{sort\&compress}. These also work with author--year citations, making multiple citations appear in their order in the reference list. @@ -1643,7 +1544,7 @@ given before the first citation. % \begin{quote} |\bibitem[ABC95()]{able95}| \end{quote} % % \section{Local Configuration} -% For \LaTeXe, it is possible to add a local configuration file +% It is possible to add a local configuration file % \thestyle\texttt{.cfg}, which is read in, if it exists, at % the end of the package. It may thus contain coding to supecede that in % the package, although its main purpose is to allow the user to add his @@ -1659,12 +1560,10 @@ is read in after the main package file. %</notes> % \fi % -% \section{Options with \LaTeXe}\label{sec:opts} -% One of the new features of \LaTeXe{} is \emph{options} for the packages, -% in the same way as main styles (now called \emph{classes}) can take -% options. This package is now installed with +% \section{Package Options}\label{sec:opts} +% When a package is loaded with |\usepackage|, one can add options to select +% different features, as % \begin{quote} -% |\documentclass[..]{...}|\\ % |\usepackage[|\emph{options}|]{|\thestyle|}| % \end{quote} % \iffalse @@ -1689,6 +1588,9 @@ is read in after the main package file. which they appear in the list of references; \item[\ttfamily sort\&compress] as \texttt{sort} but in addition multiple numerical citations are compressed if possible (as 3--6, 15); +\item[\ttfamily compress] to compress without sorting, so compression only + occurs when the given citations would produce an ascending sequence of + numbers; \item[\ttfamily longnamesfirst] makes the first citation of any reference the equivalent of the starred variant (full author list) and subsequent citations normal (abbreviated list); @@ -1708,6 +1610,7 @@ is read in after the main package file. % effective. If either |\bibpunct| or |\citestyle| is given in the preamble, % the above punctuation options will no longer hold. % +% \iffalse % \section{As Module to Journal-Specific Styles} % Although \thestyle{} is meant to be an all-purpose bibliographic style % \emph{package}, it may also be incorporated as a module to other @@ -1728,10 +1631,11 @@ is read in after the main package file. % Previous options \texttt{jgr} and \texttt{grl} have become obsolete due % to revisions in these journals; they have been replaced by the more % general \texttt{agu} option. +% \fi % % \section{Reference Sheet} % -% A summarization of the main points on using \thestyle\ can be obtained by +% A summary of the main points on using \thestyle\ can be obtained by % \LaTeX{}ing the file \texttt{natnotes.tex}, which is extracted from the main % source file \thestyle\texttt{.dtx} with the \texttt{docstrip} option % \texttt{notes}. This is intended to act as a handy reference sheet. @@ -1849,7 +1753,7 @@ is read in after the main package file. % \cite commands make an automatic entry of the citation in the .idx % indexing file. For this, \makeindex must also be given in the preamble. % - % LaTeX2e Options: (for selecting punctuation) + % Package Options: (for selecting punctuation) % round - round parentheses are used (default) % square - square brackets are used [option] % curly - curly braces are used {option} @@ -1861,10 +1765,11 @@ is read in after the main package file. % super - numerical citations as superscripts % sort - sorts multiple citations according to order in ref. list % sort&compress - like sort, but also compresses numerical citations + % compress - compresses without sorting % longnamesfirst - makes first citation full author list % sectionbib - puts bibliography in a \section* instead of \chapter* % Punctuation so selected dominates over any predefined ones. - % LaTeX2e options are called as, e.g. + % Package options are called as, e.g. % \usepackage[square,comma]{natbib} %</!209> % LaTeX the source file natbib.dtx to obtain more details @@ -1897,6 +1802,7 @@ is read in after the main package file. % % \end{description} % +% \iffalse % Remove the subpack and journal stuff from documentation % This package file is intended to act as a module for other class files % written for specific journals, in which case the flexible % |\bibstyle@|{\em bst\/} commands are not wanted. Punctuation and @@ -1909,20 +1815,23 @@ is read in after the main package file. % Society}, in particular \textsl{Nonlinear Processes in Geophysics}. % % \end{description} +% \fi % % The remaining options are: % \begin{description} % \item[\ttfamily package] to produce a \texttt{.sty} package file with most % comments removed; % -% \item[\ttfamily 209] (together with \texttt{package}) for a style option -% file that will run under the older \LaTeX~2.09; +% \item[\ttfamily 209] (obsolete) to generate a \LaTeX~2.09 version of the package; +% this is no longer supported and will likely not work properly; % +% \iffalse % \item[\ttfamily subpack] (together with \texttt{package}) for coding that % is to be included inside a larger package; even more comments are % removed, as well as \LaTeXe{} option handling and identification; % produces a basic \thestyle\ package for author--year only, fixed % citation style (punctuation); +% \fi % % \item[\ttfamily notes] extracts a summary of usage to be used as a % reference sheet; the resulting file is to be \LaTeX{}ed; @@ -1935,13 +1844,168 @@ is read in after the main package file. % refuse to implement it; % % \item[\ttfamily driver] to produce a driver \texttt{.drv} file that will -% print out the documentation under \LaTeXe. The documentation cannot -% be printed under \LaTeX~2.09. +% print out the documentation when \LaTeX'd. This file can be modified +% to produce various alternatives (page size, fonts, manual only, or with +% annotated code). The \thestyle\texttt{.dtx} file is itself such a driver +% but it should never, ever be edited by a user. % % \end{description} % The source file \texttt{\filename.dtx} is itself a driver file and can % be processed directly by \LaTeXe. % +% +% \section{Other Author--Year Solutions} +% \begin{quote}\slshape +% This section is of historical interest only. +% \end{quote} +% +% Before \thestyle{} was published in 1993, there were several other attempts +% to provide author--year citations, some of which inspired \thestyle. A few of +% these are still maintained and used, and for that reason, \thestyle{} has +% attempted to include their |\bibitem| syntaxes, to be compatible with those +% \texttt{.bst} files. +% +% Most of these `packages' are really \LaTeX~2.09 style files, so do not have +% features available with the modern \LaTeXe. +% +% \subsection{The \texttt{natsci.bst} Style} +% What gave me my first inspiration was Stephen Gildea's \texttt{natsci.bst} +% for use with his \texttt{agujgr.sty} file. This showed me that the problem +% was solvable. However, Gildea's formats |\bibitem| with just +% the abbreviated +% authors and year. Thus only parenthetical citations can be accommodated. +% +% The name \texttt{natsci} stands for \emph{natural sciences}, and it was this +% that led to the name \thestyle. (This is admittedly an ugly name, but it is +% now established and cannot be changed so easily.) +% +% \subsection{The \texttt{apalike.bst} Style} +% Oren Patashnik, the originator of \btx{} and the standard \texttt{.bst} +% files, has also worked on an author--year style, called \texttt{apalike.bst} +% with a corresponding \texttt{apalike.sty} to support it. Again, only the +% parenthetical citation is provided. Its functionality is identical to that +% of the \texttt{natsci} files. +% +% The form of the \texttt{thebibliography} entries in this system is +% \begin{quote} +% |\bibitem[Jones et al., 1990]{jon90}...| +% \end{quote} +% This is the most minimal form that can +% be given. I name it the \texttt{apalike} variant, after Patashnik's +% \texttt{apalike.bst} and \texttt{apalike.sty}. However, there could be many +% independent \texttt{.bst} files that follow this line, such as the +% \texttt{natsci} styles. +% +% The bibliography style files belonging to this group include: +% \begin{quote} +% \texttt{apalike}, \texttt{apalike2}, \texttt{cea}, \texttt{cell}, +% \texttt{jmb}, \texttt{phapalik}, \texttt{phppcf}, \texttt{phrmp} +% \end{quote} +% +% \subsection{The \texttt{newapa} Style} +% A major improvement was achieved with \texttt{newapa.bst} and the +% accompanying \texttt{newapa.sty} files by Stephen N. Spencer and Young U. +% Ryu. Under their system, three separate items of information are included +% in the |\bibitem| label, to be used as required. These are: the full +% author list, the abbreviated list, and the year. This is accomplished by +% means of a |\citeauthoryear| command included in the label, as +% \begin{quote} +% |\bibitem[\protect\citeauthoryear{Jones, Barker,|\\ +% | and Williams}{Jones et al.}{1990}]{jon90}...| +% \end{quote} +% Actually, this only illustrates the basic structure of |\citeauthoryear|; +% the \texttt{newapa} files go even further to replace some words and +% punctuation +% with commands. For example, the word `and' above is really +% |\betweenauthors|, something that must be defined in the \texttt{.sty} file. +% Of course, |\citeauthoryear| is also defined in that file. A +% number of different |\cite| commands are available to print out the +% citation with complete author list, with the short list, with or without +% the date, the textual or parenthetical form. +% +% Thus the |\citeauthoryear| entry in |\bibitem| is very flexible, +% permitting the style file to generate every citation form that one might +% want. It is used by a number of other styles, with corresponding +% \texttt{.sty} files. They all appear to have been inspired by +% \texttt{newapa.bst}, although they lack the extra punctuation commands. +% +% Bibliographic style files belonging to the \texttt{newapa} group include +% \begin{quote} +% \texttt{newapa}, \texttt{chicago}, \texttt{chicagoa}, \texttt{jas99}, +% \texttt{named} +% \end{quote} +% +% \noindent +% \textbf{Note:} the last of these, \texttt{named.bst}, uses |\citeauthoryear| in a +% slightly different manner, with only two arguments: the short list and +% year. +% +% \subsection{The Harvard Family} +% The same effect is achieved by a different approach in the Harvard family +% of bibliographic styles. Here a substitute for |\bibitem| is used, as +% \begin{quote} +% |\harvarditem[Jones et al.]{Jones, Baker, and|\\ +% | Williams}{1990}{jon90}...| +% \end{quote} +% The accompanying interface package file is called \texttt{harvard.sty} +% and is written by Peter Williams and Thorsten Schnier. It +% defines |\harvarditem| as well as the citation commands |\cite|, for +% parenthentical, and |\citeasnoun|, for textual citations. The first +% citation uses the long author list, following ones the shorter list, if +% it has been given in the optional argument to |\harvarditem|. +% +% Bibliography styles belonging to the Harvard family are +% \begin{quote} +% \texttt{agsm}, \texttt{dcu}, \texttt{kluwer} +% \end{quote} +% +% This package has been updated for \LaTeXe, with many additions to +% add flexibility. The result is a powerful interface that should meet most +% citation needs. (It does not suppress repeated authors, though, +% as \thestyle{} does.) +% +% \subsection{The Astronomy Style} +% Apparently realizing the limitations of his \texttt{apalike} system, Oren +% Patashnik went on to develop a `true' \texttt{apa} bibliographic style, +% making use of the method already employed by an astronomy journal. This +% is actually very similar to the \texttt{newapa} label but with only the +% short list of authors: +% \begin{quote} +% |\bibitem[\protect\astroncite{Jones et al.}{1990}]{jon90}|\\ +% | ...| +% \end{quote} +% It requires the package file \texttt{astron.sty} +% or any other style that defines |\astroncite| appropriately. +% +% Bibliographic styles belonging to the astronomy group are +% \begin{quote} +% \texttt{apa}, \texttt{astron}, \texttt{bbs}, \texttt{cbe}, +% \texttt{humanbio}, \texttt{humannat}, \texttt{jtb} +% \end{quote} +% +% This is as good as the |\citeauthoryear| command, although not as +% flexible since the full list of authors is missing. +% +% \subsection{The \texttt{authordate} Style} +% Finally, I also found some packages making use of a label command +% called |\citename| in the form +% \begin{quote} +% |\bibitem[\protect\citename{Jones et al., }1990]{jon90}|\\ +% | ...| +% \end{quote} +% +% This is not a good system since the author list and date are not cleanly +% separated as individual arguments, and since the punctuation is included +% in the label text. It is better to keep the punctuation fully removed, as +% part of the definitions in the \texttt{.sty} file, for complete flexibility. +% +% Bibliographic styles belonging to this group are +% \begin{quote} +% \texttt{authordate1}, \texttt{authordate2}, \texttt{authordate3}, +% \texttt{authordate4}, \texttt{aaai-named} +% \end{quote} +% with accompanying style file \texttt{authordate1-4.sty}. +% % \iffalse %<notes>\end{document} % \fi @@ -1980,6 +2044,12 @@ is read in after the main package file. % \begin{macrocode} %<*package> %<*!209&!subpack> +\@ifclassloaded{agu2001}{\PackageError{natbib} + {The agu2001 class already includes natbib coding,\MessageBreak + so you should not add it explicitly} + {Type <Return> for now, but then later remove\MessageBreak + the command \protect\usepackage{natbib} from the document} + \endinput}{} \@ifclassloaded{aguplus}{\PackageError{natbib} {The aguplus class already includes natbib coding,\MessageBreak so you should not add it explicitly} @@ -1998,6 +2068,12 @@ is read in after the main package file. {Type <Return> for now, but then later remove\MessageBreak the command \protect\usepackage{natbib} from the document} \endinput}{} +\@ifclassloaded{egu}{\PackageError{natbib} + {The egu class already includes natbib coding,\MessageBreak + so you should not add it explicitly} + {Type <Return> for now, but then later remove\MessageBreak + the command \protect\usepackage{natbib} from the document} + \endinput}{} %</!209&!subpack> % \end{macrocode} % @@ -2041,7 +2117,7 @@ is read in after the main package file. %<agu>\newcommand\NAT@open{[} \newcommand\NAT@close{]} %<agu>\newcommand\NAT@sep{;} \newcommand\NAT@cmt{, } %<agu>\newcommand\NAT@aysep{,} \newcommand\NAT@yrsep{,~} -%<agu|egs>\def\NAT@sort{0} +%<agu|egs>\def\NAT@sort{0}\def\NAT@cmprs{0} %<egs>\newcommand\NAT@open{(} \newcommand\NAT@close{)} %<egs>\newcommand\NAT@sep{;} \newcommand\NAT@cmt{, } %<egs>\newcommand\NAT@aysep{,} \newcommand\NAT@yrsep{,} @@ -2143,11 +2219,16 @@ is read in after the main package file. \DeclareOption{openbib}{\NAT@openbibtrue} \DeclareOption{sectionbib}{\def\NAT@sectionbib{on}} \def\NAT@sort{0} +\def\NAT@cmprs{0} \DeclareOption{sort}{\def\NAT@sort{1}} -\DeclareOption{sort&compress}{\def\NAT@sort{2}} +\DeclareOption{compress}{\def\NAT@cmprs{1}} +\DeclareOption{sort&compress}{\def\NAT@sort{1}\def\NAT@cmprs{1}} \@ifpackageloaded{cite}{\PackageWarningNoLine{natbib} {The `cite' package should not be used\MessageBreak with natbib. Use option `sort' instead}\ExecuteOptions{sort}}{} +\@ifpackageloaded{citeref}{\PackageError{natbib} + {The `citeref' package must be loaded after natbib}% + {Move \protect\usepackage{citeref} to after \string\usepackage{natbib}}}{} \newif\ifNAT@longnames\NAT@longnamesfalse \DeclareOption{longnamesfirst}{\NAT@longnamestrue} \DeclareOption{nonamebreak}{\def\NAT@nmfmt#1{\mbox{\NAT@up#1}}} @@ -2410,6 +2491,7 @@ is read in after the main package file. % % The superscript citation prints only the following, not the preceding, % note, and then only if it is present. +% \changes{7.2}{2006 Jan 12}{Allow braces around superscripted citation} % % Use the construction |\if*#2*| to test for empty note argument. Previously % used |\relax| in place of |*| but then it turned out that if the text began @@ -2427,7 +2509,7 @@ is read in after the main package file. [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\ \fi #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup} \newcommand\NAT@citesuper[3]{\ifNAT@swa -\unskip\kern\p@\textsuperscript{#1}% +\unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close}% \if*#3*\else\ (#3)\fi\else #1\fi\endgroup} %<!209>\providecommand %<209>\@ifundefined{textsuperscript}{\newcommand @@ -2495,7 +2577,10 @@ is read in after the main package file. % The list of citation keys is in |#3|; this is sorted by |\NAT@sort@cites| % and returned in |\NAT@cite@list|. If sorting is turned off, this list is % the same as the input. If compression of numerical lists is active -% (|NAT@sort|=2) only the parenthetical output is affected. +% (|NAT@cmprs|=1) only the parenthetical output is affected. +% +% The command |\@cprwrite| is defined in the \texttt{citeref} package. +% \changes{7.2}{2006 Jan 12}{Add \texttt{citeref} support} % \begin{macrocode} %<209>\let\@firstofone\@iden %<!209>\providecommand\@firstofone[1]{#1} @@ -2508,7 +2593,8 @@ is read in after the main package file. %<!209> \@for\@citeb:=\NAT@cite@list\do %<209> \@for\@citeb:=#3\do {\edef\@citeb{\expandafter\@firstofone\@citeb}% - \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}% + \@ifundefined{@cprwrite}{}{\expandafter\@cprwrite\@citeb=}\fi \@ifundefined{b@\@citeb\@extra@b@citeb}{% %<209> {\reset@font\bf ?}\@warning %<!209> {\reset@font\bfseries?} @@ -2538,8 +2624,11 @@ is read in after the main package file. % % The hyperlink start and end are to bracket only the number; however, if % only the authors or only the year are printed, then these are bracketed. -% Numbers are not compressed if \texttt{hyperref} is loaded, since every -% reference must be present. +% With compression, only the first and last numbers in the range have a +% hyperlink (but the targets of the missing numbers lie between those two). +% \changes{7.2}{2006 Jan 12}{Separate compression and sorting flags so they +% can be used independently} +% \changes{7.2}{2006 Jan 12}{Add hyperlinks to compressed cites} % \begin{macrocode} \ifNAT@swa \ifnum\NAT@ctype>1\relax\@citea @@ -2548,7 +2637,7 @@ is read in after the main package file. %<!209> \else\NAT@alias \fi\hyper@natlinkend\else %<*!209> - \ifnum\NAT@sort>1 + \ifnum\NAT@cmprs>0 \begingroup\catcode`\_=8 \ifcat _\ifnum\z@<0\NAT@num _\else A\fi \global\let\NAT@nm=\NAT@num \else \gdef\NAT@nm{-2}\fi @@ -2558,12 +2647,17 @@ is read in after the main package file. \endgroup \ifnum\NAT@nm=\@tempcnta \ifx\NAT@last@yr\relax - \edef\NAT@last@yr{\@citea \mbox{\noexpand\citenumfont{\NAT@num}}}% + \edef\NAT@last@yr{\@citea \mbox{% + \noexpand\hyper@natlinkstart{\@citeb\@extra@b@citeb}{% + \noexpand\citenumfont{\NAT@num}}\hyper@natlinkend}}% \else - \edef\NAT@last@yr{--\penalty\@m\mbox{\noexpand\citenumfont{\NAT@num}}}% + \edef\NAT@last@yr{--\penalty\@m\mbox{% + \noexpand\hyper@natlinkstart{\@citeb\@extra@b@citeb}{% + \noexpand\citenumfont{\NAT@num}}\hyper@natlinkend}}% \fi \else - \NAT@last@yr \@citea \mbox{\citenumfont{\NAT@num}}% + \NAT@last@yr \@citea \mbox{\hyper@natlinkstart{\@citeb\@extra@b@citeb}% + {\citenumfont{\NAT@num}}\hyper@natlinkend}% \let\NAT@last@yr\relax \fi \else @@ -2602,7 +2696,7 @@ is read in after the main package file. \fi \fi }}% -%<!209> \ifnum\NAT@sort>1\relax\NAT@last@yr\fi +%<!209> \ifnum\NAT@cmprs>0\relax\NAT@last@yr\fi \ifNAT@swa\else\ifnum\NAT@ctype=0\if*#2*\else \NAT@cmt#2\fi \NAT@@close\fi\fi}{#1}{#2}} % \end{macrocode} @@ -2679,6 +2773,8 @@ is read in after the main package file. % suppressed. This is to allow to citations with a code designation without a % year. % +% The command |\@cprwrite| is defined in the \texttt{citeref} package. +% \changes{7.2}{2006 Jan 12}{Add \texttt{citeref} support} % \begin{macrocode} %<subpack>\def\@citex% %<!subpack>\newcommand\NAT@citex{} @@ -2690,7 +2786,8 @@ is read in after the main package file. %<!209> \@for\@citeb:=\NAT@cite@list\do %<209> \@for\@citeb:=#3\do {\edef\@citeb{\expandafter\@firstofone\@citeb}% - \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}% + \@ifundefined{@cprwrite}{}{\expandafter\@cprwrite\@citeb=}\fi \@ifundefined{b@\@citeb\@extra@b@citeb}{\@citea% %<209> {\reset@font\bf ?}\@warning %<!209> {\reset@font\bfseries ?}\NAT@citeundefined @@ -3093,12 +3190,14 @@ is read in after the main package file. \fi} % \end{macrocode} % +% \changes{7.2}{2006 Jan 12}{Previously |hyperref| would turn off compression; now allow this} % With the \texttt{hyperref} package, compression of numerical citations -% must be turned off. +% was turned off in earlier versions. As of 7.2, remove this constraint, and +% make the first and last numbers in the compressed range into links. % \begin{macrocode} %<*!subpack> -\AtBeginDocument{\@ifpackageloaded{hyperref}{% - \ifnum\NAT@sort=2\def\NAT@sort{1}\fi}{}} +% \AtBeginDocument{\@ifpackageloaded{hyperref}{% +% \ifnum\NAT@sort=2\def\NAT@sort{1}\fi}{}} %</!subpack> %</!209> % \end{macrocode} @@ -3711,6 +3810,7 @@ is read in after the main package file. % \changes{6.0}{1995 Sep 21}{Prevent expansion of forced space (tilde)} % Write the information to the auxiliary file as two arguments to |\bibcite|. % +% \medskip\noindent % Note: the 5 arguments are: counter, year, short list, long list, key. % The two author lists are written enclosed in braces to make sure any % font commands are kept local. Otherwise, one level of braces disappears for @@ -4381,8 +4481,8 @@ is read in after the main package file. % mode} % This feature is not provided for with \LaTeX~2.09. It does exist in the % journal subpackages, being selected by setting |\NAT@sort| accordingly: 0 -% for no sorting; 1 for sorting; 2 for sorting and compression (numerical mode -% only). +% for no sorting; 1 for sorting; compression (numerical mode only) is +% controlled with |\NAT@cmprs| being 0 (off) and 1 (on). % % The macro |\NAT@sort@cites| places the reordered list of citation keys (the % argument to |\cite|\textit{xxx}) in |\NAT@cite@list|. If sorting is turned diff --git a/Master/texmf-dist/source/latex/natbib/natbib.ins b/Master/texmf-dist/source/latex/natbib/natbib.ins index 80620f0261f..14f4c8380ae 100644 --- a/Master/texmf-dist/source/latex/natbib/natbib.ins +++ b/Master/texmf-dist/source/latex/natbib/natbib.ins @@ -1,15 +1,11 @@ % File: natbib.ins -% Copyright 1999 Patrick W. Daly +% Copyright 2006 Patrick W. Daly % -% This file can be redistributed and/or modified under the terms -% of the LaTeX Project Public License Distributed from CTAN -% archives in directory macros/latex/base/lppl.txt; either -% version 1 of the License, or any later version. -% -% It is an installation file for extracting package and driver +% This is the natbib installation file for extracting package and driver % files from the original source file. Simply process it under -% TeX or LaTeX. It works with Docstrip versions before and after -% December 1995. +% TeX or LaTeX. +% +% This installation works with docstrip 2.4 or later. \def\batchfile{natbib.ins} \input docstrip @@ -36,18 +32,6 @@ Only a few abbreviated comments remain here to describe the usage. \endpostamble \keepsilent -% Docstrip before Dec 95 does not have \generate syntax, nor -% \declarepreamble. Must redefine them. The \generateFile called -% for each output file individually. -% Docstrip before Dec 96 cannot interprete multiline \if..\fi -% Thus for maximum compatibility, have only one-line conditionals - -\let\oldDS F\relax -\expandafter\ifx\csname generate\endcsname\relax \let\oldDS T\relax\fi -\if\oldDS T \def\declarepreamble#1{\preamble}\fi -\if\oldDS T \def\declarepostamble#1{\postamble}\fi -\if\oldDS T \generateFile{natbib.sty}{f}{\from{natbib.dtx}{package,all}} \fi - \declarepreamble\refsheet ============================================= IMPORTANT NOTICE: @@ -73,8 +57,6 @@ End of Reference Sheet file \endpostamble -\ifx\oldDS T \generateFile{natnotes}{f}{\from{natbib.dtx}{notes}}\fi - \declarepreamble\driver ============================================ This is the driver file to produce the LaTeX documentation @@ -89,10 +71,6 @@ Make changes to it as needed. (Never change the file \inFileName!) End of documentation driver file. \endpostamble -\ifx\oldDS T \generateFile{natbib.drv}{f}{\from{natbib.dtx}{driver}}\fi - -\ifx\oldDS T \let\askforoverwritefalse\relax\def\generate#1{}\fi - \askforoverwritefalse \generate{\file{natbib.sty}{\from{natbib.dtx}{package,all}} \file{natnotes}{\usepreamble\refsheet\usepostamble\refsheetq diff --git a/Master/texmf-dist/tex/latex/natbib/natbib.sty b/Master/texmf-dist/tex/latex/natbib/natbib.sty index 7cfcfae2b2d..3a355adf7fe 100644 --- a/Master/texmf-dist/tex/latex/natbib/natbib.sty +++ b/Master/texmf-dist/tex/latex/natbib/natbib.sty @@ -19,15 +19,15 @@ %% Full documentation can be obtained by LaTeXing that original file. %% Only a few abbreviated comments remain here to describe the usage. %% ============================================= -%% Copyright 1993-2003 Patrick W Daly -%% Max-Planck-Institut f\"ur Aeronomie +%% Copyright 1993-2006 Patrick W Daly +%% Max-Planck-Institut f\"ur Sonnensystemforschung %% Max-Planck-Str. 2 %% D-37191 Katlenburg-Lindau %% Germany %% E-mail: daly@linmpi.mpg.de \NeedsTeXFormat{LaTeX2e}[1995/06/01] \ProvidesPackage{natbib} - [2003/06/06 7.1 (PWD)] + [2006/03/22 7.3 (PWD)] % This package reimplements the LaTeX \cite command to be used for various % citation styles, both author-year and numerical. It accepts BibTeX % output intended for many other packages, and therefore acts as a @@ -119,7 +119,7 @@ % \cite commands make an automatic entry of the citation in the .idx % indexing file. For this, \makeindex must also be given in the preamble. % - % LaTeX2e Options: (for selecting punctuation) + % Package Options: (for selecting punctuation) % round - round parentheses are used (default) % square - square brackets are used [option] % curly - curly braces are used {option} @@ -131,14 +131,21 @@ % super - numerical citations as superscripts % sort - sorts multiple citations according to order in ref. list % sort&compress - like sort, but also compresses numerical citations + % compress - compresses without sorting % longnamesfirst - makes first citation full author list % sectionbib - puts bibliography in a \section* instead of \chapter* % Punctuation so selected dominates over any predefined ones. - % LaTeX2e options are called as, e.g. + % Package options are called as, e.g. % \usepackage[square,comma]{natbib} % LaTeX the source file natbib.dtx to obtain more details % or the file natnotes.tex for a brief reference sheet. %----------------------------------------------------------- +\@ifclassloaded{agu2001}{\PackageError{natbib} + {The agu2001 class already includes natbib coding,\MessageBreak + so you should not add it explicitly} + {Type <Return> for now, but then later remove\MessageBreak + the command \protect\usepackage{natbib} from the document} + \endinput}{} \@ifclassloaded{aguplus}{\PackageError{natbib} {The aguplus class already includes natbib coding,\MessageBreak so you should not add it explicitly} @@ -157,6 +164,12 @@ {Type <Return> for now, but then later remove\MessageBreak the command \protect\usepackage{natbib} from the document} \endinput}{} +\@ifclassloaded{egu}{\PackageError{natbib} + {The egu class already includes natbib coding,\MessageBreak + so you should not add it explicitly} + {Type <Return> for now, but then later remove\MessageBreak + the command \protect\usepackage{natbib} from the document} + \endinput}{} % Define citation punctuation for some author-year styles % One may add and delete at this point % Or put additions into local configuration file natbib.cfg @@ -218,11 +231,16 @@ \DeclareOption{openbib}{\NAT@openbibtrue} \DeclareOption{sectionbib}{\def\NAT@sectionbib{on}} \def\NAT@sort{0} +\def\NAT@cmprs{0} \DeclareOption{sort}{\def\NAT@sort{1}} -\DeclareOption{sort&compress}{\def\NAT@sort{2}} +\DeclareOption{compress}{\def\NAT@cmprs{1}} +\DeclareOption{sort&compress}{\def\NAT@sort{1}\def\NAT@cmprs{1}} \@ifpackageloaded{cite}{\PackageWarningNoLine{natbib} {The `cite' package should not be used\MessageBreak with natbib. Use option `sort' instead}\ExecuteOptions{sort}}{} +\@ifpackageloaded{citeref}{\PackageError{natbib} + {The `citeref' package must be loaded after natbib}% + {Move \protect\usepackage{citeref} to after \string\usepackage{natbib}}}{} \newif\ifNAT@longnames\NAT@longnamesfalse \DeclareOption{longnamesfirst}{\NAT@longnamestrue} \DeclareOption{nonamebreak}{\def\NAT@nmfmt#1{\mbox{\NAT@up#1}}} @@ -256,7 +274,7 @@ [3]{\ifNAT@swa\NAT@@open\if*#2*\else#2\ \fi #1\if*#3*\else\NAT@cmt#3\fi\NAT@@close\else#1\fi\endgroup} \newcommand\NAT@citesuper[3]{\ifNAT@swa -\unskip\kern\p@\textsuperscript{#1}% +\unskip\kern\p@\textsuperscript{\NAT@@open#1\NAT@@close}% \if*#3*\else\ (#3)\fi\else #1\fi\endgroup} \providecommand \textsuperscript[1]{\mbox{$^{\mbox{\scriptsize#1}}$}} @@ -268,7 +286,8 @@ \@cite{\def\NAT@num{-1}\let\NAT@last@yr\relax\let\NAT@nm\@empty \@for\@citeb:=\NAT@cite@list\do {\edef\@citeb{\expandafter\@firstofone\@citeb}% - \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}% + \@ifundefined{@cprwrite}{}{\expandafter\@cprwrite\@citeb=}\fi \@ifundefined{b@\@citeb\@extra@b@citeb}{% {\reset@font\bfseries?} \NAT@citeundefined\PackageWarning{natbib}% @@ -287,7 +306,7 @@ \ifnum\NAT@ctype=2\relax\NAT@test{\NAT@ctype}% \else\NAT@alias \fi\hyper@natlinkend\else - \ifnum\NAT@sort>1 + \ifnum\NAT@cmprs>0 \begingroup\catcode`\_=8 \ifcat _\ifnum\z@<0\NAT@num _\else A\fi \global\let\NAT@nm=\NAT@num \else \gdef\NAT@nm{-2}\fi @@ -297,12 +316,17 @@ \endgroup \ifnum\NAT@nm=\@tempcnta \ifx\NAT@last@yr\relax - \edef\NAT@last@yr{\@citea \mbox{\noexpand\citenumfont{\NAT@num}}}% + \edef\NAT@last@yr{\@citea \mbox{% + \noexpand\hyper@natlinkstart{\@citeb\@extra@b@citeb}{% + \noexpand\citenumfont{\NAT@num}}\hyper@natlinkend}}% \else - \edef\NAT@last@yr{--\penalty\@m\mbox{\noexpand\citenumfont{\NAT@num}}}% + \edef\NAT@last@yr{--\penalty\@m\mbox{% + \noexpand\hyper@natlinkstart{\@citeb\@extra@b@citeb}{% + \noexpand\citenumfont{\NAT@num}}\hyper@natlinkend}}% \fi \else - \NAT@last@yr \@citea \mbox{\citenumfont{\NAT@num}}% + \NAT@last@yr \@citea \mbox{\hyper@natlinkstart{\@citeb\@extra@b@citeb}% + {\citenumfont{\NAT@num}}\hyper@natlinkend}% \let\NAT@last@yr\relax \fi \else @@ -334,7 +358,7 @@ \fi \fi }}% - \ifnum\NAT@sort>1\relax\NAT@last@yr\fi + \ifnum\NAT@cmprs>0\relax\NAT@last@yr\fi \ifNAT@swa\else\ifnum\NAT@ctype=0\if*#2*\else \NAT@cmt#2\fi \NAT@@close\fi\fi}{#1}{#2}} \newcommand\NAT@test[1]{\ifnum#1=1 \ifx\NAT@nm\NAT@noname @@ -356,7 +380,8 @@ \@cite{\let\NAT@nm\@empty\let\NAT@year\@empty \@for\@citeb:=\NAT@cite@list\do {\edef\@citeb{\expandafter\@firstofone\@citeb}% - \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}% + \@ifundefined{@cprwrite}{}{\expandafter\@cprwrite\@citeb=}\fi \@ifundefined{b@\@citeb\@extra@b@citeb}{\@citea% {\reset@font\bfseries ?}\NAT@citeundefined \PackageWarning{natbib}% @@ -502,8 +527,6 @@ \let\citefullauthor\SK@citefullauthor \let\citeyear\SK@citeyear\fi \fi} -\AtBeginDocument{\@ifpackageloaded{hyperref}{% - \ifnum\NAT@sort=2\def\NAT@sort{1}\fi}{}} \newif\ifNAT@full\NAT@fullfalse \newif\ifNAT@swa \DeclareRobustCommand\citet diff --git a/Master/texmf-dist/tpm/natbib.tpm b/Master/texmf-dist/tpm/natbib.tpm index 2c9d24b1fb9..1196effd1d2 100644 --- a/Master/texmf-dist/tpm/natbib.tpm +++ b/Master/texmf-dist/tpm/natbib.tpm @@ -3,8 +3,8 @@ <rdf:Description about="http://texlive.dante.de/texlive/Package/natbib.zip"> <TPM:Name>natbib</TPM:Name> <TPM:Type>Package</TPM:Type> - <TPM:Date>2006/01/11 23:55:28</TPM:Date> - <TPM:Version>7.0a</TPM:Version> + <TPM:Date>2006/07/15 20:53:14</TPM:Date> + <TPM:Version></TPM:Version> <TPM:Creator>rahtz</TPM:Creator> <TPM:Title>Flexible bibliography support.</TPM:Title> <TPM:Description> @@ -19,7 +19,7 @@ designed from the start to be compatible with natbib. <TPM:Author>Patrick W. Daly</TPM:Author> <TPM:Size>380771</TPM:Size> <TPM:Build/> - <TPM:RunFiles size="117748"> + <TPM:RunFiles size="118984"> texmf-dist/bibtex/bst/natbib/abbrvnat.bst texmf-dist/bibtex/bst/natbib/plainnat.bst texmf-dist/bibtex/bst/natbib/unsrtnat.bst @@ -27,12 +27,13 @@ texmf-dist/tex/latex/natbib/bibentry.sty texmf-dist/tex/latex/natbib/natbib.sty texmf-dist/tpm/natbib.tpm </TPM:RunFiles> - <TPM:DocFiles size="32938"> + <TPM:DocFiles size="218301"> texmf-dist/doc/latex/natbib/README.1st -texmf-dist/doc/latex/natbib/README.v71 +texmf-dist/doc/latex/natbib/README.v73 +texmf-dist/doc/latex/natbib/natbib.pdf texmf-dist/doc/latex/natbib/natnotes.tex </TPM:DocFiles> - <TPM:SourceFiles size="230085"> + <TPM:SourceFiles size="234075"> texmf-dist/source/latex/natbib/bibentry.drv texmf-dist/source/latex/natbib/bibentry.dtx texmf-dist/source/latex/natbib/bibentry.ins diff --git a/Master/texmf/lists/natbib b/Master/texmf/lists/natbib index 37b427b80ad..8d1ae200542 100644 --- a/Master/texmf/lists/natbib +++ b/Master/texmf/lists/natbib @@ -1,5 +1,6 @@ texmf-dist/doc/latex/natbib/README.1st -texmf-dist/doc/latex/natbib/README.v71 +texmf-dist/doc/latex/natbib/README.v73 +texmf-dist/doc/latex/natbib/natbib.pdf texmf-dist/doc/latex/natbib/natnotes.tex texmf-dist/source/latex/natbib/bibentry.drv texmf-dist/source/latex/natbib/bibentry.dtx |