summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-10-26 15:40:51 +0000
committerKarl Berry <karl@freefriends.org>2008-10-26 15:40:51 +0000
commit70da966888998bdc516ca75b91435d29746adb7d (patch)
tree303f086dbc391d25149652ad6b67d246e00d7fcc /Master/texmf-dist/tex
parentd8e34c095c3416f709b61aeec497806cf99813e6 (diff)
notes2bib 1.6 (22oct08)
git-svn-id: svn://tug.org/texlive/trunk@11061 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty20
-rw-r--r--Master/texmf-dist/tex/latex/notes2bib/xnotes2bib.sty54
2 files changed, 47 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty b/Master/texmf-dist/tex/latex/notes2bib/notes2bib.sty
index ba97c93410a..6c2275b4e9b 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/24 v1.5b Integrating notes into the bibliography]
+ [2008/10/22 v1.6 Integrating notes into the bibliography]
\RequirePackage{xkeyval}[2005/05/07]
\newcommand*{\niib@tempa}{}
\newcommand*{\niib@tempb}{}
@@ -113,6 +113,7 @@
head or sort=head option}
\fi
\fi]{tail}
+\niib@opt@boolkey{writekey}
\niib@opt@cmdkeys{%
cite,
name,
@@ -124,7 +125,8 @@
presorttail,
keyhead,
keynone,
- keytail}
+ keytail,
+ keyword}
\niibsetup{
cite=cite,
name=Bibnote,
@@ -136,7 +138,9 @@
presorttail=mn,
keyhead=aaa,
keynone={},
- keytail=zzz}
+ keytail=zzz,
+ keyword=bibnote,
+ writekey=true}
\niib@opt@boolkey{etex}
\begingroup
\@ifundefined{eTeXversion}
@@ -363,7 +367,12 @@
{}%
\if@filesw
\expandafter\niib@write
+ \else
+ \expandafter\niib@tidy
\fi}
+\newcommand*{\niib@tidy}[2]{%
+ \@esphack
+ \niib@next[#1]}
\ifniib@etex
\newcommand*{\niib@write}[2]{%
\niib@log@debug{Writing bibnote #1 contents
@@ -372,7 +381,10 @@
\immediate\write\niib@out{%
@\niib@record\string{#1,^^J%
presort = \string{\niib@presort\string},^^J%
- \niib@keyname\space= \string{\niib@key#1\string},^^J%
+ \ifniib@writekey
+ \niib@keyname\space= \string{\niib@key#1\string},^^J%
+ \fi
+ keywords = \string{\niib@keyword\string},^^J%
\niib@field\space= \string{\unexpanded{#2}\string}^^J%
\string}^^J}%
\@esphack
diff --git a/Master/texmf-dist/tex/latex/notes2bib/xnotes2bib.sty b/Master/texmf-dist/tex/latex/notes2bib/xnotes2bib.sty
index 5e809c77561..0778d46cd6f 100644
--- a/Master/texmf-dist/tex/latex/notes2bib/xnotes2bib.sty
+++ b/Master/texmf-dist/tex/latex/notes2bib/xnotes2bib.sty
@@ -15,7 +15,7 @@
%% ---------------------------------------------------------------
%%
\RequirePackage{l3names}
-\GetIdInfo$Id: xnotes2bib.dtx 4 2008-09-23 09:00:00Z joseph $
+\GetIdInfo$Id: xnotes2bib.dtx 5 2008-10-22 21:00:00Z joseph $
{Integrating notes into the bibliography (expl3 version)}
\ProvidesExplPackage
{\filename}{\filedate}{\fileversion}{\filedescription}
@@ -34,7 +34,7 @@
\ProcessOptions \scan_stop:
\int_new:N \g_niib_note_int
\def_new:Npn \niib_thenote: {
- \l_niib_notename_tlp
+ \l_niib_name_tlp
\num_compare:nNnT {\g_niib_totalnotes_int} > {\c_nine} {
\num_compare:nNnF {\g_niib_note_int} > {\c_nine} {
0
@@ -74,7 +74,8 @@
key~after/.set:c = key_after,
key~before/.set:c = key_before,
key~mixed/.set:c = key_mixed,
- notename/.set:c = notename,
+ keyword/.set:c = keyword,
+ name/.set:c = name,
placement/.choice: = \l_niib_placement_tlp,
placement/.default:n = mixed,
placement/after/.code:n = {
@@ -89,27 +90,30 @@
\bool_set_false:N \l_niib_after_cite_bool
\bool_set_false:N \l_niib_before_cite_bool
},
- prefix/.set:c = prefix_tlp,
+ /keys/current~module:n = niib,
+ prefix/.set:c = prefix,
presort~after/.set:c = presort_after,
presort~before/.set:c = presort_before,
presort~mixed/.set:c = presort_mixed,
- record/.set:c = record
+ record/.set:c = record,
+ write~key~field/.boolean:c = write_key
}
\keys_manage_quick:n{
/niib/.cd:,
- cite = \cite,
- debug = false,
- field = note,
- key~after = zzz,
- key~before = aaa,
- key~mixed = {},
- notename = Bibnote,
- placement = mixed,
- prefix = niib-,
- presort~after = mn,
- presort~before = ml,
- presort~mixed = mm,
- record = Misc}
+ cite = \cite,
+ debug = false,
+ field = note,
+ key~after = zzz,
+ key~before = aaa,
+ key~mixed = {},
+ name = Bibnote,
+ placement = mixed,
+ prefix = niib-,
+ presort~after = mn,
+ presort~before = ml,
+ presort~mixed = mm,
+ record = Misc,
+ write~key~field = true}
\NewDocumentCommand {\bibnote} {o>{P}m} {
\IfNoValueTF {#1} {
\int_gincr:N \g_niib_note_int
@@ -148,8 +152,12 @@
#1,^^J
\text_put_sp: \text_put_sp: \l_niib_field_tlp \text_put_sp:
=~{\exp_not:n{#2}},^^J
- \text_put_sp: \text_put_sp: \l_niib_keyname_tlp \text_put_sp:
- =~{\niib_key:#1},^^J
+ \bool_if:NT \l_niib_write_key_bool {
+ \text_put_sp: \text_put_sp: \l_niib_keyname_tlp \text_put_sp:
+ =~{\niib_key:#1},^^J
+ }
+ \text_put_sp: \text_put_sp: keywords~
+ =~{\l_niib_keyword_tlp},^^J
\text_put_sp: \text_put_sp: presort~
=~{\niib_presort:},^^J
}^^J
@@ -221,12 +229,12 @@
}
\def_new:Npn \niib_presort: {
\bool_if:NTF \l_niib_before_cite_bool {
- \tlp_use:N \l_niib_presort~before_tlp
+ \tlp_use:N \l_niib_presort_before_tlp
}{
\bool_if:NTF \l_niib_after_cite_bool {
- \tlp_use:N \l_niib_presort~after_tlp
+ \tlp_use:N \l_niib_presort_after_tlp
}{
- \tlp_use:N \l_niib_presort~mixed_tlp
+ \tlp_use:N \l_niib_presort_mixed_tlp
}
}
}