From 6546a700782ec066330ffc5b2b06354ea1c8e272 Mon Sep 17 00:00:00 2001 From: Sebastian Kreutzer Date: Fri, 3 Nov 2023 20:55:49 +0100 Subject: [PATCH] Update Copernicus template from 7.3 to 7.5 (#551) --- NEWS.md | 5 + R/copernicus_article.R | 2 +- ....txt => README_copernicus_package_7_5.txt} | 8 +- .../copernicus/skeleton/copernicus.bst | 105 ++++++++++----- .../copernicus/skeleton/copernicus.cls | 120 ++++++++++++++---- man/copernicus_article.Rd | 2 +- 6 files changed, 182 insertions(+), 60 deletions(-) rename inst/rmarkdown/templates/copernicus/resources/{README_copernicus_package_7_3.txt => README_copernicus_package_7_5.txt} (81%) diff --git a/NEWS.md b/NEWS.md index c2329c044..b43f413b3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -16,6 +16,11 @@ - The format is now only compatible with `natbib` citation processor when Pandoc 3.1.7+ is used, because Frontiers documentclass requires usage of `natbib` and it conflicts with pandoc Citeproc. - Update `mnras_article()` and `lncs_article()` to work with the Pandoc 3.1.7+ citeproc change. + +## BUG FIXES + +- Update Copernicus Publications template to version 7.5 from 2023-10-20 (@RLumSK, #551). + # rticles 0.25 ## BREAKING CHANGES diff --git a/R/copernicus_article.R b/R/copernicus_article.R index acabd1e7c..3cbcf8e7e 100644 --- a/R/copernicus_article.R +++ b/R/copernicus_article.R @@ -13,7 +13,7 @@ #' #' An number of required and optional manuscript sections, e.g. `acknowledgements`, `competinginterests`, or `authorcontribution`, must be declared using the respective properties of the R Markdown header - see skeleton file. #' -#' **Version:** Based on `copernicus_package.zip` in the version 7.3, 15 March 2023, using `copernicus.cls` in version 10.1.4, 5 December 2022. +#' **Version:** Based on `copernicus_package.zip` in the version 7.5, 20 October 2023, using `copernicus.cls` in version 10.1.9, 16 October 2023. #' #' **Copernicus journal abbreviations:** You can use the function `copernicus_journal_abbreviations()` to get the journal abbreviation for all journals supported by the Copernicus article template. #' diff --git a/inst/rmarkdown/templates/copernicus/resources/README_copernicus_package_7_3.txt b/inst/rmarkdown/templates/copernicus/resources/README_copernicus_package_7_5.txt similarity index 81% rename from inst/rmarkdown/templates/copernicus/resources/README_copernicus_package_7_3.txt rename to inst/rmarkdown/templates/copernicus/resources/README_copernicus_package_7_5.txt index f37404d0b..531578cba 100644 --- a/inst/rmarkdown/templates/copernicus/resources/README_copernicus_package_7_3.txt +++ b/inst/rmarkdown/templates/copernicus/resources/README_copernicus_package_7_5.txt @@ -1,7 +1,7 @@ -File: README_copernicus_package_7_3.txt +File: README_copernicus_package_7_5.txt ------------------------------------------------------------------------- This is a README file for the Copernicus Publications LaTeX Macro Package -copernicus_package.zip in the version 7.3, 15 March 2023 +copernicus_package.zip in the version 7.5, 20 October 2023 ------------------------------------------------------------------------- It consists of several files, each with its separate copyright. This specific archive is collected for journals published by @@ -15,8 +15,8 @@ URL: https://publications.copernicus.org Content: -- copernicus.cls: The LaTeX2e class file designed for Copernicus Publications journals. Current Version 10.1.4, 5 December 2022 +- copernicus.cls: The LaTeX2e class file designed for Copernicus Publications journals. Current Version 10.1.9, 16 October 2023 - copernicus.cfg: The configuration file containing journal-specific information used by the class file. Last update 15 March 2023 -- copernicus.bst: The bibliographic style file for BibTeX. Current Version 1.4, March 2022 +- copernicus.bst: The bibliographic style file for BibTeX. Current Version 1.6, 20 October 2023 - pdfscreencop.sty / pdfscreen.sty - template.tex: A LaTeX template in journal style. \ No newline at end of file diff --git a/inst/rmarkdown/templates/copernicus/skeleton/copernicus.bst b/inst/rmarkdown/templates/copernicus/skeleton/copernicus.bst index 868625b67..9a68fcf48 100644 --- a/inst/rmarkdown/templates/copernicus/skeleton/copernicus.bst +++ b/inst/rmarkdown/templates/copernicus/skeleton/copernicus.bst @@ -1,17 +1,14 @@ %% -%% This is file `copernicus.bst', version 1.4 (March 2022), +%% This is file `copernicus.bst', version 1.6 (October 2023) %% generated with the docstrip utility. %% %% The original source files were: %% -%% merlin.mbs (with options: `head,ay,nat,seq-key,nm-rev,ed-rev,keyxyr,blkyear,dt-end,note-yr,atit-u,jttl-rm,vnum-x,volp-com,pgsep-s,num-xser,btit-rm,bt-rm,agu-doi,doi,edby,blk-com,au-col,in-col,pp,ed,abr,xedn,jabr,url,url-nt,{}') -%% physjour.mbs (with options: `ay,nat,seq-key,nm-rev,ed-rev,keyxyr,blkyear,dt-end,note-yr,atit-u,jttl-rm,vnum-x,volp-com,pgsep-s,num-xser,btit-rm,bt-rm,agu-doi,doi,edby,blk-com,au-col,in-col,pp,ed,abr,xedn,jabr,url,url-nt,{}') -%% geojour.mbs (with options: `ay,nat,seq-key,nm-rev,ed-rev,keyxyr,blkyear,dt-end,note-yr,atit-u,jttl-rm,vnum-x,volp-com,pgsep-s,num-xser,btit-rm,bt-rm,agu-doi,doi,edby,blk-com,au-col,in-col,pp,ed,abr,xedn,jabr,url,url-nt,{}') -%% merlin.mbs (with options: `tail,ay,nat,seq-key,nm-rev,ed-rev,keyxyr,blkyear,dt-end,note-yr,atit-u,jttl-rm,vnum-x,volp-com,pgsep-s,num-xser,btit-rm,bt-rm,agu-doi,doi,edby,blk-com,au-col,in-col,pp,ed,abr,xedn,jabr,url,url-nt,{}') +%% merlin.mbs (with options: `head,ay,nat,seq-key,nm-rev,ed-rev,keyxyr,blkyear,dt-end,note-yr,atit-u,jttl-rm,vnum-x,volp-com,pgsep-s,num-xser,btit-rm,bt-rm,isbn,issn,doi,url-doi,edby,blk-com,au-col,in-col,pp,ed,abr,xedn,jabr,url,url-nt,nfss,') %% ---------------------------------------- %% *** For journals of Copernicus Publications *** %% -%% Copyright 1994-2006 Patrick W Daly +%% Copyright 1994-2011 Patrick W Daly % =============================================================== % IMPORTANT NOTICE: % This bibliographic style (bst) file has been generated from one or @@ -23,7 +20,7 @@ % version 1 of the License, or any later version. % =============================================================== % Name and version information of the main mbs file: - % \ProvidesFile{merlin.mbs}[2006/02/15 4.16 (PWD, AO, DPC)] + % \ProvidesFile{merlin.mbs}[2011/11/18 4.33 (PWD, AO, DPC)] % For use with BibTeX version 0.99a or later %------------------------------------------------------------------- % This bibliography style file is intended for texts in ENGLISH @@ -48,14 +45,16 @@ % \citep*{key} ==>> (Jones, Baker, and Smith, 1990) % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2) % \citep[e.g.][]{key} ==>> (e.g. Jones et al., 1990) - % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., p. 32) - % \citealp{key} ==>> Jones et al., 1990 + % \citep[e.g.][p. 32]{key} ==>> (e.g. Jones et al., 1990, p. 32) % \citeauthor{key} ==>> Jones et al. % \citeauthor*{key} ==>> Jones, Baker, and Smith % \citeyear{key} ==>> 1990 %--------------------------------------------------------------------- - +%% Rolf Sander (2023): +%% - ISBN also for phdthesis and techreport +%% - urlprefix is now empty + ENTRY { address author @@ -67,6 +66,8 @@ ENTRY eid howpublished institution + isbn + issn journal key month @@ -196,7 +197,7 @@ FUNCTION {field.or.null} FUNCTION {emphasize} { duplicate$ empty$ { pop$ "" } - { "{\em " swap$ * "\/}" * } + { "\emph{" swap$ * "}" * } if$ } FUNCTION {tie.or.space.prefix} @@ -502,8 +503,7 @@ MACRO {ww} {"Weatherwise"} MACRO {wmob} {"WMO Bull."} MACRO {zeitmet} {"Z. Meteorol."} % End module: geojour.mbs -%% Copyright 1994-2006 Patrick W Daly -MACRO {acmcs} {"ACM Comput. Surv."} +%% Copyright 1994-2006 Patrick W DalyMACRO {acmcs} {"ACM Comput. Surv."} MACRO {acta} {"Acta Inf."} @@ -659,6 +659,24 @@ FUNCTION {format.editors} } if$ } +FUNCTION {format.isbn} +{ isbn "isbn" bibinfo.check + duplicate$ empty$ 'skip$ + { + "ISBN " swap$ * + } + if$ +} + +FUNCTION {format.issn} +{ issn "issn" bibinfo.check + duplicate$ empty$ 'skip$ + { + "ISSN " swap$ * + } + if$ +} + FUNCTION {format.doi} { doi "doi" bibinfo.check duplicate$ empty$ 'skip$ @@ -1138,7 +1156,7 @@ FUNCTION {article} "journal" bibinfo.check "journal" output.check format.vol.num.pages output - format.doi output + format.doi output } { format.article.crossref output.nonnull format.pages output @@ -1174,6 +1192,7 @@ FUNCTION {book} } if$ format.edition output + format.isbn output format.doi output format.note output format.date "year" output.check @@ -1187,6 +1206,7 @@ FUNCTION {booklet} format.title "title" output.check howpublished "howpublished" bibinfo.check output address "address" bibinfo.check output + format.isbn output format.doi output format.note output format.date "year" output.check @@ -1222,6 +1242,10 @@ FUNCTION {inbook} } if$ format.edition output + crossref missing$ + { format.isbn output } + 'skip$ + if$ format.doi output format.note output format.date "year" output.check @@ -1241,6 +1265,7 @@ FUNCTION {incollection} format.chapter.pages output format.publisher.address output format.edition output + format.isbn output } { format.incoll.inproc.crossref output.nonnull format.chapter.pages output @@ -1268,6 +1293,8 @@ FUNCTION {inproceedings} format.publisher.address output } if$ + format.isbn output + format.issn output } { format.incoll.inproc.crossref output.nonnull format.pages output @@ -1332,6 +1359,8 @@ FUNCTION {phdthesis} bbl.phdthesis format.thesis.type output.nonnull school "school" bibinfo.warn output address "address" bibinfo.check output + format.isbn output + format.issn output format.doi output format.note output format.date "year" output.check @@ -1352,6 +1381,8 @@ FUNCTION {proceedings} format.publisher.address output } if$ + format.isbn output + format.issn output format.doi output format.note output format.date "year" output.check @@ -1368,6 +1399,8 @@ FUNCTION {techreport} format.tr.number output.nonnull institution "institution" bibinfo.warn output address "address" bibinfo.check output + format.isbn output + format.issn output format.doi output format.note output format.date "year" output.check @@ -1504,14 +1537,15 @@ FUNCTION {sort.format.names} { " " * namesleft #1 = t "others" = and - { "zzzzz" * } - { numnames #2 > nameptr #2 = and - { "zz" * year field.or.null * " " * } - 'skip$ - if$ - t sortify * + { "zzzzz" 't := } + 'skip$ + if$ + numnames #2 > nameptr #2 = and + { "zz" * year field.or.null * " " * } + 'skip$ if$ + t sortify * } { t sortify * } if$ @@ -1590,10 +1624,7 @@ FUNCTION {presort} 'sort.label := sort.label * - " " - * - cite$ - * + " " * cite$ * #1 entry.max$ substring$ 'sort.key$ := } @@ -1601,17 +1632,30 @@ FUNCTION {presort} ITERATE {presort} SORT STRINGS { last.label next.extra } -INTEGERS { last.extra.num number.label } +INTEGERS { last.extra.num last.extra.num.extended last.extra.num.blank number.label } FUNCTION {initialize.extra.label.stuff} { #0 int.to.chr$ 'last.label := "" 'next.extra := #0 'last.extra.num := + "a" chr.to.int$ #1 - 'last.extra.num.blank := + last.extra.num.blank 'last.extra.num.extended := #0 'number.label := } FUNCTION {forward.pass} { last.label label = { last.extra.num #1 + 'last.extra.num := - last.extra.num int.to.chr$ 'extra.label := + last.extra.num "z" chr.to.int$ > + { "a" chr.to.int$ 'last.extra.num := + last.extra.num.extended #1 + 'last.extra.num.extended := + } + 'skip$ + if$ + last.extra.num.extended last.extra.num.blank > + { last.extra.num.extended int.to.chr$ + last.extra.num int.to.chr$ + * 'extra.label := } + { last.extra.num int.to.chr$ 'extra.label := } + if$ } { "a" chr.to.int$ 'last.extra.num := "" 'extra.label := @@ -1643,10 +1687,7 @@ FUNCTION {bib.sort.order} * year field.or.null sortify * - " " - * - cite$ - * + " " * cite$ * #1 entry.max$ substring$ 'sort.key$ := } @@ -1661,9 +1702,9 @@ FUNCTION {begin.bib} write$ newline$ "\providecommand{\natexlab}[1]{#1}" write$ newline$ - "\providecommand{\url}[1]{{\tt #1}}" + "\providecommand{\url}[1]{\texttt{#1}}" write$ newline$ - "\providecommand{\urlprefix}{URL }" + "\providecommand{\urlprefix}{}" write$ newline$ "\expandafter\ifx\csname urlstyle\endcsname\relax" write$ newline$ diff --git a/inst/rmarkdown/templates/copernicus/skeleton/copernicus.cls b/inst/rmarkdown/templates/copernicus/skeleton/copernicus.cls index 525acd58f..68ae6219d 100644 --- a/inst/rmarkdown/templates/copernicus/skeleton/copernicus.cls +++ b/inst/rmarkdown/templates/copernicus/skeleton/copernicus.cls @@ -12,11 +12,11 @@ %% This file is part of the copernicus package for papers %% published by Copernicus Publications (Copernicus GmbH). %% -%% Copyright (C) 2022 by Copernicus Publications +%% Copyright (C) 2023 by Copernicus Publications %% ----------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e}[1995/12/01] \ProvidesClass{copernicus} - [2022/12/05 10.1.4 Copernicus papers] + [2023/10/11 10.1.10 Copernicus papers] \frenchspacing \clubpenalty10000 \widowpenalty10000 @@ -533,6 +533,7 @@ \if@noauthor\else\if!\@runauth!\UndefinedError{\string\runningauthor}\fi\fi \if!\@runtit!\UndefinedError{\string\runningtitle}\fi} \let\ltx@title\title +\let\@letex@textit\textit \ifx\xmltexversion\@undefined \ifcopyediting \let\title\ltx@title @@ -672,7 +673,7 @@ \let\and=\sw@and \flushleft \@author\\[4pt] - \ifx\@corresp\@empty\else\textbf{{\if@sansserifface\sffamily\fi\upshape\noindent\color{textcol} Correspondence:}} \@corresp\ifx\@howtocite\@empty\else\\[4pt]\fi\fi + \ifnum\corr@cnt=\z@\relax\else\textbf{{\if@sansserifface\sffamily\fi\upshape\noindent\color{textcol} Correspondence:}} \@corresp\ifx\@howtocite\@empty\else\\[4pt]\fi\fi \ifx\@howtocite\@empty\else\textbf{{\if@sansserifface\sffamily\fi\upshape\noindent\color{textcol} How to cite:}} \@howtocite\fi \par}% \fi @@ -715,7 +716,7 @@ \@author\par}% \vskip-0.5\baselineskip \fi - \ifx\@corresp\@empty\else\vskip\topsep\centering\textbf{{\if@sansserifface\sffamily\fi\upshape\noindent\color{textcol} Correspondence:}}\space\@corresp\fi + \ifnum\corr@cnt=\z@\relax\else\vskip\topsep\centering\textbf{{\if@sansserifface\sffamily\fi\upshape\noindent\color{textcol} Correspondence:}}\space\@corresp\fi \ifx\@howtocite\@empty\else\vskip.5\topsep\centering\textbf{{\if@sansserifface\sffamily\fi\upshape\noindent\color{textcol} How to cite:}}\space\@howtocite\fi \par\vskip0.33\baselineskip {\small @@ -785,7 +786,7 @@ \fi \@thanks} %% NEU: - \ifnum\ifx\@corresp\@empty\ifx\@howtocite\@empty\if!\@recvd!\ifx\abstractexists\@undefined\ifx\@published\@undefined0\else1\fi\else1\fi\else1\fi\else1\fi\else1\fi=1\relax + \ifnum\ifnum\corr@cnt=\z@\relax\ifx\@howtocite\@empty\if!\@recvd!\ifx\abstractexists\@undefined\ifx\@published\@undefined0\else1\fi\else1\fi\else1\fi\else1\fi\else1\fi=1\relax \par\vskip1.5\baselineskip \def\labelfont{\bfseries\if@sansserifface\sffamily\fi\upshape\noindent\color{textcol}}% \list{}{\labelwidth35mm% @@ -794,7 +795,7 @@ \labelsep\z@ \xdef\@indescription{}% \def\makelabel##1{\labelfont##1\hss}}% - \ifx\@corresp\@empty\else\item[{Correspondence:}]\@corresp\fi + \ifnum\corr@cnt=\z@\relax\else\item[{Correspondence:}]\@corresp\fi \ifnum\ifx\@published\@undefined\ifx\specialp@perstring\@undefined\if!\@recvd!0\else1\fi\else0\fi\else1\fi=1\relax \item[{Relevant dates:}]% \fi @@ -856,7 +857,7 @@ \vskip-0.25\baselineskip \fi \@thanks - \ifx\@corresp\@empty\else\vskip\baselineskip\textbf{{\if@sansserifface\sffamily\fi\upshape\noindent\color{textcol} Correspondence:}}\space\@corresp\fi + \ifnum\corr@cnt=\z@\relax\else\vskip\baselineskip\textbf{{\if@sansserifface\sffamily\fi\upshape\noindent\color{textcol} Correspondence:}}\space\@corresp\fi \ifx\@howtocite\@empty\else\vskip.75\baselineskip\textbf{{\if@sansserifface\sffamily\fi\upshape\noindent\color{textcol} How to cite:}}\space\@howtocite\fi \par\vspace{10pt}% \ifx\specialp@perstring\@undefined @@ -1176,10 +1177,9 @@ \iflanguage{ngerman}{\@abslang}{\iflanguage{german}{\@abslang}{}}% \reset@font\normalsize\par\noindent \subpdfbookmark{\abstractname}{abstract}% - \textcolor{textcol}{\reset@font\normalsize\if@sansserifface\sffamily\fi\bfseries\abstractname.} \ignorespaces} - {% - \ifx\second@bstract\@undefined\else\vskip\baselineskip\second@bstract\fi - \if!\@keyw!\else + \textcolor{textcol}{\reset@font\normalsize\if@sansserifface\sffamily\fi\bfseries\abstractname.} \ignorespaces} + {\ifx\second@bstract\@undefined\else\vskip\baselineskip\second@bstract\fi + \if!\@keyw!\else \par\vspace{1.7mm}\noindent \textbf{Keywords.}\enspace\ignorespaces\@keyw \fi @@ -1191,7 +1191,12 @@ {\iflanguage{german}% {\gdef\@abslang{\selectlanguage{english}}}% {\gdef\@abslang{\selectlanguage{german}}% - \if@manuscript\else\if@noline\else\hrule\fi\fi}}} + \if@manuscript\else\if@noline\else + \hrule\par% #9055 + \vskip2\baselineskip\relax% #9055 + \ifx\xmltexversion\@undefined\else\aftergroup\aftergroup\fi\aftergroup\@afterindentfalse% #9055 + \ifx\xmltexversion\@undefined\else\aftergroup\aftergroup\fi\aftergroup\@afterheading% #9055 + \fi\fi}}} \fi \else%discussions \renewenvironment{abstract} @@ -1293,7 +1298,14 @@ \if@cop@home \RequirePackage{fontawesome5} \ifluatex - %% TODO + \newcommand*{\faicon}[1]{{\csname faicon@#1\endcsname}} + \input{fontawesomesymbols-generic.tex} + \DeclareRobustCommand\FAone{\fontencoding{U}\fontfamily{fontawesomeone}\selectfont} + \DeclareRobustCommand\FAtwo{\fontencoding{U}\fontfamily{fontawesometwo}\selectfont} + \DeclareRobustCommand\FAthree{\fontencoding{U}\fontfamily{fontawesomethree}\selectfont} + \input{fontawesomesymbols-pdftex.tex} + \renewcommand{\faHourglass}[1][]{\faicon{hourglass\if\relax\detokenize{#1}\relax\else-#1\fi}} + \renewcommand{\faBattery}[1][4]{\faicon{battery-#1}} \else \RequirePackage{fontawesome} \fi @@ -1376,7 +1388,7 @@ \def\copyrightstatementname{Copyright statement}% \def\codeavailabilityname{Code availability}% \def\dataavailabilityname{Data availability}% - \def\ercavailabilityname{Executable research compendium (ERC)}% + \def\ercavailabilityname{Interactive computing environment}% \def\codedataavailabilityname{Code and data availability}% \def\sampleavailabilityname{Sample availability}% \def\competinginterestsname{Competing interests}% @@ -1407,7 +1419,7 @@ \def\copyrightstatementname{Urheberrechtserklärung}% \def\codeavailabilityname{Codeverfügbarkeit}% \def\dataavailabilityname{Datenverfügbarkeit}% - \def\ercavailabilityname{Executable research compendium (ERC)}% + \def\ercavailabilityname{Interactive computing environment}% \def\codedataavailabilityname{Code- und Datenverfügbarkeit}% \def\sampleavailabilityname{Probenverfügbarkeit}% \def\authorcontributionname{Autor:innenmitwirkung}% @@ -1437,7 +1449,7 @@ \def\copyrightstatementname{Affirmation du droit d'auteur}% \def\codeavailabilityname{Disponibilité du code}% \def\dataavailabilityname{Disponibilité des données}% - \def\ercavailabilityname{Executable research compendium (ERC)}% + \def\ercavailabilityname{Interactive computing environment}% \def\sampleavailabilityname{Disponibilité des examples}% \def\codedataavailabilityname{Disponibilité du code et des données}% \def\authorcontributionname{Collaborateurs}% @@ -1645,20 +1657,66 @@ \let\equalcontrib\@gobble \let\@deceased\@gobble \fi -\def\Author{\@ifnextchar[\@Author{\@Author[]}}%] +\newcount\corr@cnt \corr@cnt\z@\relax +\newcount\curr@corr@cnt \curr@corr@cnt\z@\relax +\def\Author{\let\curr@corr\@empty\@ifnextchar[\@Author{\@Author[]}}%] \def\@Author[#1]{% \def\@tempa{#1}% - \@ifnextchar(\@@Author{\@@Author()}}%)} -\def\@@Author(#1){% + \@ifnextchar[\@@Author{\@@Author[]}%] +}% +\def\@@Author[#1]{% + \if!#1!\else + \global\advance\corr@cnt\@ne + \parse@corr{#1}% + \fi% + \@ifnextchar(\@@@Author{\@@@Author()}%) +} +\def\parse@corr#1{% + \curr@corr@cnt\z@ + \let\curr@corr\relax + \@parse@corr#1,,\@nil + \ifnum\curr@corr@cnt=\@ne\relax + \edef\curr@corr{\csname curr@corr@1\endcsname}% + \else + \ifnum\curr@corr@cnt=\tw@\relax + \edef\curr@corr{% + \csname curr@corr@1\endcsname\Authsep + \csname curr@corr@2\endcsname}% + \else + \@tempcntb\z@ + \let\curr@corr\@empty% + \loop + \advance\@tempcntb\@ne + \expandafter\edef\expandafter\curr@corr\expandafter{\curr@corr\csname curr@corr@\the\@tempcntb\endcsname}% + \ifnum\@tempcntb<\numexpr\curr@corr@cnt+\m@ne\relax\relax + \expandafter\edef\expandafter\curr@corr\expandafter{\curr@corr\Authsep}% + \repeat + \expandafter\edef\expandafter\curr@corr\expandafter{\curr@corr\Authands\csname curr@corr@\the\curr@corr@cnt\endcsname}% + \fi + \fi +} +\def\@parse@corr #1,#2,\@nil{% + \if!#1!\else + \advance\curr@corr@cnt\@ne + \expandafter\def\csname curr@corr@\the\curr@corr@cnt\endcsname{#1}% + \if!#2!\else + \@parse@corr#2,\@nil% + \fi + \fi +} +\def\@@@Author(#1){% \def\@tempb{#1}% - \@ifnextchar(\@@@Author{\@@@Author()}}%)} -\def\@@@Author(#1)#2#3{% + \@ifnextchar(\@@@@Author{\@@@@Author()}}%) +\def\@@@@Author(#1)#2#3{% \def\@tempc{#1}% \protected@edef\@tempd{% \ifx\@tempb\@empty\else\@tempb\noexpand\nobreakspace\fi #2\noexpand\nobreakspace #3% \ifx\@tempc\@empty\else\noexpand\nobreakspace\@tempc\fi}% + \ifx\curr@corr\@empty\else + \expandafter\expandafter\expandafter\xdef\csname corresp-\the\corr@cnt\expandafter\endcsname\expandafter{\@tempd\noexpand\space(\curr@corr)}% + \fi \expandafter\expandafter\expandafter\author\expandafter\expandafter\expandafter [\expandafter\@tempa\expandafter]\expandafter{\@tempd}} \providecommand\appendixname{Appendix} @@ -2486,7 +2544,25 @@ \let\@cyear\@pyear \def\pubvol#1{\if@cop@home\ifx\specialp@perstring\@undefined\gdef\@pvol{#1}\fi\fi}%+1,+2,+d \let\pubnum\@gobble%not for TeX, only for secondary data use -\def\correspondence#1{\gdef\@corresp{#1}} \def\@corresp{}%+1,+2,+d +\def\@corresp{% + \ifnum\corr@cnt=\@ne\relax + \csname corresp-1\endcsname% + \else + \ifnum\corr@cnt=\tw@\relax + \csname corresp-1\endcsname\Authand\csname corresp-2\endcsname% + \else + \@tempcnta\z@ + \loop + \advance\@tempcnta\@ne + \csname corresp-\the\@tempcnta\endcsname% + \ifnum\@tempcnta<\numexpr\corr@cnt+\m@ne\relax\relax + \Authsep + \repeat + \Authands\csname corresp-\the\corr@cnt\endcsname% + \fi + \fi +} +\def\correspondence#1{\gdef\@corresp{#1}}% \def\citationstatement#1{% \edef\@@doi{https://doi.org/10.5194/\@journalnameshortlower-\@pvol-\@fpage-\@pyear}% \def\@tempa{#1}% diff --git a/man/copernicus_article.Rd b/man/copernicus_article.Rd index ac429f9df..db5263869 100644 --- a/man/copernicus_article.Rd +++ b/man/copernicus_article.Rd @@ -61,7 +61,7 @@ This was adapted from An number of required and optional manuscript sections, e.g. \code{acknowledgements}, \code{competinginterests}, or \code{authorcontribution}, must be declared using the respective properties of the R Markdown header - see skeleton file. -\strong{Version:} Based on \code{copernicus_package.zip} in the version 7.3, 15 March 2023, using \code{copernicus.cls} in version 10.1.4, 5 December 2022. +\strong{Version:} Based on \code{copernicus_package.zip} in the version 7.5, 20 October 2023, using \code{copernicus.cls} in version 10.1.9, 16 October 2023. \strong{Copernicus journal abbreviations:} You can use the function \code{copernicus_journal_abbreviations()} to get the journal abbreviation for all journals supported by the Copernicus article template.