The following ecm compiles fine with LaTeX and XeLaTeX, but doesn't work with LuaLaTeX :


And here is the error :

Invalid \endlinechar.
<recently read> \@M 

l.4 \typein{test}

  • \endlinechar seems to get set to \@M which is 10000, a value normally used as maximum for penalties. The TeXBook states that for values <0 and >255 no endline character is appended to the line. Maybe in LuaTeX the value for \endlinechar is limited to some value below 10000 and therefore this causes an error? – Martin Scharrer Mar 1 '11 at 21:34
  • The manual of luatex says in the section about modifications: "The upper limit to \endlinechar and \newlinechar is 127.". So it won't work. – Ulrike Fischer Mar 2 '11 at 8:47
  • \endlinechar=-1 should work for the intended purpose. Note that even if luatex were to accept \endlinechar=10000, this would mean something completely different: in unicode, char 10000 is actually "UPPER RIGHT PENCIL" – Taco Hoekwater Mar 2 '11 at 11:30
  • @Taco, could you post an answer with the exact code (where should I write \endlinechar=-1 ?), please ? – Matsaya Mar 2 '11 at 16:20
  • 1
    I assume you will have to redefine \typein, but I assume this should be a job for the lualatex format itself. In any case, you will have to ask a latex expert, which I am definitely not... – Taco Hoekwater Mar 2 '11 at 18:25

You probably have to patch the kernel (untested):

  \read\@inputcheck to#1%

This should be done at format generation time; you might report it at the LaTeX mailing list (LATEX-L@LISTSERV.UNI-HEIDELBERG.DE).

  • this works. I also reported the bug. – Matsaya Mar 3 '11 at 22:10

I've submitted the bug to LaTeX bugs database and this is now fixed in TeXLive.

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.