summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-publist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-11-25 22:08:51 +0000
committerKarl Berry <karl@freefriends.org>2018-11-25 22:08:51 +0000
commite1c15e566eb7efe4825518efd9bcedb7d382207d (patch)
tree04fbb7387c5c7881c56238bc47313bd695ced1b8 /Master/texmf-dist/tex/latex/biblatex-publist
parentb5cf9aad99f165daa6f125d38585e7aa4010d3e9 (diff)
biblatex-publist (25nov18)
git-svn-id: svn://tug.org/texlive/trunk@49251 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-publist')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx85
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx4
2 files changed, 61 insertions, 28 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx b/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx
index 5aa8be3d3d6..d86d8f5c3a5 100644
--- a/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx
+++ b/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx
@@ -25,8 +25,8 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\bpl@version{1.11}
-\def\bpl@rdate{2018/09/01}
+\def\bpl@version{1.12}
+\def\bpl@rdate{2018/11/25}
\ProvidesFile{publist.bbx}[\bpl@rdate\space v.\bpl@version\space
biblatex bibliography style (JSP)]
@@ -84,6 +84,11 @@
\ifstrequal{#1}{given-family}{\@givenfirsttrue}{\@givenfirstfalse}
}
+\newtoggle{firstinit}
+\DeclareBibliographyOption{plauthorfirstinit}[true]{%
+ \ifstrequal{#1}{false}{\togglefalse{firstinit}}{\toggletrue{firstinit}}
+}
+
\newif\if@bplnumbered\@bplnumberedtrue
\DeclareBibliographyOption{plnumbered}[true]{%
\ifstrequal{#1}{false}{% 1. "false"
@@ -261,7 +266,7 @@
%
-% Helper function:
+% Helper functions:
% Removing braces from names (courtesy of egreg at
% http://tex.stackexchange.com/a/79583/19291)
% and normalize spaces
@@ -282,6 +287,18 @@
\expandafter\bpl@@normalize
\fi
}
+% Check first token of macro
+% (based on a suggestion by Qrrbrbirlbel at
+% https://tex.stackexchange.com/a/132254)
+\newcommand*{\iffirstinitialsequal}{%
+ \@expandtwoargs\if@startswith}
+\newcommand*{\if@startswith}[2]{%
+ \if\@car#1.\@nil\@car#2.\@nil
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
%
@@ -300,7 +317,9 @@
\ifboolexpr{
test { \ifdefstrequal{\bpl@esurname}{\bpl@tsurname} }
and
- ( test { \ifdefstrequal{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} })
+ ( test { \ifdefstrequal{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} }
+ or ( test { \iftoggle{firstinit} } and test{ \iffirstinitialsequal{\bpl@efirstname}{\bpl@tfirstname} } )
+ )
and
( test { \ifdefstrequal{\bpl@evonpart}{\bpl@tvonpart} } or test { \ifdefstring{\bpl@ovonpart}{} }) }
{\addtocategory{filtered}{\thefield{entrykey}}}
@@ -316,13 +335,19 @@
\ifboolexpr{
test { \ifdefstrequal{\bpl@esurname}{\bpl@tsurname} }
and
- ( test { \ifdefstrequal{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} })
+ ( test { \ifdefstrequal{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} }
+ or ( test { \iftoggle{firstinit} } and test{ \iffirstinitialsequal{\bpl@efirstname}{\bpl@tfirstname} } )
+ )
and
( test { \ifdefstrequal{\bpl@evonpart}{\bpl@tvonpart} } or test { \ifdefstring{\bpl@ovonpart}{} }) }
{\addtocategory{filtered}{\thefield{entrykey}}}
{}}
\DeclareIndexNameFormat[inbook,inproceedings,incollection]{editorfiltered}{}%
+
+\DeclareDelimFormat{bplfinalnamedelim}{%
+ \ifnumgreater{\value{liststop}}{3}{\finalandcomma}{}%
+ \addspace\bibstring{and}\space}
\AtDataInput{%
\indexnames[authorfiltered]{author}%
@@ -349,10 +374,12 @@
\ifboolexpr{
test { \ifdefstrequal{\bpl@esurname}{\bpl@tsurname} }
and
- ( test { \ifdefstrequal{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} })
+ ( test { \ifdefstrequal{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} }
+ or ( test { \iftoggle{firstinit} } and test{ \iffirstinitialsequal{\bpl@efirstname}{\bpl@tfirstname} } )
+ )
and
( test { \ifdefstrequal{\bpl@evonpart}{\bpl@tvonpart} } or test { \ifdefstring{\bpl@ovonpart}{} }) }
- {\toggletrue{ismyself}}{\togglefalse{ismyself}}%
+ {\global\toggletrue{ismyself}}{\global\togglefalse{ismyself}}%
\ifthenelse{\value{listcount}=1}{}{%
\ifnumless{\value{listcount}}{\value{liststop}}%
{\multinamedelim}%
@@ -370,7 +397,7 @@
\namepartfamily%
\ifgiveninits
{\ifdefvoid{\namepartgiveni}{}{\addcomma\addspace\namepartgiveni\addspace}}%
- {\ifdefvoid{\namepartgiven}{}{\addcomma\addspace\namepartgiven\addspace}}%
+ {\ifdefvoid{\namepartgiven}{}{\addcomma\addspace\namepartgiven\isdot\addspace}}%
\fi
}}{%
\if@givenfirst% given name first
@@ -384,7 +411,7 @@
\namepartfamily%
\ifgiveninits
{\ifdefvoid{\namepartgiveni}{}{\addcomma\addspace\namepartgiveni\addspace}}%
- {\ifdefvoid{\namepartgiven}{}{\addcomma\addspace\namepartgiven\addspace}}%
+ {\ifdefvoid{\namepartgiven}{}{\addcomma\addspace\namepartgiven\isdot\addspace}}%
\fi
}%
\usebibmacro{name:andothers}%
@@ -400,13 +427,15 @@
\ifboolexpr{
test { \ifdefstrequal{\bpl@esurname}{\bpl@tsurname} }
and
- ( test { \ifdefstrequal{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} })
+ ( test { \ifdefstrequal{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} }
+ or ( test { \iftoggle{firstinit} } and test{ \iffirstinitialsequal{\bpl@efirstname}{\bpl@tfirstname} } )
+ )
and
( test { \ifdefstrequal{\bpl@evonpart}{\bpl@tvonpart} } or test { \ifdefstring{\bpl@ovonpart}{} }) }
- {\toggletrue{myselfprec}\toggletrue{hadmyself}%
+ {\global\toggletrue{myselfprec}\global\toggletrue{hadmyself}%
\ifthenelse{\value{listcount}=1\AND\value{liststop}=1}
{\stepcounter{liststop}}{}}
- {\ifthenelse{\value{listcount}=1}{\togglefalse{hadmyself}}{%
+ {\ifthenelse{\value{listcount}=1}{\global\togglefalse{hadmyself}}{%
\ifboolexpr{
test { \iftoggle{myselfprec} }
and
@@ -417,15 +446,15 @@
{\iftoggle{hadmyself}{%
\ifnumless{\value{listcount}}{\value{liststop}}%
{\multinamedelim}%
- {\finalnamedelim}}
- {\finalnamedelim}}%
+ {\bplfinalnamedelim}}
+ {\bplfinalnamedelim}}%
}%
}%
\ifgiveninits
{\ifdefvoid{\namepartgiveni}{}{\namepartgiveni\addspace}}%
{\ifdefvoid{\namepartgiven}{}{\namepartgiven\addspace}}%
\ifdefvoid{\namepartprefix}{}{\namepartprefix\addspace}%
- \togglefalse{myselfprec}%
+ \global\togglefalse{myselfprec}%
\namepartfamily}%
\usebibmacro{name:andothers}%
\ifthenelse{\value{listcount}=\value{liststop}\AND\value{author}>1}{\unspace\bibcloseparen}{}%
@@ -442,10 +471,12 @@
\ifboolexpr{
test { \ifdefstrequal{\bpl@esurname}{\bpl@tsurname} }
and
- ( test { \ifdefstrequal{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} })
+ ( test { \ifdefstrequal{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} }
+ or ( test { \iftoggle{firstinit} } and test{ \iffirstinitialsequal{\bpl@efirstname}{\bpl@tfirstname} } )
+ )
and
( test { \ifdefstrequal{\bpl@evonpart}{\bpl@tvonpart} } or test { \ifdefstring{\bpl@ovonpart}{} }) }
- {\toggletrue{ismyself}}{\togglefalse{ismyself}}
+ {\global\toggletrue{ismyself}}{\global\togglefalse{ismyself}}
\ifthenelse{\value{listcount}=1}{}{%
\ifnumless{\value{listcount}}{\value{liststop}-1}%
{\multinamedelim}%
@@ -463,7 +494,7 @@
\namepartfamily%
\ifgiveninits
{\ifdefvoid{\namepartgiveni}{}{\addcomma\addspace\namepartgiveni\addspace}}%
- {\ifdefvoid{\namepartgiven}{}{\addcomma\addspace\namepartgiven\addspace}}%
+ {\ifdefvoid{\namepartgiven}{}{\addcomma\addspace\namepartgiven\isdot\addspace}}%
\fi
}}{%
\if@givenfirst% given name first
@@ -477,7 +508,7 @@
\namepartfamily%
\ifgiveninits
{\ifdefvoid{\namepartgiveni}{}{\addcomma\addspace\namepartgiveni\addspace}}%
- {\ifdefvoid{\namepartgiven}{}{\addcomma\addspace\namepartgiven\addspace}}%
+ {\ifdefvoid{\namepartgiven}{}{\addcomma\addspace\namepartgiven\isdot\addspace}}%
\fi
}%
\usebibmacro{name:andothers}%
@@ -491,13 +522,15 @@
\ifboolexpr{
test { \ifdefstrequal{\bpl@esurname}{\bpl@tsurname} }
and
- ( test { \ifdefstrequal{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} })
+ ( test { \ifdefstrequal{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} }
+ or ( test { \iftoggle{firstinit} } and test{ \iffirstinitialsequal{\bpl@efirstname}{\bpl@tfirstname} } )
+ )
and
( test { \ifdefstrequal{\bpl@evonpart}{\bpl@tvonpart} } or test { \ifdefstring{\bpl@ovonpart}{} }) }
- {\toggletrue{myselfprec}\toggletrue{hadmyself}%
+ {\global\toggletrue{myselfprec}\global\toggletrue{hadmyself}%
\ifthenelse{\value{listcount}=1\AND\value{liststop}=1}
{\stepcounter{liststop}}{}}
- {\ifthenelse{\value{listcount}=1}{\togglefalse{hadmyself}}{%
+ {\ifthenelse{\value{listcount}=1}{\global\togglefalse{hadmyself}}{%
\ifboolexpr{
test { \iftoggle{myselfprec} }
and
@@ -508,15 +541,15 @@
{\iftoggle{hadmyself}{%
\ifnumless{\value{listcount}}{\value{liststop}}%
{\multinamedelim}%
- {\finalnamedelim}}
- {\finalnamedelim}}%
+ {\bplfinalnamedelim}}
+ {\bplfinalnamedelim}}%
}%
}%
\ifgiveninits
{\ifdefvoid{\namepartgiveni}{}{\namepartgiveni\addspace}}%
{\ifdefvoid{\namepartgiven}{}{\namepartgiven\addspace}}%
\ifdefvoid{\namepartprefix}{}{\namepartprefix\addspace}%
- \togglefalse{myselfprec}%
+ \global\togglefalse{myselfprec}%
\namepartfamily}%
\usebibmacro{name:andothers}%
\ifthenelse{\value{listcount}=\value{liststop}\AND\value{editor}>1}{\unspace\bibcloseparen}{}%
@@ -535,7 +568,7 @@
\namepartfamily%
\ifgiveninits
{\ifdefvoid{\namepartgiveni}{}{\addcomma\addspace\namepartgiveni\addspace}}%
- {\ifdefvoid{\namepartgiven}{}{\addcomma\addspace\namepartgiven\addspace}}%
+ {\ifdefvoid{\namepartgiven}{}{\addcomma\addspace\namepartgiven\isdot\addspace}}%
\fi
\ifthenelse{\value{listcount}<\value{liststop}}
{\ifnumless{\value{listcount}}{\value{liststop}-1}%
diff --git a/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx b/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx
index 7f1e593d951..4ee28fe014a 100644
--- a/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx
+++ b/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx
@@ -26,8 +26,8 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\bpl@version{1.11}
-\def\bpl@rdate{2018/09/01}
+\def\bpl@version{1.12}
+\def\bpl@rdate{2018/11/25}
\ProvidesFile{publist.cbx}[\bpl@rdate\space v.\bpl@version\space
biblatex citation style (JSP)]