Page LayoutAnchor to a Text Passage or a Figure

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
kornaros
Posts: 40
Joined: Wed Nov 30, 2011 12:11 am

Anchor to a Text Passage or a Figure

Post by kornaros »

I want to have an anchor on some piece of text or figure. This anchor will inform me about the current position of the anchored element (the current page, the distance from the left side of the page and the distance for the bottom of the page). Is it possible to have this kind of anchors?

Thanks

Charis!

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Anchor to a Text Passage or a Figure

Post by Stefan Kottwitz »

Hi Charis,

for such a purpose I would choose TikZ. Perhaps because I know that package well, there are further ways. With TikZ, I could place a node or a coordinate marker anywhere near a text or a figure, and later refer to it, such as drawing an arrow to it. TikZ provides a current page node, to which we could refer, for example regarding the relation to the page margins.

Stefan
LaTeX.org admin
kornaros
Posts: 40
Joined: Wed Nov 30, 2011 12:11 am

Re: Anchor to a Text Passage or a Figure

Post by kornaros »

Dear Stefan_K thanks for you reply! But how could I have some other useful information regarding the EXACT current (vertical and horizontal) position of my anchored element?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Anchor to a Text Passage or a Figure

Post by Stefan Kottwitz »

In TikZ there's the calc library for coordinate calculations. If you define a coordinate somewhere in the text, you can calculate with this and with the coordinates of the current page corners.

Stefan
LaTeX.org admin
Post Reply