diff options
author | Karl Berry <karl@freefriends.org> | 2008-02-27 01:23:45 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-02-27 01:23:45 +0000 |
commit | f82487f7cb5a8a26f143589f509ed0a76b51b82f (patch) | |
tree | 53c79ff81131d5eb324696ae8b866b5dc0253638 /Master/texmf-dist | |
parent | 82776fcf31f8ac48efbf9870a605a1f974557fcb (diff) |
notes2bib 1.dc (26feb08)
git-svn-id: svn://tug.org/texlive/trunk@6758 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdf | bin | 243258 -> 242034 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx | 141 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/notes2bib/jawltxdoc.sty | 13 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty | 78 |
4 files changed, 78 insertions, 154 deletions
diff --git a/Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdf b/Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdf Binary files differindex d08b8df511c..7297ddbadd1 100644 --- a/Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdf +++ b/Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdf diff --git a/Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx b/Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx index 6ebb3eff1c7..d5bd184897b 100644 --- a/Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx +++ b/Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx @@ -108,7 +108,7 @@ %</driver> %\fi % -%\CheckSum{843} +%\CheckSum{781} % %\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 @@ -146,7 +146,7 @@ %\DoNotIndex{\@auxout,\@empty,\@fileswfalse,\@for,\@ifnextchar} %\DoNotIndex{\@ifpackagelater,\@ifpackageloaded,\@ifundefined} %\DoNotIndex{\@nameuse,\AtBeginDocument,\AtEndDocument} -%\DoNotIndex{\AtEndPreamble,\AtNextCite,\begingroup,\closeout} +%\DoNotIndex{\AtNextCite,\begingroup,\closeout} %\DoNotIndex{\csname,\DeclareRobustCommand,\def,\define@boolkey} %\DoNotIndex{\define@choicekey,\define@cmdkeys,\do,\edef,\else} %\DoNotIndex{\endcsname,\endgroup,\endinput,\expandafter,\fi} @@ -158,6 +158,10 @@ %\DoNotIndex{\ProcessOptionsX,\ProvidesPackage,\relax,\renewcommand} %\DoNotIndex{\RequirePackage,\setkeys,\space,\stepcounter,\string} %\DoNotIndex{\the,\typeout,\unexpanded,\value,\write,\xdef,\z@} +%\DoNotIndex{\protected@xdef,\protect} +% +%\setkeys{lst}{language=[LaTeX]{TeX},moretexcs={bibnote,% +% bibnotemark,bibnotetext,citenote}} % %\title{\currpkg\ --- Integrating notes into the % bibliography^^A @@ -411,10 +415,6 @@ % \item \pkg{xkeyval}, v2.5 or later: Option handling uses % \pkg{xkeyval}, and the features used here are only available % from v2.5 of that package. -% \item \pkg{etoolbox}, v1.3 or later: Patching the \cs{thanks} macro -% to allow the \opt{footnotes} option also uses \pkg{etoolbox}. -% Various hooks are set up by \pkg{etoolbox}, which are used here -% to make the code clearer; these are only available from v1.3. %\end{itemize} % %\section{Known issues} @@ -523,7 +523,7 @@ % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{notes2bib} - [2008/01/16 v1.3b Integrating notes into the bibliography] + [2008/02/26 v1.3c Integrating notes into the bibliography] % \end{macrocode} % The package requires \eTeX, so before going any further, this is % tested. This code is taken more-or-less verbatim from @@ -542,11 +542,12 @@ % \end{macrocode} %\changes{v1.3a}{2008/01/09}{Require at least v2.5 of \pkg{xkeyval}} %\changes{v1.3a}{2008/01/09}{Require at least v1.3 of \pkg{etoolbox}} +%\changes{v1.3c}{2008/02/26}{Dropped requirement for \pkg{etoolbox}} % The necessary support packages are loaded. The method used in % \pkg{biblatex} is used to check the date of the packages: \currpkg % bails out if the support packages are too old. % \begin{macrocode} -\RequirePackage{xkeyval,etoolbox} +\RequirePackage{xkeyval} \@ifpackagelater{xkeyval}{2005/05/07} {} {\PackageError{notes2bib} @@ -556,15 +557,6 @@ `\@nameuse{ver@etoolbox.sty}'.\MessageBreak This is a fatal error; the package will abort.}% \endinput} -\@ifpackagelater{etoolbox}{2007/10/08} - {} - {\PackageError{notes2bib} - {etoolbox >= 1.3 required} - {notes2bib requires the `etoolbox' package, version 1.3 or - later.\MessageBreak The version loaded is: - `\@nameuse{ver@etoolbox.sty}'.\MessageBreak - This is a fatal error; the package will abort.}% - \endinput} % \end{macrocode} %\begin{macro}{\niib@tempa} %\changes{v1.3}{2008/01/08}{New macro} @@ -869,23 +861,21 @@ % %\subsection{Footnote and endnote handling} %\begin{macro}{\niib@org@footnote} +%\changes{v1.3c}{2008/02/26}{Saved in package} %\begin{macro}{\niib@org@footnotemark} +%\changes{v1.3c}{2008/02/26}{Saved in package} %\begin{macro}{\niib@org@footnotetext} -%\begin{macro}{\niib@org@thanks} +%\changes{v1.3c}{2008/02/26}{Saved in package} % To allow dynamic handling of footnotes and endnotes, the original -% definitions are backed up. This is done at the start of the -% document, so that changes from any other packages are picked up. +% definitions are backed up. % \begin{macrocode} -\AtBeginDocument{% - \let\niib@org@footnote\footnote - \let\niib@org@footnotemark\footnotemark - \let\niib@org@footnotetext\footnotetext - \let\niib@org@thanks\thanks +\let\niib@org@footnote\footnote +\let\niib@org@footnotemark\footnotemark +\let\niib@org@footnotetext\footnotetext % \end{macrocode} %\end{macro} %\end{macro} %\end{macro} -%\end{macro} %\begin{macro}{\niib@org@endnote} %\begin{macro}{\niib@org@endnotemark} %\begin{macro}{\niib@org@endnotetext} @@ -893,85 +883,49 @@ % If \pkg{endnotes} is loaded, then \cs{endnote} and friends have to % be saved. % \begin{macrocode} +\AtBeginDocument{% \@ifpackageloaded{endnotes} {\let\niib@org@endnote\endnote \let\niib@org@endnotemark\endnotemark \let\niib@org@endnotetext\endnotetext - \let\niib@org@theendnotes\theendnotes}} + \let\niib@org@theendnotes\theendnotes}{}} % \end{macrocode} %\end{macro} %\end{macro} %\end{macro} %\end{macro} -%\begin{macro}{\niib@thanks} -% The first step of converting footnotes into bibnotes is to patch -% the \cs{thanks} macro so that it uses the original definitions of -% \cs{footnotemark} and \cs{footnotetext}. The necessary setup is -% also put in place for on-the-fly swapping of footnotes and -% bibnotes. -% \begin{macrocode} -\AtBeginDocument{% - \let\niib@thanks\thanks - \let\niib@footnotetext\footnotetext - \let\niib@footnotemark\footnotemark - \patchcmd{\niib@thanks}{\footnotetext}{\niib@org@footnotetext} - {\patchcmd{\niib@thanks}{\footnotemark} - {\niib@org@footnotemark} -% \end{macrocode} %\begin{macro}{\thanks} -%\begin{macro}{\niib@footnotetext} -%\begin{macro}{\niib@footnotemark} -% If the package gets here, then both replacements have worked. The -% updated definition of \cs{thanks} is applied (it does not depend on -% package options), and the definitions of \cs{footnotemark} and -% \cs{footnotetext} that are needed are set up. -% \begin{macrocode} - {\let\thanks\niib@thanks - \let\niib@footnotetext\bibnotetext - \let\niib@footnotemark\bibnotemark - \niib@log@debug{Successfully patched \noexpand\thanks}} -% \end{macrocode} -% This group deals with a failure of the second patch. +%\changes{v1.3c}{2008/02/26}{Altered redefinition method} +%\changes{v1.3c}{2008/02/26}{Redefinition in preamble} +% The \cs{thanks} macro is redefined. % \begin{macrocode} - {\niib@log@warn{Failed to patch \noexpand\thanks\MessageBreak - \noexpand\footnotemark\space and - \noexpand\footnotetext\MessageBreak are unmodified}% - \niib@log@debug{Could not substitute - \noexpand\footnotemark\MessageBreak in \noexpand\thanks}}} +\@ifundefined{thanks}{} + {\renewcommand*{\thanks}[1]{% + \niib@org@footnotemark + \protected@xdef\@thanks{\@thanks + \protect\niib@org@footnotetext[\the\c@footnote]{#1}}}} % \end{macrocode} -% If the first patch fails, then the error shows up here. -% \begin{macrocode} - {\niib@log@warn{Failed to patch \noexpand\thanks\MessageBreak - \noexpand\footnotemark\space and - \noexpand\footnotetext\MessageBreak are unmodified}% - \niib@log@debug{Could not substitute - \noexpand\footnotetext\MessageBreak in \noexpand\thanks}}} -% \end{macrocode} -%\end{macro} -%\end{macro} -%\end{macro} %\end{macro} %\begin{macro}{\niib@swapfoot} +%\changes{v1.3c}{2008/02/26}{Simplified code} %\begin{macro}{\footnote} %\begin{macro}{\footnotemark} %\begin{macro}{\footnotetext} % The swapping code can now be implemented. % \begin{macrocode} -\newcommand*{\niib@swapfoot}{} -\AtBeginDocument{% - \renewcommand*{\niib@swapfoot}{% - \ifniib@footnotes - \let\footnote\bibnote - \let\footnotemark\niib@footnotemark - \let\footnotetext\niib@footnotetext - \niib@log@debug{Converting footnotes to bibnotes}% - \else - \let\footnote\niib@org@footnote - \let\footnotemark\niib@org@footnotemark - \let\footnotetext\niib@org@footnotetext - \niib@log@debug{Using kernel definition of footnotes}% +\newcommand*{\niib@swapfoot}{% + \ifniib@footnotes + \let\footnote\bibnote + \let\footnotemark\bibnotetext + \let\footnotetext\bibnotemark + \niib@log@debug{Converting footnotes to bibnotes}% + \else + \let\footnote\niib@org@footnote + \let\footnotemark\niib@org@footnotemark + \let\footnotetext\niib@org@footnotetext + \niib@log@debug{Using kernel definition of footnotes}% \fi} - \niib@swapfoot} +\AtBeginDocument{\niib@swapfoot} % \end{macrocode} %\end{macro} %\end{macro} @@ -1473,7 +1427,7 @@ % things very differently, but this actually makes it much easier to % patch for. % \begin{macrocode} -\AtEndPreamble{% +\AtBeginDocument{% \@ifpackageloaded{biblatex}% {\expandafter\gappto\expandafter\blx@bibfiles\expandafter% {,\niib@prefix\jobname} @@ -1490,7 +1444,7 @@ % anything. % \begin{macrocode} {\let\niib@org@bib\bibliography - \renewcommand{\bibliography}[1]{% + \renewcommand*{\bibliography}[1]{% \ifnum\the\value{bibnote} > \z@ \niib@org@bib{\niib@prefix\jobname,#1}% \else @@ -1657,7 +1611,9 @@ \usepackage[final]{microtype} \usepackage[osf]{mathpazo} \usepackage{booktabs,array,url,graphicx,courier,xspace} -\usepackage{upgreek,ifpdf,listings} +\usepackage{upgreek,ifpdf,listings,float,caption,longtable} +\floatstyle{plaintop} +\restylefloat{table} \ifpdf \usepackage{embedfile} \embedfile[% @@ -1736,12 +1692,9 @@ \let\typesetexample#1 \global\let\lst@intname\@empty \setbox\lst@samplebox=\hbox\bgroup - \setkeys{lst}{language=[LaTeX]{TeX},tabsize=4,gobble=3,% - breakindent=0pt,basicstyle=\small\ttfamily,basewidth=0.51em,% - keywordstyle=\color{blue},% - morekeywords={% notes2bib - niibsetup,bibnote,bibnotetext,bibnotemark,thebibnote,% - flushnotestack,citenote,printbibnotes}} + \setkeys{lst}{tabsize=4,gobble=3,breakindent=0pt,% + basicstyle=\small\ttfamily,basewidth=0.51em,% + keywordstyle=\color{blue}} \lst@BeginAlsoWriteFile{\LaTeXexamplefile} }{% \lst@EndWriteFile\egroup diff --git a/Master/texmf-dist/tex/latex/notes2bib/jawltxdoc.sty b/Master/texmf-dist/tex/latex/notes2bib/jawltxdoc.sty index de0948ae76f..fe5e23cc8bd 100644 --- a/Master/texmf-dist/tex/latex/notes2bib/jawltxdoc.sty +++ b/Master/texmf-dist/tex/latex/notes2bib/jawltxdoc.sty @@ -22,7 +22,9 @@ \usepackage[final]{microtype} \usepackage[osf]{mathpazo} \usepackage{booktabs,array,url,graphicx,courier,xspace} -\usepackage{upgreek,ifpdf,listings} +\usepackage{upgreek,ifpdf,listings,float,caption,longtable} +\floatstyle{plaintop} +\restylefloat{table} \ifpdf \usepackage{embedfile} \embedfile[% @@ -101,12 +103,9 @@ \let\typesetexample#1 \global\let\lst@intname\@empty \setbox\lst@samplebox=\hbox\bgroup - \setkeys{lst}{language=[LaTeX]{TeX},tabsize=4,gobble=3,% - breakindent=0pt,basicstyle=\small\ttfamily,basewidth=0.51em,% - keywordstyle=\color{blue},% - morekeywords={% notes2bib - niibsetup,bibnote,bibnotetext,bibnotemark,thebibnote,% - flushnotestack,citenote,printbibnotes}} + \setkeys{lst}{tabsize=4,gobble=3,breakindent=0pt,% + basicstyle=\small\ttfamily,basewidth=0.51em,% + keywordstyle=\color{blue}} \lst@BeginAlsoWriteFile{\LaTeXexamplefile} }{% \lst@EndWriteFile\egroup diff --git a/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty b/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty index 6ec80a119a7..793d3bd29d4 100644 --- a/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty +++ b/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty @@ -15,7 +15,7 @@ %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{notes2bib} - [2008/01/16 v1.3b Integrating notes into the bibliography] + [2008/02/26 v1.3c Integrating notes into the bibliography] \begingroup \@ifundefined{eTeXversion} {\PackageError{notes2bib} @@ -25,7 +25,7 @@ pdfTeX, try `pdfelatex'\MessageBreak instead of `pdflatex'} \endgroup\endinput} {\endgroup} -\RequirePackage{xkeyval,etoolbox} +\RequirePackage{xkeyval} \@ifpackagelater{xkeyval}{2005/05/07} {} {\PackageError{notes2bib} @@ -35,15 +35,6 @@ `\@nameuse{ver@etoolbox.sty}'.\MessageBreak This is a fatal error; the package will abort.}% \endinput} -\@ifpackagelater{etoolbox}{2007/10/08} - {} - {\PackageError{notes2bib} - {etoolbox >= 1.3 required} - {notes2bib requires the `etoolbox' package, version 1.3 or - later.\MessageBreak The version loaded is: - `\@nameuse{ver@etoolbox.sty}'.\MessageBreak - This is a fatal error; the package will abort.}% - \endinput} \newcommand*{\niib@tempa}{} \newcommand*{\niib@tempb}{} \newif\ifniib@debug @@ -166,52 +157,33 @@ keyhead=aaa, keynone={}, keytail=zzz} +\let\niib@org@footnote\footnote +\let\niib@org@footnotemark\footnotemark +\let\niib@org@footnotetext\footnotetext \AtBeginDocument{% - \let\niib@org@footnote\footnote - \let\niib@org@footnotemark\footnotemark - \let\niib@org@footnotetext\footnotetext - \let\niib@org@thanks\thanks \@ifpackageloaded{endnotes} {\let\niib@org@endnote\endnote \let\niib@org@endnotemark\endnotemark \let\niib@org@endnotetext\endnotetext - \let\niib@org@theendnotes\theendnotes}} -\AtBeginDocument{% - \let\niib@thanks\thanks - \let\niib@footnotetext\footnotetext - \let\niib@footnotemark\footnotemark - \patchcmd{\niib@thanks}{\footnotetext}{\niib@org@footnotetext} - {\patchcmd{\niib@thanks}{\footnotemark} - {\niib@org@footnotemark} - {\let\thanks\niib@thanks - \let\niib@footnotetext\bibnotetext - \let\niib@footnotemark\bibnotemark - \niib@log@debug{Successfully patched \noexpand\thanks}} - {\niib@log@warn{Failed to patch \noexpand\thanks\MessageBreak - \noexpand\footnotemark\space and - \noexpand\footnotetext\MessageBreak are unmodified}% - \niib@log@debug{Could not substitute - \noexpand\footnotemark\MessageBreak in \noexpand\thanks}}} - {\niib@log@warn{Failed to patch \noexpand\thanks\MessageBreak - \noexpand\footnotemark\space and - \noexpand\footnotetext\MessageBreak are unmodified}% - \niib@log@debug{Could not substitute - \noexpand\footnotetext\MessageBreak in \noexpand\thanks}}} -\newcommand*{\niib@swapfoot}{} -\AtBeginDocument{% - \renewcommand*{\niib@swapfoot}{% - \ifniib@footnotes - \let\footnote\bibnote - \let\footnotemark\niib@footnotemark - \let\footnotetext\niib@footnotetext - \niib@log@debug{Converting footnotes to bibnotes}% - \else - \let\footnote\niib@org@footnote - \let\footnotemark\niib@org@footnotemark - \let\footnotetext\niib@org@footnotetext - \niib@log@debug{Using kernel definition of footnotes}% + \let\niib@org@theendnotes\theendnotes}{}} +\@ifundefined{thanks}{} + {\renewcommand*{\thanks}[1]{% + \niib@org@footnotemark + \protected@xdef\@thanks{\@thanks + \protect\niib@org@footnotetext[\the\c@footnote]{#1}}}} +\newcommand*{\niib@swapfoot}{% + \ifniib@footnotes + \let\footnote\bibnote + \let\footnotemark\bibnotetext + \let\footnotetext\bibnotemark + \niib@log@debug{Converting footnotes to bibnotes}% + \else + \let\footnote\niib@org@footnote + \let\footnotemark\niib@org@footnotemark + \let\footnotetext\niib@org@footnotetext + \niib@log@debug{Using kernel definition of footnotes}% \fi} - \niib@swapfoot} +\AtBeginDocument{\niib@swapfoot} \newcommand*{\niib@swapend}{} \AtBeginDocument{% \@ifpackageloaded{endnotes} @@ -421,13 +393,13 @@ \fi}} \newcommand*{\niib@auxhook}{} \let\niib@auxhook\relax -\AtEndPreamble{% +\AtBeginDocument{% \@ifpackageloaded{biblatex}% {\expandafter\gappto\expandafter\blx@bibfiles\expandafter% {,\niib@prefix\jobname} \niib@log@debug{Added bibnotes database to biblatex file list}}% {\let\niib@org@bib\bibliography - \renewcommand{\bibliography}[1]{% + \renewcommand*{\bibliography}[1]{% \ifnum\the\value{bibnote} > \z@ \niib@org@bib{\niib@prefix\jobname,#1}% \else |