Pandoc is a markup converter which can output LaTeX and can parse a subset of LaTeX. Questions about pandoc itself are not on-topic for this site; questions about using it to produce LaTeX are on-topic.

learn more… | top users | synonyms

44
votes
5answers
20k views

How to convert a scientific manuscript from LateX to Word using Pandoc?

I have a typical scientific manuscript in a LaTeX .tex file, and I need to convert it to MS Word .doc file. The reason for having to convert to MS Word is I'm submitting the manuscript to an academic ...
38
votes
5answers
7k views

Recommended workflow? LaTeX -> ePub with math viewable on iPad

This started as a comment in an older thread, but I thought I repost it here as a question to the forum... I'm looking for a workflow that will take me efficiently and reliably from existing LaTeX ...
24
votes
2answers
990 views

Is LaTeX intended for unattended typesetting?

With markup converters like Pandoc, it is now possible to generate LaTeX documents without ever touching any LaTeX code. However, obtaining aesthetic page breaks for slightly complex documents, ...
16
votes
1answer
3k views

Adding headers and footers using Pandoc

Pandoc uses Tex as an intermediary step when generating PDF, so I thought asking this question on the Tex part of StackExchange may be the right place. If not, please let me know, and I will delete ...
15
votes
3answers
9k views

Deeper levels of (sub)sections don't appear in the LaTeX output of pandoc. Why?

I use pandoc to create latex and PDF from Markdown. Markdown, being designed for HTML, allows 6 levels of headers H1...H6. But when converting to PDF, via tex, I get only three levels: 1 (\section), ...
15
votes
1answer
867 views

How to fix kerning of comma/colon after quotes?

How to fix kerning of comma/colon after quotes? Hello, I’m a relative newbie in latex and am trying to reduce the space between closing quotes and colon/comma, but by a general way in the preamble, ...
13
votes
2answers
1k views

Using \lstinline inside a \item

I know about the fragility of verbatim-like commands, and that they should not be used as an argument of another macro, but a need to write a description environment in which the terms to be defined ...
13
votes
3answers
294 views

Gobbling an argument if it starts with #

My problem comes from pandoc and markdown, but it is not directly related with these tools, but instead with "customizing" the resulting pdf via some tex macro programming, so I think it is on topic. ...
10
votes
0answers
392 views

Why doesn't Pandoc convert citations correctly from Markdown to LaTeX?

Consider the following markdown fragment: Connecting these native implementations to the Python world is enabled by the [Cython](http://cython.org/) toolchain  [@behnel2011cython]. I use pandoc to ...
9
votes
1answer
541 views

Change the “language” of Pandoc

This is not directly a LaTeX question since I use Markdown to format my text but this subpart of "stack" seems the most correct place to ask my question. I generate my PDF with Pandoc from markdown ...
9
votes
1answer
2k views

Pandoc: How can I get numbered LaTeX equations to show up in both PDF and HTML output

To make a numbered equation in Pandoc, I defer to using pure LaTeX: \begin{equation} a^2 + b^2 = c^2 \end{equation} In PDF form, it gives a nice numbered equation, however, this equation doesn't ...
8
votes
4answers
1k views

Fun unicode characters with pandoc

Silly question: I want to use a heart (♥) character in my presentation. I'm already using xelatex as engine so it doesn't complain for the character itself but it doesn't render it. Just a blank ...
8
votes
1answer
117 views

Declare additional Unicode characters in verbatim environments in a Pandoc-generated file

I generate a PDF document via LaTeX with Pandoc. I want to use some additional characters in verbatim environments that are not available by default. Here's a sample input: Math: $\downarrow$ ...
8
votes
1answer
920 views

How to change emphasis commands in pandoc's LaTeX template?

I want to change the default strong emphasis command in the conversion from pandoc's markdown to LaTeX, say, from \textbf to \textsc. Since running pandoc in the source file prints into the .tex file ...
7
votes
3answers
282 views

How can I prevent the next paragraph from overwriting the image of a description label?

LaTeX code generated from MarkDown by Pandoc: \documentclass{article} \usepackage{mwe} \makeatletter \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth \else\Gin@nat@width\fi} \makeatother ...
6
votes
2answers
1k views

Using markdown/restructuredtext to produce a letter

For simple documents, I like to use markdown/restructuredtext and convert it to LaTeX using pandoc (and LaTeX includes). For documents such as articles, leaflets, etc., it's quite easy. However, I ...
6
votes
1answer
1k views

Hanging indents in bibliography

