diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-03 21:07:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-03 21:07:24 +0000 |
commit | 9e4b48dd2d4eaf965f1df0785079e89884544081 (patch) | |
tree | 28c6ac60c3f1a60770ccd550d2bb51f0adedc2f1 /Master/texmf-dist/tex/latex/biblatex-software | |
parent | e235922de527427c33d9fcc78ce499fe60def381 (diff) |
biblatex-software (3mar22)
git-svn-id: svn://tug.org/texlive/trunk@62371 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex-software')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-software/software.bbx | 21 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex-software/software.dbx | 1 |
2 files changed, 18 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-software/software.bbx b/Master/texmf-dist/tex/latex/biblatex-software/software.bbx index c33e1143470..f7d27f471b8 100644 --- a/Master/texmf-dist/tex/latex/biblatex-software/software.bbx +++ b/Master/texmf-dist/tex/latex/biblatex-software/software.bbx @@ -1,3 +1,4 @@ +\ProvidesFile{software.bbx}[2020/04/02 bibliography driver extension for software entries, Roberto Di Cosmo] % % Reference implementation of a BibLaTeX style for the software family of bibliographic entries % @@ -10,6 +11,7 @@ % \newtoggle{bbx:halid} \newtoggle{bbx:swhid} +\newtoggle{bbx:shortswhid} \newtoggle{bbx:vcs} \newtoggle{bbx:swlabels} \newtoggle{bbx:license} @@ -18,6 +20,8 @@ \settoggle{bbx:halid}{#1}} \DeclareBibliographyOption[boolean]{swhid}[true]{% \settoggle{bbx:swhid}{#1}} +\DeclareBibliographyOption[boolean]{shortswhid}[false]{% + \settoggle{bbx:shortswhid}{#1}} \DeclareBibliographyOption[boolean]{swlabels}[true]{% \settoggle{bbx:swlabels}{#1}} \DeclareBibliographyOption[boolean]{vcs}[true]{% @@ -25,7 +29,7 @@ \DeclareBibliographyOption[boolean]{license}[true]{% \settoggle{bbx:license}{#1}} -\ExecuteBibliographyOptions{halid,swhid,swlabels,vcs,license} +\ExecuteBibliographyOptions{halid,swhid,shortswhid,swlabels,vcs,license} % % Declare inheritance rules (valid only in LaTeX preamble!) @@ -58,13 +62,18 @@ \usebibmacro{urldate}}} % -% Support multiline SWHIDs +% Support multiline SWHIDs and create swhidcore field from swhid if missing % \DeclareStyleSourcemap{ \maps[datatype=bibtex,overwrite=true]{ \map{ \step[fieldsource=swhid, match=\regexp{\s}, replace={}] } + \map{ + \step[fieldsource=swhid] + \step[fieldset=swhidcore, origfieldval] + \step[fieldsource=swhidcore, match=\regexp{;.*}, replace={}] + } } } @@ -91,8 +100,12 @@ \iftoggle{bbx:swhid}% {\mkbibacro{SWHID}\addcolon\addspace% \ifhyperref% - {\href{http://archive.softwareheritage.org/#1}{\(\langle\)\nolinkurl{#1}\(\rangle\)}}% - {\(\langle\)\nolinkurl{#1}\(\rangle\)}% + {\href{http://archive.softwareheritage.org/#1}{\(\langle\)\nolinkurl{% + \iftoggle{bbx:shortswhid}{\thefield{swhidcore}}{#1}% + }\(\rangle\)}}% + {\(\langle\)\nolinkurl{% + \iftoggle{bbx:shortswhid}{\thefield{swhidcore}}{#1}% + }\(\rangle\)}% }% {}% } diff --git a/Master/texmf-dist/tex/latex/biblatex-software/software.dbx b/Master/texmf-dist/tex/latex/biblatex-software/software.dbx index 4d45bc7fcc0..f3861cfedf4 100644 --- a/Master/texmf-dist/tex/latex/biblatex-software/software.dbx +++ b/Master/texmf-dist/tex/latex/biblatex-software/software.dbx @@ -17,6 +17,7 @@ hal_id, hal_version, swhid, + swhidcore, } % |