texlive[61302] Master/texmf-dist: biblatex-publist (14dec21)

commits+karl at tug.org commits+karl at tug.org
Tue Dec 14 22:23:50 CET 2021


Revision: 61302
          http://tug.org/svn/texlive?view=revision&revision=61302
Author:   karl
Date:     2021-12-14 22:23:50 +0100 (Tue, 14 Dec 2021)
Log Message:
-----------
biblatex-publist (14dec21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/biblatex-publist/README
    trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf
    trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex
    trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx
    trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx

Modified: trunk/Master/texmf-dist/doc/latex/biblatex-publist/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/biblatex-publist/README	2021-12-14 21:23:34 UTC (rev 61301)
+++ trunk/Master/texmf-dist/doc/latex/biblatex-publist/README	2021-12-14 21:23:50 UTC (rev 61302)
@@ -45,6 +45,10 @@
 
 == 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).
 

Modified: trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex	2021-12-14 21:23:34 UTC (rev 61301)
+++ trunk/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex	2021-12-14 21:23:50 UTC (rev 61302)
@@ -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 @@
 
 \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.

Modified: trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx	2021-12-14 21:23:34 UTC (rev 61301)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx	2021-12-14 21:23:50 UTC (rev 61302)
@@ -25,8 +25,8 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\def\bpl at version{1.24}
-\def\bpl at rdate{2021/12/11}
+\def\bpl at version{1.25}
+\def\bpl at rdate{2021/12/14}
 
 \ProvidesFile{publist.bbx}[\bpl at rdate\space v.\bpl at 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 at startswith}
-\newcommand*{\if at 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 at iffirstcharequal}{ m m m m }
+{
+  \bpl_firstletterequal:nnTF { #1 } { #2 } { #3 } { #4 }
 }
+
+% 2. Fully expanded macro content comparison
+\NewExpandableDocumentCommand{\bpl at ifstreq}{ m m m m }
+{
+  \str_if_eq:eeTF { #1 } { #2 } { #3 } { #4 }
+}
+
+\ExplSyntaxOff
 %
 % Split plauthors list item
 \def\bpl at lsurname{}
@@ -282,17 +300,6 @@
    \global\def\bpl at lsurname{#3}%
 }
 %
-% Fully expanded comparison
-% (adapted from scrbase.sty)
-\newcommand\bpl at ifstreq[2]{%
-    \begingroup\protected at edef\@tempa{#1}\protected at edef\@tempb{#2}%
-    \ifx\@tempa\@tempb
-        \endgroup\expandafter\@firstoftwo
-    \else
-        \endgroup\expandafter\@secondoftwo
-    \fi
-}
-%
 % Check if we have an entry in plauthors
 % \bpl at ifplauthor{firstname}{prefix}{surname}{true}{false}
 \newcommand*\bpl at ifplauthor[3]{%
@@ -309,7 +316,7 @@
         test { \bpl at ifstreq{\bpl at esurname}{\bpl at tsurname} }
         and
         ( test { \bpl at ifstreq{\bpl at efirstname}{\bpl at tfirstname} } or test { \ifdefstring{\bpl at ofirstname}{} }
-          or ( test { \iftoggle{firstinit} } and test{ \iffirstinitialsequal{\bpl at efirstname}{\bpl at tfirstname} } )
+          or ( test { \iftoggle{firstinit} } and test{ \bpl at iffirstcharequal{\bpl at efirstname}{\bpl at tfirstname} } )
         )
         and
         ( test { \bpl at ifstreq{\bpl at evonpart}{\bpl at tvonpart} } or test { \ifdefstring{\bpl at ovonpart}{} }) }
@@ -327,7 +334,7 @@
             test { \bpl at ifstreq{\bpl at elsurname}{\bpl at tsurname} }
             and
             ( test { \bpl at ifstreq{\bpl at elfirstname}{\bpl at tfirstname} } or test { \ifdefstring{\bpl at lfirstname}{} }
-              or ( test { \iftoggle{firstinit} } and test{ \iffirstinitialsequal{\bpl at lfirstname}{\bpl at tfirstname} } )
+              or ( test { \iftoggle{firstinit} } and test{ \bpl at iffirstcharequal{\bpl at lfirstname}{\bpl at tfirstname} } )
             )
             and
             ( test { \bpl at ifstreq{\bpl at elvonpart}{\bpl at tvonpart} } or test { \ifdefstring{\bpl at lvonpart}{} }) }
@@ -938,6 +945,19 @@
     }
 \fi
 
+\AtEndOfPackage{%
+  \if at 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.

Modified: trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx	2021-12-14 21:23:34 UTC (rev 61301)
+++ trunk/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx	2021-12-14 21:23:50 UTC (rev 61302)
@@ -26,8 +26,8 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-\def\bpl at version{1.24}
-\def\bpl at rdate{2021/12/11}
+\def\bpl at version{1.25}
+\def\bpl at rdate{2021/12/14}
 
 \ProvidesFile{publist.cbx}[\bpl at rdate\space v.\bpl at version\space
                            biblatex citation style (JSP)]



More information about the tex-live-commits mailing list.