

$ pandoc -s -t beamer -o -latex-engine=xelatex -V mainfont='BNazanin' Now that everything is setup, the only remaining step is to executes Pandoc with proper parameters to generate the output correctly. Step Three: Run Pandoc with proper parameters Both approaches are quite straightforward. The first script is CLI whereas the second on is GUI. To run the installation script, just clone the project at this URL.Īnd then execute farsifont.sh or zfarsifont.sh script depends on preference. On the bright side, there is a great script that automates this task which is called persian-fonts-linux from Fzerorubigd. Hence, installation of a set of proper Persian fonts is a must. Unfortunately, Ubuntu does not provide great Persian fonts that can be supported by Pandoc, even though they are used comfortably and flawlessly in applications such as LibreOffice. This step can be skipped, if the system has proper Persian fonts installed. So, Pandoc can utilize them to render the text to the destination format, let say PDF. To be able to get desired output for a Markdown file using Pandoc, proper Persian fonts should be installed. This is necessary to explicitly tell Pandoc to set text direction right to left. Step One: Adding annotation to Markdown files containing Persian textįor each Markdown file that contains Persian or Arabic (generally any right to left language) contents, the following annotation should be added to the first few lines of the file before the actual content. This instruction can be applied to add Arabic language support to Pandoc as well, only step two will be different. It is good to note that these steps are only tested in Ubuntu distribution and may slightly vary in different flavors. Without taking the above steps any attempt to convert Persian Markdown text to other formats will be failed with either Pandoc errors or the end results won’t be desirable, such as separated characters or even empty documents. Adding annotation to Markdown files containing Persian text.In fact few steps are involved to get everything up and running which described in this post.īasically three steps should be done to setup everything to be able to convert written Persian text in Markdown to different formats using Pandoc. Writing Persian in Markdown and converting it to different formats using Pandoc is not always hassle free.
