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
I am using the copernicus template and I want to cross-reference figures, but somehow I can't. Please see the r code chunk below:
---
title: Template for preparing your manuscript submission to Copernicus journals using RMarkdown
journal: "`r rticles::copernicus_journal_abbreviations(journal_name = 'communication')`"
author:
- given_name: Daniel
surname: Nüst
affiliation: "1, *"
email: daniel.nuest@uni-muenster.de
corresponding: true
- given_name: Josiah
surname: Carberry
affiliation: 2
email: j.carberry@orcid.org
- given_name: Markus
surname: Konkol
affiliation: "1, *"
- given_name: Nikolaus
surname: Copernicus
# authors can have multiple affiliations, which can also be used to mark deceased coauthors
affiliation: "3, †"
# If you have more than one corresponding author, add them manually using the following structure (note the commas):
# Two authors: Daniel Nüst (daniel.nuest@uni-muenster.de) and Josiah Carberry (j.carberry@orcid.org)
# Three authors or more: Daniel Nüst (daniel.nuest@uni-muenster.de), Josiah Carberry (j.carberry@orcid.org), and Markus Konkol (m.konkol@wwu.de)
# If the following line is uncommented, the "corresponding: true" above are ignored
#correspongdingauthors: Daniel Nüst (daniel.nuest@uni-muenster.de) and Josiah Carberry (j.carberry@orcid.org)
# If an author is deceased, please mark the respective author name(s) with a dagger '†' and add a further affiliation; put the decease date in the 'address' field", see 'Nikolaus Copernicus' in template.
# If authors contributed equally, please mark the respective author names with an asterisk '*' and add a further affiliation: 'These authors contributed equally to this work.'", see template.
affiliation:
- code: 1
address: Institute for Geoinformatics, University of Münster, 48149 Münster, Germany
- code: 2
address: Psychoceramics, Wesleyan University, Middletown, CT, United States
- code: 3
address: University of Ferrara, Ferrara, Italy
- code: "†"
address: deceased, 24 May 1543
- code: "*"
address: These authors contributed equally to this work.
abstract: |
The abstract goes here.
It can also be on _multiple lines_.
bibliography: sample.bib
running:
title: R Markdown Template for Copernicus
author: Nüst et al.
# This section is mandatory even if you declare that no competing interests are present.
competinginterests: |
The authors declare no competing interests.
# See https://publications.copernicus.org/for_authors/licence_and_copyright.html, normally used for transferring the copyright, if needed.
# Note: additional copyright statements for affiliated software or data need to be placed in the data availability section.
copyrightstatement: |
The author's copyright for this publication is transferred to institution/company.
### The following commands are for the statements about the availability of data sets and/or software code corresponding to the manuscript.
### It is strongly recommended to make use of these sections in case data sets and/or software code have been part of your research the article is based on.
### Note: unless stated otherwise, software and data affiliated with the manuscript are assumed to be published under the same licence as the article (currently Creative Commons 4.0)
availability:
#code: |
# use this to add a statement when having only software code available
#data: |
# use this to add a statement when having only data sets available
codedata: |
use this to add a statement when having data sets and software code available
sample: |
use this section when having geoscientific samples available
videosupplement: |
use this section when having video supplements available
authorcontribution: |
Daniel wrote the package. Josiah thought about poterry. Markus filled in for a second author.
disclaimer: |
We like Copernicus.
acknowledgements: |
Thanks to the rticles contributors!
appendix: |
\section{Figures and tables in appendices}
Regarding figures and tables in appendices, the following two options are possible depending on your general handling of figures and tables in the manuscript environment:
\subsection{Option 1}
If you sorted all figures and tables into the sections of the text, please also sort the appendix figures and appendix tables into the respective appendix sections.
They will be correctly named automatically.
\subsection{Option 2}
If you put all figures after the reference list, please insert appendix tables and figures after the normal tables and figures.
To rename them correctly to A1, A2, etc., please add the following commands in front of them:
`\appendixfigures` needs to be added in front of appendix figures
`\appendixtables` needs to be added in front of appendix tables
Please add `\clearpage` between each table and/or figure. Further guidelines on figures and tables can be found below.
output:
rticles::copernicus_article:
highlight: NULL
keep_tex: true
bookdown::pdf_book:
base_format: rticles::copernicus_article # for using bookdown features like \@ref()
---
\introduction[Introduction]
Figure \@ref(fig:myfig) shows cars!
```{r myfig, echo=FALSE, fig.cap = "Cars"}
plot(mtcars$mpg, mtcars$cyl)
```
I have provided the necessary information about my issue.
If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('rticles'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/rticles').
If I have posted the same issue elsewhere, I have also mentioned it in this issue.
I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered:
@cderv, thanks, it works when I use pdf_book. But, I thought I should render using copernicus_article to fully make use of the article template. Or does that not matter?
the bookdown feature won't work. However, usually when using rticles you expect only LaTeX. This means that you can use directly LaTeX syntax to create references to your figure after adding labels;
It should work as R Markdown (Pandoc) should accept raw LaTeX without processing it.
I am using the copernicus template and I want to cross-reference figures, but somehow I can't. Please see the r code chunk below:
The resulted text look like this:
Session info:
By filing an issue to this repo, I promise that
xfun::session_info('rticles')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/rticles')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: