summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex-publist
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-publist')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx100
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx4
2 files changed, 100 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx b/Master/texmf-dist/tex/latex/biblatex-publist/publist.bbx
index 7ba7be52cee..4c8f91ff625 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.16}
-\def\bpl@rdate{2019/04/16}
+\def\bpl@version{1.17}
+\def\bpl@rdate{2020/07/10}
\ProvidesFile{publist.bbx}[\bpl@rdate\space v.\bpl@version\space
biblatex bibliography style (JSP)]
@@ -127,6 +127,59 @@
}
}
+\newtoggle{bpl@linktitle}
+\newtoggle{bpl@linktitleisbn}
+\newtoggle{bpl@linktitleissn}
+\newtoggle{bpl@linktitleurl}
+\newtoggle{bpl@linktitledoi}
+\DeclareBibliographyOption{linktitleall}[true]{%
+ \ifstrequal{#1}{true}{
+ \toggletrue{bpl@linktitleisbn}
+ \toggletrue{bpl@linktitleissn}
+ \toggletrue{bpl@linktitleurl}
+ \toggletrue{bpl@linktitledoi}
+ \toggletrue{bpl@linktitle}
+ }{%
+ \togglefalse{bpl@linktitleisbn}
+ \togglefalse{bpl@linktitleissn}
+ \togglefalse{bpl@linktitleurl}
+ \togglefalse{bpl@linktitledoi}
+ \togglefalse{bpl@linktitle}
+ }%
+}
+\DeclareBibliographyOption{linktitleurl}[true]{%
+ \ifstrequal{#1}{true}{%
+ \toggletrue{bpl@linktitleurl}
+ \toggletrue{bpl@linktitle}
+ }{%
+ \togglefalse{bpl@linktitleurl}
+ }%
+}
+\DeclareBibliographyOption{linktitledoi}[true]{%
+ \ifstrequal{#1}{true}{%
+ \toggletrue{bpl@linktitledoi}
+ \toggletrue{bpl@linktitle}
+ }{%
+ \togglefalse{bpl@linktitledoi}
+ }%
+}
+\DeclareBibliographyOption{linktitleisbn}[true]{%
+ \ifstrequal{#1}{true}{%
+ \toggletrue{bpl@linktitleisbn}
+ \toggletrue{bpl@linktitle}
+ }{%
+ \togglefalse{bpl@linktitleisbn}
+ }%
+}
+\DeclareBibliographyOption{linktitleissn}[true]{%
+ \ifstrequal{#1}{true}{%
+ \toggletrue{bpl@linktitleissn}
+ \toggletrue{bpl@linktitle}
+ }{%
+ \togglefalse{bpl@linktitleissn}
+ }%
+}
+
% Check if users have defined different base styles
% If not, use authoryear.
\newif\ifbpl@standardbasestyle\bpl@standardbasestylefalse
@@ -1096,6 +1149,27 @@
}
+% Define bibmacro that applies a hypertext reference
+% Inspired by https://tex.stackexchange.com/a/48506/19291
+\newbibmacro*{bpl:linked}[1]{%
+ \ifboolexpr{ test {\ifhyperref} and not test {\ifentrytype{online}} }
+ {\iffieldundef{doi}
+ {\iffieldundef{url}
+ {\iffieldundef{isbn}
+ {\iffieldundef{issn}
+ {#1}
+ {\iftoggle{bpl@linktitleissn}{\href{\plissnlink{\thefield{issn}}}{#1}}{#1}}}
+ {\iftoggle{bpl@linktitleisbn}{\href{\plisbnlink{\thefield{isbn}}}{#1}}{#1}}}
+ {\iftoggle{bpl@linktitleurl}{\href{\thefield{url}}{#1}}{#1}}}
+ {\iftoggle{bpl@linktitledoi}{\href{https://doi.org/\thefield{doi}}{#1}}{#1}}}
+ {#1}%
+}
+
+% URL for ISBN/ISSN queries
+\newcommand*\plisbnlink[1]{https://www.worldcat.org/search?qt=worldcat_org_all&q=#1}
+\newcommand*\plissnlink[1]{https://www.worldcat.org/search?qt=worldcat_org_all&q=#1}
+
+
%
% Mappings (biber)
%
@@ -1139,6 +1213,28 @@
}
}
+% Link titles if so requested
+\AtBeginDocument{%
+\iftoggle{bpl@linktitle}{%
+ \DeclareStyleSourcemap{
+ \maps[datatype=bibtex]{
+ \map[overwrite=true]{
+ \step[fieldsource=title,
+ match=\regexp{(.*)},
+ replace=\regexp{\\usebibmacro{bpl:linked}{$1}},
+ final=true]
+ }
+ \map[overwrite=true]{
+ \step[fieldsource=subtitle,
+ match=\regexp{(.*)},
+ replace=\regexp{\\usebibmacro{bpl:linked}{$1}},
+ final=true]
+ }
+ }
+ }
+}{}
+}
+
%
% Deprecated stuff
diff --git a/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx b/Master/texmf-dist/tex/latex/biblatex-publist/publist.cbx
index 2a18c9e50d8..d70ac4dbf5a 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.16}
-\def\bpl@rdate{2019/04/16}
+\def\bpl@version{1.17}
+\def\bpl@rdate{2020/07/10}
\ProvidesFile{publist.cbx}[\bpl@rdate\space v.\bpl@version\space
biblatex citation style (JSP)]