I was researching how to typeset traditional Arabic texts in LaTeX and stumbled on this research article published on tug.org from back in 2006 (link).

  • Does there exist a more modern/better approach, using ConTeXt (or LuaLaTex/XeLaTeX maybe w. harfbuzz), to get the same/better results?

I'm specific interested in typesetting this part from the research pager, that is in the Arabic font 'Amiri' (link) (in the words of the typeface designer, quote: "a digital typeface to be used in typesetting Koranic verses."):

enter image description here


  • The solution should provide options for individual letter/mark/vowel colouring
  • Open regarding alternative typefaces, however they explicit need to typeset all the mark/vowels of classic/traditional Arabic text (like the Quran)

  • Only text-based solution (the numbering between verses are not necessary)

  • Note that the coloring in that article is hard-coded/fixed for the special case of the language as used in the Quran, and the article remarks that "Such a hard-coded/programmatic way is not suitable for arbitary coloring that the user may wish to introduce into regular text outside of Qur'anic quotations." I suspect, although I might be wrong, that coloring individual marks and character elements arbitrarily is still not feasible with modern approaches.
    – Marijn
    Aug 10, 2019 at 14:32
  • 1
    you tagged the question with arabluatex. Did you actually checked its documentation? Beside arabluatex there is also the rather new option of a luatex with harfbuzz, this image has been made with it: i.stack.imgur.com/gpoO7.jpg. Aug 10, 2019 at 16:37
  • @Marijn Agree, and other ticks here on TEXSE proves this to be the case, that is with working solutions for both arabluatex for LuaLaTeX and arabtex for pdfLaTeX. I haven't been able to track a solution for the colouring off marks/vowels seperat with XeLaTeX, see this open tick link.
    – imdk4242
    Aug 10, 2019 at 16:51
  • @UlrikeFischer p. 56, section "11.5 Quran" link of the documentation partly talks about this, however it's a bit more complicated than that. The \usepackage[nopar]{quran} only represents the Hafs version of the text above
    – imdk4242
    Aug 10, 2019 at 17:11
  • 1
    @imdk4242 You may also want to check the documentation on pp. 32-35 (sect. 6). Actually the information is rather disseminated. As to hafbuzz, it looks very promising. Aug 10, 2019 at 22:36


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.