[NTG-context] image file resolver in Lua?

Henning Hraban Ramm texml at fiee.net
Tue Feb 20 10:03:28 CET 2018


Am 2018-02-04 um 13:06 schrieb Hans Hagen <pragma at wxs.nl>:

> \getfiguredimensions[t:/sources/cow.pdf]
> 
> \starttabulate[|T|T|]
> \NC \string\figurewidth         \NC \figurewidth         \NC \NR
> \NC \string\figureheight        \NC \figureheight        \NC \NR
> \NC \string\figurexscale        \NC \figurexscale        \NC \NR
> \NC \string\figureyscale        \NC \figureyscale        \NC \NR
...
> \TB
> \NC \string\figurefullname      \NC \figurefullname      \NC \NR
> \NC \string\noffigurepages      \NC \noffigurepages      \NC \NR
> \TB
> \NC \string\figurefilepath      \NC \figurefilepath      \NC \NR
> \NC \string\figurefilename      \NC \figurefilename      \NC \NR
> \NC \string\figurefiletype      \NC \figurefiletype      \NC \NR
> \stoptabulate

Next try: How can I access these values from Lua?

While \ctxlua{print("\figureheight")} works,
context.figureheight is a function value (?),
context.figureheight() or tex.figureheight() is nil, 
tex.getdimen("figureheight") is also wrong, and it’s also no glue.

I’d be thankful for a hint.


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD




More information about the ntg-context mailing list