Vyatcheslav Yatskovsky wrote:
Hello Hans,
Thanks. Is there any way to print a number in hex or bin form? (Either using lua or tex facilities?) I already know how to generate random integer numbers, \ctxlua{tex.print(math.random(30,60)) ;} now I need to represent them as binary or hexadecimal.
you can use string.format if you wanna use lua seriously, it makes sense to buy the book ... easy reading, very complete and inexpensive Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------