niebert / PanDocElectron

Atom/Electron Application for calling PanDoc Converter with Shell Commands on Linux Windows Mac
Creative Commons Zero v1.0 Universal
16 stars 1 forks source link

How to add own templates? #1

Closed trenkert closed 6 years ago

trenkert commented 7 years ago

I'd like to add my own LaTeX and ConTeXt templates to Pandocelectron. How can I do this?

niebert commented 7 years ago

When you install PanDocElectron there is also a PanDoc directory checked out see https://github.com/niebert/PanDoc . The LaTeX templates can be found in the subdirectory tpl/ (see https://github.com/niebert/PanDoc/tree/master/tpl ). The default templates of PanDoc written by John McFarlane are stored in the tpl/pandoctemplates/ . If you run PanDocElectron it creates for you a shell script callpandoc.sh on Mac/Linux and callpandoc.bat on Windows in documents directory tailored for your PanDoc generation. Rename the callpandoc.sh e.g. mytemplatepandoc.sh and alter the -template parameter to a template you want to use.

  --template=/Users/myname/Documents/PanDoc/tpl/reveal/mytemplate.html 

mytemplatepandoc.sh will generate the documuents with your defined template.

I take that as recommendation to template selection for other formats in the GUI of PanDoc Electron. I hope that workaround helps you for now. regards Bert

niebert commented 6 years ago

General Template Folder can be set in settings