# Location of a particular LaTeX environment in the generated PDF document

Is it possible to get the exact page number (or several page numbers if it spreads so) in the generated PDF document for a particular LaTeX environment (say, \begin{figure} ...\end{figure}) after compilation? Editing the corresponding LaTeX source file (e.g. injecting some specific marks) is available for that purpose.

Update: Is pdfsync helpful for that?

-
I'm not sure what you want to achieve. You can have, when using TeXShop the option of jumping from the .pdf file to the corresponding position in the .tex file. Is this what you meant? –  Dror Jul 13 '11 at 10:39
Yes, it is. That's why now I see that pdfsync seems to be relevant. –  Nikita Zhiltsov Jul 13 '11 at 11:05
pdfsync (the package) is obsolete. Recent TeX implementations use SyncTeX, how to benefit from it depends on your system configuration. –  egreg Jul 13 '11 at 11:45
Welcome to TeX.sx! A tip: you can use backticks  to mark your inline code as I did in my edit. –  Martin Scharrer Jul 13 '11 at 12:03

The zref package (oberdiek bundle) gives you several macros to label and reference basically anything in a document. This includes \zlabel and \zpageref. The zref-abspage and zref-abspos module gives you the exact position in the PDF. These values can be extracted in a plain form and are stored in the .aux file. I used it to jump from my document to specific pages with specific zoom levels in an external PDF which I couldn't influence myself.
Note that the normal \pageref will give you the logical page number, while you most likely need the absolute page number. Both will not be the same of you reset the page number counter, e.g. for roman numbering of the frontmatter.
See the use of the \pageref` command in http://en.wikibooks.org/wiki/LaTeX/Labels_and_Cross-referencing.