pkgsrc-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
\documentclass{article}
\usepackage{amsmath}
\usepackage{amssymb}
\pagestyle{empty}
\usepackage{preview}
\begin{document}
\thispagestyle{empty}
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
${noerr}
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
${noerr}
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 \{\} \;
${noerr}
On Tue, Mar 18, 2008 at 08:12:21PM +0100, Matthias Drochner wrote:
>
>reed%reedmedia.net@localhost said:
>> Prosper uses Postscript features from pstricks.
>
>Yes I see:
>(/usr/pkg/share/texmf-dist/tex/latex/pstricks/pstricks.sty
>(/usr/pkg/share/texmf-dist/tex/generic/pstricks/pstricks.tex
>`PSTricks' v1.04 <2004/06/22> (tvz)
>(/usr/pkg/share/texmf-dist/tex/generic/pstricks/pstricks.con))
>
>> 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 http://tug.org/PSTricks/main.cgi?file=pdf/pdfoutput
>
>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
>Matthias
>
>
>
>
>-------------------------------------------------------------------
>-------------------------------------------------------------------
>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