0

I use Zettlr and Pandoc as a portable installation. Zettlr export XeLaTex PDF worked fine with my markdown.

I would like to make some Latex adoption for the PDF. Now I updated the the export file in Asset-Manager to use my own Latex template template: D:\Daten\FMEA\Zettlr_FMEA\Topic\my_template.tex.

I created a simple my_template.tex

\documentclass{article} \begin{document} $body$ \end{document} 

but if I try to export to XeLaTex PDF I get a lot of errors that something missing, for example first:

Error producing PDF. ! Undefined control sequence. l.13 \tightlist 

So my idea was take the default template from pandoc. I copied the content, now I get

Pandoc exited with code 43 Error producing PDF. ! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.3 n 

\begin{document} is in my_template.tex still there.

I need a guidance. What is a minimal template.tex for Zettlr to export to PDF. My intention is to make my own xelatex layout settings.

SOLVED

In case some other run in same problem. My my_template.tex looks now:

\documentclass{article} \providecommand{\tightlist}{% \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \usepackage{graphicx,subcaption} \newcommand{\pandocbounded}[1]{#1} \begin{document} $body$ \end{document} 

This works with the command under setting export:

pandoc --template=my_template.tex -o out.pdf 
9
  • 1
    Welcome to TeX.SE! May I ask: what is Zettlr? Commented Jan 8 at 18:07
  • @Mensch Zettlr can be used as a desktop app and use pandoc for export markdown to pdf. Commented Jan 8 at 18:23
  • 1
    can you post the template you're using? probably I'm not the only one who doesn't have Zettlr to hand. Commented Jan 8 at 19:02
  • have you seen docs.zettlr.com/en/guides/journal-latex-template? I can't immediately see any reference to a default 'template', though. Commented Jan 8 at 19:07
  • 1
    can you post your solution as an answer instead? that way, people with the same question can tell there's a solution here. Commented Jan 8 at 21:43

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.