例如,我们能否仅获取用红色书写的阿拉伯单词的最后一个字符。
我使用 arabi 包和 pdfLatex
答案1
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[LAE]{fontenc} % from the arabi package to get the colored short vowel
\usepackage{xcolor}
\usepackage{arabtex}
\newcommand{\ARtextcolor}[2]{\LR{\textcolor{#1}{\RL{#2}}}}
\allowarab{\ARtextcolor}
\begin{document}
\setarab
\Large
\newsavebox{\uu}
\savebox{\uu}{\textcolor{red}{u}}
\begin{RLtext}
'an-\nospace\ARtextcolor{red}{-ta} \ARtextcolor{red}{ta-} \nospace -f`al \hspace{-3pt} \LR{\usebox{\uu}}
'an-\nospace\ARtextcolor{blue}{-ti} \ARtextcolor{blue}{ta-} \nospace -f`al- \nospace\ARtextcolor{blue}{-yna}
\end{RLtext}
\end{document}