pandoc

Set page width in Knitr for md or HTML output

倖福魔咒の 提交于 2019-12-09 16:33:42
问题 I am having knitr to create an output of my statistical analysis along with figures. My analysis has a number of levels that are marked by headers. To get the nice html page with table of contents on the side I use "pander" (pandoc R package) to convert my .md file to html because knitr does not embed table of contents in the html file. The problem: When I use pander it creates a fixed width page (quite narrow) where my large figures need to be scrolled left and right. Is there any way to

How to move the bibliography in markdown/pandoc

时间秒杀一切 提交于 2019-12-08 16:21:24
问题 I'm currently writing my bachelor thesis and my instructor wants me to put my appendix after the bibliography but markdown/pandoc puts the references at the end by default. I read the instructions at http://yihui.name/knitr/demo/pandoc/ and tried to use the include-after-body=FILE command to put a separate .rmd file at the end of the document My code looks like this: ```{r, echo=FALSE, warning=FALSE, message=FALSE} library(knitr) pandoc('thesis.rmd', format="latex") ``` and for the options: <

In Pandoc, how do I add a newline between authors through the YAML metablock without modifying the template?

拟墨画扇 提交于 2019-12-08 08:03:59
问题 I am trying to add a a couple of authors to a report I am writing. Preferably, the second author would appear on a new line after the first. I know I can modify the template to add a new field or the multiple author example given in the Pandoc readme. However, I wonder if there is any character I can use to insert a new line between authors directly in the metablock. So far I have tried \newline , \\ , | with newline and space, <br> , <div></div> , and making the author list a string with

prevent pandoc from converting $ into mediawiki <math>

谁说我不能喝 提交于 2019-12-08 03:36:55
问题 I am converting a markdown file into mediawiki table using pandoc: content of file mtcars.md : | |c1 |c2 | |:--|:----|:--| |7 |P$A |A | |8 |AB |B | |9 |P$A |C | Then I do (I am using Ubuntu 64 bits and pandoc version 1.13.2) pandoc -t mediawiki -o mtcars.txt mtcars.md But the two $ signs are interpreted as <math>...</math> : {| ! !c1 !c2 |- |7 |P<math>A |A | |8 |AB |B | |9 |P</math>A |C |} How can I get the dollar signs instead? 回答1: The pandoc documentation says: Anything between two $

markdown tables on GitHub via Pandoc

。_饼干妹妹 提交于 2019-12-08 03:07:55
问题 When I combine several .md files with tables into a single .pdf and a single .md file using Pandoc, only the .pdf maintains formatting. I created a simple repository that has four .md files showing each table example on the Pandoc website. I compiled with the following commands: pandoc -o README.md *.md pandoc -o README.pdf *.md As you can see from the repository, the (pdf) looks fine, but the markdown file showing on GitHub as the readme does not. Also, of the four individual .md files, only

How do I include ggplots using pander's live report generation

回眸只為那壹抹淺笑 提交于 2019-12-07 22:58:27
问题 I am using pander to create docx reports via Windows7, following the examples at http://rapporter.github.io/pander/#live-report-generation. myReport <- Pandoc$new(author="Jerubaal",title="Plot Anything", format="docx") I've tried the example myReport$add(plot(1:10)) and that doesn't work on Windows, but does on Linux. Previously I got plots appearing using brew files and <%=plot(1:10)=>, but I am trying out the Live Report Generation because that method seems most suited to me. I've also

Converting Rmarkdown to PDF without RStudio

本小妞迷上赌 提交于 2019-12-07 14:48:02
问题 I would like to convert a *.Rmd to document to PDF without rstudio being available. Current approach Current approach follows the following steps: *.Rmd document is passed to knitr : knit(input = "report.Rmd")) Obtained md is converted via pandoc: # Convert pandoc --smart --to latex \ --latex-engine pdflatex \ -s report.md \ -o report.PDF Problems This results in the following problems, the top section of the Rmarkdown document: --- title: "Report Title" author: "Person" output: pdf_document

R Markdown horizontal rule that will also work with LaTeX pdf?

試著忘記壹切 提交于 2019-12-07 12:36:52
问题 I am aware that *** is Pandoc's Markdown for a horizontal rule. This horizontal line looks good on HTML, but if I knit my Markdown into a pdf the horizontal rule only runs half the width of the pdf, and it is centered. This combination just makes the horizontal rule look plain ugly. How do I properly put a horizontal rule in my R Markdown that can render properly to both HTML and pdf? Properly == full length/full width . And while I'm at it, can I format the horizontal rule (color, thickness,

Table layouts for use with Pandoc

落花浮王杯 提交于 2019-12-07 12:30:23
问题 I'm trying to create a document generation workflow (professional documents). The goal is to write as much as possible in Markdown. The resulting document should be PDF, while still being able to export to .docx if necessary. I've settled on Pandoc, for which I'll create a Latex template and use a YAML document to hold the document metadata. So far so good. However, from time to time I need to use tables, ranging from very simple ones to more complex layouts with e.g. column spanning.

pandoc: How to link to a section in another markdown file?

走远了吗. 提交于 2019-12-07 07:15:01
问题 I would like to create two markdown files with links between their sections. The challenge here it's that I want the files to work correctly whether I ask pandic to concatenate them to a single HTML file, or to separate HTML files. The trouble is that in the latter case the link needs to know there name of the other HTML file in order to work properly. It's there some way for pandoc to manage this without creating distinct versions of the markdown input? 回答1: The following uses lua filters to