[OS X TeX] Translating LaTeX to Quark or InDesign

William Adams will.adams at frycomm.com
Tue Jul 3 07:39:34 EDT 2007


On Jul 2, 2007, at 6:58 PM, Jon Reades wrote:

> I haven't used Quark in ages, but both InDesign and Quark have/had  
> pseudo-XML markup tags that might do what you need. I think that  
> Quark called them XpressTags, and I see that InDesign 2.0 (I'm a  
> little behind the times here) allows me to export to a 'Tagged'  
> file as well as PDF. I remember creating a script that queried my  
> old company's LDAP server to retrieve new employees and then used  
> the retrieved details to generate a text file that could be  
> imported straight into Quark with all of the styles automatically  
> applied to make business cards (everything from page breaks to  
> character styles).

Quark XPress Tags and Adobe Tagged Text Tags are quite easy to write  
up, but they're also _very_ primitive and limited to the formatting  
possible w/ direct native typesetting commands / styles, which would  
make any but the simplest of mathematics very difficult to create.  
See below for a possible work-around

The InMath tool which Stephen Moye mentioned is reasonably capable  
for not too complex mathematics, but begins to break down on  
calculating breaks &c. or spacing really fancy displays. It does  
translate all the formatting into native ID commands, so the docs can  
be passed on to a subsequent ID user who doesn't have InMath --- you  
could also export them to Adobe Tagged Text for a really verbose  
expression of them to see why it's not feasible to write out or edit  
by hand.

> I don't know if there's a macro to do this type of work (a  
> variation on the HTML one perhaps?) but if not there's always Perl  
> to read through a file and spit out a marked-up version of it if  
> you define some kind of mapping from LaTex to tagged text... I  
> would think that this would be a better way of getting to something  
> that the printer is happy with while not tearing your hair out  
> going through Word, especially if revisions are required.

Such a tool would have to be something like latex2html (the world's  
longest maintained perl script), but it wouldn't have the leisure of  
falling back on bitmaps and would need to translate things into  
Unicode points and calculate spacing in horizontal and vertical  
dimensions, translating dimensions into Adobe InDesign kerning /  
spacing commands. Not impossible, but decidedly non-trivial.

I'm surprised no one has mentioned LaTeXiT --- Adobe has _finally_  
gotten around to implementing text -> graphics Services (In InDesign  
CS3), so one can use it from within InDesign. Unfortunately, the  
``Detect and typeset equations'' command doesn't seem to work, but it  
does typeset equations and set them as graphics in situ in the text  
stream quite nicely. Reverting equations back to LaTeX code doesn't  
work either, so be sure to save a copy of the original LaTeX to crib  
from at need.

LaTeXiT doesn't work at all as a Service in Quark 7 however, there  
you'd need to drag the equations in as graphics, creating them  
outside Quark.

As others have noted, typesetting in LaTeX directly should be quite  
workable (worst case is you need to wash the .pdf through PostScript  
and distill w/ Adobe Acrobat Distiller using settings provided by the  
printer) and in many ways would be preferable to my mind. Much less  
need for proofreading, no worry 'bout missing an equation, or whether  
or no one updated the index (assuming one uses the nifty scripts  
which automate such) &c.

Some example files here:

http://www.atlis.com/services/composition/samples/TeX%20Sample%20Pages/

and of course there's the TeX Showcase:

http://www.tug.org/texshowcase/

William

-- 
William Adams
senior graphic designer
Fry Communications



------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list