Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

A possible conflict with \usepackage{times,mathptmx} and \usepackage{epsfig} ??

903 views
Skip to first unread message

Alvyn

unread,
Oct 11, 2006, 6:25:20 AM10/11/06
to
Hi

I am a newbie using Miktex on WinXP with TeXnicCenter.

I tried to include a picture made by Adobe Illustrator 12, whose
extension is .eps. into my file. A problem occurred when I combine the
usage of two packages:

\usepackage{times,mathptmx}
\usepackage{epsfig}

The problem is Yap reports "DDE connection could not be established."
Data 16394. I have no idea what does this mean.

I tried the following two combinations to test the problem and it seems
the problem come from this two packages.

1st expression:
------------------------------------------------------------------------
\documentclass[12pt]{report}
\usepackage{times,mathptmx}
\usepackage{epsfig}

\begin{document}

\begin{figure}[htb]
\centerline{\epsfig{figure=abc.eps}}
\caption{abc.eps}\label{fig:eps}
\end{figure}

\end{document}
------------------------------------------------------------------------

2nd expression:
------------------------------------------------------------------------
\documentclass[12pt]{report}
\usepackage{epsfig}

\begin{document}

\begin{figure}[htb]
\centerline{\epsfig{figure=abc.eps}}
\caption{abc.eps}\label{fig:eps}
\end{figure}

\end{document}
------------------------------------------------------------------------


and only the 2nd expression successfully compiled. Can anyone help to
explain this to me? Thanks a lot.

BTW. I am wondering is there any conflict table in using LaTex? I mean,
is there any guide teaching ppl not to use some packages together?

Best regards

Alvyn

Herbert Voss

unread,
Oct 11, 2006, 6:34:49 AM10/11/06
to
Alvyn wrote:

> I am a newbie using Miktex on WinXP with TeXnicCenter.
>
> I tried to include a picture made by Adobe Illustrator 12, whose
> extension is .eps. into my file. A problem occurred when I combine the
> usage of two packages:
>
> \usepackage{times,mathptmx}
> \usepackage{epsfig}

\documentclass[12pt]{report}
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage{graphicx}

\begin{document}

\begin{figure}[htb]
\centering
\includegraphics{abc}


\caption{abc.eps}\label{fig:eps}
\end{figure}

\end{document}


try this

Herbert

--
http://PSTricks.de/
http://TeXnik.de/
http://www.dante.de/CTAN/info/math/voss/mathmode/Mathmode.pdf
http://www.dante.de/faq/de-tex-faq/
http://www.tex.ac.uk/cgi-bin/texfaq2html?introduction=yes

Alvyn

unread,
Oct 11, 2006, 6:49:54 AM10/11/06
to
I have further tried to change the output file from Illustrator. I
found that if I do not embed the font in Illustrator file. The problem
will occur even in my second example, which means my 1st expression has
conflict because LaTex trys to manipulate the font inside the eps file
in the first expression.

And in the second expression, Illustrator does not embed font for the
file, which also cause a problem.

The conclusion is: 1. LaTex in this case does not allow me to
manipulate the font inside the eps file. 2. The included EPS file has
to have font embeded.
Otherwise, the compile would fail.

Is there anyone has any comment or suggestion to my case?

Alvyn

unread,
Oct 11, 2006, 7:03:32 AM10/11/06
to
Hi Herbert

It is still not working. Yap simply freezes there.

Alvyn

Ulrike Fischer

unread,
Oct 11, 2006, 7:16:48 AM10/11/06
to
"Alvyn" <alvyn...@gmail.com> schrieb:

> Hi
>
> I am a newbie using Miktex on WinXP with TeXnicCenter.
>
> I tried to include a picture made by Adobe Illustrator 12, whose
> extension is .eps. into my file. A problem occurred when I combine the
> usage of two packages:
>
> \usepackage{times,mathptmx}

Use only \usepackage{mathptmx}. If you want also to change the sans
serif to helvetica use also \usepackage[skaled]{helvet}, if you want
courier as typewriter use \usepackage{courier} (but other typewriter
fonts looks better).

> \usepackage{epsfig}

Replace with \usepackage{graphicx} and then use \includegraphics{abc}
in your file.

>
> The problem is Yap reports "DDE connection could not be established."
> Data 16394. I have no idea what does this mean.

I suspect that your eps file also use times/helvet or courier and that
this gives a conflict that lets fail the background ghostscript and
then YAP can't connect it. Put the offending eps somewhere on the net
for inspection.


> BTW. I am wondering is there any conflict table in using LaTex? I mean,
> is there any guide teaching ppl not to use some packages together?

Not really. Packages which know about conflict mostly mention it in
their documentation. But they aren't not so much conflicts.


--
Ulrike Fischer
e-mail: zusätzlich meinen Vornamen vor dem @ einfügen.
e-mail: add my first name between the news and the @.

Alvyn

unread,
Oct 11, 2006, 7:46:51 AM10/11/06
to

