pandoc

Pandoc 'Could not find module …' for installed module

倾然丶 夕夏残阳落幕 提交于 2021-01-27 06:31:36
问题 I'm currently trying to use pandoc (as a Haskell module, not as a program) to convert MediaWiki text to other formats. Let's assume this program: import Text.Pandoc.Readers.MediaWiki main = do print "foo" When using runghc to run it, I get the following error message: pandock.hs:1:8: Could not find module `Text.Pandoc.Readers.MediaWiki' Use -v to see a list of the files searched for. My first assumption was that pandoc was either not installed or incorrectly installed. Therefore I reinstalled

More flexible citation formats

巧了我就是萌 提交于 2021-01-27 05:44:17
问题 I love to use citations in my r bookdown projects. The format is not very flexible, I can use @citeID to get "Author(Year)" or [@citeID] to get "(Author Year)". Sometimes I only need "(Year)" or "Year" or I may only need "Author Year" with no parentheses at all. Finally I need to add a page reference to the citation like "Author (Year:Pages)" Can anybody give me a hint, where the relevant code sits in the source so that I can start adding some cite-formats as described above? 回答1: There are

incorporate code listings from an external file in knitr/markdown

ⅰ亾dé卋堺 提交于 2021-01-22 06:55:17
问题 I would like to incorporate listings of code drawn from external files in an Rmarkdown file. I would like it pretty (syntax highlighting, auto-indentation, etc.). The code is not R code (otherwise I could use some of the existing tricks to pretty-print R functions) - specifically, it's BUGS and Stan code. I'm not necessarily targeting LaTeX/PDF output: otherwise I could use the listings package. I'd like to be able to incorporate the files without an unwieldy external cat firstpart.rmd

incorporate code listings from an external file in knitr/markdown

痴心易碎 提交于 2021-01-22 06:54:48
问题 I would like to incorporate listings of code drawn from external files in an Rmarkdown file. I would like it pretty (syntax highlighting, auto-indentation, etc.). The code is not R code (otherwise I could use some of the existing tricks to pretty-print R functions) - specifically, it's BUGS and Stan code. I'm not necessarily targeting LaTeX/PDF output: otherwise I could use the listings package. I'd like to be able to incorporate the files without an unwieldy external cat firstpart.rmd

Add inline image in Rmarkdown

旧时模样 提交于 2020-12-30 08:12:03
问题 I can't find a way to insert an inline image on a markdown document I'm producing with RStudio. Seems like the RmarkDown Style Cheat sheet (https://www.rstudio.com/wp-content/uploads/2016/03/rmarkdown-cheatsheet-2.0.pdf) does not mention such feature. Is this currently possible? Here's an example using html for a svg image: link: http://www.herongyang.com/HTML/HTML5-Add-Inline-SVG-Image-HTML5-Documents.html 回答1: Markdown syntax allows inline images: foo ![](image.png) bar 回答2: Could also use

Add inline image in Rmarkdown

这一生的挚爱 提交于 2020-12-30 08:10:06
问题 I can't find a way to insert an inline image on a markdown document I'm producing with RStudio. Seems like the RmarkDown Style Cheat sheet (https://www.rstudio.com/wp-content/uploads/2016/03/rmarkdown-cheatsheet-2.0.pdf) does not mention such feature. Is this currently possible? Here's an example using html for a svg image: link: http://www.herongyang.com/HTML/HTML5-Add-Inline-SVG-Image-HTML5-Documents.html 回答1: Markdown syntax allows inline images: foo ![](image.png) bar 回答2: Could also use

Add inline image in Rmarkdown

烂漫一生 提交于 2020-12-30 08:08:26
问题 I can't find a way to insert an inline image on a markdown document I'm producing with RStudio. Seems like the RmarkDown Style Cheat sheet (https://www.rstudio.com/wp-content/uploads/2016/03/rmarkdown-cheatsheet-2.0.pdf) does not mention such feature. Is this currently possible? Here's an example using html for a svg image: link: http://www.herongyang.com/HTML/HTML5-Add-Inline-SVG-Image-HTML5-Documents.html 回答1: Markdown syntax allows inline images: foo ![](image.png) bar 回答2: Could also use

Add inline image in Rmarkdown

孤街醉人 提交于 2020-12-30 08:06:57
问题 I can't find a way to insert an inline image on a markdown document I'm producing with RStudio. Seems like the RmarkDown Style Cheat sheet (https://www.rstudio.com/wp-content/uploads/2016/03/rmarkdown-cheatsheet-2.0.pdf) does not mention such feature. Is this currently possible? Here's an example using html for a svg image: link: http://www.herongyang.com/HTML/HTML5-Add-Inline-SVG-Image-HTML5-Documents.html 回答1: Markdown syntax allows inline images: foo ![](image.png) bar 回答2: Could also use

How to align text using pandoc with lua-filters?

半城伤御伤魂 提交于 2020-12-15 01:56:02
问题 How to align all h1 headers of the pdf to center using pandoc with lua-filters? I have the test.md file bellow: <center> # Chapter 1 </center> <right> ## Sub-1-1 </right> <left> ### Sub-1-2 </left> <center> # Chapter 2 </center> <right> ## Sub-2-1 </right> <left> ### Sub-2-2 </left> And I need to align center all "Chapters" to center, all the "Sub- -1" to right and all the "Sub- -2" to left using tags as above, to stay like: Chapter 1 Sub-1-1 Sub-1-2 Chapter 2 Sub-2-1 Sub-2-2 I can uppcase

How to align text using pandoc with lua-filters?

无人久伴 提交于 2020-12-15 01:53:03
问题 How to align all h1 headers of the pdf to center using pandoc with lua-filters? I have the test.md file bellow: <center> # Chapter 1 </center> <right> ## Sub-1-1 </right> <left> ### Sub-1-2 </left> <center> # Chapter 2 </center> <right> ## Sub-2-1 </right> <left> ### Sub-2-2 </left> And I need to align center all "Chapters" to center, all the "Sub- -1" to right and all the "Sub- -2" to left using tags as above, to stay like: Chapter 1 Sub-1-1 Sub-1-2 Chapter 2 Sub-2-1 Sub-2-2 I can uppcase