rmarkdown icon indicating copy to clipboard operation
rmarkdown copied to clipboard

Pandoc will start deprecate `--self-contained` in future version

Open cderv opened this issue 2 years ago • 1 comments

Today --self-contained implies --standalone. Now --embed-resources will do the self contained mechanism but possibly without doing the standalone part.

Equivalent of using custom template today with --self-contained and

$body$

This will need to be handled in all our format function, possibly with change of argument name to go with Pandoc change, or just adding standalone in all format.

Context in

  • Discussion: https://github.com/jgm/pandoc/issues/7331
  • PR: https://github.com/jgm/pandoc/pull/8121

cderv avatar Jun 15 '22 09:06 cderv

With Pandoc 2.19 out today, I can confirm that I am getting these warnings with rmarkdown::render():

[WARNING] Deprecated: --self-contained. use --embed-resources --standalone

IndrajeetPatil avatar Aug 04 '22 14:08 IndrajeetPatil

Yes thanks. We need to conditionally handle this now that Pandoc 2.19 is out. This is on the todo list

cderv avatar Aug 16 '22 17:08 cderv

Should be fixed now. You may install and test the development version via

remotes::install_github('rstudio/rmarkdown')

Thanks!

yihui avatar Aug 18 '22 01:08 yihui

Thanks @yihui !

cderv avatar Aug 18 '22 09:08 cderv

I worked on it because I received an email from CRAN yesterday telling me that they had upgraded (or tried to upgrade) to Pandoc 2.19 and saw this warning... We need to act sooner in future when we detect problems in the dev version of Pandoc, since it seems that CRAN tends to always install the latest version of Pandoc once it's released.

yihui avatar Aug 18 '22 13:08 yihui

This is really new to me and big news that they install the latest version of Pandoc now ! Thanks for sharing. It will be of interest to others I guess that rely on pandoc through R Markdown.

I agree that we should act sooner from now own. I was only following and opening issues as of now. As we don't really know when a new Pandoc version will be release and no information on the new version number they'll use, we'll have a to find a good way to add support for new thing conditionally. The recent update to nightly version number could help us.

I'll think about it, and we'll discuss.

cderv avatar Aug 18 '22 14:08 cderv

no information on the new version number they'll use, we'll have a to find a good way to add support for new thing conditionally

We may condition on if (pandoc_version() > CURRENT_LATEST_VERSION); pandoc_available() uses >=, which won't work.


Actually I just made a change in pandoc_version() in 45c6802e95c623ad458558315b40c21f059649a0 so that we can be more precise and use pandoc_available('X.Y.Z.YYYY.MM.DD') as the condition.

yihui avatar Aug 18 '22 16:08 yihui

Great thanks. That will help !

Pandoc team does not write changelog on the fly but at once before release I think. I'll ask Albert. We will need to watch out closer the PR merged in Pandoc also. I am already watching the repo but I'll pay attention more.

cderv avatar Aug 19 '22 12:08 cderv

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

github-actions[bot] avatar Feb 28 '23 05:02 github-actions[bot]