Debian Codegraph @

texmf-dist/doc/latex/quantumarticle/quantum-bibliographystyle-demo.tex

raw
1 \documentclass[a4paper,twocolumn,11pt]{quantumarticle}
2 \pdfoutput=1
3 \usepackage[utf8]{inputenc}
4 \usepackage[english]{babel}
5 \usepackage[T1]{fontenc}
6 \usepackage[numbers]{natbib}
7 \usepackage{listings}
8
9 \usepackage{amsmath}
10 \usepackage{amssymb}
11 \usepackage{hyperref}
12 \usepackage[resetlabels]{multibib}
13
14 \newcites{article}{article references}
15 \newcites{book}{book references}
16 \newcites{misc}{misc references}
17 \newcites{repo}{repository references}
18 \newcites{web}{website references}
19 \newcites{other}{Other references}
20
21 \begin{document}
22 \title{Template demonstrating the quantum bibstyle}
23
24 \author{David~Wierichs}
25 \affiliation{Institute for Theoretical Physics, University of Cologne, Germany}
26 \author{Johannes~Jakob~Meyer}
27 \affiliation{Dahlem Center for Complex Quantum Systems, Freie Universit\"{a}t Berlin, 14195 Berlin, Germany}
28 \affiliation{QMATH, Department of Mathematical Sciences, University of Copenhagen, 2100 Copenhagen, Denmark}
29
30 \maketitle
31
32 \section{Overview}\label{sec:overview}
33
34 We use the opportunity of talking about bibtex entries to give an overview of the available reference classes:
35
36 \begin{center}
37 \begin{tabular}{ll}
38 \texttt{article} & Section \ref{sec:article}\\
39 \texttt{book} & Section \ref{sec:book}\\
40 \texttt{repository} & Section \ref{sec:repo}\\
41 \texttt{website} & Section \ref{sec:web}\\
42 \texttt{misc} & Section \ref{sec:misc}\\
43 Other classes & Section \ref{sec:other}\\
44 \hspace{0.8cm}\texttt{booklet} & Section \ref{sec:booklet}\\
45 \hspace{0.8cm}\texttt{inbook} & Section \ref{sec:inbook}\\
46 \hspace{0.8cm}\texttt{incollection} & Section \ref{sec:incollection}\\
47 \hspace{0.8cm}\texttt{inproceedings} & Section \ref{sec:inproceedings}\\
48 \hspace{0.8cm}\texttt{conference} & Section \ref{sec:conference}\\
49 \hspace{0.8cm}\texttt{manual} & Section \ref{sec:manual}\\
50 \hspace{0.8cm}\texttt{mastersthesis}\&\texttt{phdthesis} & Section \ref{sec:theses}\\
51 \hspace{0.8cm}\texttt{proceedings} & Section \ref{sec:proceedings}\\
52 \hspace{0.8cm}\texttt{techreport} & Section \ref{sec:techreport}\\
53 \hspace{0.8cm}\texttt{unpublished} & Section \ref{sec:unpublished}\\
54 \end{tabular}
55 \end{center}
56
57 All of these reference classes are available in standard bibtex style files as well, with the exception of \texttt{repository} and \texttt{website}.
58 Of course there may be other style files supporting reference classes with the same name, but the implementation in quantum.bst will not be based on any of those.
59 In Sec.~\ref{sec:customization} we describe a few minimal options for customization of the quantum bibstyle.
60
61
62 \section{Reference class \texttt{article}}\label{sec:article}
63 For the \texttt{article} class, the \texttt{title} is printed in quotation marks. The \texttt{journal} is not reformatted, the \texttt{volume} printed in \textbf{bold font}. We also include the \texttt{pages} if present and the \texttt{year} in round brackets ().
64 \texttt{doi} links are always included if given, the same holds for \texttt{eprint}. Only if neither of these two fields is given do we use the \texttt{url} to provide a hyperlink to the article.
65 If the custom field \texttt{shorturl} is provided, it is used to manually pretty-print the URL.
66 This can be useful if a URL contains long character strings, particularly if they are not human-readable.
67 The \texttt{url} field is used as linked URL, that is \texttt{shorturl} only changes the printed appearance
68 and not the function of the hyperlink.
69 Code repositories are linked whenever provided via the \texttt{code} field, which is a non-standard field in
70 quantum.bst.
71
72 Examples:
73
74 \begin{tabular}{ccccc}
75 \texttt{doi}& \texttt{eprint} & \texttt{url} & \texttt{code} & result \\
76 $\checkmark$ & $\checkmark$ & $\checkmark\big / \times$ & $\checkmark$ & \citearticle{article_doi_eprint_url_code} \\
77 $\checkmark$ & $\checkmark$ & $\checkmark\big / \times$ & $\times$ & \citearticle{article_doi_eprint_url} \\
78 $\times$ & $\checkmark$ & $\checkmark\big / \times$ & $\checkmark$ & \citearticle{article_eprint_url_code} \\
79 $\times$ & $\checkmark$ & $\checkmark\big / \times$ & $\times$ & \citearticle{article_eprint_url} \\
80 $\times$ & $\times$ & $\checkmark$ & $\checkmark$ & \citearticle{article_url_code} \\
81 $\times$ & $\times$ & $\checkmark$ (\texttt{shorturl}) & $\checkmark$ & \citearticle{article_url_code_shorturl} \\
82 $\times$ & $\times$ & $\checkmark$ & $\times$ & \citearticle{article_url} \\
83 \end{tabular}
84
85 Note that in particular article citations via a URL alone are not recommended. If you want to cite a website or code repository, please use the respective reference classes \texttt{website} or \texttt{repository} (see below).
86
87 If an \texttt{article} citation only has an arXiv id but no journal reference, the journal title is skipped accordingly \citearticle{article_arxiv}.
88
89 \bibliographystylearticle{quantum}
90 \bibliographyarticle{quantum-bibliographystyle-demo}
91
92 \section{Reference class \texttt{book}}\label{sec:book}
93 For the reference class \texttt{book}, the \texttt{title}, the \texttt{year}, the \texttt{publisher} as well as \emph{either} the \texttt{author} \emph{or} the \texttt{editor} field must be given.
94 The \texttt{volume}, \texttt{number} and \texttt{series}, the (publisher) \texttt{address}, the \texttt{edition} as well as links in the fields \texttt{doi}, \texttt{eprint} and \texttt{url} are optional.
95 The order in which links are printed is the same as for \texttt{article}, see Sec.~\ref{sec:article}.
96 Some example \texttt{book} references are \citebook{book_author_doi_url, book_author_url_edition, book_editor_doi, book_editor_doi2}.
97
98 \bibliographystylebook{quantum}
99 \bibliographybook{quantum-bibliographystyle-demo}
100
101 \section{Reference class \texttt{repository}}\label{sec:repo}
102 For the custom \texttt{repository} reference class, the \texttt{author} field is used if given but is not required (in contrast to the \texttt{article} class).
103 If the repository address is given via \texttt{code} (strongly recommended), a properly formatted repository name is printed and links to the given address, including potentially version-, branch- or even commit-specific links.
104 If no \texttt{code} entry is given, \texttt{url} is used as address instead, without any formatting of the printed text; Either \texttt{code} or \texttt{url} have to be provided.
105
106 \begin{tabular}{ccc}
107 \texttt{code}& \texttt{url} & result \\
108 $\checkmark$ & $\checkmark\big / \times$ &\citerepo{repo_code_url} \\
109 $\times$ & $\checkmark$ &\citerepo{repo_url} \\
110 $\times$ & $\times$ & invalid \\
111 \end{tabular}
112
113 Providing a year is optional, a title is \emph{not} considered even if given \citerepo{repo_code_year}.
114 Note that if you want both a \texttt{url} and a \texttt{code} link to be displayed, you can use the \texttt{website} reference class presented below for that.
115
116 To specify the version of a software repository, use the new \texttt{version} field, see \citerepo{repo_code_year_version}. Even more specifically, the commit hash can be given via the \texttt{commit} field, like in \citerepo{repo_code_year_commit}. Note, however, that no check is performed between the provided \texttt{code} url and the \texttt{commit} or \texttt{version} fields, so that users have to assert consistency between these fields.
117
118 \bibliographystylerepo{quantum}
119 \bibliographyrepo{quantum-bibliographystyle-demo}
120
121 \section{Reference class \texttt{website}}\label{sec:web}
122 For the new custom reference class \texttt{website}, we require a \texttt{title} and a \texttt{url} which are both printed always.
123 \texttt{author} is optional and printed if given, the same holds for \texttt{code}, which is formatted as repository link like for \texttt{repository}. If you want to provide \texttt{code} but not \texttt{url}, the reference class \texttt{repository} (see above) is made for you.
124
125 \begin{tabular}{ccc}
126 \texttt{author} & \texttt{code} & result \\
127 $\checkmark$ & $\checkmark$ &\citeweb{web_author_code} \\
128 $\times$ & $\checkmark$ &\citeweb{web_code} \\
129 $\checkmark$ & $\times$ &\citeweb{web_author} \\
130 $\times$ & $\times$ &\citeweb{web} \\
131 \end{tabular}
132
133 An access date can be given via either \texttt{date} or \texttt{urldate}, as in \citeweb{web_author_date}, with \texttt{urldate} taking precedence over \texttt{date}.
134
135 \bibliographystyleweb{quantum}
136 \bibliographyweb{quantum-bibliographystyle-demo}
137
138 \section{Reference class \texttt{misc}}\label{sec:misc}
139 The reference class \texttt{misc} is meant to be used for miscellaneous entries that do not fall into any of the provided categories.
140 As such, \texttt{misc} entries display the generic properties \texttt{author}, \texttt{title}, \texttt{howpublished}, \texttt{date}, \texttt{eprint} and \texttt{note}, the only requirement being at least one of these fields to be provided and non-empty.
141 As the reference class \texttt{article} covers the case of preprint articles, the \texttt{misc} class was modified to refer back to \texttt{article} if \texttt{archivePrefix} is set to ``arxiv'' or an anyhow capitalized version thereof \emph{and} \texttt{primaryClass} is provided.
142
143 We provide some examples, not covering all cases, because \texttt{misc} is very flexible and there are many possibilities.
144 \begin{itemize}
145 \item A citation that actually is an article on the arXiv: \citemisc{misc_arxiv}
146 \item A footnote-like reference only containing a note: \citemisc{misc_note}
147 \item A reference to a private correspondence: \citemisc{misc_correspondence}
148 \end{itemize}
149
150 \bibliographystylemisc{quantum}
151 \bibliographymisc{quantum-bibliographystyle-demo}
152
153 \section{Other reference classes}\label{sec:other}
154 \subsection{Reference class \texttt{booklet}}\label{sec:booklet}
155 The reference class \texttt{booklet} allows for rather flexible references, focusing on information of publishing:
156 The only required field is the \texttt{title}, optional fields are \texttt{author}, \texttt{howpublished}, \texttt{address}, \texttt{year/date}, an \texttt{eprint} reference, and finally a custom \texttt{note} \citeother{booklet}.
157
158 \subsection{Reference class \texttt{inbook}}\label{sec:inbook}
159
160 The reference class \texttt{inbook} is an alias for \texttt{book} and will produce the same output.
161 The only difference is that that \texttt{chapter}, \texttt{pages}, or both are \emph{required} for \texttt{inbook}.
162 Examples would be Refs.~\citeother{inbook_author_doi_url_chapter, inbook_author_doi_url_chapter_pages, inbook_author_doi_url_volume_chapter_pages}.
163
164 \subsection{Reference class \texttt{incollection}}\label{sec:incollection}
165 The reference class \texttt{incollection} requires the fields \texttt{author}, \texttt{title}, \texttt{booktitle}, \texttt{publisher} and \texttt{year}.
166 Optional entries are \texttt{doi}, \texttt{editor}, \texttt{volume}, \texttt{chapter}, \texttt{pages}, \texttt{number}, \texttt{series}, \texttt{address}, \texttt{edition}, and \texttt{eprint}. This class mostly behaves like \texttt{book} but references a collection of which the referenced item is part.
167 \citeother{incollection}
168
169 \subsection{Reference class \texttt{inproceedings}}\label{sec:inproceedings}
170 The reference class \texttt{inproceedings} requires the fields \texttt{author}, \texttt{title}, \texttt{booktitle}, \texttt{publisher} and \texttt{year}.
171 Optional entries are \texttt{doi}, \texttt{editor}, \texttt{volume}, \texttt{chapter}, \texttt{pages}, \texttt{number}, \texttt{series}, \texttt{address}, \texttt{edition}, and \texttt{eprint}. This class mostly behaves like \texttt{book} but references a collection of which the referenced item is part.
172 \citeother{inproceedings, conference, liang2019fisher-rao}
173
174 \subsection{Reference class \texttt{conference}}\label{sec:conference}
175 This class is an alias for \texttt{inproceedings}.
176
177 \subsection{Reference class \texttt{manual}}\label{sec:manual}
178 The reference class \texttt{manual} only requires a \texttt{title}. It uses the optional fields \texttt{author}, \texttt{organization}, \texttt{address}, \texttt{edition}, \texttt{year}, and \texttt{eprint} \citeother{manual}.
179
180 \subsection{Reference classes \texttt{mastersthesis} and \texttt{phdthesis}}\label{sec:theses}
181 Both thesis reference classes are identical up to the note that remarks the type of thesis. They require the fields \texttt{author}, \texttt{title}, \texttt{school}, \texttt{year} and allow optionally for \texttt{address} and \texttt{eprint} as well as a \texttt{doi}.
182
183 \citeother{mastersthesis, phdthesis}
184
185 \subsection{Reference class \texttt{proceedings}}\label{sec:proceedings}
186 The reference class \texttt{proceedings} can be used to cite full proceedings instead of a single contribution therein.
187 Required fields are \texttt{title} and \texttt{year} and the class makes use of \texttt{editor}, \texttt{organization}, \texttt{volume}, \texttt{number}, \texttt{series}, \texttt{address}, \texttt{publisher}, \texttt{organization}, \texttt{doi}, and \texttt{eprint} \citeother{proceedings}.
188
189 \subsection{Reference class \texttt{techreport}}\label{sec:techreport}
190 The reference class \texttt{techreport} requires the fields \texttt{author}, \texttt{title}, \texttt{institution}, and \texttt{year}.
191 In addition, the fields \texttt{address}, \texttt{eprint}, \texttt{doi}, \texttt{number}, and \texttt{type} (to specify the kind of technical report further) may be provided \citeother{CoplenKrouse}.
192
193 \subsection{Reference class \texttt{unpublished}}\label{sec:unpublished}
194 The reference class \texttt{unpublished} requires the \texttt{author}, \texttt{title}, and \texttt{note} fields.
195 Optionally, a \texttt{year/date} as well as an \texttt{eprint} reference may be provided.
196 \citeother{unpublished}
197
198 \bibliographystyleother{quantum}
199 \bibliographyother{quantum-bibliographystyle-demo}
200
201 \section{Customization}\label{sec:customization}
202
203 \paragraph{Warnings raise Errors}
204 By default, the quantum bibstyle tries to catch as many bibtex warnings and raises a proper compiling error if any warnings are found. This is to avoid silent bibtex warnings that yield partial reference outputs while hiding the warnings raised by bibtex in the \texttt{.blg} file.
205 Note that not all warnings are caught, though. In particular, syntax errors like a missing comma in a \texttt{bibitem}, which cause bibtex to interrupt for that item alone, are only caught if they lead to required fields being missing.
206
207 An example for a caught mistake is
208 {\small
209 \begin{verbatim}
210 @article{article_missing_comma,
211 author={Matthew McKague},
212 doi={10.1017/cbo9780511976667},
213 year={2017},
214 journal={Quantum},
215 volume={1}
216 title={Self-testing in parallel with {CHSH}}
217 }
218 \end{verbatim}
219 }
220 Here, the missing comma after \texttt{volume={1}} would make bibtex abort the processing of the item, leading
221 to the \texttt{title} field, which is required, being missed.
222 In contrast, the following would not be caught:
223 {\small
224 \begin{verbatim}
225 @article{article_trailing_comma,
226 author={Matthew McKague},
227 doi={10.1017/cbo9780511976667},
228 year={2017},
229 journal={Quantum},
230 volume={1},
231 title={Self-testing in parallel with {CHSH}},
232 }
233 \end{verbatim}
234 }
235 The additional comma in the \texttt{title} line raises an internal bibtex warning, which the bibstyle file cannot catch. While in this case no harm is done, there are errors that are not caught but simultaneously lead to incomplete output.
236
237 If you want to turn off these errors raised from bibtex warnings, include the entry
238 \begin{verbatim*}
239 @preamble{"\DoNotMakeWarningsErrors"}
240 \end{verbatim*}
241 anywhere in the \emph{bibliography} (i.e. the \texttt{.bib} file) like one would include a reference.
242
243 \emph{Note:} Commenting the above \texttt{@preamble} entry out via \texttt{\%} will \emph{not} deactivate it as bibtex does not attribute commenting functionality to \texttt{\%}. Instead, you can simply remove the leading \texttt{@}, as is currently done in the \texttt{.bib} file accompanying this document (\texttt{quantum-bibliographystyle-demo.bib}).
244
245 \paragraph{Explicit DOI links}
246 By default, and if the entry \texttt{doi} is provided for a \texttt{bibitem}, the quantum bibstyle will link to the DOI via the \texttt{journal/volume/issue} part of the citation for articles and via the a) \texttt{volume/chapter/pages} or b) \texttt{number/series} or c) \texttt{publisher} part for books, with a) taking precedence if provided over b) taking precedence if provided over c).
247 This behaviour can be changed to output explicit DOI links instead. To do so, include the entry
248 \begin{verbatim*}
249 @preamble{"\MakeDoiLinksExplicit"}
250 \end{verbatim*}
251 anywhere in the \emph{bibliography} (i.e. the \texttt{.bib} file) like one would include a reference.
252
253 \paragraph{Indicator for page backreferences}
254 The \texttt{hyperref} package, for example, allows for the option \texttt{pagebackref}, which adds links to each bibliography entry that point from the entry to its citations throughout the document.
255 When this is used, it may be nice to have a word towards the end of the entry that indicates what the -- otherwise bare -- numbers added to the entry mean.
256 The word ``Appearances'' can be added automatically by including the entry
257 \begin{verbatim*}
258 @preamble{"\PageBackRef"}
259 \end{verbatim*}
260 anywhere in the \emph{bibliography} (i.e. the \texttt{.bib} file) like one would include a reference.
261
262 \paragraph{Compression}
263 By default, the quantum bibstyle prints the numbers for all references separately and does not compress
264 a range of citations, like so: [1, 6, 7, 8, 11, 12, 13, 14].
265 This has the advantage of making all references explicitly accessible from the citation position and enables readers to find all occurrences of a given reference.
266 If you prefer to compress citations (like so: [1, 6-8, 11-14]), simply add
267 \begin{verbatim*}
268 \PassOptionsToPackage{compress}{natbib}
269 \end{verbatim*}
270 to the preamble \emph{before} including
271 \begin{verbatim*}
272 \usepackage[numbers]{natbib}
273 \end{verbatim*}
274 where the option \texttt{numbers} is required to make the bibliography style work.
275
276 \end{document}