13

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.

Thanks!

DG'
  • 21,727
  • 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 Mar 03 '16 at 04: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! – Erik Campobadal Mar 07 '16 at 15:19

2 Answers2

21

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

DG'
  • 21,727
13

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.

twsh
  • 2,718