Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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!

like image 207
Leosar Avatar asked Feb 14 '13 20:02

Leosar


People also ask

Can pandoc convert from PDF?

You can use the program pandoc on the SCF Linux and Mac machines (via the terminal window) to convert from formats such as HTML, LaTeX and Markdown to formats such as HTML, LaTeX, Word, OpenOffice, and PDF, among others.

What is a pandoc template?

Pandoc is a command line tool that you can use to automatically convert files from markup format to another. With Pandoc, you can write in something easy like Markdown, Microsoft Word, or LibreOffice, and convert it something hard like: HTML. Ebook formats.

Can pandoc convert HTML to markdown?

Pandoc can convert between numerous markup and word processing formats, including, but not limited to, various flavors of Markdown, HTML, LaTeX and Word docx.


1 Answers

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 Title
author:
    - Your Name
    - Co Author
date: \today{}
geometry: margin=2cm
header-includes:
    - \usepackage{setspace}
    - \doublespacing
    - \usepackage{lineno}
    - \linenumbers
---

Document Text

and pandoc will read those options and apply them automatically.

like image 85
naught101 Avatar answered Oct 09 '22 01:10

naught101