Page MenuHomeSoftware Heritage

No OneTemporary

diff --git a/talks-public/2020-05-05-biblatex-software/2020-05-05-biblatex-software.org b/talks-public/2020-05-05-biblatex-software/2020-05-05-biblatex-software.org
index a886e45..32b33a4 100644
--- a/talks-public/2020-05-05-biblatex-software/2020-05-05-biblatex-software.org
+++ b/talks-public/2020-05-05-biblatex-software/2020-05-05-biblatex-software.org
@@ -1,248 +1,261 @@
#+COLUMNS: %40ITEM %10BEAMER_env(Env) %9BEAMER_envargs(Env Args) %10BEAMER_act(Act) %4BEAMER_col(Col) %10BEAMER_extra(Extra) %8BEAMER_opt(Opt)
#+TITLE: Software in bibliographies with biblatex-software
#+SUBTITLE:
#+AUTHOR: Roberto Di Cosmo
#+EMAIL: roberto@dicosmo.org @rdicosmo @swheritage
#+BEAMER_HEADER: \date{May 5th, 2020}
#+BEAMER_HEADER: \title[The \texttt{biblatex-software} package]{Software in bibliographies with \texttt{biblatex-software}}
#+BEAMER_HEADER: \author[Roberto Di Cosmo \hspace{5em} www.dicosmo.org]{Roberto Di Cosmo\\[2em]}
# #+BEAMER_HEADER: \setbeameroption{show notes on second screen}
#+BEAMER_HEADER: \setbeameroption{hide notes}
#+KEYWORDS: software heritage legacy preservation knowledge mankind technology
#+LATEX_HEADER: \usepackage{tcolorbox}
#+LATEX_HEADER: \definecolor{links}{HTML}{2A1B81}
#+LATEX_HEADER: \hypersetup{colorlinks,linkcolor=,urlcolor=links}
#
+#+LATEX_HEADER: \input{preamble.tex}
+#
# prelude.org contains all the information needed to export the main beamer latex source
# use prelude-toc.org to get the table of contents
#
+
+
#+INCLUDE: "../../common/modules/prelude-toc.org" :minlevel 1
#+INCLUDE: "../../common/modules/169.org"
# +LaTeX_CLASS_OPTIONS: [aspectratio=169,handout,xcolor=table]
#+LATEX_HEADER: \usepackage{bbding}
#+LATEX_HEADER: \DeclareUnicodeCharacter{66D}{\FiveStar}
#+LATEX_HEADER: \usepackage[anythingbreaks]{breakurl}
#
# If you want to change the title logo it's here
#
# +BEAMER_HEADER: \titlegraphic{\includegraphics[width=0.7\textwidth]{SWH-logo}}
# aspect ratio can be changed, but the slides need to be adapted
# - compute a "resizing factor" for the images (macro for picblocks?)
#
# set the background image
#
# https://pacoup.com/2011/06/12/list-of-true-169-resolutions/
#
#+BEAMER_HEADER: \pgfdeclareimage[height=90mm,width=160mm]{bgd}{swh-world-169.png}
#+BEAMER_HEADER: \setbeamertemplate{background}{\pgfuseimage{bgd}}
#+LATEX: \addtocounter{framenumber}{-1}
+
* Introduction
** Software at Inria
*** Inria (https://www.inria.fr)
- French national research institution for digital sciences (CS, applied Maths, ...)
- some 2000 researchers in 200 teams
- over 1000 open source software developed and distributed over 50 years
#+BEAMER: \pause
*** The software citation working group
- Contributors :: Pierre Alliez, Roberto Di Cosmo, Benjamin Guedj, Alain Girault, Mohand-Said Hacid, Arnaud Legrand, Xavier Leroy, Nicolas Rougier, Manuel Serrano
- Outputs ::
+ P. Alliez, R. Di Cosmo, B. Guedj, A. Girault, M. Hacid, A. Legrand, N. Rougier, [[https://dx.doi.org/10.1109/MCSE.2019.2949413][\emph{Attributing and Referencing (Research) Software: Best Practices and Outlook From Inria}]], Computing in Science and Engineering, 22 (1), 2020. DOI: 10.1109/MCSE.2019.2949413
+ ~biblatex-software~ : software bibitems for BibLaTeX
** BibTeX/BibLaTeX reminder
*** BibTeX
Bibliographic format widely used in the scholarly world by LaTeX users to
store and exchange bibliographic information.
At Inria it is used to generate bibliographies for the activity reports of 200 teams
*** BibLaTeX
Modern LaTeX package (and tool set) that produces rich bibliographies from BibTeX entries
*** State of software:
No support for software in BibTeX/BibLaTeX up to now:
- BibLaTeX has a ~@software~ bibitem, that is treated like ~@misc~
** biblatex-software: new entries
*** Four new bibliographic entries
- @software :: Computer software.
/Required fields:/ ~author~ / ~editor~, ~title~, ~url~, ~year~
#+BEAMER: \pause
- @softwareversion :: A specific version of a software.
/Required fields:/ ~author~ / ~editor~, ~title~, ~url~, ~version~, ~year~
#+BEAMER: \pause
- @softwaremodule :: A specific module of a larger software project.
/Required fields:/ ~author~, ~subtitle~, ~url~, ~year~
#+BEAMER: \pause
- @codefragment :: A code fragment (e.g. a specific algorithm in a program or library).
/Required fields:/ ~url~
#+BEAMER: \pause
*** Inheritance
*softwareversion*, *softwaremodule* and *codefragment* entries can inherit
missing fields from entries designated via the /crossref/ field
** biblatex-software: new fields
*** Four new software-specific fields
- license :: list (literal). The license/s of the title in SPDX format.
- introducedin :: field (literal). If this is a software module or fragment,
the version of the containing project where it has been first introduced.
- repository :: field (uri). The url of the code repository (e.g on GitHub, GitLab).
- swhid :: field (verbatim). The identifier of the digital
object (a.k.a the software artifact itself). The intrinsic identifier
of the item is an swh-id (swh:cnt for a content, swh:dir for a directory, swh:rev for
a revision, swh:rel for a release, etc.). See [[https://docs.softwareheritage.org/devel/swh-model/persistent-identifiers.html][the SWH-ID specification]].
#+BEAMER: \pause
*** Two more new software-specific fields for HAL
- ~hal_id~ :: field (verbatim). A digital identifier for the
software record including its description and metadata on HAL.
- ~hal_version~ :: field (verbatim). The version of the HAL software record.
-
-
** Examples are worth a thousand words
:PROPERTIES:
:BEAMER_opt: fragile
:END:
*** Software, Softwareversion and Softwaremodule
#+BEGIN_EXPORT latex
\lstset{%
backgroundcolor=\color[gray]{.90},
basicstyle=\tiny\ttfamily,
breaklines = true,
keywordstyle=\color{blue!85},
columns=fullflexible,
}%
\lstdefinelanguage{BibTeX}
{keywords={%
@article,@book,@collectedbook,@conference,@electronic,@ieeetranbstctl,%
@inbook,@incollectedbook,@incollection,@injournal,@inproceedings,%
@manual,@mastersthesis,@misc,@patent,@periodical,@phdthesis,@preamble,%
@proceedings,@standard,@string,@techreport,@unpublished,%
@software,@softwareversion,@codefragment,%
title,author,year,vcs,license,swhid,version,subtitle, crossref,institution,editor,introducedin,url%
},
comment=[l][\itshape]{@comment},
sensitive=false,
}
\begin{lstlisting}[language=BibTeX]
@software {cgal,
title = {The Computational Geometry Algorithms Library},
author = {{The CGAL Project}},
editor = {{CGAL Editorial Board}},
year = 1996,
url = {https://cgal.org/}
}
@softwareversion{cgal:5-0-2,
crossref = {cgal},
version = {{5.0.2}},
url = {https://docs.cgal.org/5.02},
year = 2020,
swhid = {swh:1:rel:636541bbf6c77863908eae744610a3d91fa58855;
origin=https://github.com/CGAL/cgal/}
}
@softwaremodule{cgal:lp-gi-20a,
crossref = {cgal:5-0-2},
author = {Menelaos Karavelas},
subtitle = {{2D} Voronoi Diagram Adaptor},
license = {GPL},
introducedin = {cgal:3-1},
url = {https://doc.cgal.org/5.0.2/Manual/packages.html#PkgVoronoiDiagram2},
}
\end{lstlisting}
#+END_EXPORT
+** Output
+ \nocite{*}
+ \tiny
+ \printbibliography[heading=none,title="Example bibliography",keyword=first]
+
** Examples are worth a thousand words, cont'd
:PROPERTIES:
:BEAMER_opt: fragile
:END:
*** Software, Softwareversion and Codefragment
#+BEGIN_EXPORT latex
\lstset{%
backgroundcolor=\color[gray]{.90},
basicstyle=\tiny\ttfamily,
breaklines = true,
keywordstyle=\color{blue!85},
columns=fullflexible,
}%
\lstdefinelanguage{BibTeX}
{keywords={%
@article,@book,@collectedbook,@conference,@electronic,@ieeetranbstctl,%
@inbook,@incollectedbook,@incollection,@injournal,@inproceedings,%
@manual,@mastersthesis,@misc,@patent,@periodical,@phdthesis,@preamble,%
@proceedings,@standard,@string,@techreport,@unpublished,%
@software,@softwareversion,@codefragment,%
title,author,year,vcs,license,swhid,version,subtitle, crossref,institution,editor,introducedin,url%
},
comment=[l][\itshape]{@comment},
sensitive=false,
}
\begin{lstlisting}[language=BibTeX]
@software {parmap,
title = {The Parmap library},
author = {Di Cosmo, Roberto and Marco Danelutto},
year = {2012},
institution = {{University Paris Diderot} and {University of Pisa}},
url = {https://rdicosmo.github.io/parmap/},
license = {LGPL-2.0},
}
@softwareversion {parmap-0.9.8,
title = {The Parmap library},
author = {Di Cosmo, Roberto and Marco Danelutto},
version = {0.9.8},
swhid = {swh:1:rev:0064fbd0ad69de205ea6ec6999f3d3895e9442c2;
- origin=https://gitorious.org/parmap/parmap.git;
- visit=swh:1:snp:78209702559384ee1b5586df13eca84a5123aa82},
+ origin=https://gitorious.org/parmap/parmap.git},
crossref = {parmap}
}
@codefragment {simplemapper,
subtitle = {Core mapping routine},
swhid = {swh:1:cnt:d5214ff9562a1fe78db51944506ba48c20de3379;
origin=https://gitorious.org/parmap/parmap.git;
- visit=swh:1:snp:78209702559384ee1b5586df13eca84a5123aa82;
anchor=swh:1:rev:0064fbd0ad69de205ea6ec6999f3d3895e9442c2;path=/parmap.ml;lines=101-143},
crossref = {parmap-0.9.8}
}
\end{lstlisting}
#+END_EXPORT
+** Output
+ \nocite{*}
+ \tiny
+ \printbibliography[heading=none,title="Example bibliography",keyword=second]
** biblatex-software: new options and support for other identifiers
*** Five new options to control typesetting of software related entries
- swlabels=true|false :: add a special label to software entries
- license=true|false :: show license information
- halid=true|false :: show the HAL identifier
- swhid=true|false :: show the SWHID identifier
- vcs=true|false :: show the repository URL
#+BEAMER: \pause
*** Adding other identifiers
- ~doi~, ~hal_id~, ~shwid~, ~vcs~, ~url~ are *built-in*
- other identifiers are easy to add using ~eprint~ (see full documentation)
-** Availability and contributions
+** Use, availability and contributions
+*** It provides a /style extension/
+ compatible with /all existing BibLaTeX style/! Super easy to use, see documentation.
+#+BEAMER: \pause
*** Development
contributions are welcome on https://gitlab.inria.fr/gt-sw-citation/bibtex-sw-entry
*** Distribution and documentation
- ~biblatex-software~ is availabe on CTAN as
+ ~biblatex-software~ is available on CTAN as
https://www.ctan.org/tex-archive/macros/latex/contrib/biblatex-contrib/biblatex-software
- documentation in [[http://mirrors.ctan.org/macros/latex/contrib/biblatex-contrib/biblatex-software/software-biblatex.pdf][~software-biblatex.pdf~]]
- demo example in [[http://mirrors.ctan.org/macros/latex/contrib/biblatex-contrib/biblatex-software/sample-use-sty.pdf][~sample-use-sty.pdf~]]
- sample bibliography in [[http://mirrors.ctan.org/macros/latex/contrib/biblatex-contrib/biblatex-software/biblio.bib][~biblio.bib~]]
diff --git a/talks-public/2020-05-05-biblatex-software/Makefile b/talks-public/2020-05-05-biblatex-software/Makefile
new file mode 100644
index 0000000..68fbee7
--- /dev/null
+++ b/talks-public/2020-05-05-biblatex-software/Makefile
@@ -0,0 +1 @@
+include ../Makefile.slides
diff --git a/talks-public/2020-05-05-biblatex-software/biblio.bib b/talks-public/2020-05-05-biblatex-software/biblio.bib
new file mode 100644
index 0000000..006aff4
--- /dev/null
+++ b/talks-public/2020-05-05-biblatex-software/biblio.bib
@@ -0,0 +1,61 @@
+ @software {cgal,
+ title = {The Computational Geometry Algorithms Library},
+ author = {{The CGAL Project}},
+ editor = {{CGAL Editorial Board}},
+ year = 1996,
+ url = {https://cgal.org/},
+ keywords={first},
+ sortkey={A},
+ }
+
+ @softwareversion{cgal:5-0-2,
+ crossref = {cgal},
+ version = {{5.0.2}},
+ url = {https://docs.cgal.org/5.02},
+ year = 2020,
+ swhid = {swh:1:rel:636541bbf6c77863908eae744610a3d91fa58855;
+ origin=https://github.com/CGAL/cgal/},
+ keywords={first},
+ sortkey={B},
+ }
+
+ @softwaremodule{cgal:lp-gi-20a,
+ crossref = {cgal:5-0-2},
+ author = {Menelaos Karavelas},
+ subtitle = {{2D} Voronoi Diagram Adaptor},
+ license = {GPL},
+ introducedin = {cgal:3-1},
+ url = {https://doc.cgal.org/5.0.2/Manual/packages.html#PkgVoronoiDiagram2},
+ keywords={first},
+ sortkey={C},
+ }
+
+@software {parmap,
+ title = {The Parmap library},
+ author = {Di Cosmo, Roberto and Marco Danelutto},
+ year = {2012},
+ institution = {{University Paris Diderot} and {University of Pisa}},
+ url = {https://rdicosmo.github.io/parmap/},
+ repository = {https://github.com/rdicosmo/parmap/},
+ license = {LGPL-2.0},
+ keywords={second}
+}
+
+@softwareversion {parmap-0.9.8,
+ title = {The Parmap library},
+ author = {Di Cosmo, Roberto and Marco Danelutto},
+ version = {0.9.8},
+ swhid = {swh:1:rev:0064fbd0ad69de205ea6ec6999f3d3895e9442c2;
+ origin=https://gitorious.org/parmap/parmap.git},
+ crossref = {parmap},
+ keywords={second}
+}
+
+@codefragment {simplemapper,
+ subtitle = {Core mapping routine},
+ swhid = {swh:1:cnt:d5214ff9562a1fe78db51944506ba48c20de3379;
+ origin=https://gitorious.org/parmap/parmap.git;
+ anchor=swh:1:rev:0064fbd0ad69de205ea6ec6999f3d3895e9442c2;path=/parmap.ml;lines=101-143},
+ crossref = {parmap-0.9.8},
+ keywords={second}
+}
diff --git a/talks-public/2020-05-05-biblatex-software/english-software.lbx b/talks-public/2020-05-05-biblatex-software/english-software.lbx
new file mode 100644
index 0000000..3d3220e
--- /dev/null
+++ b/talks-public/2020-05-05-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/talks-public/2020-05-05-biblatex-software/preamble.tex b/talks-public/2020-05-05-biblatex-software/preamble.tex
new file mode 100644
index 0000000..72e1f45
--- /dev/null
+++ b/talks-public/2020-05-05-biblatex-software/preamble.tex
@@ -0,0 +1,30 @@
+\usepackage[
+ style=numeric,
+ datamodel=software, % extend the datamodel with entries for software
+ abbreviate=false,
+ natbib=true,
+ sorting=ydnt,
+ backend=biber,
+ bibencoding=utf8,
+ giveninits=true,
+ url=true,
+ doi=true,
+ defernumbers,
+ maxcitenames=10,
+ defernumbers=true,
+ maxbibnames=100]{biblatex}
+%
+% load the software biblatex style
+%
+\usepackage{software-biblatex}
+%
+% set software specific bibliography options
+%
+\ExecuteBibliographyOptions{
+ halid=true,
+ swhid=true,
+ swlabels=true,
+ vcs=true,
+ license=true}
+
+\addbibresource{biblio.bib}
diff --git a/talks-public/2020-05-05-biblatex-software/software-biblatex.sty b/talks-public/2020-05-05-biblatex-software/software-biblatex.sty
new file mode 100644
index 0000000..486b376
--- /dev/null
+++ b/talks-public/2020-05-05-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/talks-public/2020-05-05-biblatex-software/software.bbx b/talks-public/2020-05-05-biblatex-software/software.bbx
new file mode 100644
index 0000000..007d6e8
--- /dev/null
+++ b/talks-public/2020-05-05-biblatex-software/software.bbx
@@ -0,0 +1,297 @@
+%
+% 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}
+
+%
+% Macros
+%
+
+\newbibmacro*{swurl+urldate}{%
+ \mkbibacro{URL}\addcolon\addspace%
+ \ifhyperref%
+ {\href{\strfield{url}}{\nolinkurl{\strfield{url}}}}%
+ {\nolinkurl{\strfield{url}}}%
+ \iffieldundef{urlyear}%
+ {}%
+ {\setunit*{\addspace}%
+ \usebibmacro{urldate}}}
+
+%
+% Formatting fields for the software entries
+%
+
+\DeclareFieldFormat[softwaremodule,codefragment]{subtitle}{\mkbibquote{#1\isdot}}
+\DeclareFieldFormat[software,softwareversion,softwaremodule,codefragment]{url}{
+ \iftoggle{bbx:url}%
+ {\usebibmacro{swurl+urldate}}
+ {}%
+}
+\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}}
+
+%
+% Add here special eprint formats
+%
+\DeclareFieldFormat{eprint:ascl}{%
+ ascl\addcolon\space
+ \ifhyperref
+ {\href{https://ascl.net/#1}{%
+ \nolinkurl{#1}%
+ \iffieldundef{eprintclass}
+ {}
+ {\addspace\texttt{\mkbibbrackets{\thefield{eprintclass}}}}}}
+ {\nolinkurl{#1}%
+ \iffieldundef{eprintclass}
+ {}
+ {\addspace\texttt{\mkbibbrackets{\thefield{eprintclass}}}}}}
+
+%
+% 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}%
+ \iftoggle{bbx:eprint}
+ {\usebibmacro{eprint}}
+ {}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{url}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{repository}%
+ \setunit*{\addcomma\addspace}%
+ \printfield{swhid}%
+ %
+ % If only the url is present, output it regardless of bbx:url directive
+ %
+ \ifboolexpr{%
+ not test {\iftoggle{bbx:url}}%
+ and
+ not test {\iffieldundef{url}}%
+ and
+ test {\iffieldundef{doi}}%
+ and
+ test {\iffieldundef{eprint}}%
+ and
+ test {\iffieldundef{hal_id}}%
+ and
+ test {\iffieldundef{swhid}}%
+ and
+ test {\iffieldundef{repository}}%
+ }%
+ {\usebibmacro{swurl+urldate}}%
+ {}%
+}
+
+\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%
+ \printlist{institution}
+ \newunit\newblock%
+ \printlist{organization}
+ \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%
+ \printlist{institution}
+ \newunit\newblock%
+ \printlist{organization}
+ \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%
+ \printlist{institution}
+ \newunit\newblock%
+ \printlist{organization}
+ \newunit\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%
+ \printlist{institution}
+ \newunit\newblock%
+ \printlist{organization}
+ \newunit\newblock%
+ \usebibmacro{licenses}%
+ \newunit\newblock%
+ \usebibmacro{swids}%
+ \newunit\newblock%
+ \usebibmacro{swrelated}%
+ \usebibmacro{finentry}}
diff --git a/talks-public/2020-05-05-biblatex-software/software.dbx b/talks-public/2020-05-05-biblatex-software/software.dbx
new file mode 100644
index 0000000..4d45bc7
--- /dev/null
+++ b/talks-public/2020-05-05-biblatex-software/software.dbx
@@ -0,0 +1,196 @@
+\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,
+ eprint,
+ eprintclass,
+ eprinttype,
+ 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,
+ eprint,
+ eprintclass,
+ eprinttype,
+ 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,
+ eprint,
+ eprintclass,
+ eprinttype,
+ 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,
+ eprint,
+ eprintclass,
+ eprinttype,
+ 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}
+ }
+}
+

File Metadata

Mime Type
text/x-diff
Expires
Fri, Jul 4, 3:35 PM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3355011

Event Timeline