When I write YAML code in the Quarto config file to include latex commands that render Arabic nicely into pdf it works fine. The same YAML code does not work in Quarto.
This is the code that works in plain markdown, but not in the Quarto config file (_quarto.yml):
header-includes:
- |
```{=latex}
\usepackage{babel}
\babelfont[arabic]{rm}[Scale=1.2]{Amiri}
I use Quarto with VSCodium, and as far as I know, it uses the same pdf engine (xelatex) as when I render plain .md files. I get the following error message in the terminal when I try to render:
In file _quarto.yml
(line 34, column 7) Array entry 1 is empty but it must instead be a string.
33: header-includes:
34: - |
~
35: ```{=latex}
If I delete the header-includes lines my .qmd documents render nicely into pdf, except that there are just blanks where the Arabic script should have been.
You do not need to use the
latexblock to include raw contents. Useinclude-in-headerand thetextsubkey instead. From the documentation,So try as the following,