2

I'm looking to programmatically generate PDF documents using LaTeX, but at the same time, keep track of where the elements are getting rendered (i.e. the x,y coordinates of \image elements or the \section element etc. ) in each page of each document.

Is there any way that I can do this?

Thanks

  • Welcome to TeX.SE. Package zref and its savepos feature, e.g. \zsavepos{myimage} and \zposx{myimage} and \zposy{myimage}, where myimage is a label name you can design yourself. (of course, only once). –  Feb 03 '18 at 06:10
  • @ChristianHupfer Hi, Christopher, can you please elaborate? Perhaps, by posting as an asnwer? Thanks! – Samuel Bushi Feb 03 '18 at 06:34
  • 1
    I wonder a little bit about your statement of in each page of each document. This is too broad. –  Feb 03 '18 at 06:56
  • I think this is essentially what SyncTeX is for, so it would make sense to use it somehow (if possible), rather than re-implement everything from scratch with savepos or whatever. – ShreevatsaR Feb 03 '18 at 18:55
  • @ChristianHupfer By in each page of each document, I mean that I want the x,y cooridnates w.r.t to the page rather than w.r.t the entire document, if that makes any sense. – Samuel Bushi Feb 04 '18 at 19:43

0 Answers0