Ulrike Fischer wrote:

> Use only \usepackage{mathptmx}. If you want also to change the sans
> serif to helvetica use also \usepackage[skaled]{helvet}, if you want
> courier as typewriter use \usepackage{courier} (but other typewriter
> fonts looks better).

This is not working as well.. it returns

This is dvips(k) 5.95b Copyright 2005 Radical Eye Software
(www.radicaleye.com)
' TeX output 2006.10.11:1228' ->
<tex.pro><8r.enc><texps.pro><special.pro><color.pro>.
<cmr10.pfb><cmmi10.pfb>
[11]

and crashes.

> I suspect that your eps file also use times/helvet or courier and that
> this gives a conflict that lets fail the background ghostscript and
> then YAP can't connect it. Put the offending eps somewhere on the net
> for inspection.

In this EPS file I have Times New Roman, Symbol and Arial embedded.
After I modified all the Times New Roman characters into Arial. The
problem is still unsolved. It seems I have to embed JPG files instead.

Any comments? Thank you very much Ulrike~

Ulrike Fischer

unread,
Oct 11, 2006, 7:54:23 AM10/11/06
to
"Alvyn" <alvyn...@gmail.com> schrieb:

>
> Ulrike Fischer wrote:
>
>> Use only \usepackage{mathptmx}. If you want also to change the sans
>> serif to helvetica use also \usepackage[skaled]{helvet}, if you want
>> courier as typewriter use \usepackage{courier} (but other typewriter
>> fonts looks better).
> This is not working as well.. it returns

It wasn't meant to solve your problem but to improve your code.

>
> This is dvips(k) 5.95b Copyright 2005 Radical Eye Software
> (www.radicaleye.com)
> ' TeX output 2006.10.11:1228' ->
> <tex.pro><8r.enc><texps.pro><special.pro><color.pro>.
> <cmr10.pfb><cmmi10.pfb>
> [11]
>
> and crashes.

Make a minimal document. How should we know what on page 11 lets crash
dvips?

>
>> I suspect that your eps file also use times/helvet or courier and that
>> this gives a conflict that lets fail the background ghostscript and
>> then YAP can't connect it. Put the offending eps somewhere on the net
>> for inspection.
>
> In this EPS file I have Times New Roman, Symbol and Arial embedded.
> After I modified all the Times New Roman characters into Arial. The
> problem is still unsolved. It seems I have to embed JPG files instead.
>
> Any comments?

The same as before: Put the (one) offending eps somewhere on the net.

And you can't embed jpg if you use dvips. You will have to switch to
pdflatex (and then it is better so convert the eps to pdf and not to
the lossy bitmap format jpg).

Alvyn

unread,
Oct 11, 2006, 8:42:14 AM10/11/06
to

Ulrike Fischer wrote:
> Make a minimal document. How should we know what on page 11 lets crash
> dvips?

Sorry for the mess. I was compiling one of my file instead of the
minimal file.

> The same as before: Put the (one) offending eps somewhere on the net.

I have uploaded the file to
http://www.megaupload.com/?d=GU5XY580

If you can help me to have a look of this file.

> And you can't embed jpg if you use dvips. You will have to switch to
> pdflatex (and then it is better so convert the eps to pdf and not to
> the lossy bitmap format jpg).

Does that mean if I embed one jpg file in the document, I can not embed
any EPS file in the same document?
I tried to embed jpg file but also not really successful. TeXnicCentre
says the file has (no BoundingBox). The pic is shown on the dvi but
flows out of the page.

I tried PDF as well, and use the option in TeXnicCentre "LaTex => PDF".
It compiles with/without "\usepackage{amsmath}" even if I include

\usepackage{textcomp}
\renewcommand{\rmdefault}{ptm}
\usepackage[scaled=0.92]{helvet}

