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.

I don't understand how the token library of luatex works.

\documentclass{standalone}

\begin{document}

\def\mymacro{A}

\directlua{%
  t = token.create ('mymacro')
  token.expand(t)
  token.get_next()
}

\end{document}

The token.expand does not work as I expected: luatex says Undefined control sequence. Why?

With the token.get_next(), I don't know exactly what I should get...

share|improve this question
add comment

1 Answer

up vote 5 down vote accepted

Unfortunately token.expand is currently broken. See the bug report which derives from an example exactly like yours.

share|improve this answer
add comment

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.