Hi. Is \thewithproperty documented elsewhere? Is this a new primitive? It looks interesting. In the case of the \sin trick particular case \let\computer\the would also work; i added the \thewithproperty<number> feature just because i expect that users can come up with variants (like \drawme\sin ...) which
On 5/22/2021 11:34 PM, Jairo A. del Rio wrote: then would adapt behaviour (via \dowithproperty2). So, indeed it's a new primitive but (for now) only used with these lua hacks. Actually it's no big deal to reimplement \thewithoutunit<dim> as \thewithoutunit{\dowithproperty1\the} and then \thewithcmunit{\dowithproperty2\the} to serialize the dimension in cm but normally i need to "wonder for a while if it makes sense". Btw, adding primitives (related to the token related bits and pieces of the engine) only makes sense if the gain is in -- avoiding clumsy code: although that can hurt someones pride and joy over a nice and complex macro doing the same ... don't worry, i threw away plenty of code by now -- significant performance gain: which is seldom the case (there really is not much to gain, at least not in context which is rather optimized already) -- giving way less noise in tracing: which for me is a good reason (tracing changed a bit anyway) -- not adding much code to the engine or the need to refactor: although for some luametatex extensions some internals had to change fundamentally a good example is the extended macro argument handling: less clumsy tex code, a bit of performance gain and easier full expansion, way less tracing, but it violates the last argument because it did lead to some refactoring (i also had to make sure the extra overhead didn't slow down macro definitions and expansion) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------