Skip to content

Commit a45647f

Browse files
committed
updating document class
1 parent 22a863c commit a45647f

File tree

1 file changed

+54
-13
lines changed

1 file changed

+54
-13
lines changed

manuscript/livecoms.cls

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
\newif\if@pubversion
5050
\DeclareOption{pubversion}{\@pubversiontrue}
5151

52+
\newif\if@ASAPversion
53+
\DeclareOption{ASAPversion}{\@ASAPversiontrue}
54+
5255
%% Linespacing.
5356
\newif\if@onehalfspacing
5457
\newif\if@doublespacing
@@ -247,6 +250,9 @@
247250
\newcommand{\pubvolume}[1]{%
248251
\appto{\@publishedvolume}{#1}{}{}
249252
}
253+
\newcommand{\pubissue}[1]{%
254+
\appto{\@publishedissue}{#1}{}{}
255+
}
250256
\newcommand{\pubyear}[1]{%
251257
\appto{\@publishedyear}{#1}{}{}
252258
}
@@ -260,24 +266,42 @@
260266
\appto{\@publisheddateaccepted}{#1}{}{}
261267
}
262268

269+
%--------------------------------------------------------
263270
% Footers
271+
% 1. Error Check for conflicting class options
264272
\if@pubversion
265-
\lfoot{\ifthenelse{\value{page}=1}
266-
{\small\color{LiveCoMSMediumGrey}Received: \@publisheddatereceived \\ Accepted: \@publisheddateaccepted}
267-
{~\\~}
268-
}%
269-
%\lfoot{\small\color{LiveCoMSMediumGrey}Received: \@publisheddatereceived \\
270-
% Accepted: \@publisheddateaccepted}%
271-
\cfoot{\small\color{white} \vspace{\baselineskip} \small\color{LiveCoMSMediumGrey} \thepage\space of\space\pageref{LastPage}}%
272-
\rfoot{\small\color{LiveCoMSMediumGrey}\href{https://doi.org/\@publishedDOI}{https://doi.org/\@publishedDOI}\\
273-
{\it Living J. Comp. Mol. Sci.} \@publishedyear, \@publishedvolume, \@publishedarticlenum }%
274-
\else
275-
\cfoot{\small\color{white} \vspace{\baselineskip} \small\color{LiveCoMSMediumGrey} \thepage\space of\space\pageref{LastPage}}%
276-
%\rfoot{\small\color{LiveCoMSMediumGrey}Page \thepage\space of\space\pageref{LastPage}}%
273+
\if@ASAPversion
274+
\ClassError{livecoms}
275+
{Nope nope nope, you cannot invoke 'pubversion' and 'ASAPversion' simultaneously. Please correct the class options.}
276+
\fi
277+
\fi
278+
% 2. Publication Version: put submission/acceptance dates in left footer and citation information in right footer
279+
%%% DWS NOTE: would be nice if the left footer was in an if A-or-B type logical statement
280+
\if@pubversion
281+
\lfoot{\ifthenelse{\value{page}=1}
282+
{\small\color{LiveCoMSMediumGrey}Received: \@publisheddatereceived \\ Accepted: \@publisheddateaccepted}
283+
{~\\~}
284+
}%
285+
\rfoot{\small\color{LiveCoMSMediumGrey}\href{https://doi.org/\@publishedDOI}{https://doi.org/\@publishedDOI}\\
286+
{\it Living J. Comp. Mol. Sci.} \@publishedyear, \@publishedvolume\nobreak\hspace{.05em}(\@publishedissue), \@publishedarticlenum
287+
}%
288+
\fi
289+
% 3. ASAP Version: put submission/acceptance dates in left footer and "ASAP Version" in right footer
290+
\if@ASAPversion
291+
\lfoot{\ifthenelse{\value{page}=1}
292+
{\small\color{LiveCoMSMediumGrey}Received: \@publisheddatereceived \\ Accepted: \@publisheddateaccepted}
293+
{~\\~}
294+
}%
295+
\rfoot{\small\color{LiveCoMSMediumGrey}\href{https://doi.org/\@publishedDOI}{https://doi.org/\@publishedDOI}\\
296+
{\it Living J. Comp. Mol. Sci.} ASAP Version
297+
}%
277298
\fi
299+
% 4. Page Number in center of footer
300+
\cfoot{\small\color{white} \vspace{\baselineskip} \small\color{LiveCoMSMediumGrey} \thepage\space of\space\pageref{LastPage}}%
278301
\preto{\footrule}{\color{LiveCoMSMediumGrey}}
279302
\renewcommand{\headrulewidth}{0pt}% % No header rule
280303
\renewcommand{\footrulewidth}{0.4pt}% % No footer rule
304+
%----------------------------------------------------------
281305

282306
%
283307
% section/subsection/paragraph set-up
@@ -319,6 +343,7 @@
319343
\def\@deceased{}
320344
% Added blurb for LiveComs
321345
\def\@blurb{}
346+
\def\@orcidblock{}
322347

323348

324349
\newcommand{\corr}[2]{%
@@ -349,6 +374,16 @@
349374
% Added for LiveComs
350375
\newcommand{\blurb}[1]{\def\@blurb{#1}}
351376

377+
\newcommand{\orcid}[2]{%
378+
\ifx\empty\@orcidblock\else\appto{\@orcidblock}{\\}{}{}\fi
379+
\appto{\@orcidblock}{%
380+
#1:\space%
381+
\ifx\empty#2\else\href{https://orcid.org/#2}{#2} \fi
382+
}{}{}%
383+
}
384+
385+
386+
352387
\reversemarginpar
353388

354389
%
@@ -380,7 +415,7 @@
380415

381416
%% Abstract outside frontmatter will throw an error!
382417
\RenewEnviron{abstract}{%
383-
\ClassError{livecome}
418+
\ClassError{livecoms}
384419
{Nope nope nope, please put the abstract inside the frontmatter environment.}
385420
{Please put the abstract inside the frontmatter environment.}
386421
}
@@ -422,6 +457,12 @@
422457
\vskip8pt
423458
}
424459

460+
\newcommand{\makeorcid}{%
461+
% \textbf{*For correspondence:\\} \@correspondence\par
462+
% \textbf{ORCID:\\} \@correspondence\par
463+
\textbf{ORCID:\\} \@orcidblock\par
464+
}
465+
425466
%% Insert a grey line to separate floats from main text
426467
\newcommand{\topfigrule}{\vskip8pt\noindent{\rule{\linewidth}{1pt}}}
427468
\newcommand{\botfigrule}{\noindent{\rule{\linewidth}{1pt}}\vskip8pt}

0 commit comments

Comments
 (0)