Hi,

I just realized there is a very nice and clean way to
embed things like math and even subgraphics into eps
graphics, this rely on the overpic package

You take the .eps you want to edit and include it in a
minimal .tex just like the one in the end of this
mail*,
then:
1) compile it with latex,
2) then you get dvips -E test.dvi -o test.eps, which
overwrites your test.eps with a new one with the
embedded equation (or whatever you want to put in
there)

The beauty in this is that you dont need to embed
extra-stuff into the document, since all what you
wanted to embed in the graphics, is in the graphics
file itself

Now, im trying to find an approach for visual editing
the .eps. Until now there are two candidate routes:

1) With xfig:

    you convert the .eps into .fig with the following
command

       pstoedit -f fig -psarg "-r600x600" test.eps
test.fig

     this makes possible _any_ eps to be editable by
xfig.
     you insert some latex commands into the fig as
text with the xfig program

     Now comes some fugliness, since now you somehow
have to start a script that scans the xfig and
replaces the latex text with the corresponding overpic
commands into the template minimal .tex file, compile
it, dvi->eps then eps->fig, reload it in xfig and
display it in "executed" latex

2) With .. Lyx!

    assuming you are able to write/overlay text over
an image area in lyx and get the position where the
text was put and what the text was:

     now you dont need to replace anything, you just
start a script from lyx that creates the template
.tex, .tex -> .dvi -> .eps, which overwrites the
former .eps, making lyx to automatically reload it and
display the new version!

In principle 1) is more conceptually affine, since
xfig is precisely a program for graphics, but
apparently 2) is easier to do (of course, assuming you
can write text over an image region and getting the
position the text was written)

cheers






* The following embeds the y=x^2 equation in the 15,15
local coordinates of the test.eps

\documentclass[oneside,twocolumn,spanish]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{graphicx, overpic}

\makeatletter

\usepackage{babel}
\makeatother
\begin{document}

\begin{overpic}{test.eps}
\put(15,15){\huge $y=x^{2}$}
\end{overpic}

\end{document} 

------------
Los mejores usados y las más tentadoras 
ofertas de 0km están en Yahoo! Autos.
Comprá o vendé tu auto en
http://autos.yahoo.com.ar

Reply via email to