I'm new to lualatex, which looks phenomenal. I wonder what the easiest way is to access the dimensions of a box from within lualatex. I intend to use it in more complicated situations than this (as part of lua chunks) so I'm not looking for a hack within latex that feeds the dimensions to the lua chunk. I'm aware of the limitations of \directlua. Is this something that should be done using the node library? How?
\documentclass{minimal}
\usepackage{luacode}
\newcommand{\measureme}[1]{%
\directlua{-- what should go here to get the size of the box?}%
}
\begin{document}
The size is \measureme{this box}.
\end{document}
\settowidth{\alength}{this box}? – egreg Jul 12 '14 at 11:42\gensaveboxcommand in particular, it does something similar to what you want – michal.h21 Jul 12 '14 at 13:06hlistandvlistnode has width, height and depth attributes. See the manual, section 8.1.2. – Philipp Gesang Jul 12 '14 at 14:16