summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-09-04 18:07:34 +0000
committerKarl Berry <karl@freefriends.org>2007-09-04 18:07:34 +0000
commitc9c46ee3e0affbd186d61b95b6cf4db1b0127fb1 (patch)
tree202267562e188f0a2f68b488208674e7c7b417c6 /Master
parentfad0fc03bb2d837cd1f9c18df566aea1c9b86698 (diff)
notes2bib update (3sep07)
git-svn-id: svn://tug.org/texlive/trunk@4875 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdfbin174986 -> 177706 bytes
-rw-r--r--Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx54
-rw-r--r--Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty22
3 files changed, 62 insertions, 14 deletions
diff --git a/Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdf b/Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdf
index 34fb8b9f5de..91b0cc1bdc4 100644
--- a/Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdf
+++ b/Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx b/Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx
index 06c26173a56..b9fe28fdf96 100644
--- a/Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx
+++ b/Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx
@@ -38,7 +38,7 @@
%</driver>
%\fi
%
-%\CheckSum{486}
+%\CheckSum{498}
%
%\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
@@ -148,8 +148,8 @@
% replacing footnotes by bibnotes. Notice that there \emph{are}
% places where bibnotes will be problematic, for example in section
% headings which also appear in the Table of Contents. In these
-% contexts, use \cmd{\cite} to reference the note, or use an optional
-% argument to the \cmd{\section}, \emph{etc.}
+% contexts, use \cmd{\citenote} to reference the note, or use an
+% optional argument to the \cmd{\section}, \emph{etc.}
%
%\subsection{Package options}
% The |notes2bib| package currently accepts a number of options. The
@@ -209,11 +209,16 @@
% \cmd{\theendnotes} macro is redefined to achieve the same effect.
%
%\subsection{Cross-referencing notes}
+%\DescribeMacro{\citenote}
% As explained above, each note is automatically assigned a label, or
% the user can provide one as an optional argument to the note. In
-% either case, notes may then be cross-referenced. This should be
-% done using the \cmd{\cite} command (or similar) as the labels are
-% bibliographic citations.
+% either case, notes may then be cross-referenced. Notes are
+% available to be cited directly using the \cmd{\cite} command.
+% However, this can cause problems when using the |tail| option. The
+% \cmd{\citenote} command is therefore provided. This is aware of
+% the options, and will act correctly in all circumstances.
+% \cmd{\citenote} uses the citation command currently defined in
+% \cmd{\niibcite}.
%
%\subsection{Interaction with other packages}
% |notes2bib| is designed to work well with as many other packages as
@@ -460,7 +465,7 @@
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{notes2bib}
- [2007/08/30 v1.0 Integrating notes into the bibliography]
+ [2007/09/03 v1.0a Integrating notes into the bibliography]
\RequirePackage{xspace}
% \end{macrocode}
% Option processing takes place. Redefining \cmd{\footnote} or
@@ -805,6 +810,8 @@
%\end{macro}
%
%\begin{macro}{\delaycite}
+%\changes{v1.0a}{2007/09/03}{Fixed a flaw with checking for
+% existing redefinition}
% Normal citations have to be stacked up in the stack when in
% ``head'' mode. To do this, the citation command has to be modified
% to do this, while leaving note citations alone. The trick used in
@@ -812,7 +819,7 @@
% place.
% \begin{macrocode}
\newcommand*\delaycite[1]{%
- \expandafter\ifx\csname niib@orig@#1\endcsname\@undefined%
+ \@ifundefined{niib@orig@#1}{%
\expandafter\expandafter\expandafter\let\expandafter%
\csname niib@orig@#1\expandafter\endcsname\csname #1\endcsname%
\expandafter\renewcommand\csname #1\endcsname[2][\relax]{%
@@ -844,14 +851,41 @@
\fi%
\fi%
}%
- \else%
+ }{%
\PackageInfo{notes2bib}%
{Citation type ``#1'' already delayed}%
- \fi%
+ }
}
% \end{macrocode}
%\end{macro}
%
+%\begin{macro}{\citenote}
+%\changes{v1.0a}{2007/09/03}{New macro}
+% A ``mode aware'' command for referencing notes is needed (problems
+% arise with \cmd{\cite} and the |tail| option. Rather than overload
+% \cmd{\cite} with all of the problems that can bring, a new command
+% is provided that can be guaranteed to work.
+% \begin{macrocode}
+\ifniib@tail
+ \newcommand*\citenote[2][\relax]{%
+ \begingroup%
+ \@fileswfalse%
+% \end{macrocode}
+% \cmd{\relax} is used as a marker for an empty first argument.
+% \begin{macrocode}
+ \ifx#1\relax
+ \niibcite{#2}%
+ \else
+ \niibcite[#1]{#2}
+ \fi
+ \endgroup%
+ }
+\else
+ \newcommand*\citenote{\niibcite}
+\fi
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\Percent}
% Finally, a way of producing a percentage sign in note is needed.
% This is because inside the note, no method for escaping a comment
diff --git a/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty b/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty
index 6046f97398f..8e73720bd46 100644
--- a/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty
+++ b/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty
@@ -14,7 +14,7 @@
%% ----------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{notes2bib}
- [2007/08/30 v1.0 Integrating notes into the bibliography]
+ [2007/09/03 v1.0a Integrating notes into the bibliography]
\RequirePackage{xspace}
\newif\ifniib@fn\niib@fnfalse
\DeclareOption{footnotes}{%
@@ -156,7 +156,7 @@
\fi%
}
\newcommand*\delaycite[1]{%
- \expandafter\ifx\csname niib@orig@#1\endcsname\@undefined%
+ \@ifundefined{niib@orig@#1}{%
\expandafter\expandafter\expandafter\let\expandafter%
\csname niib@orig@#1\expandafter\endcsname\csname #1\endcsname%
\expandafter\renewcommand\csname #1\endcsname[2][\relax]{%
@@ -179,11 +179,25 @@
\fi%
\fi%
}%
- \else%
+ }{%
\PackageInfo{notes2bib}%
{Citation type ``#1'' already delayed}%
- \fi%
+ }
}
+\ifniib@tail
+ \newcommand*\citenote[2][\relax]{%
+ \begingroup%
+ \@fileswfalse%
+ \ifx#1\relax
+ \niibcite{#2}%
+ \else
+ \niibcite[#1]{#2}
+ \fi
+ \endgroup%
+ }
+\else
+ \newcommand*\citenote{\niibcite}
+\fi
\newcommand*{\Percent}{\%\xspace}
\@ifpackageloaded{biblatex}
{\def\niib@keyname{keysort}}