1

How to fix the following underlined Arabic text?

\documentclass{article}
\usepackage[tuenc]{fontspec}

\newfontfamily\arabicfont{Amiri}[Script=Arabic, RawFeature={+anum}]
\usepackage{arabluatex}

\begin{document}

Without underlining:

\begin{txarab}
    كتاب
\end{txarab}

With underlining

\begin{txarab}
\underline{كتاب}
\end{txarab}

\end{document}

enter image description here

2

\underline knows nothing about arabic text. Use:

\begin{txarab}
\underline{\begin{txarab}كتاب\end{txarab}}
\end{txarab}

enter image description here

or define your own \arabuline which does the \begin .. \end automatically

1

There might be different solutions, but I find the following one working using ulem package:

\documentclass{article}
\usepackage[tuenc]{fontspec}

\newfontfamily\arabicfont{Amiri}[Script=Arabic, RawFeature={+anum}]
\usepackage{arabluatex,ulem}

\begin{document}

Without underlining:

\begin{txarab}
    كتاب
\end{txarab}

With underlining

\begin{txarab}
\uline{كتاب}
\end{txarab}

\end{document}

enter image description here

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.