# [texworks] Problem with .eps files

Mon Sep 19 11:56:55 CEST 2011

```Hello,

** Mark Saul [2011-09-18 21:09:30 -0400]:

> Andreas: Thank you for your kind reply.  Can I prevail just a bit

> >If it is neccessary to use eps-Files, you have to use latex instead of
> pdflatex (which is default).

> > So you have to go this way:

> >  file.tex ->  file.dvi ->  file.ps ->  file.pdf

> >using latex, dvips and ps2pdf

pdflatex is variant of latex program to produce PDF file directly, while
latex generates DVI file. A DVI file can be converted to a number of
formats:
- PS (PostScript) by means of `dvips' program
- PDF (Portable Document Format) by means of `dvipdfm' program.

> As a naive user, I'm not sure what this is saying.  I compile the
> code, and now see that I've been using PdfLatex--under the 'Typeset'
> menu in TexWorks.  I tried choosing 'LaTexmk', but immediately got
> an error messag e"The Perl interpreter could not be found."  I'm
> totally lost.

`latexmk' is merely a PERL script, so to work it needs PERL (search web
for perl) to be installed. After that you can run in terminal (cmd on Windows)
\$ latexmk YOUR_DOCUMENT.tex
to get DVI and PS files (PS file will be generated automatically, IMO).
Or run it as following
\$ latexmf -pdf YOUR_DOCUMENT.tex
to get PDF file.

> How do I create a file.dvi file?  Where do I get dvips?  Is that yet
> another compiler, that eats .dvi files and gives .ps files?  And
> will ps2pdf take a .ps file as imput and give me a .pdf file?

> If so, where do i find all these programs?
And may be many other :D. To get all TeX related programs just install
one of TeX distributions: either MikTeX (if you on Windows) or TeX Live
(even if for Windows you can install TeX Live).

http://www.miktex.org
http://www.tug.org/texlive/

Actually you first problem is not texworks or latex, but lack of any
background information about LaTeX (search for `The LaTeX Companion').
But don't worry you get used to it quickly.

In short: latex allows you to include figures in two formats: EPS and PDF.

If you use `latex' _program_ you should use EPS figures (EPS files), if
you use `pdflatex' _program_ (default for texworks) you should use PDF
figures (PDF files). Great thing is you don't have to specify extensions
for image files. Consider example:

\includegraphics{fig1}

If file is processed by latex program then `fig1.eps' file will be used,
if document is processed by `pdflatex' then `fig1.pdf' file will be
included. So, generally, it is best have both files: fig1.eps and
fig1.pdf and don't use extension.

As I understand from your first post you already have EPS files. Now
there are two ways to work further:

1. convert manually EPS files for PDF ones with the help of `epstopdf'
_program_, like below
\$ epstopdf fig1.eps
and that for each EPS file (I could write a one-line bash code, but if
you on Windows I lack knowledge how to achieve the same there).

... PREAMBLE
\usepackage{epstopdf}
... REST OF PREAMBLE
Then just run pdflatex, package `epstopdf' will do job on converting EPS
files to PDF before including them into document.

---

--
One of the questions that comes up all the time is: How enthusiastic
is our support for UNIX?
Unix was written on our machines and for our machines many years ago.
Today, much of UNIX being done is done on our machines. Ten percent of our
VAXs are going for UNIX use.  UNIX is a simple language, easy to understand,
easy to get started with. It's great for students, great for somewhat casual
users, and it's great for interchanging programs between different machines.
And so, because of its popularity in these markets, we support it.  We have
good UNIX on VAX and good UNIX on PDP-11s.
It is our belief, however, that serious professional users will run
out of things they can do with UNIX. They'll want a real system and will end
up doing VMS when they get to be serious about programming.
With UNIX, if you're looking for something, you can easily and quickly
check that small manual and find out that it's not there.  With VMS, no matter
what you look for -- it's literally a five-foot shelf of documentation -- if
you look long enough it's there.  That's the difference -- the beauty of UNIX
is it's simple; and the beauty of VMS is that it's all there.
-- Ken Olsen, president of DEC, DECWORLD Vol. 8 No. 5, 1984
[It's been argued that the beauty of UNIX is the same as the beauty of Ken
Olsen's brain.  Ed.]
```