简体   繁体   中英

R pandoc() via knitr: How to define a configuration file to make it reflect my commandline Pandoc call?

I cannot find any thorough description of how to define configuration file for a document conversion with the knitr package pandoc() function. I do know this document by YIHUI XIE, but still find it difficult to receive an equivalent of the following Pandoc commandline call:

pandoc -t slidy -s pander_test.md -o pander_test_slidy.html

in R . I tried (with the configurations embedded in my .md file):

<!--pandoc
t: slidy
s:
o: pander_output_slidy.html
-->

And the R console said:

> pandoc("pander_test.md")
executing pandoc  -t slidy -s -o pander_output_slidy.html -f markdown -t html -o  pander_test.html "pander_test.md"
[1] "pander_test.html"

Which:

  • looks differently from the commadline Pandoc call I would like to reflect to,
  • generates the result different from what I expect (I receive plain HTML , not slides as I would like to).

Any suggestions / references? Thank you in advance for any help.

Call pandoc("pander_test.md", format = 'slidy') , and use the configuration

<!--pandoc
s:
o: pander_output_slidy.html
-->

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM