Debian Codegraph @

texmf-dist/doc/latex/biblatex-license/biblatex-license.tex

raw
1 \documentclass[11pt,oneside,notitlepage,a4paper,english,parskip=half*] {scrartcl}
2 \usepackage{luainputenc}
3 \usepackage[T1]{fontenc}
4 \usepackage[english]{babel}
5 \usepackage{color}
6 \usepackage{graphicx}
7 %\usepackage{url}
8 %\usepackage{hyperref}
9 \usepackage{floatrow}
10 \usepackage{booktabs}
11 \usepackage{tabularx}
12 \usepackage{csquotes}
13 % !TeX spellcheck = en_US
14 \usepackage[
15 backend=biber
16 ,sortlocale=en_EN%.UTF-8
17 ,style=authoryear
18 ,bibencoding=UTF8
19 ,block=space
20 ,autocite=inline
21 ]{biblatex}
22 \begin{filecontents}{\jobname.bib}
23 @Misc{CreativeCommons4.0,
24 author = {{Creative Commons}},
25 title = {{Attribution-NonCommercial-ShareAlike 4.0}},
26 date = {2013-11-25},
27 url = {https://creativecommons.org/licenses/by-nc-sa/4.0/},
28 urldate = {2019-10-01},
29 shorttitle = {{CC BY-NC-SA 4.0}},
30 }
31
32 @book{Payne2019,
33 author = {Blakeley Hoffman Payne},
34 editor = {{MIT Media Lab Personal Robots Group} and Cynthia Breazeal},
35 title = {An Ethics of Artificial Intelligence Curriculum for Middle School Students},
36 related = {CreativeCommons4.0},
37 relatedtype = {license},
38 url = {https://t1p.de/rwlp},
39 urldate = {2020-01-27},
40 date = {2019-08},
41 }
42 \end{filecontents}
43 \addbibresource{\jobname.bib}
44 \usepackage[license=short,link=true,url=false,introtext={default}]{biblatex-license}
45
46 \let\endtitlepage\relax
47 \title{\texttt{biblatex-license}}
48 \author{Anselm Wagner\\[email protected]\\Bergische Universität Wuppertal\\v0.1}
49
50 \begin{document}
51 \maketitle
52 \begin{abstract}
53 This package provides a modification to the biblatex standard styles for relating cited works to the license under which they were published. This is done via biblatex' build in \texttt{related} mechanism and \texttt{relatedtype = license}. This package basically provides this new relatedtype, the bibmacros for typesetting these related entries and some additional styling options.
54 \end{abstract}
55 \tableofcontents
56 \vspace{2em}
57
58 The package is loaded via
59 \begin{verbatim}
60 \usepackage[options]{biblatex-license}
61 \end{verbatim}
62 and has to be loaded \emph{after} the \texttt{biblatex} package. The package sets the \texttt{biblatex} option \texttt{related = true}.
63
64 \section{Options}
65
66 \begin{tabularx}{\linewidth}{c|X|c|c}
67 \toprule \textbf{Name} & \textbf{Function} & \textbf{Possible Values} & \textbf{Default} \\
68 \midrule \texttt{license} & Decides if and how the license is to be printed. & short, full, off & short \\
69 \hline \texttt{url} & Switch for deciding if the url of the license should be explicitly printed. & true, false & false \\
70 \hline \texttt{link} & When set to \texttt{true} and \texttt{url} is set to \texttt{off}, the title of the license becomes an \verb|\href|, i.e. a hyperlink. & true, false & true \\
71 \hline \texttt{introtext} & Makes it possible to replace the language specific intro text (e.g. \enquote{licensed under}) with custom text. & any text & \\\bottomrule
72 \end{tabularx}
73
74
75 \section{Usage}
76
77 Consider the following bibliography:
78 \begin{verbatim}
79 @Misc{CreativeCommons4.0,
80 author = {{Creative Commons}},
81 title = {{Attribution-NonCommercial-ShareAlike 4.0 International}},
82 date = {2013-11-25},
83 url = {https://creativecommons.org/licenses/by-nc-sa/4.0/},
84 urldate = {2019-10-01},
85 shorttitle = {{CC BY-NC-SA 4.0}},
86 }
87
88 @book{Payne2019,
89 author = {Blakeley Hoffman Payne},
90 editor = {{MIT Media Lab Personal Robots Group} and Cynthia Breazeal},
91 title = {An Ethics of Artificial Intelligence Curriculum for Middle
92 School Students},
93 related = {CreativeCommons4.0},
94 relatedtype = {license},
95 url = {https://t1p.de/rwlp},
96 urldate = {2020-01-27},
97 date = {2019-08},
98 }
99 \end{verbatim}
100 Note, that \texttt{Payne2019} has the fields \texttt{related} and \texttt{relatedtype} defined. \texttt{related} is pointing via the label to the entry corresponding to the license under which \texttt{Payne2019} was published: \texttt{CreativeCommons4.0}. The \texttt{relatedtype = \{license\}} is necessary for \texttt{biblatex} to know how this relation should be handled. Please see the \texttt{biblatex} user guide (§3.4 \emph{Related Entries}) for more information on related entries.
101
102 Now if \texttt{biblatex} is loaded with the following options:
103 \begin{verbatim}
104 \usepackage[
105 backend=biber
106 ,sortlocale=en_EN%.UTF-8
107 ,style=authoryear
108 ,bibencoding=UTF8
109 ,block=space
110 ]{biblatex}
111 \end{verbatim}
112
113 And \texttt{biblatex-license} is loaded the default way:
114 \begin{verbatim}
115 \usepackage{biblatex-license}
116 \end{verbatim}
117
118 The bibliopgraphic entry of \texttt{Payne2019} would look like this:
119 \nocite{Payne2019}\printbibliography[heading=none]
120
121 The default way of loading \texttt{biblatex-license} is equivalent to:
122 \begin{verbatim}
123 \usepackage[license=short,
124 url=false,
125 link=true,
126 introtext={default}]
127 {biblatex-license}
128 \end{verbatim}
129
130 \subsection{\texttt{introtext}}
131
132 Note the text \enquote{Licensed under} in the bibliography. This text is, as of now, only translated to german but can be changed via the option \texttt{introtext} like so:
133 \begin{verbatim}
134 \usepackage[introtext={Some text}]{biblatex-license}
135 \end{verbatim}
136
137 \subsection{\texttt{link}}
138
139 Also note that in the example output above the title of the license is itself a link to where the \texttt{url}-field of the license entry inside the bib-file is pointing. This link is made via \verb|\href|.
140
141 \subsection{\texttt{url}}
142
143 It might be better to explicitly print the url of the license, which can be done via the \texttt{url=true} option. If printed this way, the option \texttt{link} has no effect on if this url is itself a hyperlink or not aus the url-field is handled by biblatex itself.
144
145 \subsection{\texttt{shorttitle} of the license}
146
147 If a \texttt{shorttitle} is provided for the license inside the bib-file, the shorttitle will always be preferred.
148
149 \end{document}
150