Questions tagged [pandoc]

Questions about Pandoc, a free and open-source software document converter.

Pandoc is a Haskell library for converting from one markup format to another, and a command-line tool that uses this library. Pandoc can convert between numerous markup and word processing formats, including, but not limited to, various flavors of Markdown, HTML, LaTeX and Word docx.

88 questions
53
votes
3 answers

correctly sizing PNG images in markdown with pandoc for html/pdf/docx

I am trying to use markdown with pandoc to convert a single document into html, pdf, and docx. It's an extremely simple document containing only math-less text and a few images. The images are in PNG format. I include an image using this in…
user46976
  • 1,628
22
votes
4 answers

Getting chapters to start on a new page in a pandoc-generated PDF

%Title %Author #Header 1 Lots of words. #Header 2 More words. ##Level 2 header The above text can be turned into an EPUB file for e-readers with pandoc -o output.epub input.mkd, and it can be converted to PDF with pandoc -o output.pdf…
evilsoup
  • 14,056
20
votes
2 answers

Markdown to LaTeX conversion with a custom preamble using Pandoc

I know that I can use the -H or --include-in-header commands to include a custom preamble in the generated output. The problem is now that Pandoc includes my preamble but puts another preamble in front of…
John
  • 201
12
votes
2 answers

Rendering PDF from Markdown file with literal emoji characters using Pandoc

I'd like to convert markdown text like: This is a smile To a PDF with the emoji on it. To be clear, I want to be able to insert the emoji character itself in the source text, not something like :smile:. How can I do this with Pandoc?
agentofuser
  • 7,677
9
votes
1 answer

Generate table of contents with links for GitHub markdown with pandoc

How to generate table of contents with links for GitHub markdown with pandoc? I tried pandoc -f markdown_github --toc -s -S README.md -o new.md It does create a table of contents but it has no link to sections. I'm trying to generate a table of…
Franck Dernoncourt
  • 24,246
  • 64
  • 231
  • 400
9
votes
3 answers

Word count for markdown?

Is there a way to get a word count of natural language words in Markdown (or better, Pandoc Markdown), via the command line? It's possible to just use wc to get a very rough estimate, but wc is naive, and counts anything surrounded by white space…
naught101
  • 1,503
8
votes
1 answer

Make pandoc ignore css style class

I'm trying to convert an HTML file to Markdown using Pandoc, but I'm having a hard time finding the correct options. I would like convert the entire HTML file to the simplest Markdown possible. That is, no
tags and no CSS styling in curly…
Seanny123
  • 381
7
votes
2 answers

Using Pandoc to convert from markdown to markdown with references / What does "reference with no printed form" mean?

I want to write a markdown file with references @ref (and a BibTeX database). When sending the file around, it should be converted to a stand alone markdown file containing rendered references. The rendered reference key should not be numeric, but…
koppor
  • 706
6
votes
2 answers

Why would RTF files created with Pandoc be opened as plain text?

I'm experimenting with Pandoc, in particular the markdown to RTF function. When I run the converter, the resulting RTF is opened in both Word and OpenOffice as plain text (where the text looks like RTF, but isn't treated as RTF). Converting to HTML…
Ash
  • 3,064
  • 4
  • 30
  • 31
6
votes
2 answers

Pandoc can't convert to pdf, `xcolor.sty' not found

When I try to convert a file to pdf format with pandoc I receive this message: Error producing PDF. ! LaTeX Error: File `xcolor.sty' not found. Type X to quit or to proceed, or enter new name. (Default extension: sty) Enter file name: !…
6
votes
1 answer

Compile PDF book from multiple Markdown files

I have a folder structure like this, with recipe .md files in directories according to theme: Recipes |- Mains | |- recipe1.md | |- recipe2.md |- Desserts |- recipe3.md |- recipe4.md How can I compile all these…
5
votes
0 answers

Creating Text Style with Colors using Pandoc to Docx Converter

I am creating a simple Word document (*.docx) using Pandoc. My input text file is fairly straight forward. I would like to create text with Red/Yellow/Green highlight. I am aware of creating a custom reference document and using that in Pandoc. In…
DigitalNomad
  • 1,918
5
votes
2 answers

Pandoc: Duplicate footnotes - multiple files - same name

I have a folder structure like the following: chapters/ 01-chapter.md 02-chapter.md 03-chapter.md format.sh parse.sh parse.sh pandoc -t html5+smart -so dist/book.html --html-q-tags chapters/*.md format.sh for f in chapters/*.md; do …
leun4m
  • 384
  • 2
  • 17
5
votes
1 answer

Custom table of contents in Pandoc-created PDF

I'm creating PDFs from markdown files and would like to customize the output. Specifically, I'd like to change the title of the table of contents in the resulting PDF. Currently, it's "Contents": How can I change that title? I'm calling Pandoc…
5
votes
3 answers

Pandoc - how to get pagebreak between title block and the table of contents?

Simple markdown file, with YAML block: --- title: Report author: Tom Brown 12345678 date: August 2018 toc: true numbersections: true geometry: margin=2.5cm urlcolor: blue header-includes: | \usepackage{fancyhdr} \pagestyle{fancy} …
Rob
  • 51
1
2 3 4 5 6