GeneralGet current Position in PDF output

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
andreabm
Posts: 3
Joined: Wed Oct 12, 2011 2:33 am

Get current Position in PDF output

Post by andreabm »

Hi all,

Lets say I've created a certain element in my LaTeX document (figure, tabular, text...), how is it possible to get the element's position (respective to the page coordinates) rendered at the output PDF? Thank you!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Get current Position in PDF output

Post by localghost »

You should at least tell us which editor you are using. TeXworks for example uses the SyncTeX technology and is adequately pre-configured.


Best regards and welcome to the board
Thorsten
andreabm
Posts: 3
Joined: Wed Oct 12, 2011 2:33 am

Re: Get current Position in PDF output

Post by andreabm »

Thank you for your help! I'm not using any specific editor, actually. I've tried using SyncTeX, as you suggested, and I've seen that it prints the page coordinates of all the elements of the tex file. Do you know if it's possible to specify, in the tex file, only some elements for which I want this information?
For example, suppose I include two pictures in a large document with many elements. I wish I could know only the coordinates in which the pictures will be rendered in the pdf page. Something like "picture 1 rendered at xx position, picture 2 rendered at xx position". Is it clear?
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Get current Position in PDF output

Post by localghost »

This is not the purpose of SyncTeX. And I'm not aware of something that provides what you want. Seems that i slightly misunderstood your question or missed some details, respectively. If you compile to DVI and further to PS, then at least GSview/Ghostscript shows the coordinates on a page where the mouse cursor is. This might be an intermediate solution.
Post Reply