View Full Version : EPS figures in Textures (&LaTeX) once more


l
10-01-2003, 02:54 AM
I am writing a paper using LaTeX and the Textures program in
Macintosh. I have problems with including EPS figures. This is a topic
that has been discussed A LOT but reading and trying out all kinds of
things made me confused especially bacause nothing sees to work. I
want to know what is the truth. Are EPS files (from Adobe Photoshop
Elements) not good for Latex at all as some websites suggest? Or is
there a simpler way or another postscript format that suits better?

Originally I used bitmap files and the \special command in Textures
and this worked fine but the picture files are huge and I need to be
able to convert my tex code to other LaTeX systems than just Textures.
Then I have tried the following 2 approaches:
(1) \usepackage{graphicx}.... ...
\includegraphics[width=3in]{mypicture.eps}

(2) \input BoxedEPS
\SetTexturesEPSFSpecial... ...\BoxedEPSF{mypicture.eps scaled 200}

(3) \special{postscriptfile mypicture.eps scaled 200}

Of these (1) is commonly used in LaTeX I think, and (2) is recommneded
for Textures. In each case the code goes through Textures without
errors. I have these packages included with my Textures. In (2) the
space that is left blank in the Textures typeset window suggests that
the shapes of the figures are taken into account and that the
EPS-figures were found.

I "print" my manuscript first to a postscript file and look at it in
Ghostview and then make a pdf file (my Textures lacks the automatic
pdf converter). This has worked fine without the figures and with the
bitmap figures. But these EPS files simply do not go through to the
final postscript output file - or at least do not show in Ghostview
(ps file created using the print (File menu) command by checking the
"print to file")! Any simple remedies?

Unfortunately I cannot print the ps file to a postscript printer. I
also tried all formats jpg, tif, png, pdf for the figures... no
success.

Eric
10-01-2003, 08:29 AM
l wrote:

> I am writing a paper using LaTeX and the Textures program in
> Macintosh. I have problems with including EPS figures.
....
> (1) \usepackage{graphicx}.... ...
> \includegraphics[width=3in]{mypicture.eps}

None of the other methods are remotely portable.

Tetures works fine with EPS files. If you have the uptodate version, it
even displays the PICT preview correctly.

> I "print" my manuscript first to a postscript file and look at it in
> Ghostview and then make a pdf file (my Textures lacks the automatic
> pdf converter). This has worked fine without the figures and with the
> bitmap figures. But these EPS files simply do not go through to the
> final postscript output file - or at least do not show in Ghostview
> (ps file created using the print (File menu) command by checking the
> "print to file")! Any simple remedies?

Maybe your EPS files are badly formed. I have had problems with the
bounding box and the PostScript not matching. Typically the BB says say
"100x100", but when you look at the PS all you get is bit of the corner (if
you are lucky) because their scaling is hopelessly wrong. This would
explain the apparent non-printing in GS. But you will get the CPU useage.

If you run GS from the commandline, and have a good binary file editor:
edit the PS to output strings to the console. This is good old fasioned
debugging technique. With lots of practice you can get PS to tell you lots
more info. (Read the Red Book).

> Unfortunately I cannot print the ps file to a postscript printer. I
> also tried all formats jpg, tif, png, pdf for the figures... no
> success.

Presumably you know that you can use GS as a filter in print queues. In
Windows and unix there are well established methods of using GS. How you do
it on your mac depends on your OS version. I believe in OS X the GS
integration is a doddle, because it is a unix inside. What it does is take
the PS that you send it and translate it to the printer codes for the
printer that you have attached. So I could have an HP4, so my PS gets
translated to HP-PCL and down to the printer. The only downside to this
route is that the PCL is more waffly than a good PCL driver would have
generated, so the page rate is a bit low. However it does give you PS
everywhere, this simplifies maintenance.

Eric.

l
10-03-2003, 04:16 PM
I tried both \usepackage{graphics,epsfig}
and \usepackage{graphicx} and then later

\begin{figure}[h] \includegraphics[width=3.5in]{myfile.eps}
\caption{Here is figure.} \label{mylabel} \end{figure}

Above myfile.eps is created using Photoshop Elements on a PC.
I then run textures on my mac and print into a file called
myoutput.ps Textures typeset window shows blank areas for the
figures and myoutput.ps file is much larger the same file
without the figures so I suspect figures are included.

When I look at myoutput.ps with Ghostview on a PC it gets into
trouble with the first eps figure. Converting myoutput.ps to
a pdf file using Adobe's web page causes an error message
"could not convert".

Could it be something with the laser printer driver on my old
mac (which has OS9) causing the ps file to be somehow
of an old fashioned format? All works fine without the eps
figures.

Donald Arseneau
10-03-2003, 10:52 PM
LaTeXas175[at]yahoo.com (l) writes:

