summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdfbin167887 -> 167886 bytes
-rw-r--r--Master/texmf-dist/doc/latex/notes2bib/xnotes2bib.pdfbin325975 -> 333271 bytes
-rw-r--r--Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx2
-rw-r--r--Master/texmf-dist/source/latex/notes2bib/xnotes2bib.dtx290
-rw-r--r--Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty2
-rw-r--r--Master/texmf-dist/tex/latex/notes2bib/xnotes2bib.sty193
6 files changed, 267 insertions, 220 deletions
diff --git a/Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdf b/Master/texmf-dist/doc/latex/notes2bib/notes2bib.pdf
index 2aafc2cad03..6e723a2e9f8 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/doc/latex/notes2bib/xnotes2bib.pdf b/Master/texmf-dist/doc/latex/notes2bib/xnotes2bib.pdf
index d9014166291..80ef9b5ab1c 100644
--- a/Master/texmf-dist/doc/latex/notes2bib/xnotes2bib.pdf
+++ b/Master/texmf-dist/doc/latex/notes2bib/xnotes2bib.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 f57de5c6e80..8c3e15c924e 100644
--- a/Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx
+++ b/Master/texmf-dist/source/latex/notes2bib/notes2bib.dtx
@@ -562,7 +562,7 @@ unsorted bibliography styles are supported.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{notes2bib}
- [2008/09/08 v1.5 Integrating notes into the bibliography]
+ [2008/09/09 v1.5a Integrating notes into the bibliography]
\RequirePackage{xkeyval}[2005/05/07]
% \end{macrocode}
%\begin{macro}{\niib@tempa}
diff --git a/Master/texmf-dist/source/latex/notes2bib/xnotes2bib.dtx b/Master/texmf-dist/source/latex/notes2bib/xnotes2bib.dtx
index a4563bc76fc..aae13e483c0 100644
--- a/Master/texmf-dist/source/latex/notes2bib/xnotes2bib.dtx
+++ b/Master/texmf-dist/source/latex/notes2bib/xnotes2bib.dtx
@@ -106,7 +106,7 @@ This work consists of the file notes2bib.dtx
%</driver>
% \fi
%
-%\CheckSum{468}
+%\CheckSum{478}
%
%\GetFileInfo{\jobname.sty}
%
@@ -282,6 +282,10 @@ This work consists of the file notes2bib.dtx
% approach than \LaTeXe, and so it is possible ideas have been
% missed.
%
+% The author wonders if this package could be implemented using
+% the \pkg{template} system and \pkg{xfootnotes}. Suggestions
+% in this area are welcome!
+%
% In order to use \currpkg, you will need an up-to-date \TeX\
% system and recent copies of \pkg{expl3} and \pkg{xparse}. The
% package is tested with the current SVN release of the \LaTeX3
@@ -322,8 +326,13 @@ This work consists of the file notes2bib.dtx
%<*package>
%\fi
%
-%\section{The code}
+%\section{Implementation}
%\subsection{Preliminaries}
+%\changes{v0.0}{2008/09/09}{Replaced use of \cs{def_new:NNn}
+% and \cs{def:NNn} with \cs{def_new:Npn} and \cs{def:Npn},
+% respectively}
+%\changes{v0.0}{2008/09/09}{Replaced \cs{cs_use:c} by
+% \cs{use:c}}
% The package starts by loading the basics of \pkg{expl3}. To
% keep things clear, first \pkg{l3names} is loaded to do the
% basic identification, and then everything else is started up.
@@ -342,7 +351,7 @@ This work consists of the file notes2bib.dtx
}
\RequirePackage{l3names}
\ProvidesExplPackage
- {xnotes2bib}{2008/09/08}{0.0}
+ {xnotes2bib}{2008/09/09}{0.0}
{Integrating notes into the bibliography (expl3 version)}
\RequirePackage{expl3,xparse}
% \end{macrocode}
@@ -379,8 +388,8 @@ This work consists of the file notes2bib.dtx
% is made so that if there are more than ten notes then the
% number is padded.
% \begin{macrocode}
-\def_new:NNn \niib_thenote: 0 {
- \niib_notename:
+\def_new:Npn \niib_thenote: {
+ \l_niib_notename_tlp
\num_compare:nNnT {\g_niib_totalnotes_int} > {\c_nine}{
\num_compare:nNnF {\g_niib_note_int} > {\c_nine}{
0
@@ -396,14 +405,16 @@ This work consists of the file notes2bib.dtx
%\begin{macro}{\niib_KV_bool:nT}
%\begin{macro}{\niib_KV_choice:nnT}
%\begin{macro}{\niib_KV_cs_n:n}
-%\begin{macro}{\niib_KV_string:n}
+%\begin{macro}{\niib_KV_tlp:n}
+%\changes{v0.0}{2008/09/09}{Renamed and recoded from
+% \cs{niib_KV_string:n}}
% To be going on with, the key-defining macros are created
% using \pkg{keyval}.
% \begin{macrocode}
\RequirePackage{keyval}
\clist_new:N\g_niib_KV_bool_clist
\clist_put_left:Nn\g_niib_KV_bool_clist{true,false}
-\def_new:NNn\niib_KV_bool:nT 2 {
+\def_new:Npn\niib_KV_bool:nT #1#2 {
\define@key{niib}{#1}[true]{
\clist_if_in:cnTF{g_niib_KV_bool_clist}{##1}{
#2
@@ -417,7 +428,7 @@ This work consists of the file notes2bib.dtx
}
}
}
-\def_new:NNn\niib_KV_choice:nnT 3 {
+\def_new:Npn\niib_KV_choice:nnT #1#2#3 {
\cs_if_free:cTF{g_niib_KV_#1_clist}{
\clist_new:c{g_niib_KV_#1_clist}
}{
@@ -437,14 +448,15 @@ This work consists of the file notes2bib.dtx
}
}
}
-\def_new:NNn\niib_KV_cs_n:n 1 {
+\def_new:Npn\niib_KV_cs_n:n #1 {
\define@key{niib}{#1}{
\def:cNn{niib_#1:n} 0 {##1}
}
}
-\def_new:NNn\niib_KV_string:n 1 {
+\def_new:Npn\niib_KV_tlp:n #1 {
+ \tlp_new:c {l_niib_#1_tlp}
\define@key{niib}{#1}{
- \def:cNn{niib_#1:} 0 {##1}
+ \tlp_set:cn {l_niib_#1_tlp}{##1}
}
}
% \end{macrocode}
@@ -459,28 +471,28 @@ This work consists of the file notes2bib.dtx
\niib_KV_cs_n:n{cite}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\niib_field:}
-%\begin{macro}{\niib_key after:}
-%\begin{macro}{\niib_key before:}
-%\begin{macro}{\niib_key mixed:}
-%\begin{macro}{\niib_notename:}
-%\begin{macro}{\niib_prefix:}
-%\begin{macro}{\niib_presort after:}
-%\begin{macro}{\niib_presort before:}
-%\begin{macro}{\niib_presort mixed:}
-%\begin{macro}{\niib_record:}
+%\begin{macro}{\l_niib_field_tlp}
+%\begin{macro}{\l_niib_key after_tlp}
+%\begin{macro}{\l_niib_key before_tlp}
+%\begin{macro}{\l_niib_key mixed_tlp}
+%\begin{macro}{\l_niib_notename_tlp}
+%\begin{macro}{\l_niib_prefix_tlp}
+%\begin{macro}{\l_niib_presort after_tlp}
+%\begin{macro}{\l_niib_presort before_tlp}
+%\begin{macro}{\l_niib_presort mixed_tlp}
+%\begin{macro}{\l_niib_record_tlp}
% A series of value-storing are created.
% \begin{macrocode}
-\niib_KV_string:n{field}
-\niib_KV_string:n{key~after}
-\niib_KV_string:n{key~before}
-\niib_KV_string:n{key~mixed}
-\niib_KV_string:n{notename}
-\niib_KV_string:n{prefix}
-\niib_KV_string:n{presort~after}
-\niib_KV_string:n{presort~before}
-\niib_KV_string:n{presort~mixed}
-\niib_KV_string:n{record}
+\niib_KV_tlp:n{field}
+\niib_KV_tlp:n{key~after}
+\niib_KV_tlp:n{key~before}
+\niib_KV_tlp:n{key~mixed}
+\niib_KV_tlp:n{notename}
+\niib_KV_tlp:n{prefix}
+\niib_KV_tlp:n{presort~after}
+\niib_KV_tlp:n{presort~before}
+\niib_KV_tlp:n{presort~mixed}
+\niib_KV_tlp:n{record}
% \end{macrocode}
%\end{macro}
%\end{macro}
@@ -518,7 +530,7 @@ This work consists of the file notes2bib.dtx
\niib_KV_bool:nT{debug}{
\let:Nc\niib_debug:n{niib_debug_#1:n}
}
-\def_new:NNn\niib_debug_true:n 1 {
+\def_new:Npn\niib_debug_true:n #1 {
\PackageInfo{xnotes2bib}{#1}
}
\let_new:NN\niib_debug_false:n\use_none:n
@@ -526,17 +538,21 @@ This work consists of the file notes2bib.dtx
%\end{macro}
%\end{macro}
%\end{macro}
-%\begin{macro}{\l_niib_after_bool}
-%\begin{macro}{\l_niib_before_bool}
+%\begin{macro}{\l_niib_after_cite_bool}
+%\changes{v0.0}{2008/09/09}{Renamed from
+% \cs{l_niib_after_bool}}
+%\begin{macro}{\l_niib_before_cite_bool}
+%\changes{v0.0}{2008/09/09}{Renamed from
+% \cs{l_niib_before_bool}}
% The \opt{placement} option sets one or other flag if needed.
% \begin{macrocode}
-\bool_new:N\l_niib_after_bool
-\bool_new:N\l_niib_before_bool
+\bool_new:N\l_niib_after_cite_bool
+\bool_new:N\l_niib_before_cite_bool
\niib_KV_choice:nnT{placement}{after,before,mixed}{
- \bool_set_false:N\l_niib_before_bool
- \bool_set_false:N\l_niib_after_bool
- \cs_if_really_exist:cT{l_niib_#1_bool}{
- \bool_set_true:c{l_niib_#1_bool}
+ \bool_set_false:N\l_niib_before_cite_bool
+ \bool_set_false:N\l_niib_after_cite_bool
+ \cs_if_really_exist:cT{l_niib_#1_cite_bool}{
+ \bool_set_true:c{l_niib_#1_cite_bool}
}
}
% \end{macrocode}
@@ -621,7 +637,7 @@ This work consists of the file notes2bib.dtx
\cs_if_free:NT \g_niib_out_stream {
\iow_new:N \g_niib_out_stream
\iow_open:Nn \g_niib_out_stream
- {\niib_prefix:\c_job_name_tlp.bib}
+ {\l_niib_prefix_tlp\c_job_name_tlp.bib}
\iow_expanded:Nn \g_niib_out_stream
{This~is~an~auxiliary~file~used~by~the~`xnotes2bib'~
package.^^J This~file~may~safely~be~deleted.^^J It~
@@ -638,12 +654,12 @@ This work consists of the file notes2bib.dtx
for~note~`#1'
}
\iow_expanded:Nn \g_niib_out_stream {
- @\niib_record:{
+ @\l_niib_record_tlp{
#1,^^J
- \space\space \niib_field:\space
+ \space\space \l_niib_field_tlp\space
=~{\exp_not:n{#2}},^^J
- \space\space \niib_keyname:\space
- =~{#1} ,^^J
+ \space\space \l_niib_keyname_tlp\space
+ =~{\niib_key:#1},^^J
\space\space presort~
=~{\niib_presort:},^^J
}^^J
@@ -661,24 +677,24 @@ This work consists of the file notes2bib.dtx
% that collection can begin again.
% \begin{macrocode}
\NewDocumentCommand{\flushnotestack}{}{
- \clist_if_empty:NF\g_niib_beforecite_clist{
+ \clist_if_empty:NF\g_niib_before_cite_clist{
\if@filesw
\iow_expanded:Nn\@auxout{
\token_to_string:N\niibbeforecite{
- \g_niib_beforecite_clist
+ \g_niib_before_cite_clist
}
}
\fi
}
- \clist_if_empty:NF\g_niib_aftercite_clist{
- \nocite{\g_niib_aftercite_clist}
+ \clist_if_empty:NF\g_niib_after_cite_clist{
+ \nocite{\g_niib_after_cite_clist}
\if@filesw
\iow_expanded:Nn\@auxout{
- \token_to_string:N\niibaftercite{\g_niib_aftercite_clist}
+ \token_to_string:N\niibaftercite{\g_niib_after_cite_clist}
}
\fi
}
- \clist_gclear:N\g_niib_aftercite_clist
+ \clist_gclear:N\g_niib_after_cite_clist
}
% \end{macrocode}
%\end{macro}
@@ -695,13 +711,17 @@ This work consists of the file notes2bib.dtx
% file. This requires two user-space macros, although it is
% not intended the user ever applies them!
%
-%\begin{macro}{\g_niib_oldbeforecite_clist}
-%\begin{macro}{\g_niib_oldaftercite_clist}
+%\begin{macro}{\g_niib_before_cite_old_clist}
+%\changes{v0.0}{2008/09/09}{Renamed from
+% \cs{g_niib_oldbeforecite_clist}}
+%\begin{macro}{\g_niib_after_cite_old_clist}
+%\changes{v0.0}{2008/09/09}{Renamed from
+% \cs{g_niib_oldaftercite_clist}}
% Two lists are created to track the out-of-order citations
% written in the previous run to the \ext{aux} file.
% \begin{macrocode}
-\clist_new:N\g_niib_oldbeforecite_clist
-\clist_new:N\g_niib_oldaftercite_clist
+\clist_new:N\g_niib_before_cite_old_clist
+\clist_new:N\g_niib_after_cite_old_clist
% \end{macrocode}
%\end{macro}
%\end{macro}
@@ -722,11 +742,11 @@ This work consists of the file notes2bib.dtx
% more than once in the \ext{aux} file.
% \begin{macrocode}
\NewDocumentCommand{\niibbeforecite}{m}{
- \clist_gput_right:Nn\g_niib_oldbeforecite_clist{#1}
+ \clist_gput_right:Nn\g_niib_before_cite_old_clist{#1}
\tlp_gput_right:Nn\g_niib_document_tlp{\nocite{#1}}
}
\NewDocumentCommand{\niibaftercite}{m}{
- \clist_gput_right:Nn\g_niib_oldaftercite_clist{#1}
+ \clist_gput_right:Nn\g_niib_after_cite_old_clist{#1}
}
% \end{macrocode}
%\end{macro}
@@ -749,36 +769,39 @@ This work consists of the file notes2bib.dtx
%
%\subsection{Internal macros}
%\begin{macro}{\niib_notemark:n}
+%\changes{v0.0}{2008/09/09}{Replaced \cs{clist_put_right:Nx}
+% by \cs{clist_gput_right:Nx}}
% The citation command itself is in an internal macro, as it is
% called from a few places. Both the \opt{before} and
-% \opt{after} modes require some tracking of the citations. For
-% the moment this is using \cs{clist_put_right:Nx}, but it
-% really should be \cs{clist_gput_right:Nx} (which does not
-% currently exist).
+% \opt{after} modes require some tracking of the citations.
% \begin{macrocode}
-\def_new:NNn \niib_notemark:n 1 {
+\def_new:Npn \niib_notemark:n #1 {
\niib_debug:n{Creating~citation~for~note~`#1'}
- \bool_if:NT\l_niib_before_bool{
+ \bool_if:NT\l_niib_before_cite_bool{
\niib_debug:n{Note~`#1'~before~real~citations}
- \clist_put_right:Nx\g_niib_beforecite_clist{#1}
+ \clist_gput_right:Nx\g_niib_before_cite_clist{#1}
}
- \bool_if:NTF\l_niib_after_bool{
+ \bool_if:NTF\l_niib_after_cite_bool{
\niib_debug:n{Note~`#1'~after~real~citations}
- \clist_put_right:Nx\g_niib_aftercite_clist{#1}
- \niib_aftercite:n{#1}
+ \clist_gput_right:Nx\g_niib_after_cite_clist{#1}
+ \niib_after_cite:n{#1}
}{
\niib_cite:n{#1}
}
}
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\g_niib_beforecite_clist}
-%\begin{macro}{\g_niib_aftercite_clist}
+%\begin{macro}{\g_niib_before_cite_clist}
+%\changes{v0.0}{2008/09/09}{Renamed from
+% \cs{g_niib_beforecite_clist}}
+%\begin{macro}{\g_niib_after_cite_clist}
+%\changes{v0.0}{2008/09/09}{Renamed from
+% \cs{g_niib_aftercite_clist}}
% Out-of-order citations in the current run are followed using
% two clists.
% \begin{macrocode}
-\clist_new:N\g_niib_beforecite_clist
-\clist_new:N\g_niib_aftercite_clist
+\clist_new:N\g_niib_before_cite_clist
+\clist_new:N\g_niib_after_cite_clist
% \end{macrocode}
%\end{macro}
%\end{macro}
@@ -787,25 +810,25 @@ This work consists of the file notes2bib.dtx
% The key and presort information for the database needs to be
% created dynamically from the various keys.
% \begin{macrocode}
-\def_new:NNn\niib_key: 0 {
- \bool_if:NTF\l_niib_before_bool{
- \cs_use:c{niib_key~before:}
+\def_new:Npn\niib_key: {
+ \bool_if:NTF\l_niib_before_cite_bool{
+ \tlp_use:c{l_niib_key~before_tlp}
}{
- \bool_if:NTF\l_niib_after_bool{
- \cs_use:c{niib_key~after:}
+ \bool_if:NTF\l_niib_after_cite_bool{
+ \tlp_use:c{l_niib_key~after_tlp}
}{
- \cs_use:c{niib_within~key:}
+ \tlp_use:c{l_niib_key~mixed_tlp}
}
}
}
-\def_new:NNn\niib_presort: 0 {
- \bool_if:NTF\l_niib_before_bool{
- \cs_use:c{niib_presort~before:}
+\def_new:Npn\niib_presort: {
+ \bool_if:NTF\l_niib_before_cite_bool{
+ \tlp_use:c{l_niib_presort~before_tlp}
}{
- \bool_if:NTF\l_niib_after_bool{
- \cs_use:c{niib_presort~after:}
+ \bool_if:NTF\l_niib_after_cite_bool{
+ \tlp_use:c{l_niib_presort~after_tlp}
}{
- \cs_use:c{niib_within~presort:}
+ \tlp_use:c{l_niib_presort~mixed_tlp}
}
}
}
@@ -819,25 +842,25 @@ This work consists of the file notes2bib.dtx
% Conversion of footnotes and endnotes takes place using four
% dedicated macros, which can then be called by csname.
% \begin{macrocode}
-\def_new:NNn\niib_convert_endnotes_false: 0 {
+\def_new:Npn\niib_convert_endnotes_false: {
\niib_debug:n{Restoring~normal~endnotes}
\let:NN\endnote\niib_saved_endnote:
\let:NN\endnotemark\niib_saved_endnotemark:
\let:NN\endnotetext\niib_saved_endnotetext:
}
-\def_new:NNn\niib_convert_endnotes_true: 0 {
+\def_new:Npn\niib_convert_endnotes_true: {
\niib_debug:n{Converting~endnotes~to~bibnotes}
\let:NN\endnote\bibnote
\let:NN\endnotemark\bibnotemark
\let:NN\endnotetext\bibnotetext
}
-\def_new:NNn\niib_convert_footnotes_false: 0 {
+\def_new:Npn\niib_convert_footnotes_false: {
\niib_debug:n{Restoring~normal~footnotes}
\let:NN\footnote\niib_saved_footnote:
\let:NN\footnotemark\niib_saved_footnotemark:
\let:NN\footnotetext\niib_saved_footnotetext:
}
-\def_new:NNn\niib_convert_footnotes_true: 0 {
+\def_new:Npn\niib_convert_footnotes_true: {
\niib_debug:n{Converting~footnotes~to~bibnotes}
\let:NN\footnote\bibnote
\let:NN\footnotemark\bibnotemark
@@ -852,7 +875,7 @@ This work consists of the file notes2bib.dtx
% The \cs{thanks} macro has to be replaced by one that uses the
% original \cs{footnotemark} and \cs{footnotetext}.
% \begin{macrocode}
-\def:NNn\thanks 1 {
+\def:Npn\thanks #1 {
\niib_saved_footnotemark:
\protected@xdef\@thanks{\@thanks
\protect\niib_saved_footnotetext:[\the\c@footnote]{#1}}
@@ -861,10 +884,20 @@ This work consists of the file notes2bib.dtx
%\end{macro}
%
%\subsection{Finalising}
-%\begin{macro}{\niib_keyname:}
+%\begin{macro}{\l_niib_keyname_tlp}
+%\changes{v0.0}{2008/09/09}{Renamed from \cs{niib_keyname:}}
+% The name used for the \texttt{key} field is stored a little
+% later. The store is set up here.
+% \begin{macrocode}
+\tlp_new:N \l_niib_keyname_tlp
+% \end{macrocode}
+%\end{macro}
+%
%\begin{macro}{\niib_biliography:n}
%\begin{macro}{\printbibnotes}
-%\begin{macro}{\niib_aftercite:n}
+%\begin{macro}{\niib_after_cite:n}
+%\changes{v0.0}{2008/09/09}{Renamed from
+% \cs{niib_aftercite:n}}
% Various macro definitions depend on the loading of other
% packages. When \pkg{biblatex} is in use, life is rather
% different to when the standard citation method is
@@ -872,7 +905,7 @@ This work consists of the file notes2bib.dtx
% sorting: \pkg{biblatex} uses a different macro name for this
% function than normal \LaTeX\ does. The \cs{printbibnotes}
% user macro always prints the bibliography, using only the
-% notes database if possible. The \cs{niib_aftercite:n} macro
+% notes database if possible. The \cs{niib_after_cite:n} macro
% has to keep a track of the appropriate bibnotes and also
% fiddle with the \cs{@filesw} switch to prevent writing at the
% wrong time.
@@ -882,25 +915,27 @@ This work consists of the file notes2bib.dtx
Beginning~\token_to_string:N\AtBeginDocument\space tasks
}
\@ifpackageloaded{biblatex}{
- \def_new:NNn \niib_keyname: 0 {keysort}
+ \tlp_set:Nn \l_niib_keyname_tlp {keysort}
\gappto\blx@bibfiles{,\niib_prefix\c_job_name_tlp}
\let_new:NN\printbibnotes\printbibliography
- \def_new:NNn\niib_aftercite:n 1 {
+ \def_new:Npn\niib_after_cite:n #1 {
\AtNextCite{\@fileswfalse}
\niib_cite:n{#1}
}
}{
- \def_new:NNn \niib_keyname: 0 {key}
+ \tlp_gset:Nn \l_niib_keyname_tlp {key}
\let_new:NN\niib_biliography:n\bibliography
- \def:NNn\bibliography 1 {
+ \def:Npn\bibliography #1 {
\int_compare:nNnTF{\g_niib_note_int}={\c_zero}{
\niib_biliography:n{#1}
}{
- \niib_biliography:n{#1,\niib_prefix:\c_job_name_tlp}
+ \niib_biliography:n{
+ #1,\l_niib_prefix_tlp\c_job_name_tlp
+ }
}
}
\NewDocumentCommand{\printbibnotes}{}{
- \niib_biliography:n{\niib_prefix:\c_job_name_tlp}
+ \niib_biliography:n{\l_niib_prefix_tlp\c_job_name_tlp}
}
% \end{macrocode}
%\begin{macro}{\ifniib@filesw}
@@ -912,23 +947,27 @@ This work consists of the file notes2bib.dtx
% \end{macrocode}
%\end{macro}
%\begin{macro}{\@restore@auxhandle}
+%\changes{v0.0}{2008/09/09}{Moved patch code to after
+% \cs{AtBeginDocument}}
%\begin{macro}{\niib_auxhandle:}
% If \pkg{cite} is loaded, there is further trouble.
% \begin{macrocode}
\@ifpackageloaded{cite}{
- \def_new:NNn\niib_aftercite:n 1 {
- \let:NN\ifniib@filesw\if@filesw
+ \def_new:Npn\niib_after_cite:n #1 {
+ \let:NN \ifniib@filesw \if@filesw
\@fileswfalse
- \def:NNn{\niib_auxhandle:} 0 {
- \let:NN\if@filesw\ifniib@filesw
- \let:NN\niib_auxhandle:\scan_stop:
+ \def:Npn \niib_auxhandle: {
+ \let:NN \if@filesw \ifniib@filesw
+ \let:NN \niib_auxhandle: \scan_stop:
}
\niib_cite:n{#1}
}
- \cs_if_exist:NTF\@restore@auxhandle{
- \tlp_put_right:Nn\@restore@auxhandle{\niib_auxhandle:}
- }{
- \def_new:NNn\@restore@auxhandle 0 {\niib_auxhandle:}
+ \tlp_gput_right:Nn \g_niib_document_tlp {
+ \cs_if_exist:NTF\@restore@auxhandle{
+ \tlp_put_right:Nn\@restore@auxhandle{\niib_auxhandle:}
+ }{
+ \def_new:Npn\@restore@auxhandle {\niib_auxhandle:}
+ }
}
\let_new:NN\niib_auxhandle:\scan_stop:
% \end{macrocode}
@@ -937,7 +976,7 @@ This work consists of the file notes2bib.dtx
% Life is slightly easier without \pkg{cite}.
% \begin{macrocode}
}{
- \def_new:NNn\niib_aftercite:n 1 {
+ \def_new:Npn\niib_after_cite:n #1 {
\let\ifniib@filesw\if@filesw
\@fileswfalse
\niib_cite:n{#1}
@@ -949,7 +988,6 @@ This work consists of the file notes2bib.dtx
%\end{macro}
%\end{macro}
%\end{macro}
-%\end{macro}
%\begin{macro}{\niib_saved_footnote:}
%\begin{macro}{\niib_saved_footnotemark:}
%\begin{macro}{\niib_saved_footnotetext:}
@@ -975,10 +1013,10 @@ This work consists of the file notes2bib.dtx
\niib_convert_endnotes:
\niib_convert_footnotes:
\niib_KV_bool:nT{convert~endnotes}{
- \cs_use:c{niib_convert_endnotes_#1:}
+ \use:c{niib_convert_endnotes_#1:}
}
\niib_KV_bool:nT{convert~footnotes}{
- \cs_use:c{niib_convert_footnotes_#1:}
+ \use:c{niib_convert_footnotes_#1:}
}
\PackageInfo{xnotes2bib}{
Finished~\token_to_string:N\AtBeginDocument\space tasks
@@ -991,21 +1029,21 @@ This work consists of the file notes2bib.dtx
%\end{macro}
%\end{macro}
%\end{macro}
-%\begin{macro}{\niib_reruncheck:n}
+%\begin{macro}{\niib_rerun_check:n}
% If either of the out-of-order options are in use, then a
% comparison of the citations used with those used in the last
% run is needed. There are a couple of easy checks to make: if
% only one list is empty, there must be changes. If both lists
% are occupied, a check of every item must be made.
% \begin{macrocode}
-\def_new:NNn\niib_rerun_check:n 1 {
+\def_new:Npn\niib_rerun_check:n #1 {
\clist_if_empty:cTF {g_niib_old#1cite_clist}{
\clist_if_empty:cF {g_niib_#1cite_clist}{
- \niib_rerun_log:n {#1}
+ \niib_rerun_log:
}
}{
\clist_if_empty:cTF {g_niib_#1cite_clist}{
- \niib_rerun_log:n {#1}
+ \niib_rerun_log:
% \end{macrocode}
% If both lists are occupied by data, the total contents of
% each one have to be compared with the other. This needs to
@@ -1013,7 +1051,7 @@ This work consists of the file notes2bib.dtx
% \begin{macrocode}
}{
\bool_set_false:N\l_tmpa_bool
- \def:NNn\niib_rerun_test:n 1 {
+ \def:Npn\niib_rerun_test:n ##1 {
\clist_if_in:cnTF{g_niib_old#1cite_clist}{##1}{
\bool_set_true:N\l_tmpa_bool
\clist_map_break:w
@@ -1022,7 +1060,7 @@ This work consists of the file notes2bib.dtx
}
\clist_map_function:cN{g_niib_#1cite_clist}
\niib_rerun_test:n
- \def:NNn\niib_rerun_test:n 1 {
+ \def:Npn\niib_rerun_test:n ##1 {
\clist_if_in:cnTF{g_niib_#1cite_clist}{##1}{
\bool_set_true:N\l_tmpa_bool
\clist_map_break:w
@@ -1032,7 +1070,7 @@ This work consists of the file notes2bib.dtx
\clist_map_function:cN{g_niib_old#1cite_clist}
\niib_rerun_test:n
\bool_if:NF\l_tmpa_bool{
- \niib_rerun_log:n {#1}
+ \niib_rerun_log:
}
}
}
@@ -1042,16 +1080,17 @@ This work consists of the file notes2bib.dtx
%\begin{macro}{\niib_rerun_test:n}
% This is redefined in the above, but is made available here.
% \begin{macrocode}
-\def:NNn\niib_rerun_test:n 0 {}
+\let_new:NN \niib_rerun_test:n \use_none_i:n
% \end{macrocode}
%\end{macro}
-%\begin{macro}{\niib_rerun_log:n}
+%\begin{macro}{\niib_rerun_log:}
+%\changes{v0.0}{2008/09/09}{Maximum of one message per run}
% The information message needs to be available in a few
% different places.
% \begin{macrocode}
-\def_new:NNn\niib_rerun_log:n 1 {
+\def_new:Npn\niib_rerun_log: {
\PackageInfo{xnotes2bib}{
- To~get~`#1'~notes~in~the~correct~order,~please\MessageBreak
+ To~get~notes~in~the~correct~order,~please\MessageBreak
rerun~LaTeX,~(re)run~BibTeX~on~the~file~\c_job_name_tlp.aux
\MessageBreak and~rerun~LaTeX~again~afterwards
}
@@ -1060,6 +1099,7 @@ This work consists of the file notes2bib.dtx
REQ:2:bibtex:REQ\iow_newline:
REQ:1:latex:REQ\iow_newline:
}
+ \let\niib_rerun_log:\scan_stop:
}
% \end{macrocode}
%\end{macro}
@@ -1076,7 +1116,7 @@ This work consists of the file notes2bib.dtx
}
}
\num_compare:nNnF{\g_niib_totalnotes_int}={\g_niib_note_int}{
- \niib_rerun_log:n
+ \niib_rerun_log:
}
\cs_if_free:NF \g_niib_out_stream{
\iow_close:N \g_niib_out_stream
@@ -1095,7 +1135,7 @@ This work consists of the file notes2bib.dtx
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{l3names}
\ProvidesExplPackage
- {jawl3doc}{2008/09/08}{0.0}
+ {jawl3doc}{2008/09/09}{0.0}
{Additions to l3doc (JAW)}
\DeleteShortVerb\|
\DeleteShortVerb\"
@@ -1114,7 +1154,7 @@ This work consists of the file notes2bib.dtx
\NewDocumentCommand{\opt}{m}{\texttt{#1}}
\int_new:N \g_jawldoc_arg_int
-\def_new:NNn \jawldoc_thearg: 0 {
+\def_new:Npn \jawldoc_thearg: {
\int_to_arabic:n \g_jawldoc_arg_int
}
\NewDocumentCommand{\darg}{m}{
@@ -1135,7 +1175,7 @@ This work consists of the file notes2bib.dtx
\MakePrivateLetters
\Describe_Option:
}
-\def_new:NNn\Describe_Option: 1 {
+\def_new:Npn \Describe_Option: #1 {
\group_end:
\marginpar{
\raggedleft\PrintDescribeEnv{#1}
diff --git a/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty b/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty
index 99e10380db2..62a94d290cb 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/09/08 v1.5 Integrating notes into the bibliography]
+ [2008/09/09 v1.5a Integrating notes into the bibliography]
\RequirePackage{xkeyval}[2005/05/07]
\newcommand*{\niib@tempa}{}
\newcommand*{\niib@tempb}{}
diff --git a/Master/texmf-dist/tex/latex/notes2bib/xnotes2bib.sty b/Master/texmf-dist/tex/latex/notes2bib/xnotes2bib.sty
index af6f5b0eb25..78cb7a6f487 100644
--- a/Master/texmf-dist/tex/latex/notes2bib/xnotes2bib.sty
+++ b/Master/texmf-dist/tex/latex/notes2bib/xnotes2bib.sty
@@ -26,7 +26,7 @@
}
\RequirePackage{l3names}
\ProvidesExplPackage
- {xnotes2bib}{2008/09/08}{0.0}
+ {xnotes2bib}{2008/09/09}{0.0}
{Integrating notes into the bibliography (expl3 version)}
\RequirePackage{expl3,xparse}
\DeclareOption*{
@@ -37,8 +37,8 @@
}
\ProcessOptions\scan_stop:
\int_new:N \g_niib_note_int
-\def_new:NNn \niib_thenote: 0 {
- \niib_notename:
+\def_new:Npn \niib_thenote: {
+ \l_niib_notename_tlp
\num_compare:nNnT {\g_niib_totalnotes_int} > {\c_nine}{
\num_compare:nNnF {\g_niib_note_int} > {\c_nine}{
0
@@ -49,7 +49,7 @@
\RequirePackage{keyval}
\clist_new:N\g_niib_KV_bool_clist
\clist_put_left:Nn\g_niib_KV_bool_clist{true,false}
-\def_new:NNn\niib_KV_bool:nT 2 {
+\def_new:Npn\niib_KV_bool:nT #1#2 {
\define@key{niib}{#1}[true]{
\clist_if_in:cnTF{g_niib_KV_bool_clist}{##1}{
#2
@@ -63,7 +63,7 @@
}
}
}
-\def_new:NNn\niib_KV_choice:nnT 3 {
+\def_new:Npn\niib_KV_choice:nnT #1#2#3 {
\cs_if_free:cTF{g_niib_KV_#1_clist}{
\clist_new:c{g_niib_KV_#1_clist}
}{
@@ -83,27 +83,28 @@
}
}
}
-\def_new:NNn\niib_KV_cs_n:n 1 {
+\def_new:Npn\niib_KV_cs_n:n #1 {
\define@key{niib}{#1}{
\def:cNn{niib_#1:n} 0 {##1}
}
}
-\def_new:NNn\niib_KV_string:n 1 {
+\def_new:Npn\niib_KV_tlp:n #1 {
+ \tlp_new:c {l_niib_#1_tlp}
\define@key{niib}{#1}{
- \def:cNn{niib_#1:} 0 {##1}
+ \tlp_set:cn {l_niib_#1_tlp}{##1}
}
}
\niib_KV_cs_n:n{cite}
-\niib_KV_string:n{field}
-\niib_KV_string:n{key~after}
-\niib_KV_string:n{key~before}
-\niib_KV_string:n{key~mixed}
-\niib_KV_string:n{notename}
-\niib_KV_string:n{prefix}
-\niib_KV_string:n{presort~after}
-\niib_KV_string:n{presort~before}
-\niib_KV_string:n{presort~mixed}
-\niib_KV_string:n{record}
+\niib_KV_tlp:n{field}
+\niib_KV_tlp:n{key~after}
+\niib_KV_tlp:n{key~before}
+\niib_KV_tlp:n{key~mixed}
+\niib_KV_tlp:n{notename}
+\niib_KV_tlp:n{prefix}
+\niib_KV_tlp:n{presort~after}
+\niib_KV_tlp:n{presort~before}
+\niib_KV_tlp:n{presort~mixed}
+\niib_KV_tlp:n{record}
\let_new:NN\niib_convert_endnotes:\scan_stop:
\let_new:NN\niib_convert_footnotes:\scan_stop:
\niib_KV_bool:nT{convert~endnotes}{
@@ -115,17 +116,17 @@
\niib_KV_bool:nT{debug}{
\let:Nc\niib_debug:n{niib_debug_#1:n}
}
-\def_new:NNn\niib_debug_true:n 1 {
+\def_new:Npn\niib_debug_true:n #1 {
\PackageInfo{xnotes2bib}{#1}
}
\let_new:NN\niib_debug_false:n\use_none:n
-\bool_new:N\l_niib_after_bool
-\bool_new:N\l_niib_before_bool
+\bool_new:N\l_niib_after_cite_bool
+\bool_new:N\l_niib_before_cite_bool
\niib_KV_choice:nnT{placement}{after,before,mixed}{
- \bool_set_false:N\l_niib_before_bool
- \bool_set_false:N\l_niib_after_bool
- \cs_if_really_exist:cT{l_niib_#1_bool}{
- \bool_set_true:c{l_niib_#1_bool}
+ \bool_set_false:N\l_niib_before_cite_bool
+ \bool_set_false:N\l_niib_after_cite_bool
+ \cs_if_really_exist:cT{l_niib_#1_cite_bool}{
+ \bool_set_true:c{l_niib_#1_cite_bool}
}
}
\setkeys{niib}{
@@ -165,7 +166,7 @@
\cs_if_free:NT \g_niib_out_stream {
\iow_new:N \g_niib_out_stream
\iow_open:Nn \g_niib_out_stream
- {\niib_prefix:\c_job_name_tlp.bib}
+ {\l_niib_prefix_tlp\c_job_name_tlp.bib}
\iow_expanded:Nn \g_niib_out_stream
{This~is~an~auxiliary~file~used~by~the~`xnotes2bib'~
package.^^J This~file~may~safely~be~deleted.^^J It~
@@ -176,12 +177,12 @@
for~note~`#1'
}
\iow_expanded:Nn \g_niib_out_stream {
- @\niib_record:{
+ @\l_niib_record_tlp{
#1,^^J
- \space\space \niib_field:\space
+ \space\space \l_niib_field_tlp\space
=~{\exp_not:n{#2}},^^J
- \space\space \niib_keyname:\space
- =~{#1} ,^^J
+ \space\space \l_niib_keyname_tlp\space
+ =~{\niib_key:#1},^^J
\space\space presort~
=~{\niib_presort:},^^J
}^^J
@@ -189,152 +190,157 @@
\fi
}
\NewDocumentCommand{\flushnotestack}{}{
- \clist_if_empty:NF\g_niib_beforecite_clist{
+ \clist_if_empty:NF\g_niib_before_cite_clist{
\if@filesw
\iow_expanded:Nn\@auxout{
\token_to_string:N\niibbeforecite{
- \g_niib_beforecite_clist
+ \g_niib_before_cite_clist
}
}
\fi
}
- \clist_if_empty:NF\g_niib_aftercite_clist{
- \nocite{\g_niib_aftercite_clist}
+ \clist_if_empty:NF\g_niib_after_cite_clist{
+ \nocite{\g_niib_after_cite_clist}
\if@filesw
\iow_expanded:Nn\@auxout{
- \token_to_string:N\niibaftercite{\g_niib_aftercite_clist}
+ \token_to_string:N\niibaftercite{\g_niib_after_cite_clist}
}
\fi
}
- \clist_gclear:N\g_niib_aftercite_clist
+ \clist_gclear:N\g_niib_after_cite_clist
}
\NewDocumentCommand{\niibsetup}{m}{\setkeys{niib}{#1}}
-\clist_new:N\g_niib_oldbeforecite_clist
-\clist_new:N\g_niib_oldaftercite_clist
+\clist_new:N\g_niib_before_cite_old_clist
+\clist_new:N\g_niib_after_cite_old_clist
\tlp_new:N\g_niib_document_tlp
\tlp_put_right:Nn\document{\g_niib_document_tlp}
\NewDocumentCommand{\niibbeforecite}{m}{
- \clist_gput_right:Nn\g_niib_oldbeforecite_clist{#1}
+ \clist_gput_right:Nn\g_niib_before_cite_old_clist{#1}
\tlp_gput_right:Nn\g_niib_document_tlp{\nocite{#1}}
}
\NewDocumentCommand{\niibaftercite}{m}{
- \clist_gput_right:Nn\g_niib_oldaftercite_clist{#1}
+ \clist_gput_right:Nn\g_niib_after_cite_old_clist{#1}
}
\int_new:N \g_niib_totalnotes_int
\NewDocumentCommand{\niibtotalnotes}{m}{
\int_gset:Nn \g_niib_totalnotes_int {#1}
}
-\def_new:NNn \niib_notemark:n 1 {
+\def_new:Npn \niib_notemark:n #1 {
\niib_debug:n{Creating~citation~for~note~`#1'}
- \bool_if:NT\l_niib_before_bool{
+ \bool_if:NT\l_niib_before_cite_bool{
\niib_debug:n{Note~`#1'~before~real~citations}
- \clist_put_right:Nx\g_niib_beforecite_clist{#1}
+ \clist_gput_right:Nx\g_niib_before_cite_clist{#1}
}
- \bool_if:NTF\l_niib_after_bool{
+ \bool_if:NTF\l_niib_after_cite_bool{
\niib_debug:n{Note~`#1'~after~real~citations}
- \clist_put_right:Nx\g_niib_aftercite_clist{#1}
- \niib_aftercite:n{#1}
+ \clist_gput_right:Nx\g_niib_after_cite_clist{#1}
+ \niib_after_cite:n{#1}
}{
\niib_cite:n{#1}
}
}
-\clist_new:N\g_niib_beforecite_clist
-\clist_new:N\g_niib_aftercite_clist
-\def_new:NNn\niib_key: 0 {
- \bool_if:NTF\l_niib_before_bool{
- \cs_use:c{niib_key~before:}
+\clist_new:N\g_niib_before_cite_clist
+\clist_new:N\g_niib_after_cite_clist
+\def_new:Npn\niib_key: {
+ \bool_if:NTF\l_niib_before_cite_bool{
+ \tlp_use:c{l_niib_key~before_tlp}
}{
- \bool_if:NTF\l_niib_after_bool{
- \cs_use:c{niib_key~after:}
+ \bool_if:NTF\l_niib_after_cite_bool{
+ \tlp_use:c{l_niib_key~after_tlp}
}{
- \cs_use:c{niib_within~key:}
+ \tlp_use:c{l_niib_key~mixed_tlp}
}
}
}
-\def_new:NNn\niib_presort: 0 {
- \bool_if:NTF\l_niib_before_bool{
- \cs_use:c{niib_presort~before:}
+\def_new:Npn\niib_presort: {
+ \bool_if:NTF\l_niib_before_cite_bool{
+ \tlp_use:c{l_niib_presort~before_tlp}
}{
- \bool_if:NTF\l_niib_after_bool{
- \cs_use:c{niib_presort~after:}
+ \bool_if:NTF\l_niib_after_cite_bool{
+ \tlp_use:c{l_niib_presort~after_tlp}
}{
- \cs_use:c{niib_within~presort:}
+ \tlp_use:c{l_niib_presort~mixed_tlp}
}
}
}
-\def_new:NNn\niib_convert_endnotes_false: 0 {
+\def_new:Npn\niib_convert_endnotes_false: {
\niib_debug:n{Restoring~normal~endnotes}
\let:NN\endnote\niib_saved_endnote:
\let:NN\endnotemark\niib_saved_endnotemark:
\let:NN\endnotetext\niib_saved_endnotetext:
}
-\def_new:NNn\niib_convert_endnotes_true: 0 {
+\def_new:Npn\niib_convert_endnotes_true: {
\niib_debug:n{Converting~endnotes~to~bibnotes}
\let:NN\endnote\bibnote
\let:NN\endnotemark\bibnotemark
\let:NN\endnotetext\bibnotetext
}
-\def_new:NNn\niib_convert_footnotes_false: 0 {
+\def_new:Npn\niib_convert_footnotes_false: {
\niib_debug:n{Restoring~normal~footnotes}
\let:NN\footnote\niib_saved_footnote:
\let:NN\footnotemark\niib_saved_footnotemark:
\let:NN\footnotetext\niib_saved_footnotetext:
}
-\def_new:NNn\niib_convert_footnotes_true: 0 {
+\def_new:Npn\niib_convert_footnotes_true: {
\niib_debug:n{Converting~footnotes~to~bibnotes}
\let:NN\footnote\bibnote
\let:NN\footnotemark\bibnotemark
\let:NN\footnotetext\bibnotetext
}
-\def:NNn\thanks 1 {
+\def:Npn\thanks #1 {
\niib_saved_footnotemark:
\protected@xdef\@thanks{\@thanks
\protect\niib_saved_footnotetext:[\the\c@footnote]{#1}}
}
+\tlp_new:N \l_niib_keyname_tlp
\AtBeginDocument{
\PackageInfo{xnotes2bib}{
Beginning~\token_to_string:N\AtBeginDocument\space tasks
}
\@ifpackageloaded{biblatex}{
- \def_new:NNn \niib_keyname: 0 {keysort}
+ \tlp_set:Nn \l_niib_keyname_tlp {keysort}
\gappto\blx@bibfiles{,\niib_prefix\c_job_name_tlp}
\let_new:NN\printbibnotes\printbibliography
- \def_new:NNn\niib_aftercite:n 1 {
+ \def_new:Npn\niib_after_cite:n #1 {
\AtNextCite{\@fileswfalse}
\niib_cite:n{#1}
}
}{
- \def_new:NNn \niib_keyname: 0 {key}
+ \tlp_gset:Nn \l_niib_keyname_tlp {key}
\let_new:NN\niib_biliography:n\bibliography
- \def:NNn\bibliography 1 {
+ \def:Npn\bibliography #1 {
\int_compare:nNnTF{\g_niib_note_int}={\c_zero}{
\niib_biliography:n{#1}
}{
- \niib_biliography:n{#1,\niib_prefix:\c_job_name_tlp}
+ \niib_biliography:n{
+ #1,\l_niib_prefix_tlp\c_job_name_tlp
+ }
}
}
\NewDocumentCommand{\printbibnotes}{}{
- \niib_biliography:n{\niib_prefix:\c_job_name_tlp}
+ \niib_biliography:n{\l_niib_prefix_tlp\c_job_name_tlp}
}
\newif\ifniib@filesw
\@ifpackageloaded{cite}{
- \def_new:NNn\niib_aftercite:n 1 {
- \let:NN\ifniib@filesw\if@filesw
+ \def_new:Npn\niib_after_cite:n #1 {
+ \let:NN \ifniib@filesw \if@filesw
\@fileswfalse
- \def:NNn{\niib_auxhandle:} 0 {
- \let:NN\if@filesw\ifniib@filesw
- \let:NN\niib_auxhandle:\scan_stop:
+ \def:Npn \niib_auxhandle: {
+ \let:NN \if@filesw \ifniib@filesw
+ \let:NN \niib_auxhandle: \scan_stop:
}
\niib_cite:n{#1}
}
- \cs_if_exist:NTF\@restore@auxhandle{
- \tlp_put_right:Nn\@restore@auxhandle{\niib_auxhandle:}
- }{
- \def_new:NNn\@restore@auxhandle 0 {\niib_auxhandle:}
+ \tlp_gput_right:Nn \g_niib_document_tlp {
+ \cs_if_exist:NTF\@restore@auxhandle{
+ \tlp_put_right:Nn\@restore@auxhandle{\niib_auxhandle:}
+ }{
+ \def_new:Npn\@restore@auxhandle {\niib_auxhandle:}
+ }
}
\let_new:NN\niib_auxhandle:\scan_stop:
}{
- \def_new:NNn\niib_aftercite:n 1 {
+ \def_new:Npn\niib_after_cite:n #1 {
\let\ifniib@filesw\if@filesw
\@fileswfalse
\niib_cite:n{#1}
@@ -351,26 +357,26 @@
\niib_convert_endnotes:
\niib_convert_footnotes:
\niib_KV_bool:nT{convert~endnotes}{
- \cs_use:c{niib_convert_endnotes_#1:}
+ \use:c{niib_convert_endnotes_#1:}
}
\niib_KV_bool:nT{convert~footnotes}{
- \cs_use:c{niib_convert_footnotes_#1:}
+ \use:c{niib_convert_footnotes_#1:}
}
\PackageInfo{xnotes2bib}{
Finished~\token_to_string:N\AtBeginDocument\space tasks
}
}
-\def_new:NNn\niib_rerun_check:n 1 {
+\def_new:Npn\niib_rerun_check:n #1 {
\clist_if_empty:cTF {g_niib_old#1cite_clist}{
\clist_if_empty:cF {g_niib_#1cite_clist}{
- \niib_rerun_log:n {#1}
+ \niib_rerun_log:
}
}{
\clist_if_empty:cTF {g_niib_#1cite_clist}{
- \niib_rerun_log:n {#1}
+ \niib_rerun_log:
}{
\bool_set_false:N\l_tmpa_bool
- \def:NNn\niib_rerun_test:n 1 {
+ \def:Npn\niib_rerun_test:n ##1 {
\clist_if_in:cnTF{g_niib_old#1cite_clist}{##1}{
\bool_set_true:N\l_tmpa_bool
\clist_map_break:w
@@ -379,7 +385,7 @@
}
\clist_map_function:cN{g_niib_#1cite_clist}
\niib_rerun_test:n
- \def:NNn\niib_rerun_test:n 1 {
+ \def:Npn\niib_rerun_test:n ##1 {
\clist_if_in:cnTF{g_niib_#1cite_clist}{##1}{
\bool_set_true:N\l_tmpa_bool
\clist_map_break:w
@@ -389,15 +395,15 @@
\clist_map_function:cN{g_niib_old#1cite_clist}
\niib_rerun_test:n
\bool_if:NF\l_tmpa_bool{
- \niib_rerun_log:n {#1}
+ \niib_rerun_log:
}
}
}
}
-\def:NNn\niib_rerun_test:n 0 {}
-\def_new:NNn\niib_rerun_log:n 1 {
+\let_new:NN \niib_rerun_test:n \use_none_i:n
+\def_new:Npn\niib_rerun_log: {
\PackageInfo{xnotes2bib}{
- To~get~`#1'~notes~in~the~correct~order,~please\MessageBreak
+ To~get~notes~in~the~correct~order,~please\MessageBreak
rerun~LaTeX,~(re)run~BibTeX~on~the~file~\c_job_name_tlp.aux
\MessageBreak and~rerun~LaTeX~again~afterwards
}
@@ -406,6 +412,7 @@
REQ:2:bibtex:REQ\iow_newline:
REQ:1:latex:REQ\iow_newline:
}
+ \let\niib_rerun_log:\scan_stop:
}
\AtEndDocument{
\niib_rerun_check:n{before}
@@ -417,7 +424,7 @@
}
}
\num_compare:nNnF{\g_niib_totalnotes_int}={\g_niib_note_int}{
- \niib_rerun_log:n
+ \niib_rerun_log:
}
\cs_if_free:NF \g_niib_out_stream{
\iow_close:N \g_niib_out_stream