16

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.

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

1 Answer 1

15

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.)

2
  • 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, 2015 at 7:48
  • 1
    Did you contact Arthur regarding luabidi? It still uses \luatextextdir etc. Oct 28, 2015 at 9:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .