# [texhax] Measurements inside TeX

Mukund R muxdevil.m at gmail.com
Wed Jun 23 11:18:26 CEST 2010

Hi,

I'm using XeTeX to typeset some text, which will be placed inside a
Scribus document. Since there's a lot of repetitive work involved, some
automation is done using Python.

My question is this: I need close interaction between Scribus and TeX
for the margins and other typographic detail to come off well. Is there
some way I can determine the height and width of a certain block of text
in TeX?

Something like: \textwidth{Lorem Ipsum} and \textheight{Lorem Ipsum}.

I know that TeX does a lot of calculations internally, but I just want
the final results to use in a subsequent \vspace, assuming that my text
block is a complete paragraph by itself.

In fact, a macro of the type \currenty will do, so that I can then do
something like: \vspace{availabley - \currenty}

Thanks,
Mukund