10

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!

closed as off-topic by Svend Tveskæg, DG', user13907, Maarten Dhondt, Jesse Mar 2 '16 at 22:56

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Svend Tveskæg, DG', Community, Maarten Dhondt, Jesse
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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 3 '16 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! – Erik Campobadal Mar 7 '16 at 15:19
15

Still offtopic 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: http://pandoc.org/README.html

  • 2
    It's good that you link to the documentation. – twsh Mar 2 '16 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! – Erik Campobadal Mar 7 '16 at 15:17
10

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' Mar 2 '16 at 20:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.