rmarkdown-cookbook icon indicating copy to clipboard operation
rmarkdown-cookbook copied to clipboard

Knitr advanced usage : change pattern for parsing

Open cderv opened this issue 5 years ago • 4 comments

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

  • Asciidoc : https://github.com/yihui/knitr-examples/blob/master/089-minimal.Rasciidoc
  • textfile: https://github.com/yihui/knitr-examples/blob/master/105-minimal.Rtextile

cderv avatar Dec 02 '18 17:12 cderv

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

dr-harper avatar Apr 13 '19 06:04 dr-harper

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 ?

cderv avatar Apr 13 '19 09:04 cderv

I think this is way too advanced...

yihui avatar Apr 29 '20 03:04 yihui

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

cderv avatar Jan 07 '21 11:01 cderv