输入数字时长行不会换行

输入数字时长行不会换行

为什么下面的长行不会换行以及如何强制换行?

\documentclass[a4paper]{article}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{arabic}

\newfontfamily\arabicfont[Script=Arabic, Scale=1]{Tahoma}

\begin{document}
This is a very long line that normally needs to be wrapped:
\\
\textarabic{\char64474\char64475\char64474\char64475\char64474\char64475\char64474\char64475\char64474\char64475\char64474\char64475\char64474\char64475\char64474\char64475\char64474\char64475\char64474\char64475\char64474\char64475\char64474\char64475\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381\char64380\char64381}

Same thing with a space filled character line like this one:
\\
\textarabic{\char64474 \char64475 \char64474 \char64475 \char64474 \char64475 \char64474 \char64475 \char64474 \char64475 \char64474 \char64475 \char64474 \char64475 \char64474 \char64475 \char64474 \char64475 \char64474 \char64475 \char64474 \char64475 \char64474 \char64475 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381 \char64380 \char64381}
\end{document}

答案1

\char吞噬其后的空间(就像几乎所有的 TeX 基元一样),您需要插入一个明确的空格\charXXXX\  或以一个空组结束它\charXXXX{} (请注意两种情况下的尾随空格)。

相关内容