From c441617a2cd82c0b0907d0106dbf047987ffd97d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 26 Mar 2022 03:00:32 +0000 Subject: CTAN sync 202203260300 --- macros/latex/contrib/dataref/doc/dataref-doc.pdf | Bin 238060 -> 260049 bytes macros/latex/contrib/dataref/doc/dataref-doc.tex | 12 +- macros/latex/contrib/dataref/tex/dataref.sty | 116 +- macros/latex/contrib/oup-authoring-template/README | 2 +- .../doc/oup-authoring-template-doc.pdf | Bin 204301 -> 205399 bytes .../doc/oup-authoring-template-doc.tex | 85 +- .../contrib/oup-authoring-template/manifest.txt | 2 +- .../oup-authoring-template.cls | 517 +++++- .../oup-authoring-template.pdf | Bin 362414 -> 179738 bytes .../oup-authoring-template.tex | 196 +-- macros/latex/contrib/quantumarticle/README.md | 30 +- .../latex/contrib/quantumarticle/example-plot.pdf | Bin 0 -> 47088 bytes .../quantum-bibliographystyle-demo.bib | 533 ++++++ .../quantum-bibliographystyle-demo.pdf | Bin 0 -> 261448 bytes .../quantum-bibliographystyle-demo.tex | 267 +++ .../contrib/quantumarticle/quantum-template.pdf | Bin 434991 -> 435047 bytes .../contrib/quantumarticle/quantum-template.tex | 33 +- macros/latex/contrib/quantumarticle/quantum.bst | 1789 ++++++++++++++++++++ .../contrib/quantumarticle/quantumarticle.cls | 6 +- .../quantumarticle/quantumview-template.bib | 43 + .../quantumarticle/quantumview-template.pdf | Bin 0 -> 264391 bytes .../quantumarticle/quantumview-template.tex | 68 + .../latex/contrib/quantumarticle/quantumview.cls | 1004 +++++++++++ 23 files changed, 4437 insertions(+), 266 deletions(-) create mode 100644 macros/latex/contrib/quantumarticle/example-plot.pdf create mode 100644 macros/latex/contrib/quantumarticle/quantum-bibliographystyle-demo.bib create mode 100644 macros/latex/contrib/quantumarticle/quantum-bibliographystyle-demo.pdf create mode 100644 macros/latex/contrib/quantumarticle/quantum-bibliographystyle-demo.tex create mode 100644 macros/latex/contrib/quantumarticle/quantum.bst create mode 100644 macros/latex/contrib/quantumarticle/quantumview-template.bib create mode 100644 macros/latex/contrib/quantumarticle/quantumview-template.pdf create mode 100644 macros/latex/contrib/quantumarticle/quantumview-template.tex create mode 100644 macros/latex/contrib/quantumarticle/quantumview.cls (limited to 'macros/latex/contrib') diff --git a/macros/latex/contrib/dataref/doc/dataref-doc.pdf b/macros/latex/contrib/dataref/doc/dataref-doc.pdf index ec64e4c97a..6e1da0af9a 100644 Binary files a/macros/latex/contrib/dataref/doc/dataref-doc.pdf and b/macros/latex/contrib/dataref/doc/dataref-doc.pdf differ diff --git a/macros/latex/contrib/dataref/doc/dataref-doc.tex b/macros/latex/contrib/dataref/doc/dataref-doc.tex index d50200f57a..8041e40e3a 100644 --- a/macros/latex/contrib/dataref/doc/dataref-doc.tex +++ b/macros/latex/contrib/dataref/doc/dataref-doc.tex @@ -15,7 +15,7 @@ % This work consists of the files dataref.tex and dataref.sty \documentclass{ltxdoc} -\usepackage[usagereport]{dataref}[2017/01/06] +\usepackage[usagereport]{dataref}[2019/02/01] \EnableCrossrefs \CodelineIndex @@ -83,6 +83,7 @@ include all dead mice before.} Right brace \} Tilde \~} + \changes{v0.7}{2019/02/15}{Fix math backends, \cmd{\drefinput}} \changes{v0.6}{2016/11/15}{Units, Unit Scaling, general overhaul} \changes{v0.4}{2015/04/21}{Remove Spurious Whitespaces} \changes{v0.1}{2013/12/06}{Initial version} @@ -296,10 +297,11 @@ It is a value-typed PGF key, so operations like \Macro{\drefinput[\meta{prefix}]\{\meta{filename}\}} -Uses \cmd{\input} to read the file. During the processing of this file -\option{prefix} is set to the given value. This is useful to include -several files that resulted from different experiments but include -equal datapoint keys. +Reads in the given \TeX/dataref file with the given key prefix. Therefore, all included \cmd{\drefset} commands are define their keys with the given prefix. +This is useful to include several files that resulted from different experiments but include equal datapoint keys. + +This command uses \cmd{\subimport} from the \texttt{import} package to read the file. +Hence, if there is an \cmd{\drefinput} in an included file, it search its filename relative to its own directory.\footnote{In former versions, \cmd{\drefinput} relied directly on \cmd{\input} and, therefore, the filename was interpreted relative to the root file.}. \subsection{Referencing Datapoints} diff --git a/macros/latex/contrib/dataref/tex/dataref.sty b/macros/latex/contrib/dataref/tex/dataref.sty index bb6f013032..2eb4931c17 100644 --- a/macros/latex/contrib/dataref/tex/dataref.sty +++ b/macros/latex/contrib/dataref/tex/dataref.sty @@ -1,4 +1,4 @@ -%% Copyright 2013-2017 Christian Dietrich +%% Copyright 2013-2022 Christian Dietrich %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 @@ -15,7 +15,7 @@ %% This work consists of the files dataref.dtx and dataref.ins %% and the derived file dataref.sty. \NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{dataref}[2017/01/06 v0.6 dataref] +\ProvidesPackage{dataref}[2022/03/25 v0.7 dataref] \ifx\drefloaded\undefined \let\drefloaded=\relax @@ -33,6 +33,9 @@ \RequirePackage{iftex} \RequirePackage{kvoptions} \RequirePackage{etoolbox} +\RequirePackage{import} + + \SetupKeyvalOptions{ family=dref, @@ -49,11 +52,14 @@ % Load & Store Layer +% \dref@xdef is only used in \dref@set +\let\dref@xdef=\xdef % \dref@xdef is overridden in case of listadd + \def\dref@set#1#2#3{% \edef\dref@set@path{#3}% \edef\dref@set@value{#2}% \expandafter\pgfkeys@temptoks\expandafter{\dref@set@value}% - \expandafter\xdef% + \expandafter\dref@xdef% \csname pgfk@\dref@datapath\dref@set@path\endcsname% {\the\pgfkeys@temptoks}% % Setting the Unit is a little bit more tricky @@ -85,6 +91,16 @@ }% } +% List Looping. We define this upfront, as we have to build a pgfk@ +% name here. The @loop@do macro is a helper to invoke list/do with the +% list element. dref@loop uses the etoolbox for looping feature. +\def\dref@loop@do#1{\drefkeys{list/do={#1}}} +\def\dref@loop#1{% + \forlistcsloop{\dref@loop@do}{% + pgfk@\dref@datapath #1% + }% +} + \def\drefifdefined#1{% \pgfkeysifdefined{\dref@datapath\drefprefix #1}%{then}{else} } @@ -107,7 +123,7 @@ .search also={/pgf/number format}, % The @init action is used to initialize all other actions @[/.code={\begingroup% - \pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}% No more dimensions too large + % /pgf/fpu: \pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}% No more dimensions too large \def\drefunit{}% At first we are unitless \aftergroup\edef% \aftergroup\drefresult% @@ -186,7 +202,13 @@ \aftergroup\drefresult% \aftergroup}} }, - % + % List Keys + list/append/.code={\let\dref@xdef=\listxadd}, + % Apply loop/do for every item + list/loop/.code={% + \dref@loop{\drefprefix #1} + }, + % Various Keys debug/.is if=dref@debug, ignoremissing/.is if=dref@ignoremissing, defaultvalue/.store in=\dref@defaultvalue, @@ -300,11 +322,27 @@ \drefkeys{@[, @init, value={#3}, #1, save={#2}, @set, @]}% } +\def\dref@splitpath@helper#1/#2\@nnil{% + \ifx&% Basename found + \def\dref@basename{#1}\let\@next\relax% + \else% Another Dirname + \edef\dref@dirname{\dref@dirname #1/}% + \def\@next{\dref@splitpath@helper#2\@nnil}% + \fi% + \@next% +} +\def\dref@splitpath#1{% + % Splits path into \dref@dirname and \dref@basename + \def\dref@dirname{}% + \dref@splitpath@helper #1/\@nnil% +} + \newcommand{\drefinput}[2][]{% - \begingroup - \drefkeys{prefix/.append={#1}} - \input{data/#2} - \endgroup + \begingroup% + \drefkeys{prefix/.append={#1}}% + \dref@splitpath{#2}% + \subimport{\dref@dirname}{\dref@basename}% + \endgroup% } @@ -460,6 +498,51 @@ \def\dref@parser@end#1#2\@nnil{} \csdef{dref@parser@@}{\dref@parser@end} +\newif\ifdrefbadmath +\newif\ifdref@xfp +\IfFileExists{xfp.sty}{\dref@xfptrue}{\dref@xfpfalse} + +% For LuaLaTeX: use the lua math engine +\ifLuaTeX + \drefbadmathfalse% + \def\drefmathparse#1{% + \edef\pgfmathresult{\directlua{% + abs=math.abs ; + result = (#1); + if result == false then + tex.print(0); + elseif result == true then + tex.print(1); + else + tex.print(string.format(string.char(37).."s", result)) + end + }}}% +% We use the FP Library of expl3. This seems to work better for +% floating numbers and for integers +\else \ifdref@xfp + \RequirePackage{xfp} + \drefbadmathfalse% + \ExplSyntaxOn% we want to do tests % Usepackage xfp + \cs_set_eq:NN \dref@fpeval \fp_eval:n% + \ExplSyntaxOff% + \def\drefmathparse#1{% + \edef\pgfmathresult{\dref@fpeval{#1}}% + }% +%% Fallback to PGFMath +\else + \drefbadmathtrue% + \def\drefmathparse#1{% + \pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}% + \pgfmathparse{#1}% + }% + \dref@warning{****************************************************}% + \dref@warning{Dataref will use bad math library (/pgf/fpu). Be aware% + of floating point rounding errors}% + \dref@warning{****************************************************}% + \fi +\fi + + \drefkeys{ @init/.append style={% @calc/.code={},% @@ -467,19 +550,20 @@ @calc pgf/.style={ @calc/.append code={% \dref@parser{#1}{\dref@calc@@ready}% - \pgfmathparse{\dref@calc@@ready}% + \drefmathparse{\dref@calc@@ready}% \dref@debug{#1 -> \dref@calc@@ready = \pgfmathresult}% \edef\drefresult{\pgfmathresult}% - } + } } } + \protected\def\drefcalc{\@ifstar\drefcalc@starred\drefcalc@unstarred} \newcommand{\drefcalc@unstarred}[2][]{% Unstarred \drefkeys{@[,@init, print=default, @calc pgf={#2}, #1, @calc, @print, @set,% @annotate={\textbackslash drefcalc[#1]\{#2\}},@]}% } -\newcommand{\drefcalc@starred}[2][]{ % Starred +\newcommand{\drefcalc@starred}[2][]{% Starred \drefkeys{@[,@init, @calc pgf={#2}, #1, @calc, @set,% @annotate={\textbackslash \drefcalc*[#1]\{#2\}},@]% }% @@ -722,7 +806,7 @@ \else% \dref@error{Assertion failed: #1}% \fi% - \else + \else% \dref@warning{Assertion holds: #1}% \fi% \endgroup% @@ -738,7 +822,7 @@ @calc pgf={100 * (\drefresult)}, }, percent of/.style={ - factor of=#1, percent, + factor of={#1}, percent, @calc/.append code={\def\drefunit{}}, }, scale by/.style={ @@ -904,10 +988,10 @@ \def\do####1{% \edef\dref@unit@key{/dref/units/\expandafter\detokenize\expandafter{\drefunit} to \detokenize{####1}}% \pgfkeys{\dref@unit@key/.get=\dref@unit@factor}% - \pgfmathparse{\@@score{\drefunit@bestvalue} < \@@score{\drefresult \dref@unit@factor}}% + \drefmathparse{\@@score{\drefunit@bestvalue} < \@@score{\drefresult \dref@unit@factor}}% %\typeout{\drefunit \pgfmathresult \detokenize{####1}}% \ifdim\pgfmathresult pt=1.0 pt% - \pgfmathparse{(\drefresult) \dref@unit@factor}% + \drefmathparse{(\drefresult) \dref@unit@factor}% \edef\drefunit@bestvalue{\pgfmathresult}% \def\drefunit@best{####1}% %\typeout{\expandafter\detokenize\expandafter{\drefunit} to diff --git a/macros/latex/contrib/oup-authoring-template/README b/macros/latex/contrib/oup-authoring-template/README index 9226d6cecd..6b4d3f1adc 100644 --- a/macros/latex/contrib/oup-authoring-template/README +++ b/macros/latex/contrib/oup-authoring-template/README @@ -16,7 +16,7 @@ latex oup-authoring-template-doc.tex Also, oup-authoring-template-doc.pdf is available in the doc directory. -Copyright 2020 OXFORD UNIVERSITY PRESS. +Copyright 2022 OXFORD UNIVERSITY PRESS. Documentation and supporting packages are released under the LATEX Project Public Licence, either version 1.3 or any later diff --git a/macros/latex/contrib/oup-authoring-template/doc/oup-authoring-template-doc.pdf b/macros/latex/contrib/oup-authoring-template/doc/oup-authoring-template-doc.pdf index fdeebcf01a..7700efec48 100644 Binary files a/macros/latex/contrib/oup-authoring-template/doc/oup-authoring-template-doc.pdf and b/macros/latex/contrib/oup-authoring-template/doc/oup-authoring-template-doc.pdf differ diff --git a/macros/latex/contrib/oup-authoring-template/doc/oup-authoring-template-doc.tex b/macros/latex/contrib/oup-authoring-template/doc/oup-authoring-template-doc.tex index d4e6eedc8a..8e118966b4 100644 --- a/macros/latex/contrib/oup-authoring-template/doc/oup-authoring-template-doc.tex +++ b/macros/latex/contrib/oup-authoring-template/doc/oup-authoring-template-doc.tex @@ -38,9 +38,21 @@ OUP Journals---Authoring template} \tableofcontents \section{Introduction } -Oxford University Press has developed this authoring template to help authors in preparing articles. Authors are encouraged to use this template to produce \LaTeX\ manuscripts which conform to OUP Journal styles. This document is a manual for authors to help using this template during article preparation. It features general guidelines and contains descriptions regarding various elements that can be used while preparing manuscripts. Authors are requested to refer to the file ``readme.pdf'' for details of files available for reference. - -Please utilize the OUP authoring template to the maximum, rather than adding further packages. If you need extra structural mark-up, please provide a note to the compositor on the same. Packages that only ``enhance'' the layout are not recommended. The same applies to newly introduced macros. Please concentrate on logical mark-up instead of formatting. This will ease the production process and avoids misinterpretation of your \LaTeX\ code. +Oxford University Press has developed this authoring template to +help authors in preparing articles. Authors are encouraged to use +this template to produce \LaTeX\ manuscripts which conform to OUP +Journal styles. This document is a manual for authors to help using +this template during article preparation. It features general +guidelines and contains descriptions regarding various elements that +can be used while preparing manuscripts. Authors are requested to +refer to the file ``readme'' for details of files available for +reference. + +Please utilize the OUP authoring template to the maximum, rather +than adding further packages or macros if possible. Please use +semantic mark-up instead of formatting markup where there is a +choice, for instance using \verb+\emph+ rather than \verb+\it+ or +\verb+\textit+ to indicate emphasis. This documentation is not intended to give an introduction to \LaTeX. For questions concerning \TeX\ systems/installations or the \LaTeX\ mark-up language in general, please visit \url{http://tug.ctan.org/} or any other \TeX\ user group worldwide. The essential reference for \LaTeX\ is Mittelbach F., Goossens M. (2004) \textit{The \LaTeX\ Companion. 2nd edn.}, but there are many other good books about \LaTeX. @@ -53,8 +65,17 @@ This documentation is not intended to give an introduction to \LaTeX. For questi \url{https://www.overleaf.com/learn} \end{itemize} -\section{How to start and prepare your article } -It is assumed that you possess basic knowledge of \LaTeX. Unless using \LaTeX\ online (for example via Overleaf.com) ensure that you have \LaTeX2e version installed on your computer. We suggest employing a recent \TeX installation: the most important distribution at the time of writing being MiK\TeX\ 2.9. You are provided with a class file ``oup-authoring-template.cls''. This template can be kept with your manuscript files. Note that the class file depends on the following packages which are standard and are available along with \LaTeX installation: +\vfill\eject + +\section{How to start and prepare your article} +It is assumed that you possess basic knowledge of \LaTeX. Unless +using \LaTeX\ online (for example via Overleaf.com) ensure that you +have \LaTeX2e version installed on your computer. We suggest +employing a recent \TeX installation. You are provided with a class +file ``oup-authoring-template.cls''. This template can be kept with +your manuscript files. Note that the class file depends on the +following packages which are standard and are available along with +\LaTeX installation: \begin{center}\begin{tabular}{|l|l|l|l|l|}\hline graphicx & multirow & amsmath & amssymb & amsfonts \\\hline @@ -66,7 +87,7 @@ algorithmicx & algpseudocode & listings & url & crop \\\hline Apart from the above-listed packages, the following additional packages are used in the class file for providing add-on functionalities to the template: \begin{center}\begin{tabular}{|c|c|c|c|c|}\hline -subfloat & subfig & appendix & hyperref & footnote \\\hline +subfloat & subfig & tikz & hyperref & footnote \\\hline mathrsfs & natbib & wrapfig & amsthm & apacite \\\hline \end{tabular}\end{center} @@ -81,10 +102,15 @@ To learn more about the underlying packages, please read the respective document Based on your journal style, we would suggest you to use the corresponding sample template file to start your manuscript preparation; other templates available in the package can be removed. Please save a copy of the template file before you start editing the file as per your requirement. These samples contain the lines for calling class files, the preamble area, and the start/end of document where major sample elements required for an article are placed. Comments are included for each element and are self-explanatory. You can add your actual manuscript content in place of these sample elements. The standard structure of each element for an article is explained in detail in the following sections. -To use OUP authoring template, put all the package files in your working directory, edit the file ``sample template file'' in your preferred text editor, and run \LaTeX\ as usual. The resulting layout is similar but not identical to the layout of the final article. +To use the OUP authoring template, put all the package files in your +working directory, edit the file ``sample template file'' in your +preferred text editor, and run \LaTeX\ as usual. The resulting +layout is similar but not identical to the layout of the final +article. Please note that you are not responsible for any final page layout. It is not necessary (and is even sometimes undesirable) to do any fine-tuning with commands like \verb+\break+, \verb+\pagebreak+, \verb+\vspace+, \verb+\clearpage+, etc. Please use semantic mark-up as far as possible and avoid additional formatting commands. +\vfill\eject \section{Package features and some important settings} @@ -174,12 +200,17 @@ This tag contains two parameters, first one is optional and the second argument \item The other tags listed below are self-explanatory. Note the `received', `revised' and `accepted' dates are placeholders for the final publication: these can be left blank: -{\tabcolsep3pt\fontsize{7}{10}\selectfont\begin{tabular}{|l|l|l|l|l|} \hline -\verb+\orgdiv{. . .}+ & \verb+\orgname{. . .}+ & \verb+\orgaddress{. . .}+ & \verb+\country{. . .}+ & \verb+\postcode{. . .}+ \\ \hline -\verb+\street{. . .}+ & \verb+\city{. . .}+ & \verb+\state{. . .}+ & \verb+\abstract{. . .}+ & \verb+\keywords{. . .}+ \\ \hline -\verb+\received{. . .}+ & \verb+\revised{. . .}+ & \verb+\accepted{. . .}+ & & \\ \hline +{\tabcolsep3pt\fontsize{7}{10}\selectfont\begin{tabular}{|l|l|l|l|l|} +\hline \verb+\orgdiv{. . .}+ & \verb+\orgname{. . .}+ & +\verb+\orgaddress{. . .}+ & \verb+\country{. . .}+ & +\verb+\postcode{. . .}+ \\ \hline \verb+\street{. . .}+ & +\verb+\city{. . .}+ & \verb+\state{. . .}+ & \verb+\abstract{. . .}+ +& \verb+\keywords{. . .}+ \\ \hline \verb+\received{. . .}+ & +\verb+\revised{. . .}+ & \verb+\accepted{. . .}+ & & \\ \hline \end{tabular}} +\item \verb+\ORCID{...}+-- provide ORCID link with logo inside this tag. + \item \verb+\maketitle+---this tag is mandatory to print the front matter elements in the output. \end{enumerate} @@ -205,10 +236,13 @@ The template allows four levels of headings in different styles: \subsection{Mathematical formulae} -As ``amsmath'' package provides various features for displayed equations and other mathematical constructs and you are strongly encouraged to use the mark-ups provided by this package. If possible, avoid using manual skips to align an equation. +As the ``amsmath'' package provides various features for displayed +equations and other mathematical constructs and you are strongly +encouraged to use the mark-ups provided by this package. If +possible, avoid using manual skips to align an equation. \subsection{Figures and Tables} -The standard interface for graphic inclusion is the \verb+\includegraphics+ command provided by the graphicx package. The ``draft'' option provided by this package locally switches to draft mode, i.e. does not include the graphic, but leaves the correct space, and prints the filename. This option may be used to save the processing time during compilation. Note that the \verb+\graphicspath+ command allows you to declare one or more folders where the graphicx package looks for the image files; hence, it is not necessary to write the path into each \verb+\includegraphics+ command. +The standard interface for graphic inclusion is the \verb+\includegraphics+ command provided by the graphicx package. The ``draft'' option provided by this package locally switches to draft mode, i.e. does not include the graphic, but leaves the correct space, and prints the filename. This option may be used to save the processing time during compilation. Note that the \verb+\graphicspath+ command allows you to declare one or more folders where the graphicx package looks for the image files; hence, it is not necessary to write the path into each \verb+\includegraphics+ command. The format used for numbered ``figures/tables'' is similar to the basic \LaTeX\ format: @@ -285,20 +319,23 @@ To span rotated tables across columns in double column layout: The default list commands available in \LaTeX\ can be used to set different types of lists: \begin{enumerate} -\item numbered: \verb+\begin{enumerate}...\end{enumerate}+ -\item[] first level—Arabic numerals; -\item[]second level—lowercase alphabet; -\item[]third level—lowercase roman numerals; -\item unnumbered: \verb+\begin{unlist}...\end{unlist}+ -\item custom list: \verb+\begin{itemize}...\end{itemize}+ -\item[]first level—bulleted; -\item[]second level—bulleted. +\item numbered: \verb+\begin{enumerate}...\end{enumerate}+ +\item[] first level Arabic numerals; +\item[]second level lowercase alphabet; +\item[]third level lowercase roman numerals; +\item unnumbered: \verb+\begin{unlist}...\end{unlist}+ +\item custom list: \verb+\begin{itemize}...\end{itemize}+ +\item[]first level bulleted; +\item[]second level bulleted. \end{enumerate} Nested lists are allowed for numbered and custom lists. \subsection{Theorem-like environments} -For theorem like environments, we require ``amsthm'' package. There are three types of predefined theorem styles—thmstyleone, thmstyletwo, and thmstylethree. The below table shows the output details for each style: +For theorem-like environments, we require the ``amsthm'' package. +There are three types of predefined theorem styles: thmstyleone, +thmstyletwo, and thmstylethree. The below table shows the output +details for each style: \begin{center}\begin{tabular}{|l|p{22pc}|} \hline thmstyleone &Numbered, theorem head in bold font and theorem text in italic style\\ \hline @@ -416,9 +453,9 @@ Revision State & Revision Date & Version Number & Revision History\\ \hline 00 & 16 March, 2020 & Version 1.0 & \\ \hline + 01 & 18 March, 2022 & Version 1.1 & \\ + \hline \end{tabular} - - \end{document} diff --git a/macros/latex/contrib/oup-authoring-template/manifest.txt b/macros/latex/contrib/oup-authoring-template/manifest.txt index 139c288b0b..62725201ad 100644 --- a/macros/latex/contrib/oup-authoring-template/manifest.txt +++ b/macros/latex/contrib/oup-authoring-template/manifest.txt @@ -1,5 +1,5 @@ %% -%% Copyright 2020 OXFORD UNIVERSITY PRESS +%% Copyright 2022 OXFORD UNIVERSITY PRESS %% %% This file is part of the 'oup-authoring-template Bundle'. %% --------------------------------------------- diff --git a/macros/latex/contrib/oup-authoring-template/oup-authoring-template.cls b/macros/latex/contrib/oup-authoring-template/oup-authoring-template.cls index 52a0142230..86c58a3979 100644 --- a/macros/latex/contrib/oup-authoring-template/oup-authoring-template.cls +++ b/macros/latex/contrib/oup-authoring-template/oup-authoring-template.cls @@ -1,5 +1,5 @@ %% -%% Copyright 2020 OXFORD UNIVERSITY PRESS +%% Copyright 2022 OXFORD UNIVERSITY PRESS %% %% This file is part of the 'oup-authoring-template Bundle'. %% --------------------------------------------- @@ -17,10 +17,11 @@ %% Template article for OXFORD UNIVERSITY PRESS's document class `oup-authoring-template' %% with bibliographic references %% +%% Version 1.1, updated to reflect changes to OUP’s official page designs, 2022. \newcommand\classname{oup-authoring-template} -\newcommand\lastmodifieddate{2020/02/18} -\newcommand\versionnumber{1.0} +\newcommand\lastmodifieddate{2022/03/18} +\newcommand\versionnumber{1.1} \NeedsTeXFormat{LaTeX2e}[2001/06/01] \ProvidesClass{\classname}[\lastmodifieddate\space\versionnumber] @@ -35,13 +36,14 @@ \newif\if@medium\global\@mediumfalse \newif\if@small\global\@smallfalse % +\newif\if@numbib \@numbibtrue \newif\if@unnumsec\global\@unnumsecfalse \newif\if@final\global\@finalfalse \newif\if@weblink\@weblinkfalse \newif\if@proof\global\@prooffalse% \if@compatibility\else -\DeclareOption{namedate}{\PassOptionsToPackage{authoryear,round}{natbib}} +\DeclareOption{namedate}{\PassOptionsToPackage{authoryear,round}{natbib}\global\@numbibfalse} \DeclareOption{draft}{\PassOptionsToPackage{draft}{graphicx}} \DeclareOption{b4paper}{\PassOptionsToPackage{b4}{crop}} \DeclareOption{centre}{\PassOptionsToPackage{center}{crop}} @@ -68,7 +70,7 @@ \if@modern \if@large \setlength{\paperheight}{278.83truemm} - \setlength{\paperwidth}{215.78truemm} + \setlength{\paperwidth}{209.78truemm} \else \if@medium \setlength{\paperheight}{245.96truemm} @@ -515,12 +517,12 @@ \setlength\headsep{8\p@} \setlength\footskip{16\p@} \setlength\maxdepth{.5\topskip} - \setlength\textwidth{171.5mm} + \setlength\textwidth{178mm} \setlength\textheight{60\baselineskip} \setlength\marginparsep{3\p@} \setlength\marginparpush{3\p@} \setlength\marginparwidth{35\p@} - \setlength\oddsidemargin{5.25pc} + \setlength\oddsidemargin{4pc} \addtolength\oddsidemargin{-1in} \setlength\@tempdima{\paperwidth} \addtolength\@tempdima{-\textwidth} @@ -634,12 +636,12 @@ \setlength\headsep{17.7\p@} \setlength\footskip{16\p@} \setlength\maxdepth{.5\topskip} - \setlength\textwidth{337pt} + \setlength\textwidth{360pt} \setlength\textheight{45\baselineskip} \setlength\marginparsep{3\p@} \setlength\marginparpush{3\p@} \setlength\marginparwidth{35\p@} - \setlength\oddsidemargin{4.45pc} + \setlength\oddsidemargin{3.75pc} \addtolength\oddsidemargin{-1in} \setlength\@tempdima{\paperwidth} \addtolength\@tempdima{-\textwidth} @@ -813,25 +815,43 @@ \if@modern \if@small \def\@oddfoot{{ - \hbox to \textwidth{\parbox{\textwidth}{\sffamilyfontcn + \hbox to + \textwidth{\parbox{\textwidth}{\hspace*{1pt}\vspace*{3pt}\newline\rule{332pt}{.5pt}\vspace*{1pt}\newline\sffamilyfontcn% \fontsize{7}{9}\fontshape{n}\selectfont\raggedright \copyright\space The Author \@copyrightyear. Published by Oxford University Press. All rights reserved. For permissions, please e-mail: journals.permissions@oup.com% \hfill\small\sffamilyfontbold\thepage}}% }}% \def\@evenfoot{{ - \hbox to \textwidth{\parbox{\textwidth}{\sffamilyfontcn\thepage\hfill + \hbox to \textwidth{\parbox{\textwidth}{\hspace*{1pt}\vspace*{3pt}\newline\rule{332pt}{.5pt}\vspace*{1pt}\newline\sffamilyfontcn\thepage\hfill \fontsize{7}{9}\fontshape{n}\selectfont\raggedright \copyright\space The Author \@copyrightyear. Published by Oxford University Press. All rights reserved. For permissions, please e-mail: journals.permissions@oup.com}% }}}% \else + \if@medium \def\@oddfoot{{ - \hbox to \textwidth{\sffamilyfontcn + \hbox to + \textwidth{\parbox{428pt}{\hspace*{1pt}\vspace*{3pt}\newline\rule{428pt}{.5pt}\vspace*{1pt}\newline\sffamilyfontcn% \fontsize{7}{9}\fontshape{n}\selectfont \copyright\space The Author \@copyrightyear. Published by Oxford University Press. All rights reserved. For permissions, please e-mail: journals.permissions@oup.com% - \hfill\small\sffamilyfontbold\thepage}% + \hfill\small\sffamilyfontbold\thepage}}% }}% \def\@evenfoot{{ - \hbox to \textwidth{\sffamilyfontcn\thepage\hfill + \hbox to + \textwidth{\parbox{428pt}{\hspace*{1pt}\vspace*{3pt}\newline\rule{428pt}{.5pt}\vspace*{1pt}\newline% +\sffamilyfontcn\thepage\hfill \fontsize{7}{9}\fontshape{n}\selectfont \copyright\space The Author \@copyrightyear. Published by Oxford University Press. All rights reserved. For permissions, please e-mail: journals.permissions@oup.com}% + }}}% +\else% + \def\@oddfoot{{ + \hbox to + \textwidth{\parbox{\textwidth}{\hspace*{1pt}\vspace*{3pt}\newline\rule{506pt}{.5pt}\vspace*{1pt}\newline\sffamilyfontcn% + \fontsize{7}{9}\fontshape{n}\selectfont \copyright\space The Author \@copyrightyear. Published by Oxford University Press. All rights reserved. For permissions, please e-mail: journals.permissions@oup.com% + \hfill\small\sffamilyfontbold\thepage}}% }}% - \fi + \def\@evenfoot{{ + \hbox to + \textwidth{\parbox{\textwidth}{\hspace*{1pt}\vspace*{3pt}\newline\rule{506pt}{.5pt}\vspace*{1pt}\newline% +\sffamilyfontcn\thepage\hfill + \fontsize{7}{9}\fontshape{n}\selectfont \copyright\space The Author \@copyrightyear. Published by Oxford University Press. All rights reserved. For permissions, please e-mail: journals.permissions@oup.com}% + }}}% + \fi\fi \else \if@traditional \if@large @@ -1070,18 +1090,10 @@ \def\keywords#1{\g@addto@macro\@abstract{% \if@modern% - \if@medium\vspace*{6pt}\else% - \vspace*{12pt}\fi% + \vspace*{6pt}% \else% \if@traditional - \if@large - \vspace*{12pt} - \else - \if@medium \vspace*{12pt} - \else - \fi - \fi \else \vspace*{8pt} \fi @@ -1104,7 +1116,7 @@ \def\@boxedtext{} \def\boxedtext{\@@boxedtext}% -\newcommand{\@@boxedtext}[1]{\def\@boxedtext{\ifx#1\@empty\else\fbox{\parbox{.97\textwidth}{\textbf{Key Messages}\par#1\vspace{-8pt}}}\fi}} +\newcommand{\@@boxedtext}[1]{\def\@boxedtext{\ifx#1\@empty\else\removelastskip\vskip-2pc\fbox{\parbox{.97\textwidth}{\textbf{Key Messages}\par#1\vspace{-8pt}}}\par\vskip2pc\fi}} \def\orgdiv#1{#1} \def\orgname#1{#1} @@ -1146,6 +1158,7 @@ \newcommand\maketitle{\par \begingroup +\def\@latex@warning@no@line##1{}% \renewcommand\thefootnote{\@fnsymbol\c@footnote}% \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% \long\def\@makefntext##1{\parindent 3mm\noindent @@ -1244,8 +1257,8 @@ \fi\fi \else \if@contemporary - \if@large\vspace*{27.2pt}\else - \if@medium\vspace*{21pt}\else + \if@large\vspace*{15.2pt}\else + \if@medium\vspace*{15.2pt}\else \vspace*{21pt} \fi\fi \else @@ -1256,7 +1269,7 @@ \if@modern% \if@large% \hbox to \textwidth{\raisebox{5pt}[0pt]{% - \parbox[b]{416pt}{\raggedleft{{\sffamilyfontcnitalic\fontsize{8bp}{12}\selectfont \@journaltitle}, \sffamilyfontcn\@copyrightyear, \thepage--\thelastpage}\\[1pt] + \parbox[b]{416pt}{\raggedright{{\sffamilyfontcnitalic\fontsize{8bp}{12}\selectfont \@journaltitle}, \sffamilyfontcn\@copyrightyear, \thepage--\thelastpage}\\[1pt] {\sffamilyfontcn doi: \@DOI}\\[1pt] {\ifx\@access\@empty \else @@ -1305,7 +1318,7 @@ \else \if@traditional \if@large - \hbox to \textwidth{\raisebox{18pt}[0pt]{% + \hbox to \textwidth{\raisebox{0pt}[0pt]{% \parbox[b]{416pt}{{{\fontsize{9.5bp}{10}\selectfont\itshape \@journaltitle\rm\ Vol. \@vol, No. \@issue, pp. \thepage--\thelastpage}}\\[-1.5pt] {\fontsize{9.5bp}{10}\selectfont doi: \@DOI}\\[-1.5pt] {\ifx\@access\@empty @@ -1319,7 +1332,7 @@ \hfill{\color{black!20}\rule{45pt}{55pt}}} \else \if@medium - \hbox to \textwidth{\raisebox{18pt}[0pt]{% + \hbox to \textwidth{\raisebox{0pt}[0pt]{% \parbox[b]{350pt}{{{\fontsize{9.5bp}{10}\selectfont\itshape \@journaltitle\rm\ Vol. \@vol, No. \@issue, pp. \thepage--\thelastpage}}\\[-.5pt] {\fontsize{9.5bp}{10}\selectfont doi: \@DOI}\\[-1.5pt] {\ifx\@access\@empty @@ -1331,7 +1344,7 @@ }}% \hfill{\color{black!20}\rule{45pt}{55pt}}} \else - \hbox to \textwidth{\raisebox{18pt}[0pt]{% + \hbox to \textwidth{\raisebox{0pt}[0pt]{% \parbox[b]{250pt}{{{\fontsize{9.5bp}{10}\selectfont\itshape \@journaltitle\rm\ \@copyrightyear, \@vol, \thepage--\thelastpage}}\\[-.5pt] {\fontsize{9.5bp}{10}\selectfont doi: \@DOI}\\[-1.5pt] {\ifx\@access\@empty @@ -1348,51 +1361,51 @@ \if@contemporary \if@large \hbox to \textwidth{{\color{black!20}\rule{45pt}{55pt}}\hfill - \raisebox{-3.7pt}[0pt]{% - \parbox[b]{416pt}{{{\fontsize{8bp}{10}\selectfont\itshape\hspace*{178pt} \@journaltitle,\rm\ \@copyrightyear, pp. \thepage--\thelastpage}}\\[-.5pt] - \hspace*{181pt}{\color{black!15}\rule{288.5pt}{2pt}}\\[1.6pt] - {\fontsize{6.5bp}{8}\selectfont\hspace*{178pt} \textbf{\color{jnlclr}doi: \@DOI}}\\[-.9pt] + \raisebox{-3.7pt}[0pt]{\hfill% + \parbox[b]{416pt}{\raggedleft{{\fontsize{8bp}{10}\selectfont\itshape\hspace*{178pt} \@journaltitle,\rm\ \@copyrightyear, pp. \thepage--\thelastpage}}\\[-.5pt] + \hspace*{181pt}{\color{black!15}\rule{184pt}{2pt}}\\[1.6pt] + {\hfill\fontsize{6.5bp}{8}\selectfont\hspace*{178pt} \textbf{\color{jnlclr}doi: \@DOI}}\\[-.9pt] {\ifx\@access\@empty \else - {\fontsize{6.5bp}{8}\selectfont\hspace*{178pt} \@access}\fi} + {\hfill\fontsize{6.5bp}{8}\selectfont\hspace*{178pt} \@access}\fi} \vskip-.9pt {\ifx\@appnotes\@empty \else - {\fontsize{6.5bp}{8}\selectfont\hspace*{178pt} \@appnotes}\\[-.9pt]\fi} - \hspace*{181pt}{\color{black!15}\rule{288.5pt}{2pt}}\\%[1.6pt] + {\hfill\fontsize{6.5bp}{8}\selectfont\hspace*{178pt} \@appnotes}\\[-.9pt]\fi} +% \hspace*{181pt}{\color{black!15}\rule{288.5pt}{2pt}}\\%[1.6pt] }}% } \else \if@medium \hbox to \textwidth{{\color{black!20}\rule{45pt}{55pt}}\hfill - \raisebox{-8pt}[0pt]{% - \parbox[b]{416pt}{{{\fontsize{8bp}{10}\selectfont\itshape\hspace*{178pt} \@journaltitle,\rm\ \@copyrightyear, pp. \thepage--\thelastpage}}\\[-.5pt] - \hspace*{181pt}{\color{black!15}\rule{257pt}{2pt}}\\[1.6pt] - {\fontsize{6.5bp}{8}\selectfont\hspace*{178pt} \textbf{\color{jnlclr}doi: \@DOI}}\\[-.9pt] + \raisebox{-8pt}[0pt]{\hfill% + \parbox[b]{416pt}{\raggedleft{{\fontsize{8bp}{10}\selectfont\itshape\hspace*{178pt} \@journaltitle,\rm\ \@copyrightyear, pp. \thepage--\thelastpage}}\\[-.5pt] + \hspace*{181pt}{\color{black!15}\rule{184pt}{2pt}}\\[1.6pt] + {\hfill\fontsize{6.5bp}{8}\selectfont\hspace*{178pt} \textbf{\color{jnlclr}doi: \@DOI}}\\[-.9pt] {\ifx\@access\@empty \else - {\fontsize{6.5bp}{8}\selectfont\hspace*{178pt} \@access}\fi} + {\hfill\fontsize{6.5bp}{8}\selectfont\hspace*{178pt} \@access}\fi} \vskip-.9pt {\ifx\@appnotes\@empty \else - {\fontsize{6.5bp}{8}\selectfont\hspace*{178pt} \@appnotes}\\[-.9pt]\fi} - \hspace*{181pt}{\color{black!15}\rule{257pt}{2pt}}\\%[1.6pt] + {\hfill\fontsize{6.5bp}{8}\selectfont\hspace*{178pt} \@appnotes}\\[-.9pt]\fi} +% \hspace*{181pt}{\color{black!15}\rule{257pt}{2pt}}\\%[1.6pt] }}% } \else \hbox to \textwidth{{\color{black!20}\rule{45pt}{55pt}}\hfill - \raisebox{-8pt}[0pt]{% - \parbox[b]{416pt}{{{\fontsize{8bp}{10}\selectfont\itshape\hspace*{108pt} \@journaltitle,\rm\ \@copyrightyear, pp. \thepage--\thelastpage}}\\[-.5pt] - \hspace*{111pt}{\color{black!15}\rule{234pt}{2pt}}\\[1.6pt] - {\fontsize{6.5bp}{8}\selectfont\hspace*{108pt} \textbf{\color{jnlclr}doi: \@DOI}}\\[-.9pt] + \raisebox{-8pt}[0pt]{\hfill% + \parbox[b]{290pt}{\raggedleft{{\fontsize{8bp}{10}\selectfont\itshape\hspace*{80pt} \@journaltitle,\rm\ \@copyrightyear, pp. \thepage--\thelastpage}}\\[-.5pt] + \hspace*{80pt}{\color{black!15}\rule{184pt}{2pt}}\\[1.6pt] + {\hfill\fontsize{6.5bp}{8}\selectfont\hspace*{80pt} \textbf{\color{jnlclr}doi: \@DOI}}\\[-.9pt] {\ifx\@access\@empty \else - {\fontsize{6.5bp}{8}\selectfont\hspace*{108pt} \@access}\fi} + {\hfill\fontsize{6.5bp}{8}\selectfont\hspace*{80pt} \@access}\fi} \vskip-.9pt {\ifx\@appnotes\@empty \else - {\fontsize{6.5bp}{8}\selectfont\hspace*{108pt} \@appnotes}\\[-.9pt]\fi} - \hspace*{111pt}{\color{black!15}\rule{234pt}{2pt}}\\%[1.6pt] + {\hfill\fontsize{6.5bp}{8}\selectfont\hspace*{80pt} \@appnotes}\\[-.9pt]\fi} +% \hspace*{111pt}{\color{black!15}\rule{234pt}{2pt}}\\%[1.6pt] }}% } \fi @@ -1403,9 +1416,9 @@ \fi \if@modern\vskip2pt\else\if@traditional\if@large\vskip-1.7pt\else\if@medium\vskip.7pt\else\vskip-2pt\fi\fi\else\fi\fi \if@modern% - \if@large\noindent\rule{415pt}{2\p@}\else% - \if@medium\noindent\rule{\textwidth}{2\p@}\else% - \if@small\noindent\rule{\textwidth}{2\p@}\else% + \if@large\noindent\rule{\textwidth}{1\p@}\else% + \if@medium\noindent\rule{\textwidth}{1\p@}\else% + \if@small\noindent\rule{\textwidth}{1\p@}\else% \fi\fi\fi% \else% \if@traditional @@ -1415,7 +1428,7 @@ \fi\fi \else \if@contemporary - \if@large\vspace*{55pt}\else% + \if@large\vspace*{25pt}\else% \if@medium\vspace*{25pt}\else% \if@small\vspace*{25pt}\else% \fi\fi\fi% @@ -1448,7 +1461,7 @@ \fi% \fi% % Title below space - \if@modern\if@medium\vspace{8.8\p@}\else\if@small\vspace{7.8\p@}\else\vspace{8.8\p@}\fi\fi\else% + \if@modern\if@medium\vspace{8.8\p@}\else\if@small\vspace{7.8\p@}\else\vspace{6\p@}\fi\fi\else% \if@traditional% \if@large\vspace{4.8\p@}\else\if@medium\vspace{4.8\p@}\else\vspace{8\p@}\fi\fi \else% @@ -1470,9 +1483,9 @@ \fi \fi % Author below space - \if@modern\if@medium\vspace{3\p@}\else\if@small\vspace{3.5\p@}\else\vspace{9\p@}\fi\fi\else + \if@modern\if@medium\vspace{3\p@}\else\if@small\vspace{3.5\p@}\else\vspace{3\p@}\fi\fi\else \if@traditional% - \if@large\vspace{21\p@}\else\if@medium\vspace{10\p@}\else\vspace{10\p@}\fi\fi + \if@large\vspace{10\p@}\else\if@medium\vspace{10\p@}\else\vspace{4\p@}\fi\fi \else \if@contemporary\vspace{4\p@}\else \fi\fi\fi @@ -1490,7 +1503,7 @@ \fi \fi % Address below space - \if@modern\vspace{6\p@}\else\fi + \if@modern\vspace{6\p@}\else\if@traditional\vspace{6\p@}\else\fi\fi % Correspondence author here \if@modern {\sffamilyfontcn\if@large\fontsize{8.5}{12}\selectfont\else\if@medium\fontsize{8}{11.5}\selectfont\else\if@small\fontsize{8.5}{12}\selectfont\else\fontsize{8.5}{12}\selectfont\fi\fi\fi\raggedright \@corresp \par}% @@ -1529,7 +1542,7 @@ \fi % History below space \if@modern\vspace{14\p@}\else - \if@traditional\if@large\vspace{33\p@}\else\if@medium\vspace{20\p@}\else\vspace{4\p@}\fi\fi\else + \if@traditional\if@large\vspace{24\p@}\else\if@medium\vspace{20\p@}\else\vspace{24\p@}\fi\fi\else \if@contemporary\vspace*{8.5pt}\else\fi\fi\fi % Abstract here \if@modern% @@ -1539,27 +1552,31 @@ \if@traditional% \if@large {\fontsize{10bp}{12}\fontseries{b}\selectfont\leftskip0pt plus1fill\rightskip0pt plus1fill \uppercase{Abstract}\par} - \vskip2.5pt + \vskip4pt \else \if@medium {\fontsize{10bp}{12}\fontseries{b}\selectfont\leftskip0pt plus1fill\rightskip0pt plus1fill \uppercase{Abstract}\par} - \vskip2.5pt + \vskip4pt \else {\fontsize{10bp}{12}\fontseries{b}\selectfont\leftskip0pt plus1fill\rightskip0pt plus1fill \uppercase{Abstract}\par} - \vskip1.5pt + \vskip4pt \fi \fi \else \if@contemporary \if@large - {\color{jnlruleclr}\rule{542pt}{2pt}}\vspace*{12.35pt}\par{\fontsize{11.5bp}{12}\fontseries{b}\selectfont\leftskip0pt\rightskip0pt plus1fill {\color{jnlclr} Abstract}\par} + %{\color{jnlruleclr}\rule{542pt}{2pt}} +\vspace*{12.35pt}\par +{\fontsize{11.5bp}{12}\fontseries{b}\selectfont\leftskip0pt\rightskip0pt plus1fill {\color{jnlclr} Abstract}\par} \vskip5.5pt \else \if@medium - {\color{jnlruleclr}\rule{484pt}{2pt}}\vspace*{12.35pt}\par{\fontsize{11.5bp}{12}\fontseries{b}\selectfont\leftskip0pt\rightskip0pt plus1fill {\color{jnlclr} Abstract}\par} + %{\color{jnlruleclr}\rule{484pt}{2pt}} +\vspace*{12.35pt}\par{\fontsize{11.5bp}{12}\fontseries{b}\selectfont\leftskip0pt\rightskip0pt plus1fill {\color{jnlclr} Abstract}\par} \vskip5.5pt \else - {\color{jnlruleclr}\rule{390pt}{2pt}}\vspace*{12.35pt}\par{\fontsize{11.5bp}{12}\fontseries{b}\selectfont\leftskip0pt\rightskip0pt plus1fill {\color{jnlclr} Abstract}\par} + %{\color{jnlruleclr}\rule{390pt}{2pt}} +\vspace*{12.35pt}\par{\fontsize{11.5bp}{12}\fontseries{b}\selectfont\leftskip0pt\rightskip0pt plus1fill {\color{jnlclr} Abstract}\par} \vskip5.5pt \fi \fi @@ -1572,7 +1589,7 @@ \if@small\begin{minipage}[t]{\textwidth}\else\begin{minipage}[t]{415pt}\fi \else \if@traditional% - \hfil\if@large\begin{minipage}[t]{408pt}\else\if@medium\begin{minipage}[t]{360pt}\else\begin{minipage}[t]{312pt}\fi\fi\hspace*{12pt} + \hfil\if@large\begin{minipage}[t]{\textwidth}\else\if@medium\begin{minipage}[t]{\textwidth}\else\begin{minipage}[t]{\textwidth}\fi\fi%\hspace*{12pt} \else \if@contemporary \if@large\begin{minipage}[t]{\textwidth}\else\begin{minipage}[t]{\textwidth}\fi @@ -1608,12 +1625,12 @@ \@abstract \if@contemporary \if@large - \vspace*{6.5pt}\par{\color{jnlruleclr}\rule{542pt}{2pt}} +\vspace*{12pt}\par% \vspace*{6.5pt}\par{\color{jnlruleclr}\rule{542pt}{2pt}} \else \if@medium - \vspace*{6.5pt}\par{\color{jnlruleclr}\rule{484pt}{2pt}} + \vspace*{6.5pt}\par%{\color{jnlruleclr}\rule{484pt}{2pt}} \else - \vspace*{6.5pt}\par{\color{jnlruleclr}\rule{390pt}{2pt}} + \vspace*{6.5pt}\par%{\color{jnlruleclr}\rule{390pt}{2pt}} \fi \fi \else\par\fi} @@ -1626,9 +1643,12 @@ % \vspace{13.5\p@}% \if@modern - \if@medium\noindent\rule{\textwidth}{2\p@}\else - \if@small\noindent\rule{\textwidth}{2\p@}\else - \noindent\rule{415pt}{2\p@}\fi\fi + \if@medium\noindent%\rule{\textwidth}{2\p@} +\else + \if@small\noindent%\rule{\textwidth}{2\p@} +\else + \noindent%\rule{415pt}{2\p@} +\fi\fi \else \if@traditional \else @@ -1667,7 +1687,7 @@ \fi\fi\fi% \else% \if@contemporary - \fontsize{10bp}{12}\fontseries{b}\selectfont\leftskip0pt\rightskip0pt plus1fill\color{jnlclr} + \fontsize{11bp}{13}\selectfont\fontseries{b}\leftskip0pt\rightskip0pt plus1fill\color{jnlclr} \else \fi \fi% @@ -1683,7 +1703,9 @@ \if@small\fontsize{10bp}{12}\fontseries{b}\selectfont\leftskip0pt plus1fill\rightskip0pt plus1fill\else \fi\fi\fi% \else% - \fi% + \if@contemporary + \fontsize{10bp}{12}\selectfont\fontseries{b}\leftskip0pt\rightskip0pt plus1fill + \else\fi\fi% \fi} \def\subsubsecsize{% @@ -1696,7 +1718,9 @@ \if@small\normalfont\mathversion{bold}\fontsize{10bp}{12}\selectfont\bfseries\else \fi\fi\fi% \else% - \fi% + \if@contemporary + \fontsize{9bp}{11}\selectfont\itshape\leftskip0pt\rightskip0pt plus1fill + \else\fi\fi% \fi} \def\section{% @@ -1706,12 +1730,12 @@ \def\subsection{% \@startsection{subsection}{2}{\z@} - {-11\p@ plus -2\p@}{\if@traditional.4\p@\else4\p@\fi} + {-11\p@ plus -2\p@}{\if@traditional.4\p@\else2\p@\fi} {\reset@font\raggedright\subsecsize}} \def\subsubsection{% \@startsection{subsubsection}{3}{\z@} - {-11\p@ plus -1\p@}{0.001em} + {-11\p@ plus -1\p@}{0.1em} {\reset@font\raggedright\subsubsecsize}} \def\textcolon{\text{\rm :}} @@ -1719,8 +1743,8 @@ \def\paragraph{% \@startsection{paragraph}{4}{\z@} {-6\p@} - {-.4em} - {\reset@font\itshape}} + {0.1em} + {\reset@font\normalsize}} \def\@startsection#1#2#3#4#5#6{% \if@noskipsec \leavevmode \fi @@ -2163,6 +2187,16 @@ \RequirePackage{natbib} +%\renewcommand\NAT@force@numbers{% +% \ifNAT@numbers\else +% \PackageError{natbib}{Bibliography not compatible with author-year +% citations.\MessageBreak +% Press to continue in numerical citation style} +% {Check the bibliography entries for non-compliant syntax,\MessageBreak +% or select author-year BibTeX style, e.g. plainnat}% +% \global\NAT@numberstrue\fi} +\def\NAT@force@numbers{\if@numbib\global\NAT@numberstrue\else\global\NAT@numbersfalse\fi}% + \if@modern\if@medium\def\bibfont{\fontsize{7.5bp}{10}\selectfont}\else\fi\else\fi \renewcommand\@biblabel[1]{#1.\hfill\hspace*{3pt}} @@ -2216,7 +2250,11 @@ \flushbottom \frenchspacing \ps@headings -\twocolumn + +\if@small% +\else% +\twocolumn% +\fi% % Screen PDF compatability \newcommand{\medline}[1]{% @@ -2383,7 +2421,8 @@ \renewcommand{\dag}{{\mathversion{normal}$^{\dagger}$}} %% Additional Packages -\RequirePackage{subfloat,subfig} +\RequirePackage[countmax]{subfloat}%,subfig +\usepackage{anyfontsize}% \RequirePackage{multirow} \RequirePackage{footnote} \RequirePackage{url} @@ -2393,9 +2432,319 @@ \RequirePackage{algorithmicx}% \RequirePackage{algpseudocode}% \RequirePackage{listings}% -\RequirePackage{appendix} + +%% Appendix Macro Begins %%% + +\newif\if@chapter@pp\@chapter@ppfalse +\newif\if@knownclass@pp\@knownclass@ppfalse +\@ifundefined{chapter}{% + \@ifundefined{section}{}{\@knownclass@pptrue}}{% + \@chapter@pptrue\@knownclass@pptrue} +\providecommand{\phantomsection}{} +\newcounter{@pps} + \renewcommand{\the@pps}{\alph{@pps}} +\newif\if@pphyper + \@pphyperfalse +\AtBeginDocument{% + \@ifpackageloaded{hyperref}{\@pphypertrue}{}} + +\newif\if@dotoc@pp\@dotoc@ppfalse +\newif\if@dotitle@pp\@dotitle@ppfalse +\newif\if@dotitletoc@pp\@dotitletoc@ppfalse +\newif\if@dohead@pp\@dohead@ppfalse +\newif\if@dopage@pp\@dopage@ppfalse +\DeclareOption{toc}{\@dotoc@pptrue} +\DeclareOption{title}{\@dotitle@pptrue} +\DeclareOption{titletoc}{\@dotitletoc@pptrue} +\DeclareOption{header}{\@dohead@pptrue} +\DeclareOption{page}{\@dopage@pptrue} +\ProcessOptions\relax +\newcommand{\@ppendinput}{} +\if@knownclass@pp\else + \PackageWarningNoLine{appendix}% + {There is no \protect\chapter\space or \protect\section\space command.\MessageBreak + The appendix package will not be used} + \renewcommand{\@ppendinput}{\endinput} +\fi +\@ppendinput + +\newcommand{\appendixtocon}{\@dotoc@pptrue} +\newcommand{\appendixtocoff}{\@dotoc@ppfalse} +\newcommand{\appendixpageon}{\@dopage@pptrue} +\newcommand{\appendixpageoff}{\@dopage@ppfalse} +\newcommand{\appendixtitleon}{\@dotitle@pptrue} +\newcommand{\appendixtitleoff}{\@dotitle@ppfalse} +\newcommand{\appendixtitletocon}{\@dotitletoc@pptrue} +\newcommand{\appendixtitletocoff}{\@dotitletoc@ppfalse} +\newcommand{\appendixheaderon}{\@dohead@pptrue} +\newcommand{\appendixheaderoff}{\@dohead@ppfalse} +\newcounter{@ppsavesec} +\newcounter{@ppsaveapp} +\setcounter{@ppsaveapp}{0} +\newcommand{\@ppsavesec}{% + \if@chapter@pp \setcounter{@ppsavesec}{\value{chapter}} \else + \setcounter{@ppsavesec}{\value{section}} \fi} +\newcommand{\@pprestoresec}{% + \if@chapter@pp \setcounter{chapter}{\value{@ppsavesec}} \else + \setcounter{section}{\value{@ppsavesec}} \fi} +\newcommand{\@ppsaveapp}{% + \if@chapter@pp \setcounter{@ppsaveapp}{\value{chapter}} \else + \setcounter{@ppsaveapp}{\value{section}} \fi} +\newcommand{\restoreapp}{% + \if@chapter@pp \setcounter{chapter}{\value{@ppsaveapp}} \else + \setcounter{section}{\value{@ppsaveapp}} \fi} +\providecommand{\appendixname}{Appendix} +\newcommand{\appendixtocname}{Appendices} +\newcommand{\appendixpagename}{Appendices} +\newcommand{\appendixpage}{% + \if@chapter@pp \@chap@pppage \else \@sec@pppage \fi +} +\newcommand{\clear@ppage}{% + \if@openright\cleardoublepage\else\clearpage\fi} + +\newcommand{\@chap@pppage}{% + \clear@ppage + \thispagestyle{plain}% + \if@twocolumn\onecolumn\@tempswatrue\else\@tempswafalse\fi + \null\vfil + \markboth{}{}% + {\centering + \interlinepenalty \@M + \normalfont + \Huge \bfseries \appendixpagename\par}% + \if@dotoc@pp + \addappheadtotoc + \fi + \vfil\newpage + \if@twoside + \if@openright + \null + \thispagestyle{empty}% + \newpage + \fi + \fi + \if@tempswa + \twocolumn + \fi +} + +\newcommand{\@sec@pppage}{% + \par + \addvspace{4ex}% + \@afterindentfalse + {\parindent \z@ \raggedright + \interlinepenalty \@M + \normalfont + \huge \bfseries \appendixpagename% + \markboth{}{}\par}% + \if@dotoc@pp + \addappheadtotoc + \fi + \nobreak + \vskip 3ex + \@afterheading +} + +\newif\if@pptocpage + \@pptocpagetrue +\newcommand{\noappendicestocpagenum}{\@pptocpagefalse} +\newcommand{\appendicestocpagenum}{\@pptocpagetrue} +\newcommand{\addappheadtotoc}{% + \phantomsection + \if@chapter@pp + \if@pptocpage + \addcontentsline{toc}{chapter}{\appendixtocname}% + \else + \if@pphyper + \addtocontents{toc}% + {\protect\contentsline{chapter}{\appendixtocname}{}{\@currentHref}}% + \else + \addtocontents{toc}% + {\protect\contentsline{chapter}{\appendixtocname}{}}% + \fi + \fi + \else + \if@pptocpage + \addcontentsline{toc}{section}{\appendixtocname}% + \else + \if@pphyper + \addtocontents{toc}% + {\protect\contentsline{section}{\appendixtocname}{}{\@currentHref}}% + \else + \addtocontents{toc}% + {\protect\contentsline{section}{\appendixtocname}{}}% + \fi + \fi + \fi +} + +\providecommand{\theH@pps}{\alph{@pps}} + +\newcommand{\@resets@pp}{\par + \@ppsavesec + \stepcounter{@pps} + \setcounter{section}{0}% + \if@chapter@pp + \setcounter{chapter}{0}% + \renewcommand\@chapapp{\appendixname}% + \renewcommand\thechapter{\@Alph\c@chapter}% + \else + \setcounter{subsection}{0}% + \renewcommand\thesection{\@Alph\c@section}% + \fi + \if@pphyper + \if@chapter@pp + \renewcommand{\theHchapter}{\theH@pps.\Alph{chapter}}% + \else + \renewcommand{\theHsection}{\theH@pps.\Alph{section}}% + \fi + \xdef\Hy@chapapp{\Hy@appendixstring}% + \fi + \restoreapp +} + +\newenvironment{appendices}{% + \@resets@pp + \if@dotoc@pp + \if@dopage@pp % both page and toc + \if@chapter@pp % chapters + \clear@ppage + \fi + \appendixpage + \else % toc only + \if@chapter@pp % chapters + \clear@ppage + \fi + \addappheadtotoc + \fi + \else + \if@dopage@pp % page only + \appendixpage + \fi + \fi + \if@chapter@pp + \if@dotitletoc@pp \@redotocentry@pp{chapter} \fi + \else + \if@dotitletoc@pp \@redotocentry@pp{section} \fi + \if@dohead@pp + \def\sectionmark##1{% + \if@twoside + \markboth{\@formatsecmark@pp{##1}}{} + \else + \markright{\@formatsecmark@pp{##1}}{} + \fi} + \fi + \if@dotitle@pp + \def\sectionname{\appendixname} + \def\@seccntformat##1{\@ifundefined{##1name}{}{\csname ##1name\endcsname\ }% + \csname the##1\endcsname\quad} + \fi + \fi}{% + \@ppsaveapp\@pprestoresec} + +\newcommand{\setthesection}{\thechapter.\Alph{section}} +\newcommand{\setthesubsection}{\thesection.\Alph{subsection}} + +\newcommand{\@resets@ppsub}{\par + \stepcounter{@pps} + \if@chapter@pp + \setcounter{section}{0} + \renewcommand{\thesection}{\setthesection} + \else + \setcounter{subsection}{0} + \renewcommand{\thesubsection}{\setthesubsection} + \fi + \if@pphyper + \if@chapter@pp + \renewcommand{\theHsection}{\theH@pps.\setthesection}% + \else + \renewcommand{\theHsubsection}{\theH@pps.\setthesubsection}% + \fi + \xdef\Hy@chapapp{\Hy@appendixstring}% + \fi +} + +\newenvironment{subappendices}{% + \@resets@ppsub + \if@chapter@pp + \if@dotitletoc@pp \@redotocentry@pp{section} \fi + \if@dotitle@pp + \def\sectionname{\appendixname} + \def\@seccntformat##1{\@ifundefined{##1name}{}{\csname ##1name\endcsname\ }% + \csname the##1\endcsname\quad} + \fi + \else + \if@dotitletoc@pp \@redotocentry@pp{subsection} \fi + \if@dotitle@pp + \def\subsectionname{\appendixname} + \def\@seccntformat##1{\@ifundefined{##1name}{}{\csname ##1name\endcsname\ }% + \csname the##1\endcsname\quad} + \fi + \fi}{} + +\newcommand{\@formatsecmark@pp}[1]{% + \MakeUppercase{\appendixname\space + \ifnum \c@secnumdepth >\z@ + \thesection\quad + \fi + #1}} +\newcommand{\@redotocentry@pp}[1]{% + \let\oldacl@pp=\addcontentsline + \def\addcontentsline##1##2##3{% + \def\@pptempa{##1}\def\@pptempb{toc}% + \ifx\@pptempa\@pptempb + \def\@pptempa{##2}\def\@pptempb{#1}% + \ifx\@pptempa\@pptempb +\oldacl@pp{##1}{##2}{\appendixname\space ##3}% + \else + \oldacl@pp{##1}{##2}{##3}% + \fi + \else + \oldacl@pp{##1}{##2}{##3}% + \fi} +} + +%%% Appendix Macro Ends %% + + \RequirePackage[hidelinks]{hyperref} +\RequirePackage{tikz} + +\usetikzlibrary{svg.path} + +\definecolor{orcidlogocol}{HTML}{A6CE39} +\tikzset{ + orcidlogo/.pic={ + \fill[orcidlogocol] svg{M256,128c0,70.7-57.3,128-128,128C57.3,256,0,198.7,0,128C0,57.3,57.3,0,128,0C198.7,0,256,57.3,256,128z}; + \fill[white] svg{M86.3,186.2H70.9V79.1h15.4v48.4V186.2z} + svg{M108.9,79.1h41.6c39.6,0,57,28.3,57,53.6c0,27.5-21.5,53.6-56.8,53.6h-41.8V79.1z M124.3,172.4h24.5c34.9,0,42.9-26.5,42.9-39.7c0-21.5-13.7-39.7-43.7-39.7h-23.7V172.4z} + svg{M88.7,56.8c0,5.5-4.5,10.1-10.1,10.1c-5.6,0-10.1-4.6-10.1-10.1c0-5.6,4.5-10.1,10.1-10.1C84.2,46.7,88.7,51.3,88.7,56.8z}; + } +} + +%% Reciprocal of the height of the svg whose source is above. The +%% original generates a 256pt high graphic; this macro holds 1/256. +\newcommand{\@OrigHeightRecip}{0.00390625} + +%% We will compute the current X height to make the logo the right height +\newlength{\@curXheight} + +\DeclareRobustCommand\ORCID[1]{% +\texorpdfstring{% +\setlength{\@curXheight}{\fontcharht\font`X}% +\href{https://orcid.org/#1}{\XeTeXLinkBox{\mbox{% +\begin{tikzpicture}[yscale=-\@OrigHeightRecip*\@curXheight, +xscale=\@OrigHeightRecip*\@curXheight,transform shape] +\pic{orcidlogo}; +\end{tikzpicture}% +}}}}{}} + +\def \@fpsadddefault {% + \edef \@fps {\@fps\csname fps@\@captype \endcsname}% +} + + %% End here %% \endinput diff --git a/macros/latex/contrib/oup-authoring-template/oup-authoring-template.pdf b/macros/latex/contrib/oup-authoring-template/oup-authoring-template.pdf index 1f488e966e..cffa87e82d 100644 Binary files a/macros/latex/contrib/oup-authoring-template/oup-authoring-template.pdf and b/macros/latex/contrib/oup-authoring-template/oup-authoring-template.pdf differ diff --git a/macros/latex/contrib/oup-authoring-template/oup-authoring-template.tex b/macros/latex/contrib/oup-authoring-template/oup-authoring-template.tex index aa774c2523..58459bacef 100644 --- a/macros/latex/contrib/oup-authoring-template/oup-authoring-template.tex +++ b/macros/latex/contrib/oup-authoring-template/oup-authoring-template.tex @@ -1,5 +1,5 @@ %% -%% Copyright 2020 OXFORD UNIVERSITY PRESS +%% Copyright 2022 OXFORD UNIVERSITY PRESS %% %% This file is part of the 'oup-authoring-template Bundle'. %% --------------------------------------------- @@ -62,7 +62,7 @@ \journaltitle{Journal Title Here} \DOI{DOI HERE} -\copyrightyear{2019} +\copyrightyear{2022} \pubyear{2019} \access{Advance Access Publication Date: Day Month Year} \appnotes{Paper} @@ -77,7 +77,7 @@ \author[2]{Second Author} \author[3]{Third Author} \author[3]{Fourth Author} -\author[4]{Fifth Author} +\author[4]{Fifth Author\ORCID{0000-0000-0000-0000}} \authormark{Author Name et al.} @@ -98,8 +98,8 @@ %\textbf{Motivation:} .\\ %\textbf{Results:} .\\ %\textbf{Availability:} .\\ -%\textbf{Contact:} \href{name@bio.com}{name@bio.com}\\ -%\textbf{Supplementary information:} Supplementary data are available at \textit{Briefings in Bioinformatics} +%\textbf{Contact:} \href{name@email.com}{name@email.com}\\ +%\textbf{Supplementary information:} Supplementary data are available at \textit{Journal Name} %online.} \abstract{Abstracts must be able to stand alone and so cannot contain citations to @@ -120,52 +120,28 @@ as plain as possible.} \section{Introduction} The introduction introduces the context and summarizes the manuscript. It is importantly to clearly state the contributions -of this piece of work. The potential offered to policy makers by data-driven research is greater than it ever has been. -Increasing volumes of data, faster technology, and evolving techniques and methodology enable us to process ever more data faster, -providing the opportunity to focus and evaluate policies to deliver more effectively and economically at a time when efficient use -of public money is paramount. - -More data can now be analyzed faster enabling researchers to explore more and more complex interactions. Data across a wide spectrum from open data\footnote{\url{https://data.gov.uk/}} that can be downloaded, through licensed data,\footnote{\url{https://www.ukdataservice.ac.uk/}} to sensitive personal data can now contribute to our understanding of health, social, and economic outcomes. - -The United Kingdom has a long tradition of safe data use by researchers. In the 50 years that the UK -Data Archive has been making data available for social and economic research, there have been no -damaging disclosures of personal information by academic researchers\footnote{That is not to say that there have been no breaches---researchers using data for a project they are not licensed for or passing data -to unlicensed colleagues---however, this, as far as we are aware of, has never caused harm to individuals or entities in the data.}. While increasing use of detailed and sometimes sensitive -data can contribute valuable insights for targeting policies, we cannot be -complacent. In order to support our policy needs and continue to use data safely and effectively, we -need a research infrastructure that protects data confidentiality while enabling researchers to undertake -innovative research. +of this piece of work. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + +This is an example of a new parapgraph with a numbered footnote\footnote{\url{https://data.gov.uk/}} and a second footnote marker.\footnote{Example of footnote text.} + + \section{This is an example for first level head - section head}\label{sec2} -Once data are disseminated, whatever contractual or other obligations are placed on those receiving the -data, the data are effectively out of a data providers' control. Data providers must be certain that the data -disseminated do not provide a risk of disclosure necessitating a reduction in the detail available. -Data providers must be certain that the data disseminated do not provide a risk of disclosure necessitating -a reduction in the detail available, or they are constrained to using a resource intensive auditing regime, -and are likely to discover any data misuse only after it has happened (refer Section~\ref{sec5}). +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum (refer Section~\ref{sec5}). \subsection{This is an example for second level head - subsection head}\label{subsec1} -Once data are disseminated, whatever contractual or other obligations are placed on those receiving the -data, the data are effectively out of a data providers' control. Data providers must be certain that the data -disseminated do not provide a risk of disclosure necessitating a reduction in the detail available, or they are -constrained to using a resource intensive auditing regime, and are likely to discover any data misuse only -after it has happened. +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \subsubsection{This is an example for third level head - subsubsection head}\label{subsubsec1} -Once data are disseminated, whatever contractual or other obligations are placed on those receiving the -data, the data are effectively out of a data providers' control. Data providers must be certain that the data -disseminated do not provide a risk of disclosure necessitating a reduction in the detail available, or they are -constrained to using a resource intensive auditing regime, and are likely to discover any data misuse only -after it has happened. +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do +eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. %Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \paragraph{This is an example for fourth level head - paragraph head} -Once data are disseminated, whatever contractual or other obligations are placed on those receiving the data, the data -are effectively out of a data providers' control. The United Kingdom has a long tradition of safe data use by researchers. -The United Kingdom has a long tradition of safe data use by researchers. +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \section{This is an example for first level head}\label{sec3} @@ -173,35 +149,28 @@ The United Kingdom has a long tradition of safe data use by researchers. \subsubsection{This is an example for third level head - subsubsection head}\label{subsubsec2} -In the 50 years that the UK Data Archive has been making data available for social and economic research, there have been no -damaging disclosures of personal information by academic researchers. While increasing use of detailed and sometimes sensitive -data can contribute valuable insights for targeting policies, we cannot be -complacent. In order to support our policy needs and continue to use data safely and effectively, we -need a research infrastructure that data confidentiality while enabling researchers to undertake -innovative research. +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \paragraph{This is an example for fourth level head - paragraph head} -A first step toward protecting sensitive data is to keep control of it, to disseminate access, not data. Data -providers internationally are increasing, moving toward systems in which researchers remotely accessed. - +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. \section{Equations}\label{sec4} -Equations in \LaTeX{} can either be inline or on-a-line by itself. For -inline equations use the \verb+$...$+ commands. Eg: The equation +Equations in \LaTeX{} can either be inline or set as display equations. For +inline equations use the \verb+$...$+ commands. Eg: the equation $H\psi = E \psi$ is written via the command \verb+$H \psi = E \psi$+. -For on-a-line by itself equations (with auto generated equation numbers) +For display equations (with auto generated equation numbers) one can use the equation or eqnarray environments: \begin{equation} -\|\tilde{X}(k)\|^2 \leq\frac{\sum\limits_{i=1}^{p}\left\|\tilde{Y}_i(k)\right\|^2+\sum\limits_{j=1}^{q}\left\|\tilde{Z}_j(k)\right\|^2 }{p+q}.\label{eq1} +\|\tilde{X}(k)\|^2 \leq\frac{\sum\limits_{i=1}^{p}\left\|\tilde{Y}_i(k)\right\|^2+\sum\limits_{j=1}^{q}\left\|\tilde{Z}_j(k)\right\|^2 }{p+q},\label{eq1} \end{equation} where, \begin{align} D_\mu &= \partial_\mu - ig \frac{\lambda^a}{2} A^a_\mu \nonumber \\ -F^a_{\mu\nu} &= \partial_\mu A^a_\nu - \partial_\nu A^a_\mu + g f^{abc} A^b_\mu A^a_\nu\label{eq2} +F^a_{\mu\nu} &= \partial_\mu A^a_\nu - \partial_\nu A^a_\mu + g f^{abc} A^b_\mu A^a_\nu.\label{eq2} \end{align} Notice the use of \verb+\nonumber+ in the align environment at the end of each line, except the last, so as not to produce equation numbers on @@ -211,7 +180,7 @@ should only be used at the last line of an align environment where \begin{equation} Y_\infty = \left( \frac{m}{\textrm{GeV}} \right)^{-3} \left[ 1 + \frac{3 \ln(m/\textrm{GeV})}{15} - + \frac{\ln(c_2/5)}{15} \right] + + \frac{\ln(c_2/5)}{15} \right]. \end{equation} The class file also supports the use of \verb+\mathbb{}+, \verb+\mathscr{}+ and \verb+\mathcal{}+ commands. As such \verb+\mathbb{R}+, \verb+\mathscr{R}+ @@ -219,11 +188,17 @@ and \verb+\mathcal{R}+ produces $\mathbb{R}$, $\mathscr{R}$ and $\mathcal{R}$ respectively (refer Subsubsection~\ref{subsubsec3}). +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do +eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do +eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do +eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. + \section{Tables}\label{sec5} Tables can be inserted via the normal table and tabular environment. To put -footnotes inside tables one has to 12pt use the additional ``tablenotes" environment +footnotes inside tables one has to Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. use the additional ``tablenotes" environment enclosing the tabular environment. The footnote appears just below the table itself (refer Tables~\ref{tab1} and \ref{tab2}). @@ -253,7 +228,7 @@ row 3 & data 7 & data 8 & data 9$^{2}$\\ \end{verbatim} -Lengthy tables which doesn't fit in textwidth should be set as rotated table. For this, we need to use \verb+\begin{sidewaystable}...+ \verb+\end{sidewaystable}+ instead of\break \verb+\begin{table}...+ \verb+\end{table}+ environment. +Lengthy tables which do not fit within textwidth should be set as rotated tables. For this, we need to use \verb+\begin{sidewaystable}...+ \verb+\end{sidewaystable}+ instead of\break \verb+\begin{table}...+ \verb+\end{table}+ environment. \begin{table}[!t] @@ -274,7 +249,7 @@ row 3 & data 7 & data 8 & data 9$^{2}$ \\ \end{tablenotes} \end{table} -\begin{table*}[h] +\begin{table*}[t] \caption{Example of a lengthy table which is set to full textwidth.\label{tab2}} \tabcolsep=0pt%% \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}lcccccc@{\extracolsep{\fill}}} @@ -308,17 +283,17 @@ Element 4 & 500 A & 961 & $922\pm10$ & 900 A & 1268 & $1092\pm40$ \\ \botrule \end{tabular*} \begin{tablenotes}% -\item Note: This is an example of table footnote this is an example of table footnote this is an example of table footnote this is an example of~table footnote this is an example of table footnote -\item[$^{1}$] This is an example of table footnote +\item Note: This is an example of a table footnote this is an example of a table footnote this is an example of a table footnote this is an example of a table footnote this is an example of a table footnote +\item[$^{1}$] This is an example of a table footnote \end{tablenotes} \end{sidewaystable} \section{Figures}\label{sec6} -As per the \LaTeX\ standards one has to use eps images for \verb+latex+ compilation and \verb+pdf/jpg/png+ images for -\verb+pdflatex+ compilation. This is one of the major difference between \verb+latex+ -and \verb+pdflatex+. The images should be single page documents. The command for inserting images +As per display \LaTeX\ standards one has to use eps images for \verb+latex+ compilation and \verb+pdf/jpg/png+ images for +\verb+pdflatex+ compilation. This is one of the major differences between \verb+latex+ +and \verb+pdflatex+. The images should be single-page documents. The command for inserting images for \verb+latex+ and \verb+pdflatex+ can be generalized. The package used to insert images in \verb+latex/pdflatex+ is the graphicx package. Figures can be inserted via the normal figure environment as shown in the below example: @@ -326,13 +301,13 @@ graphicx package. Figures can be inserted via the normal figure environment as s \begin{figure}[!t]% \centering {\color{black!20}\rule{213pt}{37pt}} -\caption{This is a widefig. This is an example of long caption this is an example of long caption this is an example of long caption this is an example of long caption}\label{fig1} +\caption{This is a widefig. This is an example of a long caption this is an example of a long caption this is an example of a long caption this is an example of a long caption}\label{fig1} \end{figure} \begin{figure*}[!t]% \centering {\color{black!20}\rule{438pt}{74pt}} -\caption{This is a widefig. This is an example of long caption this is an example of long caption this is an example of long caption this is an example of long caption}\label{fig2} +\caption{This is a widefig. This is an example of a long caption this is an example of a long caption this is an example of a long caption this is an example of a long caption}\label{fig2} \end{figure*} @@ -346,12 +321,14 @@ graphicx package. Figures can be inserted via the normal figure environment as s Test text here. -For sample purpose, we have included the width of images in the optional argument of \verb+\includegraphics+ tag. Please ignore this. Lengthy figures which doesn't fit in textwidth should be set as rotated mode. For rotated figures, we need to use \verb+\begin{sidewaysfigure}+ \verb+...+ \verb+\end{sidewaysfigure}+ instead of \verb+\begin{figure}+ \verb+...+ \verb+\end{figure}+ environment. +For sample purposes, we have included the width of images in the +optional argument of \verb+\includegraphics+ tag. Please ignore this. +Lengthy figures which do not fit within textwidth should be set in rotated mode. For rotated figures, we need to use \verb+\begin{sidewaysfigure}+ \verb+...+ \verb+\end{sidewaysfigure}+ instead of the \verb+\begin{figure}+ \verb+...+ \verb+\end{figure}+ environment. \begin{sidewaysfigure}% \centering {\color{black!20}\rule{610pt}{102pt}} -\caption{This is an example for sideways figure. This is an example of long caption this is an example of long caption this is an example of long caption this is an example of long caption}\label{fig3} +\caption{This is an example for a sideways figure. This is an example of a long caption this is an example of a long caption this is an example of a long caption this is an example of a long caption}\label{fig3} \end{sidewaysfigure} @@ -372,9 +349,9 @@ For this, one has to use the below format: \end{verbatim} -We need to refer above listed package documentations for more details before setting \verb+algorithm+ environment. -To set program codes, one has to use \verb+program+, package. We need to use \verb+\begin{program}+ \verb+...+ -\verb+\end{program}+ environment to set program codes. A fast exponentiation procedure: +You may need to refer to the above-listed package documentations for more details before setting an \verb+algorithm+ environment. +To set program codes, one has to use the \verb+program+ package. We need to use the \verb+\begin{program}+ \verb+...+ +\verb+\end{program}+ environment to set program codes. \begin{algorithm}[!t] \caption{Calculate $y = x^n$}\label{algo1} @@ -401,12 +378,12 @@ To set program codes, one has to use \verb+program+, package. We need to use \ve \end{algorithmic} \end{algorithm} -Similarly, for \verb+listings+, one has to use \verb+listings+ package. \verb+\begin{lstlisting}+ \verb+...+ \verb+\end{lstlisting}+ environment is used to set environments similar to \verb+verbatim+ environment. Refer \verb+lstlisting+, package documentation for more details on this. +Similarly, for \verb+listings+, one has to use the \verb+listings+ package. The \verb+\begin{lstlisting}+ \verb+...+ \verb+\end{lstlisting}+ environment is used to set environments similar to the \verb+verbatim+ environment. Refer to the \verb+lstlisting+ package documentation for more details on this. \begin{minipage}{\hsize}% \lstset{language=Pascal}% Set your language (you can change the language for each code-block optionally) -\begin{lstlisting}[frame=single,framexleftmargin=-1pt,framexrightmargin=-17pt,framesep=12pt,linewidth=0.98\textwidth]% Start your code-block +\begin{lstlisting}[frame=single,framexleftmargin=-1pt,framexrightmargin=-17pt,framesep=12pt,linewidth=0.98\textwidth] for i:=maxint to 0 do begin { do nothing } @@ -419,7 +396,7 @@ Write('Pascal keywords.'); \section{Cross referencing}\label{sec8} -Environments such as figure, table, equation, align can have a label +Environments such as figure, table, equation, and align can have a label declared via the \verb+\label{#label}+ command. For figures and table environments one should use the \verb+\label{}+ command inside or just below the \verb+\caption{}+ command. One can then use the @@ -528,7 +505,7 @@ Here, one note is like the standard, two make pre- and post-notes.) \noindent -Additional citation possibilities (both author-year and numerical modes) +Additional citation possibilities (both author-year and numerical modes): {% @@ -544,8 +521,8 @@ Additional citation possibilities (both author-year and numerical modes) \noindent -Note: full author lists depends on whether the bib style supports them; -if not, the abbreviated list is printed even when full requested. +Note: full author lists depend on whether the bib style supports them; +if not, the abbreviated list is printed even when full is requested. \noindent For names like della Robbia at the start of a sentence, use @@ -560,15 +537,16 @@ For names like della Robbia at the start of a sentence, use \noindent -The following is an example for \verb+\cite{...}+: \cite{rahman2019centroidb}. Another example for \verb+\citep{...}+: \citep{bahdanau2014neural,imboden2018cardiorespiratory,motiian2017unified,american2013acsm,murphy2012machine,ji20123d}. +The following is an example for \verb+\cite{...}+: \cite{rahman2019centroidb}. Another example for \verb+\citep{...}+: \citep{bahdanau2014neural,imboden2018cardiorespiratory,motiian2017unified,murphy2012machine,ji20123d}. Sample cites here \cite{krizhevsky2012imagenet,horvath2018dna} and \cite{pyrkov2018quantitative}, \cite{wang2018face}, \cite{lecun2015deep,zhang2018fine,ravi2016deep}. \section{Lists}\label{sec9} -List in \LaTeX{} can be of three types: numbered, bulleted and unnumbered. ``enumerate'' environment produces numbered list, -``itemize'' environment produces bulleted list and ``unlist'' environment produces unnumbered list. -In each environments, new entry is added via the \verb+\item+ command. +List in \LaTeX{} can be of three types: numbered, bulleted and unnumbered. The ``enumerate'' environment produces a numbered list, the +``itemize'' environment produces a bulleted list and the ``unlist'' +environment produces an unnumbered list. +In each environment, a new entry is added via the \verb+\item+ command. \begin{enumerate}[1.] \item This is the 1st item @@ -600,8 +578,8 @@ description creates unnumbered lists. \item Numbered lists continue. \end{enumerate} -List in \LaTeX{} can be of three types: enumerate, itemize and description. -In each environments, new entry is added via the \verb+\item+ command. +Lists in \LaTeX{} can be of three types: enumerate, itemize and description. +In each environment, a new entry is added via the \verb+\item+ command. \begin{itemize} \item First level bulleted list. This is the 1st item @@ -630,10 +608,9 @@ Example for unnumbered list items: \item sample unnumberd list text. Sample unnumberd list text. Sample unnumberd list text. Sample unnumberd list text. Sample unnumberd list text. Sample unnumberd list text. Sample unnumberd list text. \end{unlist} -\section{Examples for theorem like environments}\label{sec10} +\section{Examples for theorem-like environments}\label{sec10} -For theorem like environments, we require \verb+amsthm+ package. There are three types of predefined theorem styles -exists - \verb+thmstyleone+, \verb+thmstyletwo+ and \verb+thmstylethree+ +For theorem-like environments, we require the \verb+amsthm+ package. There are three types of predefined theorem styles - \verb+thmstyleone+, \verb+thmstyletwo+ and \verb+thmstylethree+ (check your journal's instructions page in case a specific style is required). \medskip \noindent\begin{tabular}{|l|p{13pc}|} @@ -683,7 +660,7 @@ amet, consectetuer adipiscing elit. In hac habitasse platea dictumst. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. \end{definition} -Apart from the above styles, we have \verb+\begin{proof}+ \verb+...+ \verb+\end{proof}+ environment - with proof head in italic style and body text in roman font with an open square at the end of each proof environment. +Apart from the above styles, we have the \verb+\begin{proof}+ \verb+...+ \verb+\end{proof}+ environment - with the proof head in italic style and the body text in roman font with an open square at the end of each proof environment. \begin{proof}Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. \end{proof} @@ -697,7 +674,7 @@ Example for proof text. Example for proof text. Example for proof text. Example \end{proof} \noindent -For quote environment, one has to use\newline \verb+\begin{quote}...\end{quote}+ +For a quote environment, one has to use\newline \verb+\begin{quote}...\end{quote}+ \begin{quote} Quoted text example. Aliquam porttitor quam a lacus. Praesent vel arcu ut tortor cursus volutpat. In vitae pede quis diam bibendum placerat. Fusce elementum convallis neque. Sed dolor orci, scelerisque ac, dapibus nec, ultricies ut, mi. Duis nec dui quis leo sagittis commodo. @@ -731,7 +708,7 @@ urna. Nulla ullamcorper vestibulum turpis. Pellentesque cursus luctus mauris. \subsubsection{Subsubsection title of first appendix}\label{subsubsec3} -Example for Unnumbered figure: +Example for an unnumbered figure: \begin{figure}[!h] \centering @@ -756,6 +733,23 @@ vehicula libero dui cursus dui. Mauris tempor ligula sed lacus. Duis cursus enim \caption{This is an example for appendix figure\label{fig4}} \end{figure} +\begin{table}[t]% +\begin{center} +\begin{minipage}{.52\columnwidth} +\caption{This is an example of Appendix table showing food requirements of army, navy and airforce\label{tab4}}% +\begin{tabular}{@{}lcc@{}}% +\toprule +col1 head & col2 head & col3 head \\ +\midrule +col1 text & col2 text & col3 text \\ +col1 text & col2 text & col3 text \\ +col1 text & col2 text & col3 text \\ +\botrule +\end{tabular} +\end{minipage} +\end{center} +\end{table} + \subsection{Subsection title of second appendix}\label{subsec5} Sed commodo posuere pede. Mauris ut est. Ut quis purus. Sed ac odio. Sed vehicula hendrerit sem. Duis non odio. @@ -778,26 +772,10 @@ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibu felis. Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque. -\begin{table}[t]% -\begin{center} -\begin{minipage}{.52\columnwidth} -\caption{This is an example of Appendix table showing food requirements of army, navy and airforce\label{tab4}}% -\begin{tabular}{@{}lcc@{}}% -\toprule -col1 head & col2 head & col3 head \\ -\midrule -col1 text & col2 text & col3 text \\ -col1 text & col2 text & col3 text \\ -col1 text & col2 text & col3 text \\ -\botrule -\end{tabular} -\end{minipage} -\end{center} -\end{table} -Example for an equation inside appendix: +Example for an equation inside the appendix: \begin{align} - p &= \frac{\gamma^{2} - (n_{C} -1)H}{(n_{C} - 1) + H - 2\gamma} \label{1eq:hybobo:pfromgH} \\ + p &= \frac{\gamma^{2} - (n_{C} -1)H}{(n_{C} - 1) + H - 2\gamma}, \label{1eq:hybobo:pfromgH} \\ \theta &= \frac{(\gamma - H)^{2}(\gamma - n_{C} -1)^{2}}{(n_{C} - 1 + H - 2\gamma)^{2}} \label{2eq:hybobo:tfromgH}\; . \end{align} @@ -810,7 +788,7 @@ a nulla. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur urna. Nulla ullamcorper vestibulum turpis. Pellentesque cursus luctus mauris \begin{equation} \mathcal{L} = i \bar{\psi} \gamma^\mu D_\mu \psi - - \frac{1}{4} F_{\mu\nu}^a F^{a\mu\nu} - m \bar{\psi} \psi + - \frac{1}{4} F_{\mu\nu}^a F^{a\mu\nu} - m \bar{\psi} \psi. \label{eq26} \end{equation} @@ -844,6 +822,8 @@ ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecena at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna. Nunc eleifend consequat lorem. Sed lacinia nulla vitae enim. Pellentesque tincidunt purus vel magna. Integer non enim. Praesent euismod nunc eu purus. Donec bibendum quam in tellus. Nullam cursus pulvinar lectus. Donec et mi. Nam vulputate metus eu enim. Vestibulum +pellentesque felis eu massa. Donec +bibendum quam in tellus. Nullam cursus pulvinar lectus. Donec et mi. Nam vulputate metus eu enim. Vestibulum pellentesque felis eu massa. %% Example for unnumbered table inside appendix @@ -867,7 +847,7 @@ col1 text & col2 text & col3 text \\ \end{appendices} \section{Competing interests} -There is NO Competing Interest. +No competing interest is declared. \section{Author contributions statement} @@ -980,7 +960,7 @@ Ke~Zhang, Na~Liu, Xingfang Yuan, Xinyao Guo, Ce~Gao, and Zhenbing Zhao. %% sample for biography with author's image -\begin{biography}{{\color{black!20}\rule{77pt}{77pt}}}{\author{Author Name.} This is sample author biography text. The values provided in the optional argument is meant for sample purpose. There is no need to include the width and height of an image in the optional argument for live articles. This is sample author biography text this is sample author biography text this is sample author biography text this is sample author biography text this is sample author biography text this is sample author biography text this is sample author biography text this is sample author biography text.} +\begin{biography}{{\color{black!20}\rule{77pt}{77pt}}}{\author{Author Name.} This is sample author biography text. The values provided in the optional argument are meant for sample purposes. There is no need to include the width and height of an image in the optional argument for live articles. This is sample author biography text this is sample author biography text this is sample author biography text this is sample author biography text this is sample author biography text this is sample author biography text this is sample author biography text this is sample author biography text.} \end{biography} %% sample for biography without author's image diff --git a/macros/latex/contrib/quantumarticle/README.md b/macros/latex/contrib/quantumarticle/README.md index ddfb27ca2c..1661c55bae 100644 --- a/macros/latex/contrib/quantumarticle/README.md +++ b/macros/latex/contrib/quantumarticle/README.md @@ -2,13 +2,15 @@ # LaTeX document class for Quantum -This is version 5.1 of `quantumarticle`, the document class for typesetting articles in Quantum - the open journal for quantum science. +This is version 6.0 of `quantumarticle`, the document class for typesetting articles in Quantum - the open journal for quantum science. [Click here](https://raw.githubusercontent.com/quantum-journal/quantum-journal/master/quantumarticle.cls) to download the latest stable version. [More information](https://raw.githubusercontent.com/quantum-journal/quantum-journal/master/quantum-template.pdf) on using quantumarticle and on typesetting manuscripts for Quantum can be found in the accompanying template. -[Documentation](https://raw.githubusercontent.com/quantum-journal/quantum-journal/master/quantumarticle.pdf) of all class options is also provided. +[Extra information on the Quantum bibstyle](https://raw.githubusercontent.com/quantum-journal/quantum-journal/master/quantum-bibliographystyle-demo.pdf) can be found in the bibstyle demo. + +[Documentation](https://raw.githubusercontent.com/quantum-journal/quantum-journal/master/quantumarticle.pdf) of all class options is also provided. ## Installation and usage @@ -48,14 +50,20 @@ The `quantumarticle` class tries to be **maximally compatible** with existing do ## Beta features -In addition, this document class come bundled with two new extras (currently in beta phase): +In addition, this document class comes bundled with two new extras (currently in beta phase): -1. The quantum-plots.ipynb Jupyter notebook and matplotlib style for effortlessly producing professional looking plots in python. +1. The quantum-lyx-template.lyx LyX layout, which allows you to generate the LaTeX source of your quantumarticle manuscript with the LyX document processor. -2. The quantum-lyx-template.lyx LxY layout, which allow you to generate the LaTeX source of your quantumarticle manuscript with the LyX document processor. +2. The quantum.bst bibliography style for BibTeX, see the corresponding demo for usage details. ## Changelog +### New in v6.0 + +* introduced the Quantum bibstyle `quantum.bst` together with the demo file `quantum-bibliographystyle-demo` +* Removed the quantum-plots package, which is superseeded by [rsmf](https://pypi.org/project/rsmf/) +* Fixed typo in allowfontchangeintitle option + ### New in v5.1 * fix for workaround in ltxgrid no longer being necessary and, on the contrary, causing an error under TeXLive 2020, with revtex/ltygrid 4.2e/4.2d @@ -75,18 +83,18 @@ In addition, this document class come bundled with two new extras (currently in * enforce that users put `\pdfoutput=1` (as recommended by the arXiv) to prevent problems with multi-line hyper links * improved error messages * fixed a bug that lead to the title not being centered with the `titlepage` option -* better layout of titles +* better layout of titles * fixed various bugs in option processing * the document class is now documented in `quantumarticle.pdf` * introduced the plotting notebook `quantum-plots.ipynb` as a beta feature * introduced the LyX template `quantum-lyx-template.lyx` as a beta feature - ## Contributors -Developed by: Christian Gogolin, Christopher Granade, Johannes J. Meyer, and Victor V. Albert +Developed by: Christian Gogolin, Cassandra Granade, Johannes J. Meyer, and Victor V. Albert -With contributions from: Shahnawaz Ahmed, Andrey Rakhubovsky, liantze, and Abhinav Deshpande +With contributions from: Shahnawaz Ahmed, Andrey Rakhubovsky, liantze, +Abhinav Deshpande, and David Wierichs ## Contributing @@ -98,7 +106,7 @@ Improvements submitted as pull requests against the `develop` branch are very mu ## Copyright -Copyright 2017, 2018, 2019, 2020 +Copyright 2017, 2018, 2019, 2020, 2021, 2022 Verein zur Förderung des Open Access Publizierens in den Quantenwissenschaften (http://quantum-journal.org/about/) @@ -113,4 +121,4 @@ http://www.latex-project.org/lppl.txt and version 1.3c or later is part of all distributions of LaTeX version 2005/12/01 or later. -[comment]: # (To submit to the overleaf galary: push, open the project, go to Journals and Services and click Submit to Overleaf Gallery. To submit to sharelatex: write them an email) +[comment]: # (To submit to the overleaf gallery: push, open the project, go to Journals and Services and click Submit to Overleaf Gallery. To submit to sharelatex: write them an email) diff --git a/macros/latex/contrib/quantumarticle/example-plot.pdf b/macros/latex/contrib/quantumarticle/example-plot.pdf new file mode 100644 index 0000000000..2022a1c61c Binary files /dev/null and b/macros/latex/contrib/quantumarticle/example-plot.pdf differ diff --git a/macros/latex/contrib/quantumarticle/quantum-bibliographystyle-demo.bib b/macros/latex/contrib/quantumarticle/quantum-bibliographystyle-demo.bib new file mode 100644 index 0000000000..142854b4f9 --- /dev/null +++ b/macros/latex/contrib/quantumarticle/quantum-bibliographystyle-demo.bib @@ -0,0 +1,533 @@ +preamble{"\DoNotMakeWarningsErrors"} +preamble{"\MakeDoiLinksExplicit"} + +@article{andreas_test_case, + title = {Toolbox for Reconstructing Quantum Theory from Rules on Information Acquisition}, + author = {H\"{o}hn, Philipp A.}, + year = {2017}, + month = dec, + volume = {1}, + pages = {38}, + doi = {10.22331/q-2017-12-14-38}, + archivePrefix = {arXiv}, + eprint = {1412.8323}, + eprinttype = {arxiv}, + journal = {Quantum} +} + +@article{article_doi_eprint_url_code, + doi = {10.22331/q-2017-04-25-1}, + url = {https://doi.org/10.22331/q-2017-04-25-1}, + author = {McKague, Matthew}, + issn = {2521-327X}, + publisher = {{Verein zur F{\"{o}}rderung des Open Access Publizierens in den Quantenwissenschaften}}, + journal = {{Quantum}}, + volume = {1}, + pages = {1}, + month = apr, + year = {2017}, + title = {Self-testing in parallel with {CHSH}}, + code = {https://github.com/tony-blake/Hybrid-x509-s}, + archivePrefix = {arXiv}, + eprint = {1609.09584} +} + +@article{article_doi_eprint_url, + doi = {10.22331/q-2017-04-25-1}, + url = {https://doi.org/10.22331/q-2017-04-25-1}, + title = {Self-testing in parallel with {CHSH}}, + author = {McKague, Matthew}, + journal = {{Quantum}}, + issn = {2521-327X}, + publisher = {{Verein zur F{\"{o}}rderung des Open Access Publizierens in den Quantenwissenschaften}}, + volume = {1}, + pages = {1}, + month = apr, + year = {2017}, + eprint = {1609.09584} +} + +@article{article_eprint_url_code, + url = {https://doi.org/10.22331/q-2017-04-25-1}, + title = {Self-testing in parallel with {CHSH}}, + author = {McKague, Matthew}, + year = {2017}, + eprint = {1609.09584}, + code={https://github.com/tony-blake/Hybrid-x509-s}, + journal = {{Quantum}}, + volume = {1}, + pages = {1} +} + +@article{article_eprint_url, + url = {https://doi.org/10.22331/q-2017-04-25-1}, + title = {Self-testing in parallel with {CHSH}}, + author = {McKague, Matthew}, + year = {2017}, + eprint = {1609.09584}, + journal = {{Quantum}}, + volume = {1}, + pages = {1} +} + +@article{article_url_code, + url = {https://doi.org/10.22331/q-2017-04-25-1}, + title = {Self-testing in parallel with {CHSH}}, + author = {McKague, Matthew}, + year = {2017}, + code = {https://github.com/tony-blake/Hybrid-x509-s}, + journal = {{Quantum}}, + volume = {1}, + pages = {1} +} + +@article{article_url_code_shorturl, + url = {https://doi.org/10.22331/q-2017-04-25-1}, + shorturl = {10.22331/q-2017-04-25-1}, + title = {Self-testing in parallel with {CHSH}}, + author = {McKague, Matthew}, + year = {2017}, + code = {https://github.com/tony-blake/Hybrid-x509-s}, + journal = {{Quantum}}, + volume = {1}, + pages = {1} +} + +@article{article_url, + url = {https://doi.org/10.22331/q-2017-04-25-1}, + title = {Self-testing in parallel with {CHSH}}, + author = {McKague, Matthew}, + year = {2017}, + journal = {{Quantum}}, + volume = {1}, + pages = {1} +} + +@repository{repo_code_url, + title={Right-size my figures}, + author={Johannes Jakob Meyer}, + code={https://github.com/johannesjmeyer/rsmf}, + url={https://github.com/johannesjmeyer/rsmf} +} + +@repository{repo_code_year, + title={Right-size my figures}, + year={2021}, + author={Johannes Jakob Meyer}, + commit={1fcb463}, + code={https://github.com/johannesjmeyer/rsmf} +} + +@repository{repo_code_year_version, + title={Right-size my figures}, + year={2021}, + author={Johannes Jakob Meyer}, + version={v0.1}, + code={https://github.com/johannesjmeyer/rsmf} +} + +@repository{repo_url, + author={Johannes Jakob Meyer}, + url={https://github.com/johannesjmeyer/rsmf} +} + +@repository{repo_code_year_commit, + author={David Wierichs}, + code={https://github.com/quantum-journal/quantum-journal/pull/123/commits/1fcb463b560fbcd93843cc7c9aefb8ccecf8089e}, + commit={1fcb463}, + year={2021} +} + +@website{web_author_code, + author={The Wiki-authors}, + title={Wikipedia}, + url={https://wikipedia.com}, + code={https://github.com/wikimedia/mediawiki} +} + +@website{web_author, + author={The Wiki-authors}, + title={Wikipedia}, + url={https://wikipedia.com} +} + +@website{web_author_date, + author={The Wiki-authors}, + title={Wikipedia}, + url={https://wikipedia.com}, + urldate={12.07.2019} +} + +@website{web_code, + title={Wikipedia}, + url={https://wikipedia.com}, + code={https://github.com/wikimedia/mediawiki} +} + +@website{web, + title={Wikipedia}, + url={https://wikipedia.com} +} + +% Some other test cases + +% directly from the arxiv- just changed into article +@article{mendez2021dissipation, + title={Dissipation in 2D degenerate gases with non-vanishing rest mass}, + author={A. R. Mendez and A. L. Garcia-Perciante and G. Chacon-Acosta}, + year={2021}, + eprint={2110.03402}, + archivePrefix={arXiv}, + primaryClass={cond-mat.quant-gas} +} + +% arxiv via zotero +@article{mendez2021dissipation_2, + title = {Dissipation in 2D degenerate gases with non-vanishing rest mass}, + url = {http://arxiv.org/abs/2110.03402}, + journaltitle = {{arXiv}:2110.03402 [cond-mat.quant-gas]}, + author={A. R. Mendez and A. L. Garcia-Perciante and G. Chacon-Acosta}, + urldate = {2021-10-09}, + date = {2021-10-06}, + eprinttype = {arxiv}, + eprint = {2110.03402}, + keywords = {Computer Science - Machine Learning, Quantum Physics} +} + +% via zotero +@article{holevo2012quantum, + title = {Quantum channels and their entropic characteristics}, + volume = {75}, + issn = {0034-4885, 1361-6633}, + url = {http://stacks.iop.org/0034-4885/75/i=4/a=046001?key=crossref.c00c20a2d90f601c3579a72385e32b76}, + doi = {10.1088/0034-4885/75/4/046001}, + pages = {046001}, + number = {4}, + journaltitle = {Reports on Progress in Physics}, + author = {Holevo, A S and Giovannetti, V}, + urldate = {2018-10-22}, + date = {2012-04-01}, + langid = {english} +} + +% data from crossref +@article{Holevo_2012, + doi = {10.1088/0034-4885/75/4/046001}, + url = {https://doi.org/10.1088%2F0034-4885%2F75%2F4%2F046001}, + year = 2012, + month = {mar}, + publisher = {{IOP} Publishing}, + volume = {75}, + number = {4}, + pages = {046001}, + author = {A S Holevo and V Giovannetti}, + title = {Quantum channels and their entropic characteristics}, + journal = {Reports on Progress in Physics} +} + +% data from web of science +@article{akers2020simple, + title = {Simple holographic models of black hole evaporation}, + issn = {1029-8479}, + doi = {10.1007/JHEP08(2020)032}, + number = {8}, + journaltitle = {{JOURNAL} {OF} {HIGH} {ENERGY} {PHYSICS}}, + author = {Akers, Chris and Engelhardt, Netta and Harlow, Daniel}, + date = {2020-08-06}, + note = {Place: {ONE} {NEW} {YORK} {PLAZA}, {SUITE} 4600, {NEW} {YORK}, {NY}, {UNITED} {STATES} +Publisher: {SPRINGER} +Type: Article}, + keywords = {{AdS}-{CFT} Correspondence, Black Holes, Models of Quantum Gravity} +} + +@article{katariya2021geometric, + title = {Geometric distinguishability measures limit quantum channel estimation and discrimination}, + volume = {20}, + issn = {1573-1332}, + url = {https://doi.org/10.1007/s11128-021-02992-7}, + doi = {10.1007/s11128-021-02992-7}, + pages = {78}, + number = {2}, + journaltitle = {Quantum Information Processing}, + shortjournal = {Quantum Inf Process}, + author = {Katariya, Vishal and Wilde, Mark M.}, + urldate = {2021-04-29}, + date = {2021-02-22}, + langid = {english} +} + +@article{katariya2021geometric_2, + title = {Geometric distinguishability measures limit quantum channel estimation and discrimination}, + author = {Katariya, Vishal and Wilde, Mark M}, + journal = {Quantum Information Processing}, + volume = {20}, + number = {2}, + pages = {1--170}, + year = {2021}, + url = {https://doi.org/10.1007/s11128-021-02992-7}, + publisher = {Springer} +} + +@inproceedings{liang2019fisher-rao, + title = {Fisher-Rao Metric, Geometry, and Complexity of Neural Networks}, + eventtitle = {The 22nd International Conference on Artificial Intelligence and Statistics}, + pages = {9}, + booktitle = {The 22nd International Conference on Artificial Intelligence and Statistics}, + author = {Liang, Tengyuan and Poggio, Tomaso and Rakhlin, Alexander and Stokes, James}, + date = {2019}, + url = {http://proceedings.mlr.press/v89/liang19a/liang19a.pdf}, + eprint = {1711.01530}, + langid = {english} +} + +@incollection{jain2010guaranteed, + title = {Guaranteed Rank Minimization via Singular Value Projection}, + url = {http://papers.nips.cc/paper/3904-guaranteed-rank-minimization-via-singular-value-projection.pdf}, + pages = {937--945}, + booktitle = {Advances in Neural Information Processing Systems 23}, + publisher = {Curran Associates, Inc.}, + author = {Jain, Prateek and Meka, Raghu and Dhillon, Inderjit S.}, + editor = {Lafferty, J. D. and Williams, C. K. I. and Shawe-Taylor, J. and Zemel, R. S. and Culotta, A.}, + urldate = {2019-06-11}, + date = {2010} +} + +% preamble{"\MakeDoiLinksExplicit"} + +@misc{misc_arxiv, + title={Dissipation in 2D degenerate gases with non-vanishing rest mass}, + author={A. R. Mendez and A. L. Garcia-Perciante and G. Chacon-Acosta}, + year={2021}, + eprint={2110.03402}, + archivePrefix={arXiv}, + primaryClass={cond-mat.quant-gas} +} + +@misc{misc_note, + note = {Indeed, only a note was provided for this reference} +} + +@misc{misc_correspondence, + title={Purple became very popular after this.}, + author={Christian Gogolin}, + note={Private correspondence} +} + +@book{book_author_doi_url, + doi = {10.1017/cbo9780511976667}, + url = {https://doi.org/10.1017/cbo9780511976667}, + year = {2009}, + publisher = {Cambridge University Press}, + author = {Michael A. Nielsen and Isaac L. Chuang}, + title = {Quantum Computation and Quantum Information} +} + +@book{book_author_url_edition, + url = {https://doi.org/10.1017/cbo9780511976667}, + year = {2009}, + publisher = {Cambridge University Press}, + author = {Michael A. Nielsen and Isaac L. Chuang}, + title = {Quantum Computation and Quantum Information}, + edition = {10th {A}nniversary} +} + +@book{book_editor_doi, + doi = {10.1017/cbo9780511976667}, + year = {2009}, + publisher = {Cambridge University Press}, + chapter = {1}, + pages = {70}, + editor = {Simon Capelin}, + title = {Quantum Computation and Quantum Information} +} +@book{book_editor_doi2, + doi = {10.1017/cbo9780511976667}, + year = {2009}, + publisher = {Cambridge University Press}, + volume = {1}, + pages = {70}, + editor = {Simon Capelin}, + title = {Quantum Computation and Quantum Information} +} + +@inbook{inbook_author_doi_url_chapter, + doi = {10.1017/cbo9780511976667}, + url = {https://doi.org/10.1017/cbo9780511976667}, + year = {2009}, + chapter = {3}, + publisher = {Cambridge University Press}, + author = {Michael A. Nielsen and Isaac L. Chuang}, + title = {Quantum Computation and Quantum Information} +} + +@inbook{inbook_author_doi_url_chapter_pages, + doi = {10.1017/cbo9780511976667}, + url = {https://doi.org/10.1017/cbo9780511976667}, + year = {2009}, + chapter = {3}, + pages = {120--169}, + publisher = {Cambridge University Press}, + author = {Michael A. Nielsen and Isaac L. Chuang}, + title = {Quantum Computation and Quantum Information} +} + +@inbook{inbook_author_doi_url_volume_chapter_pages, + doi = {10.1017/cbo9780511976667}, + url = {https://doi.org/10.1017/cbo9780511976667}, + year = {2009}, + chapter = {3}, + volume = {1}, + pages = {120--169}, + publisher = {Cambridge University Press}, + author = {Michael A. Nielsen and Isaac L. Chuang}, + title = {Quantum Computation and Quantum Information} +} + +@misc{article_arxiv, + title={Decoding the Entanglement Structure of Monitored Quantum Circuits}, + author={Beni Yoshida}, + year={2021}, + eprint={2109.08691}, + archivePrefix={arXiv}, + primaryClass={quant-ph} +} + +@booklet{booklet, + title = {The title of the booklet}, + author = {Laura Caxton}, + howpublished = {How it was published}, + address = {The address of the publisher}, + month = 7, + year = 1993, + note = {An optional note} +} + +@unpublished{unpublished, + author = {Petra Marcheford}, + title = {The title of the unpublished work}, + note = {A note is required to provide context}, + month = 7, + year = 1993 +} + +% The following two entries are not meant to be used but were +% used to verify statements in the template. +article{article_trailing_comma, + author={Matthew McKague}, + doi = {10.1017/cbo9780511976667}, + year={2017}, + journal={Quantum}, + volume={1}, + title={Self-testing in parallel with {CHSH}}, +} + +article{article_missing_comma, + author={Matthew McKague}, + doi = {10.1017/cbo9780511976667}, + year={2017}, + journal={Quantum}, + volume={1} + title={Self-testing in parallel with {CHSH}} +} + +@incollection{incollection, + author = {Lex Farindon}, + title = {Title of part of the collection}, + booktitle = {Title of the collection}, + publisher = {The name of the publisher}, + year = {1993}, + editor = {An editor}, + volume = 4, + series = 5, + chapter = 8, + pages = {201-213}, + address = {The address of the publisher}, + edition = 3, + month = 7, +} + +@conference{conference, + author = {Zoe Draper}, + title = {Title of part of the conference}, + booktitle = {Title of the conference}, + year = 1993, + editor = {The editor}, + volume = 4, + series = 5, + pages = 213, + address = {The address of the publisher}, + month = 7, + organization = {The organization}, + publisher = {The publisher}, + url = {https://ecosia.org}, + note = {An optional note} +} + +@conference{inproceedings, + author = {Mark Hammington}, + title = {The title of the work}, + booktitle = {The title of the proceedings}, + year = 1993, + editor = {The editor}, + volume = 4, + series = 5, + pages = 213, + month = 7, + url = {10.1351/pac199264060907}, + publisher = {The publisher} +} + +@techreport{CoplenKrouse, + author = {Tyler B. Coplen and H. R. Krouse and John Karl Böhlke}, + doi = {10.1351/pac199264060907}, + url = {https://doi.org/10.1351/pac199264060907}, + title = {{R}eporting of nitrogen-isotope abundances}, + journal = {Pure and Applied Chemistry}, + number = {6}, + institution = {{I}nternational {U}nion of {P}ure and {A}pplied {C}hemistry}, + volume = {64}, + year = {1992}, + pages = {907--908}, + type = {Custom type TR} +} + +@manual{manual, + title = {The title of the manual}, + author = {Alex Scottson}, + organization = {The organization}, + address = {The address of the publisher}, + edition = 3, + month = 7, + year = 1993 +} + +@mastersthesis{mastersthesis, + author = {Kilian Harwood}, + title = {The title of the thesis}, + school = {The school of the thesis}, + year = 1993, + address = {The address of the publisher}, + month = 7 +} + +@phdthesis{phdthesis, + author = {Gottesman, Daniel Eric}, + title = {{S}tabilizer {C}odes and {Q}uantum {E}rror {C}orrection}, + school = {{C}alifornia {I}nstitute of {T}echnology}, + year = {1997}, + doi = {10.7907/rzr7-dt72} +} + +@proceedings{proceedings, + title = {The title of the proceedings}, + year = 1993, + editor = {Sarah Kidwelly}, + volume = 4, + series = 5, + address = {The address of the publisher}, + month = 7, + organization = {The organization}, + url = {xkcd.com}, + publisher = {The name of the publisher} +} + diff --git a/macros/latex/contrib/quantumarticle/quantum-bibliographystyle-demo.pdf b/macros/latex/contrib/quantumarticle/quantum-bibliographystyle-demo.pdf new file mode 100644 index 0000000000..ce57ea2cd9 Binary files /dev/null and b/macros/latex/contrib/quantumarticle/quantum-bibliographystyle-demo.pdf differ diff --git a/macros/latex/contrib/quantumarticle/quantum-bibliographystyle-demo.tex b/macros/latex/contrib/quantumarticle/quantum-bibliographystyle-demo.tex new file mode 100644 index 0000000000..62cd5d9ffa --- /dev/null +++ b/macros/latex/contrib/quantumarticle/quantum-bibliographystyle-demo.tex @@ -0,0 +1,267 @@ +\documentclass[a4paper,twocolumn,11pt]{quantumarticle} +\pdfoutput=1 +\usepackage[utf8]{inputenc} +\usepackage[english]{babel} +\usepackage[T1]{fontenc} +\usepackage[numbers]{natbib} +\usepackage{listings} + +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{hyperref} +\usepackage[resetlabels]{multibib} + +\newcites{article}{article references} +\newcites{book}{book references} +\newcites{misc}{misc references} +\newcites{repo}{repository references} +\newcites{web}{website references} +\newcites{other}{Other references} + +\begin{document} +\title{Template demonstrating the quantum bibstyle} + +\author{David~Wierichs} +\affiliation{Institute for Theoretical Physics, University of Cologne, Germany} +\author{Johannes~Jakob~Meyer} +\affiliation{Dahlem Center for Complex Quantum Systems, Freie Universit\"{a}t Berlin, 14195 Berlin, Germany} +\affiliation{QMATH, Department of Mathematical Sciences, University of Copenhagen, 2100 Copenhagen, Denmark} + +\maketitle + +\section{Overview}\label{sec:overview} + +We use the opportunity of talking about bibtex entries to give an overview of the available reference classes: + +\begin{center} +\begin{tabular}{ll} + \texttt{article} & Section \ref{sec:article}\\ + \texttt{book} & Section \ref{sec:book}\\ + \texttt{repository} & Section \ref{sec:repo}\\ + \texttt{website} & Section \ref{sec:web}\\ + \texttt{misc} & Section \ref{sec:misc}\\ + Other classes & Section \ref{sec:other}\\ + \hspace{0.8cm}\texttt{booklet} & Section \ref{sec:booklet}\\ + \hspace{0.8cm}\texttt{inbook} & Section \ref{sec:inbook}\\ + \hspace{0.8cm}\texttt{incollection} & Section \ref{sec:incollection}\\ + \hspace{0.8cm}\texttt{inproceedings} & Section \ref{sec:inproceedings}\\ + \hspace{0.8cm}\texttt{conference} & Section \ref{sec:conference}\\ + \hspace{0.8cm}\texttt{manual} & Section \ref{sec:manual}\\ + \hspace{0.8cm}\texttt{mastersthesis}\&\texttt{phdthesis} & Section \ref{sec:theses}\\ + \hspace{0.8cm}\texttt{proceedings} & Section \ref{sec:proceedings}\\ + \hspace{0.8cm}\texttt{techreport} & Section \ref{sec:techreport}\\ + \hspace{0.8cm}\texttt{unpublished} & Section \ref{sec:unpublished}\\ +\end{tabular} +\end{center} + +All of these reference classes are available in standard bibtex style files as well, with the exception of \texttt{repository} and \texttt{website}. +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. +In Sec.~\ref{sec:customization} we describe a few minimal options for customization of the quantum bibstyle. + + +\section{Reference class \texttt{article}}\label{sec:article} +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 (). +\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. +If the custom field \texttt{shorturl} is provided, it is used to manually pretty-print the URL. +This can be useful if a URL contains long character strings, particularly if they are not human-readable. +The \texttt{url} field is used as linked URL, that is \texttt{shorturl} only changes the printed appearance +and not the function of the hyperlink. +Code repositories are linked whenever provided via the \texttt{code} field, which is a non-standard field in +quantum.bst. + +Examples: + +\begin{tabular}{ccccc} + \texttt{doi}& \texttt{eprint} & \texttt{url} & \texttt{code} & result \\ + $\checkmark$ & $\checkmark$ & $\checkmark\big / \times$ & $\checkmark$ & \citearticle{article_doi_eprint_url_code} \\ + $\checkmark$ & $\checkmark$ & $\checkmark\big / \times$ & $\times$ & \citearticle{article_doi_eprint_url} \\ + $\times$ & $\checkmark$ & $\checkmark\big / \times$ & $\checkmark$ & \citearticle{article_eprint_url_code} \\ + $\times$ & $\checkmark$ & $\checkmark\big / \times$ & $\times$ & \citearticle{article_eprint_url} \\ + $\times$ & $\times$ & $\checkmark$ & $\checkmark$ & \citearticle{article_url_code} \\ + $\times$ & $\times$ & $\checkmark$ (\texttt{shorturl}) & $\checkmark$ & \citearticle{article_url_code_shorturl} \\ + $\times$ & $\times$ & $\checkmark$ & $\times$ & \citearticle{article_url} \\ +\end{tabular} + +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). + +If an \texttt{article} citation only has an arXiv id but no journal reference, the journal title is skipped accordingly \citearticle{article_arxiv}. + +\bibliographystylearticle{quantum} +\bibliographyarticle{quantum-bibliographystyle-demo} + +\section{Reference class \texttt{book}}\label{sec:book} +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. +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. +The order in which links are printed is the same as for \texttt{article}, see Sec.~\ref{sec:article}. +Some example \texttt{book} references are \citebook{book_author_doi_url, book_author_url_edition, book_editor_doi, book_editor_doi2}. + +\bibliographystylebook{quantum} +\bibliographybook{quantum-bibliographystyle-demo} + +\section{Reference class \texttt{repository}}\label{sec:repo} +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). +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. +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. + +\begin{tabular}{ccc} + \texttt{code}& \texttt{url} & result \\ + $\checkmark$ & $\checkmark\big / \times$ &\citerepo{repo_code_url} \\ + $\times$ & $\checkmark$ &\citerepo{repo_url} \\ + $\times$ & $\times$ & invalid \\ +\end{tabular} + +Providing a year is optional, a title is \emph{not} considered even if given \citerepo{repo_code_year}. +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. + +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. + +\bibliographystylerepo{quantum} +\bibliographyrepo{quantum-bibliographystyle-demo} + +\section{Reference class \texttt{website}}\label{sec:web} +For the new custom reference class \texttt{website}, we require a \texttt{title} and a \texttt{url} which are both printed always. +\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. + +\begin{tabular}{ccc} + \texttt{author} & \texttt{code} & result \\ + $\checkmark$ & $\checkmark$ &\citeweb{web_author_code} \\ + $\times$ & $\checkmark$ &\citeweb{web_code} \\ + $\checkmark$ & $\times$ &\citeweb{web_author} \\ + $\times$ & $\times$ &\citeweb{web} \\ +\end{tabular} + +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}. + +\bibliographystyleweb{quantum} +\bibliographyweb{quantum-bibliographystyle-demo} + +\section{Reference class \texttt{misc}}\label{sec:misc} +The reference class \texttt{misc} is meant to be used for miscellaneous entries that do not fall into any of the provided categories. +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. +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. + +We provide some examples, not covering all cases, because \texttt{misc} is very flexible and there are many possibilities. +\begin{itemize} + \item A citation that actually is an article on the arXiv: \citemisc{misc_arxiv} + \item A footnote-like reference only containing a note: \citemisc{misc_note} + \item A reference to a private correspondence: \citemisc{misc_correspondence} +\end{itemize} + +\bibliographystylemisc{quantum} +\bibliographymisc{quantum-bibliographystyle-demo} + +\section{Other reference classes}\label{sec:other} +\subsection{Reference class \texttt{booklet}}\label{sec:booklet} +The reference class \texttt{booklet} allows for rather flexible references, focusing on information of publishing: +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}. + +\subsection{Reference class \texttt{inbook}}\label{sec:inbook} + +The reference class \texttt{inbook} is an alias for \texttt{book} and will produce the same output. +The only difference is that that \texttt{chapter}, \texttt{pages}, or both are \emph{required} for \texttt{inbook}. +Examples would be Refs.~\citeother{inbook_author_doi_url_chapter, inbook_author_doi_url_chapter_pages, inbook_author_doi_url_volume_chapter_pages}. + +\subsection{Reference class \texttt{incollection}}\label{sec:incollection} +The reference class \texttt{incollection} requires the fields \texttt{author}, \texttt{title}, \texttt{booktitle}, \texttt{publisher} and \texttt{year}. +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. +\citeother{incollection} + +\subsection{Reference class \texttt{inproceedings}}\label{sec:inproceedings} +The reference class \texttt{inproceedings} requires the fields \texttt{author}, \texttt{title}, \texttt{booktitle}, \texttt{publisher} and \texttt{year}. +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. +\citeother{inproceedings, conference, liang2019fisher-rao} + +\subsection{Reference class \texttt{conference}}\label{sec:conference} +This class is an alias for \texttt{inproceedings}. + +\subsection{Reference class \texttt{manual}}\label{sec:manual} +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}. + +\subsection{Reference classes \texttt{mastersthesis} and \texttt{phdthesis}}\label{sec:theses} +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}. + +\citeother{mastersthesis, phdthesis} + +\subsection{Reference class \texttt{proceedings}}\label{sec:proceedings} +The reference class \texttt{proceedings} can be used to cite full proceedings instead of a single contribution therein. +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}. + +\subsection{Reference class \texttt{techreport}}\label{sec:techreport} +The reference class \texttt{techreport} requires the fields \texttt{author}, \texttt{title}, \texttt{institution}, and \texttt{year}. +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}. + +\subsection{Reference class \texttt{unpublished}}\label{sec:unpublished} +The reference class \texttt{unpublished} requires the \texttt{author}, \texttt{title}, and \texttt{note} fields. +Optionally, a \texttt{year/date} as well as an \texttt{eprint} reference may be provided. +\citeother{unpublished} + +\bibliographystyleother{quantum} +\bibliographyother{quantum-bibliographystyle-demo} + +\section{Customization}\label{sec:customization} + +\paragraph{Warnings raise Errors} +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. +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. + +An example for a caught mistake is +{\small +\begin{verbatim} +@article{article_missing_comma, + author={Matthew McKague}, + doi={10.1017/cbo9780511976667}, + year={2017}, + journal={Quantum}, + volume={1} + title={Self-testing in parallel with {CHSH}} +} +\end{verbatim} +} +Here, the missing comma after \texttt{volume={1}} would make bibtex abort the processing of the item, leading +to the \texttt{title} field, which is required, being missed. +In contrast, the following would not be caught: +{\small +\begin{verbatim} +@article{article_trailing_comma, + author={Matthew McKague}, + doi={10.1017/cbo9780511976667}, + year={2017}, + journal={Quantum}, + volume={1}, + title={Self-testing in parallel with {CHSH}}, +} +\end{verbatim} +} +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. + +If you want to turn off these errors raised from bibtex warnings, include the entry +\begin{verbatim*} +@preamble{"\DoNotMakeWarningsErrors"} +\end{verbatim*} +anywhere in the \emph{bibliography} (i.e. the \texttt{.bib} file) like one would include a reference. + +\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\_bst\_demo.bib}). + +\paragraph{Explicit DOI links} +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). +This behaviour can be changed to output explicit DOI links instead. To do so, include the entry +\begin{verbatim*} +@preamble{"\MakeDoiLinksExplicit"} +\end{verbatim*} +anywhere in the \emph{bibliography} (i.e. the \texttt{.bib} file) like one would include a reference. + +\paragraph{Compression} +By default, the quantum bibstyle prints the numbers for all references separately and does not compress +a range of citations, like so: [1, 6, 7, 8, 11, 12, 13, 14]. +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. +If you prefer to compress citations (like so: [1, 6-8, 11-14]), simply add +\begin{verbatim*} +\PassOptionsToPackage{compress}{natbib} +\end{verbatim*} +to the preamble \emph{before} including +\begin{verbatim*} +\usepackage[numbers]{natbib} +\end{verbatim*} +where the option \texttt{numbers} is required to make the bibliography style work. + +\end{document} diff --git a/macros/latex/contrib/quantumarticle/quantum-template.pdf b/macros/latex/contrib/quantumarticle/quantum-template.pdf index fb7abea17b..7c571036dd 100644 Binary files a/macros/latex/contrib/quantumarticle/quantum-template.pdf and b/macros/latex/contrib/quantumarticle/quantum-template.pdf differ diff --git a/macros/latex/contrib/quantumarticle/quantum-template.tex b/macros/latex/contrib/quantumarticle/quantum-template.tex index 7b6b14263d..6f6eda81dc 100644 --- a/macros/latex/contrib/quantumarticle/quantum-template.tex +++ b/macros/latex/contrib/quantumarticle/quantum-template.tex @@ -27,7 +27,7 @@ \author{Marcus Huber} \affiliation{Institute for Quantum Optics \& Quantum Information (IQOQI), Austrian Academy of Sciences, Boltzmanngasse 3, Vienna A-1090, Austria} \orcid{0000-0003-1985-4623} -\author{Christopher Granade} +\author{Cassandra Granade} \affiliation{Microsoft Research, Quantum Architectures and Computation Group, Redmond, WA 98052, USA} \author{Johannes Jakob Meyer} \affiliation{Dahlem Center for Complex Quantum Systems, Freie Universität Berlin, 14195 Berlin, Germany} @@ -64,7 +64,7 @@ On the contrary, by giving the \texttt{accepted=YYYY-MM-DD} option, with \texttt \caption{Every figure must have an informative caption and a number. The caption can be placed above, below, or to the side of the figure, as you see fit. The same applies for tables, boxes, and other floating elements. - Quantum provides a Jupyter notebook to create plots that integrate seamlessly with \texttt{quantumarticle}, described in Section \ref{sec:plots}. + Plots that integrate seamlessly with \texttt{quantumarticle} can be obtained through the Python package rsmf, as described in Section~\ref{sec:plots}. Figures spanning multiple columns can by typeset with the usual \texttt{figure*} environment.} \label{fig:figure1} \end{figure} @@ -105,6 +105,8 @@ Citations to other works should appear in the References section at the end of t \end{theorem} This can be achieved in several ways, depending on how you are formatting your bibliography. +This is done easiest using the custom bibliography style for Quantum, +please refer to its separate demo for details (\texttt{quantum\_bst\_demo.pdf}). Suppose the DOI of an article \cite{examplecitation} that you want to cite is \texttt{10.22331/idonotexist}. If you are formatting your bibliography manually, you can cite this work using the following in your \texttt{thebibliography} environment: \begin{verbatim} @@ -141,15 +143,16 @@ All special characters must be input via their respective LaTeX commands. If you are using BibTeX, you can load the \texttt{natbib} package by putting \begin{verbatim} -\usepackage[numbers,sort&compress]{natbib} +\usepackage[numbers]{natbib} \end{verbatim} -in the preamble of your document and then use the \texttt{plainnat} citation style by including your BibTeX bibliography \texttt{mybibliography.bib} where you want the bibliography to appear as follows: +in the preamble of your document and then use the \texttt{quantum} citation style by including your BibTeX bibliography \texttt{mybibliography.bib} where you want the bibliography to appear as follows: \begin{verbatim} -\bibliographystyle{plainnat} +\bibliographystyle{quantum} \bibliography{mybibliography} \end{verbatim} The quantumarticle class automatically detects that the \texttt{natbib} package was loaded and redefines the \texttt{\textbackslash{}doi} command to create hyperlinks. This is likely the easiest option if you are converting from another document class. +The \texttt{quantum.bst} bibliography style is currently a beta feature and feedback is very much appreciated. Please open a \href{https://github.com/quantum-journal/quantum-journal/issues}{github issue} or write an email to \href{mailto:latex@quantum-journal.org}{latex@quantum-journal.org} if you come across any bugs or possible improvements. If you want to use BibLaTeX, you can instead add \begin{verbatim} @@ -181,8 +184,8 @@ The only two requirements are that citations must uniquely identify the cited wo \section{Plots} \label{sec:plots} -Quantum provides a \href{https://jupyter.org/}{Jupyter notebook} based on the widely used \href{https://matplotlib.org/}{matplotlib} library that greatly simplifies the creation of plots that integrate seamlessly with the \texttt{quantumarticle} document class. This is intended as a service to the authors, is \textit{not} mandatory, and currently in beta stage. You can download the \href{https://raw.githubusercontent.com/quantum-journal/quantum-journal/master/quantum-plots.ipynb}{quantum-plots.ipynb} notebook and accompanying \href{https://raw.githubusercontent.com/quantum-journal/quantum-journal/master/quantum-plots.mplstyle}{quantum-plots.mplstyle} file from the \href{https://github.com/quantum-journal/quantum-journal}{quantumarticle GitHub repository}. You only need to specify the font size and paper format that were passed as options to \texttt{quantumarticle} to get plots with fitting font sizes and dimensions. -We strongly encourage authors to use the vector based PDF format for plots. +We strongly encourage authors to use the vector based PDF format for plots. The Python package \href{https://pypi.org/project/rsmf/}{rsmf} (``right-size my figures'') together with the widely used plotting library \href{https://matplotlib.org/}{matplotlib} can be used to create plots that integrate seamlessly with the \texttt{quantumarticle} document class. In the Quantum \href{https://github.com/quantum-journal/quantum-journal/}{GitHub repository}, you find the script \href{https://raw.githubusercontent.com/quantum-journal/quantum-journal/master/example-plot.py}{example-plot.py} that shows how these tools were used to create Figure~\ref{fig:figure1}. + \begin{theorem}[Be mindful of the colorblind] About 4\% of the worlds population are affected by some form of color vision deficiency or color blindness. @@ -240,8 +243,8 @@ Alternatively you can use a format similar to that of the \texttt{authblk} packa \author[2]{Author 3} \author[1,3]{Author 4} \affil[1]{Affiliation 1} -\affil[2]{Affiliation 1} -\affil[3]{Affiliation 1} +\affil[2]{Affiliation 2} +\affil[3]{Affiliation 3} \end{verbatim} \section{LyX layout} @@ -253,7 +256,7 @@ The quantumarticle document class comes bundled with a \href{https://raw.githubu \label{sec:version} This is quantumarticle version v\quantumarticleversion. -\bibliographystyle{plain} +\bibliographystyle{quantum} \begin{thebibliography}{9} \bibitem{examplecitation} Name Surname, @@ -276,11 +279,17 @@ This is quantumarticle version v\quantumarticleversion. -\onecolumn\newpage +\onecolumn \appendix \section{First section of the appendix} Quantum allows the usage of appendices. +If you want your appendices to appear in \texttt{onecolumn} mode but the rest of the +document in \texttt{twocolumn} mode, you can insert the command +\texttt{\textbackslash{}onecolumn\textbackslash{}newpage} or just +\texttt{\textbackslash{}onecolumn} before +\texttt{\textbackslash{}appendix}. + \subsection{Subsection} Ideally, the command \texttt{\textbackslash{}appendix} should be put before the appendices to get appropriate section numbering. @@ -291,8 +300,6 @@ Equations continue to be numbered sequentially. \end{equation} You are free to change this in case it is more appropriate for your article, but a consistent and unambiguous numbering of sections and equations must be ensured. -If you want your appendices to appear in \texttt{onecolumn} mode but the rest of the document in \texttt{twocolumn} mode, you can insert the command \texttt{\textbackslash{}onecolumn\textbackslash{}newpage} before \texttt{\textbackslash{}appendix}. - \section{Problems and Bugs} In case you encounter problems using the quantumarticle class please analyze the error message carefully and look for help online; \href{http://tex.stackexchange.com/}{http://tex.stackexchange.com/} is an excellent resource. If you cannot resolve a problem, please open a bug report in our bug-tracker under \href{https://github.com/quantum-journal/quantum-journal/issues}{https://github.com/quantum-journal/quantum-journal/issues}. diff --git a/macros/latex/contrib/quantumarticle/quantum.bst b/macros/latex/contrib/quantumarticle/quantum.bst new file mode 100644 index 0000000000..8a39e901cd --- /dev/null +++ b/macros/latex/contrib/quantumarticle/quantum.bst @@ -0,0 +1,1789 @@ +% This is the BibTeX style file for the Quantum journal. +% It is based on hyperabbrv.bst, and the extensions by Aram Harrow +% (see https://github.com/harrow/arxiv-bibstyle) and Andrew Comech +% (see https://www.math.tamu.edu/~comech/tools/bibtex-doi-eprint/). +% +% In addition to added arxiv and DOI hyperlinks, the file style incorporates design +% choices made for Quantum journal, in particular in the light of online availability. +% Furthermore, this file style introduces some custom reference classes as well as +% custom entry fields. + +ENTRY + { address + archivePrefix + author + booktitle + chapter + code + commit + date + doi + edition + editor + eprint + howpublished + institution + journal + journaltitle + key + month + note + nolink + number + organization + pages + primaryClass + publisher + school + series + shortjournal + shorturl + title + type + url + urldate + version + volume + year + } + {} + {} + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% Variables and state descriptors +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +INTEGERS + { + % These are state describing integers to control + % punctuation, capitalization, and line breaks + output.state + before.all + mid.sentence + after.sentence + after.block + + multiresult + doi.linked + + % Counters + length + namesleft + numnames + found.slashes + number.label + longest.label.width + + % Config integers + % - whether to print out DOI links explicitly or add the link to parts of the + % citation itself. + explicit.doi.links + % - whether to raise compilation errors from (many) BibTeX warnings + warnings.are.errors + + % pointers + nameptr + ptr + } + +STRINGS { s t m longest.label label } + +FUNCTION {init.state.consts} +{ % Initialize the global state describing integeres for punctuation + % Args: + % Returns: + #0 'before.all := + #1 'mid.sentence := + #2 'after.sentence := + #3 'after.block := +} + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% Custom warning +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +FUNCTION {my.warning} +{ % Print cited element in bibliography with error message in red. + % If warnings.are.errors (default:True), raise a \PackageError + % Args: str - Warning message + % Returns: + 'm := + "{\color{red}{ This bibitem caused a BibTeX warning: " m * " entry.}}" * + warnings.are.errors + { "\PackageError{quantum.bst}{The bibitem " * + cite$ * + " caused a BibTeX warning}" * + "{By default, quantum.bst handles BibTeX warnings like compilation " * + "errors. Please refer to the bibliography style demo for details and options.}" * + } + 'skip$ + if$ + write$ + m cite$ * warning$ +} + +FUNCTION {my.warning.newline} +{ % Print cited element in bibliography with error message in red. + % If warnings.are.errors (default:True), raise a \PackageError + % This function includes a newline in the bibliography to ensure + % that the error message for missing links is formatted correctly. + % Args: str - Second line of warning message + % str - First line of warning message + % Returns: + 's := + 'm := + "{\color{red}{ This bibitem caused a BibTeX warning: " m * "}}" * + write$ + newline$ + "{\color{red}{" s * " entry.}}" * + warnings.are.errors + { "\PackageError{quantum.bst}{The bibitem " * + cite$ * + " caused a BibTeX warning}" * + "{By default, quantum.bst handles BibTeX warnings like compilation " * + "errors. Please refer to the bibliography style demo for details.}" * + } + 'skip$ + if$ + write$ + m cite$ * warning$ +} + +FUNCTION {my.crossref.warning} +{ % Print cited crossref element in bibliography with error message in red. + % If warnings.are.errors (default:True), raise a \PackageError + % Args: str - Warning message + % Returns: + 'm := + warnings.are.errors + { "{\color{red} This bibitem caused a crossref-BibTeX warning: need " + m * " to crossref.}\PackageError{quantum.bst}{The crossref bibitem " * + cite$ * + " caused a BibTeX warning}" * + "{By default, quantum.bst handles BibTeX warnings like compilation " * + "errors. Please refer to the bibliography style demo for details.}" * + write$ + } + 'skip$ + if$ + "need " m * " for " * cite$ * " to crossref " * crossref * warning$ +} + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% Boolean functions +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +FUNCTION {not} +{ % Logical NOT of a "Boolean" + % Args: int - Boolean to negate + % Returns: int - negated Boolean + { #0 } + { #1 } + if$ +} + +FUNCTION {and} +{ % Logical AND between two "Booleans" + % Args: int - First Boolean to combine + % int - Second Boolean to combine + % Returns: int - logical AND of input Booleans + 'skip$ + { pop$ #0 } + if$ +} + +FUNCTION {or} +{ % Logical OR between two "Booleans" + % Args: int - First Boolean to combine + % int - Second Boolean to combine + % Returns: int - logical OR of input Booleans + { pop$ #1 } + 'skip$ + if$ +} + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% String manipulation +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +FUNCTION {string.length} +{ % Count the length of a string + % Args: str - String to count + % Returns: int - Length of input string + #1 'length := + % Increase the length by 1 until the substring of the current length is the full string + {duplicate$ duplicate$ #1 length substring$ = not} + {length #1 + 'length :=} + while$ + % Pop the string and return the length + pop$ length +} + +FUNCTION {contains.substring} +{ % Check whether a substring is contained in a string + % Args: str - Substring to find in larger string + % str - String to find the substring in + % Returns: int("Boolean") - whether the substring is contained in the string + 's := + 't := + % Count the length of the substring + s string.length 'length := + % cut away starting characters of the string until it is empty or the substring is found + { t empty$ not } + % Check whether the current string starts with the substring + { t #1 length substring$ s = + { % If yes, empty the string and return #1 + "" 't := + #1 + } + { % If not, delete the first character of the string + t #2 global.max$ substring$ 't := + % If the string is empty, return #0 + t empty$ + { #0 } + 'skip$ + if$ + } + if$ + } + while$ +} + +FUNCTION {chop.word} +{ % Chop the beginning of a string if it matches a given second string + % Args: str - String to chop + % int - Length of substring to match + % str - Substring to match + % Returns: str - (Potentially) chopped string + 's := + 'length := + s #1 length substring$ = + { s length #1 + global.max$ substring$ } + 's + if$ +} + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% Elementary output functions +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +FUNCTION {output.nonnull} +{ % Output a string that is guaranteed not to be empty + % Args: str - String to process + % Returns: + % The written output via write$ depends on the position in a sentence or block, + % as stored in outpute.state, which is updated accordingly. + 's := + output.state mid.sentence = + 'write$ + { output.state after.block = + { add.period$ write$ + newline$ + "\newblock " write$ + } + { output.state before.all = + 'write$ + { add.period$ " " * write$ } + if$ + } + if$ + mid.sentence 'output.state := + } + if$ + s +} + +FUNCTION {output} +{ % Output a string if it is not empty + % Args: str - String to check and output + % Returns: + duplicate$ empty$ + 'pop$ + 'output.nonnull + if$ +} + +FUNCTION {output.check} +{ % Check whether a string is empty, output it if it is not, and raise a my.warning if it is. + % Args: str - Describing string of argument that is checked to provide a useful error message + % str - String to check and output if it is not empty + % Returns: + 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * my.warning } + 'output.nonnull + if$ +} + +FUNCTION {no.output.check} +{ % Check whether a string is empty and raise a my.warning if it is. + % Args: str - Describing string of argument that is checked to provide a useful error message + % str - String to check + % Returns: + 't := + duplicate$ empty$ + { pop$ "empty " t * " in " * my.warning } + 'skip$ + if$ +} + +FUNCTION {no.output.check.links} +{ % Check whether a string is empty and raise a my.warning.newline if it is. + % Args: str - Describing string of argument that is checked to provide a useful error message + % str - String to check + % Returns: + % The separate handling from no.output.check is the special warning message that contains + % special characters, requiring us to use my.warning.newline. In addition, if the field + % `nolink` is not missing (it may be empty though), the warning is not raised. + 't := + duplicate$ empty$ nolink missing$ and + { pop$ "empty " t * ". " * + "If none of these fields is applicable for the cited work you can include the field " * + "\verb|`nolink = {}`| in its bib" + my.warning.newline + } + 'skip$ + if$ +} + +FUNCTION {output.bibitem} +{ % Write the current buffer and the header for a new bibitem to the bbl file and + % updates the output.state + % Args: str - Current buffer is written to the bbl file + % Returns: str - An empty string + newline$ + % Write the header for a new bibitem + "\bibitem{" write$ + cite$ write$ + "}" write$ + newline$ + "" + before.all 'output.state := +} + +FUNCTION {fin.entry} +{ % Finalize an entry by appending a period if appropriate and writing to the bbl file + % Args: str - Current string to write to the bbl file + % Returns: + add.period$ + write$ + newline$ +} + +FUNCTION {new.block} +{ % Start a new block in an entry, setting the output.state accordingly + % Args: + % Returns: + output.state before.all = + 'skip$ + { after.block 'output.state := } + if$ +} + +FUNCTION {new.sentence} +{ % Start a new sentence in an entry, setting the output.state accordingly + % Args: + % Returns: + output.state after.block = + output.state before.all = + or + 'skip$ + { after.sentence 'output.state := } + if$ +} + +FUNCTION {new.block.checka} +{ % Start a new block in an entry if the input string is not empty + % Args: str - String to decide whether a new block is started + % Returns: + empty$ + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.block.checkb} +{ % Start a new block in an entry if any of two input strings are not empty + % Args: str - Second string to decide whether a new block is started + % str - First string to decide whether a new block is started + % Returns: + empty$ + swap$ empty$ + and + 'skip$ + 'new.block + if$ +} + +FUNCTION {new.sentence.checka} +{ % Start a new sentence in an entry if the input string is not empty + % Args: str - String to decide whether a new sentence is started + % Returns: + empty$ + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {new.sentence.checkb} +{ % Start a new sentence in an entry if any of two input strings are not empty + % Args: str - Second string to decide whether a new sentence is started + % str - First string to decide whether a new sentence is started + % Returns: + empty$ + swap$ empty$ + and + 'skip$ + 'new.sentence + if$ +} + +FUNCTION {field.or.null} +{ % Replace an empty field or string by the empty string "" + % Args: str - Field or string to check and replace + % Returns: str - The input string if it was not empty, else "" + % This function does nothing on strings, it just replaces empty (but defined) + % fields by the empty string in order to allow for string comparisons and other operations + % that are not defined on empty (non-string) fields. + duplicate$ empty$ + { pop$ "" } + 'skip$ + if$ +} + +FUNCTION {tie.or.space.connect} +{ % Connect two strings with a space or a non-breaking ~ + % Args: str - Second string to connect. If it is shorter than 3 characters, a ~ is used + % str - First string to connect. + % Returns: str - The connected strings. + duplicate$ text.length$ #3 < + { % Use a ~ if the second string is shorter than 3 characters + "~" + } + { % Use a space else + " " + } + if$ + % Bring the strings in the order (first string, connector, second string) and merge them + swap$ * * +} + +FUNCTION {init.longest.label} +{ % Initializes globally used variables to determine the longest label in the bibliography + % Args: + % Returns: + "" 'longest.label := + #1 'number.label := + #0 'longest.label.width := +} + +FUNCTION {longest.label.pass} +{ % Update the longest.label.width and the longest.label, as measured by width$ + % Args: + % Returns: + % Note that this function does not require any input from the bilbiography items, + % but only depends on the number of items. + number.label int.to.str$ 'label := + number.label #1 + 'number.label := + label width$ longest.label.width > + { label 'longest.label := + label width$ 'longest.label.width := + } + 'skip$ + if$ +} + + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% Entry formatting +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +FUNCTION {boldfont} +{ % Add a bold font formatting string to a string (if it is not empty) + % Args: str - The string to format in bold font + % Returns: str - The input string wrapped in a formatting string for bold font + % Only add the formatting string to a non-empty string + duplicate$ empty$ + { pop$ "" } + { "{\bf " swap$ * "}" * } + if$ +} + +FUNCTION {format.names} +{ % Format a given string with names + % Args: str - The string with names + % Returns: str - The formatted names + 's := + % initialize pointer, counter for names and counter for names to handle left + #1 'nameptr := + s num.names$ 'numnames := + numnames 'namesleft := + % Iterate over names + { namesleft #0 > } + { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't := + nameptr #1 > + { % After the first name, include connecting characters + namesleft #1 > + { % If there is more than the current name left, use a comma + ", " * t * + } + { % If there is only the current name left, use "and" or "et al." + numnames #2 > + { % Add a comma before "and" if there were more than two names + "," * + } + 'skip$ + if$ + t "others" = + { % Replace "and others" by "et~al." + " et~al." * + } + { " and " * t * } + if$ + } + if$ + } + { % Simply write the first name to buffer + t + } + if$ + nameptr #1 + 'nameptr := + namesleft #1 - 'namesleft := + } + while$ +} + +FUNCTION {format.authors} +{ % Apply format.names to the author field and return it + % Args: + % Returns: str - author field formatted via format.names + % If the author field is empty, the empty string is returned instead. + author empty$ + { "" } + { author format.names } + if$ +} + +FUNCTION {format.editors} +{ % Apply format.names to the editor field, add a remark "editor(s)" to it, and return it + % Args: + % Returns: str - editor field formatted via format.names, with ", editor(s)" appended. + % If the editor field is empty, the empty string is returned instead. + editor empty$ + { "" } + { + editor format.names + ", editor" * + % Add plural "s" if multiple editors are given + editor num.names$ #1 > + { "s" * } + 'skip$ + if$ + } + if$ +} + +FUNCTION {format.title} +{ % Wrap the title in quotation marks and change its capitalization. + % Args: + % Returns: str - title field wrapped in quotation marks with new capitalization + % Note that change.case$ together with the option "t" removes all capitalization + % of text that is not in curly braces, except for the very first character. + title empty$ + { "" } + { "``" title "t" change.case$ * "''" * } + if$ +} + +FUNCTION { format.arxiv.hyperlink } +{ % Extract the arXiv handle from a string, removing a leading "arXiv" + % Args: str - The string to extract the handle from + % Returns: str - The extracted arXiv handle + % If the string starts with "arxiv:" or "arxiv" (or any capitalized version of these), + % the length-9 handle is extracted, otherwise the original string is returned. + duplicate$ #1 #6 substring$ "l" change.case$ "arxiv:" = + { #7 #9 substring$ } + { duplicate$ #1 #5 substring$ "l" change.case$ "arxiv" = + { #6 #9 substring$ } + 'skip$ + if$ + } + if$ +} + +FUNCTION {format.eprint} +{ % Format the eprint link, including the hyperlink and the link text. + % Args: + % Returns: str - Hyperlink to extracted arxiv reference + eprint empty$ + { "" } + { archivePrefix empty$ + { primaryClass empty$ + { "arXiv" } + { primaryClass } + if$ + } + { archivePrefix } + if$ + " \href{http://arxiv.org/abs/" + eprint format.arxiv.hyperlink * + "}{" * + swap$ * + ":" * + eprint #1 #5 substring$ "arXiv" = + { eprint #7 #15 substring$ * } + { eprint * } + if$ + "}" * + } + if$ +} + +FUNCTION {add.doi.link} +{ % Add a hyperlink referring to a DOI reference to a string, using the doi field. + % Args: str - String to add the hyperlink to + % Returns: str - Input string with hyperlink added + "\href{https://dx.doi.org/" doi * "}{" * swap$ * "}" * +} + +FUNCTION {n.dashify} +{ % Replace single dashes by double dashes + % Args: str - Input string to be modified + % Returns: str - Input string with single dashes replaced by double dashes + 't := + "" + % Iterate over the characters in the string + { t empty$ not } + { t #1 #1 substring$ "-" = + { + t #1 #2 substring$ "--" = not + { % If the current `t` starts with a "-" but not with "--", replace + % the single dash with "--" and cut the leading dash from `t` + "--" * + t #2 global.max$ substring$ 't := + } + { % If the current `t` starts with a "--", add all dashes in the + % current `t` to the output string without any replacement + { t #1 #1 substring$ "-" = } + { "-" * + t #2 global.max$ substring$ 't := + } + while$ + } + if$ + } + { % If the current `t` does not start with a dash, simply move the first + % character to the output string. + t #1 #1 substring$ * + t #2 global.max$ substring$ 't := + } + if$ + } + while$ +} + +FUNCTION {format.year} +{ % Format the year of an entry + % Args: + % Returns: str - Formatted year in brackets + % If the year field is empty, the year is extracted from the date field, assuming + % that it starts with the year. + year empty$ + { date empty$ + { "" } + { "~(" date #1 #4 substring$ * ")" * } + if$ + } + { "~(" year * ")" * } + if$ +} + +FUNCTION {format.urldate} +{ % Format the date on which a URL was accessed + % Args: + % Returns: str - The formatted date in brackets with a remark "accessed:" + % The urldate field preceeds the date field. + urldate empty$ + { date empty$ + { "" } + { "(accessed:~" date * ")" * } + if$ + } + { "(accessed:~" urldate * ")" * } + if$ +} + +FUNCTION {format.chapter} +{ % Format the chapter field for an entry + % Args: int - "Boolean" indicating whether the "Chapter" should be turned to lower case + % Returns: str - The formatted chapter with leading "Chapter" string. + % If the field `type` is not empty, it is used instead of the generic "Chapter". + type empty$ + { "Chapter" } + { type } + if$ + swap$ + { "l" change.case$ } + 'skip$ + if$ + chapter tie.or.space.connect +} + +FUNCTION {multi.page.check} +{ % Check whether a string indicates multiple pages + % Args: str - The string describing a page or multiple pages + % Returns: int - "Boolean" indicating whether the string describes multiple pages + 't := + #0 'multiresult := + { multiresult not + t empty$ not + and + } + { % Check whether the first character in the current `t` is one of "-", "," or "+" + t #1 #1 substring$ + duplicate$ "-" = + swap$ duplicate$ "," = + swap$ "+" = + or or + { #1 'multiresult := } + { % Remove the first character from the current `t` + t #2 global.max$ substring$ 't := + } + if$ + } + while$ + multiresult +} + +FUNCTION {format.pages} +{ % Format the pages field of an entry + % Args: int - "Boolean" indicating whether to capitalize the word "page(s)" + % Returns: str - The formatted pages field, including the word "page(s)" + { "p" } + { "P" } + if$ + pages multi.page.check + { "ages" * pages n.dashify tie.or.space.connect } + { "age" * pages tie.or.space.connect } + if$ +} + +FUNCTION {format.bvol.series} +{ % Format the book volume and the series of an entry + % Args: + % Returns: str - The volume and series field formatted into one string. + % Raises a warning if the field `number` is present in addition to `volume`. + volume empty$ + { "" } + { mid.sentence output.state = + { "v" } + { "V" } + if$ + "olume" * volume tie.or.space.connect + series empty$ + 'skip$ + { " of " * series * } + if$ + number empty$ + 'skip$ + { "can't use both volume and number fields in " * my.warning } + if$ + } + if$ +} + +FUNCTION {format.bvol.chap.pages} +{ % Format the book volume, series and the chapter and pages of an entry + % Args: + % Returns: str - The volume and series field formatted into one string. + % This function wraps the previously defined functions format.bvol.series, + % format.chapter, and format.pages into one. + format.bvol.series + chapter empty$ + 'skip$ + { duplicate$ empty$ + { #0 } + { ", " * + #1 + } + if$ + format.chapter * + } + if$ + pages empty$ + 'skip$ + { duplicate$ empty$ + { #0 } + { ", " * + #1 + } + if$ + format.pages * + } + if$ +} + +FUNCTION {format.number.series} +{ % Format the number and the series of an entry + % Args: + % Returns: str - The number and series field formatted into one string. + % The returned string is empty if the `volume` field is not empty. + % Raises a warning if the field `series` is empty. + volume empty$ + { number empty$ + { series field.or.null } + { output.state mid.sentence = + { "number" } + { "Number" } + if$ + number tie.or.space.connect + series empty$ + { "there's a number but no series in " my.warning } + { " in " * series * } + if$ + } + if$ + } + { "" } + if$ +} + +FUNCTION {format.edition} +{ % Format the edition field of an entry + % Args: + % Returns: str - The edition of the entry with "edition" comment, if it + % is not contained in the field itself already. + edition empty$ + { "" } + { output.state mid.sentence = + { edition "l" change.case$ } + { edition "t" change.case$ } + if$ + edition "edition" contains.substring + 'skip$ + { " edition" * } + if$ + } + if$ +} + +FUNCTION {format.vol.pages} +{ % Format the volume and pages for an article entry + % Args: + % Returns: The volume and page numbers as a single string + volume field.or.null boldfont + pages empty$ + 'skip$ + { duplicate$ empty$ + { pop$ mid.sentence output.state = format.pages } + { " " swap$ * ", " * pages n.dashify * } + if$ + } + if$ +} + +FUNCTION {format.chapter.pages} +{ % Format the chapter and pages for an entry + % Args: + % Returns: str - chapter and pages description in one string + chapter empty$ + { #0 format.pages } + { + mid.sentence output.state = + format.chapter + pages empty$ + 'skip$ + { ", " * #1 format.pages * } + if$ + } + if$ +} + +FUNCTION {format.in.ed.booktitle} +{ % Format the booktitle together with editors of an entry + % Args: + % Returns: The booktitle for an entry contained in the book. + booktitle empty$ + { "" } + { editor empty$ + { "In " booktitle * } + { "In " format.editors * ", " * booktitle * } + if$ + } + if$ +} + +FUNCTION {empty.misc.check} +{ % Checks whether all relevant fields for a misc entry are empty + % Args: + % Returns: + % Raises a warning if all fields are empty + author empty$ title empty$ howpublished empty$ + month empty$ year empty$ note empty$ + and and and and and + % Only warn for entries that actually have a key + key empty$ not and + { "all relevant fields are empty in " my.warning } + 'skip$ + if$ +} + +FUNCTION {format.thesis.type} +{ % Replace a string with the type field if given, and add a DOI link + % Args: str - String to add the DOI link to, or to replace by the `type` field. + % Returns: str - Input string or `type` string if present, with DOI link. + type empty$ + 'skip$ + { pop$ + type "t" change.case$ + } + if$ + doi missing$ + explicit.doi.links + or + 'skip$ + { add.doi.link } + if$ +} + +FUNCTION {format.tr.number} +{ % Format the number of a technical report and add the remark "Technical Report" + % or the `type` field if present. + % Args: + % Returns: str - `type` field or "Technical Report" together with the `number` field + type empty$ + { "Technical Report" } + 'type + if$ + number empty$ + { "t" change.case$ } + { number tie.or.space.connect } + if$ +} + +FUNCTION {get.journal} +{ % Obtain the journal from either journal, journaltitle or shortjournal, + % in that order of priority + % Args: + % Returns: str - The name of the journal. + journal missing$ + { + journaltitle missing$ + { + shortjournal missing$ + { "" } + { shortjournal } + if$ + } + { journaltitle } + if$ + } + { journal } + if$ +} + +FUNCTION {format.article.crossref} +{ % Fomat a cross-reference of an article + % Args: + % Returns: str - Crossref entry for an article incl. citation + key empty$ + { get.journal empty$ + { "key or journal" my.crossref.warning + "" + } + { "In {\em " get.journal * "\/}" * } + if$ + } + { "In " key * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.crossref.editor} +{ % Fomat the editors for a cross-reference to a book, collection or proceedings + % Args: + % Returns: str - Editors names formatted for a cross-reference. + editor #1 "{vv~}{ll}" format.name$ + editor num.names$ duplicate$ + #2 > + { pop$ " et~al." * } + { #2 < + 'skip$ + { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = + { " et~al." * } + { " and " * editor #2 "{vv~}{ll}" format.name$ * } + if$ + } + if$ + } + if$ +} + +FUNCTION {format.book.crossref} +{ % Fomat a cross-reference to a book + % Args: + % Returns: str - Crossref entry to a book incl. citation + volume empty$ + { "volume" my.crossref.warning + "In " + } + { "Volume" volume tie.or.space.connect + " of " * + } + if$ + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { series empty$ + { "editor, key, or series" my.crossref.warning + "" * + } + { "{\em " * series * "\/}" * } + if$ + } + { key * } + if$ + } + { format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {format.incoll.inproc.crossref} +{ % Fomat a cross-reference for an entry from a collection or proceedings + % Args: + % Returns: str - Crossref entry to the collection/proceedings incl. citation. + editor empty$ + editor field.or.null author field.or.null = + or + { key empty$ + { booktitle empty$ + { "editor, key, or booktitle" my.crossref.warning + "" + } + { "In {\em " booktitle * "\/}" * } + if$ + } + { "In " key * } + if$ + } + { "In " format.crossref.editor * } + if$ + " \cite{" * crossref * "}" * +} + +FUNCTION {extract.repo} +{ % Obtain the repository name from the `code` field + % Args: + % Returns: str - The repository name to print + % Look for registered formatting of github repos and remove them + "github.com/" #11 + "www.github.com/" #15 + "https://github.com/" #19 + code + chop.word + chop.word + chop.word + % Extract the part of the repository name until the second slash + 't := + #0 'found.slashes := + #1 'ptr := + { ptr t text.length$ < #2 found.slashes > and} + {t ptr #1 substring$ "/" = + { found.slashes #1 + 'found.slashes := } + 'skip$ + if$ + ptr #1 + 'ptr := } + while$ + % Return only the part up to the second slash from above + #2 found.slashes = + { t #1 ptr #2 - substring$ } + { t #1 ptr substring$ } + if$ +} + +FUNCTION {format.version} +{ % Format the `version` field of an entry with `code` field + % Args: + % Returns: str - The version with a "v" abbreviation + version empty$ + { "" } + { + "v" version #1 #1 substring$ = + { " " version * } + { " v" version * } + if$ + } + if$ +} + +FUNCTION {format.commit} +{ % Format the `commit` field of an entry with `code` field + % Args: + % Returns: str - The commit field with the remark "commit" + commit empty$ + { "" } + { " commit:" commit #1 #7 substring$ * } + if$ +} + +FUNCTION {format.code} +{ % Format the `code` field + % Args: + % Returns: str - The `code` field with version and commit, + % including a link to the repository + code empty$ + { "" } + { " code:~\href{" code * "}{" * extract.repo * format.version * format.commit * "}" * } + if$ +} + +FUNCTION {format.url} +{ % Format a url + % Args: + % Returns: str - The `shorturl` (preferred) or `url` field including a link + % The "https" part is removed from the printed string of the hyperlink + shorturl empty$ + { url empty$ + { "" } + { " url:~\href{" url * "}{" * "https://" #8 url chop.word * "}" * } + if$ + } + { " url:~\href{" url * "}{" * "https://" #8 shorturl chop.word * "}" * } + if$ +} + +FUNCTION {check.links} +{ % Check that one of the fields providing a hyperlink is present and raise a warning if not + % Args: + % Returns: + % The fields of which one should be present are `doi`, `eprint` and + % `url`. Setting the (empty) field `nolink={}` suppresses this warning. + doi missing$ eprint missing$ and + { format.url "doi, eprint and url" no.output.check.links pop$ } + 'skip$ + if$ +} + +FUNCTION {output.links} +{ % Output the links of an entry + % Args: + % Returns: + new.block + explicit.doi.links + { % If explicit DOI links are set via the config, output it + % explicitly (if it's not missing) + doi missing$ + 'skip$ + { " doi:~" doi add.doi.link * output + new.block + } + if$ + } + 'skip$ % Without explicit DOI links, it has already been added to another string. + if$ + % Add eprint link + format.eprint output + doi missing$ eprint missing$ and + { % If the DOI and the eprint link are missing, add the `url` field hyperlink + new.block + format.url output + } + 'skip$ + if$ + new.block + % Add the code hyperlink + format.code output +} + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% Interpretation of bib entries +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +FUNCTION {is.arxiv.article} +{ % Determine whether an article class is an arxiv article only. + % Args: + % Returns: int - "Boolean" indicating whether the entry is an arxiv article only + % The article is considered an arxiv article only if + % - get.journal delivers an empty string and the `archivePrefix` field matches "arxiv" + % (up to capitalization) + % - "arxiv" (or a capitalized version of it) is present in the output of get.journal + % If the output of get.journal is empty and the `archivePrefix` field is present but not + % known, a warning is raised. + get.journal empty$ + { archivePrefix missing$ + { #0 } + { archivePrefix "l" change.case$ "arxiv" = + { #1 } + { "The `archivePrefix' " archivePrefix * " is not supported for entry" * my.warning + #0 + } + if$ + } + if$ + } + { get.journal "l" change.case$ "arxiv" contains.substring + { #1 } + { #0 } + if$ + } + if$ +} + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% Raw citation classes that are aliased in the public citation classes +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +FUNCTION {arxiv.article} +{ % Format an arxiv-only article + output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + crossref missing$ + { + format.year "year" output.check + new.block + check.links + output.links + } + { format.article.crossref output.nonnull + #1 format.pages output + } + if$ + fin.entry +} + +FUNCTION {std.article} +{ % Format a standard published article + output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + crossref missing$ + { new.block + get.journal "journal, shortjournal and journaltitle" no.output.check + format.vol.pages * + doi missing$ + explicit.doi.links + or + 'skip$ + { add.doi.link } + if$ + output + format.year "year" output.check + new.block + check.links + output.links + } + { format.article.crossref output.nonnull + #1 format.pages output + } + if$ + fin.entry +} + +FUNCTION {std.misc} +{ % Format a standard misc entry + output.bibitem + format.authors output + title howpublished new.block.checkb + format.title output + howpublished new.block.checka + howpublished output + format.year output + format.eprint output + new.block + note output + fin.entry + empty.misc.check +} + +FUNCTION {thesis.start} +{ % Format the first part of a thesis entry + output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block +} + +FUNCTION {thesis.end} +{ % Format the second (and last) part of a thesis entry + new.block + school "school" output.check + new.block + address output + format.year "year" output.check + new.block + output.links + fin.entry +} + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% Recognized citation classes +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +FUNCTION {article} +{ is.arxiv.article + 'arxiv.article + 'std.article + if$ +} + +FUNCTION {conditional.doi.link} +{ duplicate$ empty$ + doi missing$ + explicit.doi.links + doi.linked + or or or + 'skip$ + { add.doi.link + #1 'doi.linked := + } + if$ +} + +FUNCTION {book} +{ output.bibitem + author empty$ + { format.editors "author and editor" output.check } + { format.authors output.nonnull } + if$ + new.block + format.title "title" output.check + new.block + #0 'doi.linked := + crossref missing$ + { format.bvol.chap.pages + conditional.doi.link output + new.block + format.number.series + conditional.doi.link output + new.sentence + publisher "publisher" no.output.check + conditional.doi.link output + new.sentence + address output + } + { format.chapter.pages output + new.block + format.book.crossref output.nonnull + } + if$ + format.year "year" output.check + new.block + format.edition output + check.links + output.links + fin.entry +} + +FUNCTION {repository} +{ output.bibitem + format.authors output + format.year output + new.block + code empty$ + { format.url "url" output.check } + { format.code output } + if$ + fin.entry +} + +FUNCTION {website} +{ output.bibitem + author empty$ + 'skip$ + { format.authors output.nonnull } + if$ + new.block + format.title "title" output.check + new.block + format.url "url" output.check + new.block + code empty$ + 'skip$ + { format.code output + new.block + } + if$ + format.urldate output + note output + fin.entry +} + +FUNCTION {misc} +{ is.arxiv.article + 'arxiv.article + 'std.misc + if$ +} + +FUNCTION {inbook} +{ + format.chapter.pages empty$ + { "`inbook' requires chapter or pages, otherwise use `book'" my.warning } + 'skip$ + if$ + book +} + +FUNCTION {proceedings} +{ output.bibitem + editor empty$ + { organization output } + { format.editors output.nonnull } + if$ + new.block + format.title "title" no.output.check + doi missing$ + explicit.doi.links + or + 'skip$ + { add.doi.link } + if$ + output + new.block + format.bvol.series output + format.number.series output + new.block + address empty$ + { editor empty$ + { publisher new.sentence.checka } + { organization publisher new.sentence.checkb + organization output + } + if$ + new.block + publisher output + format.year "year" output.check + } + { address output.nonnull + format.year "year" output.check + new.sentence + editor empty$ + 'skip$ + { organization output } + if$ + new.block + publisher output + } + if$ + new.block + check.links + output.links + fin.entry +} + +FUNCTION {booklet} +{ output.bibitem + format.authors output + new.block + format.title "title" output.check + howpublished new.block.checka + howpublished output + address new.block.checka + address output + format.year output + output.links + new.block + note output + fin.entry +} + +FUNCTION {unpublished} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + note "note" output.check + format.year output + format.eprint output + fin.entry +} + +FUNCTION {incollection} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + #0 'doi.linked := + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + new.block + format.bvol.chap.pages + conditional.doi.link output + new.block + format.number.series + conditional.doi.link output + new.sentence + publisher "publisher" no.output.check + conditional.doi.link + address missing$ + 'skip$ + { ", " * address * } + if$ + output + format.year "year" output.check + new.block + format.edition output + } + { format.incoll.inproc.crossref output.nonnull + format.chapter.pages output + } + if$ + new.block + output.links + fin.entry +} + +FUNCTION {inproceedings} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + #0 'doi.linked := + crossref missing$ + { format.in.ed.booktitle "booktitle" output.check + new.block + format.bvol.chap.pages + conditional.doi.link output + new.block + format.number.series + conditional.doi.link output + address empty$ + { organization publisher new.sentence.checkb + organization output + publisher output + format.year "year" output.check + } + { address output.nonnull + format.year "year" output.check + new.sentence + organization output + new.sentence + publisher output + } + if$ + } + { format.incoll.inproc.crossref output.nonnull + format.pages output + } + if$ + new.block + check.links + output.links + fin.entry +} + +FUNCTION {conference} { inproceedings } + +FUNCTION {techreport} +{ output.bibitem + format.authors "author" output.check + new.block + format.title "title" output.check + new.block + format.tr.number + doi missing$ + explicit.doi.links + or + 'skip$ + { add.doi.link } + if$ + output.nonnull + new.block + institution "institution" output.check + address output + format.year "year" output.check + output.links + fin.entry +} + +FUNCTION {manual} +{ output.bibitem + author empty$ + { organization empty$ + 'skip$ + { organization output.nonnull + new.block + address output + } + if$ + } + { format.authors output.nonnull } + if$ + new.block + format.title "title" output.check + author empty$ + { organization empty$ + { address new.block.checka + address output + } + 'skip$ + if$ + } + { organization address new.block.checkb + organization output + new.block + address output + } + if$ + new.block + format.edition output + format.year output + output.links + fin.entry +} + +FUNCTION {mastersthesis} +{ thesis.start + "Master's thesis" format.thesis.type output.nonnull + thesis.end +} + +FUNCTION {phdthesis} +{ thesis.start + "PhD thesis" format.thesis.type output.nonnull + thesis.end +} + + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% Default citation type +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +FUNCTION {default.type} { article } + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% Macros/aliases +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +MACRO {jan} {"Jan."} + +MACRO {feb} {"Feb."} + +MACRO {mar} {"Mar."} + +MACRO {apr} {"Apr."} + +MACRO {may} {"May"} + +MACRO {jun} {"June"} + +MACRO {jul} {"July"} + +MACRO {aug} {"Aug."} + +MACRO {sep} {"Sept."} + +MACRO {oct} {"Oct."} + +MACRO {nov} {"Nov."} + +MACRO {dec} {"Dec."} + +MACRO {acmcs} {"ACM Comput. Surv."} + +MACRO {acta} {"Acta Inf."} + +MACRO {cacm} {"Commun. ACM"} + +MACRO {ibmjrd} {"IBM J. Res. Dev."} + +MACRO {ibmsj} {"IBM Syst.~J."} + +MACRO {ieeese} {"IEEE Trans. Softw. Eng."} + +MACRO {ieeetc} {"IEEE Trans. Comput."} + +MACRO {ieeetcad} + {"IEEE Trans. Comput.-Aided Design Integrated Circuits"} + +MACRO {ipl} {"Inf. Process. Lett."} + +MACRO {jacm} {"J.~ACM"} + +MACRO {jcss} {"J.~Comput. Syst. Sci."} + +MACRO {scp} {"Sci. Comput. Programming"} + +MACRO {sicomp} {"SIAM J. Comput."} + +MACRO {tocs} {"ACM Trans. Comput. Syst."} + +MACRO {tods} {"ACM Trans. Database Syst."} + +MACRO {tog} {"ACM Trans. Gr."} + +MACRO {toms} {"ACM Trans. Math. Softw."} + +MACRO {toois} {"ACM Trans. Office Inf. Syst."} + +MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."} + +MACRO {tcs} {"Theoretical Comput. Sci."} + +READ + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% BIBLIOGRAPHY HEADER AND FOOTER +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +FUNCTION {begin.bib} +{ % Print the beginning of the bibliography to the .bbl file. Also set the + % "Booleans" for the global config of DOI link printing and handling of warnings. + #0 'explicit.doi.links := + #1 'warnings.are.errors := + preamble$ empty$ + 'skip$ + { preamble$ "MakeDoiLinksExplicit" contains.substring + { #1 'explicit.doi.links := + "\newcommand{\MakeDoiLinksExplicit}{}" write$ newline$ + } + { #0 'explicit.doi.links := } + if$ + preamble$ "DoNotMakeWarningsErrors" contains.substring + { #0 'warnings.are.errors := + "\newcommand{\DoNotMakeWarningsErrors}{}" write$ newline$ + } + { #1 'warnings.are.errors := } + if$ + preamble$ write$ newline$ + } + if$ + "\begin{thebibliography}{" longest.label * "}" * write$ newline$ +} + +FUNCTION {end.bib} +{ % Print the ending of the bibliography to the .bbl file. + newline$ + "\end{thebibliography}" write$ newline$ +} + +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % +% EXECUTION +% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % + +% Initialize global constants indicating the positions in an entry +EXECUTE {init.state.consts} + +% Initialize global variables for the longest label +EXECUTE {init.longest.label} + +% Determine the longest label that will be needed +ITERATE {longest.label.pass} + +% Begin the library and handle the preamble +EXECUTE {begin.bib} + +% Create all bibliography entries +ITERATE {call.type$} + +% Finalize the library +EXECUTE {end.bib} diff --git a/macros/latex/contrib/quantumarticle/quantumarticle.cls b/macros/latex/contrib/quantumarticle/quantumarticle.cls index 355be71dbb..c5ae1a8ccd 100644 --- a/macros/latex/contrib/quantumarticle/quantumarticle.cls +++ b/macros/latex/contrib/quantumarticle/quantumarticle.cls @@ -3,7 +3,7 @@ %% it provides the quantumarticle class for typesetting articles in %% Quantum - the open journal for quantum science %% -%% Copyright 2016,2017,2018,2019,2020 +%% Copyright 2016,2017,2018,2019,2020,2021,2022 %% Verein zur Förderung des Open Access Publizierens in den Quantenwissenschaften %% (https://quantum-journal.org/about/) %% @@ -19,9 +19,9 @@ %% version 2005/12/01 or later. %% \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\def\quantumarticleversion{5.1} +\def\quantumarticleversion{6.0} \ProvidesClass{quantumarticle} -[2020/10/27 v\quantumarticleversion +[2021/12/07 v\quantumarticleversion class for Quantum - the open journal for quantum science (https://quantum-journal.org)] \RequirePackage{xkeyval} \RequirePackage{etoolbox} diff --git a/macros/latex/contrib/quantumarticle/quantumview-template.bib b/macros/latex/contrib/quantumarticle/quantumview-template.bib new file mode 100644 index 0000000000..b97ca97196 --- /dev/null +++ b/macros/latex/contrib/quantumarticle/quantumview-template.bib @@ -0,0 +1,43 @@ +%% This is a sample bibliography demonstrating how citations with +%% appropriate links to the DOI and arXiv version can be achieved. + +@book{Nielsen_Chuang_2000, + author= {Nielsen, Michael A. and Chuang, Isaac L.}, + title = {{Quantum Computation and Quantum Information}}, + publisher = {Cambridge University Press}, + address = {Cambridge, U.K.}, + nolink = {}, + year = {2000} +} + +@article{Preskill2018, + author = {Preskill, John}, + title = {{Quantum Computing in the NISQ era and beyond}}, + journal = {Quantum}, + year = {2018}, + volume = {2}, + pages = {79}, + archiveprefix = {arXiv}, + primaryclass = {quant-ph}, + eprint = {2007.01307} +} + +@article{AcinBrussLewensteinSanpera2001, + author = {Ac{\'i}n, Antonio and Bru{\ss}, Dagmar and Lewenstein, Maciej and Sanpera, Anna}, + title = {{Classification of Mixed Three-Qubit States}}, + journal = {Phys. Rev. Lett.}, + volume = {87}, + pages = {040401}, + year = {2001}, + doi = {10.1103/PhysRevLett.87.040401}, + archiveprefix = {arXiv}, + eprint = {quant-ph/0103025} +} + +@article{SchwarzhansLockErkerFriisHuber2020, + title = {Autonomous Temporal Probability Concentration: Clockworks and the Second Law of Thermodynamics}, + author = {Schwarzhans, Emanuel and Lock, Maximilian P. E. and Erker, Paul and Friis, Nicolai and Huber, Marcus}, + year = {2020}, + archiveprefix = {arXiv}, + eprint = {2007.01307}, +} diff --git a/macros/latex/contrib/quantumarticle/quantumview-template.pdf b/macros/latex/contrib/quantumarticle/quantumview-template.pdf new file mode 100644 index 0000000000..824686ef7a Binary files /dev/null and b/macros/latex/contrib/quantumarticle/quantumview-template.pdf differ diff --git a/macros/latex/contrib/quantumarticle/quantumview-template.tex b/macros/latex/contrib/quantumarticle/quantumview-template.tex new file mode 100644 index 0000000000..1c9a6614ac --- /dev/null +++ b/macros/latex/contrib/quantumarticle/quantumview-template.tex @@ -0,0 +1,68 @@ +\documentclass{quantumview} +\usepackage[utf8]{inputenc} +\usepackage[english]{babel} +\usepackage[T1]{fontenc} +\usepackage{amsmath} +\usepackage{hyperref} +\usepackage{fixltx2e} +\usepackage[numbers,sort&compress]{natbib} + +\begin{document} + +\title{Template demonstrating the quantumview document class} + +\author{Johannes Jakob Meyer} +\affiliation{Dahlem Center for Complex Quantum Systems, Freie Universität Berlin, 14195 Berlin, Germany} +\affiliation{QMATH, Department of Mathematical Sciences, K{\o}benhavns Universitet, 2100 K{\o}benhavn \O, Denmark} +\orcid{0000-0003-1533-8015} + +\maketitle + +\section{Introduction} +Quantum Views is Quantum's venue for perspectives, views, editorials and other opinion pieces. The publishing process is different from that of regular articles in Quantum because Views are published as \emph{HTML only}, and need not be uploaded to the arXiv. + +Quantum provides the quantumview documentclass to enable authors of Views to use their common LaTeX environment to prepare their contributions. The editors at Quantum can then generate the HTML output by supplying the \texttt{html} option. + +\section{Supported Formatting Options} +The documentclass natively supports the following operations: + +\paragraph{Text formatting} The following text formats are supported: +\emph{emphasis}, \textit{italic}, \textbf{bold}, \texttt{typewriter}, \textsuperscript{superscript} and \textsubscript{subscript}. + +\paragraph{Sectioning} Sectioning -- if needed -- can be performed using the regular \texttt{{\textbackslash}section}, \texttt{{\textbackslash}subsection}, \texttt{{\textbackslash}subsubsection} and \texttt{{\textbackslash}paragraph} commands. These will be converted to HTML header tags and therefore not show section numbers in the final HTML. + +\paragraph{Citations and Bibliography} You can cite references using the regular \texttt{{\textbackslash}cite} command. For example, here is some text citing a textbook~\cite{Nielsen_Chuang_2000}, a journal article~\cite{Preskill2018}, a newer preprint~\cite{SchwarzhansLockErkerFriisHuber2020} and a journal article whose preprint has an arXiv identifier in old format~\cite{AcinBrussLewensteinSanpera2001}. + +Please see quantumview-template.bib for an example of how to provide bibliographic information to BibLaTeX in a way that yields a suitable bibliography with DOI links. +In both Quantum and Quantum Views all citations to cited works that have a DOI must include a hyperlink to the DOI of the work. + +\paragraph{Formulas} You are free to use inline math $\mathcal{Z} - \pi = \nabla \Gamma$ and both the \texttt{equation} +\begin{equation} + \int_0^1 \mathrm{d}x \, |\psi(x)\rangle \! \langle \psi(x)|= \hat{O}^2 +\end{equation} +and \texttt{align} environment +\begin{align} + \oint_C = \mathcal{Z}^2. +\end{align} +As formulas are directly rendered on the webpage, \emph{you can not use custom commands and libraries}. If you are unsure wether or not the command you want to use is supported, please consult the MathJax documentation. You should thus refrain from using the \texttt{{\textbackslash}label} and \texttt{{\textbackslash}ref} commands. + +\paragraph{Lists} You are free to use both \texttt{itemize} for unordered lists, +\begin{itemize} + \item Item 1 lorem ipsum + \item Item 2 +\end{itemize} +and \texttt{enumerate} for ordered lists: +\begin{enumerate} + \item Item 1 + \item Item 2 +\end{enumerate} +Note that further modifiers, \emph{e.g.}\ for roman numbering and additional packages like \texttt{enumerate} are not supported. + +\section{Copy-Editing Tools} +The quantumview document class also provides commands that are useful in copy-editing. These are \texttt{{\textbackslash}corr} for \corr{correctons}{corrections} and \texttt{{\textbackslash}ins} \ins{for insertions}. + +\bibliography{quantumview-template} +\bibliographystyle{quantum} + + +\end{document} diff --git a/macros/latex/contrib/quantumarticle/quantumview.cls b/macros/latex/contrib/quantumarticle/quantumview.cls new file mode 100644 index 0000000000..0b06f66ede --- /dev/null +++ b/macros/latex/contrib/quantumarticle/quantumview.cls @@ -0,0 +1,1004 @@ +%% +%% This is file `quantumview.cls', +%% it provides the quantumview class for typesetting perspective articles in +%% Quantum - the open journal for quantum science +%% +%% Copyright 2020, 2021 +%% Verein zur Förderung des Open Access Publizierens in den Quantenwissenschaften +%% (https://quantum-journal.org/about/) +%% +%% It is derived from `quantumarticle.cls' available from Quantum. +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\def\quantumviewversion{5.1} +\ProvidesClass{quantumview} +[2020/10/27 v\quantumviewversion +class for Quantum - the open journal for quantum science (https://quantum-journal.org)] +\RequirePackage{xkeyval} +\RequirePackage{etoolbox} + +\newcommand*\@ptsize{} + +\newtoggle{@restonecol} + +\newtoggle{@html} +\togglefalse{@html} +\DeclareOptionX{html}{\toggletrue{@html}} + +\setlength\paperheight{297mm}% +\setlength\paperwidth{210mm} + +\renewcommand*\@ptsize{1} + +\ProcessOptionsX + +\input{size1\@ptsize.clo} + +\newcommand{\@tag}[2]{<#1>#2} + +\RequirePackage{soul} +\newcommand{\corr}[2]{\textcolor{red}{\st{#1}}\textcolor{blue}{#2}} +\newcommand{\ins}[1]{\textcolor{red}{#1}} + +\iftoggle{@html}{\renewcommand*\familydefault{\ttdefault}}{} + +\AtBeginDocument{ + % avoid bitmap fonts by loading lmodern or at least checking for cm-super + \IfFileExists{lmodern.sty}{ + \RequirePackage{lmodern} + }{} + % Define a revtex-style openone symbol + \IfFileExists{bbm.sty}{ + \RequirePackage{bbm} + \DeclareRobustCommand\openone{\mathbbm{1}} + }{ + \IfFileExists{dsfont.sty}{ + \RequirePackage{dsfont} + \DeclareRobustCommand\openone{\mathds{1}} + }{ + % This uses a similar technique to {revtex4-1}'s openone, + % namely two overstruck numeral 1s, but implemented using mboxes + % and math kerning as suggested by The Comprehensive LaTeX Symbol List. + \DeclareRobustCommand\openone{{\mbox{\small1}\mkern-5.5mu1}} + } + } + \RequirePackage{xcolor} + \definecolor{quantumviolet}{HTML}{53257F} %Quantum violet + \definecolor{quantumgray}{HTML}{555555} %Quantum gray + \iftoggle{@html}{ + \RequirePackage{verbatim} + \RequirePackage[draft]{graphicx} + }{} +} + + +\AfterEndPreamble{ + \iftoggle{@html}{ + % remove stry hyphens in HTML + \righthyphenmin=62 + \lefthyphenmin=62 + % convert other commands + \renewcommand{\emph}[1]{\@tag{em}{#1}} + \renewcommand{\textit}[1]{\@tag{i}{#1}} + \renewcommand{\textbf}[1]{\@tag{b}{#1}} + \renewcommand{\texttt}[1]{\@tag{tt}{#1}} + \renewcommand{\textsuperscript}[1]{\@tag{sup}{#1}} + \renewcommand{\textsubscript}[1]{\@tag{sub}{#1}} + \renewcommand{\cite}[1]{{\textbackslash}cite\{\detokenize{#1}\}} + \renewcommand{\label}[1]{{\textbackslash}label\{\detokenize{#1}\}} + \renewcommand{\ref}[1]{{\textbackslash}ref\{\detokenize{#1}\}} + \renewcommand{\section}[1]{\noindent\@tag{h2}{#1}\\ } + \renewcommand{\subsection}[1]{\noindent\@tag{h3}{#1}\\ } + \renewcommand{\subsubsection}[1]{\noindent\@tag{h4}{#1}\\ } + \renewcommand{\paragraph}[1]{\par ~\\\noindent
\@tag{b}{#1}} + \renewenvironment{equation} + {\endgraf \noindent {\textbackslash}begin\{equation\} \verbatim} + {\endverbatim {\textbackslash}end\{equation\} \endgraf} + \renewenvironment{align} + {\endgraf \noindent {\textbackslash}begin\{align\} \verbatim} + {\endverbatim {\textbackslash}end\{align\} \endgraf} + \renewenvironment{eqnarray} + {\endgraf \noindent {\textbackslash}begin\{eqnarray\} \verbatim} + {\endverbatim {\textbackslash}end\{eqnarray\} \endgraf} + % This solution for itemize and enumerate is due to David Carlisle from tex.stackexchange + \def\itemize{% + \par\noindent \par \let\item\olditem} + \def\enumerate{% + \par\noindent
    \let\zz\relax + \let\olditem\item + \def\item{\zz\par\indent
  1. \def\zz{\ifhmode\unskip\fi
  2. \par}} + } + \def\endenumerate{\zz\endgraf\noindent
\par \let\item\olditem} + + \def\@@addnewlinebetween#1{#1 \\ \noindent } + \def\@affiliationsonly{\forlistloop{\@@addnewlinebetween}{\affiliations}} + \renewcommand{\@maketitle}{% + \noindent {\footnotesize Title:} \\ + \noindent {\@title} \\ + \noindent {\footnotesize Author:} \\ + \noindent \@authorsonly \\ + \noindent {\footnotesize Affiliations:} \\ + \noindent \@affiliationsonly + \par\noindent\rule{\textwidth}{0.4pt} + \vspace{1.5em} + } + \renewcommand{\bibliography}[1]{~} + % convert links + \renewcommand{\href}[2]{#2} +}{} +} + +\setcounter{topnumber}{2} +\renewcommand*\topfraction{.7} +\setcounter{bottomnumber}{1} +\renewcommand*\bottomfraction{.3} +\setcounter{totalnumber}{3} +\renewcommand*\textfraction{.2} +\renewcommand*\floatpagefraction{.5} +\setcounter{dbltopnumber}{2} +\renewcommand*\dbltopfraction{.7} +\renewcommand*\dblfloatpagefraction{.5} + +\def\ps@headings{% +\let\@oddfoot\@empty +\def\@oddhead{{\slshape\rightmark}\hfil\thepage}% +\let\@mkboth\markboth +\def\sectionmark##1{% + \markright {\MakeUppercase{% + \ifnumgreater{\c@secnumdepth}{\m@ne} + {\thesection\quad} + {} + ##1}}% + }% +}% + +\def\ps@myheadings{% + \let\@oddfoot\@empty\let\@evenfoot\@empty + \def\@evenhead{\thepage\hfil\slshape\leftmark}% + \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\@gobbletwo + \let\sectionmark\@gobble + \let\subsectionmark\@gobble +} + + +\newcommand\maketitle{\par +\begingroup +\renewcommand\thefootnote{\@fnsymbol\c@footnote}% +\def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% +\long\def\@makefntext##1{\parindent 1em\noindent +\hb@xt@1.8em{% +\hss\@textsuperscript{\normalfont\@thefnmark}}##1}% +\global\@topnum\z@ % Prevents figures from going at top of page. +\@maketitle +\thispagestyle{fancy}%\@thanks +\endgroup +\setcounter{footnote}{0}% +\global\let\thanks\relax +\global\let\maketitle\relax +\global\let\@maketitle\relax +% \global\let\@thanks\@empty +% \global\let\@author\@empty +% \global\let\@date\@empty +% \global\let\@title\@empty +\global\let\title\relax +\global\let\author\relax +\global\let\date\relax +\global\let\and\relax +} + +\def\@maketitle{% + \sffamily + \null + \let \footnote \thanks + \noindent% + \begin{minipage}{\textwidth}% + \noindent{\huge\hyphenpenalty=5000 \@printtitle\par}% + \end{minipage}% + \vskip 1.5em% + \begin{flushleft}% + \noindent \@printauthors + \end{flushleft}% + \vskip 1em% + \noindent\@printaffiliations + \vskip 0em% + \ifdefempty{\@date}{}{\noindent{\footnotesize\color{quantumgray}\@date}}% + \par + \vskip 1.5em + \makeatletter% + \begingroup + \hypersetup{% + pdftitle={\detokenize\expandafter{\@title}}, + pdfauthor={\@authorsonly}, + pdfkeywords={\@keywords}, + pdfcreator={LaTeX with hyperref package and class quantumview \csname ver@quantumview.cls\endcsname}, + }% + \endgroup + \makeatother% +} + +\setcounter{secnumdepth}{3} +\newcounter {part} +\newcounter {section} +\newcounter {subsection}[section] +\newcounter {subsubsection}[subsection] +\newcounter {paragraph}[subsubsection] +\newcounter {subparagraph}[paragraph] +\renewcommand*\thepart {\@Roman\c@part} +\renewcommand*\thesection {\@arabic\c@section} +\renewcommand*\thesubsection {\thesection.\@arabic\c@subsection} +\renewcommand*\thesubsubsection{\thesubsection.\@arabic\c@subsubsection} +\renewcommand*\theparagraph {\thesubsubsection.\@arabic\c@paragraph} +\renewcommand*\thesubparagraph {\theparagraph.\@arabic\c@subparagraph} +\newcommand\part{% + \ifbool{@noskipsec}{\leavevmode}{} + \par + \addvspace{4ex}% + \boolfalse{@afterindent} + \secdef\@part\@spart} + +\def\@part[#1]#2{% +\ifnumgreater{\c@secnumdepth}{\m@ne} + {\refstepcounter{part}\addcontentsline{toc}{part}{\thepart\hspace{1em}#1}} + {\addcontentsline{toc}{part}{#1}} +{\parindent \z@ \raggedright +\interlinepenalty \@M +\normalfont +\ifnumgreater{\c@secnumdepth}{\m@ne}{\Large\bfseries \partname\nobreakspace\thepart\par\nobreak}{} +\huge \bfseries #2% +\markboth{}{}\par}% +\nobreak +\vskip 3ex +\@afterheading% +} + +\def\@spart#1{% + {\parindent \z@ \raggedright + \interlinepenalty \@M + \normalfont + \huge \bfseries #1\par}% + \nobreak + \vskip 3ex + \@afterheading} + +\newcommand*\section{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\normalfont\Large\sffamily}} + +\newcommand*\subsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\large\sffamily}} + +\newcommand*\subsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\normalfont\normalsize\sffamily}} + +\newcommand*\paragraph{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% + {-1em}% + {\normalfont\normalsize\bfseries}} + +\newcommand*\subparagraph{\@startsection{subparagraph}{5}{\parindent}% + {3.25ex \@plus1ex \@minus .2ex}% + {-1em}% + {\normalfont\normalsize\bfseries}} + +\setlength\leftmargini{2.5em} +\leftmargin \leftmargini +\setlength\leftmarginii {2.2em} +\setlength\leftmarginiii {1.87em} +\setlength\leftmarginiv {1.7em} + +\setlength\leftmarginv {1em} +\setlength\leftmarginvi {1em} + +\setlength \labelsep {.5em} +\setlength \labelwidth{\leftmargini} +\addtolength\labelwidth{-\labelsep} +\@beginparpenalty -\@lowpenalty +\@endparpenalty -\@lowpenalty +\@itempenalty -\@lowpenalty +\renewcommand*\theenumi{\@arabic\c@enumi} +\renewcommand*\theenumii{\@alph\c@enumii} +\renewcommand*\theenumiii{\@roman\c@enumiii} +\renewcommand*\theenumiv{\@Alph\c@enumiv} +\newcommand*\labelenumi{\theenumi.} +\newcommand*\labelenumii{(\theenumii)} +\newcommand*\labelenumiii{\theenumiii.} +\newcommand*\labelenumiv{\theenumiv.} +\renewcommand*\p@enumii{\theenumi} +\renewcommand*\p@enumiii{\theenumi(\theenumii)} +\renewcommand*\p@enumiv{\p@enumiii\theenumiii} +\newcommand*\labelitemi{\textbullet} +\newcommand*\labelitemii{\normalfont\bfseries \textendash} +\newcommand*\labelitemiii{\textasteriskcentered} +\newcommand*\labelitemiv{\textperiodcentered} +\newenvironment{description} +{\list{}{\labelwidth\z@ \itemindent-\leftmargin + \let\makelabel\descriptionlabel}} +{\endlist} +\newcommand*\descriptionlabel[1]{\hspace\labelsep + \normalfont\bfseries #1} + +\newenvironment{abstract}{% + \ifdefempty{\maketitle}{\relax{}}{\maketitle} + \vskip 1em \quotation% +} +{ + \endquotation\vskip 2em% +} + +\newenvironment{verse} +{\let\\\@centercr + \list{}{\itemsep \z@ + \itemindent -1.5em% + \listparindent\itemindent + \rightmargin \leftmargin + \advance\leftmargin 1.5em}% + \item\relax} +{\endlist} + +\newenvironment{quotation} +{\list{}{\listparindent 1.5em% + \itemindent \listparindent + \rightmargin \leftmargin + \parsep \z@ \@plus\p@}% + \item\relax} +{\endlist} + +\newenvironment{quote} +{\list{}{\rightmargin\leftmargin}% + \item\relax} +{\endlist} + +\newcommand*\appendix{\par + \setcounter{section}{0}% + \setcounter{subsection}{0}% + \gdef\thesection{\@Alph\c@section}} +\setlength\arraycolsep{5\p@} +\setlength\tabcolsep{6\p@} +\setlength\arrayrulewidth{.4\p@} +\setlength\doublerulesep{2\p@} +\setlength\tabbingsep{\labelsep} +\skip\@mpfootins = \skip\footins +\setlength\fboxsep{3\p@} +\setlength\fboxrule{.4\p@} +\renewcommand*\theequation {\@arabic\c@equation} +\newcounter{figure} +\renewcommand*\thefigure {\@arabic\c@figure} +\def\fps@figure{tbp} +\def\ftype@figure{1} +\def\ext@figure{lof} +\def\fnum@figure{\figurename\nobreakspace\thefigure} + +\newenvironment{figure} +{\@float{figure}} +{\end@float} + +\newenvironment{figure*} +{\@dblfloat{figure}} +{\end@dblfloat} + +\newcounter{table} +\renewcommand*\thetable{\@arabic\c@table} +\def\fps@table{tbp} +\def\ftype@table{2} +\def\ext@table{lot} +\def\fnum@table{\tablename\nobreakspace\thetable} + +\newenvironment{table} +{\@float{table}} +{\end@float} + +\newenvironment{table*} +{\@dblfloat{table}} +{\end@dblfloat} + +\newlength\abovecaptionskip +\newlength\belowcaptionskip +\setlength\abovecaptionskip{10\p@} +\setlength\belowcaptionskip{0\p@} +\long\def\@makecaption#1#2{% + \vskip\abovecaptionskip + \sbox\@tempboxa{#1: #2}% + \ifdimgreater{\wd\@tempboxa}{\hsize} + {#1: #2\par} + {\global\boolfalse{@minipage} + \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}}% + \vskip\belowcaptionskip} + +\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} +\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} +\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt} +\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf} +\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit} +\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl} +\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc} +\DeclareRobustCommand*\cal{\@fontswitch\relax\mathcal} +\DeclareRobustCommand*\mit{\@fontswitch\relax\mathnormal} + +\newcommand*\@pnumwidth{1.55em} +\newcommand*\@tocrmarg{2.55em} +\newcommand*\@dotsep{4.5} +\setcounter{tocdepth}{3} + +% We use a trick from Ivan Andrus (https://stackoverflow.com/a/2785740) +% to hide the "\section*{Contents}" command from the table of contents +% to avoid getting an ugly duplication of the Contents header inside +% the table itself. +% +% This trick consists of temporarily redefining \addcontentsline to +% do nothing during the expansion of the arguments to \tocless. +\newcommand{\nocontentsline}[3]{} +\newcommand{\tocless}[2]{\bgroup\let\addcontentsline=\nocontentsline#1{#2}\egroup} +\newcommand\tableofcontents{% + \tocless{\section*}{\contentsname + \@mkboth{% + \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% + \@starttoc{toc}% +} + +\newcommand*\l@part[2]{% + \ifnumgreater{\c@tocdepth}{-2}{\relax + \addpenalty\@secpenalty + \addvspace{2.25em \@plus\p@}% + \setlength\@tempdima{3em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + {\leavevmode + \large \bfseries #1\hfil \hb@xt@\@pnumwidth{\hss #2}}\par + \nobreak + \endgroup + }{}% +} + +\newcommand*\l@section[2]{% + \ifnumgreater{\c@tocdepth}{\z@}{ + \addpenalty\@secpenalty + \addvspace{1.0em \@plus\p@}% + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par + \endgroup + }{}% +} + +\newcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}} +\newcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}} +\newcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}} +\newcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}} + +\newcommand\listoffigures{% + \section*{\listfigurename}% + \@mkboth{\MakeUppercase\listfigurename}% + {\MakeUppercase\listfigurename}% + \@starttoc{lof}% +} + +\newcommand*\l@figure{\@dottedtocline{1}{1.5em}{2.3em}} +\newcommand\listoftables{% + \section*{\listtablename}% + \@mkboth{% + \MakeUppercase\listtablename}% + {\MakeUppercase\listtablename}% + \@starttoc{lot}% +} + +\let\l@table\l@figure +% Declare a new \acknowledgements command for {revtex4-1} +% compatability. +\newcommand*{\acknowledgmentsname}{Acknowledgments} +\newcommand{\acknowledgments}[1]{% + \section*{\acknowledgmentsname}% + #1% +} + +\newdimen\bibindent +\setlength\bibindent{1.5em} + +\newenvironment{thebibliography}[1] +{% + \section*{\refname}% + \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}% + \list{\@biblabel{\@arabic\c@enumiv}}% + {\settowidth\labelwidth{\@biblabel{#1}}% + \leftmargin\labelwidth + \advance\leftmargin\labelsep + \@openbib@code + \usecounter{enumiv}% + \let\p@enumiv\@empty + \renewcommand*\theenumiv{\@arabic\c@enumiv}}% + \sloppy + \clubpenalty4000 + \@clubpenalty \clubpenalty + \widowpenalty4000% + \sfcode`\.\@m + \setlength{\itemsep}{0pt plus 0.3ex} +} +{\def\@noitemerr + {\@latex@warning{Empty `thebibliography' environment}}% + \endlist} + +\newcommand\newblock{\hskip .11em\@plus.33em\@minus.07em} +\let\@openbib@code\@empty + +\newenvironment{theindex}{% + \toggletrue{@restonecol} + \twocolumn[\section*{\indexname}]% + \@mkboth{\MakeUppercase\indexname}% + {\MakeUppercase\indexname}% + \thispagestyle{fancy}\parindent\z@ + \parskip\z@ \@plus .3\p@\relax + \columnseprule \z@ + \columnsep 35\p@ + \let\item\@idxitem% +} +{ + \iftoggle{@restonecol} + {\onecolumn} + {\clearpage} +} + +\newcommand\@idxitem{\par\hangindent 40\p@} +\newcommand\subitem{\@idxitem \hspace*{20\p@}} +\newcommand\subsubitem{\@idxitem \hspace*{30\p@}} +\newcommand\indexspace{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} + +\renewcommand*\footnoterule{% + \kern-3\p@ + \hrule\@width.4\columnwidth + \kern2.6\p@} + +\newcommand*\@makefntext[1]{% +\parindent 1em% +\noindent +\hb@xt@1.8em{\hss\@makefnmark}#1} + +\newcommand*\contentsname{Contents} +\newcommand*\listfigurename{List of Figures} +\newcommand*\listtablename{List of Tables} +\newcommand*\refname{References} +\newcommand*\indexname{Index} +\newcommand*\figurename{Figure} +\newcommand*\tablename{Table} +\newcommand*\partname{Part} +\newcommand*\appendixname{Appendix} +\newcommand*\abstractname{Abstract} + +\def\today{\ifcase\month\or + January\or February\or March\or April\or May\or June\or + July\or August\or September\or October\or November\or December\fi + \space\number\day, \number\year} +\setlength\columnsep{20\p@} +\setlength\columnseprule{0\p@} +\setlength{\footnotesep}{\baselineskip} +\RequirePackage{fancyhdr} +\pagestyle{fancy} +\renewcommand{\headrule}{} +\renewcommand{\footrule}{\vbox to 0pt{\hbox to\headwidth{\color{quantumgray}\leaders\hrule\hfil}\vss}} +\fancyhf{} + +\pagenumbering{arabic} +\raggedbottom +\onecolumn + +%title +\def\@printtitle{% + {% + \edef\@titleexpanded{\detokenize\expandafter{\@title}}% + \iftoggle{@xstring}% + {\saveexploremode\exploregroups\StrSubstitute{\@titleexpanded}{ }{\%20}[\@titleforurl]\restoreexploremode}% + {\gdef\@titleforurl{\@titleexpanded}}% + \href{https://quantum-journal.org/?s=\@titleforurl\&reason=title-click}{% + \color{quantumviolet}{% + \@printtitletextwithappropriatefontsize\unskip% + }% + }% + }% +} +% In the macro below we compute the appropriate font size of the title. +% We use \Huge if the title fits on one line and \huge if it extends over more +% than one line in font size \Huge +\def\@titleatfontsize#1{% + #1% + \begingroup% + \raggedright% + \def\selectfont{\ClassError{quantumview}{When submitting to Quantum, you are not supposed to use \string\textbf{}, \string\bf, \string\textit{} or other font formating commands inside \string\title{}. Please remove all such commands from your \string\title{}. If you really have to change the font for some part of the title you can turn off this error by giving the option allowfontchangeintitle}{}}%solution from https://tex.stackexchange.com/questions/347596/disallowing-textbf-it-sffamily-in-argument-of-macro-or-environment + \@title% + \endgroup% +}% + +\def\@printtitletextwithappropriatefontsize{% + \newsavebox{\@titelsaveboxHuge}% + \savebox{\@titelsaveboxHuge}{% + \parbox[b]{\linewidth}{% + \@titleatfontsize{\Huge}% + }% + }% + \newsavebox{\@titelsaveboxHugeoneline}% + \savebox{\@titelsaveboxHugeoneline}{% + \@titleatfontsize{\Huge}% + }% + \newsavebox{\@titelsaveboxhhuge}% + \savebox{\@titelsaveboxhhuge}{% + \parbox[b]{\linewidth}{% + \@titleatfontsize{\huge}% + }% + }% + \ifdimgreater{\ht\@titelsaveboxHuge}{\ht\@titelsaveboxHugeoneline} + {\@titleatfontsize{\huge}%\usebox{\@titelsaveboxhhuge}% using huge because \the\ht\@titelsaveboxHuge{} is larger than \the\ht\@titelsaveboxHugeoneline{} + } + {\@titleatfontsize{\Huge}% using Huge because \the\ht\@titelsaveboxHuge{} is not larger than \the\ht\@titelsaveboxHugeoneline{} + } +} + +%renew \title to allow for and ignore an optional argument +\renewcommand{\title}[2][]{\gdef\@title{#2}} +% author handling +\newcounter{@authorcounter} +\csdef{@authors}{} +\renewcommand{\author}[2][]{% + \ifstrempty{#1}{% + \internal@author{#2}% + }{% + \internal@elseauthor{#1}{#2} + }% + \csdef{@authorname\the@authorcounter}{#2}% + \def\@currentauthornumber{\the@authorcounter}% +}% +\def\addauthortolabel#1#2{% + \ifcsdef{authorswithlabel#2}{}{\csdef{authorswithlabel#2}{}}% + \listcsxadd{authorswithlabel#2}{#1}}% +\def\internal@elseauthor#1#2{% + \stepcounter{@authorcounter} + \ifcsdef{@authors}{}{\csdef{@authors}{}}% + \listadd{\@authors}{#2}% + \forcsvlist{\addauthortolabel{\the@authorcounter}}{#1}% + \ifbool{@startnewauthorgroup}{\csundef{@authorgroup}}{}% + \ifcsdef{@authorgroup}{}{\csdef{@authorgroup}{}}% + \listxadd{\@authorgroup}{\the@authorcounter}% + \boolfalse{@startnewauthorgroup}% +}% +\def\internal@author#1{% + \stepcounter{@authorcounter} + \ifcsdef{@authors}{}{\csdef{@authors}{}}% + \listadd{\@authors}{#1}% + \ifbool{@startnewauthorgroup}{\csundef{@authorgroup}}{} + \ifcsdef{@authorgroup}{}{\csdef{@authorgroup}{}}% + \listxadd{\@authorgroup}{\the@authorcounter} + \boolfalse{@startnewauthorgroup} +} +\def\@@spaceafter#1{#1 } +\def\@@@comma{\def\@@@comma{,}} +\def\@@commaspacebefore#1{\@@@comma{}#1} +\def\@printauthor#1#2{\def\footnote{\ClassError{quantumview}{You must not put a \string\footnote{} command inside the argument of \string\author}{}}\mbox{\ifcsdef{author#1orcid}{\href{https://orcid.org/\csname author#1orcid\endcsname}{\color{black}#2}}{#2}}\ifnumcomp{\the@affiliationcounter}{>}{1}{\textsuperscript{\forlistcsloop{\@@commaspacebefore}{author#1affiliations}\unskip}}{}\ifnumcomp{#1}{<}{\the@authorcounter-1}{, }{\ifnumcomp{#1}{=}{\the@authorcounter-1}{\ifnumcomp{#1}{=}{1}{ and }{, and }}{}}} +\def\@printauthors{% + \newcounter{@authornum}% + \large\forlistloop{\stepcounter{@authornum}% + \ifcsdef{author\the@authornum hasextras}{% + \insert\footins{\footnotesize% + % \interlinepenalty\interfootnotelinepenalty + % \splittopskip\footnotesep + % \splitmaxdepth \dp\strutbox \floatingpenalty \@MM + \hsize\dimexpr \linewidth\relax \@parboxrestore% + % \flushleft% + % \baselineskip=0pt% + \@printauthorextrainfo{\the@authornum}\vspace{0.5\baselineskip}% + }}{}% + \@printauthor\the@authornum}{\@authors}% +} +\def\@@addcommabetween#1{#1, }%this adds an ugly extra comma at the end but the variant below is not expandable and therefore leads to ugly warnings: https://tex.stackexchange.com/questions/50978/macro-to-extract-typeset-plain-text-from-a-command +%\def\@@addcommabetween#1{\ifdef{\firstauthoronly}{, }{\def\firstauthoronly{\empty}}#1} +\def\@authorsonly{\forlistloop{\@@addcommabetween}{\@authors}} +% affiliation handling +\newbool{@startnewauthorgroup} +\newcounter{@affiliationcounter} +\def\@addaffiliation#1#2{ + \ifcsdef{author#2affiliations}{}{\csdef{author#2affiliations}{}}% + \listcsgadd{author#2affiliations}{#1} +} +\newcommand{\address}[2][]{\affiliation[#1]{#2}} + +%for compatibility with authblk +\newcommand{\affil}[2][]{ + \affiliation[#1]{#2}} +\newcommand{\affiliation}[2][]{% + \ifstrempty{#1}{% + \internal@affiliation{#2}% + }{% + \elseinternal@affiliation{#1}{#2} + }}% +\def\elseinternal@affiliation#1#2{% + \booltrue{@startnewauthorgroup} + \ifcsdef{affiliations}{}{\csdef{affiliations}{}}% + \expandafter\def\csname\detokenize{#2}\endcsname{#2}% + \stepcounter{@affiliationcounter}% + \listxadd{\affiliations}{\iftoggle{@html}{#2}{\detokenize{#2}}}% + \csxdef{affiliation\detokenize{#2}number}{\the@affiliationcounter{}}% + \ifcsdef{authorswithlabel#1}{% + \forlistcsloop{\@addaffiliation{\csname affiliation\detokenize{#2}number\endcsname}}{authorswithlabel#1}% + }{}% +} +\def\internal@affiliation#1{% + \booltrue{@startnewauthorgroup} + \ifcsdef{affiliations}{}{\csdef{affiliations}{}}% + \expandafter\def\csname\detokenize{#1}\endcsname{#1} %to handle special characters such as \'a and \l we create a macro whose name is the detokenized version of #1 and that expands to #1 and later call it in \@printaffiliation + \xifinlist{\detokenize{#1}}{\affiliations}{}{\stepcounter{@affiliationcounter}\listxadd{\affiliations}{\iftoggle{@html}{#1}{\detokenize{#1}}}\csxdef{affiliation\detokenize{#1}number}{\the@affiliationcounter{}}}% + \forlistloop{\@addaffiliation{\csname affiliation\detokenize{#1}number\endcsname}}{\@authorgroup}% +} +\def\@printaffiliation#1#2{\ifnumcomp{\the@affiliationcounter}{>}{1}{\llap{\textsuperscript{#1}}}{}\csname #2\endcsname\ifnumcomp{#1}{<}{\the@affiliationcounter}{\newline}{}} +\def\@printaffiliations{% + \ifcsdef{affiliations}{}{\csdef{affiliations}{}}% + \newcounter{@affiliationnum}% + \ifnumcomp{\the@affiliationcounter}{>}{1}{% + \settowidth{\leftskip}{\footnotesize\textsuperscript{\the@affiliationcounter}}% + }{}% + {\footnotesize\color{quantumgray}% + \forlistloop{\stepcounter{@affiliationnum}\@printaffiliation\the@affiliationnum}{\affiliations}}% +} +%collaboration and altaffiliation +\newcommand{\collaboration}[1]{\author{#1}} +\newcommand{\altaffiliation}[2][]{\affiliation{#1#2}} + +% email, homepage, and thanks handling +% be careful - this section is highly sensitive to the positioning of the % marks +\def\@printauthorextrainfo#1{ + \csname @authorname#1\endcsname: + \ifcsdef{author#1emails} + {% + \forlistcsloop{\@@spaceafter}{author#1emails}% + } + {}% + \ifcsdef{author#1homepages} + {% + \ifcsdef{author#1emails} + {\unskip, } + {}% + \forlistcsloop{\@@spaceafter}{author#1homepages}% + } + {}% + \ifcsdef{author#1thanks} + {% + \ifcsdef{author#1emails} + {% + \ifcsdef{author#1homepages} + {\unskip, } + {\unskip, }% + } + {% + \ifcsdef{author#1homepages} + {\unskip, } + {}% + }% + \forlistcsloop{\@@spaceafter}{author#1thanks}% + } + {}% +} + +\newcommand{\email}[2][]{% + \ifcsdef{@currentauthornumber}{}{\ClassError{quantumview}{\string\email{} may only appear after the first \string\author{} command}{}} + \@email{#1}{\href{mailto:#2}{#2}}} +\newcommand{\homepage}[2][]{% + \ifcsdef{@currentauthornumber}{}{\ClassError{quantumview}{\string\homepage{} may only appear after the first \string\author{} command}{}} + \@homepage{#1}{\href{#2}{#2}}} +\renewcommand{\thanks}[2][]{% + \ifcsdef{@currentauthornumber}{}{\ClassError{quantumview}{\string\thanks{} may only appear after the first \string\author{} command}{}} + \@thanks{#1}{#2}} +\newcommand{\orcid}[2][]{% + \ifcsdef{@currentauthornumber}{}{\ClassError{quantumview}{\string\orcid{} may only appear after the first \string\author{} command}{}} + \@orcid{#1}{#2}} +\def\@email#1#2{%} + \@addemail{#1#2}{\@currentauthornumber} + \csdef{author\@currentauthornumber hasextras}{} +} +\def\@homepage#1#2{% + \ifcsdef{@currentauthornumber}{}{\def\@currentauthornumber{0}}%in case \homepage is called before the first author + \@addhomepage{#1#2}{\@currentauthornumber} + \csdef{author\@currentauthornumber hasextras}{} +} +\def\@thanks#1#2{% + \ifcsdef{@currentauthornumber}{}{\def\@currentauthornumber{0}}%in case \thanks is called before the first author + \@addthanks{#1#2}{\@currentauthornumber} + \csdef{author\@currentauthornumber hasextras}{} +} +\def\@orcid#1#2{% + \ifcsdef{@currentauthornumber}{}{\def\@currentauthornumber{0}}%in case \orcid is called before the first author + \@addorcid{#1#2}{\@currentauthornumber} +} +\def\@addemail#1#2{ + \ifcsdef{author#2emails}{}{\csdef{author#2emails}{}}% + \listcsgadd{author#2emails}{#1} +} +\def\@addhomepage#1#2{ + \ifcsdef{author#2homepages}{}{\csdef{author#2homepages}{}}% + \listcsgadd{author#2homepages}{#1} +} +\def\@addthanks#1#2{ + \ifcsdef{author#2thanks}{}{\csdef{author#2thanks}{}}% + \listcsgadd{author#2thanks}{#1} +} +\def\@addorcid#1#2{ + \csdef{author#2orcid}{#1}% +} + +\newtoggle{@tikz} +\IfFileExists{tikz.sty}{\toggletrue{@tikz}}{\togglefalse{@tikz}} + +\newtoggle{@xstring} +\IfFileExists{xstring.sty}{\toggletrue{@xstring}}{\togglefalse{@xstring}} + +\AtBeginDocument{ + \iftoggle{@xstring} + {\RequirePackage{xstring}} + {} + \iftoggle{@tikz} + {% + \RequirePackage{tikz} + \usetikzlibrary{calc} + \newlength{\@eQ}%Capital Q height + \newlength{\@w}%line width + \newlength{\@rl}%rounding length + \newlength{\@cw}%character width + \newlength{\@ch}%lower case character height + \newlength{\@cr}%corner radius + \newlength{\@sl}%<> slant + \newlength{\@xt}%<> x thickeness + + \DeclareRobustCommand{\Quantum}{% + {\sffamily%\color{quantumviolet}% + \setlength{\@eQ}{\dimexpr\fontcharht\font`Q\relax}% + \setlength{\@w}{0.088\@eQ}% + \setlength{\@rl}{0.2\@eQ}% + \setlength{\@cw}{0.5\@eQ}% + \setlength{\@ch}{0.65\@eQ}% + \setlength{\@cr}{0.3\@w}% + \setlength{\@sl}{0.22\@eQ}% + \setlength{\@xt}{1.113588507968435\@w}%=math.sqrt(1/(1-pow(22./50.,2)))*\@w + \tikz[baseline,x=\@eQ,y=\@eQ,every node/.append style={fill=none,inner sep=0pt,outer sep=0pt,node distance=0},rounded corners=\@cr]{% + % <> leg in back + % \fill[] (0,0.5) -- ++(\@sl,0.5) -- ++(\@xt,0) -- ++(-\@sl,-0.5) -- ++(\@sl,-0.5) -- ++(-\@xt,0) -- cycle; + % \fill[xshift=.95\@eQ] (0,0.5) node (eastend) {} -- ++(-\@sl,0.5) -- ++(-\@xt,0) -- ++(\@sl,-0.5) -- ++(-\@sl,-0.5) -- ++(\@xt,0) -- cycle; + % \begin{scope} + % \clip[xshift=.95\@eQ,overlay] (0.5\@xt,0.5) -- ++(-\@sl,-0.5) -- (0,0) -- (0.5\@xt,0.5) ++(-2\@xt,0) -- ++(-\@sl,-0.5) -- ($(-2*\@sl,0)$) -- ++(\@sl,0.5) --cycle; + % \fill[xshift=.95\@eQ] (0,0) -- ++(-\@sl,0.5) -- ++(-\@xt,0) -- ++(\@sl,-0.5) -- cycle; + % \end{scope} + \node[overlay,anchor=base west,opacity=0] {Q}; + % <> leg in front + \fill[] (0,0.5) -- ++(\@sl,0.5) -- ++(\@xt,0) -- ++(-\@sl,-0.5) -- ++(\@sl,-0.5) -- ++(-\@xt,0) -- cycle; + \begin{scope}[xshift=\@eQ] + \fill (0,0) -- ++(-\@sl,0.5) -- ++(-\@xt,0) -- ++(\@sl,-0.5) -- cycle; + \clip[overlay,rounded corners=0] (-1.34\@xt,0) -- ++(-\@sl,0.5) -- ++(0,-0.5) -- cycle (0.34\@xt,0) -- ++($2*(-\@sl,0.5)$) -- (0.5\@xt,1) --cycle; + \fill (0,0.5) node (eastend) {} -- ++(-\@sl,0.5) -- ++(-\@xt,0) -- ++(\@sl,-0.5) -- ++(-\@sl,-0.5) -- ++(\@xt,0) -- cycle; + \end{scope} + % u + \def\@u##1{% + \fill[##1] (0,\@ch) -- (0,1.06\@rl) to[out=-90,in=184,looseness=1.2,overlay] ($(\@cw-\@w,0)$) -- ($(\@cw,0)$) -- ++(0,\@ch) -- ++(-\@w,0) -- ++($(0,-\@ch) + (0,\@w)$) -- ($(\@cw-\@w,\@w)$) to[out=184,in=-90,looseness=1.1] ($(\@w,1.06\@rl)$) -- (\@w,\@ch) --cycle;} + \@u{shift={($(current bounding box.south east)+(0.172\@eQ,0)$)}} + \node[overlay,anchor=base east,opacity=0] at (current bounding box.south east) {u}; + % a + \fill[shift={($(current bounding box.south east)+(0.110\@eQ,0)$)}] (\@cw,0) -- ++($(0,\@ch)-(0,\@rl)$) to[out=90,in=0,looseness=1.22] ++($(-1.22\@rl,\@rl)$) -- ($(\@w,\@ch)$) -- ++(0,-\@w) -- ($(1.22\@rl,\@ch-\@w)$) to[out=0,in=90,looseness=1.3,rounded corners=0] ($(\@cw,\@ch)-(\@w,\@rl)$) -- ($(\@cw,0)-(\@w,-\@w)$) -- + ($(\@rl,\@w)$) to[out=180,in=-100,looseness=0.95,rounded corners=0] ($(1.05\@w,0.33\@ch)$) to[out=80,in=176,looseness=1.0] ($(\@cw-\@w,0.47\@ch)$) to[rounded corners=0] ++(0,-\@cr) to[rounded corners=0] ++($(0,\@cr+\@w)$) to[out=176,in=0] ($(1.2\@rl,0.48\@ch)+(0,\@w)$) to[out=180,in=90,rounded corners=0] ($(0.05\@w,0.33\@ch)$) to[out=-90,in=180,looseness=1.1,rounded corners=0] ($(\@rl,0)$) -- cycle; + \node[overlay,anchor=base east,opacity=0] at (current bounding box.south east) {a}; + % \fill[shift={($(current bounding box.south east)+(0.110\@eQ,0)$)}] (\@cw,0) -- ++($(0,\@ch)-(0,\@rl)$) to[out=90,in=0,looseness=1.22] ++($(-1.22\@rl,\@rl)$) -- ($(\@w,\@ch-0.1\@w)$) -- ++(0.1\@w,-\@w) -- ($(1.22\@rl,\@ch-\@w)$) to[out=0,in=90,looseness=1.3,rounded corners=0] ($(\@cw,\@ch)-(\@w,\@rl)$) -- ($(\@cw,0)-(\@w,-\@w)$) -- + % ($(\@rl,\@w)$) to[out=180,in=-100,looseness=0.95,rounded corners=0] ($(1.05\@w,0.33\@ch)$) to[out=80,in=176,looseness=1.0] ($(\@cw-\@w,0.47\@ch)$) to[rounded corners=0] ++(0,-\@cr) to[rounded corners=0] ++($(0,\@cr+\@w)$) to[out=176,in=0] ($(1.2\@rl,0.48\@ch)+(0,\@w)$) to[out=180,in=90,rounded corners=0] ($(0.05\@w,0.33\@ch)$) to[out=-90,in=180,looseness=1.1,rounded corners=0] ($(\@rl,0)$) -- cycle; + % \node[overlay,anchor=base east,opacity=0] at (current bounding box.south east) {a}; + %n + \fill[shift={($(current bounding box.south east)+(0.181\@eQ+\@cw,\@ch)$)},rotate=180] (0,\@ch) -- (0,\@rl) to[out=-90,in=180,looseness=1.22] ($(1.2\@rl,0)$) -- (\@cw,0) -- ++(0,\@ch) -- ++(-\@w,0) -- ++($(0,-\@ch) + (0,1.05\@w)$) to[out=182,in=-90,looseness=1.04] ($(\@w,\@rl)$) -- (\@w,\@ch) --cycle; + \node[overlay,anchor=base east,opacity=0] at (current bounding box.south east) {n}; + % t + \fill[shift={($(current bounding box.south east)+(0.111\@eQ,0)$)}] + (\@w,0.9) [rounded corners=0] -- (\@w,\@ch) [rounded corners=\@cr] -- (0,\@ch) -- ++(0,-\@w) to[rounded corners=0] ++(\@w,0) -- (\@w,\@rl) to[out=-90,in=180,looseness=1.3,overlay] ($(\@w+\@rl,-0.07\@w)$) to[overlay] ++($(0.64\@cw-\@w-\@rl,0)$) -- ++(0,\@w) -- ++($(\@w+\@rl-0.64\@cw,0)$) to[out=180,in=-90,looseness=1.4] ($(2\@w,\@rl)$) -- ++($(0,\@ch-\@rl-\@w)$) -- ($(0.64\@cw,\@ch-\@w)$) -- ++(0,\@w) to[rounded corners=0] (2\@w,\@ch) -- ($(2\@w,0.9)$) --cycle; + \node[overlay,anchor=base east,opacity=0] at (current bounding box.south east) {t}; + % u + \@u{shift={($(current bounding box.south east)+(0.125\@eQ,0)$)}} + % \fill[shift={($(current bounding box.south east)+(0.125\@eQ,0)$)}] (0,\@ch) -- (0,\@rl) to[out=-90,in=180] ($(\@rl,0)$) -- (\@cw,0) -- ++(0,\@ch) -- ++(-\@w,0) -- ++($(0,-\@ch) + (0,\@w)$) -- ($(\@rl,\@w)$) to[out=180,in=-90] ($(\@w,\@rl)$) -- (\@w,\@ch) --cycle; + \node[overlay,anchor=base east,opacity=0] at (current bounding box.south east) {u}; + % m + \fill[shift={($(current bounding box.south east)+(0.16\@eQ+1.93*\@cw-\@w,\@ch)$)},rotate=180] (0,\@ch) -- (0,\@rl) to[out=-90,in=180,looseness=1.2] ($(1.2\@rl,0)$) -- ($(1.93\@cw,0)-(\@w,0)$) -- ++(0,\@ch) -- ++(-\@w,0) -- ++($(0,-\@ch) + (0,1.05\@w)$) to[out=184,in=-4] ($(0.97\@cw,1.05\@w)+(0,0)$) -- ++($(0,-1.05\@w)+(0,\@ch)$) -- ++($(-\@w,0)$) -- ++($(0,-\@ch)+(0,1.05\@w)$) to[out=182,in=-90,looseness=1.04] ($(\@w,\@rl)$) -- (\@w,\@ch) --cycle; + \node[overlay,anchor=base east,opacity=0] at (current bounding box.south east) {m}; + }}} + } + {% + \ClassWarning{quantumview}{The tikz package could not be found and the \string\Quantum command will not produce the Quantum logo, but fall back to outputting simply the text Quantum.} + \DeclareRobustCommand{\Quantum}{Quantum} + } +} +%elsearticle style extra header information +\newcommand{\ead}[2][]{ + \ifstrempty{#1}{ + \email{#2} + }{ + \iftoggle{@xstring} + {\IfStrEq{#1}{url}{\homepage{#2}}{\email{#2}}} + {email{#2}} + } +} +\AtEndPreamble{ + \providecommand{\@elsearticlecommandsnotsupportederror}{\ClassError{quantumview}{The elsearticle style \string\cortext{}, \string\corref{}, \string\fntext{}, \string\fnref{}, \string\tnotetext{}, and \string\tnoteref{} commands are not supported by quantumview. Please refrain from using footnotes in the title part of your document and use the \string\tahnks{} command for author footnotes instead.}{}} + \providecommand{\cortext}[2][]{\@elsearticlecommandsnotsupportederror} %corresponding author information + \providecommand{\corref}[1]{\@elsearticlecommandsnotsupportederror} %corresponding author information reference + \providecommand{\fntext}[2][]{\@elsearticlecommandsnotsupportederror} %author footnote + \providecommand{\fnref}[1]{\@elsearticlecommandsnotsupportederror} %author footnot reference + \providecommand{\tnotetext}[2][]{\@elsearticlecommandsnotsupportederror} %title footnote + \providecommand{\tnoteref}[1]{\@elsearticlecommandsnotsupportederror} %title footnote reference +} + +% set default options for hyperref to make links more pretty +\PassOptionsToPackage{colorlinks=true,hyperindex}{hyperref} + +\PassOptionsToPackage{allcolors=quantumviolet}{hyperref} + +%enable DOIs if biblatex is used by default +\PassOptionsToPackage{doi=true}{biblatex} + +\AtBeginDocument{% + + \RequirePackage{hyperref}% + + \@ifpackageloaded{natbib}{% + \setlength{\bibsep}{0pt plus 0.3ex} + \@ifpackageloaded{doi}{}{% + \providecommand{\doi}[1]{} + \renewcommand{\doi}[1]{\href{https://doi.org/\detokenize{#1}}{DOI: \detokenize{#1}}}% + }% + }{% + \@ifpackageloaded{biblatex}{ + \DeclareFieldFormat{doi}{\mkbibacro{DOI}\addcolon\space\href{https://doi.org/\detokenize{#1}}{\detokenize{#1}}} + \setcounter{biburllcpenalty}{1000} + \setcounter{biburlucpenalty}{1000} + \setcounter{biburlnumpenalty}{1000} + }{}% + } +} + +\def\@keywords{} +\providecommand{\keywords}{} +\renewcommand{\keywords}[1]{\def\@keywords{#1}} + +\newenvironment{acknowledgements}{\section*{Acknowledgements}}{} + +\AtBeginDocument{% + \providecommand\text[1]{ + \ClassError{quantumview}{To use the \string\text{} command please load the mathtools package}{} + } +} + +\PassOptionsToPackage{font={small,sf}}{caption} + +\AtEndPreamble{ + \RequirePackage{caption} +} + +\begingroup +\catcode`\$=\active +\protected\gdef$#1${\$\detokenize{#1}\$} +\endgroup + +\iftoggle{@html}{ + \AtBeginDocument{\catcode`\$=\active} +}{} + +\endinput +%% +%% End of file `quantumview.cls'. -- cgit v1.2.3