> \begin{figure}[h] \includegraphics[width=3.5in]{myfile.eps}
>
> Above myfile.eps is created using Photoshop Elements on a PC.

Photoshop makes raster-graphics. Do not scale raster-graphics
by anything other than simple rational numbers. Ensure the
output from photoshop uses the "dpi" that your dvips is set
up for.

Donald Arseneau asnd[at]triumf.ca

AES/newspost
10-04-2003, 02:45 AM
In article <f729b33e.0310030716.37359b13[at]posting.google.com>,
LaTeXas175[at]yahoo.com (l) wrote:

> Above myfile.eps is created using Photoshop Elements on a PC.
> I then run textures on my mac and print into a file called
> myoutput.ps Textures typeset window shows blank areas for the
> figures and myoutput.ps file is much larger the same file
> without the figures so I suspect figures are included.


I have had very similar difficulties with LaTeX, the various LaTeX
"graphics" packages and commands, and Textures 2.0 on a Mac running OS
9.2

I've inserted EPS images in my documents for years with no problems
using Plain TeX, the Textures \special graphics commands, and a simple
macro I wrote to calculate the \vskips and \hskips and scaling necessary
to center and scale the figure, given its height and width, then call
the \special command.

Some journals are demanding I submit LaTeX source code, however, and
then the trouble starts. My experience is usually that the figure
doesn't show up correctly in the on-screen typeset display, but usually
prints OK, if I'm careful about scaling the image.

I hope that Textures (which I love) will fix whatever is the problem, or
point out how to solve it, but my understanding is at present they're
buried in work getting the OS X version of Textures out, and don't have
time to attack problems like this in older versions.

Stephen Moye
10-04-2003, 01:36 PM
I might be able to shed a little light on this.

The problem is that Textures uses proprietary \specials for handling
graphics. This works fine only if you never have to send TeX and/or
dvi files to the rest of the world which generally relies on dvips and
its \specials for graphics.

If you need to produce a dvi file for use with dvips, I have had
excellent and reproducible results working as follows. With LaTeX, use
the \graphicx package to prepare your document:

\documentclass{article}
\usepackage[textures]{graphicx}
%\usepackage[dvips]{graphicx}

\begin{document}

Notice the 'textures' option to graphicx. You ought to have no
problems and see and print your graphics without a problem (with
scaling, rotation, etc.). When it comes time to submit your TeX and/or
dvi file, change the above to:

\documentclass{article}
%\usepackage[textures]{graphicx}
\usepackage[dvips]{graphicx}

\begin{document}

and re-typeset your document. With the typeset window foremost, go to
File>Save As and save your dvi file. This is the dvi file you will
send to your publisher, if they require it. You won't see the
graphics, but dvips will know that they are there.

One more suggestion: when including graphics make sure that they are
in the same directory as your TeX and dvi files. This will avoid the
necessity of hard-coding a path to your graphics in your TeX (and
therefore dvi) file. Publishers hate that. And file names: use only
numerals and lower case letters, with perhaps a hyphen and underscore
-- no spaces.

Yes, it would be nice if there are an option for Textures to use the
dvips specials. I understand that carbon Textures is in the works at
Blue Sky. Maybe thay can still be influenced. Like you, I love
Textures and entrust my most important work to it alone.


> I've inserted EPS images in my documents for years with no problems
> using Plain TeX, the Textures \special graphics commands, and a simple
> macro I wrote to calculate the \vskips and \hskips and scaling necessary
> to center and scale the figure, given its height and width, then call
> the \special command.
>
> Some journals are demanding I submit LaTeX source code, however, and
> then the trouble starts. My experience is usually that the figure
> doesn't show up correctly in the on-screen typeset display, but usually
> prints OK, if I'm careful about scaling the image.
>
> I hope that Textures (which I love) will fix whatever is the problem, or
> point out how to solve it, but my understanding is at present they're
> buried in work getting the OS X version of Textures out, and don't have
> time to attack problems like this in older versions.

AES/newspost
10-04-2003, 05:29 PM
In article <f5d5d6e.0310040436.1e7fe74c[at]posting.google.com>,
stephenmoye[at]cox.net (Stephen Moye) wrote:

> I might be able to shed a little light on this.
>
> The problem is that Textures uses proprietary \specials for handling
> graphics. This works fine only if you never have to send TeX and/or
> dvi files to the rest of the world which generally relies on dvips and
> its \specials for graphics.
>
> (useful instructions snipped)


Thanks _very_ much. This should solve the problem (haven't had time to
test it yet).

(Does Blue Sky have this on their website anywhere?)

Donald Arseneau
10-04-2003, 10:36 PM
stephenmoye[at]cox.net (Stephen Moye) writes:

> The problem is that Textures uses proprietary \specials for handling
> graphics. This works fine only if you never have to send TeX and/or
> dvi files to the rest of the world which generally relies on dvips and
> its \specials for graphics.

