4

Dear Ladies and Gentlemen,

If polyglossia is used with hyperref and the main language is set to Arabic, a rtl language, the file does not compile, as can be seen in the below example. If the main language is ltr, there is no problem. Does anybody know a solution to this problem?

With best wishes and thanks for your interest.

\documentclass[11pt,a4paper,twoside]{article}

\usepackage{polyglossia}

\usepackage[xetex]{hyperref}

\setmainlanguage{arabic}
\setmainfont[Script=Arabic,Scale=1.4]{Scheherazade}

\setotherlanguage{english}

\newfontfamily\arabicfont[Script=Arabic,Scale=1.4]{Scheherazade}
\newfontfamily\englishfont[Mapping=tex-text,Renderer=ICU]{Charis SIL}



\begin{document}

السلام عليكم

\begin{english}
\url{https://www.google.de}
\end{english}


\end{document}
2
  • Can you show us the error message.
    – Salim Bou
    Aug 16, 2016 at 16:31
  • The console says that the current roman font does not contain the arabic script Aug 16, 2016 at 18:07

1 Answer 1

2

You can use \href instead of \url in this case \englishfont is used for hyperlink text.

\documentclass[11pt,a4paper,twoside]{article}
\usepackage{hyperref}
\usepackage{polyglossia}


\setmainlanguage{arabic}
\setotherlanguage{english}

\newfontfamily\arabicfont[Script=Arabic,Scale=1.4]{Scheherazade}
\newfontfamily\englishfont[Mapping=tex-text,Renderer=ICU]{Charis SIL}



\begin{document}

السلام عليكم

\begin{english}
\href{https://www.google.de}{www.google.de}
\end{english}


\end{document} 

Or just add

\let\arabicfonttt\ttfamily

Code

\documentclass[11pt,a4paper,twoside]{article}
\usepackage{hyperref}
\usepackage{polyglossia}


\setmainlanguage{arabic}
\setotherlanguage{english}

\newfontfamily\arabicfont[Script=Arabic,Scale=1.4]{Scheherazade}
\newfontfamily\englishfont[Mapping=tex-text,Renderer=ICU]{Charis SIL}

\let\arabicfonttt\ttfamily

\begin{document}

السلام عليكم

\begin{english}
\hrl{https://www.google.de}
\end{english}


\end{document}
1
  • dear salim bou, thank you very much for your advice, it works fine. Aug 18, 2016 at 18:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .