Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ps2pdf utils

Well here is maybe more than you asked for but maybe it
will help.  Purpose of these makefile targets was to
extract pdf, png and eps of math and tables in latex
(header provided), thanks to the preview package.

Maybe you can extract the parts you need, I don't follow
the question but seems to be in this ballark. :-}

// George


preview_opt     = active,delayed,tightpage,displaymath,floats,textmath,graphics

all :
        # Does preview target for each tex file
        for file in *.tex ; do name=$$(expr $${file} : '\(.*\).tex') ; \
                make preview=$${name} preview ; done

preview :
        # Generates eps, pdf and png files for each formula/figure/table/image 
in ${preview}
        latex '\PassOptionsToPackage{${preview_opt}}{preview} 
\input{${preview}}' >/dev/null
        dvips -q -o ${preview}.ps ${preview}
        gs -q -sDEVICE=epswrite -r2400 -dBATCH -dNOPAUSE 
-sOutputFile=${preview}-\%d.eps ${preview}.ps
        dvips -q -i -o ${preview}.ps. ${preview}
        for n in ${preview}.ps.* ; do \
                k=$$(echo $$n | sed 's/.ps//') ; \
                gs -q -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -sOutputFile=$$k.pdf 
$$n ; \
                pdfcrop $$k.pdf >/dev/null && mv $$k-crop.pdf $$k.pdf ; \
                gs -q -sDEVICE=png16 -dBATCH -dNOPAUSE -sOutputFile=$$k.png 
$$k.pdf ; \
                rm $$n ; printf $$(expr $$k : '${preview}\(.*\)') ; done ; echo

clean :
        # Purge all temp files and graphical output
        find . -type f \( -name \*.ttt -o -name \*.fff -o -name \*.lof -o -name 
\*.lot \) -exec rm \{\} \;
        find . -type f \( -name \*.aux -o -name \*.log -o -name \*.toc -o -name 
\*.out -o -name \*.idx \) -exec rm \{\} \;
        find . -type f \( -name \*.pdf -o -name \*.png -o -name \*.dvi -o -name 
\*.eps -o -name \*.ps  \) -exec rm \{\} \;

On Tue, Mar 18, 2008 at 08:12:21PM +0100, Matthias Drochner wrote:
> said:
>> Prosper uses Postscript features from  pstricks.
>Yes I see:
>`PSTricks' v1.04  <2004/06/22> (tvz)
>> You mention using pdflatex instead of latex-dvips-ps2pdf.
>Partly because I need it as pdf finally anyway, so I'd save
>some processing steps, and partly because everybody seems to
>recommend it.
>(The processing steps argument doesn't hold if I need to
>import graphics -- many graphics editors can export eps but
>not pdf, so I pay with additional conversions here.)
>> See
>Thanks - that's a lot of useful information.
>> Or look for pdftricks and maybe prosper can use it instead?
>I see -- but that is cumbersome to use. I think I'll
>stick to dvi and ps for now.
>Btw, the wip/pdftk pkg did serve me well to help borrowing
>slides from other presentations. I'll consider importing it
>into pkgsrc after the freeze.
>best regards
>Forschungszentrum Juelich GmbH
>52425 Juelich
>Sitz der Gesellschaft: Juelich
>Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
>Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
>Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
>Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
>Dr. Sebastian M. Schmidt

George Georgalis, information system scientist <IXOYE><

Home | Main Index | Thread Index | Old Index