pandoc

IPython (Jupyter) MathJaX preamble

旧时模样 提交于 2019-12-02 19:20:37
Question How can I setup a MathJax "preamble" for use in IPython (or Jupyter) notebooks for repeated use in a way that is convenient for others to read my documents (on http://nbviewer.org ) and that works for LaTeX/PDF generation? Background I would like to use IPython (now Jupyter) notebooks for documents that I later convert to PDF via LaTeX (using ipython nbconvert ). The problem is how to include a bunch of macro definitions that I use in almost every document. Something like: \newcommand{\vect}[1]{\vec{#1}} \newcommand{\abs}[1]{\lvert#1\rvert} \DeclareMathOperator{\erf}{erf} etc. As far

Whole site compilation of markdown/pandoc? [closed]

只愿长相守 提交于 2019-12-02 18:24:06
With Sphinx-doc , you can create a bunch of ReStructureText files, with an index.rst file which includes a table of contents macro that auto generates a table of contents from the other included files, and a conf.py that acts as a compilation config. You can then compile the lot into a single python-doc-style site, complete with index, navigation tools, and a search function. Is there any comparable tool for markdown (preferably pandoc-style markdown)? Some static site generators that work with Markdown : Jekyll is very popular and also the engine behind GitHub pages . Python variants: Hyde or

Set double spacing and line numbers when converting from Markdown to PDF with pandoc

给你一囗甜甜゛ 提交于 2019-12-02 17:38:28
I am using markdown & pandoc for scientific writing, I know I can change margins of the final pdf using Set margin size when converting from Markdown to PDF with pandoc but very often the journals require double lines and line numbers in submitted manuscripts, the question is how to change these, I don't know much about LaTex so I am lost in that jungle. Thanks! In more recent version of Pandoc, you can use a YAML header and include a bunch of metadata in that, instead of using options on the command line. So, for instance, you can put this at the top of your .md file: --- title: The Document

rmarkdown: pandoc: pdflatex not found

北城以北 提交于 2019-12-02 17:23:21
When I use the render{rmarkdown} to produce pdf file from .Rmd file on my Mac, an error message says pandoc: pdflatex not found. pdflatex is needed for pdf output. Error: pandoc document conversion failed However when I check with pdflatex -v I got pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012) kpathsea version 6.1.0 Copyright 2012 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX). There is NO warranty. Redistribution of this software is covered by the terms of both the pdfTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named

Converting all files in a folder to md using pandoc on Mac

ぐ巨炮叔叔 提交于 2019-12-02 17:14:13
I am trying to convert an entire directory from html into markdown. The directory tree is quite tall, so there are files nested two and three levels down. In answering this question , John MacFarlane suggested using the following Makefile : TXTDIR=sources HTMLS=$(wildcard *.html) MDS=$(patsubst %.html,$(TXTDIR)/%.markdown, $(HTMLS)) .PHONY : all all : $(MDS) $(TXTDIR) : mkdir $(TXTDIR) $(TXTDIR)/%.markdown : %.html $(TXTDIR) pandoc -f html -t markdown -s $< -o $@ Now, this doesn't seem to go inside subdirectories. Is there any easy way to modify this so that it will process the entire tree? I

Pandoc: What are the available syntax highlighters?

北慕城南 提交于 2019-12-02 15:09:02
Bullet point 18 of http://pandoc.org/demos.html#examples shows how to change the syntax highlighter used by giving an argument to --highlight-style . For example: pandoc code.text -s --highlight-style pygments -o example18a.html pandoc code.text -s --highlight-style kate -o example18b.html pandoc code.text -s --highlight-style monochrome -o example18c.html pandoc code.text -s --highlight-style espresso -o example18d.html pandoc code.text -s --highlight-style haddock -o example18e.html pandoc code.text -s --highlight-style tango -o example18f.html pandoc code.text -s --highlight-style zenburn

Table spacing issue converting to PDF via LaTeX with pandoc

一曲冷凌霜 提交于 2019-12-02 10:44:58
问题 I'm facing the issue that in R texreg() doesn't seem to break the lines in the notes below the table. Also the margins between the models are not extended equally like it's happening with htmlreg() which gives a clean result. Manual breaks like \n or HTML tags are not working with 'texreg'. There's a partly workaround from MichaelChirico, but one has to change the texreg() function but it seems the method doesn't respect the case when we're dealing with more than one model side by side. Here

How to increase heap memory in pandoc execution?

允我心安 提交于 2019-12-02 09:43:38
问题 I am working on converting docx to epub. Document contains lot of images. When execution of converting, i have error: “pandoc.exe: Heap exhausted; Current maximum heap size is 1073741824 bytes (1024 MB); use `+RTS -M' to increase it. Error while executing job!” I am using Node.js. Can any one assist me how to increase heap size? Update: I have increased size till 2GB. But pandoc still shows error "Pandoc.exe out of memory" Is it possible to solve this issue? 回答1: You can increase the memory

pandoc document conversion failed with error 67

巧了我就是萌 提交于 2019-12-02 08:26:19
I'm using R 3.3.2 and Rstudio Version 1.0.44, here's the format of my RMarkdown file --- title: "Sentiment Analysis" output: rmdformats::material: highlight: kate --- When I try to knit, I got the following error pandoc: Could not fetch /tabsets.js /tabsets.js: openBinaryFile: does not exist (No such file or directory) Error: pandoc document conversion failed with error 67 In addition: Warning messages: 1: In sink() : no sink to remove 2: In sink() : no sink to remove 3: MathJax doesn't work with self_contained when not using the rmarkdown "default" template. Execution halted I read some

Table spacing issue converting to PDF via LaTeX with pandoc

我的梦境 提交于 2019-12-02 04:04:36
I'm facing the issue that in R texreg() doesn't seem to break the lines in the notes below the table. Also the margins between the models are not extended equally like it's happening with htmlreg() which gives a clean result. Manual breaks like \n or HTML tags are not working with 'texreg'. There's a partly workaround from MichaelChirico , but one has to change the texreg() function but it seems the method doesn't respect the case when we're dealing with more than one model side by side. Here is the code I'm using: --- title: "Untitled" author: "jaySf" date: "13 Juni 2017" output: pdf_document