[texhax] TeX -> PostScript, but in a resolution-independent manner

zsdc zsdc at wp.pl
Wed Jun 11 11:51:21 CEST 2003


Phil Parker wrote:

>On 06/11/2003 at 03:28 AM, zsdc <zsdc at wp.pl> wrote:
>
>>publish PS as well as PDF versions online, while printing PS one myself, 
>>but providing PDF for those, who can't view PS. At least as soon as I 
>>figure out how to make PDF out of LaTeX file with EPS graphics. 
>>    
>>
>I use ghostscript to convert *.eps into *.pdf, then change the latex file to
>replace .eps with .pdf for all graphics file inclusions. I use dvipdfm, but
>something similar would probably work with pdflatex.
>
When I was experimenting with pdflatex, I started to read about 
different file formats, and I fugured out that, like I need Embedded 
PostScript to embed graphics in PostScript output, I need Embedded PDF 
to embed graphics in PDF output. So I converted my EPS files to EPDF 
with "convert" program from ImageMagick, but I was still getting 
"Unknown graphics extension" error, just like with EPS files, so I gave 
up, thinking that if I don't know how to embed Embedded PDF into PDF, 
than I have to do something completely wrong, and it's not only the 
fault of the file format I use.

>If you want, I can send you a REXX batch command file I use (similar to a
>shell script on unix-linux). You could at least get the appropriate command
>line for the conversion (with all options and parameters) from it, or
>install REGINA (free REXX interpreter for most platforms), modify it, and
>use it yourself.
>
Please, maybe I could figure out what I'm doing wrong. Thanks a lot.

But is having different LaTeX source to latex and pdflatex the only way 
to do it? Of course I could pipe my source through "sed 
's/\.eps}/.epdf}/g'" or something like that, and directing the output to 
pdflatex on the fly, but it doesn't look like a very elegant solution. 
Can I write my source file in such a way, that latex and dvips will use 
different files than pdflatex, parsing the same source? Or better yet, 
tell pdflatex to somehow convert EPS to EPDF on the fly? Or am I just 
asking stupid questions?

Thanks.
-zsdc.





More information about the texhax mailing list