[texhax] Extract equations as EPS from larger doc?

Uwe Lück uwe.lueck at web.de
Sat Jun 20 16:39:31 CEST 2009

At 04:36 20.06.09, Philipp K. Janert wrote:
>In any case, I suggest we end this thread. I think it
>has exhausted its usefulness.

I think I suggested something useful, but it may not be useful for you if 
you don't think properly about it.

>Thanks for your answer, but it is entirely missing
>the point.

I think *you* are.

>I don't want to extract "information", because there is
>no receiver for this "information". I am trying to extract
>a PICTURE (a "blob"), so that I can give that to a real,
>dead-trees and ink publisher, who can then glue that
>picture into the printed book without interpreting it any
>further, so that (hopefully) my READERS can extract
>information from it.

If you "don't want" extract information, you though *must* (I think), namely:

At 15:19 19.06.09, Uwe Lueck wrote:
>"Philipp K. Janert" <janert at ieee.org> schrieb am 17.06.2009 18:05:51:
> > "I want to extract EPS of individual equations from
> > a multipage PostScript document."
>... but this looks like throwing the logical information away and then 
>trying to retrieve it from the glyph placement information, so seems not 
>so sound ...

I did not refer to the information an *equation contains*, but the 
information on *what is an equation.* A human reader can easily discern 
equations on the paper or on screen, but you certainly want to have 
*software* that discerns equations. In your .tex files, you clearly mark 
equations, but this "information" gets "blurred" in the output.

>In other words, it is crucial to me that LaTeX has already
>done its magic and processed the commands into
>something that no longer needs to be interpreted by a
>machine (only by a human reader).

If you are saying that LaTeX should not be involved in producing another 
instance of one equation, you shouldn't (cf. TeXbook p. 228). And it seems 
you *do* want that after typesetting a *machine* should generate the single 
equation files, not a human reader.

>What I was looking for were some creature comforts
>managing the potentially hundreds of files that this
>will require. (And here we get into finer points, whether
>it is simpler to have one large LaTeX file, which then
>needs to be split to get the individual equation images,
>or should there be a separate LaTeX document for
>each equation, etc. THAT'S what my original question
>was all about.)

At 20:32 19.06.09, Uwe Lueck wrote:
>redefine the equation environment (resp. others) so it:
>1. writes a file whose <filename> contains the equation number (ususually 
>just expansion of \theequation) and whose content is
>     \documentclass ... \begin{document}
>     $$<equation content>\eqno<expansion of \theequation>$$
>     \end{document}
>2. adds `latex <filename>' to a batch file (or/plus something producing 
>the .eps version if you really need it)

So you have these hundreds of files and a single batch file that continues 
processing all of them.

But meanwhile I think that a single "extract" file produced by LaTeX may 
suffice. It may just *typeset* something like


so the "information" for discerning equations is in the PostScript file and 
another utility can reliably put <content> into a separate file with head 
and end as needed for .eps and the BOUNDINGBOX line made from <dimensions> ...

... however, this was one idea, and now I think it suffices to have *one* 
second output file with *one* equation on each (otherwise blank) page.



More information about the texhax mailing list