[texhax] getting embedded vs paged pdf (eps/png)

George Georgalis george at galis.org
Tue Mar 11 00:07:27 CET 2008


Hi Barbara,

On Mon, Mar 10, 2008 at 02:59:34PM -0400, Barbara Beeton wrote:
>a couple of comments -- see below ...

Big big help, thanks.

Here's a rather convoluted, but complete demonstration
of all I got worked out (multiple, tightpage, multi-line
equations with gather, extracted with preview to eps and
also to pdf/png with pdfcrop), the Makefile fragment:

	latex '\PassOptionsToPackage{active,delayed,tightpage,displaymath,floats,textmath,graphics}{preview} \input{$@}' >/dev/null
	dvips -q -o $@.ps $@
	gs -q -sDEVICE=epswrite -r2400 -dBATCH -dNOPAUSE -sOutputFile=$@-\%d.eps $@.ps
	dvips -q -i -o $@.ps. $@
	for n in $@.ps.* ; do \
		gs -q -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -sOutputFile=$$n.pdf $$n ; \
		pdfcrop $$n.pdf >/dev/null && mv $$n-crop.pdf $$n.pdf ; \
		gs -q -sDEVICE=png16m -dBATCH -dNOPAUSE -r300 -sOutputFile=$$n.png $$n.pdf ; \
		rm $$n ; printf $$(expr $$n : 'multi.ps\(.*\)') ; done ; echo

where file $@ is

\documentclass{amsart}
\usepackage{amssymb}
\pagestyle{empty}
\usepackage{preview}
\begin{document}
\thispagestyle{empty}

\begin{gather*}
\binom{n}{x_1\  x_2\ aaa \ldots x_n} \prod_{i=1}^n p_i^{x_i}\\
\sum_{i=1}^n x_i = naaa
\qquad 0 < p_i < 1iaaa
\qquad \sum_{i=1}^n p_i = 1aaa
\end{gather*}

\begin{gather*}
\binom{n}{x_1\  x_2\ \ldots x_n} \prod_{i=1}^n p_i^{x_i}\\
\sum_{i=1}^n x_i = n
\qquad 0 < p_i < 1i
\qquad \sum_{i=1}^n p_i = 1
\end{gather*}

\end{document}

...that produces everything I can imagine I'll use about this!

Thanks again!

// George


-- 
George Georgalis, information system scientist <IXOYE><


More information about the texhax mailing list