diff options
author | Karl Berry <karl@freefriends.org> | 2021-12-14 21:23:50 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-12-14 21:23:50 +0000 |
commit | ad5a57b546053077e56eb51359cc71d2647fd40f (patch) | |
tree | 578caa7fb1df519730bc50de9966b3b481aae7bd | |
parent | 9fb71c20f83ac2ea2861ab2409639afad6794796 (diff) |
biblatex-publist (14dec21)
git-svn-id: svn://tug.org/texlive/trunk@61302 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/latex/biblatex-publist/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf | bin | 371508 -> 371571 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex | 8 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx | 76 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx | 4 |
5 files changed, 61 insertions, 31 deletions
diff --git a/Master/texmf-dist/doc/latex/biblatex-publist/README b/Master/texmf-dist/doc/latex/biblatex-publist/README index ae2d769a96a..690c242cd66 100644 --- a/Master/texmf-dist/doc/latex/biblatex-publist/README +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf b/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf Binary files differindex cb0ba5891ac..2ea25397201 100644 --- a/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf +++ b/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.pdf diff --git a/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex b/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex index 282f87d9e06..a925e0c0aee 100644 --- a/Master/texmf-dist/doc/latex/biblatex-publist/biblatex-publist.tex +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx b/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx index 5edbe259b95..100722aa9bc 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.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/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx b/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx index 0ceed4cbb38..13c7945ed06 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.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)] |