In short, I am trying to use a LuaTeX package, and after digging into the error-emitting code have come up with the following minimal example:

\font \cmuntt = file:cmuntt.otf
    \fontid \cmuntt
    \textbf{Zulu \lipsum[1-8]}

The font file cmuntt.otf is arbitrary in this case, and is otherwise recognised by Lua(La)Tex, but the sequence \fontid \cmuntt, dragged verbatim out of the package in question, typewriter.sty, doesn't seem to work, and causes the compiler to emit the following error code:

! Undefined control sequence.
l.6      \fontid

I'm not sure what is supposed to happen, nor what is actually happening, but it is worrying that the compiler is emitting that error message with what is supposed to be a core LuaTeX control sequence. Replacing fontspec with luaotfload predictably doesn't change anything.

I am using a (supposedly?) up-to-date MikTeX installation, if it makes a difference.

  • 4
    On my TeXLive 2017 distribution the snippet compiles with lualatex (if I add \usepackage{lipsum} to the preamble). – user121799 Feb 4 '18 at 2:14
  • 1
    Well, with an current complete MiKTeX 2.9 I can compile your code without any error or warning. – Mensch Feb 4 '18 at 2:27
  • 1
    Where is file typewriter.sty? I do not find it in my own TeX setup, or CTAN. – user139954 Feb 4 '18 at 2:53
  • 1
    But why are you using \font etc. at all in LaTeX? You should use the higher level macros, even in a package, unless your package is the package providing those macros, obviously. – cfr Feb 4 '18 at 3:09
  • 2
    Oh, the purpose of the package is to screw up the typesetting. Fair enough. – cfr Feb 4 '18 at 3:12

The answer to Use LaTeX to simulate old typewriter written texts you mention in comments clearly specifies that the code works only with TeX Live 2015 or later.

Indeed, I tried to compile your example with various releases of TeX Live and it fails only with TeX Live 2014 (and earlier).

  • Huh, yeah; the oddest part about it is that I did update MikTeX, but LuaTeX seemingly didn't update and was stuck on a 2013 release. Truly upsetting. Reinstalling MikTeX and admin-priv updating it fixed everything, and caught a few more un-updated packages and executables (why are they not updated? The update tool gives no error messages when I update even when it fails, it seems; but that's a question for a different time), and it works on, apparently, any LuaTeX version after 2015. +1, thanks – Darkgamma Feb 4 '18 at 14:59

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.