summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-01-06 03:00:48 +0000
committerNorbert Preining <norbert@preining.info>2022-01-06 03:00:48 +0000
commit55032f1ad7128dcf6493e798424f4ade02c923a7 (patch)
tree10ba73ec0f911b4bcf9947f34fda4efc3a9791b5 /macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
parentc03c0d515f1bfbd111d40e78805db4696e080fb8 (diff)
CTAN sync 202201060300
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx143
1 files changed, 129 insertions, 14 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-publist/publist.bbx
index 100722aa9b..d8309df788 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.25}
-\def\bpl@rdate{2021/12/14}
+\def\bpl@version{1.26}
+\def\bpl@rdate{2022/01/05}
\ProvidesFile{publist.bbx}[\bpl@rdate\space v.\bpl@version\space
biblatex bibliography style (JSP)]
@@ -187,6 +187,12 @@
}%
}
+\newtoggle{bpl@prinfo}
+\toggletrue{bpl@prinfo}
+\DeclareBibliographyOption{prinfo}[true]{%
+ \ifstrequal{#1}{true}{\toggletrue{bpl@prinfo}}{\togglefalse{bpl@prinfo}}
+}
+
\newif\if@bpl@reversenum\@bpl@reversenumfalse
\DeclareBibliographyOption{reversenumbering}[true]{%
\ifstrequal{#1}{true}{\@bpl@reversenumtrue}{\@bpl@reversenumfalse}
@@ -531,6 +537,19 @@
%
+% Peer-review type
+%
+\newcommand\printprinfo[1]{%
+ \ifbibstring{peerreview:#1}%
+ {\bibstring{peerreview:#1}}%
+ {#1}%
+}
+
+\DeclareFieldFormat{peerreview}{%
+ \printtext[brackets]{\printprinfo{#1}}%
+}
+
+%
% Bibliography filter
%
% Inspired by http://tex.stackexchange.com/a/28555/19291
@@ -736,7 +755,7 @@
\else% \if@hlauthor false
\ifthenelse{\value{listcount}=1}%
{\ifthenelse{\value{nonpl#1s}>0\AND{\value{pl#1s}}>0}%
- {\bibopenparen\bibstring{with}\addspace}%
+ {\iftoggle{isinrelated}{}{\bibopenparen\bibstring{with}\addspace}}%
{}%
\iftoggle{isplauthor}%
{\global\toggletrue{plauthorprecedes}}%
@@ -776,7 +795,7 @@
%
\usebibmacro{bpl:name:andothers}%
\ifthenelse{\value{nonpl#1s}>0\AND{\value{pl#1s}}>0\AND\value{listcount}=\value{liststop}}%
- {\unspace\bibcloseparen}%
+ {\unspace\iftoggle{isinrelated}{}{\bibcloseparen}}%
{}%
\fi% end of \if@hlauthor else condition
}
@@ -817,6 +836,24 @@
%
\renewbibmacro*{author}{%
+ \iftoggle{isinrelated}{%
+ \usebibmacro{bpl:plain:author}%
+ }{%
+ \usebibmacro{bpl:author}%
+ }%
+}
+
+
+\renewbibmacro*{editor}{%
+ \iftoggle{isinrelated}{%
+ \usebibmacro{bpl:plain:editor}%
+ }{%
+ \usebibmacro{bpl:editor}%
+ }%
+}
+
+
+\newbibmacro*{bpl:author}{%
\if@hlauthor
\ifnameundef{author}
{}
@@ -854,7 +891,7 @@
\fi% end of \if@hlauthor else condition
}
-\renewbibmacro*{editor}{%
+\newbibmacro*{bpl:editor}{%
\if@hlauthor
\ifnameundef{editor}
{}
@@ -1026,13 +1063,13 @@
}%
}
-\newbibmacro*{bpl:review:author/label}{%
+\newbibmacro*{bpl:plain:author/label}{%
\ifnameundef{author}
{\usebibmacro{label}}
- {\usebibmacro{bpl:review:author}}
+ {\usebibmacro{bpl:plain:author}}
}
-\newbibmacro*{bpl:review:author}{%
+\newbibmacro*{bpl:plain:author}{%
\ifnameundef{author}
{\let\bbx@lasthash\undefined}
{%
@@ -1050,10 +1087,23 @@
\mkbibbrackets{\bibstring[\unspace]{alias}\addspace\printfield{nameaddon}}%
\addspace%
}%
- \usebibmacro{bpl:review:year+labelyear}%
+ \usebibmacro{bpl:plain:year+labelyear}%
+}
+
+\newbibmacro*{bpl:plain:editor}{%
+ \ifnameundef{editor}
+ {}
+ {%
+ \printnames{editor}%
+ \setunit{\printdelim{editortypedelim}}%
+ \usebibmacro{editorstrg}%
+ }%
+ \adddot\addspace%
+ \usebibmacro{bpl:plain:year+labelyear}%
+ \clearname{editor}%
}
-\newbibmacro*{bpl:review:year+labelyear}{%
+\newbibmacro*{bpl:plain:year+labelyear}{%
\iffieldundef{year}
{}
{%
@@ -1064,22 +1114,64 @@
}%
}
+\renewbibmacro*{addendum+pubstate}{%
+ \printfield{addendum}%
+ \newunit\newblock
+ \printfield{pubstate}%
+ \iftoggle{bpl@prinfo}{%
+ \newunit\newblock
+ \printfield{peerreview}%
+ }{}%
+}
+
%
% l7n
%
\NewBibliographyString{with}
\NewBibliographyString{parttranslationof}
+\NewBibliographyString{peerreview:sb}
+\NewBibliographyString{peerreview:db}
+\NewBibliographyString{peerreview:op}
+\NewBibliographyString{peerreview:co}
+\NewBibliographyString{peerreview:cc}
+\NewBibliographyString{peerreview:tp}
+\NewBibliographyString{peerreview:pp}
+\NewBibliographyString{peerreview:no}
\DefineBibliographyStrings{english}{%
parttranslationof = {partial translation of},
- with = {with}
+ with = {with},
+ peerreview:sb = {single blind peer review},
+ peerreview:db = {double blind peer review},
+ peerreview:op = {open peer review},
+ peerreview:co = {collaborative peer review},
+ peerreview:cc = {cascading peer review},
+ peerreview:tp = {third-party peer review},
+ peerreview:pp = {post-publication peer review},
+ peerreview:no = {no peer review}
}
\DefineBibliographyStrings{french}{%
parttranslationof = {traduction partielle de},
- with = {avec}
+ with = {avec},
+ peerreview:sb = {\'{e}valuation par des pairs anonymis\'{e}s},
+ peerreview:db = {\'{e}valuation par les pairs en double aveugle},
+ peerreview:op = {\'{e}valuation par les pairs ouverte},
+ peerreview:co = {\'{e}valuation par les pairs collaborative},
+ peerreview:cc = {\'{e}valuation par les pairs en cascade},
+ peerreview:tp = {\'{e}valuation par des pairs ext\'{e}rieurs},
+ peerreview:pp = {\'{e}valuation par les pairs apr\`{e}s publication},
+ peerreview:no = {pas d'\'{e}valuation par les pairs}
}
\DefineBibliographyStrings{german}{%
parttranslationof = {Teil\"ubersetzung von},
- with = {mit}
+ with = {mit},
+ peerreview:sb = {Blindbegutachtung},
+ peerreview:db = {Doppelblindbegutachtung},
+ peerreview:op = {Offene Begutachtung},
+ peerreview:co = {Kollaborative Begutachtung},
+ peerreview:cc = {Cascading-Begutachtung},
+ peerreview:tp = {Begutachtung durch Dritte},
+ peerreview:pp = {Post-Publication-Begutachtung},
+ peerreview:no = {keine Begutachtung}
}
@@ -1088,7 +1180,7 @@
%
\DeclareBibliographyDriver{review}{%
- \usebibmacro{bpl:review:author/label}%
+ \usebibmacro{bpl:plain:author/label}%
\setunit*{\addcolon\space}%
\usebibmacro{title}%
\newunit\newblock
@@ -1354,15 +1446,38 @@
% Add a dummy constant shortauthor in order to
% ignore author constellation on extralabel assignment.
+% Original entries are stored in namea.
\if@hlauthor
\else
\DeclareStyleSourcemap{
\maps[datatype=bibtex]{
+ \map{
+ \step[fieldsource=shortauthor]
+ \step[fieldset=namea, origfieldval]
+ }
\map[overwrite]{
\step[fieldset=shortauthor, fieldvalue={1111}]
}
}
}
+ % For proper labelname (e.g., \textcite), write back original
+ % shortauthor, author or editor after the extradate has been
+ % constructed.
+ \AtDataInput{%
+ \csgappto\blx@bbl@data{%
+ \let\c@shortauthor\c@namea
+ \let\abx@name@shortauthor\abx@name@namea
+ \ifdefstring\abx@field@labelnamesource{shortauthor}
+ {\ifundef\abx@name@shortauthor
+ {\ifundef\abx@name@author
+ {\def\abx@field@labelnamesource{editor}}
+ {\def\abx@field@labelnamesource{author}}%
+ }%
+ {}%
+ }%
+ {}%
+ }%
+ }%
\fi
% Correctly sort pubstates.