rrtools icon indicating copy to clipboard operation
rrtools copied to clipboard

Separate sections for figures and figure captions

Open Aariq opened this issue 4 years ago • 1 comments

I'm not sure if this is possible with bookdown and knitr, but it would be great if you could write your paper.Rmd with inline figure chunks, but then have them knit with figures and figure captions in separate sections at the end of the document, as is required of many journals for submission. I'd love to see it as simple as a YAML option (figs = "end"), but maybe it could be done with something like knitr::opts_chunk$set(fig.show = "hide") in the setup chunk and function that generates the appropriate markdown to read in and print all the figures that you could place anywhere in the document. I don't know enough about R Markdown to know if this is even a possibility though.

Aariq avatar May 04 '21 20:05 Aariq

That's not really a question for rrtools, because it's not part of the rendering pipeline.

papaja has a figsintext option that triggers floatsintext from the underlying LaTeX class. But that's pretty specific for this setup.

Maybe you could open an issue in the knitr repo. If you need a solution NOW you could write a script that moves figure producing code chunks to the end of the document before rendering.

nevrome avatar May 11 '21 08:05 nevrome