# [OS X TeX] A Textures Query (yet, again)

Ross Moore ross at ics.mq.edu.au
Fri Sep 16 03:28:49 CEST 2005

Hello Jack,

On 16/09/2005, at 3:15 AM, Jack Kuipers wrote:

>> I have a large TEXTURES file which when typeset produces all
>> 400+ pages including 100++  figures which comprise my Quaternion
>> Book.
>> All of these output pdf.pages were furnished to and used by
>> Princeton University Press
>> as camera-ready for the publication of the book (5 years ago).
>> These original Textures (LaTeX)
>> files were produced on my Macintosh Computers: OS 7x (or earlier),
>> 8x, to 9.2.2. And all the figures
>> are, of course, embedded within the Textures software either as
>> pict or eps or somesuch.
>>
>> HOWEVER, I am now committed to using MacOSX (currently Panther)
>> and TeXShop 1.5.3e --- and
>> have become rather nimble in doing all the NEW stuff with figures,
>> pictures, tables, etal.  Moreover,
>> I'm even now lusting to upgrade to Tiger. BUT.....
>>
>> IS THERE A WAY TO SALVAGE OR CONVERT THE INFORMATION IN MY OLD
>> TEXTURES FILES or RUN
>> THEM UNDER TeXShop 1.5.3e or later?

I went through this exercise recently for a book, authored by a
colleague,
that needed revision after 7 years (or so).

>> HOW, first of all,  to get all of the figures back out of TEXTURES
>> ----
>> and then to get them all properly converted (say, using
>> GraphicConverter batch) is the primary issue;
>>
>>  I can do ONE figure (at a time) --- but 100++ figures??? I might
>> not survive it.
>> ANY suggestions would be so very much welcomed. Thank you in

Firstly, you need all of the figures in separate .eps or .pdf files.
Others have commented on how to achieve this, depending on how the
graphics were originally stored for use with Textures.

Secondly, what I always advocate is to have a separate macro-name for
each image. This macro-name should be chosen to indicate the contents
of the image, as it relates to the material of the book.
The macro is used in the body of the book manuscript, and expands to
a command to place the image.
For example, in my case I had macros such as:

\def\DiophantusScan{\leavevmode
\hbox{\scaledEPSF 20.41pc by 32.79pc (Bachet.ps scaled 1200)}}
\def\AnnalsPageC{\leavevmode
\hbox{\scaledEPSF 33.21pc by 52.28pc (Deformation.ps scaled 707)}}
\def\Muse{\leavevmode\noindent
\hbox{\scaledEPSF 15.73pc by 27.44pc (Muse.ps scaled 1400)}}
\def\Lycee{\leavevmode\noindent
\hbox{\scaledEPSF 16.06pc by 21.83pc (Lycee.ps scaled 1400)}}

Now to update to TeXShop, *all* that was needed was to redefine the
\scaledEPSF  macro used here.

Here's the revised coding that I devised for this:

\graphicspath{{FermatImages/}}
\def\pssuffix{ps}%
\def\epssuffix{eps}%
\makeatletter
\def\scaledEPSF #1 by #2 (#3.#4 scaled #5){\bgroup
\dimen0=#5pt \divide\dimen0 by 1000\relax
\edef\thescale{\expandafter\removePT@\the\dimen0}%
\def\thesuffix{#4}%
\ifx\thesuffix\pssuffix
\def\thename{#3}%
\else
\ifx\thesuffix\epssuffix
\def\thename{#3}%
\else
\def\thename{#3-#4}%
\fi\fi
% \typeout{ *** processing image: \thename *** }%
\edef\next{\egroup
\noexpand\includegraphics[scale=\thescale]%
%   \noexpand\includegraphics[width=#1,height=#2,scale=\thescale]%
{\thename}}\next
}
\makeatother

This does a little bit of parsing on the filename, before constructing
an  \includegraphics  command that will work when processing either with
pdfTeX  or  with  TeX+Ghostscript  mode.

Only the  scale-factor  is actually needed, since the supplied width
and height were needed just with Textures' own picture-handling methods.

With all of these picture-inclusion macros collected into a single
\input
file, it was quite short work to get everything working properly in
TeXShop.

Of course it wasn't quite as smooth sailing as I've indicated.
Some images needed to be renamed, and there were a few other edits
required.
But overall these "special cases" were small in number, and easily
identified.
There was no need to go searching through \include'd files to find where
changes may be needed.

Your situation may not be quite so easy to handle as mine ---
fortunately
I had anticipated such a possible need years back, with the 1st edition
of the book, so had chosen to use the individual macro-names for each
image.

Even with 100+ images, the time spent collecting together the image
inclusion
commands into a single file, and assigning unique macro names, should be
worthwhile --- especially if you anticipate further editions in years
to come.

After having done this, you will be able to see what kind of things
need to
be changed, to alter the low-level image-inclusion macros. It may be
that
several macros need altered expansions, not just one (as in my case).

Hope this helps,

Ross Moore

>>
>> Sincerely,
>>     Jack Kuipers, Mathematics
>>     Professor Emeritus
>>     Calvin College
>>

------------------------------------------------------------------------
Ross Moore                                         ross at maths.mq.edu.au
Mathematics Department                             office: E7A-419
Macquarie University                               tel: +61 +2 9850 8955
Sydney, Australia  2109                            fax: +61 +2 9850 8114
------------------------------------------------------------------------

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
& FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/