Author Topic: eps file including latex formular  (Read 14599 times)

scho

  • Newbie
  • *
  • Posts: 5
    • View Profile
eps file including latex formular
« on: October 30, 2007, 11:01:39 PM »
When I export to eps file, the included latex formular is remains not converted although I already have the converted formular in the WinFIG window.
It would be convinient if we have eps figure including converted latex formular directly.

So I had to export to pstex, but still I have a problem.
On the version 2.2, the figure is converted to pstex_t file and "eps" file.
What I need are just pstex_t and "pstex" file.
(On older version, I have got pstex_t and "pstex" files with no problem.)
« Last Edit: October 30, 2007, 11:05:48 PM by scho »

Andreas

  • Administrator
  • Full Member
  • *****
  • Posts: 140
    • View Profile
Re: eps file including latex formular
« Reply #1 on: October 31, 2007, 11:52:50 AM »
When I export to eps file, the included latex formular is remains not converted although I already have the converted formular in the WinFIG window.
It would be convinient if we have eps figure including converted latex formular directly.

The EPS cannot contain the latex formula. Sounds interesting, but is not the way it works right now. You have to export using PSTEX. Then you have the LaTeX file, which makes an "include" on the EPS file.

Quote
So I had to export to pstex, but still I have a problem.
On the version 2.2, the figure is converted to pstex_t file and "eps" file.
What I need are just pstex_t and "pstex" file.
(On older version, I have got pstex_t and "pstex" files with no problem.)

Yes, the suffix was  changed in 2.1 already from pstex to eps. But the include directove was also changed from
\includegraphics{foo.pstex}
to
\includegraphics{foo.eps}

So, it should still work. You have a LaTex file with suffix pstex_t, which has an include directive on an EPS file with suffix eps.
This forum belongs to www.schmidt-web-berlin.de/winfig

scho

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: eps file including latex formular
« Reply #2 on: November 03, 2007, 04:37:42 AM »
Thank you for your reply.

In fact, I have usually used

\begin{figure}
\input{foo.pstex_t}
\end{figure}

instead of

\begin{picture}
\includegraphics{foo.pstex}
\end{picture}

because the latter cannot make the latex formular included. (I don't know the reason.)
So
\includegraphics{foo.eps}
also does not work.
Moreover, when I have eps file instead of pstex file (together with pstex_t file),
the former also does not work.

The only way to fix it now is to open the figure in an old version of winfig and to export to pstex file, it is somewhat cumbersome.


Andreas

  • Administrator
  • Full Member
  • *****
  • Posts: 140
    • View Profile
Re: eps file including latex formular
« Reply #3 on: November 03, 2007, 03:13:39 PM »
really, you only have to sort out your suffix problem. The files itself have not changed. If it does not work, you are including the wrong file in the wrong place or with the wrong name.

I do the following:
1. create a FIG file winfig.fig
2. export to pstex_t
3. now I have winfig.pstex_t with LaTeX text and winfig.eps with graphics.
4. I write a LaTeX document with the name foo.tex

foo.tex contains the following:

\documentclass[11pt]{article}
\usepackage{color}
\usepackage{graphicx}
\begin{document}

\input{winfig.pstex_t}

\end{document}


That works. I can call latex and have foo.dvi after that.

The following works too:
\documentclass[11pt]{article}
\usepackage{color}
\usepackage{graphicx}
\begin{document}

\begin{figure}
\input{winfig.pstex_t}
\end{figure}

\end{document}


Btw your first suggestion that the EPS file contains the formula is a nice idea, but not possible, because WinFIG shows the formula as graphics, which is a pixel bitmap. It is possible to have that in an EPS file, but the resolution is fixed. The printed results would look ugly. It is much better to have LaTeX create a PostScript version of the formula and print that. The printer driver can convert that to the appropriate resolution.
This forum belongs to www.schmidt-web-berlin.de/winfig

scho

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: eps file including latex formular
« Reply #4 on: November 03, 2007, 10:55:37 PM »
Thank you so much.
I found my silly mistake.
Some different colors were used in the figure and
I forgot to input \usepackage{color} in the beginning.
Now I have what I want with \input{foo.pstex_t}.
That was not a problem of pstex vs eps.

It is quite convinient to have an eps file containing latex formular directly.
Because when I was turning in a paper with .tex file, sometimes they require a single eps file for each figure (with no pstex_t file).
I have been doing this by making each figure to a pair of pstex file and  pstex_t file, and making a ps file, and next converting it to an eps file.
It would be nice if we can do it at once.
Thank you again.