pandoc

Where in the world is my pandoc directory?

夙愿已清 提交于 2019-12-04 05:37:11
I am trying to add a custom latex template for pandoc I know that pandoc templates go in ~/.pandoc/templates and I confirmed the pandoc directory location by typing pandoc --v - it says pandoc is in ~/.pandoc but when I do cd ~/.pandoc : -bash: cd: /Users/[Name]/.pandoc: No such file or directory According the pandoc man page I can set a different path for pandoc data files using --data-dir=DIRECTORY , but when I try build a file this way, e.g. pandoc file.md -o file.pdf --data-dir=~/Library/texmf/tex/latex --template=mytemplate.latex it throws the error pandoc: Could not find data file

rmarkdown: how to use multiple bibliographies for a document

只谈情不闲聊 提交于 2019-12-04 04:20:02
[My environment: Win 7 Pro / R 3.2.1 / knitr_1.12.3 / R Studio Version 0.99.892] I am trying to write an article in .Rmd format using R Studio, Knit -> PDF, and I've been following http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html for details of how to get pandoc and pandoc-citeproc to produce a References section and citations in the text. My BibTeX references are in several different .bib files, which, when using LaTeX in .Rnw files, are all found in my local texmf tree via \bibliography{statistics, graphics} I can't seem to make this work with pandoc-citeproc . My

Set page width in Knitr for md or HTML output

十年热恋 提交于 2019-12-04 03:25:18
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 resize either .md page width or direct pander to output a page with auto-width settings (adjusting to a

Rmarkdown, Rstudio: pandoc.exe: Error producing PDF from TeX source

回眸只為那壹抹淺笑 提交于 2019-12-04 01:43:04
问题 I am trying to render a pdf document with the knit pdf button in RStudio, but I keep on getting this error: ! pdfTeX error (font expansion): auto expansion is only possible with scalable fonts. \AtBegShi@Output ...ipout \box \AtBeginShipoutBox \fi \fi l.167 pandoc.exe: Error producing PDF from TeX source Error: pandoc document conversion failed with error 43 I know there is a lot be found on the internet regarding error 43, but non of them helped me. Does anyone know what it means exactly and

Preserve line breaks in title using pandoc

吃可爱长大的小学妹 提交于 2019-12-04 01:02:31
Consider the following title block in pandoc-flavored Markdown: % Higgelty Pigglety Pop! or There Must Be More to Life % Maurice Sendak Here, line breaks are part of the title. It is possible to reformat the title in order to insert it into regular text flow, e.g. "Higgelty Pigglety Pop! Or, There Must Be More to Life", but when not talked about but used on the title page of a document, preserving the line breaks is crucial. Depending on the style, it might look like this: Higgelty Pigglety Pop! or There Must Be More to Life Maurice Sendak My question: How can I achieve a proper multi-line

pandoc-generated docx misses italic variables in equations

独自空忆成欢 提交于 2019-12-03 23:01:18
问题 I have the following segment of Markdown with embedded LaTeX equations: # Fisher's linear discriminant \newcommand{\cov}{\mathrm{cov}} \newcommand{\A}{\mathrm{A}} \renewcommand{\B}{\mathrm{B}} \renewcommand{\T}{^\top} The first method to find an optimal linear discriminant was proposed by Fisher (1936), using the ratio of the between-class variance to the within-class variance of the projected data, $d(\vec x)$, as a criterion. Expressed in terms of the sample properties, the $p$-dimensional

How do I produce R package vignettes in multiple formats?

孤人 提交于 2019-12-03 22:29:19
I use knitr and rmarkdown to write vignettes for R packages. Thanks to the magic of pandoc it is easy to turn these documents into a variety of formats. I would like to take advantage of this by offering vignettes as both HTML and PDF. There is support from rmarkdown to specify parameters for multiple output formats in the documents metadata block. For example, I might have something like this: output: html_document: standalone: true smart: true normalize: true toc: true highlight: tango self-contained: true theme: cerulean pdf_document: toc: true highlight: tango geometry: margin=2cm

Pandoc Syntax Highlighting in PDF not working

倾然丶 夕夏残阳落幕 提交于 2019-12-03 20:23:37
pandoc --version yields: pandoc 1.12.2.1 Compiled with texmath 0.6.5.2, highlighting-kate 0.5.5.1. Syntax highlighting is supported for the following languages: actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog, clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d, diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang, fortran, fsharp, gnuassembler, go, haskell, haxe, html, ini, java, javadoc, javascript, json, jsp, julia, latex, lex, literatecurry, literatehaskell, lua, makefile, mandoc, markdown, matlab, maxima, metafont, mips,

Converting Markdown to HTML5 slides via Pandoc through knitr in R

為{幸葍}努か 提交于 2019-12-03 17:20:37
Since version 1.2 knitr has a new function pandoc to convert markdown document to other formats via pandoc directly in R ( See here ). For example library(knitr) pandoc('foo.md', format='html') # HTML I wonder how to convert Markdown document ( See knitr-slides.md for MWE ) to HTML5 slides. Thanks First, add the following to your .Rmd document: <!--pandoc s: S: i: mathjax: --> Then use the command library(knitr) knit("foo.Rmd") pandoc("foo.md", format="dzslides") This will still create the file foo.html , but will use the pandoc command pandoc -s -S --mathjax -f markdown -t dzslides -o foo

How to convert HTML to Markdown while retaining non-markdown HTML tags?

时光总嘲笑我的痴心妄想 提交于 2019-12-03 15:52:16
问题 I'd like to be able to take an existing HTML snippet and convert it to markdown. I've tried pandoc for this purpose: pandoc test.html -o test.md where test.html looked like this: Hello <!-- more --> and some more text <h2>some heading</h2> The result was this: Hello and some more text some heading ------------ Thus, it not only converts tags that have a direct meaning in markdown. It also removes tags that I would like to retain as HTML (e.g., HTML comments, iframe tags, and so on). How can I