pandoc

Pandoc: Long tablerows in Markdown->PDF documents do not get linewrap

风格不统一 提交于 2019-12-18 05:47:17
问题 I am using Pandoc to generate markdown->DOCX documents with a lot of tables but would like better control over the layout. I am now trying to output markdown->PDF as well, but have run into problems with table output. In DOCX, long rows with text are simply broken up into multiple lines. In the PDF document this does not happen; a row is always a single line that do not wrap at the right margin but continue outside of the page. Normal paragraph text flows according to the right margin, so the

NOTE or WARNING from package check when README.md includes images

半腔热情 提交于 2019-12-18 04:39:09
问题 I have a package with a README.Rmd that I pass to rmarkdown::render() producing README.md and a directory README_files , which contains images in README.md . This looks like the tree below. README_files is not a standard package directory, so if it isn't in .Rbuildignore , checking the package with R CMD check shows a note: * checking top-level files ... NOTE Non-standard file/directory found at top level: README_files But including the directory in .Rbuildignore leads to a warning, if and

Pandoc - Inserting pages before generated Table of Contents

五迷三道 提交于 2019-12-18 04:35:24
问题 I've been playing around with Pandoc. Is there anyway to insert pages before the generated Table of Contents? For example: Title Page Insert Custom Page 001 Insert Custom Page 002 (Generated) Table of Contents Many thanks in advance! 回答1: For this answer, I'm going to assume you are generating markdown, though the process is the same for other file formats as well. The key insight is that Pandoc uses templates to determine the final placement. It has default templates and if you modify them,

Pandoc insert appendix after bibliography

邮差的信 提交于 2019-12-17 22:34:47
问题 I'm using the knitr package and pandoc in R to convert a .Rmd file to a PDF. Pandoc is linked to a .bib file and automatically inserts the bibliography at the end of the PDF The entries in my .bib file look like these, taken from http://johnmacfarlane.net/pandoc/demo/biblio.bib: @Book{item1, author="John Doe", title="First Book", year="2005", address="Cambridge", publisher="Cambridge University Press" } @Article{item2, author="John Doe", title="Article", year="2006", journal="Journal of

Simple manual RMarkdown tables that look good in HTML, PDF and DOCX

限于喜欢 提交于 2019-12-17 21:27:23
问题 How can I manually and simply format a table in RMarkdown that will look good when converted to HTML (using the knitr and markdown packages), PDF (using pandoc and miktex) and docx (using pandoc)? I want to be able to write small tables in RMarkdown that are not a result of R functions that look good in the three formats I use most often. So far I've found a format that looks good in 2 of the 3 formats, is 3/3 possible? One. This looks good after Knit HTML but not good in the PDF or docx

how can xtable do cell coloring

只愿长相守 提交于 2019-12-17 19:25:07
问题 I have this table in a .RMD file and I would like to render in PDF with conditional formatting. Currently I am using pandoc. How can this be done with xtable? table = data.frame(category = c("A","B","C"), groupA = c(.2,.3,.5), groupB= c(.6,.7,.9)) table pandoc.table(table,split.table = Inf,keep.line.breaks = TRUE) ---------------------------- category groupA groupB ---------- -------- -------- A 0.2 0.6 B 0.3 0.7 C 0.5 0.9 ---------------------------- How can I color the cells of the "groupA"

Rmarkdown HTML Template produces pandoc error 61

这一生的挚爱 提交于 2019-12-17 16:49:38
问题 Rmarkdown seams not working as usual after installing R3.4.3: When knitting that HTML-Template: --- title: "Untitled" output: html_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## R Markdown I always get the error 'Error: pandoc document conversion failed with error 61' When setting self_contained: no in the YAML-header knitting works again Is there anything I can do to get standalone html files ? 回答1: Finally I think found a solution which works after

How to add a page break in word document generated by RStudio & markdown

こ雲淡風輕ζ 提交于 2019-12-17 09:42:01
问题 I writing a Word document with R markdown in R Studio. I can get many things, but at the moment I am not figuring out how can I get a page break. I have found solutions but only for rendered latex / pdf document that it is not my case. 回答1: There is an easier way by using a fifth-level header block ( ##### ) and a docx template defined in YAML. After creating headingfive.docx in Microsoft Word, you select Modify Style of the Heading 5 , and then select Page break before in the Line and Page

How to add a page break in word document generated by RStudio & markdown

假如想象 提交于 2019-12-17 09:41:31
问题 I writing a Word document with R markdown in R Studio. I can get many things, but at the moment I am not figuring out how can I get a page break. I have found solutions but only for rendered latex / pdf document that it is not my case. 回答1: There is an easier way by using a fifth-level header block ( ##### ) and a docx template defined in YAML. After creating headingfive.docx in Microsoft Word, you select Modify Style of the Heading 5 , and then select Page break before in the Line and Page

How to set size for local image using knitr for markdown?

不想你离开。 提交于 2019-12-17 04:10:22
问题 I have a local image that I would like to include in an .Rmd file which I will then knit and convert to HTML slides with Pandoc . Per this post, this will insert the local image : ![Image Title](path/to/your/image) Is there a way to modify this code to also set the image size? 回答1: You can also read the image using png package for example and plot it like a regular plot using grid.raster from the grid package. ```{r fig.width=1, fig.height=10,echo=FALSE} library(png) library(grid) img <-