Re: PS tricks & dia export



It is very simple.  First, label all the text in you diagram with simple
tags: two or three letters (can be more) to reference the position of
the text you want to insert.
Then, export the file to .eps.  In your LaTeX preambule, include the
psfrag package:

\usepackage{psfrag}

If you don't have it, get it from CTAN.  It may also be a good idea to
have a look at its documentation.

Before you include the figure in your text, put the psfrag command for
each tags so that they get replaced by your text in the figure;

\psfrag{mytag}{The Text that I want in the figure}
\includegraphics[width=1in]{myfigure}

where "mytag" is the tag you put in dia in form of text and myfigure is
the name of the eps file (without extension I think).
Once all the tags are referenced, latex the file and then dvips it.  The
tags won't appear in the .dvi file; only in the postcript output.

The psfrag manual tells you how to center the text around your tag
(left, right, center) how to specify scaling and rotation etc.  It is
pretty complete, I suggest you read it (look for it on www.ctan.org).

And you are right, Dia rocks!

Benoit P.


On Mon, 2001-11-26 at 15:06, Neil Zanella wrote:

Could someone please mention how this psfrag utility is used with dia
output. I would also at the same time like to mention that I think dia
is the best tool for making diagrams I have come across. Good work!






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]