diff options
author | Karl Berry <karl@freefriends.org> | 2009-09-07 23:11:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-09-07 23:11:56 +0000 |
commit | 9811e61a31288ae1d73ac3534bd85c911ce81bbc (patch) | |
tree | 741451bf1f70e8a2ae7dc397ccb748befe2212ef /Master | |
parent | b7d70cabd9d223b8736e0877da5b0b0dbfa7b9bc (diff) |
collref 2.0 (7sep09)
git-svn-id: svn://tug.org/texlive/trunk@15177 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/collref/README | 22 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/collref/collref.pdf | bin | 146302 -> 283897 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/collref/collsamp.tex | 24 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/collref/collref.dtx | 253 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/collref/collref.sty | 33 |
5 files changed, 235 insertions, 97 deletions
diff --git a/Master/texmf-dist/doc/latex/collref/README b/Master/texmf-dist/doc/latex/collref/README index e0db0fca20b..9613f3a5da0 100644 --- a/Master/texmf-dist/doc/latex/collref/README +++ b/Master/texmf-dist/doc/latex/collref/README @@ -1,4 +1,4 @@ -collref v1.0 +collref v2.0 Copyright 2003-2009 Niklas Beisert collref is a LaTeX2e package to automatically collect @@ -7,12 +7,12 @@ in \cite into a single \bibitem block. The package consists of the files - \texttt{README} & readme file \\ - \texttt{collref.ins} & installation file \\ - \texttt{collref.dtx} & source file \\ - \texttt{collref.sty} & package file \\ - \texttt{collsamp.tex}& sample file \\ - \texttt{collref.pdf} & manual + README readme file + collref.ins installation file + collref.dtx source file + collref.sty package file + collsamp.tex sample file + collref.pdf manual The distribution consists of the files README, collref.ins and collref.dtx. @@ -21,3 +21,11 @@ Run "(pdf)latex collref.dtx" to compile the manual collref.pdf. Run "tex collref.ins" to create the package collref.sty and the sample collsamp.tex. Copy the file collref.sty to an appropriate directory of your LaTeX distribution, e.g. texmf-root/tex/latex/collref. + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either version 1.3 +of this license or (at your option) any later version. +The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of LaTeX +version 2005/12/01 or later. diff --git a/Master/texmf-dist/doc/latex/collref/collref.pdf b/Master/texmf-dist/doc/latex/collref/collref.pdf Binary files differindex 5e81d283486..e1b5e9414ac 100644 --- a/Master/texmf-dist/doc/latex/collref/collref.pdf +++ b/Master/texmf-dist/doc/latex/collref/collref.pdf diff --git a/Master/texmf-dist/doc/latex/collref/collsamp.tex b/Master/texmf-dist/doc/latex/collref/collsamp.tex index b2b2b706b68..4120856051e 100644 --- a/Master/texmf-dist/doc/latex/collref/collsamp.tex +++ b/Master/texmf-dist/doc/latex/collref/collsamp.tex @@ -17,28 +17,30 @@ %% version 2005/12/01 or later. %% \NeedsTeXFormat{LaTeX2e}[1996/12/01] -\ProvidesFile{collsamp.tex}[2009/06/09 v1.0 Sample for Collect References] +\ProvidesFile{collsamp.tex}[2009/09/07 v2.0 Sample for Collect References] \documentclass{article} -\usepackage[bulletsep]{collref} +\usepackage[punctsep]{collref} \begin{document} +\def\tworef{c8,c9} + \cite{c1,c2,c3,c4} \nocollect{c3} -\cite{c5,c6,c7,c8,c9} +\cite{c5,c6,c7,\tworef} \cite{c5,c6,c7} -\cite{c7,c8,c9} +\cite{c7,\tworef} \begin{thebibliography}{11} -\bibitem{c1} reference 1 -\bibitem{c2} reference 2 -\bibitem{c3} reference 3 -\bibitem{c4} reference 4 +\bibitem{c1} reference 1% +\bibitem{c2} reference 2% +\bibitem{c3} reference 3% +\bibitem{c4} reference 4% \bibitem{c5} reference 5 \bibitem{c6} reference 6 -\bibitem{c7} reference 7 -\bibitem{c8} reference 8 -\bibitem{c9} reference 9 +\bibitem{c7} reference 7 % +\bibitem{c8} reference 8\ignorespaces +\bibitem{c9} reference 9\ignorespaces \end{thebibliography} \end{document} diff --git a/Master/texmf-dist/source/latex/collref/collref.dtx b/Master/texmf-dist/source/latex/collref/collref.dtx index fb227fb58df..1b74ce4ac6a 100644 --- a/Master/texmf-dist/source/latex/collref/collref.dtx +++ b/Master/texmf-dist/source/latex/collref/collref.dtx @@ -18,10 +18,10 @@ % and the derived files collref.sty and collsamp.tex % %<package|sample>\NeedsTeXFormat{LaTeX2e}[1996/12/01] -%<package>\ProvidesPackage{collref}[2009/06/09 v1.0 Collect References] -%<sample>\ProvidesFile{collsamp.tex}[2009/06/09 v1.0 Sample for Collect References] +%<package>\ProvidesPackage{collref}[2009/09/07 v2.0 Collect References] +%<sample>\ProvidesFile{collsamp.tex}[2009/09/07 v2.0 Sample for Collect References] %<*driver> -%\ProvidesFile{collref.drv}[2009/06/09 v1.0 Collect References Manual file] +%\ProvidesFile{collref.drv}[2009/09/07 v2.0 Collect References Manual file] \PassOptionsToClass{10pt,a4paper}{article} \documentclass{ltxdoc} @@ -53,7 +53,7 @@ \href{mailto:nbeisert@aei.mpg.de}{\texttt{nbeisert@aei.mpg.de}}} \hypersetup{pdfauthor={Niklas Beisert}} \hypersetup{pdfsubject={Manual for the LaTeX2e Package collref}} -\date{9 June 2009, \textsf{v1.0}} +\date{7 September 2009, \textsf{v2.0}} \maketitle \begin{abstract}\noindent @@ -144,25 +144,13 @@ To use \textsf{collref} simply add the command to the preamble of your \LaTeX{} document. No further interaction is required. -\paragraph{Bibliography Preparation.} -Please note that only such blocks of references can be collapsed -which appear in the same order for -\verb|\cite| commands as for \verb|thebibliography|. -It is recommended to prepare the bibliography through \BibTeX{} -which does this automatically. -You must use a style which does not sort the references -but preserves the order in which they were \verb|\cite|'d, -e.g.\ \texttt{unsrt.bst}. - -\paragraph{Separators.} -\textsf{collref} does not provide correct linguistic punctuation -between collected references, but it allows to specify how -collected references are separated. +\paragraph{Punctuation.} +\textsf{collref} provide basic punctuation between collected references. This is specified through the package options \verb|\usepackage[|\textit{opt}\verb|]{collref}| where \textit{opt} is one of the following -\par\vspace{2ex} -\begin{minipage}[t]{0.3\linewidth} +\par\vspace{2ex}\noindent% +\begin{minipage}[t]{0.24\linewidth} \centerline{\texttt{nosep} (default)}\par\vspace{1ex} no separator: \begin{thebib} @@ -170,8 +158,8 @@ no separator: \item B C \item D \end{thebib} -\end{minipage}\hfill -\begin{minipage}[t]{0.3\linewidth} +\end{minipage}% +\begin{minipage}[t]{0.24\linewidth} \centerline{\texttt{parsep}}\par\vspace{1ex} separated by \verb|\par|: \begin{thebib} @@ -180,23 +168,77 @@ separated by \verb|\par|: \par C \item D \end{thebib} -\end{minipage}\hfill -\begin{minipage}[t]{0.3\linewidth} +\end{minipage}% +\begin{minipage}[t]{0.24\linewidth} \centerline{\texttt{bulletsep}}\par\vspace{1ex} -separated by $\bullet$: +separated by `\textbullet': \begin{thebib} \item A -\item B $\bullet$ C +\item B \textbullet{} C \item D \end{thebib} -\end{minipage} +\end{minipage}% +\begin{minipage}[t]{0.28\linewidth} +\centerline{\texttt{punctsep}}\par\vspace{1ex} +punctuated by `;' and '.': +\begin{thebib} +\item A . +\item B ; C . +\item D . +\end{thebib} +cf.\ note on spacing below. +\end{minipage}% \par\vspace{2ex}\noindent % Alternative separators can be specified in the preamble through the command: \begin{center} -\verb|\collectsep{|\textit{separator}\verb|}| +\verb|\collectsep[|\textit{punctuation}|]{|\textit{separator}\verb|}| \end{center} +The \textit{separator} appears between references in a block and +the \textit{punctuation} at the end of a block of references. + +\paragraph{Bibliography Preparation.} +Please note that only such blocks of references can be collapsed +which appear in the same order for +\verb|\cite| commands as for \verb|thebibliography|. +It is recommended to prepare the bibliography through \BibTeX{} +which does this automatically. +You must use a style which does not sort the references +but preserves the order in which they were \verb|\cite|'d, +e.g.\ \texttt{unsrt.bst}. + +Also note that \textsf{collref} suppresses +new paragraphs invoked by empty lines in the bibliography. +This allows to use standard \BibTeX{} styles +which commonly separate reference entries by empty lines. +If these empty lines would be expanded to new paragraphs, +\textsf{collref} would not be able to join two references properly. +Therefore new paragraphs have to be invoked by the +command \verb|\par|. + +If you wish to use the style \texttt{punctsep}, please +refer to the following note on spacing and punctuation. + +\paragraph{Spacing and Punctuation.} +References are usually punctuated in some way. +Three of the predefined styles -- +\texttt{nosep}, \texttt{parsep} and \texttt{bulletsep} -- +preserve the punctuation from the bibliography. + +The fourth predefined style -- \texttt{punctsep} -- +automatically performs the punctuation. +This however requires care in the preparation +of the bibliography: +The entries have to be provided \emph{without} punctuation. +Furthermore, there must not be \emph{whitespaces} at the +end of an entry. +They can be suppressed with `\verb|%|' +or \verb|\ignorespaces| +directly following the last word of the entry. +See Appendix \ref{sec:sample} for an example. +The standard \BibTeX{} styles, e.g.\ \texttt{unsrt.bst}, +have to be adjusted to remove the punctuation and whitespaces. \paragraph{Control.} @@ -208,16 +250,28 @@ which references (not) to collect: \end{center} % It ensures that the label \textit{label} starts -a new \verb|\bibitem|. +a new block of references. It is not collapsed with earlier references. Later references, however, can still be collapsed to the end of \textit{label}. +\paragraph{Labels for Blocks of References.} + +While \textsf{collref} aims to automatically +collect similar references into a single block, it is often +convenient for the author to refer to such blocks +with a single citation label. +Standard \TeX/\LaTeX{} commands can be used to define such a block: +\begin{center} +\verb|\newcommand{|\textit{$\backslash$blocklabel}\verb|}{|\textit{label1, label2, \ldots}\verb|}| +\end{center} +Subsequently this block can be referenced with +\verb|\cite{|\textit{\ldots, $\backslash$blocklabel, \ldots}\verb|}|. \paragraph{Interaction with CTAN Packages.} The package \textsf{collref} has been tested with other -CTAN packages concerned with the citations and the bibliography: +CTAN packages concerned with citations and the bibliography: % \begin{itemize} \item\textsf{cite}: @@ -235,6 +289,42 @@ Tested with \textsf{hyperref v6.78s}. \end{itemize} +\section{Revision History} + +\paragraph{v2.0:} +2009/09/07 +\begin{itemize} +\item +proper punctuation added +\item +blocks of references enabled +\item +manual extended +\end{itemize} + +\paragraph{v1.0:} +2009/06/09 +\begin{itemize} +\item +streamlined detection of chains +\item +manual and installation package added +\item +renamed package to \textsf{collref} due to name clash on CTAN +\item +first version published on CTAN +\end{itemize} + +\paragraph{v0.9:} +\begin{itemize} +\item +package named \textsf{collect}; unpublished +\end{itemize} + +\section{Acknowledgements} +Thanks to Oleg Zhirov +for suggesting proper punctuation +and labels for blocks of references. \appendix @@ -264,6 +354,8 @@ Run \LaTeX{} on \texttt{collref.ins} to create the package \texttt{collref.sty} and the sample \texttt{collsamp.tex}. Copy the file \texttt{collref.sty} to an appropriate directory of your \LaTeX{} distribution, e.g.\ \textit{texmf-root}\verb|/tex/latex/collref|. +Alternatively, you may copy \texttt{collref.sty} to the local directories of +manuscripts for which you wish to use \textsf{collref}. \end{itemize} \DocInput{collref.dtx} @@ -284,8 +376,9 @@ This work has the LPPL maintenance status `maintained'. The Current Maintainer of this work is Niklas Beisert. -This work consists of the files \texttt{collref.dtx} and \texttt{collref.ins} -and the derived files \texttt{collref.sty} and \texttt{collsamp.tex} +This work consists of the files \texttt{README}, \texttt{collref.dtx} and \texttt{collref.ins} +as well as the derived files \texttt{collref.sty}, \texttt{collsamp.tex} +and \texttt{collref.pdf}. \end{document} @@ -294,7 +387,7 @@ and the derived files \texttt{collref.sty} and \texttt{collsamp.tex} % % % -% \section{Sample File} +% \section{Sample File}\label{sec:sample} %\iffalse %<*sample> %\fi @@ -304,27 +397,29 @@ and the derived files \texttt{collref.sty} and \texttt{collsamp.tex} % \begin{macrocode} \documentclass{article} %\usepackage{cite} -\usepackage[bulletsep]{collref} +\usepackage[punctsep]{collref} %\usepackage{hyperref} \begin{document} +\def\tworef{c8,c9} + \cite{c1,c2,c3,c4} \nocollect{c3} -\cite{c5,c6,c7,c8,c9} +\cite{c5,c6,c7,\tworef} \cite{c5,c6,c7} -\cite{c7,c8,c9} +\cite{c7,\tworef} \begin{thebibliography}{11} -\bibitem{c1} reference 1 -\bibitem{c2} reference 2 -\bibitem{c3} reference 3 -\bibitem{c4} reference 4 +\bibitem{c1} reference 1% +\bibitem{c2} reference 2% +\bibitem{c3} reference 3% +\bibitem{c4} reference 4% \bibitem{c5} reference 5 \bibitem{c6} reference 6 -\bibitem{c7} reference 7 -\bibitem{c8} reference 8 -\bibitem{c9} reference 9 +\bibitem{c7} reference 7 % +\bibitem{c8} reference 8\ignorespaces +\bibitem{c9} reference 9\ignorespaces \end{thebibliography} \end{document} @@ -338,13 +433,14 @@ and the derived files \texttt{collref.sty} and \texttt{collsamp.tex} % [1, 2] [3, 4, 5] [3, 4] [4, 5] % % \begin{thebib} -% \item reference 1 $\bullet$ reference 2 -% \item reference 3 $\bullet$ reference 4 -% \item reference 5 $\bullet$ reference 6 -% \item reference 7 -% \item reference 8 $\bullet$ reference 9 +% \item reference 1; reference 2. +% \item reference 3; reference 4. +% \item reference 5 ; reference 6 . +% \item reference 7 . +% \item reference 8; reference 9. % \end{thebib} - +% Note the different behaviour for references 5, 6 and 7 +% for which trailing whitespaces were not removed. @@ -377,20 +473,21 @@ and the derived files \texttt{collref.sty} and \texttt{collsamp.tex} % \paragraph{Interface.} % The package provides two public commands, described above: % \begin{macrocode} -\newcommand{\collectsep}[1]{\def\nc@sep{#1}} -\newcommand{\nocollect}[1]{\nc@breakbefore{#1}} +\newcommand{\collectsep}[2][]{\def\nc@punct{#1}\def\nc@sep{#2}} +\newcommand{\nocollect}[1]{\nc@breakbefore{#1}\ignorespaces} % \end{macrocode} -% + % \paragraph{Package Options.} -% The package provides three predefined separators, described above: +% The package provides four predefined separators described above: % \begin{macrocode} \DeclareOption{nosep}{\collectsep{}} \DeclareOption{parsep}{\collectsep{\par}} -\DeclareOption{bulletsep}{\collectsep{$\bullet$ }} +\DeclareOption{bulletsep}{\collectsep{\textbullet{} }} +\DeclareOption{punctsep}{\collectsep[.]{; }} \ExecuteOptions{nosep} \ProcessOptions % \end{macrocode} -% + % \paragraph{Internal Commands.} % Some internal commands for abbreviation: % \begin{macrocode} @@ -415,7 +512,7 @@ and the derived files \texttt{collref.sty} and \texttt{collsamp.tex} \nc@setcsname{nc@s@#1}{}% } % \end{macrocode} -% + % \paragraph{Citations.} % % Hack for \verb|\@citex|: @@ -428,11 +525,12 @@ and the derived files \texttt{collref.sty} and \texttt{collsamp.tex} \let\nc@citecomma\@empty% \let\nc@citestring\@empty% \let\nc@citelast\@empty% + \edef\nc@citelist{#2}% % \end{macrocode} % Main loop to process the arguments of \verb|\cite|. % The current label is stored in \verb|\nc@citethis|. % \begin{macrocode} - \@for\nc@citethis:=#2\do{% + \@for\nc@citethis:={\nc@citelist}\do{% \edef\nc@citethis{\expandafter\@firstofone\nc@citethis\@empty}% % \end{macrocode} % The first entry has no predecessor, terminate the chain. @@ -441,7 +539,7 @@ and the derived files \texttt{collref.sty} and \texttt{collsamp.tex} \nc@breakbefore{\nc@citethis}% \else% % \end{macrocode} -% Non-first entry. Fill undefined successor and predecessors entries +% Non-first entry: Fill undefined successor and predecessors entries % with the current chain sequence. % \begin{macrocode} \@ifundefined{nc@s@\nc@citelast}% @@ -488,7 +586,7 @@ and the derived files \texttt{collref.sty} and \texttt{collsamp.tex} % \begin{macrocode} \if@filesw\immediate\write\@auxout{\string\citation{\nc@citethis}}\fi% % \end{macrocode} -% Continue to next label +% Continue to next label. % \begin{macrocode} \edef\nc@citelast{\nc@citethis}% \def\nc@citecomma{,}% @@ -507,18 +605,27 @@ and the derived files \texttt{collref.sty} and \texttt{collsamp.tex} % \paragraph{Bibliography.} % % Enhance the \verb|thebibliography| environment to -% a) reset the \verb|\nc@biblast| label to something, and -% b) convert linebreaks into whitespaces (avoid implicit \verb|\par|'s) +% a) set the \verb|\nc@biblast| label to something, +% and empty \verb|\nc@nextpunct| +% (no predecessor for the first entry), +% b) convert linebreaks into whitespaces (avoid implicit \verb|\par|'s), and +% c) put the final punctuation for the last entry. % % \begin{macrocode} \let\nc@old@thebibliography\thebibliography +\let\nc@old@endthebibliography\endthebibliography \def\thebibliography{% \xdef\nc@biblast{asldjfhasklfh}% + \xdef\nc@nextpunct{}% \catcode`\^^M=10% \nc@old@thebibliography} + +\def\endthebibliography{% + \nc@nextpunct% +\nc@old@endthebibliography} % \end{macrocode} -% + % Overwrite \verb|\bibitem|: % It is assumed that the native \LaTeXe{} code % is equivalent but with the \LaTeX{} @@ -534,28 +641,34 @@ and the derived files \texttt{collref.sty} and \texttt{collsamp.tex} % for collapsed references: % \begin{macrocode} \def\nc@noitem#1{% - \nc@sep% \if@filesw\immediate\write\@auxout{\string\bibcite{#1}{}}\fi% \ignorespaces} % \end{macrocode} -% -% The hack for \verb|@bibitem|: It checks whether + +% The hack for \verb|\@bibitem|: It checks whether % this reference is part of a block. -% If so, collect by \verb|\nc@noitem|, otherwise pass down to \verb|\@bibitem| +% If so, put separator and collect by \verb|\nc@noitem|. +% Otherwise put punctuation and pass down to \verb|\@bibitem|. +% Finally let \verb|\nc@biblast| point to current item, +% and fill the punctuation \verb|\nc@nextpunct| for the next entry. % \begin{macrocode} \def\nc@bibitem#1{% \edef\nc@bibpred{\@ifundefined{nc@p@#1}{}{\nc@getcsname{nc@p@#1}}}% - \ifx\nc@biblast\nc@bibpred\nc@noitem{#1}\else\@bibitem{#1}\fi% + \ifx\nc@biblast\nc@bibpred\nc@sep\nc@noitem{#1}% + \else\nc@nextpunct\@bibitem{#1}\fi% \xdef\nc@biblast{#1}% + \xdef\nc@nextpunct{\nc@punct}% \ignorespaces} % \end{macrocode} -% + % Similar hack for \verb|@lbibitem|: % \begin{macrocode} \def\nc@lbibitem[#1]#2{% \edef\nc@bibpred{\@ifundefined{nc@p@#2}{}{\nc@getcsname{nc@p@#2}}}% - \ifx\nc@biblast\nc@bibpred\nc@noitem{#2}\else\@lbibitem[#1]{#2}\fi% + \ifx\nc@biblast\nc@bibpred\nc@sep\nc@noitem{#2}% + \else\nc@nextpunct\@lbibitem[#1]{#2}\fi% \xdef\nc@biblast{#2}% + \xdef\nc@nextpunct{\nc@punct}% \ignorespaces} % \end{macrocode} %\iffalse @@ -563,5 +676,3 @@ and the derived files \texttt{collref.sty} and \texttt{collsamp.tex} %\fi \endinput - -%% \CheckSum{3381} diff --git a/Master/texmf-dist/tex/latex/collref/collref.sty b/Master/texmf-dist/tex/latex/collref/collref.sty index 23e8190f843..b0e73238523 100644 --- a/Master/texmf-dist/tex/latex/collref/collref.sty +++ b/Master/texmf-dist/tex/latex/collref/collref.sty @@ -17,15 +17,18 @@ %% version 2005/12/01 or later. %% \NeedsTeXFormat{LaTeX2e}[1996/12/01] -\ProvidesPackage{collref}[2009/06/09 v1.0 Collect References] +\ProvidesPackage{collref}[2009/09/07 v2.0 Collect References] + +\newcommand{\collectsep}[2][]{\def\nc@punct{#1}\def\nc@sep{#2}} +\newcommand{\nocollect}[1]{\nc@breakbefore{#1}\ignorespaces} -\newcommand{\collectsep}[1]{\def\nc@sep{#1}} -\newcommand{\nocollect}[1]{\nc@breakbefore{#1}} \DeclareOption{nosep}{\collectsep{}} \DeclareOption{parsep}{\collectsep{\par}} -\DeclareOption{bulletsep}{\collectsep{$\bullet$ }} +\DeclareOption{bulletsep}{\collectsep{\textbullet{} }} +\DeclareOption{punctsep}{\collectsep[.]{; }} \ExecuteOptions{nosep} \ProcessOptions + \newcommand{\nc@getcsname}[1]{\csname #1\endcsname} \newcommand{\nc@setcsname}[2]{\expandafter\xdef\csname #1\endcsname{#2}} \newcommand{\nc@breakbefore}[1]{% @@ -38,13 +41,15 @@ \ifx\nc@citesucc\@empty\else\nc@setcsname{nc@p@\nc@citesucc}{}\fi% \nc@setcsname{nc@s@#1}{}% } + \let\nc@old@citex\@citex \def\@citex[#1]#2{% \let\nc@citecomma\@empty% \let\nc@citestring\@empty% \let\nc@citelast\@empty% - \@for\nc@citethis:=#2\do{% + \edef\nc@citelist{#2}% + \@for\nc@citethis:={\nc@citelist}\do{% \edef\nc@citethis{\expandafter\@firstofone\nc@citethis\@empty}% \ifx\nc@citelast\@empty% \nc@breakbefore{\nc@citethis}% @@ -80,25 +85,37 @@ } \let\nc@old@thebibliography\thebibliography +\let\nc@old@endthebibliography\endthebibliography \def\thebibliography{% \xdef\nc@biblast{asldjfhasklfh}% + \xdef\nc@nextpunct{}% \catcode`\^^M=10% \nc@old@thebibliography} + +\def\endthebibliography{% + \nc@nextpunct% +\nc@old@endthebibliography} + \def\bibitem{\@ifnextchar[\nc@lbibitem\nc@bibitem} \def\nc@noitem#1{% - \nc@sep% \if@filesw\immediate\write\@auxout{\string\bibcite{#1}{}}\fi% \ignorespaces} + \def\nc@bibitem#1{% \edef\nc@bibpred{\@ifundefined{nc@p@#1}{}{\nc@getcsname{nc@p@#1}}}% - \ifx\nc@biblast\nc@bibpred\nc@noitem{#1}\else\@bibitem{#1}\fi% + \ifx\nc@biblast\nc@bibpred\nc@sep\nc@noitem{#1}% + \else\nc@nextpunct\@bibitem{#1}\fi% \xdef\nc@biblast{#1}% + \xdef\nc@nextpunct{\nc@punct}% \ignorespaces} + \def\nc@lbibitem[#1]#2{% \edef\nc@bibpred{\@ifundefined{nc@p@#2}{}{\nc@getcsname{nc@p@#2}}}% - \ifx\nc@biblast\nc@bibpred\nc@noitem{#2}\else\@lbibitem[#1]{#2}\fi% + \ifx\nc@biblast\nc@bibpred\nc@sep\nc@noitem{#2}% + \else\nc@nextpunct\@lbibitem[#1]{#2}\fi% \xdef\nc@biblast{#2}% + \xdef\nc@nextpunct{\nc@punct}% \ignorespaces} \endinput |