watermark
Minimum(ish) Working Example of Quarto with Arabic RTL text in an LTR document
Preface
بسم الله الرحمن الرحيم
Quarto is a document publishing software. With it, you can write your document in Pandoc flavored markdown. Quarto will use Pandoc under the hood, and do a bunch of other fancy stuff, to output your markdown document in formats of your choice, like HTML for websites, and PDF (via Latex). This site is itself produced using Quarto.
So far so good. But many of my documents are in English with Arabic content interspersed. Arabic is written right-to-left (RTL) whereas English is written left-to-right (LTR). The support of bidirectional (BiDi) text is a notoriously tricky problem. The cursive property of the Arabic script (with joining letters) compounds the issue.
In this write-up, I will describe how to configure Quarto to solve some of these issues.
The source code for this book can be used as a template for RTL document projects in Quarto. Along with BiDi, I’ll also discuss other aspects like fonts, figures, etc. إن شاء الله.
The source code for this book can be found here: https://github.com/adamiturabi/quarto-arabic-mwe.
The rendered output is published here: https://adamiturabi.github.io/quarto-arabic-mwe.
A PDF version of this document can be downloaded if you click on the PDF icon next to the title at the top left of this page.
If you have any suggestions for improvements I’d love to know about them in the discussions page for this project.