rstudio / rmarkdown-cookbook

R Markdown Cookbook. A range of tips and tricks to make better use of R Markdown.
https://bookdown.org/yihui/rmarkdown-cookbook/
580 stars 224 forks source link

Knitr advanced usage : change pattern for parsing #143

Open cderv opened 5 years ago

cderv commented 5 years ago

Talk somehow about how knitr can work with several input document pretty easily by using patterns Included pattern are :

pat_rnw()
pat_brew()
pat_tex()
pat_html()
pat_md()
pat_rst()
pat_asciidoc()
pat_textile()

and associated render functions

render_html()
render_asciidoc()
render_latex()
render_sweave()
render_listings()
render_markdown(strict = FALSE, fence_char = "`")
render_jekyll(highlight = c("pygments", "prettify", "none"), extra = "")
render_rst(strict = FALSE)
render_textile()

Only one knitr example about that : https://github.com/yihui/knitr-examples/blob/master/041-label-i.Rmd

and also several about other format like

dr-harper commented 5 years ago

I am not entirely sure I understand how this could be used? Would you be able to explain?

cderv commented 5 years ago

Yes I’ll be able to explain this. I can work on mainly every ticket I opened so feel free to assign me with what you are not interested or not at ease.

For this one, I have opened because this is a pretty advance feature of knitr not known and I wanted to see if it was still useful. Main concern is that I am not sure this is directly rmarkdown related and we are writing a rmarkdown cookbook. We could Add a tag « on hold » to tag issue we don’t want to close but are not prioritized and need Loren information but later. What do you think ?

yihui commented 4 years ago

I think this is way too advanced...

cderv commented 3 years ago

I'll reopen to consider for second edition. There was a question in https://github.com/yihui/knitr/issues/1939 and https://stackoverflow.com/questions/58694897/using-purl-to-source-a-rmd-file-from-within-a-rnw-file