I can't imagine this isn't covered elsewhere, but for the life of my I can't find it. (Forgive me, I'm very new to LaTeX.) I'm running pandoc to generate PDFs based on a markdown document, but right ...
6
votes
1answer
1k views

Bibtex to html/Markdown/etc., using Pandoc

It seems that Pandoc is capable of dealing with references given in a .bib file. Yet, I haven't been able to simply ask Pandoc to convert a .bib file into html, markdown or other formats. Is there a ...
6
votes
1answer
140 views

unwanted en-dash ligature with lualatex but not with xelatex

I am trying to generate PDF documentation out of Pandoc Markdown README document. Here is MWE: \documentclass[english,]{article} \usepackage[T1]{fontenc} \usepackage{ifxetex,ifluatex} \ifnum ...
6
votes
2answers
3k views

Resize all images in Latex to a percentage width

I am auto-generating multiple tex files using pandoc (one tex file for each of my chapters). Pandoc generates this tex code for each image. \begin{figure}[htbp] \centering ...
6
votes
2answers
1k views

Adding page breaks to pandoc latex template when converting markdown

Perhaps I'm missing something, but is there a way to either (a) ensure that pandoc places pagebreaks before level 1 and level 2 headers in markdown (#,##), or (b) hide \newpage from other markdown ...
6
votes
2answers
1k views

TeX to epub conversion

I want to create epub document, but I only have a tex file (unfortunately, mathematical formulas, and drawing diagrams). I tried pandoc: tex to html, tex to xhtml, to xml, but nothing works properly. ...
5
votes
1answer
1k views

redefine \includegraphics for beamer

I'm using Pandoc to convert from markdown to LaTeX or Beamer. The LaTeX template of Pandoc has nice command so that images are resized to fit the text width but the Beamer output is not. ...
5
votes
1answer
104 views

Redefine verbatim environment

I have a text with source code, which I would like to display. I am using pandoc, so I have to use either verbatim or listings enviroment. Unfortunately, I can't use listings package (due to ...
5
votes
1answer
70 views

\setuppagenumbering[location=] causes problem in Context

I am new to tex world. I am converting a markdown to pdf, first using the pandoc to create the text and then ConText to generate the pdf. I hope to release the template to wider pandoc audience if I ...
5
votes
1answer
142 views

“TeX capacity exceeded” error when converting markdown to PDF using XeLaTeX with russian language

I've installed pandoc and texlive-full packages on recent Ubuntu 14.04 LTS 64bit to convert markdown files with russian language to PDF. Everything works fine when I run the following command: ...
5
votes
2answers
464 views

ConTeXt: Figure scaling to width and text wrapping for Pandoc-generated documents