But dvips \specials are just as "proprietary" as textures specials.
The problem is that the move to produce a unified standard set of
\specials came to naught.

l
10-13-2003, 08:04 PM
I posted my question here almost 2 weeks ago and since that time I
have had a bit frustrating excursion to the world of LaTeX , Textures
and graphics. I am not a computing specialist and I always assumed
that LaTeX code is very portable between different systems and that
there is a stardard and easy way to include postscript graphics files
which I assumed are also very much machine and system independent.
Well, now I know that this is clearly not the case...

Just for the record let me report what I tried to do and what finally
worked.

I have been happy with Textures on my macintosh laptop (from 1997)
but I needed to include graphics created by Adobe Photoshop Elements
which I have on a PC running windows XP and I did not want to use the
Textures \special command (which does work fine but puts all the
graphics into a single scrapbook that cannot be accessed outside of
Textures). I wanted to include the graphics and run Textures on my mac
and create postscript and pdf versions of my LaTeX document. This has
worked always fine without the graphics.

I must report that I tried all kinds of combinations of graphics file
types (mainly I used EPS) and several packages and commands with
Textures that have been suggested on the web and on the discussion
forums over hte years. But I never succeeded in making the Textures
typeset window show my graphics. The dvi file showed them in one
occasion but even then I was unable to create a pdf file from that dvi
file.

I then loaded Miktex program for my PC (I should have done it years
ago!!) and although it is no competition to Textures in preparing the
text and formulas in my document, I must say that for the purpose of
doing what I wanted (i.e. including graphics files) it worked. I saved
the graphics as TIFF files (like mypic.tif) and then include a BB file
(mypic.bb) which includes the so called BoundingBox dimensions and
then both pdflatex and dvips of Miktex work just fine. Even here I
first got a lot of trouble because of "missing BoundingBox" in my EPS
files. I then figured that using TIF files and separate files to give
those BoundingBoxes solved the problem.

I suppose a lot of people in science/math departments/in companies are
working using Unix or Linux and there is probably less problems with
LaTeX and graphics files with those systems.

George White
10-22-2003, 02:13 PM
On 13 Oct 2003, l wrote:

> I posted my question here almost 2 weeks ago and since that time I
> have had a bit frustrating excursion to the world of LaTeX , Textures
> and graphics. I am not a computing specialist and I always assumed
> that LaTeX code is very portable between different systems and that
> there is a stardard and easy way to include postscript graphics files
> which I assumed are also very much machine and system independent.
> Well, now I know that this is clearly not the case...
>
> Just for the record let me report what I tried to do and what finally
> worked.
>
> I have been happy with Textures on my macintosh laptop (from 1997)
> but I needed to include graphics created by Adobe Photoshop Elements
> which I have on a PC running windows XP and I did not want to use the
> Textures \special command (which does work fine but puts all the
> graphics into a single scrapbook that cannot be accessed outside of
> Textures). I wanted to include the graphics and run Textures on my mac
> and create postscript and pdf versions of my LaTeX document. This has
> worked always fine without the graphics.

EPS files are hard to get even on a single platform, but if you cross
platforms you run increased risks of problems with fonts, format
of embedded preview images, etc. PDF avoids these issues, and it
is possible to embed PDF files in TeX documents.

> I must report that I tried all kinds of combinations of graphics file
> types (mainly I used EPS) and several packages and commands with
> Textures that have been suggested on the web and on the discussion
> forums over hte years. But I never succeeded in making the Textures
> typeset window show my graphics. The dvi file showed them in one
> occasion but even then I was unable to create a pdf file from that dvi
> file.
>
> I then loaded Miktex program for my PC (I should have done it years
> ago!!) and although it is no competition to Textures in preparing the
> text and formulas in my document, I must say that for the purpose of
> doing what I wanted (i.e. including graphics files) it worked. I saved
> the graphics as TIFF files (like mypic.tif) and then include a BB file
> (mypic.bb) which includes the so called BoundingBox dimensions and
> then both pdflatex and dvips of Miktex work just fine. Even here I
> first got a lot of trouble because of "missing BoundingBox" in my EPS
> files. I then figured that using TIF files and separate files to give
> those BoundingBoxes solved the problem.

TIFF is not a practical solution for line art as it doesn't scale.
PDF files support both images and vector graphics (even combinations
with line art overlaid on images) and, if prepared properly (to set
the MediaBox values), don't need extra work to define the BBox.

> I suppose a lot of people in science/math departments/in companies are
> working using Unix or Linux and there is probably less problems with
> LaTeX and graphics files with those systems.

Pdftex is available for Mac OSX, Win32, and *n*x. It is a much more
robust tool for cross platform environments.

--
George White <aa056[at]chebucto.ns.ca> <gnw3[at]acm.org>
189 Parklea Dr., Head of St. Margarets Bay, Nova Scotia B3Z 2G6