GeneralDetermine the position (coordinates) of a word

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
fibofreak
Posts: 2
Joined: Fri Dec 11, 2009 2:37 pm

Determine the position (coordinates) of a word

Post by fibofreak »

Hi,

I want to create an EPS file from a (short) LaTeX document (no problem so far) and then know the position of a specific word, i.e. if I have

Code: Select all

This is a \storeposition{house}.

$a+b = c$

There is more about it.
then LaTeX should store coordinates in a textfile, from which I can reproduce the position of the word "palace" in the EPS image.

Certainly TeX will somewhere compute this position, but I don't know how to grab it and put it into a source where I can use it.

Thank you for any useful ideas!

Fabian

Recommended reading 2024:

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

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

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: Determine the position (coordinates) of a word

Post by josephwright »

Take a look at the pdfTeX manual: http://www.tug.org/applications/pdftex/, in particular the stuff on \pdfsavepos and so forth.
Joseph Wright
fibofreak
Posts: 2
Joined: Fri Dec 11, 2009 2:37 pm

Re: Determine the position (coordinates) of a word

Post by fibofreak »

Thank you, this should be the key. Together with the zref-Package, the implementation should be possible. I will try asap.

Fabian
Post Reply