Consider the following Pandoc-generated ConTeXt document: \setuppapersize [A4][A4] \setuplayout [width=middle, backspace=1.5in, cutspace=1.5in, height=middle, topspace=0.75in, ...
5
votes
1answer
356 views

Stop listings going over page breaks

I am using Pandoc to generate Tex from Markdown. It automatically generates listings when it comes across the appropriate Markdown (code indented four spaces). It then uses the listings package to ...
4
votes
2answers
1k views

Pandoc - Convert XeTeX to HTML

I posted the question here How to Convert XeTeX to Html However I tried something different so decided to ask the issues with the results as a new question. So far my XeTeX file is nicely getting ...
4
votes
2answers
59 views

Strange output when writing \texttt{“avg”} in spanish

I'm using pandoc, which parses markdown into LaTeX. In this case I configured pandoc to use babel in spanish and wrote `"avg"` which is translated by pandoc as \texttt{"avg"}. When I do this I obtain ...
4
votes
1answer
905 views

Pandoc: Markdown to PDF, without cutting off code block lines that are too long

I'm trying to convert a Markdown file into a PDF file using Pandoc. I have a lot of code blocks in my Markdown. And if I have a line of code that is too long, it will just be cut off in the PDF. How ...
4
votes
1answer
327 views

ConTeXt: Wrapped text misbehaves at page breaks

On this site, a solution for text wrapping based on descriptions in Pandoc-generated ConTeXt documents was previously formulated. Although satisfactory for a one-page minimum working example, the then ...
4
votes
1answer
684 views

Pandoc: minimal headers for LaTeX output

I'm taking mediawiki text and trying to convert it to latex in Pandoc. All seems to be reasonably well. However, I had to make sure to use: \documentclass{book} \usepackage{hyperref} ...
4
votes
1answer
284 views

LaTeX + Biblatex bibliography to other formats via Pandoc

I am trying to convert a simple LaTeX file that uses biblatex-chicago for citation formatting to, say, .docx via Pandoc. Unfortunately, I don't seem to be able to find the right invocation of Pandoc ...
4
votes
1answer
191 views

Are there any programs that will attempt to preprocess simple LaTeX?

I find myself in the awkward, although apparently not uncommon, position of being ordered to write, or at least end up with, documentation in the Word format. I don't have anything that fancy in my ...
4
votes
2answers
544 views

Is reStructuredText compatible with the memoir class?

While I'm fine with writing "real" documents in full-blown LaTeX, I often switch to reStructuredText as a lightweight markup language for simplish documents (like meeting notes and stuff). I was ...
4
votes
0answers
428 views

Converting RMarkdown to LaTeX without additional packages

I'm wanting to convert a markdown document into LaTeX for inclusion in my thesis. Unfortunately, the output of my command, pandoc -f markdown -t latex --standalone msim-eg.md > msimeg.tex ...
3
votes
2answers
1k views

Convert Markdown + Embedded Latex to PDf and Doc

I would like to convert math.stackexchange style plain text markdown with embedded latex equations to PDF and Doc formats. I've tried using pandoc, but keep getting bad PDF's. For example, if I type ...
3
votes
1answer
557 views

Can an 'Abstract' parameter be passed to pandoc to create a latex file? [closed]

Similar to $title$, $author$, and $date$, is there an $abstract$ parameter that one can pass to a latex file from the title block? Example: \begin{abstract} $abstract$ \end{abstract}
3
votes
2answers
1k views

Pandoc-generated PDF contains large images, how can I make them fit into the page?

I am using pandoc to generate pdf output out of my markdown code. So far, it works fine without any warning or error, except the fact that figures are large, so that some figures get cut and don't fit ...
3
votes
2answers
4k views

How to interpret message “Invalid UTF-8 stream” when trying to convert a tex-file to a rtf-file using pandoc?

I want to convert a .tex file into something that is possible to open in MS Word (.doc, .docx, .rtf, ...) by means of the pandoc command line software. A minimum .tex file is attached below. I use ...
3
votes
1answer
18 views

Undefined control sequence error with mhchem and hyperref, \ce within \section{}

I get an "undefined control sequence" error when trying to use the mhchem and hyperref packages together, when \ce is within a \section{} label. A minimum example that demonstrates the problem: ...
3
votes
1answer
251 views

ConTeXt: How to increase line-spacing in title?

Pandoc generates ConTeXT document titles using a standard simple scheme that sets the title in \tfd. I already changed the default font and size of \tfd. However, when a title is so long that it ...
3
votes
1answer
425 views

ConTeXt: How to change the background color and border of a Pandoc-generated blockquote?

Consider the following minimum working example containing a blockquote as defined in a Pandoc-generated document: \setuppapersize [A4][A4] \setuplayout [width=middle, backspace=1.5in, ...
3
votes
1answer
99 views

How to measure the vertical space that was typeset without placing it into an environment?

I would like to achieve automatic clearing of a {floatingfigure} at the beginning of a new \section for texts automatically created by Pandoc. For this to work, I am in need of a way to measure the ...
3
votes
1answer
122 views

How can I redefine a list item to normal text in order to enable proper wrapping?

Consider the following LaTeX code, the bottom half of which was generated from MarkDown by Pandoc. \documentclass{article} \usepackage{mwe} \makeatletter ...
3
votes
1answer
79 views

Latex default citation and bibliography style with Pandoc

I write a paper in Markdown and convert it to PDF via Pandoc and Latex with the following commands to get Latex's (well, BibLatex's) default citation and bibliography style: pandoc -s ...
3
votes
1answer
364 views

Force table's width (pandoc / default.latex)

Pandoc is working great at the moment, but I've got a problem for large tables. Most of the time the tables get rendered outside of the page. I know it has something to do with p|cm=8 or something, ...
3
votes
0answers
327 views

How can I style tables in LaTeX beamer?

I use pandoc to generate LaTeX beamer presentations. To get the look I want I have created a theme myself. I have managed to get the look and feel I want in my presentations but I cant figure out how ...
3
votes
0answers
287 views

Pandoc not exporting bibliography, images and nested sections

I'm a new Pandoc user, primarily for converting .tex files in .odt format. The following command: pandoc -f latex -t odt -o prova.odt roottoptesi.tex Works well apart for the fact that it can't ...