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

后端 未结 3 563
自闭症患者
自闭症患者 2021-01-31 05:48

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 pa

3条回答
  •  醉梦人生
    2021-01-31 06:08

    You'll need to use a custom LaTeX template. First, use pandoc to create a copy of the default template:

    pandoc -D latex > mytemplate.latex
    

    Now edit this template. Somewhere in the preamble (between \documentclass{...} and \begin{document}), insert the lines

    \usepackage{setspace}
    \doublespacing
    

    Then, to use your custom template:

    pandoc --template mytemplate.latex mypaper.txt -o mypaper.tex
    

提交回复
热议问题