I'm wondering where can I edit the default template of LaTeX in pandoc (ubuntu)

I know this is not relevant on TeX forum, but any help would be welcome, because I'm kinda lost.


  • 2
    A linux user "kinda lost" with the program "foo"? man foo or info foo or foo --help or foo -h. For quick specific help about "bah" in "foo", try foo --help | grep bah. The Linux terminal is your powerful friend, not a kind of DOS window.
    – Fran
    Commented Mar 3, 2016 at 4:25
  • 1
    Indeed, i was looking for a way to know where the data dir was located in linux, but seems i was able to find it with pandoc -v, thanks! Commented Mar 7, 2016 at 15:19

2 Answers 2


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 && $EDITOR ~/.pandoc/default.latex

All of this is documented here: https://pandoc.org/MANUAL.html

  • 4
    It's good that you link to the documentation.
    – twsh
    Commented Mar 2, 2016 at 21:09
  • 1
    Thanks for the answer, i was looking where the data dir was on linux, and now i found it by typing: pandoc -v, Thanks! Commented Mar 7, 2016 at 15:17

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 doing e.g. pandoc --template=template.latex. Or you could call it 'default.latex' and place it in Pandoc's data directory. This will make it the default template.

  • I was too late ;)
    – DG'
    Commented Mar 2, 2016 at 20:07

Not the answer you're looking for? Browse other questions tagged .