Open zavud opened 6 months ago
@nuest (a friendly and kind ping :) )
I took your example and render the bookdown::pdf_book
format
and it works
At R command line, you can use rmarkdown::render("test.Rmd", output_format = "bookdown::pdf_book")
Otherwise, just include this output format in your Rmd file, and render.
@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?
I am not sure I follow...
Doing this is the R Markdown way to get access to bookdown specific feature with another base format
bookdown::pdf_book:
base_format: rticles::copernicus_article # for using bookdown features like \@ref()
This is how you get the special syntax \@ref(fig:myfig)
to work.
Without it, if you do only
rticles::copernicus_article:
highlight: NULL
keep_tex: true
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:
Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8
Package version: base64enc_0.1.3 bslib_0.6.1 cachem_1.0.8 cli_3.6.2 digest_0.6.33 ellipsis_0.3.2
evaluate_0.23 fastmap_1.1.1 fontawesome_0.5.2 fs_1.6.3 glue_1.6.2 graphics_4.3.2
grDevices_4.3.2 highr_0.10 htmltools_0.5.7 jquerylib_0.1.4 jsonlite_1.8.8 knitr_1.45
lifecycle_1.0.4 magrittr_2.0.3 memoise_2.0.1 methods_4.3.2 mime_0.12 R6_2.5.1
rappdirs_0.3.3 rlang_1.1.2 rmarkdown_2.25 rticles_0.25.5 sass_0.4.8 stats_4.3.2
stringi_1.8.3 stringr_1.5.1 tinytex_0.49 tools_4.3.2 utils_4.3.2 vctrs_0.6.5
xfun_0.41 yaml_2.3.8