14

As of today, the command \luatextextdir does no longer seem to work. I employ the command in order to be able to typeset Arabic. To that end I created the following commands:

\newcommand{\arabtext}[1]       % Arabic inside LTR
    {\bgroup\luatextextdir TRT\arabicfont #1\egroup}
\newcommand{\arabnr}[1]         % for numbers inside Arabic text
    {\bgroup\luatextextdir TLT #1\egroup}
\newenvironment{arabpar}            % Arabic paragraph
    {\luatextextdir TRT\luatexpardir TRT\arabicfont}{}

As of today, however, I get the otherwise well-known "Undefined control sequence" - error.

I just updated all the packages to the newest version using the TeX Live Utility.

  • luatex prefix was removed in recent LaTeX release, try just \textdir – michal.h21 Oct 16 '15 at 7:45
14

The 'proper' (internal) name of the primitive has always been \textdir, but for various reasons it used to be 'activated' as \luatextextdir in LuaLaTeX. The LaTeX team have recently revised this approach and all primitives now have their 'natural' names in LuaLaTeX. Thus you should either update your code or add

\directlua{
  tex.enableprimitives("luatex",tex.extraprimitives("luatex"))
}

to your preamble.

(\textdir comes from Omega so is currently in a list called omega. At some stage in the near future it will be moved to a list called luatex, so tex.extraprimitives("omega", "luatex") is slightly more future-proof. However, I'd strongly advise revising your code to drop the prefix entirely.)

  • 1
    The team have contacted most package authors to have these names changed, but obviously that's not possible for direct end-user usage. – Joseph Wright Oct 16 '15 at 7:48
  • 1
    Did you contact Arthur regarding luabidi? It still uses \luatextextdir etc. – Ulrike Fischer Oct 28 '15 at 9:38

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.