[Tex/LaTex] How to write Quran via Latex

input-encodings

I get this message when I compile it "
! Package inputenc Error: Unicode character ٰ (U+0670)
(inputenc) not set up for use with LaTeX. "

\documentclass[11pt,a4paper]{report}
\usepackage{arabtex}
\usepackage[utf8]{inputenc}
\usepackage[LFE,LAE]{fontenc}
\usepackage[arabic]{babel}
\usepackage{quran}
\begin{document}
\quransurah[94]
\end{document}

Best Answer

The quran package is for preparing files compiled with xelatex (or, as Davislor notes, lualatex). That is, it uses latex macros with the xetex (or luatex) binary, which handles unicode natively. By contrast, arabtex uses latex macros with the pdftex binary, which works with older and more limited encodings. That’s why arabtex requires you to specify fontenc and inputenc — both things you should never do when using xetex or luatex.

Here’s a small example of the usage of quran. But be sure to read its manual, because it offers many options and commands.

\documentclass{article}
\usepackage{quran,polyglossia}
\setotherlanguage{arabic}
\setmainfont{Amiri}
\usepackage{bidi}
\begin{document}
\setRTL
\textarabic{\quransurah}
\end{document}

output

Related Question