summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-publist
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2021-12-15 03:01:18 +0000
committerNorbert Preining <norbert@preining.info>2021-12-15 03:01:18 +0000
commit0efaa39c6d0b17b58df9a68ae1319ea20aaabc28 (patch)
tree677b276738cd1c52e8778f985da1705c64a4b729 /macros/latex/contrib/biblatex-contrib/biblatex-publist
parent829614e28f2055883ff74da11eb4e5e57d199be3 (diff)
CTAN sync 202112150301
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/biblatex-publist')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/README4
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdfbin371508 -> 371571 bytes
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex8
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx76
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx4
5 files changed, 61 insertions, 31 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/README b/macros/latex/contrib/biblatex-contrib/biblatex-publist/README
index ae2d769a96..690c242cd6 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/README
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/README
@@ -45,6 +45,10 @@ instructions.
== CHANGES ==
+* V. 1.25 (2021-12-14):
+ - More robustification with names consisting of non-ASCII chars.
+ - With "pubstateextra", differentiate between pubstates.
+
* V. 1.24 (2021-12-11):
- Robustify handling of names with non-ASCII chars (#35).
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf
index cb0ba5891a..2ea2539720 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.pdf
Binary files differ
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex
index 282f87d9e0..a925e0c0ae 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/biblatex-publist.tex
@@ -102,7 +102,7 @@
\thanks{Please report issues via \protect\url{https://github.com/jspitz/biblatex-publist}.}%
}
-\date{Version 1.24, 2021/12/11}
+\date{Version 1.25, 2021/12/14}
\maketitle
\begin{abstract}
@@ -667,6 +667,12 @@ or
\begin{description}
+ \item [{V. 1.25 (2021-12-14):}]~
+ \begin{itemize}
+ \item More robustification with names consisting of non-ASCII chars.
+ \item With \joption{pubstateextra}, differentiate between pubstates.
+ \end{itemize}
+
\item [{V. 1.24 (2021-12-11):}]~
\begin{itemize}
\item Robustify handling of names with non-ASCII chars.
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
index 5edbe259b9..100722aa9b 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
@@ -25,8 +25,8 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\bpl@version{1.24}
-\def\bpl@rdate{2021/12/11}
+\def\bpl@version{1.25}
+\def\bpl@rdate{2021/12/14}
\ProvidesFile{publist.bbx}[\bpl@rdate\space v.\bpl@version\space
biblatex bibliography style (JSP)]
@@ -253,18 +253,36 @@
\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
-}
+% String comparison methods. We use l3 here since this is more robust.
+\ExplSyntaxOn
+
+% 1. Check first token of macro.
+% Based on code by egreg on https://tex.stackexchange.com/a/405005
+\prg_new_conditional:Nnn \bpl_firstletterequal:nn { T,F,TF,p }
+ {
+ % compare the two strings after full expansion:
+ % f expansion is used so using explicit
+ % strings or macros is the same
+ \str_if_eq:eeTF
+ { \str_head:f { #1 } }
+ { \str_head:f { #2 } }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+\cs_generate_variant:Nn \str_head:n { f }
+
+\NewExpandableDocumentCommand{\bpl@iffirstcharequal}{ m m m m }
+{
+ \bpl_firstletterequal:nnTF { #1 } { #2 } { #3 } { #4 }
+}
+
+% 2. Fully expanded macro content comparison
+\NewExpandableDocumentCommand{\bpl@ifstreq}{ m m m m }
+{
+ \str_if_eq:eeTF { #1 } { #2 } { #3 } { #4 }
+}
+
+\ExplSyntaxOff
%
% Split plauthors list item
\def\bpl@lsurname{}
@@ -282,17 +300,6 @@
\global\def\bpl@lsurname{#3}%
}
%
-% Fully expanded comparison
-% (adapted from scrbase.sty)
-\newcommand\bpl@ifstreq[2]{%
- \begingroup\protected@edef\@tempa{#1}\protected@edef\@tempb{#2}%
- \ifx\@tempa\@tempb
- \endgroup\expandafter\@firstoftwo
- \else
- \endgroup\expandafter\@secondoftwo
- \fi
-}
-%
% Check if we have an entry in plauthors
% \bpl@ifplauthor{firstname}{prefix}{surname}{true}{false}
\newcommand*\bpl@ifplauthor[3]{%
@@ -309,7 +316,7 @@
test { \bpl@ifstreq{\bpl@esurname}{\bpl@tsurname} }
and
( test { \bpl@ifstreq{\bpl@efirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@ofirstname}{} }
- or ( test { \iftoggle{firstinit} } and test{ \iffirstinitialsequal{\bpl@efirstname}{\bpl@tfirstname} } )
+ or ( test { \iftoggle{firstinit} } and test{ \bpl@iffirstcharequal{\bpl@efirstname}{\bpl@tfirstname} } )
)
and
( test { \bpl@ifstreq{\bpl@evonpart}{\bpl@tvonpart} } or test { \ifdefstring{\bpl@ovonpart}{} }) }
@@ -327,7 +334,7 @@
test { \bpl@ifstreq{\bpl@elsurname}{\bpl@tsurname} }
and
( test { \bpl@ifstreq{\bpl@elfirstname}{\bpl@tfirstname} } or test { \ifdefstring{\bpl@lfirstname}{} }
- or ( test { \iftoggle{firstinit} } and test{ \iffirstinitialsequal{\bpl@lfirstname}{\bpl@tfirstname} } )
+ or ( test { \iftoggle{firstinit} } and test{ \bpl@iffirstcharequal{\bpl@lfirstname}{\bpl@tfirstname} } )
)
and
( test { \bpl@ifstreq{\bpl@elvonpart}{\bpl@tvonpart} } or test { \ifdefstring{\bpl@lvonpart}{} }) }
@@ -938,6 +945,19 @@
}
\fi
+\AtEndOfPackage{%
+ \if@pubstateextra
+ % Include pubstate in extradate
+ \DeclareExtradate{%
+ \scope{
+ \field{pubstate}
+ \field{labelyear}
+ \field{year}
+ }
+ }
+ \fi
+}
+
\newbibmacro*{bpl:date:makedate}{%
\printtext{%
\iffieldundef{year}{%
@@ -1342,7 +1362,7 @@
\step[fieldset=shortauthor, fieldvalue={1111}]
}
}
-}
+ }
\fi
% Correctly sort pubstates.
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
index 0ceed4cbb3..13c7945ed0 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.cbx
@@ -26,8 +26,8 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\def\bpl@version{1.24}
-\def\bpl@rdate{2021/12/11}
+\def\bpl@version{1.25}
+\def\bpl@rdate{2021/12/14}
\ProvidesFile{publist.cbx}[\bpl@rdate\space v.\bpl@version\space
biblatex citation style (JSP)]