summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-software/english-software.lbx15
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-software/french-software.lbx15
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-software/software-biblatex.sty15
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-software/software.bbx231
-rw-r--r--Master/texmf-dist/tex/latex/biblatex-software/software.dbx184
5 files changed, 460 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex-software/english-software.lbx b/Master/texmf-dist/tex/latex/biblatex-software/english-software.lbx
new file mode 100644
index 00000000000..3d3220e3524
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-software/english-software.lbx
@@ -0,0 +1,15 @@
+ \ProvidesFile{english-software.lbx}[2020/04/02 english with additions for software]
+ \InheritBibliographyExtras{english}
+ \InheritBibliographyStrings{english}
+ \NewBibliographyString{software,edited,swmodule,swpartof,swversion,swexcerpt,swexc,refart,manual}
+ \DeclareBibliographyStrings{%
+ software = {{\sc [Software]}{\sc [SW]}},
+ swmodule = {{\sc [Software Module]}{\sc [SW Mod\adddot]}},
+ swpartof = {{part of}}{{part of}},
+ swversion = {{\sc [Software Release]}{\sc [SW Rel\adddot]}},
+ swexcerpt = {{\sc [Software excerpt]}{\sc [SW exc\adddot]}},
+ swexc = {{from}}{{from}},
+ edited = {{Coordinated by}{Coord\adddot by}},
+ refart = {{Described in}{Descr\adddot in}},
+ manual = {{Manual: }{Manual:}}
+ }
diff --git a/Master/texmf-dist/tex/latex/biblatex-software/french-software.lbx b/Master/texmf-dist/tex/latex/biblatex-software/french-software.lbx
new file mode 100644
index 00000000000..5a77fd3deef
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-software/french-software.lbx
@@ -0,0 +1,15 @@
+ \ProvidesFile{french-software.lbx}[2020/04/02 french with additions for software]
+ \InheritBibliographyExtras{french}
+ \InheritBibliographyStrings{french}
+ \NewBibliographyString{software,edited,swmodule,swpartof,swversion,swexcerpt,swexc,refart,manual}
+ \DeclareBibliographyStrings{%
+ software = {{[Logiciel]}{[Log\adddot]}},
+ swmodule = {{[Module logiciel]}{[Mod\adddot log\adddot]}},
+ swpartof = {{partie de}}{{partie de}},
+ swversion = {{[Version de logiciel]}{[Ver\adddot log\adddot]}},
+ swexcerpt = {{[Fragment logiciel]}{[Frag\adddot log\adddot]}},
+ swexc = {{dans}}{{dans}},
+ edited = {{Coordonn\'e par}{Coord\adddot par}},
+ refart = {{D\'ecrit en}{D\'ecrit en}},
+ manual = {{Manuel: }{Manuel: }}
+ }
diff --git a/Master/texmf-dist/tex/latex/biblatex-software/software-biblatex.sty b/Master/texmf-dist/tex/latex/biblatex-software/software-biblatex.sty
new file mode 100644
index 00000000000..486b3760ce9
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-software/software-biblatex.sty
@@ -0,0 +1,15 @@
+%
+% Reference implementation of a BibLaTeX style for the software family of bibliographic entries
+%
+% 2020/04/02 Roberto Di Cosmo <roberto@dicosmo.org>
+%
+%
+% style file wrapper to software.bbx to make software entries available on the fly
+%
+% use after loading biblatex with the datamodel=software option
+% - special toggles may be controlled with the directive \ExecuteBibliographyOptions
+% that defaults to
+% \ExecuteBibliographyOptions{halid=true,swhid=true,swlabels=true,vcs=true,license=true}
+%
+\ProvidesPackage{software-biblatex}[Software entries for biblatex]
+\blx@inputonce{software.bbx}{biblatex style for software}{}{}{}{}
diff --git a/Master/texmf-dist/tex/latex/biblatex-software/software.bbx b/Master/texmf-dist/tex/latex/biblatex-software/software.bbx
new file mode 100644
index 00000000000..3b7f8d07360
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-software/software.bbx
@@ -0,0 +1,231 @@
+%
+% Reference implementation of a BibLaTeX style for the software family of bibliographic entries
+%
+% 2020/04/02 Roberto Di Cosmo <roberto@dicosmo.org>
+%
+\RequireBiber[3]
+\RequirePackage{xurl}
+%
+% Toggles for typesetting additional ids and printing labels
+%
+\newtoggle{bbx:halid}
+\newtoggle{bbx:swhid}
+\newtoggle{bbx:vcs}
+\newtoggle{bbx:swlabels}
+\newtoggle{bbx:license}
+
+\DeclareBibliographyOption[boolean]{halid}[true]{%
+ \settoggle{bbx:halid}{#1}}
+\DeclareBibliographyOption[boolean]{swhid}[true]{%
+ \settoggle{bbx:swhid}{#1}}
+\DeclareBibliographyOption[boolean]{swlabels}[true]{%
+ \settoggle{bbx:swlabels}{#1}}
+\DeclareBibliographyOption[boolean]{vcs}[true]{%
+ \settoggle{bbx:vcs}{#1}}
+\DeclareBibliographyOption[boolean]{license}[true]{%
+ \settoggle{bbx:license}{#1}}
+
+\ExecuteBibliographyOptions{halid,swhid,swlabels,vcs,license}
+
+%
+% Declare inheritance rules (valid only in LaTeX preamble!)
+%
+\DeclareDataInheritance{software}{softwareversion,softwaremodule,codefragment}{\inherit{*}{*}}
+\DeclareDataInheritance{softwareversion}{softwaremodule,codefragment}{\inherit{*}{*}}
+\DeclareDataInheritance{softwaremodule}{codefragment}{\inherit{*}{*}}
+
+%
+% Localization
+%
+\DeclareLanguageMapping{english}{english-software}
+\DeclareLanguageMapping{french}{french-software}
+
+%
+% Formatting fields for the software entries
+%
+
+\DeclareFieldFormat[softwaremodule,codefragment]{subtitle}{\mkbibquote{#1\isdot}}
+\DeclareFieldFormat[software,softwareversion,softwaremodule,codefragment]{url}{
+ \iftoggle{bbx:url}%
+ {\mkbibacro{URL}\addcolon\addspace%
+ \ifhyperref%
+ {\href{#1}{\nolinkurl{#1}}}%
+ {\nolinkurl{#1}}%
+ }%
+ {}%
+}
+\DeclareFieldFormat[software,softwareversion,softwaremodule,codefragment]{hal_id}{
+ \iftoggle{bbx:halid}%
+ {\mkbibacro{HAL}\addcolon\addspace%
+ \ifhyperref%
+ {\href{https://hal.archives-ouvertes.fr/#1\thefield{hal_version}}{\(\langle\)\nolinkurl{#1\thefield{hal_version}}\(\rangle\)}}%
+ {\(\langle\)\nolinkurl{#1\thefield{hal_version}}\(\rangle\)}%
+ }%
+ {}%
+}
+\DeclareFieldFormat[software,softwareversion,softwaremodule,codefragment]{swhid}{%
+ \iftoggle{bbx:swhid}%
+ {\mkbibacro{SWHID}\addcolon\addspace%
+ \ifhyperref%
+ {\href{http://archive.softwareheritage.org/#1}{\(\langle\)\nolinkurl{#1}\(\rangle\)}}%
+ {\(\langle\)\nolinkurl{#1}\(\rangle\)}%
+ }%
+ {}%
+}
+\DeclareFieldFormat[software,softwareversion,softwaremodule,codefragment]{repository}{%
+ \iftoggle{bbx:vcs}%
+ {\mkbibacro{VCS}\addcolon\addspace%
+ \ifhyperref%
+ {\href{#1}{\nolinkurl{#1}}}%
+ {\nolinkurl{#1}}%
+ }%
+ {}%
+}
+\DeclareListFormat[software,softwareversion,softwaremodule,codefragment]{license}{%
+ \usebibmacro{list:delim}{#1}%
+ #1\isdot
+ \usebibmacro{list:andothers}}
+
+%
+% Macros to format output
+%
+\newbibmacro*{swtitleauthoreditoryear}{%
+ \printnames{author}\addcomma%
+ \setunit{\addspace}%
+ \printfield{title}\addspace%
+ \printfield{version}\addspace%
+ \ifnameundef{editor}%
+ {}%
+ {\printtext[parens]{%
+ \bibstring{edited}\addspace%
+ \printnames{editor}}}%
+ \addcomma%
+ \addspace%
+ \printdate%
+}
+
+%
+\newbibmacro*{swsubtitleauthoreditoryear}{%
+ \printnames{author}\addcomma%
+ \setunit{\addspace}%
+ \iffieldundef{subtitle}%
+ {}
+ {\printfield{subtitle}\addcomma\addspace%
+ \bibstring{swpartof}\addspace
+ }%
+ \printfield{title}\addspace%
+ \printfield{version}\addspace%
+ \ifnameundef{editor}%
+ {}
+ {\printtext[parens]{%
+ \bibstring{edited}\addspace%
+ \printnames{editor}}}%
+ \addcomma%
+ \addspace%
+ \printdate%
+}
+
+\newbibmacro*{codefragmenttitleauthoreditoryear}{%
+ \printnames{author}\addcomma%
+ \setunit{\addspace}%
+ \iffieldundef{subtitle}%
+ {}
+ {\printfield{subtitle}\addcomma\addspace%
+ \bibstring{swexc}\addspace
+ }%
+ \printfield{title}\addspace%
+ \printfield{version}\addspace%
+ \ifnameundef{editor}%
+ {}
+ {\printtext[parens]{%
+ \bibstring{edited}\addspace%
+ \printnames{editor}}}%
+ \setunit*{\addcomma\addspace}%
+ \printdate%
+}
+
+\newbibmacro{licenses}{%
+ \iflistundef{license}
+ {}
+ {\iftoggle{bbx:license}%
+ {\newunitpunct
+ \mkbibacro{Lic}\addcolon
+ \printlist{license}
+ }%
+ {}%
+ }
+}
+
+\newbibmacro*{swids}{%
+ \printfield{doi}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{hal_id}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{url}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{repository}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{swhid}%
+}
+
+\newbibmacro*{swrelated}{%
+ \iffieldundef{related}%
+ {}%
+ {\usebibmacro{related}}%
+}
+
+%
+% Formatting the entries
+%
+
+\DeclareBibliographyDriver{software}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{bbx:swlabels}{\bibstring{software}{\addspace}}{}%
+ \usebibmacro{swtitleauthoreditoryear}%
+ \newunit\newblock%
+ \usebibmacro{licenses}%
+ \newunit\newblock%
+ \usebibmacro{swids}%
+ \newunit\newblock%
+ \usebibmacro{swrelated}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{softwareversion}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{bbx:swlabels}{\bibstring{swversion}\addspace}{}%
+ \usebibmacro{swsubtitleauthoreditoryear}%
+ \newunit\newblock%
+ \usebibmacro{licenses}%
+ \newunit\newblock%
+ \usebibmacro{swids}%
+ \newunit\newblock%
+ \usebibmacro{swrelated}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{softwaremodule}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{bbx:swlabels}{\bibstring{swmodule}\addspace}{}%
+ \usebibmacro{swsubtitleauthoreditoryear}%
+ \newblock\newblock%
+ \usebibmacro{licenses}%
+ \newunit\newblock%
+ \usebibmacro{swids}%
+ \newunit\newblock%
+ \usebibmacro{swrelated}%
+ \usebibmacro{finentry}}
+
+\DeclareBibliographyDriver{codefragment}{%
+ \usebibmacro{bibindex}%
+ \usebibmacro{begentry}%
+ \iftoggle{bbx:swlabels}{\bibstring{swexcerpt}\addspace}{}%
+ \usebibmacro{codefragmenttitleauthoreditoryear}%
+ \newunit\newblock%
+ \usebibmacro{licenses}%
+ \newunit\newblock%
+ \usebibmacro{swids}%
+ \newunit\newblock%
+ \usebibmacro{swrelated}%
+ \usebibmacro{finentry}}
diff --git a/Master/texmf-dist/tex/latex/biblatex-software/software.dbx b/Master/texmf-dist/tex/latex/biblatex-software/software.dbx
new file mode 100644
index 00000000000..05422738801
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/biblatex-software/software.dbx
@@ -0,0 +1,184 @@
+\ProvidesFile{software.dbx}[2020/04/02 datamodel extension for software entries, Roberto Di Cosmo]
+\RequireBiber[3]
+%
+% the software entry type family, with their fields
+%
+\DeclareDatamodelEntrytypes{software,softwareversion,softwaremodule,codefragment}
+\DeclareDatamodelFields[type=field,datatype=literal]{
+ introducedin,
+}
+\DeclareDatamodelFields[type=list,datatype=literal]{
+ license,
+}
+\DeclareDatamodelFields[type=field,datatype=uri]{
+ repository,
+}
+\DeclareDatamodelFields[type=field, datatype=verbatim]{
+ hal_id,
+ hal_version,
+ swhid,
+}
+
+%
+% Fields for software entry
+%
+\DeclareDatamodelEntryfields[software]{
+ abstract,
+ author,
+ date,
+ doi,
+ editor,
+ file,
+ hal_id,
+ hal_version,
+ institution,
+ license,
+ month,
+ note,
+ organization,
+ publisher,
+ related,
+ relatedstring,
+ repository,
+ swhid,
+ title,
+ url,
+ urldate,
+ version,
+ year,
+}
+\DeclareDatamodelConstraints[software]{
+ \constraint[type=mandatory]{
+ \constraintfieldsor{
+ \constraintfield{author}
+ \constraintfield{editor}
+ }
+ \constraintfield{title}
+ \constraintfield{url}
+ \constraintfield{year}
+ }
+}
+
+%
+% Fields for softwareversion entry
+%
+\DeclareDatamodelEntryfields[softwareversion]{
+ abstract,
+ author,
+ crossref,
+ date,
+ doi,
+ editor,
+ file,
+ hal_id,
+ hal_version,
+ institution,
+ introducedin,
+ license,
+ month,
+ note,
+ organization,
+ publisher,
+ related,
+ relatedstring,
+ relatedtype,
+ repository,
+ subtitle,
+ swhid,
+ title,
+ url,
+ urldate,
+ version,
+ year,
+}
+\DeclareDatamodelConstraints[softwareversion]{
+ \constraint[type=mandatory]{
+ \constraintfieldsor{
+ \constraintfield{author}
+ \constraintfield{editor}
+ }
+ \constraintfield{title}
+ \constraintfield{url}
+ \constraintfield{version}
+ \constraintfield{year}
+ }
+}
+
+%
+% Fields for softwaremodule entry
+%
+\DeclareDatamodelEntryfields[softwaremodule]{
+ abstract,
+ author,
+ crossref,
+ date,
+ doi,
+ editor,
+ file,
+ hal_id,
+ hal_version,
+ institution,
+ introducedin,
+ license,
+ month,
+ note,
+ organization,
+ publisher,
+ related,
+ relatedstring,
+ relatedtype,
+ repository,
+ subtitle,
+ swhid,
+ title,
+ url,
+ urldate,
+ version,
+ year,
+}
+\DeclareDatamodelConstraints[softwaremodule]{
+ \constraint[type=mandatory]{
+ \constraintfield{author}
+ \constraintfield{subtitle}
+ \constraintfield{url}
+ \constraintfield{year}
+ }
+}
+
+%
+% Fields for codefragment entry
+%
+\DeclareDatamodelEntryfields[codefragment]{
+ abstract,
+ author,
+ crossref,
+ date,
+ doi,
+ file,
+ hal_id,
+ hal_version,
+ institution,
+ introducedin,
+ license,
+ month,
+ note,
+ organization,
+ publisher,
+ related,
+ relatedstring,
+ relatedtype,
+ repository,
+ subtitle,
+ swhid,
+ title,
+ url,
+ urldate,
+ version,
+ year,
+}
+\DeclareDatamodelConstraints[codefragment]{
+ \constraint[type=mandatory]{
+ \constraintfield{url}
+ }
+}
+