3

I have an article written in arabic I want to use tex to get a PDF file, but I can't compile the file (I'm using LuaLaTeX), I get this error:

! String contains an invalid utf-8 sequence.
l.137 \ifcase#1\or
����� \or ������
A funny symbol that I can't read has just been (re)read.
Just continue, I'll change it to 0xFFFD.

This is an extract from the document:

\documentclass[12pt,a4paper]{book}
\usepackage[utf8]{inputenc}
\usepackage[arabic]{babel}
\usepackage[LAE,LFE]{fontenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{bidi}
\usepackage{ucs}
\begin{document}
و يقول شيخ الإسلام ابن تيميَّة رحمه الله في «منهاج السنَّة» في...
\end{document}
1

Here is a MWE example using Amiri as main font and works with XeLaTeX.

\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\usepackage{polyglossia}
\setdefaultlanguage{arabic}
\setmainfont[Ligatures=TeX]{Amiri}

\begin{document}
و يقول شيخ الإسلام ابن تيميَّة رحمه الله في «منهاج السنَّة» في...
\end{document}

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.