- From: "Charles James Leonardo Quarra Cappiello" <address@hidden>
- To: address@hidden
- Subject: various approaches to embedding symbols into eps
- Date: Sun, 04 Apr 2004 10:18:45 -0400
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 .. Texmacs!
assuming you are able to write/overlay text over an image area in
texmacs 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
texmacs that creates the template .tex, .tex -> .dvi -> .eps, which
overwrites the former .eps, making texmacs 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
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}
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus
- various approaches to embedding symbols into eps, Charles James Leonardo Quarra Cappiello, 04/04/2004
Archive powered by MHonArc 2.6.19.