# Feature suggestion, bug report -Re: [OS X TeX] Equation Service

Fri Mar 22 15:08:31 CET 2002


On Fri, 22 Mar 2002 at 11:31, Guido Mocken wrote:

[...]

! Undefined control sequence.
l.4 ^^I\begin
{eqnarray}
?
! Emergency stop.

Which tells me that maybe I am doing something wrong (some
package missing?!), but anyway - Equation Service shouldn't
*crash* on this.

I'm afraid, you are using plain TeX instead of LaTeX.

[...]

Both provide a service "tex --> pdf". It would be very nice if they
would also offer the reverse way: "pdf --> tex".
Of course, it's impossible to generate tex code for an arbitrary
pdf-image, but maybe (I do not know the PDF specs for this) it would be
possible to include the tex source as an invisible comment inside the
resulting pdf when you do the tex --> pdf conversion. If so, to go the
reverse way one would only have to extract this comment and return it as
a text string to the calling application.

I have put a specimen pdf file at:

which has the TeX sources of this document in full in this pdf as
object number 1. And also has the TeX sources of three equations as
object numbers 2 to 4. If you open this pdf in a text editor you can
see the text stream.

These sources can be extracted from the pdf by running pdftosrc
which is distributed with pdfTeX binaries by giving the following
command from the shell prompt:

pdftosrc pdf2tex.pdf 1   ==> pdf2tex.1 the entire source.tex
pdftosrc pdf2tex.pdf 2   ==> pdf2tex.2 the first equation
pdftosrc pdf2tex.pdf 3   ==> pdf2tex.3 the second equation
pdftosrc pdf2tex.pdf 4   ==> pdf2tex.4 the third equation

The syntax being

pdftosrc <pdffile name> <object number>

Is this what you wanted?

--

-----------------------------------------------------------------
To UNSUBSCRIBE, send email to <info at email.esm.psu.edu> with
"unsubscribe macosx-tex" (no quotes) in the body.
For additional HELP, send email to <info at email.esm.psu.edu> with
"help" (no quotes) in the body.
-----------------------------------------------------------------