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:
\documentclass[11pt,a4paper,twoside]{article}
\usepackage{fontspec}
\usepackage{lipsum}
\font \cmuntt = file:cmuntt.otf
\begin{document}
\fontid \cmuntt
\textbf{Zulu \lipsum[1-8]}
\end{document}
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
\cmuntt
?
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.
lualatex(if I add\usepackage{lipsum}to the preamble). – Feb 04 '18 at 02:14lipsumto the example, forgot I left it out — but it breaks just before that); and I'm on MikTeX – Darkgamma Feb 04 '18 at 02:16typewriter.sty? I do not find it in my own TeX setup, or CTAN. – Feb 04 '18 at 02:53fontspecand then using TeX-level font macros? Not even LaTeX. – cfr Feb 04 '18 at 03:04typewriter.styis this brilliant package at https://tex.stackexchange.com/questions/344214/use-latex-to-simulate-old-typewriter-written-texts – Darkgamma Feb 04 '18 at 03:05\fontetc. 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 04 '18 at 03:09\fontand\fontid; I didn't want to take the whole package apart, and using TeX macros in LaTeX ought to work anyhow; whether I use\fontidin the file itself, or do\include{typewriter}, the error is the same — but the code is more legible like this and doesn't require taking a look at two separate files. – Darkgamma Feb 04 '18 at 03:12