Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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

\documentclass{minimal}
\begin{document}
\typein{test}
\end{document}

And here is the error :

Invalid \endlinechar.
<recently read> \@M 

l.4 \typein{test}

? 
share|improve this question
    
\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

2 Answers 2

You probably have to patch the kernel (untested):

\def\@xtypein[#1]#2{%
  \typeout{#2}%
  \@tempcnta\endlinechar
  \endlinechar\m@ne
  \read\@inputcheck to#1%
  \endlinechar\@tempcnta
  \@typein}

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

share|improve this answer
    
this works. I also reported the bug. –  Matsaya Mar 3 '11 at 22:10
up vote 3 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.