[Tex/LaTex] An alternative to utf8 and arabtex under memoir documentclass

arabicfont-encodingsmemoirunicode

I'd like to use utf8 and arabtex packages under the memoir documentclass, but it seems unlikely to happen (previous discussion). What would be a good alternative, no transliteration and something that works with T1 encoding?

\documentclass[a4paper,oneside,12pt]{memoir}
\usepackage[T1]{fontenc}
\usepackage{arabtex}
\usepackage{utf8}


\begin{document}

بسم الله الرحمن الرحيم

\end{document}

This will produce an error:

("C:\Program Files\MiKTeX\tex\latex\arabtex\arabtex.sty"
("C:\Program Files\MiKTeX\tex\latex\arabtex\aconfig.sty")
("C:\Program Files\MiKTeX\tex\latex\arabtex\arabaux.sty")

! Class memoir Error: Font command \it is not supported.

See the memoir class documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.551 \settransfont {\rm \it }
                              % standard font for transliteration

Best Answer

You can get back the functionality of the "old" font commands by writing, after \documentclass[<options>]{memoir},

\makeatletter
\DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm}
\DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf}
\DeclareOldFontCommand{\tt}{\normalfont\ttfamily}{\mathtt}
\DeclareOldFontCommand{\bf}{\normalfont\bfseries}{\mathbf}
\DeclareOldFontCommand{\it}{\normalfont\itshape}{\mathit}
\DeclareOldFontCommand{\sl}{\normalfont\slshape}{\@nomath\sl}
\DeclareOldFontCommand{\sc}{\normalfont\scshape}{\@nomath\sc}
\makeatother

However, as remarked by Yiannis,

\documentclass[<options>,oldfontcommands]{memoir}

does this without extra code. Here <options> stands for all the other options you want to pass to memoir, in your case call it as

\documentclass[a4paper,oneside,12pt,oldfontcommands]{memoir}