I'm getting a strange behaviour when loading polyglossia
and arabxetex
together, and enabling \setotherlanguages{arabic}
.
MWE:
\documentclass[a4paper,12pt,twoside]{memoir}
\usepackage{xcolor}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguages{arabic}
\usepackage{arabxetex}
\newfontfamily\arabicfont[Script=Arabic,Scale=1.5]{Scheherazade}
\begin{document}
1. English text
2. \textarabic{\textcolor{red}{مرحبا }بالعالم}
3. \textarabic{\textcolor{blue}{ـُ}}\\
4. \arab{\textcolor{brown}{mi'aT} , mi'at"An}
\end{document}
I assume that I can somehow safely(?) remove \setotherlanguages{arabic}
, as this is predefined in arabxetex
package, however I can't seem to figure out why character in line (3.) only shows up when disabling arabxetex
(and removing its environment in line 4., and enabling \setotherlanguages{arabic}
again).
PS I need both polyglossia
and arabxetex
working side by side for correct typesetting in colours (full text vs diacritics) in different part of the document - this shouldn't be an issue either from the documentation of the packages, LuaLaTex
XeLaTeX
.
PSS This (link) seems to be related, but can't seem to find how they manage to solve the problem.
Typesetting with LuaLaTex
XeLaTeX
in Overleaf with documentclass memoir
.
Error log:
...
! LaTeX Error: Unable to properly define \@@leqno; primitive \leqno no longer p
rimitive.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2646 \@saveprimitive\leqno\@@leqno
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
! LaTeX Error: Unable to properly define \@@eqno; primitive \eqno no longer pri
mitive.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.2647 \@saveprimitive\eqno\@@eqno
Your command was ignored.
Type I <command> <return> to replace it with another command,
or <return> to continue without it.
\mathdisplay@stack=\toks32
LaTeX Info: Redefining \[ on input line 2817.
LaTeX Info: Redefining \] on input line 2818.
))
\g__fontspec_family_Scheherazade_int=\count329
.................................................
. fontspec info: "no-font-shape"
.
. Could not resolve font "Scheherazade/I" (it probably doesn't exist).
.................................................
.................................................
. fontspec info: "defining-font"
.
. Font family 'Scheherazade(0)' created for font 'Scheherazade' with options
. [Script=Arabic,Scale=1.5].
.
. This font family consists of the following NFSS series/shapes:
.
. - 'normal' (m/n) with NFSS spec.:
. <->s*[1.5]"Scheherazade/OT:script=arab;language=DFLT;"
. - 'small caps' (m/sc) with NFSS spec.:
. - 'bold' (bx/n) with NFSS spec.:
. <->s*[1.5]"Scheherazade/B/OT:script=arab;language=DFLT;"
. - 'bold small caps' (bx/sc) with NFSS spec.:
. - 'bold italic' (bx/it) with NFSS spec.:
. <->s*[1.5]"Scheherazade/BI/OT:script=arab;language=DFLT;"
. - 'bold italic small caps' (bx/itsc) with NFSS spec.:
.................................................
(/compile/output.aux)
\openout1 = `output.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for TU/lmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 12.
LaTeX Font Info: ... okay on input line 12.
.................................................
. fontspec info: "setup-math"
.
. Adjusting the maths setup (use [no-math] to avoid this).
.................................................
\symlegacymaths=\mathgroup4
LaTeX Font Info: Overwriting symbol font `legacymaths' in version `bold'
(Font) OT1/cmr/m/n --> OT1/cmr/bx/n on input line 12.
LaTeX Font Info: Redeclaring math accent \acute on input line 12.
LaTeX Font Info: Redeclaring math accent \grave on input line 12.
LaTeX Font Info: Redeclaring math accent \ddot on input line 12.
LaTeX Font Info: Redeclaring math accent \tilde on input line 12.
LaTeX Font Info: Redeclaring math accent \bar on input line 12.
LaTeX Font Info: Redeclaring math accent \breve on input line 12.
LaTeX Font Info: Redeclaring math accent \check on input line 12.
LaTeX Font Info: Redeclaring math accent \hat on input line 12.
LaTeX Font Info: Redeclaring math accent \dot on input line 12.
LaTeX Font Info: Redeclaring math accent \mathring on input line 12.
LaTeX Font Info: Redeclaring math symbol \Gamma on input line 12.
LaTeX Font Info: Redeclaring math symbol \Delta on input line 12.
LaTeX Font Info: Redeclaring math symbol \Theta on input line 12.
LaTeX Font Info: Redeclaring math symbol \Lambda on input line 12.
LaTeX Font Info: Redeclaring math symbol \Xi on input line 12.
LaTeX Font Info: Redeclaring math symbol \Pi on input line 12.
LaTeX Font Info: Redeclaring math symbol \Sigma on input line 12.
LaTeX Font Info: Redeclaring math symbol \Upsilon on input line 12.
LaTeX Font Info: Redeclaring math symbol \Phi on input line 12.
LaTeX Font Info: Redeclaring math symbol \Psi on input line 12.
LaTeX Font Info: Redeclaring math symbol \Omega on input line 12.
LaTeX Font Info: Redeclaring math symbol \mathdollar on input line 12.
LaTeX Font Info: Redeclaring symbol font `operators' on input line 12.
LaTeX Font Info: Encoding `OT1' has changed to `TU' for symbol font
(Font) `operators' in the math version `normal' on input line 12.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) OT1/cmr/m/n --> TU/lmr/m/n on input line 12.
LaTeX Font Info: Encoding `OT1' has changed to `TU' for symbol font
(Font) `operators' in the math version `bold' on input line 12.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) OT1/cmr/bx/n --> TU/lmr/m/n on input line 12.
LaTeX Font Info: Overwriting symbol font `operators' in version `normal'
(Font) TU/lmr/m/n --> TU/lmr/m/n on input line 12.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `normal'
(Font) OT1/cmr/m/it --> TU/lmr/m/it on input line 12.
LaTeX Font Info: Overwriting math alphabet `\mathbf' in version `normal'
(Font) OT1/cmr/bx/n --> TU/lmr/bx/n on input line 12.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `normal'
(Font) OT1/cmss/m/n --> TU/lmss/m/n on input line 12.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `normal'
(Font) OT1/cmtt/m/n --> TU/lmtt/m/n on input line 12.
LaTeX Font Info: Overwriting symbol font `operators' in version `bold'
(Font) TU/lmr/m/n --> TU/lmr/bx/n on input line 12.
LaTeX Font Info: Overwriting math alphabet `\mathit' in version `bold'
(Font) OT1/cmr/bx/it --> TU/lmr/bx/it on input line 12.
LaTeX Font Info: Overwriting math alphabet `\mathsf' in version `bold'
(Font) OT1/cmss/bx/n --> TU/lmss/bx/n on input line 12.
LaTeX Font Info: Overwriting math alphabet `\mathtt' in version `bold'
(Font) OT1/cmtt/m/n --> TU/lmtt/bx/n on input line 12.
\AtBeginShipoutBox=\box47
! Package bidi Error: Oops! you have loaded package amsmath after bidi package.
Please load package amsmath before bidi package, and then try to run xelatex o
n your document again.
See the bidi package documentation for explanation.
Type H <return> for immediate help.
...
l.12 \begin{document}
This error message was generated by an \errmessage
command, so I can't give any explicit help.
Pretend that you're Hercule Poirot: Examine all clues,
and deduce the truth by order and method.
! Package bidi Error: Oops! you have loaded package amstext after bidi package.
Please load package amstext before bidi package, and then try to run xelatex o
n your document again.
See the bidi package documentation for explanation.
Type H <return> for immediate help.
...
l.12 \begin{document}
(That was another \errmessage.)
! Package bidi Error: Oops! you have loaded package arabxetex after bidi packag
e. Please load package arabxetex before bidi package, and then try to run xelat
ex on your document again.
See the bidi package documentation for explanation.
Type H <return> for immediate help.
...
l.12 \begin{document}
(That was another \errmessage.)
...
\usepackage{arabxetex} \let\textarabic\relax \let\Arabic\relax \setotherlanguages{arabic}
though I don't know if that would break other things. Also I don't think you can use LuaLaTeX witharabxetex
XeLaTeX
and notLuaLaTeX
(typo). For future references for anybody trying it out in the later, cf. packagearabluatex
.