You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copernicus template update - fixes syntax highlight problem (#391)
* Update template for follow guidelines from Copernicus: no additional packages can be used from those in the cls file. This requires to deactivate Pandoc highlighting for typesetting. algorithms packages can't be loaded in template too
* Adapt the skeleton and document all this. Add command to install packages in the skeleton.
Co-authored-by: Christophe Dervieux <[email protected]>
- Update Copernicus Publications template to comply with editor's guidelines following a manuscript bounce back during the typesetting step. Copernicus does not allow to add any `\usepackage` command as they all are included in `copernicus.cls` for supported LaTeX packages. **This is leading to breaking changes with existing template - please follow the advice below**.
5
+
-`algorithms: true` cannot be used anymore and as no more effect. `\usepackage{algorithmic}` and `\usepackage{algorithm}` has been removed from the template as the command are already done in `copernicus.cls`. Please, make sure `algorithms` and `algorithmcx` are installed.
6
+
- Additionally, the template gained support for the `highlight` parameter of `rmarkdown::pdf_document` to enable or disable syntax highlighting with Pandoc. To comply with the above guideline by Copernicus, it is disabled by default (`highlight: NULL`) to prevent Pandoc adding any more packages required for its highlighting. Syntax highlighting can be reactivating by using `highlight: "default"` in the YAML header as this can be desirable before submitting for typesetting. (thanks, @RLumSK, @nuest, #391).
7
+
4
8
- Fix issue with Pandoc's citation processing by updating all templates with last relevant changes from Pandoc's default template (thanks, @BlackEdder, @dahrens, #390)
5
9
6
10
- remove warning in `joss_article()` about `citation_package` (thanks, @llrs, #389).
Copy file name to clipboardExpand all lines: R/copernicus_article.R
+17-7Lines changed: 17 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,8 @@
3
3
#' Format for creating submissions to Copernicus journals.
4
4
#'
5
5
#' @inheritParams rmarkdown::pdf_document
6
-
#' @param ... Additional arguments to \code{rmarkdown::pdf_document()}.
6
+
#' @param ... Additional arguments to \code{rmarkdown::pdf_document()}. \bold{Note}: \code{extra_dependencies} are not
7
+
#' allowed as Copernicus does not support additional packages included via \code{\\usepackage{}}.
7
8
#' @param journal_name A regular expression to filter the by the journal name, see \code{pattern} in \code{\link[base]{grep}}; defaults to \code{*}.
8
9
#'
9
10
#' @return An R Markdown output format.
@@ -12,21 +13,23 @@
12
13
#'
13
14
#' 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.
14
15
#'
15
-
#' \strong{Version:} Based on copernicus_package.zip in the version 5.3, 18 February 2019, using \code{copernicus.cls} in version 8.82.
16
+
#' \strong{Version:} Based on \code{copernicus_package.zip} in the version 6.2, 15 January 2021, using \code{copernicus.cls} in version 9.25.
16
17
#'
17
-
#' \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.
18
+
#' \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.
18
19
#'
19
20
#' \strong{Important note:} The online guidelines by Copernicus are the official resource.
20
21
#' Copernicus is not responsible for the community contributions made to support the template in this package.
21
-
#' Copenicus converts all typeset TeX files into XML, the expressions and markups have to be highly standardized.
22
+
#' Copernicus converts all typeset TeX files into XML, the expressions and markups have to be highly standardized.
22
23
#' Therefore, please keep the following in mind:
23
24
#'
24
25
#' \itemize{
25
26
#' \item Please provide only one figure file for figures with several panels, and please do not use \code{\\subfloat} or similar commands.
26
27
#' \item Please use only commands in which words, numbers, etc. are within braces (e.g. \code{\\textrm{TEXT}} instead of \code{{\\rm TEXT}}).
27
28
#' \item For algorithms, please use the syntax given in template.tex or provide your algorithm as a figure.
28
29
#' \item Please do not define new commands.
29
-
#' \item The most commonly used packages (\code{\\usepackage{}}) are integrated in the copernicus.cls. Some other packages often used by the community are defined in template.tex. Please do not insert additional ones in your *.tex file.
30
+
#' \item Supported packages (\code{\\usepackage{}}) are already integrated in the \code{copernicus.cls}. Please do not insert additional ones in your \code{*.tex} file.
31
+
#' \item If you opt for syntax highlighting for your preprint or other reasons, please do not forget to use
32
+
#' \code{highlight = NULL} for your final file upload once your manuscript was accepted for publication.
30
33
#' \item Spaces in labels (\code{\\label{}}) are not allowed; please make sure that no label name is assigned more than once.
31
34
#' \item Please do not use \code{\\paragraph{}}; only \code{\\subsubsection{}} is allowed.
32
35
#' \item It is not possible to add tables in colour.
Copy file name to clipboardExpand all lines: inst/rmarkdown/templates/copernicus/skeleton/skeleton.Rmd
+29-9Lines changed: 29 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -46,8 +46,6 @@ running:
46
46
# This section is mandatory even if you declare that no competing interests are present.
47
47
competinginterests: |
48
48
The authors declare no competing interests.
49
-
# OPTIONAL:
50
-
algorithms: true
51
49
# See https://publications.copernicus.org/for_authors/licence_and_copyright.html, normally used for transferring the copyright, if needed.
52
50
# Note: additional copyright statements for affiliated software or data need to be placed in the data availability section.
53
51
copyrightstatement: |
@@ -87,15 +85,17 @@ appendix: |
87
85
88
86
Please add `\clearpage` between each table and/or figure. Further guidelines on figures and tables can be found below.
89
87
output:
90
-
rticles::copernicus_article: default
88
+
rticles::copernicus_article:
89
+
highlight: NULL
90
+
keep_tex: true
91
91
bookdown::pdf_book:
92
92
base_format: rticles::copernicus_article # for using bookdown features like \@ref()
93
93
---
94
94
95
95
\introduction[Introduction]
96
96
97
97
Introduction text goes here.
98
-
You can change the name of the section if neccessary using `\introduction[modified heading]`.
98
+
You can change the name of the section if necessary using `\introduction[modified heading]`.
99
99
100
100
The following settings can or must be configured in the header of this file and are bespoke for Copernicus manuscripts:
101
101
@@ -119,8 +119,23 @@ The following settings can or must be configured in the header of this file and
119
119
120
120
See the defaults and examples from the skeleton and the official Copernicus documentation for details.
121
121
122
-
**Important**: Always double-check with the official manuscript preparation guidelines at [https://publications.copernicus.org/for_authors/manuscript_preparation.html](https://publications.copernicus.org/for_authors/manuscript_preparation.html), especially the sections "Technical instructions for LaTeX" and "Manuscript composition".
If you want to use algorithms, you can either enable the required packages in the header (the default, see `algorithms: true`), or make sure yourself that the \LaTeX packages `algorithms` and `algorithmicx` are installed so that `algorithm.sty` respectively `algorithmic.sty` can be loaded by the Copernicus template.
296
-
Copernicus staff will remove all undesirable packages from your LaTeX source code, so please stick to using the header option, which only adds the two acceptable packages.
310
+
If you want to use algorithms, you need to make sure yourself that the \LaTeX packages `algorithms` and `algorithmicx` are installed so that `algorithm.sty` respectively `algorithmic.sty` can be loaded by the Copernicus template. Both need to be available through your preferred \LaTeX{} distribution. With TinyTeX (or TeX Live), you can do so by running `tinytex::tlmgr_install(c("algorithms", "algorithmicx"))`
Copernicus staff will no accept any additional packages from your LaTeX source code, so please stick to these two acceptable packages. They are needed to use the example below
0 commit comments