1

In many cases, when compiling with lualatex I have this error

(c:/texlive/2015/texmf-dist/tex/latex/base/ltluatex.tex File: ltluatex.tex 2015/10/03 v1.0f LuaTeX support for plain TeX (core)

! Missing number, treated as zero. \relax l.140 \newcatcodetable\catcodetable@initex

For example compiling this answer or @Mico answer give me this error, note I have texlive 2015, LuaTeX, Version beta-0.80.

How can I resolve this problem, thanks.

Update1 Not working example

\documentclass[border=5mm]{standalone}
\usepackage{fontspec}
\setmainfont{Helvetica}
\usepackage{luamplib}
\begin{document}
\mplibtextextlabel{enable}
\begin{mplibcode}
beginfig(1);

path ground, wall, ramp, ball;

w = 21; h = 3w; r = 200; a = angle(r+-+h,-h);

ground = (left -- right) scaled 140;
wall   = unitsquare xscaled w yscaled h shifted 110 left;
ramp   = unitsquare xscaled (r+w) yscaled 5
                    shifted point 3 of wall
                    rotatedabout(point 2 of wall, a);
ball   = fullcircle scaled 2 shifted up rotated a 
                    scaled 10 shifted point 2.7 of ramp;

draw ground;
fill wall withcolor .7[red+1/2green,white]; draw wall;
fill ramp withcolor .7[red,white];          draw ramp;
fill ball withcolor .7[blue,white];         draw ball;

path mark[];
mark1 = (point 1 of wall -- point 1 of ramp) shifted 7 down;
drawdblarrow mark1; 
draw (down--up) scaled 2 shifted point 0 of mark1;
draw (down--up) scaled 2 shifted point 1 of mark1;
label.bot("Displacement", point 0.5 of mark1);

endfig;
\end{mplibcode}
\end{document}

Update2 log file

This is LuaTeX, Version beta-0.80.0 (TeX Live 2015/W32TeX) (rev 5238)  (format=lualatex 2015.12.21)  4 FEB 2016 21:16
 restricted \write18 enabled.
**test3.tex
(./test3.tex
LaTeX2e <2015/01/01>
Babel <3.9l> and hyphenation patterns for 38 languages loaded.
(c:/texlive/2015/texmf-dist/tex/latex/standalone/standalone.cls
Document Class: standalone 2015/07/15 v1.2 Class to compile TeX sub-files standa
lone
(c:/texlive/2015/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX detected.
)
(c:/texlive/2015/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is detected.
)
(c:/texlive/2015/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
(c:/texlive/2015/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2014/12/03 v2.7a package option processing (HA)

(c:/texlive/2015/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(c:/texlive/2015/texmf-dist/tex/generic/xkeyval/xkvutils.tex
\XKV@toks=\toks14
\XKV@tempa@toks=\toks15

(c:/texlive/2015/texmf-dist/tex/generic/xkeyval/keyval.tex))
\XKV@depth=\count79
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
))
\sa@internal=\count80
\c@sapage=\count81

(c:/texlive/2015/texmf-dist/tex/latex/standalone/standalone.cfg
File: standalone.cfg 2015/07/15 v1.2 Default configuration file for 'standalone'
 class
)
(c:/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(c:/texlive/2015/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count82
\c@section=\count83
\c@subsection=\count84
\c@subsubsection=\count85
\c@paragraph=\count86
\c@subparagraph=\count87
\c@figure=\count88
\c@table=\count89
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
\sa@box=\box26
)
(c:/texlive/2015/texmf-dist/tex/latex/fontspec/fontspec.sty
Package: fontspec 2015/09/24 v2.4e Font selection for XeLaTeX and LuaLaTeX

(c:/texlive/2015/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2016/01/19 v6377 L3 programming layer (loader) 

(c:/texlive/2015/texmf-dist/tex/latex/l3kernel/expl3-code.tex
Package: expl3 2016/01/19 v6377 L3 programming layer (code)
L3 Module: l3bootstrap 2016/01/01 v6339 L3 Bootstrap code

(c:/texlive/2015/texmf-dist/tex/latex/base/ltluatex.tex
File: ltluatex.tex 2015/12/18 v1.0l LuaTeX support for plain TeX (core) 

! Missing number, treated as zero.
<to be read again> 
\relax 
l.140 \newcatcodetable\catcodetable@initex

A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

! No room for a new 8.
\e@ch@ck ...lse \errmessage {No room for a new #4}
                                                  \fi \fi 
l.140 \newcatcodetable\catcodetable@initex

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.


! LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.140 \newcatcodetable\catcodetable@initex

You're in trouble here.  Try typing  <return>  to proceed.
If that doesn't work, type  X <return>  to quit.

! Invalid \catcode table.
<recently read> \allocationnumber 

l.140 \newcatcodetable\catcodetable@initex

You can only switch to a \catcode table that is initialized
using \savecatcodetable or \initcatcodetable, or to table 0

! Missing number, treated as zero.
<to be read again> 
\relax 
l.140 \newcatcodetable\catcodetable@initex

A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

\catcodetable@initex=\catcodetable26
! Missing number, treated as zero.
<to be read again> 
\relax 
l.141 \newcatcodetable\catcodetable@string

A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

! No room for a new 8.
\e@ch@ck ...lse \errmessage {No room for a new #4}
                                                  \fi \fi 
l.141 \newcatcodetable\catcodetable@string

(That was another \errmessage.)

! Missing number, treated as zero.
<to be read again> 
\relax 
l.141 \newcatcodetable\catcodetable@string

A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

\catcodetable@string=\catcodetable26
! Invalid \catcode table.
\newcatcodetable ...atcodetable \allocationnumber 

l.141 \newcatcodetable\catcodetable@string

You cannot overwrite the current \catcode table

)
Runaway definition?
#1#2#3{\ifnum #1>#2 \expandafter \@gobble \else \expandafter \@firsto\ETC.
! File ended while scanning definition of \setrangecatcode.
<inserted text> 
}
l.275       \input{ltluatex}
                          %
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

! Missing { inserted.
<inserted text> }

l.275       \input{ltluatex}
                          %
Where was the left brace? You said something like `\def\a}',
which I'm going to interpret as `\def\a{}'.

! Missing number, treated as zero.
<to be read again> 
\relax 
l.277     \newcatcodetable\ucharcat
                                 @table
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

! No room for a new 8.
\e@ch@ck ...lse \errmessage {No room for a new #4}
                                                  \fi \fi 
l.277     \newcatcodetable\ucharcat
                                 @table
(That was another \errmessage.)

! Missing number, treated as zero.
<to be read again> 
\relax 
l.277     \newcatcodetable\ucharcat
                                 @table
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

\ucharcat=\catcodetable26
! Invalid \catcode table.
\newcatcodetable ...atcodetable \allocationnumber 

l.277     \newcatcodetable\ucharcat
                                 @table
You cannot overwrite the current \catcode table

! Missing number, treated as zero.
<to be read again> 
{
l.278     \directlua{

A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

! Missing { inserted.
<to be read again> 
{
l.278     \directlua{

A left brace was mandatory here, so I've put one in.
You might want to delete and/or insert some corrections
so that I will find a matching right brace soon.
If you're confused by all this, try typing `I}' now.

! Missing number, treated as zero.
<to be read again> 
{
l.283     \directlua{
                   require("expl3")}%
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

! Missing { inserted.
<to be read again> 
{
l.283     \directlua{
                   require("expl3")}%
A left brace was mandatory here, so I've put one in.
You might want to delete and/or insert some corrections
so that I will find a matching right brace soon.
If you're confused by all this, try typing `I}' now.

! Missing number, treated as zero.
<to be read again> 
{
l.285       \directlua{

A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

! Missing { inserted.
<to be read again> 
{
l.285       \directlua{

A left brace was mandatory here, so I've put one in.
You might want to delete and/or insert some corrections
so that I will find a matching right brace soon.
If you're confused by all this, try typing `I}' now.

! Missing { inserted.
<to be read again> 
{
l.292         \csname\detokenize{
                               lua_now_x:n}\endcsname{require("expl3")}%
A left brace was mandatory here, so I've put one in.
You might want to delete and/or insert some corrections
so that I will find a matching right brace soon.
If you're confused by all this, try typing `I}' now.

)
Runaway text?
{lua_now_x:n}\endcsname {require("expl3")}}\fi \fi \fi \begingroup \def \ETC.
! File ended while scanning text of \detokenize.
<inserted text> 
}
l.97 \input{expl3-code.tex}

I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

! Missing \endcsname inserted.
<to be read again> 
\begingroup 
l.98 \begingroup
              \expandafter\expandafter\expandafter\endgroup
The control sequence marked <to be read again> should
not appear between \csname and \endcsname.

)
Runaway text?
{ if status.ini_version then tex.write("1") end }>0 \everyjob {\begingroup \ETC.
! File ended while scanning text of \csname\endcsname.
<inserted text> 
}
l.20 \RequirePackage{expl3}[2015/06/26]

I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

! LuaTeX error [\directlua]:1: unexpected symbol near '{'.
<inserted text> }

l.20 \RequirePackage{expl3}[2015/06/26]

The lua interpreter ran into a problem, so the
remainder of this lua chunk will be ignored.

! Missing = inserted for \ifnum.
<to be read again> 
\let 
l.20 \RequirePackage{expl3}[2015/06/26]

I was expecting to see `<', `=', or `>'. Didn't.

! Missing number, treated as zero.
<to be read again> 
\let 
l.20 \RequirePackage{expl3}[2015/06/26]

A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)

! Undefined control sequence.
<argument> \@nil 

l.20 \RequirePackage{expl3}[2015/06/26]

The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

)
Runaway argument?
~ e.g.,~ "xelatex"~ or~ "lualatex"\\ instead~ of~ plain~ "latex"~ or~\ETC.
! File ended while scanning use of \@iforloop.
<inserted text> 
\par 
l.3 \setmainfont
              {Helvetica}
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

! Undefined control sequence.
<argument> \@nil 

l.3 \setmainfont
              {Helvetica}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

)
Runaway argument?
 wall, ramp, ball; \par w = 21; h = 3w; r = 200; a = angle(r+-+h,-h);\ETC.
! File ended while scanning use of \@iforloop.
<inserted text> 
\par 
<*> test3.tex

I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.
I'll try to recover; but if the error is serious,
you'd better type `E' or `X' now and fix your file.

! Emergency stop.
<*> test3.tex

*** (job aborted, no legal \end found)



Here is how much of LuaTeX's memory you used:
 1153 strings out of 494752
 100000,1373583 words of node,token memory allocated 368 words of node memory still in use:
   2 hlist, 1 rule, 1 glue, 15 glyph, 38 glue_spec, 1 temp, 11 if_stack, 1 write
, 1 local_par, 1 dir nodes
   avail lists: 2:7,3:1,4:1,9:2
 4806 multiletter control sequences out of 65536+600000
 15 fonts using 431615 bytes
 34i,0n,56p,197b,36s stack positions out of 5000i,500n,10000p,200000b,100000s
!  ==> Fatal error occurred, no output PDF file produced!

@DavideCarlisle if I run fmtutil --all I get errors

fmtutil [ERROR]: call to 'luatex -ini -jobname=lualatex -progname=lualatex lualatex.ini' returned error code 1

fmtutil [ERROR]: `luatex -ini -jobname=lualatex -progname=lualatex lualatex.ini' failed

fmtutil [ERROR]: call to 'luatex -ini -jobname=dvilualatex -progname=dvilualatex dvilualatex.ini' returned error code 1

fmtutil [ERROR]: 'luatex -ini -jobname=dvilualatex -progname=dvilualatex dvilualatex.ini' failed

fmtutil [ERROR]: call to 'xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' returned error code 1

fmtutil [ERROR]: 'xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed

  • Please provide a small test file that shows this problem. You presumably have not updated latex to the october 2015 release (but it should work for the older 2015/01/01 release as well) – David Carlisle Feb 1 '16 at 17:29
  • it runs without error with a current release. is your latex LaTeX2e <2015/01/01> (not LaTeX2e <2015/02/01> patch level 1 or LaTeX2e <2015/02/01> patch level 2) if so updating latex with your package manager should fix things, but it would still be good to find out why the error occurs. – David Carlisle Feb 1 '16 at 18:16
  • note that your tex installation is inconsistent you have (I think) the 2015/01/01 (January) latex but you have ltluatex.tex 2015/10/03 from October, but for some reason you do not have the october latex release. – David Carlisle Feb 1 '16 at 18:19
  • I have just hit the same thing. This is on Ubunut-Xubuntu Xenial. – wilx May 12 '16 at 18:39
4

Your document runs without error on an updated latex. You haven't shown the start of the log which would show the latex version but it looks as if you have an inconsistent installation with ltluatex.lua coming from the October 2015 latex release but a format from the 2015/01/01 release. Most likely you have the updated files but the formats did not rebuild.

You could use

fmtutil-sys --all

to rebuild the formats based on your installed files, or better, use

tlmgr update --all

which would get the 2016/02/01 release and remake the formats using the very latest sources.

  • I try with fmtutil-sys --all and the problem persists, I can't use tlmgr update --all due to the weakness of the Internet. I have updated my question and add the log file. – Salim Bou Feb 4 '16 at 20:36
  • @salimbou as I suspected you have LaTeX2e <2015/01/01> the original release, but you have ltluatex from october release. look at /texlive/2015/texmf-dist/tex/latex/base/latex.ltx should have a setting something like \edef\fmtversion {2016/02/01} but I suspect yours has 2015/10/01 (October) which would be OK so you just need to make a format using that which should be fmtutil or fmtutil-sys (depending on your local settings) if your latex.ltx really says 2015/01/01 like your format banner in the log, how did you get ltluatex.lua at (it was not distributed until the october release) – David Carlisle Feb 4 '16 at 20:45
  • I have \edef\fmtversion {2016/02/01} at latex.ltx. – Salim Bou Feb 4 '16 at 20:52
  • @salimbou Oh that's this week's release, so your format is a lot older than your sources, either fmtutil-sys --all will rebuild or something very odd is happening. (Actually expect an update to the data loader for luatex/xetex today ir tomorrow so you may want to wait until then. But you said tlmgr update does not work for you but clearly you updated latex this week? – David Carlisle Feb 4 '16 at 21:04
  • I can update few packages but I can't update all of them, I have updated latex this week, but I think I need to update luatex files also ? – Salim Bou Feb 4 '16 at 21:17

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.