Skip to content

Commit 3365349

Browse files
authored
Update Copernicus publication template to version 6.2 (#366)
1 parent 66fdd3e commit 3365349

File tree

7 files changed

+96
-55
lines changed

7 files changed

+96
-55
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: rticles
22
Type: Package
33
Title: Article Formats for R Markdown
4-
Version: 0.18.1
4+
Version: 0.18.2
55
Authors@R: c(
66
person("JJ", "Allaire", role = "aut", email = "[email protected]"),
77
person("Yihui", "Xie", role = c("aut", "cre"), email = "[email protected]", comment = c(ORCID = "0000-0003-0645-5666")),

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
rticles 0.19
22
---------------------------------------------------------------------
3-
3+
- Update Copernicus Publications template to version 6.2 from 2021-01-15. (thanks, @RLumSK, #366)
44

55
rticles 0.18
66
---------------------------------------------------------------------
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
File: README_copernicus_package_6_1.txt
1+
File: README_copernicus_package_6_2.txt
22
-------------------------------------------------------------------------
33
This is a README file for the Copernicus Publications LaTeX Macro Package
4-
copernicus_package.zip in the version 6.1, 29 October 2020
4+
copernicus_package.zip in the version 6.2, 15 January 2021
55
-------------------------------------------------------------------------
66
It consists of several files, each with its separate copyright.
77
This specific archive is collected for journals published by
88
Copernicus Publications (Copernicus GmbH).
99

10-
Copyright (C) 2020 Copernicus GmbH
10+
Copyright (C) 2021 Copernicus GmbH
1111

1212
1313
URL: https://publications.copernicus.org
1414

1515

1616

1717
Content:
18-
- copernicus.cls: The LaTeX2e class file designed for Copernicus Publications journals. Current Version 9.21, 20 October 2020
19-
- copernicus.cfg: The configuration file containing journal-specific information used by the class file. Last update 25 June 2020
20-
- copernicus.bst: The bibliographic style file for BibTeX. Current Version 1.2, September 2017
18+
- copernicus.cls: The LaTeX2e class file designed for Copernicus Publications journals. Current Version 9.25, 12 January 2021
19+
- copernicus.cfg: The configuration file containing journal-specific information used by the class file. Last update 15 January 2021
20+
- copernicus.bst: The bibliographic style file for BibTeX. Current Version 1.3, January 2021
2121
- pdfscreencop.sty / pdfscreen.sty
2222
- template.tex: A LaTeX template in journal style.

inst/rmarkdown/templates/copernicus/resources/template.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
% Natural Hazards and Earth System Sciences (nhess)
5252
% Nonlinear Processes in Geophysics (npg)
5353
% Ocean Science (os)
54+
% Polarforschung - Journal of the German Society for Polar Research (polf)
5455
% Primate Biology (pb)
5556
% Proceedings of the International Association of Hydrological Sciences (piahs)
5657
% Scientific Drilling (sd)

inst/rmarkdown/templates/copernicus/skeleton/copernicus.bst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%%
2-
%% This is file `copernicus.bst', version 1.2 (September 2017),
2+
%% This is file `copernicus.bst', version 1.3 (January 2021),
33
%% generated with the docstrip utility.
44
%%
55
%% The original source files were:
@@ -668,9 +668,13 @@ FUNCTION {format.doi}
668668
}
669669
FUNCTION {format.note}
670670
{
671-
url empty$
671+
doi empty$
672+
{ url empty$
673+
'skip$
674+
{ "\urlprefix\url{" url * "}" * output }
675+
if$
676+
}
672677
'skip$
673-
{ "\urlprefix\url{" url * "}" * output }
674678
if$
675679
note empty$
676680
{ "" }

inst/rmarkdown/templates/copernicus/skeleton/copernicus.cfg

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
\newif\ifprp \DeclareOption{prp} {\@sansseriffacetrue\@sansserifheadertrue\@abstractcenteredtrue \@bartrue \prptrue}
22
\newif\ifgtes \DeclareOption{gtes} {\@sansseriffacetrue\@sansserifheadertrue\@abstractcenteredtrue \@bartrue \gtestrue}
33
\newif\ifcopyediting \DeclareOption{copyediting}{\copyeditingtrue\@noreftrue}
4+
\newif\ifpolf \DeclareOption{polf}{\@sansseriffacetrue\@sansserifheadertrue\polftrue}
45
\newif\ifjbji \DeclareOption{jbji}{\@sansseriffacetrue\@sansserifheadertrue\@abstractcenteredtrue\@bartrue\jbjitrue}
56
\newif\ifmr \DeclareOption{mr}{\@sansseriffacetrue\@sansserifheadertrue\@abstractcenteredtrue\@bartrue\@twostagejnltrue\mrtrue}
67
\DeclareOption{mrd}{\@sansseriffacetrue\@sansserifheadertrue\@abstractcenteredtrue\@bartrue\@stage@finalfalse\mrtrue}
@@ -1026,13 +1027,26 @@
10261027
\def\@journalnameshort{JBJI}
10271028
\def\@journalnameshortlower{jbji}
10281029
\def\@journalstartyear{2016}
1029-
\def\@sentence{Published by Copernicus Publications on behalf of the European Bone and Joint Infection Society.}
1030+
\def\@sentence{Published by Copernicus Publications on behalf of of EBJIS and MSIS.}
10301031
\def\@journalurl{https://jbji.copernicus.org/}
10311032
\def\@journallogo{\includegraphics{JBJI_Logo.pdf}}
10321033
\definecolor{textcol}{rgb}{0.161,0.337,0.361}
10331034
\definecolor{bgcol}{rgb}{1,1,1}
10341035
\definecolor{barcol}{rgb}{1.0,1.0,1.0}
10351036
\definecolor{rulecol}{rgb}{0.161,0.337,0.361}
10361037
\fi
1038+
\ifpolf%classical
1039+
\def\@journalname{Polarforschung - Journal of the German Society for Polar Research}
1040+
\def\@journalnameabbreviation{Polarforschung}
1041+
\def\@journalnameshort{POLF}
1042+
\def\@journalnameshortlower{polf}
1043+
\def\@journalstartyear{2021}
1044+
\def\@sentence{Published by Copernicus Publications on behalf of the Deutsche Gesellschaft für Polarforschung e.V.}
1045+
\def\@journalurl{https://polf.copernicus.org}
1046+
\def\@journallogo{\includegraphics{POLF_Logo.pdf}}
1047+
\definecolor{textcol}{rgb}{0.306,0.525,0.682}
1048+
\definecolor{bgcol}{rgb}{1,1,1}
1049+
\definecolor{rulecol}{rgb}{1.0,1.0,1.0}
1050+
\fi
10371051
10381052
}

inst/rmarkdown/templates/copernicus/skeleton/copernicus.cls

Lines changed: 65 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
%% -----------------------------------------------------------------
1717
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
1818
\ProvidesClass{copernicus}
19-
[2020/10/29 9.21 Copernicus papers]
19+
[2021/01/12 9.25 Copernicus papers]
2020
\frenchspacing
2121
\clubpenalty10000
2222
\widowpenalty10000
@@ -752,7 +752,7 @@
752752
\ifdim\wd\z@>100mm\strut\newline\strut\fi
753753
\fi
754754
\fi
755-
\ifx\@published\@undefined\else \hbox{Published:\nobreakspace\@published}\fi
755+
\ifx\@published\@undefined\else \strut\hbox{Published:\nobreakspace\@published}\fi
756756
\strut\par\egroup
757757
\ifx\@howtocite\@empty\else\item[{How to cite:}]\@howtocite\fi
758758
\ifx\abstractexists\@undefined
@@ -1220,14 +1220,15 @@
12201220
\fi
12211221
\def\@tempa{%
12221222
\def\introductionname{Introduction}%
1223+
\def\authorcontributionname{Author contributions}%
12231224
\def\secabstractname{Kurzfassung}%
12241225
\def\conclusionname{Conclusions}%
12251226
\def\copyrightstatementname{Copyright statement}%
12261227
\def\codeavailabilityname{Code availability}%
12271228
\def\dataavailabilityname{Data availability}%
1229+
\def\ercavailabilityname{Executable research compendium (ERC)}%
12281230
\def\codedataavailabilityname{Code and data availability}%
12291231
\def\sampleavailabilityname{Sample availability}%
1230-
\def\authorcontributionname{Author contributions}%
12311232
\def\competinginterestsname{Competing interests}%
12321233
\def\videosupplementname{Video supplement}%
12331234
\def\dosupplementname{Supplement}%
@@ -1256,6 +1257,7 @@
12561257
\def\copyrightstatementname{Urheberrechtserklärung}%
12571258
\def\codeavailabilityname{Codeverfügbarkeit}%
12581259
\def\dataavailabilityname{Datenverfügbarkeit}%
1260+
\def\ercavailabilityname{Executable research compendium (ERC)}%
12591261
\def\codedataavailabilityname{Code- und Datenverfügbarkeit}%
12601262
\def\sampleavailabilityname{Probenverfügbarkeit}%
12611263
\def\authorcontributionname{Autorenmitwirkung}%
@@ -1285,6 +1287,7 @@
12851287
\def\copyrightstatementname{Affirmation du droit d'auteur}%
12861288
\def\codeavailabilityname{Disponibilité du code}%
12871289
\def\dataavailabilityname{Disponibilité des données}%
1290+
\def\ercavailabilityname{Executable research compendium (ERC)}%
12881291
\def\sampleavailabilityname{Disponibilité des examples}%
12891292
\def\codedataavailabilityname{Disponibilité du code et des données}%
12901293
\def\authorcontributionname{Collaborateurs}%
@@ -1519,6 +1522,7 @@
15191522
\setcounter{reaction}{0}%
15201523
\def\theequation{\thesection\@arabic\c@equation}%
15211524
\def\thereaction{\thesection R\@arabic\c@reaction}%
1525+
\let\c@org@lst\c@listings%
15221526
\let\c@org@eq\c@equation%
15231527
\let\org@theeq\theequation%
15241528
\if@stage@final
@@ -1528,6 +1532,9 @@
15281532
\@addtoreset{table}{section}%
15291533
\setcounter{table}{0}%
15301534
\def\thetable{\thesection\@arabic\c@table}%
1535+
\@addtoreset{listings}{section}%
1536+
\setcounter{listings}{0}%
1537+
\def\thelistings{\thesection\@arabic\c@listings}%
15311538
\fi
15321539
\global\let\old@sect\@sect
15331540
\def\@sect##1##2##3##4##5##6[##7]##8{%
@@ -1591,6 +1598,7 @@
15911598
\ifx\old@sect\@undefined\else\global\let\@sect\old@sect\fi
15921599
\ifx\old@ssect\@undefined\else\global\let\@ssect\old@ssect\fi
15931600
\def\thefigure{\@arabic\c@figure}%
1601+
\def\thelistings{\@arabic\c@listings}%
15941602
\def\thetable{\@arabic\c@table}}
15951603
\IfFileExists{url.sty}
15961604
{\RequirePackage{url}\urlstyle{same}}%
@@ -1738,45 +1746,49 @@
17381746
\g@addto@macro\subfiguresend{\global\let\theHfigure\thefigure@original}
17391747
\g@addto@macro\subtablesend{\global\let\theHtable\thetable@original}}
17401748
{\CopernicusWarningNoLine{Cannot find subfloat.sty; proceeding without it}}
1741-
\RequirePackage[authoryear,round]{natbib}
1742-
\def\NAT@sort{0}\def\NAT@cmprs{0}
1743-
\bibstyle{copernicus}
1744-
\setlength\bibsep\z@
1745-
\let\bibfont\small
1746-
\renewcommand\bibitem{\@ifnextchar[{\@lbibitem}{\@lbibitem[??(????)]}}%]
1747-
\ifx\xmltexversion\@undefined\else
1748-
\NAT@set@cites
1749-
\let\NAT@set@cites\relax
1750-
\fi
1751-
\AtBeginDocument{\let\@citex\NAT@citex}
1752-
\newcommand\urlprefix{}
1753-
\renewenvironment{thebibliography}[1]
1754-
{\bibsection
1755-
\if@secline\leavevmode\vspace*{-\baselineskip}\nobreak\fi
1756-
\parindent\z@
1757-
\bibpreamble
1758-
\bibfont
1759-
\list{\@biblabel{\arabic{NAT@ctr}}}{\@bibsetup{#1}%
1760-
\setcounter{NAT@ctr}{0}}%
1761-
\ifNAT@openbib
1762-
\renewcommand\newblock{\par}
1763-
\else
1764-
\renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
1765-
\fi
1766-
\sloppy
1767-
%\clubpenalty4000\widowpenalty4000
1768-
\sfcode`\.=1000\relax
1769-
\let\citeN\cite \let\shortcite\cite
1770-
\let\citeasnoun\cite}
1771-
{\def\@noitemerr{%
1772-
\PackageWarning{natbib}{Empty `thebibliography' environment}}%
1773-
\endlist\vskip-\lastskip}
1774-
\def\bibsection{%
1775-
\if@stage@final
1776-
\if@manuscript\newpage\fi
1777-
\pdfbookmark[1]{\refname}{biblio}%
1778-
\fi
1779-
\noappendix\section*{\refname\if@cop@home\ifonline\hypertarget{references}{}\fi\fi}}
1749+
1750+
\newif\ifNAT@openbib
1751+
\IfFileExists{natbib.sty}
1752+
{\RequirePackage[authoryear,round]{natbib}
1753+
\bibpunct{(}{)}{;}{a}{,}{,~}
1754+
\def\NAT@sort{0}\def\NAT@cmprs{0}
1755+
\setlength\bibsep\z@
1756+
\let\bibfont\small
1757+
\renewcommand\bibitem{\@ifnextchar[{\@lbibitem}{\@lbibitem[??(????)]}}%]
1758+
\ifx\xmltexversion\@undefined\else
1759+
\NAT@set@cites
1760+
\let\NAT@set@cites\relax
1761+
\fi
1762+
\AtBeginDocument{\let\@citex\NAT@citex}
1763+
\newcommand\urlprefix{}
1764+
\renewenvironment{thebibliography}[1]
1765+
{\bibsection
1766+
\if@secline\leavevmode\vspace*{-\baselineskip}\nobreak\fi
1767+
\parindent\z@
1768+
\bibpreamble
1769+
\bibfont
1770+
\list{\@biblabel{\arabic{NAT@ctr}}}{\@bibsetup{##1}%
1771+
\setcounter{NAT@ctr}{0}}%
1772+
\ifNAT@openbib
1773+
\renewcommand\newblock{\par}
1774+
\else
1775+
\renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}%
1776+
\fi
1777+
\sloppy
1778+
% \clubpenalty4000\widowpenalty4000
1779+
\sfcode`\.=1000\relax
1780+
\let\citeN\cite \let\shortcite\cite
1781+
\let\citeasnoun\cite}
1782+
{\def\@noitemerr{%
1783+
\PackageWarning{natbib}{Empty `thebibliography' environment}}%
1784+
\endlist\vskip-\lastskip}
1785+
\def\bibsection{%
1786+
\if@stage@final
1787+
\if@manuscript\newpage\fi
1788+
\pdfbookmark[1]{\refname}{biblio}%
1789+
\fi
1790+
\noappendix\section*{\refname\if@cop@home\ifonline\hypertarget{references}{}\fi\fi}}
1791+
}{\CopernicusWarningNoLine{Cannot find natbib.sty; proceeding without it}}
17801792
\RequirePackage{rotating}
17811793
\def\@rotxdblfloat#1[#2]{%
17821794
\@float{#1}[#2]%
@@ -2429,10 +2441,12 @@
24292441
\long\def\codeavailability#1{\ifx\thesection\theolds\else\noappendix\fi\section{\codeavailabilityname}#1}
24302442
\long\def\dataavailability#1{\ifx\thesection\theolds\else\noappendix\fi\section{\dataavailabilityname}#1}
24312443
\long\def\codedataavailability#1{\ifx\thesection\theolds\else\noappendix\fi\section{\codedataavailabilityname}#1}
2444+
\long\def\ercavailability#1{\ifx\thesection\theolds\else\noappendix\fi\section{\ercavailabilityname}#1}
24322445
\else
24332446
\generateCommand{codeavailability} {\endlist\egroup}
24342447
\generateCommand{dataavailability} {\endlist\egroup}
24352448
\generateCommand{codedataavailability}{\endlist\egroup}
2449+
\generateCommand{ercavailability}{\endlist\egroup}
24362450
\fi
24372451
\generateCommand{authorcontribution}{\endlist\egroup}
24382452
\generateCommand{sampleavailability}{\endlist\egroup}
@@ -2442,8 +2456,16 @@
24422456
\generateCommand{disclaimer} {\endlist\egroup}
24432457
\generateCommand{sistatement} {\endlist\egroup}
24442458
\generateCommand{dosupplement} {\endlist\egroup}
2445-
\generateCommand{financialsupport} {\endlist\egroup}
2459+
\generateCommand{financialsupport} {\endlist\egroup}
24462460
\generateCommand{reviewstatement} {\endlist\egroup}
2461+
\long\def\specialsection#1#2{%
2462+
\expandafter\def\csname specialsection-#1name\endcsname{#1}%
2463+
\expandafter\ifx\csname specialsection-#1name\endcsname\@empty
2464+
\PackageError{copernicus.cls}{\string\specialsection\space needs a heading.}{Make sure that \string\specialsection{}{}\space has two arguments and that the first argument contains a heading.}%
2465+
\else
2466+
\generateCommand{specialsection-#1} {\endlist\egroup}%
2467+
\csname specialsection-#1\endcsname{#2}%
2468+
\fi}
24472469
24482470
\generateCommand{acknowledgement} {} \def\endacknowledgement{\endlist\egroup}
24492471
\generateCommand{acknowledgements} {} \def\endacknowledgements{\endlist\egroup}

0 commit comments

Comments
 (0)