1

I've got an issue with XeLaTeX ignoring \allowbreak on lines that overflow by a small amount. I've tried to recreate the issue with English text but it does not occur. We have a large amount of data so the solution needs to be in the template. Previously the Arabi package was used and that did not have this behaviour. I'm more than happy for the text to break at the comma as in the third line. Does anyone know of a solution/workaround for this issue?

Minimal example

Minimal example:

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

\usepackage[showcrop, paperwidth=170mm, paperheight=240mm, top=28mm, bottom=18mm, left=20mm, right=20mm]{geometry}
\usepackage{showframe}
\usepackage{arabxetex}

\setmainfont[Ligatures=TeX]{Amiri}
\newfontfamily\arabicfont[Script=Arabic, Scale=1.0]{Amiri}

\newcommand\lb[1]{\textbf{#1:} } % Label Text, includes a fixed space
\newcommand\tx[1]{\textarab[voc]{#1}}                                  % Text


\newcommand\ars{;\allowbreak{}\thinspace{}}    % semicolon
\newcommand\arc{,\allowbreak{}\thinspace{}}                                  % comma
\newcommand\sol{/}                % solidus

\setlength{\parindent}{0pt}
\setlength{\overfullrule}{0.5mm}
\begin{document}
\begin{arab}[voc]
\lb{المؤلف}\tx{السهروردي\arc{}عبدالقاهر بن عبد الله بن محمد البكري الصديقي، أبو النجيب\arc{}563هـ\sol{}1167م.}

\lb{ال____مؤلف}\tx{السهروردي\arc{}عبدالقاهر بن عبد الله بن محمد البكري الصديقي، أبو النجيب\arc{}563هـ\sol{}1167م.}

\lb{ال__________مؤلف}\tx{السهروردي\arc{}عبدالقاهر بن عبد الله بن محمد البكري الصديقي، أبو النجيب\arc{}563هـ\sol{}1167م.}

\lb{المؤلف}\tx{السهروردي\arc{}عبدالقاهر بن عبد الله بن محمد البكري الصديقي، أبو النجيب}
\end{arab}
\end{document}

Your Answer

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

Browse other questions tagged or ask your own question.