3

I am receiving an undefined control sequence for tabularx, I found that adding the Arabic language causes the error, but I don't know how to fix it. My MWE is below:

\documentclass{memoir}

\usepackage{fontspec}
\usepackage{polyglossia}
\setotherlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Arial}
\setmainlanguage{english}
%\setdefaultlanguage{english}
\newfontfamily\englishfont{Linux Libertine}
\newfontfamily\englishfontsf{Calibri}
\newfontfamily\englishfonttt{Inconsolata}

\usepackage{tabularx}
\begin{document}

\begin{tabularx}{\linewidth}{ll}
    2&2\\
\end{tabularx}

\end{document}

I am using XeLaTeX.

  • This is fixed in the next memoir release, ETA yet unknown, but should be out in time for TeXLive 2018 – daleif Mar 6 '18 at 8:05
3

This is due to a clash between memoir, tabularx, and bidi. memoir contains its own implementation of tabularx which is incompatible with how bidi tries to patch tabularx.

The solution is to start your file with:

\documentclass{memoir}
\DisemulatePackage{tabularx}
\usepackage{tabularx}

Things will then compile correctly.

| improve this answer | |

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.