Personal info for ALB

This person is currently certified at Apprentice level.

Name: Andrew Burrow

Notes: Using GhostScript from within LaTeX. In particular, using LaTeX and PDFLaTeX to create printed and hypertext versions of a computer science PhD thesis containing many EPS diagrams annotated with mathematics. I am interested in improvements to the ghostscript engine which allow scripts such as "ps2pdf" (distributed with ghostscript) and "epstopdf" (distributed with tetex) to keep the mathematic annotations as postscript fonts. Currently acrobat handles bitmaps very poorly, and ghostscript 5.50 translates some postscript fonts with unusual encodings (i.e. math symbols!) to bitmaps.

Recent diary entries for ALB:

13 Jun 2001  »

Finished AFPL ghostscript-7.00 RPMS for 7.1

Two patches where required, outside of the configuration of "src/unix-gcc.mak".

(1) The fix to "time_.h" discussed on the announcement page.

(2) A fix to the construction of symbolic links in the "man1" directory inside the "src/unixinst.mak" file.

I'll try and post some details on the announcement page.

13 Jun 2001  »

OK. I am actually back here because I am trying to make an RPM for redhat 7.1, of AFPL ghostscript 7.0.

Just spent an hour or so tracking this time.h problem down, to find that it is the only comment under the release message.

Oh the joys of dial-up connections, that stop you from making those quick checks.

13 Jun 2001  »

Subsequent to the above very baroque solution, I have found that you are best to drop PDFlatex and just rely on "ps2pdf" from ghostscript 6.50 and above.

Namely, I put "dvips" as an option to the document; include the "hyperref" package; and process to PDF via first "dvips -z -Pamz -Pcmz" and then "ps2pdf".

...feeling somewhat redfaced

10 Dec 2000  »

Having installed the 6.50 ghostscript and further investigated "dvips" and "pdflatex", I have solved my problem.

PROBLEM: Produce line-diagrams for distribution within a postscript or PDF document, where the diagrams are annotated with LaTeX/TeX mathematics.

SOLUTION: The line diagrams are drawn using "xfig" and the annotations entered in abreviated form, e.g., `varphi' instead of the LaTeX code `$\varphi_2$'.

Inside the thesis source code, the abbreviated annotations are replaced by the final form using the LaTeX package "psfrag".

This is the solution as far as the postscript version of the thesis is concerned. However, a PDF version is required with bookmarks, and hyperlinks. "pdflatex" can do this, but it requires that the graphics be converted to PDF. Furthermore, the "psfrag" LaTeX package is not supported under "pdflatex", because it uses postscript programming tricks.

NEW PROBLEM: Import the LaTeX annotations into the PDF versions of the graphics. So that when running "latex" on the thesis source the EPS file is included and the PSfrag replacements are made, and when running "pdflatex" on the thesis source the PDF file is included with the PSfrag replacements already made.

SOLUTION: The LaTeX source code for the graphic inclusion and PSfrag replacement can be isolated and processed with "latex" to generate a DVI file. In turn this DVI file can be processed with "dvips" to generate an EPS file containing the annotated graphic. Finally, this EPS file can be processed with a ghostscript script to produce the PDF file.

However, the bounding boxes are very broken.

NEW PROBLEM: Produce the annotated PDF files with corrected bounding boxes.

SOLUTION: Once the bounding box is corrected in the EPS file (where it is a simple preamble comment), it can be transmitted to the PDF using the script "epstopdf". Since the ghostscript script "ps2pdf" now accepts an option specifying the PDF compatability level, and "pdflatex" prefers 1.2. This process is best achieved by a pipeline

    epstopdf --filter --nogs < graphic.eps \
        | ps2pdf12 - graphic.pdf

However, this produces bitmaps for the fonts. These are handled very poorly by acrobat.

NEW PROBLEM: How do we stop the use of bitmap fonts?

SOLUTION: On newer LaTeX/TeX distributions such as "tetex" the computer modern fonts are also available as Type 1 fonts. The options "-Pcmz" and "-Pamz" cause "dvips" to include these fonts in the EPS or PS files. Therefore, the DVI to EPS conversion should use "dvips" as

    dvips -E -Pcmz -Pamz graphic.dvi -o graphic.eps

Others have certified this person as follows:

[ Certification disabled because you're not logged in. ]

[ Home | Articles | Account | People | Projects ]