pandoc

How to specify numbered sections in Pandoc's front matter?

让人想犯罪 __ 提交于 2019-11-30 00:34:14
问题 I would like to specify numbered sections via Pandoc's support for YAML front matter. I know that the flag for the command-line usage is --number-sections , but something like --- title: Test number-sections: true --- doesn't produce the desired result. I know that I am close because you can do this with the geometry package (e.g. geometry: margin=2cm ). I wish there was a definitive guide on how Pandoc YAML front matter handling. For example, the following is very useful (avoids templates),

Add styling rules in pandoc tables for odt/docx output (table borders)

我只是一个虾纸丫 提交于 2019-11-29 23:05:42
I'm generating some odt/docx reports via markdown using knitr and pandoc and am now wondering how you'd go about formating tables. Primarily I'm interested in adding rules (at least top, bottom and one below the header, but being able to add arbitrary ones inside the table would be nice too). Running the following example from the pandoc documentation through pandoc (without any special parameters) just yields a "plain" table without any kind of rules/colours/guides (in either -t odt or -t docx ). +---------------+---------------+--------------------+ | Fruit | Price | Advantages | +==========

How to insert appendix after references in Rmd using Rstudio?

纵然是瞬间 提交于 2019-11-29 19:30:42
问题 I am using Rstudio, to create a pdf / html document from an Rmd file. The header looks sth like this: title: "Title" author: "Me" date: "`r format(Sys.time(), '%B %d, %Y')`" bibliography: bibliography.bib output: html_document: toc: true number_sections: true Now, I have some sections, and then include the references. After that, an appendix should follow, but I encounter the exact same problem as described here: Pandoc insert appendix after bibliography There is a fixed solution in this

Knitr does not render googleVis

喜你入骨 提交于 2019-11-29 13:51:14
I have a trouble with Rsutdio and knitr in Windows 7 for rendering a simple gvisTable. Here is my code ```{r results='asis'} require(googleVis) op <- options(gvis.plot.tag="chart") data(iris) t = gvisTable(data = iris) print(t) ``` and here is my error : pandoc.exe: Failed to retrieve https://www.google.com/jsapi?callback=displayChartTableID14c4345d7f3 FailedConnectionException2 "www.google.com" 443 True connect: failed (Connection timed out (WSAETIMEDOUT)) Erreur : pandoc document conversion failed with error 61 My Rstudio version is : 0.98.1091 And my SessionInfo is : R version 3.1.2 (2014

How does pandoc-citeproc sort citations?

回眸只為那壹抹淺笑 提交于 2019-11-29 13:42:42
I have a pandoc-style Markdown text where I cite two papers by the same author in the same place: Lorem ipsum [@Author2000;@Author2001] dolor sit amet. This is rendered as Lorem ipsum (Author 2001, 2000) dolor sit amet. Why are these citations sorted this way, contradicting the sequence in my text, contradicting author-year sorting, and contradicting the sequence in which they appear in the list of references? How can I change this? Is it possible to switch off any kind of sorting and keep the order in which I specify the citations? More information: The text is converted by pandoc with the

batch processing pandoc conversions

自作多情 提交于 2019-11-29 12:42:59
问题 Sorry or being thick. I've searched high and low to try and work out how to batch process pandoc. I cannot for the life of me work it out. How do I convert a folder and nested folders containing html files to markdown? I should mention that I'm using os x 10.6.8 回答1: You can apply any command across the files in a directory tree using find : find . -name \*.md -type f -exec pandoc -o {}.txt {} \; would run pandoc on all files with a .md suffix, creating a file with a .md.txt suffix. (You will

How can I specify pandoc's markdown extensions using a YAML block?

守給你的承諾、 提交于 2019-11-29 11:56:10
问题 Background Pandoc's markdown lets you specify extensions for how you would like your markdown to be handled: Markdown syntax extensions can be individually enabled or disabled by appending +EXTENSION or -EXTENSION to the format name. So, for example, markdown_strict+footnotes+definition_lists is strict markdown with footnotes and definition lists enabled, and markdown-pipe_tables+hard_line_breaks is pandoc’s markdown without pipe tables and with hard line breaks. My specific question For a

Recursive directory parsing with Pandoc on Mac

十年热恋 提交于 2019-11-29 10:55:20
问题 I found this question which had an answer to the question of performing batch conversions with Pandoc, but it doesn't answer the question of how to make it recursive. I stipulate up front that I'm not a programmer, so I'm seeking some help on this here. The Pandoc documentation is slim on details regarding passing batches of files to the executable, and based on the script it looks like Pandoc itself is not capable of parsing more than a single file at a time. The script below works just fine

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

会有一股神秘感。 提交于 2019-11-29 10:00:37
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 problem is probably not the page size. Example Markdown: This is text that flows according to the page

Can I set command line arguments using the YAML metadata

别说谁变了你拦得住时间么 提交于 2019-11-29 07:48:06
Pandoc supports a YAML metadata block in markdown documents. This can set the title and author, etc. It can also manipulate the appearance of the PDF output by changing the font size, margin width and the frame sizes given to figures that are included. Lots of details are given here . I'd like to use the metadata block to remember the command line arguments that I'm supposed to be using, such as --toc and --number-sections . I tried this, adding the following to the top of my markdown: --- title: My Title toc: yes number-sections: yes --- Then I used the command line: pandoc -o guide.pdf