pandoc

RMarkdown / pandoc fails to knit Pdf with latex color commands

对着背影说爱祢 提交于 2019-12-05 07:21:21
问题 Mac Os: 10.11.6 R version: 3.3.1 MacTex: 2016 / TexLive: 6.2.2 RMarkdown: 1.0.9014 Knitr: 1.14 Pandoc: 1.17 RMarkdown fails to knit PDF when latex commands such as: \textcolor{blue}{Character String} are present in the .rmd file. The error output is: /usr/local/bin/pandoc +RTS -K512m -RTS test.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output test.pdf --template ~/R/3.3/library/rmarkdown/rmd/latex/default-1.17.0.2.tex --highlight-style

Vim syntax and Latex math inside markdown

我怕爱的太早我们不能终老 提交于 2019-12-05 05:29:52
I write documentation in markdown using ViM and I also put math using the latex $$ symbol (I compile using pandoc). The thing is that ViM syntax wouldn't ignore the underscores _ inside the dollar symbols and it is pretty annoying. For instance if I write this: $$ a_1 = 0 $$ Then Vim will highlight all the following text as italics due to to the underscore used. How can I change that? Also it would be nice if I could highlight what's inside $ with a different format. I have put these lines in my .vimrc. It works for inline math on the same line and block-mode math. " This gets rid of the nasty

Set code background colour in R markdown to PDF

邮差的信 提交于 2019-12-05 05:07:02
When an Rnw file is converted to PDF with RStudio and knitr , the code blocks have a pleasant grey background colour (like they do here at SO). When I convert a md file to PDF , the background colour is white and I can't seem to change it. The knitr code decoration option background is only for LaTeX and has no effect in md . How can I set a background colour for code blocks in the PDF I get from my md file? I see in some related questions that editing the markdown.css file might be relevant, but I'm not sure if that applies here since there's no html file in between the md and PDF files. This

Pandoc Syntax Highlighting in PDF not working

落花浮王杯 提交于 2019-12-05 04:55:06
问题 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,

How to use Python filter with Pandoc to convert md with tikz to html on Windows 8.1

微笑、不失礼 提交于 2019-12-05 04:00:50
I am trying to use a Pandoc filter to convert a markdown file with a tikz picture to html. I am on Win 8.1 (and I have all the dependencies -- pdflatex, Python 2.7, ImageMagick, and the pandocfilters Python package). I am using the tikz.py script that John MacFarlane provides on github . I found a similar question on the Pandoc Google Group and John MacFarlane suggests wrapping the filter in a Windows batch script (the filter must be an executable). Here is my command line input (I'll provide the file contents below). pandoc -o temp.html --filter .\tikz.bat -s temp.md But I keep getting the

pandoc can't install due to http-client

▼魔方 西西 提交于 2019-12-05 03:33:11
I'm trying to install pandoc 1.13.1 on Ubuntu 12.04.5, but its failing due to a dependency on http-client: $ cabal install pandoc --verbose Reading available packages... Choosing modular solver. Resolving dependencies... Extracting /home/paleozogt/.cabal/packages/hackage.haskell.org/pandoc/1.13.1/pandoc-1.13.1.tar.gz to /tmp/pandoc-1.13.1-14926... creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist creating /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/dist/setup /usr/bin/ghc --make /tmp/pandoc-1.13.1-14926/pandoc-1.13.1/Setup.hs -o /tmp

How to get a second bibliography?

时光总嘲笑我的痴心妄想 提交于 2019-12-05 01:47:29
In rmarkdown PDF and HTML I want two bibliographies —one for papers/books, and one for software I have used in my research. I found this related issue but it doesn't answer my question since it's concerning the combination of two *.bib files into one bibliography. I'm used to place my bibliography with <div id="refs"></div> as explained here . Possibly a second one can be placed similarly with <div id="refs_2"></div> , but I couldn't figure out how to do it since this "refs" seems not to be defined anywhere. I usually define the software in the YAML header like this nocite: | @xie_knitr:_2018,

RStudio, knitr, pandoc, Word: how do I get a 'new page' in my docx?

拟墨画扇 提交于 2019-12-05 01:45:14
I am using the RStudio, knitr, pandoc, MS Word combo to get my final results in a docx document. Occasionally, I would like the report to continue on a new page. I can't find the way to achieve this. From what I have Googled, it seems to be possible with CSS . I don't know HTML or CSS , but if it is the solution I will learn. Just don't want to take the wrong road... Try the LaTeX command \newpage. Pandoc recognizes it and might (not on a computer right now) translate it to a Word page break. ​```{=openxml} <w:p> </w:pPr> <w:r> <w:br w:type="page"/> </w:r> </w:p> ​``` Insert this codes in the

How to best generate multiple HTML files from RMarkdown based on one dataset?

試著忘記壹切 提交于 2019-12-05 01:39:20
问题 I have an RMarkdown report that is very useful and has grown to be several pages long with all the figures and tables in the HTML file. It uses the same dataset for all the figures and tables. What I would like to do is to keep generating this large html file and then several new subdirectories, each with their own html files and subdirectories within those, each with their own html files. In this case, the full report contains data on a department, then each subdirectory would contain an

Getting some problems with pandoc and mathjax

梦想的初衷 提交于 2019-12-05 01:03:10
问题 I'm trying to use pandoc to produce a html slideshow from a markdown file with some latex in it. The file is here at github. If I run the following pandoc command: pandoc -s -t s5 --mathjax apresentacao.md -o index.html The math is perfectly displayed by MathJax, but I only get a webpage with all the slides and no slideshow functionality. If I run the follwing command: pandoc -s --self-contained -t s5 --mathjax apresentacao.md -o index.html I get a perfectly alright presentation, but MathJax