[Dev-luatex] dimension helper

Paweł Jackowski P.Jackowski at gust.org.pl
Sat Feb 20 14:02:59 CET 2010

Dear Team,

it is a common convention in luatex that dimensions are specified either 
as a number (in scaled points) or a string with unit included. But 
unless I'm blind, there is no helper function that converts string 
dimension to a number. Seems that there is a standard dimen_to_number() 
function for that purpose. Would be convenient to have such on aboard. 
If I make such a helper, will you consider adding it to a repo? I'm 
thinking of

	tex.sp'1in' -> 4736286
	tex.sp()    -> error argument must be a string

or more general

	tex.unit('1in', 'cm')  -> 2.54

Pawe/l Jackowski
P.Jackowski at gust.org.pl

More information about the dev-luatex mailing list