0

The \begin{language} environment in polyglossia seems to create an extra vertical space which misaligns text, for example in a table.

Here is an example. I have tabular with 2 columns of type p{} , English on the left, and Arabic on the right. When the mainlanguage is Arabic, I need to specify \begin{english} for the left column. But this then creates extra vertical space (moves the English text downwards) and misaligns the table.

I can 'patch' this by redundantly specifying \begin{Arabic} for the left column, which then creates a matching vertical space, aligning the texts.

The results are shown here:

Output

Why is this vertical space being caused by any \begin{language} command? Is it common to other environments?

The MWE below has got the two single-row tables, one with the problem, and the next with the problem patched by using a redundant begin{Arabic} command.

By the way, I drew the horizontal rule manually. Is there a way I could have done this in Latex, given the tabular environment?

\documentclass[11pt,oneside]{article}
\usepackage{polyglossia}
\setmainlanguage[numerals=mashriq]{arabic}
\setotherlanguage{english}
\newfontfamily\arabicfont[Script=Arabic, Scale=1.50]{Scheherazade}
\newfontfamily\englishfont[Script=Latin, Scale = 1]{Times New Roman}

\begin{document}

\begin{tabular}[t]{p{0.45\linewidth}p{0.45\linewidth}}
ااا  ببب ااا 
&
\begin{english}
aaa bbb
\end{english}
\end{tabular}

\begin{tabular}[t]{p{0.45\linewidth}p{0.45\linewidth}}
\begin{Arabic} 
ااا  ببب ااا 
\end{Arabic}
&
\begin{english}
aaa bbb
\end{english}
\end{tabular}

\end{document}
  • I can't compile your example (I've got an incomplete installation) but I would try to guess: does a \leavevmode just before \begin{english} help? – campa Nov 12 '15 at 14:11
  • unfortunately this kills the left-to-right direction of the English text, so it appears backwards. – Tim Nov 12 '15 at 19:46

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.