From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- .../contrib/springer/svjour/stropt/natbib.dtx | 3221 ++++++++++++++++++++ 1 file changed, 3221 insertions(+) create mode 100644 macros/latex/contrib/springer/svjour/stropt/natbib.dtx (limited to 'macros/latex/contrib/springer/svjour/stropt/natbib.dtx') diff --git a/macros/latex/contrib/springer/svjour/stropt/natbib.dtx b/macros/latex/contrib/springer/svjour/stropt/natbib.dtx new file mode 100644 index 0000000000..33bdffdaca --- /dev/null +++ b/macros/latex/contrib/springer/svjour/stropt/natbib.dtx @@ -0,0 +1,3221 @@ +% \iffalse THIS IS A META-COMMENT +%<*dtx> +\ProvidesFile +%======================================================================== + {NATBIB.DTX} +%======================================================================== +% +% 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 +% (La)TeX natbib.ins: creates package file natbib.sty +% and optionally the LaTeX 2.09 style natbib209.sty +% and doc driver natbib.drv +% (natbib.ins may be edited as needed) +% Docstrip options available: +% package - to produce a (LaTeX2e) package .sty file +% driver - to produce a driver file to print the documentation +% 209 - (with package) for style file that runs under LaTeX 2.09 +% subpack - (with package) for coding included in other packages +% all - (with package) to include all author-year systems +% else individually with: +% apalike, newapa, chicago, harvard, authordate, astron +% agu - (with package,subpack) for inclusion in aguplus package +% egs- (with package,subpack) for inclusion in egs package +% nopreonly - allows \citestyle and \bibpunct to be used anywhere +%-------------------------------------------------------------------------- +%<*!subpack> +%\def\ProvidesPackage#1#2] +% {\typeout{Style option `#1'#2]}} +% +% *** Identify the package file:- +%\NeedsTeXFormat{LaTeX2e}[1994/06/01] +%\ProvidesPackage{natbib} +% +% +% *** Provide command to dislay module version +%\def\ModuleVersion#1[#2]{} +% \ModuleVersion{natbib} +% +% *** Identify the driver file:- +%\NeedsTeXFormat{LaTeX2e} +%\ProvidesFile{natbib.drv} +% +% *** The DATE, VERSION, and other INFO +%\fi +%\ProvidesFile{natbib} + [1997/02/05 6.5 (PWD)] +%\iffalse +%<*package> +%<*!subpack> +%%------------------------------------------------------------------- +%% NOTICE: +%% This file may be used for non-profit purposes. +%% It may not be distributed in exchange for money, +%% other than distribution costs. +%% +%% The author provides it `as is' and does not guarantee it in any way. +%% +% +% +%% Natbib coding copyright (C) 1994--1997 Patrick W. Daly +%<*package> +%<*!subpack> +%% Max-Planck-Institut f\"ur Aeronomie +%% Postfach 20 +%% D-37189 Katlenburg-Lindau +%% Germany +%% +%% E-mail: +%% Internet-- daly@linmpi.dnet.gwdg.de +%%----------------------------------------------------------- +% +% +% END META-COMMENT \fi +% \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 +% in \cs{cite}} +% \changes{4.1b}{1993 Oct 18}{Add \cs{bibfont} to list definition =\cs{relax}} +% \changes{4.2}{1993 Oct 22}{Add coding for AGU, NLINPROC} +% \changes{4.2}{1993 Nov 20}{Add more coding for AGU} +% \changes{4.3a}{1994 Feb 24}{First additions for \LaTeXe} +% \changes{5.0}{1994 May 18}{Revised for \LaTeXe{} and 2.09} +% \changes{5.0}{1994 May 18}{Remove obsolete JGR, GRL coding} +% \changes{5.0}{1994 May 18}{Add \cs{citeauthor}, \cs{citeyear}} +% \changes{5.0}{1994 May 18}{Two optional texts for \cs{cite} so \texttt{rev} +% option obsolete} +% \changes{5.0}{1994 May 18}{\LaTeXe\ options to select punctuation} +% \changes{5.1}{1994 Jun 22}{Conform to first official release of \LaTeXe} +% \changes{5.1}{1994 Jun 22}{Separate \LaTeX\ and 2.09 files} +% \changes{5.1}{1994 Jun 22}{Put doc driver first} +% \changes{5.2}{1994 Aug 25}{Fix up 2.09 style to run in compatibility mode} +% \changes{5.2}{1994 Aug 25}{\cs{citeauthor}, \cs{citeyear} make BibTeX +% entry in aux file} +% \changes{5.2}{1994 Aug 25}{\cs{@citex} defined as in \LaTeXe} +% \changes{5.2}{1994 Aug 25}{Local config file \texttt{natbib.cfg} read in} +% \changes{5.3}{1994 Sep 13}{Add \cs{citefullauthor}, options \texttt{angle}, +% \texttt{curly}} +% \changes{5.3}{1994 Sep 19}{Add star version of \cs{cite} for full authors} +% \changes{5.3}{1994 Sep 26}{Fix accents in citations with proper definition +% of \cs{protect}} +% \changes{5.4}{1994 Nov 24}{Add space in \cs{@citex} for text cites} +% \changes{5.4}{1994 Nov 24}{Replace \cs{if@tempswa} by \cs{ifNAT@swa}} +% \changes{5.4}{1994 Nov 24}{Add superscript citation type to \cs{bibpunct}} +% \changes{5.4}{1994 Nov 24}{Add \cs{@citesuper}, fix up bugs in superscripts} +% \changes{5.4}{1994 Nov 24}{Define \cs{@citexnum} as in \LaTeXe} +% \changes{5.4}{1995 Feb 03}{Add \cs{citestyle} same as \cs{bibstyle}} +% \changes{5.4}{1995 Feb 08}{For repeated years and authors, print just letter} +% \changes{5.5}{1995 Mar 13}{Add \cs{bibhang} and command space in +% \cs{@cite}} +% \changes{5.5}{1995 Mar 16}{Add \cs{citealt} for citation with no +% parentheses} +% \changes{5.5}{1995 Mar 24}{Reorganize internal commands, using \cs{NAT@} +% prefixes} +% \changes{5.5}{1995 Mar 24}{Punctuation selection commands \cs{bibpunct}, +% \cs{citestyle} are now preamble only, whereas previously they had to +% come after the preamble} +% \changes{5.5}{1995 May 14}{Change names of punctuation commands to +% \cs{NAT@...}} +% \changes{6.0}{1995 Sep 4}{Allow numerical styles with author-year +% \texttt{bst} files} +% \changes{6.0}{1995 Sep 21}{Add automatic indexing of citations} +% \changes{6.0}{1995 Sep 29}{Accommodate \texttt{index} package} +% \changes{6.1}{1995 Nov 22}{Fixed for \LaTeXe\ \texttt{1995/12/01}} +% \changes{6.1}{1995 Dec 4}{Make more robust against changes to internals} +% \changes{6.1a}{1995 Dec 19}{Fix test for changed citations} +% \changes{6.2}{1996 Jan 10}{Replace all \cs{uppercase}} +% \changes{6.2}{1996 Jan 11}{Add \cs{citet}} +% \changes{6.2}{1996 Feb 2}{Fix superscript size} +% \changes{6.2}{1996 Mar 05}{Add length \cs{bibsep} for linespacing between +% references} +% \changes{6.2}{1996 Apr 15}{Fix clash with \texttt{amsart} and +% \texttt{amsbook}} +% \changes{6.3}{1996 Jun 10}{Allow \texttt{showkeys} to be loaded first} +% \changes{6.3}{1996 Jun 17}{Fix punctuation for \texttt{plainnat}} +% \changes{6.3}{1996 Jun 17}{Suppress extra labels with numericals} +% \changes{6.4}{1996 Jun 18}{Provide \cs{bibname} and \cs{refname}} +% \changes{6.4}{1996 Jun 27}{Change \texttt{nlinproc} option to \texttt{egs}} +% \changes{6.4}{1996 Sep 1}{Make compatible with \texttt{chapterbib.sty}} +% \changes{6.4}{1996 Sep 12}{Fix spacing for superscripts} +% \changes{6.4}{1996 Sep 12}{Extra letter printed with \cs{citeyear}} +% \changes{6.4}{1996 Sep 13}{Add compression and sorting of numerical citations} +% \changes{6.4}{1996 Oct 2}{Make compatible with \texttt{hyperref.sty}} +% \changes{6.5}{1996 Dec 11}{KOMA script compatibility} +% \changes{6.5}{1997 Jan 10}{For EGS, no blank line between references} +% \changes{6.5}{1997 Jan 30}{Recode notes so they work with \cs{citet} and +% \cs{citep}; change documentation to stress these commands over \cs{cite}} +% \changes{6.5}{1997 Feb 5}{Fix KOMA script properly} +% +% \CheckSum{1706} +% \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 +% Digits \0\1\2\3\4\5\6\7\8\9 +% Exclamation \! Double quote \" Hash (number) \# +% Dollar \$ Percent \% Ampersand \& +% Acute accent \' Left paren \( Right paren \) +% Asterisk \* Plus \+ Comma \, +% Minus \- Point \. Solidus \/ +% Colon \: Semicolon \; Less than \< +% Equals \= Greater than \> Question mark \? +% Commercial at \@ Left bracket \[ Backslash \\ +% Right bracket \] Circumflex \^ Underscore \_ +% Grave accent \` Left brace \{ Vertical bar \| +% Right brace \} Tilde \~} +% +% \iffalse +%<*install> +%^^A ============================================= +%^^A Here is the docstrip installation file +%^^A It is written on first LaTeX run +%^^A ============================================= +\begin{filecontents}{natbib.ins} +% Simply TeX or LaTeX this file to extract various files from +% the source file `natbib.dtx' +% Comment out the \generateFile lines for any files you do not want. + +\def\batchfile{natbib.ins} +\input docstrip + +\preamble + +Only a few abbreviated comments remain here to describe the usage. + +\endpreamble +\postamble +<<<<< End of decommented file <<<<<< +\endpostamble +\keepsilent + +\generateFile{natbib.sty}{f}{\from{natbib.dtx}{package,all}} + +\preamble + +This is the LaTeX 2.09 version of the package. +It will not be maintained forever. +Please upgrade to LaTeX2e so that you may use the proper package. + +Only a few abbreviated comments remain here to describe the usage. + +\endpreamble + +% Activate the next line to get a version for running under LaTeX 2.09 +%\generateFile{natbib209.sty}{f}{\from{natbib.dtx}{package,all,209}} + +\preamble + +This is the driver file to produce the LaTeX documentation from the +source file \inFileName. +Make changes to it as needed. (Never change the \inFileName file!) +\endpreamble +\postamble + +End of documentation driver file. +\endpostamble + +% Activate the next line for a documentation driver +% that you can configure yourself. +%\generateFile{natbib.drv}{f}{\from{natbib.dtx}{driver}} + +\obeyspaces +\Msg{*******************************************}% +\Msg{* For documentation, process natbib.dtx *}% +\Msg{* or the driver file natbib.drv *}% +\Msg{* (LaTeX2e only!) *}% +\Msg{*******************************************} +\end{filecontents} +% +%<*driver> +\documentclass{ltxdoc} +%%\documentclass[twoside]{ltxdoc} +%%\documentclass[a4paper]{ltxdoc} +%%\documentclass[twoside,a4paper]{ltxdoc} +\raggedbottom + + %** To include the detailed explanation of the coding, comment out + %** the next line +\OnlyDescription + + %** To produce a command index: add the following line for one run, + %** then run makeindex -s gind.ist natbib + %** and reprocess, with or without this line (much faster without) +%% \EnableCrossrefs\CodelineIndex + + %** To produce a change history: add the following line for one run, + %** then run makeindex -s gglo.ist -o natbib.gls natbib.glo + %** and reprocess, with or without this line (faster without) +%% \RecordChanges + +\DisableCrossrefs %May stay; zapped by \EnableCrossrefs +\CodelineNumbered %May stay + +\begin{document} + \DocInput{natbib.dtx} +\end{document} +% +%\fi +% +% \DoNotIndex{\begin,\CodelineIndex,\CodelineNumbered,\def,\DisableCrossrefs} +% \DoNotIndex{\DocInput,\documentclass,\EnableCrossrefs,\end,\GetFileInfo} +% \DoNotIndex{\NeedsTeXFormat,\OnlyDescription,\RecordChanges,\usepackage} +% \DoNotIndex{\ProvidesClass,\ProvidesPackage,\ProvidesFile,\RequirePackage} +% \DoNotIndex{\LoadClass,\PassOptionsToClass,\PassOptionsToPackage} +% \DoNotIndex{\DeclareOption,\CurrentOption,\ProcessOptions,\ExecuteOptions} +% \DoNotIndex{\AtEndOfClass,\AtEndOfPackage,\AtBeginDocument,\AtEndDocument} +% \DoNotIndex{\InputIfFileExists,\IfFileExists,\ClassError,\PackageError} +% \DoNotIndex{\ClassWarning,\PackageWarning,\ClassWarningNoLine} +% \DoNotIndex{\PackageWarningNoLine,\ClassInfo,\PackageInfo,\MessageBreak} +% \DoNotIndex{\space,\protect,\DeclareRobustCommand,\CheckCommand} +% \DoNotIndex{\newcommand,\renewcommand,\providecommand,\newenvironment} +% \DoNotIndex{\renewenvironment,\newif,\newlength,\newcounter,\setlength} +% \DoNotIndex{\setcounter,\if,\ifx,\ifcase,\ifnum,\ifdim,\else,\fi} +% \DoNotIndex{\texttt,\textbf,\textrm,\textsl,\textsc,\reset@font} +% \DoNotIndex{\textup,\textit,\textmd,\textsf,\emph,\futurelet} +% \DoNotIndex{\ttfamily,\rmfamily,\sffamily,\mdseries,\bfseries,\upshape} +% \DoNotIndex{\slshape,\scshape,\itshape,\em,\LaTeX,\LaTeXe} +% \DoNotIndex{\filename,\fileversion,\filedate,\let,\makeindex} +% \DoNotIndex{\@auxout,\@for,\@gobble,\@ifnextchar,\@m,\@mkboth,\@nil} +% \DoNotIndex{\@noitemerr,\@tempa,\@tempswafalse,\@tempswatrue,\@warning} +% \DoNotIndex{\advance,\arabic,\AtBeginDocument,\bf,\bibname,\chapter} +% \DoNotIndex{\citation,\clubpenalty,\CodelineNumbered,\csname} +% \DoNotIndex{\DisableCrossrefs,\do,\edef,\else,\endcsname,\endlist} +% \DoNotIndex{\expandafter,\fi,\gdef,\global,\hbox,\hfill,\hskip,\hspace} +% \DoNotIndex{\if,\if@filesw,\if@tempswa,\ifx,\immediate,\itemindent,\labelsep} +% \DoNotIndex{\labelwidth,\lastskip,\leftmargin,\list,\mbox,\newblock} +% \DoNotIndex{\newpage,\p@enumiv,\parindent,\penalty,\refname} +% \DoNotIndex{\relax,\section,\settowidth,\sfcode,\sloppy,\small,\string} +% \DoNotIndex{\theenumiv,\thepage,\unskip,\uppercase,\usecounter,\vskip} +% \DoNotIndex{\widowpenalty,\write,\xdef,\z@,\catcode,\ifnum,\the} +% \DoNotIndex{\.,\@empty,\@ifundefined,\@latex@warning,\@minus,\@plus,\ } +% \DoNotIndex{\document,\@namedef,\@listi} +% \DoNotIndex{\listparindent,\noexpand,\par,\parsep,\pb,\pbf,\pbfseries} +% \DoNotIndex{\pc,\pd,\pem,\pit,\pitshape,\pmdseries,\prm,\prmfamily,\psc} +% \DoNotIndex{\pscshape,\psf,\psffamily,\psl,\pslshape,\ptt,\pttfamily} +% \DoNotIndex{\pupshape,\@iden,\@firstofone,\@unexpandable@protect} +% \DoNotIndex{\&,\{,\},\bibitem,\bibindent,\if@draft,\typeout} +% \DoNotIndex{\@ifclassloaded,\@ifstar,\@onlypreamble,\@preamblecmds} +% \DoNotIndex{\addtolength,\endinput,\@bsphack,\begingroup,\@wrindex} +% \DoNotIndex{\@listctr,\bibname,\enddocument,\hfil,\ignorespaces,\item} +% \DoNotIndex{\NAT@temp,\refname,\stepcounter,\@ifpackageloaded} +% \DoNotIndex{\@gobbletwo,\index,\itemsep,\markright,\scriptsize} +% \DoNotIndex{\textsuperscript} +% +% \setcounter{IndexColumns}{2} +% \setlength{\IndexMin}{10cm} +% \setcounter{StandardModuleDepth}{1} +% +% \hyphenation{par-en-the-ti-cal} +% +% \GetFileInfo{natbib} +% +% \title{{\bfseries Natural Sciences Citations and References}\\ +% (Author--Year and Numerical Schemes)} +% +% \author{Patrick W. Daly} +% +% \date{This paper describes package \texttt{\filename}\\ +% version \fileversion{} from \filedate\\[1ex] +%^^A \textsl{It is part of the \texttt{preprint} collection of packages}\\ +% \textbf{It is intended for \LaTeXe} +% \\ (but does include a variant for \LaTeX~2.09) +% } +% +% \maketitle +% +% \pagestyle{myheadings} +% \markboth{P. W. Daly}{NATURAL SCIENCES CITATIONS AND REFERENCES} +% +% \newcommand{\btx}{\textsc{Bib}\TeX} +% \newcommand{\thestyle}{\texttt{\filename}} +% +%^^A In order to keep all marginal notes on the one (left) side: +%^^A (otherwise they switch sides disasterously with twoside option) +% \makeatletter \@mparswitchfalse \makeatother +% +% \begin{abstract} +% Journals in the natural sciences tend to use the author--year style of +% literature citations, in contrast to the numerical style supported by +% \LaTeX{} and \btx. A number of contributed packages exist to accommodate this +% citation mode, but each one is tailored to a limited number of \btx\ style +% (\texttt{.bst} files. The reason is that each one reads in the author--year +% information in different formats for the |\bibitem| commands. +% In contrast, +% the \thestyle{} package supports not only the various author--year +% bibliography styles, but also those for standard numerical citations. In +% fact, it can also produce numerical citations even with an author--year +% bibliographic style, something that permits easy switching between the +% two citation modes. To this end, replacements for the standard +% \LaTeX\ \texttt{.bst} files are also provided. +% +% It is possible to define the citation \emph{style} (type of brackets and +% punctuation between citations) and even to associate it with the name of the +% bibliographic style so that it is automatically activated. Citation 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{index}, \texttt{showkeys}, +% \texttt{chapterbib}, \texttt{hyperref}, +% 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). +% +% The \thestyle\ package therefore acts as a single, flexible interface for +% most of the available bibliographic styles. +% +% \end{abstract} +% +% \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 +% \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 have 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}. +% +% \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: +% \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} +% +% (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 use of |\cite| is the same for all citation styles, meaning that the +% additional features that might be available in the `proper' \texttt{.sty} +% file will be missing. (This could be changed later.) The result is a +% single \LaTeX{} package to handle {\em all\/} the bibliographic +% styles in a uniform manner. +% +% As of version 5.1 (1994 June 22), the source file contains coding for a +% \LaTeXe{} package file (the new standard) as well as that for an older +% \LaTeX~2.09 style option file. The latter is extracted with the +% \texttt{docstrip} option \texttt{209}. +% +% \begin{quote}\slshape +% \textbf{New to version 6.0}: (1995 Sep 29) \\ +% In previous versions, each \texttt{.bst} file was either numerical or +% author--year only. Applying the wrong mode led to grotesque results, and +% the mode could not always be selected automatically. With version~6.0, +% 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. +% \end{quote} +% +% \section{Using this Package}\label{sec:usage} +% +% In this paper, I distinguish between the citation \emph{mode} (author--year +% or numerical) and citation \emph{style} (the type of punctuation used for +% citations). The citation style is something that is independent of the +% bibliography style and is not programmed in the \texttt{.bst} files. +% +% \subsection{Basic Citation Commands} +% +% \DescribeMacro{\citet} +% \DescribeMacro{\citep} +% The \thestyle{} package has two basic citation commands, |\citet| and +% |\citep| for \emph{textual} and \emph{parenthetical} citations, respectively. +% There also exist the starred versions |\citet*| and |\citep*| that print +% the full author list, and not just the abbreviated one. +% All of these may take one or two optional arguments to add some text before +% and after the citation. +% \begin{quote} +% \begin{tabular}{l@{\quad$\Rightarrow$\quad}l} +% |\citet{jon90}| & Jones et al. (1990)\\ +% |\citet[chap.~2]{jon90}| & Jones et al. (1990, chap.~2)\\[0.5ex] +% |\citep{jon90}| & (Jones et al., 1990)\\ +% |\citep[chap.~2]{jon90}| & (Jones et al., 1990, chap.~2)\\ +% |\citep[see][]{jon90}| & (see Jones et al., 1990)\\ +% |\citep[see][chap.~2]{jon90}| & (see Jones et al., 1990, chap.~2)\\[0.5ex] +% |\citet*{jon90}| & Jones, Baker, and Williams (1990)\\ +% |\citep*{jon90}| & (Jones, Baker, and Williams, 1990) +% \end{tabular} +% \end{quote} +% The starred versions can only list the full authors if the \texttt{.bst} +% file supports this feature; otherwise, the abbreviated list is printed. +% +% In standard \LaTeX, the |\cite| command can only take a single optional +% text for a note after the citation; here, a single optional text is a +% post-note, while two are the pre- and post-note. To have only a pre-note, it +% is necessary to provide an empty post-note text, as shown above. +% +% Multiple citations may be made as usual, by including more than one +% citation key in the |\cite| command argument. \textsl{If adjacent citations +% have the same author designation but different years, then the author +% names are not reprinted.} +% \begin{quote} +% \begin{tabular}{l@{\quad$\Rightarrow$\quad}l} +% |\citet{jon90,jam91}| & Jones et al. (1990); James et al. (1991)\\ +% |\citep{jon90,jam91}| & (Jones et al., 1990; James et al. 1991)\\ +% |\citep{jon90,jon91}| & (Jones et al., 1990, 1991)\\ +% |\citep{jon90a,jon90b}| & (Jones et al., 1990a,b) +% \end{tabular} +% \end{quote} +% +% These examples are for author--year citation mode. In numerical mode, the +% results are different. +% \begin{quote} +% \begin{tabular}{l@{\quad$\Rightarrow$\quad}l} +% |\citet{jon90}| & Jones et al. [21]\\ +% |\citet[chap.~2]{jon90}| & Jones et al. [21, chap.~2]\\[0.5ex] +% |\citep{jon90}| & [21]\\ +% |\citep[chap.~2]{jon90}| & [21, chap.~2]\\ +% |\citep[see][]{jon90}| & [see 21, 1990]\\ +% |\citep[see][chap.~2]{jon90}| & [see 21, chap.~2]\\[0.5ex] +% |\citep{jon90a,jon90b}| & [21, 32] +% \end{tabular} +% \end{quote} +% The authors can only be listed if the \texttt{.bst} file supports +% author--year citations. The standard \texttt{.bst} files, such as +% \texttt{plain.bst} are numerical only and transfer no author--year +% information to \LaTeX. In this case, |\citet| prints ``\textbf{(author?)} +% [21].'' +% +% {\slshape Do not use multiple citations with the |\citet| command in +% numerical mode!} +% +% \DescribeMacro{\cite} +% In the original versions of \thestyle, the traditional |\cite| command was +% used for both textual and parenthetical citations. The presence of an empty +% optional text in square brackets signaled parenthetical. This syntax has been +% retained for compatibility, but is no longer encouraged. +% +% This means that |\cite| (without notes) is the same as |\citet| in +% author--year mode, whereas in numerical mode, it is the same as |\citep|. +% The starred version, as well as the one or two optional notes, may also be +% used. +% +% \subsection{Extended Citation Commands} +% +% \DescribeMacro{\citealt} +% As an alternative form of citation, |\citealt| is the same as |\citet| +% but \emph{without any parentheses}. Multiple references and the +% starred variant also exist. +% \begin{quote} +% \begin{tabular}{l@{\quad$\Rightarrow$\quad}l} +% |\citealt{jon90}| & Jones et al. 1990\\ +% |\citealt*{jon90}| & Jones, Baker, and Williams 1990\\ +% |\citealt{jon90,jam91}| & Jones et al. 1990; James et al. 1991 +% \end{tabular} +% \end{quote} +% +% \DescribeMacro{\citeauthor} +% \DescribeMacro{\citeyear} +% \DescribeMacro{\citefullauthor} +% In author--year schemes, it is sometimes desirable to be able to refer to +% the authors without the year, or vice versa. This is provided with three +% extra commands +% \begin{quote} +% \begin{tabular}{l@{\quad$\Rightarrow$\quad}l} +% |\citeauthor{jon90}| & Jones et al.\\ +% |\citefullauthor{jon90}| & Jones, Baker, and Williams\\ +% |\citeyear{jon90}| & 1990 +% \end{tabular} +% \end{quote} +% If the full author information is missing, then |\citefullauthor| is +% the same as |\citeauthor|, printing only the abbreviated list. +% This also applies to the starred versions of |\citet| and |\citep|. +% +% If the author or year information is missing (as is the case with the +% standard \LaTeX{} \texttt{.bst} files), these commands issue a warning. +% +% As of version~6.0, these commands may also be used with numerical +% citations, provided an author--year \texttt{.bst} file is being employed. +% +% The native \thestyle{} form of the |\bibitem| entry now +% also supports the full author list. +% +% \textsl{Multiple citations are \emph{not} allowed with these commands.} +% +% \subsection{Selecting Citation Punctuation}\label{sec:bibpunct} +% +% \DescribeMacro{\bibpunct} +% The above examples have been printed with the default citation style. +% It is possible to change this, as well as to select numerical or +% author--year mode, by means of the |\bibpunct| command, which takes +% one optional and 6 mandatory arguments. The mandatory ones are: +% \begin{enumerate} +% \item the opening bracket symbol, default = ( +% \item the closing bracket symbol, default = ) +% \item the punctuation between multiple citations, default = ; +% \item the letter `n' for numerical style, or `s' for numerical superscript +% style, any other letter for +% author--year, default = author--year; note, it is not necessary to +% specify which author--year interface is being used, for all will be +% recognized; +% \item the punctuation that comes between the author names and the year +% (parenthetical case only), default = , +% \item the punctuation that comes between years when common author lists +% are suppressed (default = ,); if both authors and years are common, +% the citation is printed as `1994a,b', but if a space is wanted between +% the extra letters, then include the space in the argument, as |{,~}|. +% \end{enumerate} +% +% The optional argument is the character preceding a post-note, default is a +% comma. +% +% The |\bibpunct| command must be issued in the preamble, that is, +% before |\begin{document}|. (\textbf{Note:} in versions 5.4 or earlier, this +% declaration had to be given after the preamble!) +% +% Example~1, |\bibpunct{[}{]}{,}{a}{}{;}| changes the output of +% \begin{quote} +% |\citep{jon90,jon91,jam92}| +% \end{quote} +% into [Jones et al. 1990; 1991, James et al. 1992]. +% +% Example~2, |\bibpunct[;]{(}{)}{,}{a}{}{;}| changes the output of +% \begin{quote} +% |\citep[and references therein]{jon90}| +% \end{quote} +% into (Jones et al. 1990; and references therein). +% +% \DescribeMacro{\bibstyle@xxx} +% Usually the citation style is determined by the journal +% for which one is writing, and is as much a part of the bibliography style +% as everything else. The \thestyle{} package allows +% punctuation definitions to be directly coupled to the +% |\bibliographystyle| command that must always be present when \btx{} is +% used. It is this command that selects the \texttt{.bst} file; by adding such +% a coupling to \thestyle{} for every \texttt{.bst} file that one might +% want to use, it is not necessary to add |\bibpunct| explicitly in the +% document itself, unless of course one wishes to override the preset +% values. +% +% Such a coupling is achieved by defining a command |\bibstyle@|{\em bst}, +% where {\em bst\/} stands for the name of the \texttt{.bst} file. For example, +% the American Geophysical Union (AGU) demands in its publications that +% citations be made with square brackets and separated by semi-colons. I +% have an \texttt{agu.bst} file to accomplish most of the formatting, but such +% punctuations are not included in it. Instead, \thestyle{} has the +% definition +% \begin{quote} +% |\newcommand{\bibstyle@agu}{\bibpunct{[}{]}{;}{a}{,}{,~}}| +% \end{quote} +% +% These style defining commands may contain more than just |\bibpunct|. +% Some numerical citation scheme require even more changes. For example, +% the journal \textsl{Nature} not only uses superscripted numbers for +% citations, it also prints the numbers in the list of references without +% the normal square brackets. To +% accommodate this, \thestyle{} contains the style definition +% \begin{quote}\begin{verbatim} +% \newcommand{\bibstyle@nature}{\bibpunct{}{}{,}{s}{}{}% +% \gdef\NAT@biblabelnum##1{##1.}} +% \end{verbatim} +% \end{quote} +% The redefined |\NAT@biblabelnum| command specifies how the reference numbers +% are to be formatted in the list of references itself. +% The redefinition must be made with |\gdef|, not |\def| or +% |\renewcommand|. +% +% The selected punctuation style and other redefinitions will not be in +% effect on the first \LaTeX{} run, for they are stored to the auxiliary +% 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, +% adding any local configurations. Thus such configurations can survive +% future updates of the package. (This is for \LaTeXe{} only.) +% +% \medskip +% \noindent\textbf{Note:} +% with version~6.0, any explicit call to |\bibpunct| has priority over the +% predefined citation styles. +% +% \DescribeMacro{\citestyle} +% A preprogrammed citation style is normally invoked by the command +% |\bibliographystyle|, as described above. However, it may be that +% one wants to apply a certain citation style to another bibliography +% style. This may be done with |\citestyle|, given \emph{before} +% |\begin{document}|. For example, to use the +% \texttt{plain} bibliography style (for the list of references) with the +% \textsl{Nature} style of citations (superscripts), +% \begin{quote} +% |\documentclass{article}|\\ +% |\usepackage{|\thestyle|}|\\ +% |. . . . .|\\ +% |\citestyle{nature}|\\ +% |\begin{document}|\\ +% |\bibliographystyle{plain}|\\ +% |. . . . .| +% \end{quote} +% +% \noindent +% \textbf{Note:} for versions 5.5 and later, all changes to the citation +% style, including punctuation, must be made before |\begin{document}|, +% which freezes the citation style. +% +% \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 +% (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 +% |\bibpunct| and/or |\citestyle| overrides those of the other methods. +% +% \subsection{Other Formatting Options} +% +% \DescribeMacro{\bibsection} +% The list of references normally appears as a |\section*| or |\chapter*|, +% depending on the main class. If one wants to redesign one's own heading, +% say as a numbered section with |\section|, then |\bibsection| may be +% redefined by the user accordingly. +% +% \DescribeMacro{\bibfont} +% The list of references is normally printed in the same font size and +% style as the main body. However, it is possible to define |\bibfont| +% to be font commands that are in effect within the \texttt{thebibliography} +% environment. +% +% \DescribeMacro{\bibhang} +% The list of references for author--year styles uses a hanging indentation +% format: the first line of each reference is flush left, the following lines +% are set with an indentation from the left margin. This indentation is 1~em +% by default but may be changed by redefining (with |\setlength|) the +% length parameter |\bibhang|. +% +% \DescribeMacro{\bibsep} +% The vertical spacing between references in the list, whether author--year +% or numerical, is controlled by the length |\bibsep|. If this is set to +% 0~pt, there is no extra line spacing between references. The default +% spacing depends on the font size selected in |\documentclass|, and is +% almost a full blank line. Change this by redefining |\bibsep| with +% |\setlength| command. +% +% \subsection{Automatic Indexing of Citations} +% +% (New to version 6.0; applies to \LaTeXe\ only)\\[1ex] +% \DescribeMacro{\citeindextrue} +% \DescribeMacro{\citeindexfalse} +% If one wishes to have the citations entered in the \texttt{.idx} indexing +% file, it is only necessary to issue |\citeindextrue| at any point in the +% document. All following |\cite| commands, of all variations, then insert +% the corresponding entry to that file. With |\citeindexfalse|, these +% entries will no longer be made. +% +% The |\bibitem| commands in the \texttt{thebibliography} environment will +% also make index entries. If this is not desired, then issue +% |\citeindexfalse| before |\bibliography| or |\begin{thebibliography}|. +% +% Of course, |\makeindex| must also be issued in the preamble to activate +% indexing, as usual. Otherwise, no indexing is done at all. +% +% Make sure that the document has been processed at least twice after the +% last \btx\ run before running the \texttt{makeindex} program. +% +% \DescribeMacro{\NAT@idxtxt} +% The form of the index entries is set by the internal |\NAT@idxtxt|, which +% can be redefined by hackers if wanted (in the \thestyle\texttt{.cfg} file +% please). By default, it prints the short author list plus date in the +% current parenthesis style. +% +% The \thestyle\ package can also be used with the \texttt{index} package of +% David~M. Jones. The order in which the packages are loaded is not +% important. +% +% \DescribeMacro{\citeindextype} +% In that package, multiple index lists may be made by means of a |\newindex| +% command. For example, it may be desirable to put all the citation indexing +% into a separate list. First that list must be initiated with, e.g., +% \begin{quote} +% |\newindex{cite}{ctx}{cnd}{List of Citations}| +% \end{quote} +% and then the automatic citation indexing associated with this list with the +% \thestyle\ command +% \begin{quote} +% |\renewcommand{\citeindextype}{cite}| +% \end{quote} +% See the documentation for \texttt{index.sty} for details. +% +% \subsection{Hyper\TeX\ Compatibility} +% As of version~6.4, \thestyle\ is compatible with the \texttt{hyperref} +% package of Sebastian Rahtz and Yannis Haralambous, for use with +% Hyper\TeX. The compatibility is of a mutual nature: both packages contain +% coding that interact with that of the other. Thus the version of +% \texttt{hyperref} must be more recent than 1996 Oct~8. +% ^^A Update the date when it is better known, after checking with Rahtz. +% +% \subsection{Multiple Bibliographies in One Document}\label{sec:chapbib} +% +% As of version 6.4, \thestyle\ is compatible with the \texttt{chapterbib} +% package of Donald Arseneau and Niel Kempson,\relax +% \footnote{I have used version 1.5 from 1995/10/09; cannot guarantee +% earlier versions.} +% which makes it possible to have several +% bibliographies in one document. The usual application is to have +% bibliographies in each chapter of a book, especially if they have been +% written by different authors. +% +% The \texttt{chapterbib} package works in a very natural way for the +% author; only the editor who puts all the chapters together into one book +% has to do some extra work. +% +% The package makes use of the |\include| command, and it is in fact every +% |\include|d file that has its own bibliography. For large books, it makes +% very good sense to take advantage of this feature in any case. +% +% To review the use of |\include|, recall that the main file +% \begin{verbatim} +% \documentclass{...} +% \includeonly{ch2} +% \begin{document} +% \include{ch1} +% \include{ch2} +% \include{ch3} +% \end{document} +% \end{verbatim} +% will process only the file \texttt{ch2.tex} as though the files +% \texttt{ch1.tex} and \texttt{ch3.tex} were also present. That is, all +% counters, especially the page and section numbers, as well as +% cross-referencing definitions, will function as if the whole document +% were processed. The trick is that each |\include|d file has it own +% \texttt{.aux} file containing these definitions, and they are all read +% in every time, even if the corresponding \texttt{.tex} file is not. The +% \texttt{.aux} files also contain the citation information for \btx, +% something that the \texttt{chapterbib} package exploits. +% +% If |\usepackage{chapterbib}| has been given, the keys in each |\cite| +% and |\bibitem| command are associated with the current |\include|d file +% and are distinguished from the identical key in a different file. Each of +% these files must contain its own |\bibliography| and |\bibliographystyle| +% commands. One processes \btx\ on each file separately before processing +% it under \LaTeX\ (at least twice). +% +% \subsubsection{Special Considerations for \thestyle\ and +% \texttt{chapterbib}} +% +% The order in which the \texttt{chapterbib} and \thestyle\ packages are loaded +% is unimportant. +% +% The \texttt{chapterbib} package provides an option \texttt{sectionbib} +% that puts the bibliography in a |\section*| instead of |\chapter*|, +% something that makes sense if there is a bibliography in each chapter. +% This option will not work when \thestyle\ is also loaded; instead, add +% the option to \thestyle. (The \texttt{sectionbib} option can always be +% given, but it only has meaning for the \texttt{book} and \texttt{report} +% classes, or for classes derived from them.) +% +% Every |\include|d file (with citations) must contain its own +% |\bibliography| command where the bibliography is to appear. The database +% files listed as arguments to this command can be different in each file, +% of course. However, what is not so obvious, is that each file must also +% contain a |\bibliographystyle| command, \emph{preferably with the same +% style argument}. If different bibliography styles are specified for +% different files, then the preprogrammed citation style (punctuation and +% citation mode) will be that of the first bibliography style given. The +% preprogrammed citation styles can only be changed in the preamble (see +% Section~\ref{sec:priority}), something that guarantees a uniform style +% for the entire document.\relax +% \footnote{It would be relatively easy to allow changes in style anywhere +% in the document, but this strikes me as bad policy. However, it is +% provided for with the \texttt{docstrip} option \texttt{nopreonly}.} +% +% \subsection{Sorting and Compressing Numerical Citations} +% +% Another package by Donald Arseneau, \texttt{cite.sty}, reimplements the +% entire (numerical) citation system such that one can control the +% punctuation and citation format, all of which is done by \thestyle\ as +% well. However, it also can sort and compress numerical citations, +% something that is required by some journals. +% +% What this means is that when multiple citations are given with a single +% |\cite| command, the normal order of the numbers is in the sequence +% given. This is usually a wild list of numbers, such as [4,2,8,3]. With +% the \texttt{cite} package, this list becomes [2--4,8]. +% +% It is impossible to make the \texttt{cite} and \thestyle\ packages +% compatible, since both reimplement |\cite| from scratch. Instead, I have +% taken the necessary coding from \texttt{cite.sty} and modified it for +% \thestyle{}. This coding becomes activated +% by including the option \texttt{sort} in the |\usepackage| command. +% It only affects numerical +% citations, and has no influence on the author--year ones. +% +% \section{Numerical Citations with Author--Year Styles}\label{sec:6.0} +% +% (New to version 6.0)\\[1ex] +% In earlier versions, each \texttt{.bst} file could be used either for +% numerical or author--year citation mode, without any possibility of +% switching. Obviously numerical \texttt{.bst} files can never be used for +% author--year citations (the information is missing in the auxiliary file) +% but there is no reason why the converse should not work. +% +% I have been frequently asked if I could implement this feature, and I at +% first replied that it would be quite easy. That was a mistake. The +% numerical information was missing in the auxiliary files, so the +% |\cite| commands could never access it. +% +% \subsection{New Coding} +% I have now recoded \thestyle{} so that the separation of author and year +% information comes before the information is written to the auxiliary +% file, and furthermore, a sequential number is also written. This permits +% numerical citations with \emph{any} of the author--year bibliographic style +% files. +% +% The recoding has made fewer internal changes than I expected. Any users +% who have local redefinitions of my internals should be aware that of the +% citation commands, only |\NAT@citexnum| has been altered. Otherwise the +% changes are in the parsing commands |\NAT@parse| and |\NAT@parse@date|. +% Of the external commands, |\bibitem| is completely redefined, and +% |\citeauthor|, |\citeyear|, and |\citefullauthor| are different. +% +% Version~5.5 actually made far more internal changes: all internal +% commands were renamed to conform to recommended \LaTeX{} coding +% practices. +% +% \subsection{Selecting Numerical Mode} +% By default, \thestyle{} is in author--year mode. This can be changed by +% \begin{enumerate} +% \item selecting a numerical bibliography style with predefined +% citation style, defined either in the package or in the local +% configuration file; +% +% \item giving options \texttt{numbers} or \texttt{super} to the +% |\usepackage| command; +% +% \item issuing |\bibpunct| with the 4th mandatory argument set to \texttt{n} +% or \texttt{s}; +% +% \item issuing |\citestyle| with the name of a predefined numerical +% bibliography style. +% \end{enumerate} +% The methods are listed in order of increasing priority. +% +% The \thestyle{} package will automatically switch to numerical mode if +% any one of the |\bibitem| entries fails to conform to the possible +% author--year formats. There is no way to override this, since such an +% entry would cause trouble in the author--year mode. +% +% There are certain special `numerical' styles, like that of the standard +% \texttt{alpha.bst}, which include a non-numerical label in place of the +% number, in the form +% \begin{quote} |\bibitem[ABC95]{able95}| \end{quote} +% As far as \thestyle\ is concerned, this label does not conform to the +% author--year possibilities and is therefore considered to be numerical. +% The citation mode switches to numerical, and |\cite{able95}| prints +% [ABC95]. +% +% \subsection{New Bibliography Styles} +% I provided three new \texttt{.bst} files to replace the standard \LaTeX\ +% numerical ones: +% \begin{quote}\ttfamily +% plainnat.bst \qquad abbrvnat.bst \qquad unsrtnat.bst +% \end{quote} +% These produce reference lists in the same style as the corresponding +% standard \texttt{.bst} file, but can only be used with \thestyle{}. The +% advantage is that they can be used in both numerical and author--year +% mode. +% +% In fact, \texttt{unsrtnat.bst} is rather silly for author--year +% citations: the references are listed in the order they were cited, which +% makes it difficult to find them. It is only included in case an author +% wishes to switch from \texttt{plainnat} (author--year) to the unsorted +% numerical mode, retaining the |\citeauthor| and |\citeyear| commands in +% his paper. +% +% It is not possible to produce a modified version of \texttt{alpha.bst} +% since it would conflict with the |\bibitem| format of \thestyle. +% +% The sample bibliography style file \texttt{natbib.bst} will no longer be +% distributed. It merely represented a demonstration of the |\bibitem| +% syntax for \thestyle, a function that is now taken over by +% \texttt{plainnat.bst} and friends. +% +% \section{Local Configuration} +% For \LaTeXe, 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 +% own |\bibstyle@|\textit{bst} definitions to couple citation punctuation +% with local bibliography styles. +% +% \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 +% \begin{quote} +% |\documentclass[..]{...}|\\ +% |\usepackage[|\emph{options}|]{|\thestyle|}| +% \end{quote} +% The options available provide another means of specifying the +% punctuation for citations: +% \begin{description} +% \item[\ttfamily round] (default) for round parentheses; +% \item[\ttfamily square] for square brackets; +% \item[\ttfamily curly] for curly braces; +% \item[\ttfamily angle] for angle brackets; +% \item[\ttfamily colon] (default) to separate multiple citations with +% colons; +% \item[\ttfamily comma] to use commas as separaters; +% \item[\ttfamily authoryear] (default) for author--year citations; +% \item[\ttfamily numbers] for numerical citations; +% \item[\ttfamily super] for superscripted numerical citations, as in +% \textsl{Nature}; +% \item[\ttfamily sort] puts multiple numerical citations in order and +% compresses them if possible (as 3--6, 15); +% \item[\ttfamily sectionbib] redefines |\thebibliography| to issue +% |\section*| instead of |\chapter*|; valid only for classes with a +% |\chapter| command; to be used with the \texttt{chapterbib} package. +% \end{description} +% +% If any of these options are selected, the predefined citation styles in +% the commands |\bibstyle@|\textit{bst} will be no longer be effective. +% If either |\bibpunct| or |\citestyle| is given in the preamble, the above +% punctuation options will no longer hold. +% +% \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 +% packages for specific journals. In this case, many of the general features may +% be left off. This is allowed for with \texttt{docstrip} options that not +% only leave off certain codelines, but also include extra ones. So far, +% options exist for +% \begin{description} +% \item[\ttfamily subpack] produces a basic version with author--year only, +% fixed citation punctuation, no |\bibpunct| nor |\citestyle| nor +% predefined styles; +% \item[\ttfamily subpack,egs] for journals of the \textsl{European Geophysical +% Society}, in particular \textsl{Nonlinear Processes in Geophysics}; +% \item[\ttfamily subpack,agu] for \textsl{American Geophysical Union} journals. +% \end{description} +% The \texttt{subpack} option must always be used with \texttt{package}. +% +% 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. +% +% \section{Summary} +% +% The following summary is included as comments at the beginning of the +% \thestyle\texttt{.sty} file, for quick reference. Certain lines are +% dependent on the \texttt{docstrip} options. +% +% \iffalse +%<*package&!subpack> +% \fi +% \begin{verbatim} + % 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 + % general, all-purpose citation-style interface. + % + % With standard numerical .bst files, only numerical citations are + % possible. With an author-year .bst file, both numerical and + % author-year citations are possible. + % + % If author-year citations are selected, \bibitem must have one of the + % following forms: + % \bibitem[Jones et al.(1990)]{key}... + % \bibitem[Jones et al.(1990)Jones, Baker, and Williams]{key}... +%<*apalike|all> + % \bibitem[Jones et al., 1990]{key}... +% +%<*newapa|chicago|all> + % \bibitem[\protect\citeauthoryear{Jones, Baker, and Williams}{Jones + % et al.}{1990}]{key}... + % \bibitem[\protect\citeauthoryear{Jones et al.}{1990}]{key}... +% +%<*astron|all> + % \bibitem[\protect\astroncite{Jones et al.}{1990}]{key}... +% +%<*authordate|all> + % \bibitem[\protect\citename{Jones et al., }1990]{key}... +% +%<*harvard|all> + % \harvarditem[Jones et al.]{Jones, Baker, and Williams}{1990}{key}... +% + % + % This is either to be made up manually, or to be generated by an + % appropriate .bst file with BibTeX. + % Author-year mode || Numerical mode + % Then, \citet{key} ==>> Jones et al. (1990) || Jones et al. [21] + % \citep{key} ==>> (Jones et al., 1990) || [21] + % Multiple citations as normal: + % \citep{key1,key2} ==>> (Jones et al., 1990; Smith, 1989) || [21,24] + % or (Jones et al., 1990, 1991) || [21,24] + % or (Jones et al., 1990a,b) || [21,24] + % \cite{key} is the equivalent of \citet{key} in author-year mode + % and of \citep{key} in numerical mode + % Full author lists may be forced with \citet* or \citep*, e.g. + % \citep*{key} ==>> (Jones, Baker, and Williams, 1990) + % Optional notes as: + % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2) + % \citep[e.g.,][]{key} ==>> (e.g., Jones et al., 1990) + % \citep[see][pg. 34]{key}==>> (see Jones et al., 1990, pg. 34) + % (Note: in standard LaTeX, only one note is allowed, after the ref. + % Here, one note is like the standard, two make pre- and post-notes.) + % \citealt{key} ==>> Jones et al. 1990 + % \citealt*{key} ==>> Jones, Baker, and Williams 1990 + % \citealt{key1,key2} ==>> Jones et al. 1990; Smith 1989 + % Additional citation possibilities (both author-year and numerical modes) + % \citeauthor{key} ==>> Jones et al. + % \citeyear{key} ==>> 1990 + % \citefullauthor{key} ==>> Jones, Baker, and Williams + % (Multiple keys NOT allowed!) + % Note: full author lists depends on whether the bib style supports them; + % if not, the abbreviated list is printed even when full requested. + % + % Defining the citation style of a given bib style: +% % Use \bibpunct (in the preamble only) with 6 mandatory arguments: +% % Use \bibpunct (anywhere in the text) with 6 mandatory arguments: + % 1. opening bracket for citation + % 2. closing bracket + % 3. citation separator (for multiple citations in one \cite) + % 4. the letter n for numerical styles, s for superscripts + % else anything for author-year + % 5. punctuation between authors and date + % 6. punctuation between years when common authors missing + % One optional argument is the character coming before post-notes. It + % appears in square braces before all other arguments. May be left off. + % Example (and default) \bibpunct[,]{(}{)}{;}{a}{,}{,} + % + % To make this automatic for a given bib style, named newbib, say, make + % a local configuration file, natbib.cfg, with the definition + % \newcommand{\bibstyle@newbib}{\bibpunct...} + % Then the \bibliographystyle{newbib} will cause \bibstyle@newbib to + % be called on THE NEXT LATEX RUN (via the aux file). + % +% % Such preprogrammed definitions may be invoked in the text (preamble only) +% % Such preprogrammed definitions may be invoked anywhere in the text + % by calling \citestyle{newbib}. This is only useful if the style specified + % differs from that in \bibliographystyle. + % +%<*!209> + % With \citeindextrue and \citeindexfalse, one can control whether the + % \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) + % round - round parentheses are used (default) + % square - square brackets are used [option] + % curly - curly braces are used {option} + % angle - angle brackets are used