maxwell wrote:
I'm just finishing up a project that involved typesetting text in several languages, while outputting an XML file that defined in X/Y coordinates the position and size of the bounding box surrounding each line of text in the PDF.  [...] [I]s there any way I could have done something similar using xetex?  That is, called another programming language to output box positions and sizes.  I suppose it's possible to write to an XML file in xetex natively, but I'm not sure how I could get the positions and sizes of boxes. 

Is it possible that these three PdfTeX/XeTeX primitives might help :

  • \pdfsavepos
    Saves the current location of the page in the typesetting stream.
  • \pdflastxpos
    Retrieves the horizontal position saved by \pdfsavepos.
  • \pdflastypos
    Retrieves the vertical position saved by \pdfsavepos.

Philip Taylor

--------------------------------------------------
Subscriptions, Archive, and List information, etc.:
  http://tug.org/mailman/listinfo/xetex

Reply via email to