142
votes
How to convert a scientific manuscript from LaTeX to Word using Pandoc?
I tried nearly all methods mentioned in other answers.
Eventually, and surprisingly, I found the most satisfactory way to convert is to just open the PDF file in MS Word (2013 or newer), which ...
80
votes
Accepted
(error) \tightlist (converting .md file into .pdf using pandoc)
The writer.latex file in
Pandoc's source code currently defines \tightlist as:
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
This is also currently the case in ...
29
votes
(error) \tightlist (converting .md file into .pdf using pandoc)
I hit the same problem. It seems that pandoc started using \tightlist in \begin{itemize} sections.
My workaround was simply to add an empty macro for \tightlist to my template file (I run pandoc with ...
28
votes
Accepted
How to center a multiline equation?
Use a gathered environment inside the equation environment:
\documentclass{article}
\usepackage{amsmath} % for "gathered" env.
\begin{document}
\begin{equation}\label{eq1}
\begin{gathered}...
24
votes
How to convert a scientific manuscript from LaTeX to Word using Pandoc?
LaTeX2rtf is the easiest and fastest way to convert .tex files to .rtf that can be read by Microsoft Word. Using it is as simple as downloading the program, choosing your .tex file, and pressing run. ...
23
votes
Bibtex to HTML/Markdown/etc., using Pandoc
As of pandoc-citeproc-0.4 pandoc-citeproc has support for a \nocite{*}-equivalent.
mybib.bib file:
@article{behbahani2014aircraft,
title={Aircraft Integration Challenges and Opportunities for ...
23
votes
Accepted
How to convert LaTex to word using PanDoc and keep citations as numeral
The solution is to use a CSL file to format the citations. I used ieee.csl from https://github.com/citation-style-language/styles
pandoc -s foo.tex --bibliography=foo.bib --csl=ieee.csl -o foo.docx
22
votes
Latex Figures appear before text in pandoc markdown
A simple solution is to add a line with a backslash and space immediately after the figure, followed by a blank line:

\
Some text after the figure...
Do not forget the space ...
21
votes
Accepted
LaTeX and pandoc templates
Still off-topic but you can print the default template with pandoc -D latex, edit it and put it in your personal data directory ($HOME/.pandoc on linux):
pandoc -D latex > ~/.pandoc/default.latex &...
19
votes
Accepted
align, aligned and R Markdown
So, just to be clear (as it says this is unanswered), just write the align (without $$):
\begin{align}
a_1 &= \beta_0 \\
b_1 &= \beta_1 \\
c_1 &= \beta_2 \\
d_1 &= \beta_3
\end{align}
...
17
votes
(error) \tightlist (converting .md file into .pdf using pandoc)
Pandoc doesn't use \tightlist if you leave a blank line between each item, e.g.
- one
- two
versus
- one
- two
The same is true for enumerated lists. This is the LaTeX version of "loose" and "...
14
votes
Accepted
How to underline links with pandoc?
The following document, when converted with pandoc generated underlined links in the resultant PDF. However, as noted in the comments to the linked question here Underlined links with hyperref ...
13
votes
LaTeX and pandoc templates
If you do pandoc -D latex the template is printed. This works for any format. You could save that template as e.g. 'template.latex' and edit it. You can then point Pandoc to the edited template by ...
12
votes
How to change the background color and border of a Pandoc-generated blockquote?
You simply need to use LaTeX code if you are going to produce a LaTeX document. A very simple example:
% mystylefile.pandoc
\usepackage{tcolorbox}
\newtcolorbox{myquote}{colback=red!5!white, colframe=...
12
votes
Accepted
Pandoc - changing the layout when compiling markdown
As documented in the pandoc manual, you can either specify the margin in the YAML header of your markdown file:
---
geometry: margin=30mm
...
Or you can pass the value as a variable on the command ...
12
votes
Accepted
How can I reformat a table? Using Markdown > Pandoc > PDF
Pandoc does not support vertical lines in tables, see https://github.com/jgm/pandoc/issues/922 for some discussion.
A workaround is to modify the implementation of longtable from the Pandoc preamble ...
11
votes
Accepted
Convert pandoc-style citations to the LaTeX cite format
There is no built-in feature in pandoc that compiles pandoc-style citations to the cite package format. A quick workaround would be to first use the --natbib flag in pandoc to convert to natbib:
...
11
votes
Pandoc LaTeX to .docx, change font size
Pandoc supports only a small subset of LaTeX commands and \scriptsize is not one of them. Why does it work anyway? Because unrecognized LaTeX (or ConTeXt or HTML) commands are passed unchanged to the ...
11
votes
How to use PanDoc to derive output from LaTeX and TikZ to a DOCX file?
Pandoc doesn't know how to handle TikZ environments. However, you can use a Lua filter to teach pandoc.
Specifically, one can use the method outlined in the building images with TikZ example. The ...
10
votes
How to change the background color and border of a Pandoc-generated blockquote?
Using jon's answer and the latest version of pandoc, I was able to put the commands in the front matter of the markdown itself using header-includes: as follows:
metadata.yml:
header-includes:
- \...
10
votes
Accepted
Sections not being numbered after converting with pandoc
According to the docs, you can control whether or not to number sections with the --number-sections (or -N) command line flag. So, if you want numbered sections, your build command might look like the ...
10
votes
Accepted
Convert LaTeX to HTML with MathJax
Update:
It is possible to use the direct colors now. Try this version of colortbl.4ht:
% colortbl.4ht (2019-11-21-17:51), generated from tex4ht-4ht.tex
% Copyright 1997-2009 Eitan M. Gurari
% ...
10
votes
Accepted
Pandoc cannot parse equation with a fraction
Beside that $$...$$ syntax is not recommended in LaTeX, it is unclear what are you doing really.
There are not an input latex file in the command line, but guessing that is
$$
\frac{1}{2}
$$
Saving ...
10
votes
Accepted
How do I adapt a standard LaTeX template for Pandoc (in a Docker container, not using RStudio/knitr )
1.
A pandoc latex template is just a regular latex file with some placeholder variables in it. You can print the default template with pandoc -D latex > default.latex.
This means, that you can use ...
10
votes
How to generate a bibliography with pandoc?
I was able to generate the bibliography by adding --citeproc:
pandoc --bibliography=test.bib --citeproc -o test.pdf test.md
8
votes
LaTeX + Biblatex bibliography to other formats via Pandoc
I never got this example generating any citations on my Windows 10 machine. Only after adding --citeproc did the citations appear. For future reference one can try pandoc --bibliography=foo.bib -o ...
8
votes
Pandoc: Markdown to PDF, without cutting off code block lines that are too long
One does not need a listings-setup.tex in order for this to work.
Just add this to your YAML-Header include:
header-includes:
- \usepackage{xcolor}
- \lstset{breaklines=true}
- \lstset{...
8
votes
Pandoc: Markdown to PDF, without cutting off code block lines that are too long
There is a really simple solution, using fvextra, recently suggested by jannick0.
Modify your YAML header options to include
\usepackage{fvextra}
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{...
8
votes
Accepted
ConTeXt: Circumventing pandoc's deprecated starttable usage
My Pull Request
ConTeXt writer: Use xtables instead of Tables #4223
has been merged into the master branch and will thus be part of the next release of pandoc.
Extreme Tables
The Markdown input
...
8
votes
Accepted
Concat multiple md files in a tex file using XeLatex
Remove the -s (standalone) option. By default the LaTeX output is not a complete document but only the contents of the document environment, ready to be included.
Alternatively, you can also ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
pandoc × 631markdown × 147
conversion × 40
pdftex × 38
xetex × 36
bibliographies × 35
pdf × 34
html × 31
beamer × 30
tables × 25
pandoc-citeproc × 25
msword × 24
context × 21
templates × 21
fonts × 20
luatex × 18
bibtex × 17
latex-to-word × 17
biblatex × 15
citing × 15
listings × 13
longtable × 13
r × 13
knitr × 13
macros × 12