%% =========================================================================== %% pubarx.cls -- LaTeX class for PubArx preprints %% Version 1.0 (2026-10-29) %% %% A refined two-column layout for research papers posted on PubArx %% (https://pubarx.com): a full-width title block with ORCID-linked authors, %% a tinted abstract panel, colour-accented headings, booktabs-friendly %% tables, numbered natbib citations and complete PDF metadata, which %% Google Scholar and other indexers read. %% %% Engine: pdfLaTeX + BibTeX (on Overleaf: Menu > Compiler > pdfLaTeX). %% Manual: README.md. Worked example: main.tex. %% %% Licence: MIT No Attribution (MIT-0). Use, change and share this file %% freely, for any paper, without keeping this notice. See LICENSE. %% =========================================================================== \NeedsTeXFormat{LaTeX2e}[2020/10/01] \ProvidesClass{pubarx}[2026/10/29 v1.0 PubArx preprint class] %% --------------------------------------------------------------------------- %% 1. Class options %% %% a4paper (default) | letterpaper paper size %% twocolumn (default) | onecolumn page layout %% 10pt | 11pt | 12pt body size (default: 10pt in two %% columns, 11pt in one column) %% font=libertinus | newtx | lm typeface (default libertinus); the %% bare words libertinus, newtx and lm %% work as options too %% review line numbers and wider line spacing %% columnrule thin rule between the two columns %% nologo no PubArx band on the first page %% notheorems do not predefine theorem environments %% %% Any other option (draft, fleqn, leqno, ...) is passed to article.cls. %% --------------------------------------------------------------------------- \RequirePackage{kvoptions} \SetupKeyvalOptions{family=pubarx,prefix=pubarx@} \DeclareStringOption[libertinus]{font} \DeclareVoidOption{libertinus}{\def\pubarx@font{libertinus}} \DeclareVoidOption{newtx}{\def\pubarx@font{newtx}} \DeclareVoidOption{lm}{\def\pubarx@font{lm}} \DeclareBoolOption{review} \DeclareBoolOption{columnrule} \DeclareBoolOption{nologo} \DeclareBoolOption{notheorems} \newif\ifpubarx@twocol \pubarx@twocoltrue \DeclareVoidOption{twocolumn}{\pubarx@twocoltrue} \DeclareVoidOption{onecolumn}{\pubarx@twocolfalse} \def\pubarx@paper{a4paper} \DeclareVoidOption{a4paper}{\def\pubarx@paper{a4paper}} \DeclareVoidOption{letterpaper}{\def\pubarx@paper{letterpaper}} \def\pubarx@ptsize{} \DeclareVoidOption{10pt}{\def\pubarx@ptsize{10pt}} \DeclareVoidOption{11pt}{\def\pubarx@ptsize{11pt}} \DeclareVoidOption{12pt}{\def\pubarx@ptsize{12pt}} \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{article}} \ProcessKeyvalOptions* %% --------------------------------------------------------------------------- %% 2. Base class %% --------------------------------------------------------------------------- \ifx\pubarx@ptsize\@empty \ifpubarx@twocol \def\pubarx@ptsize{10pt} \else \def\pubarx@ptsize{11pt} \fi \fi \ifpubarx@twocol \def\pubarx@columns{twocolumn} \else \def\pubarx@columns{onecolumn} \fi \edef\pubarx@loadclass{% \noexpand\LoadClass[\pubarx@paper,\pubarx@ptsize,\pubarx@columns]{article}} \pubarx@loadclass %% --------------------------------------------------------------------------- %% 3. Encoding, mathematics and fonts %% %% Libertinus is the default: an elegant, open-source book face with true %% small capitals, a matching sans for headings and a full maths font, so %% papers look distinctive without looking unusual. newtx (Times-like) is %% the conservative alternative many journals expect; lm (Latin Modern) %% is the safety net that every TeX installation has. If a requested font %% is not installed, the class falls back to the next one with a warning. %% %% amsthm must be loaded before newtxmath / libertinust1math, and amssymb %% is only needed for Latin Modern (the other two provide its symbols). %% --------------------------------------------------------------------------- \RequirePackage{iftex} \ifPDFTeX \RequirePackage[utf8]{inputenc}% no-op on current LaTeX, harmless before \fi \RequirePackage[T1]{fontenc} \RequirePackage{amsmath} \RequirePackage{amsthm} \def\pubarx@f@libertinus{libertinus} \def\pubarx@f@newtx{newtx} \def\pubarx@f@lm{lm} \edef\pubarx@fontchoice{\pubarx@font} % Normalise the option value. \ifx\pubarx@fontchoice\pubarx@f@newtx\else \ifx\pubarx@fontchoice\pubarx@f@lm\else \ifx\pubarx@fontchoice\pubarx@f@libertinus\else \ClassWarningNoLine{pubarx}{Unknown font `\pubarx@fontchoice'.\MessageBreak Use font=libertinus, newtx or lm. Using Libertinus}% \fi \let\pubarx@fontchoice\pubarx@f@libertinus \fi \fi % Fall back gracefully when a font is not installed. \newif\ifpubarx@fontfound \ifx\pubarx@fontchoice\pubarx@f@libertinus \IfFileExists{libertinus-type1.sty}{\pubarx@fontfoundtrue}{\pubarx@fontfoundfalse} \ifpubarx@fontfound \IfFileExists{libertinust1math.sty}{}{\pubarx@fontfoundfalse} \fi \ifpubarx@fontfound\else \ClassWarningNoLine{pubarx}{Libertinus fonts not found. Using newtx}% \let\pubarx@fontchoice\pubarx@f@newtx \fi \fi \ifx\pubarx@fontchoice\pubarx@f@newtx \IfFileExists{newtxtext.sty}{\pubarx@fontfoundtrue}{\pubarx@fontfoundfalse} \ifpubarx@fontfound \IfFileExists{newtxmath.sty}{}{\pubarx@fontfoundfalse} \fi \ifpubarx@fontfound\else \ClassWarningNoLine{pubarx}{newtx fonts not found. Using Latin Modern}% \let\pubarx@fontchoice\pubarx@f@lm \fi \fi \ifx\pubarx@fontchoice\pubarx@f@libertinus \RequirePackage{libertinus-type1} \RequirePackage{libertinust1math} \else \ifx\pubarx@fontchoice\pubarx@f@newtx \RequirePackage{newtxtext} \RequirePackage{newtxmath} \else \RequirePackage{lmodern} \RequirePackage{amssymb} \fi \fi % newtxmath and libertinust1math already define every amssymb symbol, and % loading amssymb after them fails. Mark it as loaded so that a habitual % \usepackage{amssymb} in a preamble is accepted and ignored. \ifx\pubarx@fontchoice\pubarx@f@lm\else \@ifpackageloaded{amssymb}{}{% \@namedef{ver@amssymb.sty}{2013/01/14 v3.01 AMS font symbols (from the maths font)}} \fi \RequirePackage{microtype} %% --------------------------------------------------------------------------- %% 4. Colours (usable in your own figures, e.g. draw=pubarxnavy) %% xcolor is loaded with the options papers ask for most often, so that %% \usepackage[dvipsnames]{xcolor} or [table] in a preamble do not clash. %% For other options write \PassOptionsToPackage{...}{xcolor} before %% \documentclass. %% --------------------------------------------------------------------------- \RequirePackage[usenames,dvipsnames,table]{xcolor} \definecolor{pubarxnavy}{HTML}{1E3A6E} \definecolor{pubarxaccent}{HTML}{C2552C} \definecolor{pubarxaccentlight}{HTML}{E98A62} \definecolor{pubarxmuted}{HTML}{4D5668} \definecolor{pubarxrule}{HTML}{CFC9BC} \definecolor{pubarxorcid}{HTML}{A6CE39} \colorlet{pubarxtint}{pubarxnavy!6} \colorlet{pubarxwarm}{pubarxaccent!7} \colorlet{pubarxbandmuted}{white!70!pubarxnavy} %% --------------------------------------------------------------------------- %% 5. Page layout %% --------------------------------------------------------------------------- \RequirePackage{graphicx} \RequirePackage{geometry} \def\pubarx@letter{letterpaper} \ifx\pubarx@paper\pubarx@letter \geometry{letterpaper} \else \geometry{a4paper} \fi \ifpubarx@twocol \geometry{hmargin=17mm,top=24mm,bottom=25mm,headheight=14pt,headsep=6mm, footskip=11mm,columnsep=6.5mm,heightrounded} \else \geometry{hmargin=31mm,top=27mm,bottom=27mm,headheight=14pt,headsep=7mm, footskip=12mm,heightrounded} \fi \ifpubarx@columnrule \setlength\columnseprule{0.4pt} \providecommand\columnseprulecolor{} \renewcommand\columnseprulecolor{\color{pubarxrule}} \fi % Calm, even paragraphs in narrow columns. \frenchspacing \clubpenalty=3000 \widowpenalty=3000 \displaywidowpenalty=1500 \tolerance=2000 \emergencystretch=1.5em \ifpubarx@review \linespread{1.5} \fi % Let floats sit at the top of columns instead of piling up at the end. \renewcommand\topfraction{0.85} \renewcommand\bottomfraction{0.5} \renewcommand\textfraction{0.12} \renewcommand\floatpagefraction{0.8} \renewcommand\dbltopfraction{0.85} \renewcommand\dblfloatpagefraction{0.8} \setcounter{topnumber}{3} \setcounter{bottomnumber}{2} \setcounter{totalnumber}{4} \setcounter{dbltopnumber}{2} \renewcommand\footnoterule{% \kern-3\p@{\color{pubarxrule}\hrule\@width.3\columnwidth}\kern2.6\p@} %% --------------------------------------------------------------------------- %% 6. Section headings: navy sans-serif titles, terracotta numbers %% --------------------------------------------------------------------------- \RequirePackage{titlesec} \newcommand\pubarx@headingfont{\normalfont\sffamily\bfseries\color{pubarxnavy}} \titleformat{\section} {\pubarx@headingfont\large\filright} {\textcolor{pubarxaccent}{\thesection}}{0.6em}{} \titleformat{\subsection} {\pubarx@headingfont\normalsize\filright} {\textcolor{pubarxaccent}{\thesubsection}}{0.55em}{} \titleformat{\subsubsection} {\normalfont\normalsize\itshape\color{pubarxnavy}\filright} {\thesubsubsection}{0.5em}{} \titleformat{\paragraph}[runin] {\normalfont\normalsize\bfseries\color{pubarxnavy}} {\theparagraph}{0.5em}{} \titlespacing*{\section}{0pt}{3ex plus 1ex minus .4ex}{1.2ex plus .3ex} \titlespacing*{\subsection}{0pt}{2.2ex plus .8ex minus .3ex}{0.8ex plus .2ex} \titlespacing*{\subsubsection}{0pt}{1.8ex plus .6ex minus .3ex}{0.5ex plus .2ex} \titlespacing*{\paragraph}{0pt}{1.4ex plus .5ex minus .2ex}{0.8em} % Appendix sections read "Appendix A", "Appendix B", ... \g@addto@macro\appendix{% \titleformat{\section} {\pubarx@headingfont\large\filright} {\textcolor{pubarxaccent}{\appendixname\ \thesection}}{0.6em}{}} %% --------------------------------------------------------------------------- %% 7. Captions, tables and lists %% --------------------------------------------------------------------------- \RequirePackage{booktabs} \RequirePackage{caption} \DeclareCaptionFont{pubarxnavy}{\color{pubarxnavy}} \DeclareCaptionLabelSeparator{pubarxbar}{% \hspace{0.5em}\textcolor{pubarxaccent}{\rule[-0.1em]{0.6pt}{0.85em}}\hspace{0.5em}} \captionsetup{font=small,labelfont={sf,bf,pubarxnavy},labelsep=pubarxbar, justification=justified,singlelinecheck=true,skip=6pt} \captionsetup[table]{position=top} \RequirePackage{enumitem} \setlist{topsep=3pt plus 1pt minus 1pt,partopsep=0pt,itemsep=1.5pt plus 1pt,parsep=0pt} \setlist[itemize]{leftmargin=1.3em} \setlist[itemize,1]{label=\textcolor{pubarxaccent}{\ensuremath{\bullet}}} \setlist[itemize,2]{label=\textcolor{pubarxnavy}{\ensuremath{\circ}}} \setlist[enumerate,1]{font=\sffamily\bfseries\color{pubarxnavy}} %% --------------------------------------------------------------------------- %% 8. Theorems and proofs %% theorem, lemma, proposition, corollary, conjecture (italic body); %% definition, example, assumption (upright); remark (upright, light head). %% They share one counter. Disable them with the notheorems option. %% --------------------------------------------------------------------------- \newtheoremstyle{pubarxplain} {6pt plus 2pt minus 1pt}{6pt plus 2pt minus 1pt} {\itshape}{} {\sffamily\bfseries\color{pubarxnavy}}{.}{0.5em} {\thmname{#1}\thmnumber{ #2}\thmnote{ {\mdseries(#3)}}} \newtheoremstyle{pubarxdefinition} {6pt plus 2pt minus 1pt}{6pt plus 2pt minus 1pt} {\normalfont}{} {\sffamily\bfseries\color{pubarxnavy}}{.}{0.5em} {\thmname{#1}\thmnumber{ #2}\thmnote{ {\mdseries(#3)}}} \newtheoremstyle{pubarxremark} {6pt plus 2pt minus 1pt}{6pt plus 2pt minus 1pt} {\normalfont}{} {\sffamily\itshape\color{pubarxnavy}}{.}{0.5em} {\thmname{#1}\thmnumber{ #2}\thmnote{ (#3)}} \ifpubarx@notheorems\else \theoremstyle{pubarxplain} \newtheorem{theorem}{Theorem} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{conjecture}[theorem]{Conjecture} \theoremstyle{pubarxdefinition} \newtheorem{definition}[theorem]{Definition} \newtheorem{example}[theorem]{Example} \newtheorem{assumption}[theorem]{Assumption} \theoremstyle{pubarxremark} \newtheorem{remark}[theorem]{Remark} \fi % Theorems you define yourself get the plain PubArx style by default. \theoremstyle{pubarxplain} % The amsthm proof environment, with a sans-serif head and a terracotta % end-of-proof square. Use \qedhere to put the square on a display line. \renewenvironment{proof}[1][\proofname]{\par \pushQED{\qed}% \normalfont\topsep6\p@\@plus6\p@\relax \trivlist \item[\hskip\labelsep\sffamily\itshape\color{pubarxnavy}#1\@addpunct{.}]\ignorespaces }{% \popQED\endtrivlist\@endpefalse } \renewcommand\qedsymbol{\textcolor{pubarxaccent}{\rule{0.45em}{0.45em}}} %% --------------------------------------------------------------------------- %% 9. Citations and references: numbered, sorted and compressed ([1-3]). %% Use \citep{key} for [1] and \citet{key} for "Author et al. [1]". %% --------------------------------------------------------------------------- \RequirePackage[numbers,square,comma,sort&compress]{natbib} \setlength\bibsep{2pt plus 1pt minus 0.5pt} \def\bibfont{\small} \def\bibnumfmt#1{\textcolor{pubarxnavy}{[#1]}} \def\bibsection{% \phantomsection\addcontentsline{toc}{section}{\refname}% \section*{\refname}} %% --------------------------------------------------------------------------- %% 10. Review mode: line numbers %% --------------------------------------------------------------------------- \ifpubarx@review \ifpubarx@twocol \RequirePackage[switch]{lineno} \else \RequirePackage{lineno} \fi \renewcommand\linenumberfont{\normalfont\tiny\sffamily\color{pubarxmuted}} \setlength\linenumbersep{8pt} \AtBeginDocument{\linenumbers} \fi %% --------------------------------------------------------------------------- %% 11. Running heads and feet %% First page: licence on the left, "Page 1 of N" on the right. %% Other pages: short title | PubArx identifier; running authors | page. %% --------------------------------------------------------------------------- \RequirePackage{fancyhdr} \RequirePackage{lastpage} %% --------------------------------------------------------------------------- %% 12. Links and PDF metadata (filled in by \maketitle) %% --------------------------------------------------------------------------- \RequirePackage{url} \RequirePackage[hyperfootnotes=false]{hyperref} \hypersetup{ colorlinks=true, linkcolor=pubarxnavy, citecolor=pubarxaccent, urlcolor=pubarxnavy, filecolor=pubarxnavy, bookmarksnumbered=true, bookmarksopen=true, pdfpagemode=UseNone, pdfdisplaydoctitle=true, pdfcreator={LaTeX with the PubArx class v1.0} } \urlstyle{same} \pdfstringdefDisableCommands{% \def\\{ }% \def\and{, }% \let\thanks\@gobble \let\footnote\@gobble \let\textsuperscript\@gobble \let\orcid\@gobble \let\orcidlink\@gobble } % ORCID icons: the orcidlink package draws the official logo. If it is not % installed, a small green "iD" link is used instead. \newif\ifpubarx@orcidlink \IfFileExists{orcidlink.sty}{\pubarx@orcidlinktrue}{\pubarx@orcidlinkfalse} \ifpubarx@orcidlink \RequirePackage{orcidlink} \newcommand\pubarx@orcidlink[1]{\orcidlink{#1}} \else \newcommand\pubarx@orcidlink[1]{% \href{https://orcid.org/#1}{\textcolor{pubarxorcid}{\sffamily\bfseries\scriptsize iD}}} \fi % DOIs in the bibliography become links (unsrtnat and plainnat call \doi). \providecommand*\doi[1]{\href{https://doi.org/#1}{\nolinkurl{https://doi.org/#1}}} % Where identifiers point. Redefine only if PubArx tells you to. \newcommand\pubarxbaseurl{https://pubarx.com} %% --------------------------------------------------------------------------- %% 13. Title-page commands %% --------------------------------------------------------------------------- \newcommand\pubarx@ifblank[3]{% #1: macro; #2: code if empty; #3: otherwise \if\relax\detokenize\expandafter{#1}\relax \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi{#2}{#3}} \newcommand\pubarx@needauthor[1]{% \ClassError{pubarx}{\string#1 must follow an \string\author\space command}% {Write \string#1 directly after the \string\author\space it belongs to.}} % \title[Short title for the running head]{Full title} \def\pubarx@title{} \def\pubarx@shorttitle{} \renewcommand\title[2][]{% \gdef\pubarx@title{#2}% \gdef\@title{#2}% \if\relax\detokenize{#1}\relax \gdef\pubarx@shorttitle{#2}% \else \gdef\pubarx@shorttitle{#1}% \fi} % \author[1,2]{Given Family} -- one command per author, in order; the % optional argument lists affiliation labels. Follow it with \orcid{...}, % \corresponding{email} and \equalcontrib as needed. \newcount\pubarx@nauthors \newcount\pubarx@ncorr \newif\ifpubarx@hasequal \def\pubarx@authors{} \def\pubarx@pdfauthors{} \def\pubarx@currentname{} \def\pubarx@corrlist{} \renewcommand\author[2][]{% \global\advance\pubarx@nauthors\@ne \gdef\pubarx@currentname{#2}% \expandafter\pubarx@addauthor\expandafter{\the\pubarx@nauthors}{#1}{#2}} \newcommand\pubarx@addauthor[3]{% #1: number, #2: labels, #3: name \g@addto@macro\pubarx@authors{\pubarx@authorentry{#1}{#3}{#2}}% \ifnum#1=\@ne \g@addto@macro\pubarx@pdfauthors{#3}% \else \g@addto@macro\pubarx@pdfauthors{, #3}% \fi} \renewcommand\and{\unskip, } \DeclareRobustCommand\orcid[1]{% \ifnum\pubarx@nauthors=\z@ \pubarx@needauthor\orcid \else \expandafter\gdef\csname pubarx@orcid@\the\pubarx@nauthors\endcsname{#1}% \fi} \DeclareRobustCommand\corresponding[1]{% \ifnum\pubarx@nauthors=\z@ \pubarx@needauthor\corresponding \else \global\advance\pubarx@ncorr\@ne \expandafter\gdef\csname pubarx@corr@\the\pubarx@nauthors\endcsname{#1}% \expandafter\pubarx@addcorr\expandafter{\pubarx@currentname}{#1}% \fi} \newcommand\pubarx@addcorr[2]{% \g@addto@macro\pubarx@corrlist{\pubarx@correntry{#1}{#2}}} \DeclareRobustCommand\equalcontrib{% \ifnum\pubarx@nauthors=\z@ \pubarx@needauthor\equalcontrib \else \global\pubarx@hasequaltrue \expandafter\gdef\csname pubarx@equal@\the\pubarx@nauthors\endcsname{}% \fi} % \affiliation[1]{Department, Institution, City, Country} \def\pubarx@affiliations{} \DeclareRobustCommand\affiliation[2][]{% \g@addto@macro\pubarx@affiliations{\pubarx@affentry{#1}{#2}}} \newcommand\address{\affiliation}% for authors coming from elsarticle % \keywords{first keyword, second keyword, ...} \def\pubarx@keywords{} \DeclareRobustCommand\keywords[1]{\gdef\pubarx@keywords{#1}} % PubArx band and metadata \def\pubarx@id{} \def\pubarx@version{} \def\pubarx@fullid{} \def\pubarx@status{Preprint -- not peer reviewed} \def\pubarx@license{CC BY 4.0} \def\pubarx@subject{} % The full identifier ("2026.00042v2") stays empty until \pubarxid is given, % so a lone \pubarxversion never produces a broken "PubArx:v2" link. \newcommand\pubarx@updateid{% \pubarx@ifblank\pubarx@id {\global\let\pubarx@fullid\@empty}% {\pubarx@ifblank\pubarx@version {\global\let\pubarx@fullid\pubarx@id}% {\protected@xdef\pubarx@fullid{\pubarx@id v\pubarx@version}}}} \DeclareRobustCommand\pubarxid[1]{\gdef\pubarx@id{#1}\pubarx@updateid} \DeclareRobustCommand\pubarxversion[1]{\gdef\pubarx@version{#1}\pubarx@updateid} \DeclareRobustCommand\pubarxstatus[1]{\gdef\pubarx@status{#1}} \DeclareRobustCommand\pubarxlicense[1]{\gdef\pubarx@license{#1}} \DeclareRobustCommand\pubarxsubject[1]{\gdef\pubarx@subject{#1}} % Dates and running author line \def\pubarx@received{} \def\pubarx@revised{} \def\pubarx@accepted{} \def\pubarx@posted{} \def\pubarx@runningauthor{} \DeclareRobustCommand\received[1]{\gdef\pubarx@received{#1}} \DeclareRobustCommand\revised[1]{\gdef\pubarx@revised{#1}} \DeclareRobustCommand\accepted[1]{\gdef\pubarx@accepted{#1}} \DeclareRobustCommand\posted[1]{\gdef\pubarx@posted{#1}} \DeclareRobustCommand\runningauthor[1]{\gdef\pubarx@runningauthor{#1}} \providecommand\keywordsname{Keywords} \providecommand\highlightsname{Highlights} % article.cls (unlike report and book) may not define \appendixname, which % the appendix headings use. \providecommand\appendixname{Appendix} %% --------------------------------------------------------------------------- %% 14. Title-block typography %% --------------------------------------------------------------------------- \newcommand\pubarx@leading[1]{\@tempdima=\f@size\p@\baselineskip=#1\@tempdima\relax} \newcommand\pubarx@titlefont{% \normalfont\huge\bfseries\color{pubarxnavy}\raggedright \pubarx@leading{1.12}\hyphenpenalty\@M\exhyphenpenalty\@M} \newcommand\pubarx@authorfont{% \normalfont\large\raggedright\pubarx@leading{1.35}} \newcommand\pubarx@afffont{% \normalfont\footnotesize\color{pubarxmuted}\raggedright\pubarx@leading{1.3}} \newcommand\pubarx@metafont{% \normalfont\sffamily\footnotesize\color{pubarxmuted}\raggedright} \newcommand\pubarx@eyebrowfont{% \normalfont\sffamily\bfseries\scriptsize\color{pubarxaccent}\raggedright} \newcommand\pubarx@labelfont{% \normalfont\sffamily\bfseries\footnotesize\color{pubarxnavy}} \newcommand\pubarx@bandfont{\normalfont\sffamily\footnotesize\color{white}} \newcommand\pubarx@spaced[1]{\textls[60]{#1}} \newcommand\pubarx@corrsymbol{\ensuremath{\ast}} \newcommand\pubarx@equalsymbol{\ensuremath{\dagger}} % Separated lists ("a . b . c") for the band, the eyebrow and the dates. \newif\ifpubarx@listfirst \newif\ifpubarx@hasitems \newcommand\pubarx@liststart{\global\pubarx@listfirsttrue} \newcommand\pubarx@listsep{\unskip\nobreak\hspace{0.5em}\ensuremath{\cdot}\hspace{0.5em}} \newcommand\pubarx@listitem[1]{% \ifpubarx@listfirst\global\pubarx@listfirstfalse\else\pubarx@listsep\fi #1} %% --------------------------------------------------------------------------- %% 15. Title-block pieces %% --------------------------------------------------------------------------- \newsavebox\pubarx@abstractbox \newsavebox\pubarx@highlightsbox \newsavebox\pubarx@tmpbox \newdimen\pubarx@panelpad \newdimen\pubarx@barwidth \pubarx@panelpad=9pt \pubarx@barwidth=2.4pt \newcommand\pubarx@idlink[1]{% #1: text style \href{\pubarxbaseurl/abs/\pubarx@fullid}{#1PubArx:\pubarx@fullid}} % The slim navy band at the top of page 1. \newcommand\pubarx@band{% \par \begingroup \fboxsep\z@ \setbox\pubarx@tmpbox\hbox to\textwidth{% \pubarx@bandfont \vrule\@width\z@\@height1.3em\@depth0.62em\relax \hskip0.9em\relax {\small\bfseries Pub\textcolor{pubarxaccentlight}{Arx}}% \hskip0.6em\relax {\color{pubarxbandmuted}\pubarx@spaced{PREPRINT}}% \hfil \pubarx@liststart \pubarx@ifblank\pubarx@status{}{\pubarx@listitem{\pubarx@status}}% \pubarx@ifblank\pubarx@fullid{}{\pubarx@listitem{\pubarx@idlink{\color{white}}}}% \pubarx@ifblank\pubarx@license{}{\pubarx@listitem{\pubarx@license}}% \hskip0.9em\relax}% \nointerlineskip \hbox{\colorbox{pubarxnavy}{\box\pubarx@tmpbox}}% \nointerlineskip {\color{pubarxaccent}\hrule\@height1.1pt}% \endgroup} % Capitals line above the title: the subject, and with nologo also the % status, identifier and licence that the band would otherwise show. % (User text is not letterspaced: letterspacing would break -- ligatures.) \newcommand\pubarx@eyebrow{% \pubarx@hasitemsfalse \ifpubarx@nologo \pubarx@ifblank\pubarx@status{}{\pubarx@hasitemstrue}% \pubarx@ifblank\pubarx@fullid{}{\pubarx@hasitemstrue}% \pubarx@ifblank\pubarx@license{}{\pubarx@hasitemstrue}% \fi \pubarx@ifblank\pubarx@subject{}{\pubarx@hasitemstrue}% \ifpubarx@hasitems {\pubarx@eyebrowfont \pubarx@liststart \ifpubarx@nologo \pubarx@ifblank\pubarx@status{}% {\pubarx@listitem{\MakeUppercase{\pubarx@status}}}% \pubarx@ifblank\pubarx@fullid{}{\pubarx@listitem{\pubarx@idlink{}}}% \pubarx@ifblank\pubarx@license{}% {\pubarx@listitem{\MakeUppercase{\pubarx@license}}}% \fi \pubarx@ifblank\pubarx@subject{}% {\pubarx@listitem{\MakeUppercase{\pubarx@subject}}}% \par}% \vskip5pt\relax \fi} % One author: name, superscript labels and marks, ORCID icon. \newcommand\pubarx@authorentry[3]{% #1: number, #2: name, #3: labels \ifnum#1>\@ne \ifnum#1=\pubarx@nauthors\space and \else, \fi \fi \mbox{#2\pubarx@marks{#1}{#3}\pubarx@orcidicon{#1}}} \def\pubarx@m{} \newcommand\pubarx@addmark[1]{% \ifx\pubarx@m\@empty \def\pubarx@m{#1}% \else \expandafter\def\expandafter\pubarx@m\expandafter{\pubarx@m,#1}% \fi} \newcommand\pubarx@marks[2]{% #1: author number, #2: affiliation labels \begingroup \def\pubarx@m{}% \if\relax\detokenize{#2}\relax\else\pubarx@addmark{#2}\fi \@ifundefined{pubarx@equal@#1}{}{\pubarx@addmark{\pubarx@equalsymbol}}% \@ifundefined{pubarx@corr@#1}{}{\pubarx@addmark{\pubarx@corrsymbol}}% \ifx\pubarx@m\@empty\else\textsuperscript{\pubarx@m}\fi \endgroup} \newcommand\pubarx@orcidicon[1]{% \@ifundefined{pubarx@orcid@#1}{}{% \edef\pubarx@tmp{\csname pubarx@orcid@#1\endcsname}% \,\expandafter\pubarx@orcidlink\expandafter{\pubarx@tmp}}} % One affiliation per line, with a hanging superscript label. \newcommand\pubarx@affentry[2]{% \par \if\relax\detokenize{#1}\relax \noindent \else \hangindent0.9em\hangafter\@ne \noindent\hb@xt@0.9em{\textsuperscript{#1}\hss}% \fi #2} % Correspondence and equal-contribution notes. \newif\ifpubarx@corrfirst \newcommand\pubarx@correntry[2]{% \ifpubarx@corrfirst\pubarx@corrfirstfalse\else; \fi #1, \href{mailto:#2}{\nolinkurl{#2}}} \newcommand\pubarx@notes{% \pubarx@hasitemsfalse \ifnum\pubarx@ncorr>\z@ \pubarx@hasitemstrue \fi \ifpubarx@hasequal \pubarx@hasitemstrue \fi \ifpubarx@hasitems \par\vskip5pt\relax {\pubarx@metafont \pubarx@liststart \ifnum\pubarx@ncorr>\z@ \pubarx@listitem{\textsuperscript{\pubarx@corrsymbol}\,Corresponding \ifnum\pubarx@ncorr>\@ne authors\else author\fi:\ % \pubarx@corrfirsttrue\pubarx@corrlist}% \fi \ifpubarx@hasequal \pubarx@listitem{\textsuperscript{\pubarx@equalsymbol}\,These authors contributed equally}% \fi \par}% \fi} % Received / Revised / Accepted / Posted \newcommand\pubarx@date[2]{{\bfseries #1}\ #2} \newcommand\pubarx@datesline{% \pubarx@hasitemsfalse \pubarx@ifblank\pubarx@received{}{\pubarx@hasitemstrue}% \pubarx@ifblank\pubarx@revised{}{\pubarx@hasitemstrue}% \pubarx@ifblank\pubarx@accepted{}{\pubarx@hasitemstrue}% \pubarx@ifblank\pubarx@posted{}{\pubarx@hasitemstrue}% \ifpubarx@hasitems \par\vskip2pt\relax {\pubarx@metafont \pubarx@liststart \pubarx@ifblank\pubarx@received{}% {\pubarx@listitem{\pubarx@date{Received}{\pubarx@received}}}% \pubarx@ifblank\pubarx@revised{}% {\pubarx@listitem{\pubarx@date{Revised}{\pubarx@revised}}}% \pubarx@ifblank\pubarx@accepted{}% {\pubarx@listitem{\pubarx@date{Accepted}{\pubarx@accepted}}}% \pubarx@ifblank\pubarx@posted{}% {\pubarx@listitem{\pubarx@date{Posted}{\pubarx@posted}}}% \par}% \fi} %% --------------------------------------------------------------------------- %% 16. Abstract, keywords and highlights panels %% The abstract and highlights environments go before \maketitle; their %% contents are kept in boxes and placed, full width, in the title block. %% --------------------------------------------------------------------------- \newcommand\pubarx@panelsetup{% \hsize\dimexpr\textwidth-\pubarx@barwidth-2\pubarx@panelpad\relax \@parboxrestore \linespread{1}\normalfont\normalsize \tolerance2000\emergencystretch1.5em\relax \parindent\z@} \newcommand\pubarx@paneltitle[1]{% {\noindent\pubarx@labelfont\pubarx@spaced{\MakeUppercase{#1}}\par}% \vskip3.5pt\relax} % \pubarx@panel{tint colour}{bar colour}{vertical material} \newcommand\pubarx@panel[3]{% \par \begingroup \setbox\pubarx@tmpbox\vbox{\pubarx@panelsetup#3\par}% \fboxsep\pubarx@panelpad \nointerlineskip \hbox{{\color{#2}\vrule\@width\pubarx@barwidth}\colorbox{#1}{\box\pubarx@tmpbox}}% \endgroup \par} \newif\ifpubarx@titledone \newcommand\pubarx@lateheading[1]{% \ClassWarning{pubarx}{Place this environment before \string\maketitle\MessageBreak so that it appears in the title block}% \par\addvspace{\medskipamount}% {\noindent\pubarx@labelfont\pubarx@spaced{\MakeUppercase{#1}}\par}% \nobreak\vskip2pt\relax\@afterheading} \renewenvironment{abstract}{% \ifpubarx@titledone \pubarx@lateheading{\abstractname}\small \else \global\setbox\pubarx@abstractbox\vbox\bgroup \color@begingroup \pubarx@panelsetup \pubarx@paneltitle{\abstractname}% \small\parindent1em\relax \noindent \fi \ignorespaces} {% \ifpubarx@titledone \par \else \par \color@endgroup \egroup \fi} \newenvironment{highlights}{% \ifpubarx@titledone \pubarx@lateheading{\highlightsname}\small \else \global\setbox\pubarx@highlightsbox\vbox\bgroup \color@begingroup \pubarx@panelsetup \pubarx@paneltitle{\highlightsname}% \small \fi \begin{itemize}[leftmargin=1.15em,labelsep=0.5em,topsep=0pt,partopsep=0pt, parsep=0pt,itemsep=1.5pt]} {% \end{itemize}% \ifpubarx@titledone \par \else \par \color@endgroup \egroup \fi} \newif\ifpubarx@kwfirst \newcommand\pubarx@kwsep{% \unskip\nobreak\hspace{0.45em}\textcolor{pubarxaccent}{\ensuremath{\cdot}}\hspace{0.45em}} \newcommand\pubarx@printkeywords{% \pubarx@kwfirsttrue \@for\pubarx@kw:=\pubarx@keywords\do{% \ifx\pubarx@kw\@empty\else \ifpubarx@kwfirst\pubarx@kwfirstfalse\else\pubarx@kwsep\fi \ignorespaces\pubarx@kw\unskip \fi}} \newcommand\pubarx@keywordline{% \par {\raggedright\small \noindent{\pubarx@labelfont\pubarx@spaced{\MakeUppercase{\keywordsname}}}% \hspace{0.8em}\pubarx@printkeywords\par}} \newcommand\pubarx@abstractpanel{% \ifvoid\pubarx@abstractbox \pubarx@ifblank\pubarx@keywords{}{% \par\vskip12pt\relax \pubarx@panel{pubarxtint}{pubarxaccent}{\pubarx@keywordline}}% \else \par\vskip12pt\relax \pubarx@panel{pubarxtint}{pubarxaccent}{% \unvbox\pubarx@abstractbox \pubarx@ifblank\pubarx@keywords{}{% \par\vskip6pt\relax {\color{pubarxrule}\hrule}% \vskip5pt\relax \pubarx@keywordline}}% \fi} \newcommand\pubarx@highlightspanel{% \ifvoid\pubarx@highlightsbox\else \par\vskip7pt\relax \pubarx@panel{pubarxwarm}{pubarxnavy}{\unvbox\pubarx@highlightsbox}% \fi} %% --------------------------------------------------------------------------- %% 17. \maketitle: the full-width title block on page 1 %% --------------------------------------------------------------------------- \newcommand\pubarx@titleblock{% \begingroup \linespread{1}\normalfont\normalsize \parindent\z@\parskip\z@\leftskip\z@\rightskip\z@\relax \ifpubarx@nologo\else \pubarx@band \vskip14pt\relax \fi \pubarx@eyebrow {\pubarx@titlefont\pubarx@title\par}% \vskip9pt\relax {\pubarx@authorfont\pubarx@authors\par}% \pubarx@ifblank\pubarx@affiliations{}{% \vskip4pt\relax {\pubarx@afffont\pubarx@affiliations\par}}% \pubarx@notes \pubarx@datesline \pubarx@abstractpanel \pubarx@highlightspanel \par \endgroup} % Space between the title block and the body text. In two-column mode LaTeX % cancels \dbltextfloatsep under the \twocolumn[...] block, so without this % the first heading would touch the abstract panel. \newcommand\pubarx@titlesep{\par\vskip18\p@\@plus4\p@\relax} \newcommand\pubarx@setpdfinfo{% \def\pubarx@pdfsubject{PubArx preprint}% \pubarx@ifblank\pubarx@fullid{}% {\protected@edef\pubarx@pdfsubject{\pubarx@pdfsubject\space PubArx:\pubarx@fullid}}% \pubarx@ifblank\pubarx@subject{}% {\protected@edef\pubarx@pdfsubject{\pubarx@pdfsubject; \pubarx@subject}}% \hypersetup{pdftitle={\pubarx@title},pdfauthor={\pubarx@pdfauthors}, pdfsubject={\pubarx@pdfsubject},pdfkeywords={\pubarx@keywords}}} \renewcommand\maketitle{% \par \pubarx@ifblank\pubarx@title {\ClassWarningNoLine{pubarx}{No \string\title\space given}}{}% \pubarx@setpdfinfo \begingroup % \thanks notes use the symbols after * and its dagger, which mark % corresponding authors and equal contributions. \renewcommand\thefootnote{\@fnsymbol{\numexpr\c@footnote+2\relax}}% \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% \long\def\@makefntext##1{\parindent1em\noindent \hb@xt@1.8em{\hss\@textsuperscript{\normalfont\@thefnmark}}##1}% \if@twocolumn \ifnum\col@number=\@ne \pubarx@titleblock \pubarx@titlesep \else \twocolumn[\pubarx@titleblock\pubarx@titlesep]% \fi \else \newpage \global\@topnum\z@ \pubarx@titleblock \pubarx@titlesep \fi \thispagestyle{pubarxfirst}\@thanks \endgroup \global\pubarx@titledonetrue \setcounter{footnote}{0}% \global\let\thanks\@gobble \global\let\@thanks\@empty \global\let\maketitle\relax} %% --------------------------------------------------------------------------- %% 18. Page styles %% --------------------------------------------------------------------------- \newcommand\pubarx@headfont{\normalfont\sffamily\footnotesize\color{pubarxmuted}} \newcommand\pubarx@pageofpages{Page \thepage\ of \pageref*{LastPage}} \newcommand\pubarx@headtitle{{\let\\\space\let\newline\space\pubarx@shorttitle}} \newcommand\pubarx@headid{% \pubarx@ifblank\pubarx@fullid {\ifpubarx@nologo\else PubArx preprint\fi}% {\pubarx@idlink{}}} \newcommand\pubarx@firstfoot{% \textcopyright\ The authors% \pubarx@ifblank\pubarx@license{}{\pubarx@listsep Licence: \pubarx@license}} \newcommand\pubarx@pagestyle{% \fancyhf{}% \fancyhead[L]{\pubarx@headfont\pubarx@headtitle}% \fancyhead[R]{\pubarx@headfont\pubarx@headid}% \fancyfoot[L]{\pubarx@headfont\pubarx@runningauthor}% \fancyfoot[R]{\pubarx@headfont\pubarx@pageofpages}% \renewcommand\headrulewidth{0.4pt}% \renewcommand\footrulewidth{0pt}} \fancypagestyle{pubarx}{\pubarx@pagestyle} \fancypagestyle{plain}{\pubarx@pagestyle} \fancypagestyle{pubarxfirst}{% \fancyhf{}% \fancyfoot[L]{\pubarx@headfont\pubarx@firstfoot}% \fancyfoot[R]{\pubarx@headfont\pubarx@pageofpages}% \renewcommand\headrulewidth{0pt}% \renewcommand\footrulewidth{0pt}} \renewcommand\headrule{{\color{pubarxrule}% \hrule\@height\headrulewidth\@width\headwidth\vskip-\headrulewidth}} \pagestyle{pubarx} % fancyhdr fixes \headwidth when the page style is first set (above). Reset % it once the preamble is done, so that a \geometry{...} in the preamble % still gives running heads exactly as wide as the text. \AtBeginDocument{\setlength\headwidth{\textwidth}} \endinput %% End of pubarx.cls