$ pandoc --template=eisvogel --pdf-engine=xelatex examples/language-persian/document.md -o examples/language-persian/document.pdf
Error producing PDF.
! Package bidi Error: Oops! you have loaded package caption after bidi package.
Please load package caption before bidi package, and then try to run xelatex o
n your document again.
See the bidi package documentation for explanation.
Type H <return> for immediate help.
...
l.251 \begin{document}
After looking into the template I have found 3 problems:
Hi !
Thanks for this template, it is a very impressive piece of work.
I'm currently trying to use it for a document written in Persian with Right-to-Left (RTL) writing. The original document is located here:
https://github.com/OWASP/owasp-masvs/tree/master/Document-fa
I created a minimal example document.md containing this :
Note that I don't speak or read Persian myself so my knowledge on this topic is limited.
I am able to build successfully a pdf artefact using the default pandoc latex template like this:
However with eisvogel I get the following error:
After looking into the template I have found 3 problems:
The
caption
package is loaded afterbidi
(Line 601) https://github.com/Wandmalfarbe/pandoc-latex-template/blob/master/eisvogel.tex#L601The
mdframed
package is loaded afterbidi
(Line 610) https://github.com/Wandmalfarbe/pandoc-latex-template/blob/master/eisvogel.tex#L610The
polyglossia
package is loaded afterbidi
(Line 557 and it is also loaded before on line 434) https://github.com/Wandmalfarbe/pandoc-latex-template/blob/master/eisvogel.tex#L557 https://github.com/Wandmalfarbe/pandoc-latex-template/blob/master/eisvogel.tex#L434The template seems to work with the following modifications:
Here's my working version of eisvogel:
https://github.com/daamien/pandoc-latex-template/blob/bug_bidi_persian/eisvogel.tex
Thanks again for your time, let me know how I can help fixing this...
EDIT: fixed links