--------
(I have to say I have no perference on these syntax. I was simply
copying the samples from webpages and sometimes mix them together to
see what's the result.)

In this case, the pdf file seems not scaled very well. It fall into the
paper but too small. I have to find a way to remove the frame outside
the picture in the pdf file.

Thanks

Ulrike Fischer

unread,
Oct 11, 2006, 9:21:43 AM10/11/06
to
"Alvyn" <alvyn...@gmail.com> schrieb:

>> The same as before: Put the (one) offending eps somewhere on the net.
>
> I have uploaded the file to
> http://www.megaupload.com/?d=GU5XY580
>
> If you can help me to have a look of this file.

I don't have the time yet, but will take look tomorrow.

>
>> And you can't embed jpg if you use dvips. You will have to switch to
>> pdflatex (and then it is better so convert the eps to pdf and not to
>> the lossy bitmap format jpg).
>
> Does that mean if I embed one jpg file in the document, I can not embed
> any EPS file in the same document?

Roughly yes (you can use purifyeps to get an eps that pdflatex can
handle)

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=pdftexgraphics

> I tried to embed jpg file but also not really successful. TeXnicCentre
> says the file has (no BoundingBox). The pic is shown on the dvi but
> flows out of the page.

You must use pdflatex if you use a jpg.


> In this case, the pdf file seems not scaled very well.

jpg doesn't scale well. They are bitmaps. Much better to convert the
eps with epstopdf. Read epslatex and the guide from Ian Hutchinson
mentioned in the faq

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=impgraph

martin....@gmail.com

unread,
Oct 11, 2006, 10:44:39 AM10/11/06
to

Alvyn a écrit :

> Ulrike Fischer wrote:
> > Make a minimal document. How should we know what on page 11 lets crash
> > dvips?
>
> Sorry for the mess. I was compiling one of my file instead of the
> minimal file.
>
> > The same as before: Put the (one) offending eps somewhere on the net.
>
> I have uploaded the file to
> http://www.megaupload.com/?d=GU5XY580
>
> If you can help me to have a look of this file.

Your file seems to have some errors. How did you create it? If you
remove that figure, does it work? I'm not sure however that the DDE
error is related to that. Maybe your configuration?

>
> > And you can't embed jpg if you use dvips. You will have to switch to
> > pdflatex (and then it is better so convert the eps to pdf and not to
> > the lossy bitmap format jpg).
>
> Does that mean if I embed one jpg file in the document, I can not embed
> any EPS file in the same document?
> I tried to embed jpg file but also not really successful. TeXnicCentre
> says the file has (no BoundingBox). The pic is shown on the dvi but
> flows out of the page.

If you have a jpg file, you can easily convert it to eps using jpeg2ps
(gnuwin32.sourceforge.net/packages/jpeg2ps.htm).

Bernd Strieder

unread,
Oct 11, 2006, 2:08:20 PM10/11/06
to
Hello,


Alvyn wrote:
>
>
> Ulrike Fischer wrote:
>> Make a minimal document. How should we know what on page 11 lets
>> crash dvips?
>
> Sorry for the mess. I was compiling one of my file instead of the
> minimal file.
>
>> The same as before: Put the (one) offending eps somewhere on the net.
>
> I have uploaded the file to
> http://www.megaupload.com/?d=GU5XY580
>
> If you can help me to have a look of this file.

The script eps2eps delivered at least with Ghostscript version 8.15
seems to be able to transform your eps into normalized form which is
accepted by dvips, xdvi and Ghostscript on the final document.

eps2eps does essentially the following (in case yo don't have that
script, but pure Ghostscript):

gs -q -sDEVICE=epswrite -sOutputFile=RHF-UHF2.eps -dNOPAUSE -dBATCH
-dSAFER -dDEVICEWIDTH=250000 -dDEVICEHEIGHT=250000 RHF-UHF.eps

which creates a second eps which worked for me in the place of the
first.

> Does that mean if I embed one jpg file in the document, I can not
> embed any EPS file in the same document?

Basically yes. PDFLaTeX does not take eps files, but jpg, pdf and
possibly others. LaTeX in non-PDF mode accepts eps, ps, sometimes bmp.
The sets of supported formats are usually disjunct. There are TeX
variants supporting more mixing (VTeX), but not all formats everywhere.


> I tried to embed jpg file but also not really successful. TeXnicCentre
> says the file has (no BoundingBox). The pic is shown on the dvi but
> flows out of the page.

You have to be careful with the sizes and resolution when transforming
the formats. JPeg is a format invented for photographs, not for
line-art, like your picture is. You might not get optimal results with
default settings. Also you should read the documentation of the
graphicx package on scaling pictures, look for the doc file grfguide.ps
or grfguide.pdf in your TeX system or on CTAN, it should be available.

>
> I tried PDF as well, and use the option in TeXnicCentre "LaTex =>
> PDF". It compiles with/without "\usepackage{amsmath}" even if I
> include
>
> \usepackage{textcomp}
> \renewcommand{\rmdefault}{ptm}
> \usepackage[scaled=0.92]{helvet}
>
> --------
> (I have to say I have no perference on these syntax. I was simply
> copying the samples from webpages and sometimes mix them together to
> see what's the result.)

Don't copy samples from webpages without some basic understanding what
they do, it can easily bring you into deep trouble. It is most helpful
to comment those pramble fragments, at least why they were included in
the first place. It is also recommendable to try to minimize the
preamble by commenting out (and eventually erasing) everything
unnecessary.

Bernd Strieder

Alvyn

unread,
Oct 12, 2006, 7:28:32 AM10/12/06
to
Hi buddies

Thanks a lot for the helps. I think I have found out a way to deal with
all the puzzles.

The way I do is to convert all pictures into pdf. If the picture is in
M$ Office programs, I convert just the right page of it with no margins
and maximize the target picture into that page.

If it is produced in Illustrator it also work that way. I simply change
the page property so that the paper size is just enough to accommodate
the picture.

Then I use PDF2LaTex to include all pictures into the document.
It seems to work very well.... thanks for your tips again.

Best regards~

Alvyn

0 new messages