summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-software/software.bbx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/biblatex-software/software.bbx')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-software/software.bbx28
1 files changed, 27 insertions, 1 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-software/software.bbx b/macros/latex/contrib/biblatex-contrib/biblatex-software/software.bbx
index 48f58eb736..7ef6d84771 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-software/software.bbx
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-software/software.bbx
@@ -113,6 +113,10 @@
%
% Add here special eprint formats
%
+
+%
+% ASCL
+%
\DeclareFieldFormat{eprint:ascl}{%
\mkbibacro{ASCL}\addcolon\addspace%
\ifhyperref
@@ -128,6 +132,23 @@
}
%
+% swMATH
+%
+\DeclareFieldFormat{eprint:swmath}{%
+ \mkbibacro{SWMATH}\addcolon\addspace%
+ \ifhyperref
+ {\href{https://www.swmath.org/software/#1}{%
+ \(\langle\)swmath\addcolon\nolinkurl{#1}\(\rangle\)%
+ \iffieldundef{eprintclass}
+ {}
+ {\addspace\texttt{\mkbibbrackets{\thefield{eprintclass}}}}}}
+ {\(\langle\)swmath\addcolon\nolinkurl{#1}\(\rangle\)%
+ \iffieldundef{eprintclass}
+ {}
+ {\addspace\texttt{\mkbibbrackets{\thefield{eprintclass}}}}}
+}
+
+%
% Macros to format output
%
\newbibmacro*{swtitleauthoreditoryear}{%
@@ -236,7 +257,12 @@
\newbibmacro*{swrelated}{%
\iffieldundef{related}%
{}%
- {\usebibmacro{related}}%
+ {\iftoggle{bbx:related}
+ {\usebibmacro{related:init}%
+ \usebibmacro{related}
+ }
+ {}%
+ }%
}
%