Jan-Åke Larsson wrote:
> May I suggest you take a look at "dvipng", available at
> http://sourceforge.net/projects/preview-latex/

Jan-Åke, 

playing with the attached tex file

$ latex trial.tex
$ dvipng -D$128 -otrial%d.png trial.dvi

I get a bunch of warnings like

[43/home/angus/preview-latex/devel/dvipng/dvipng warning: at (9633,8) 
unimplemented \special{ps::-32891 -32891 32891 32891 1655772 576976 
22609920}. ps::-32891
]

Which looks to me to be the metrics info that preview.sty generates when 
passed the option 'lyx'.

If you look in lyxpreview2bitmap.sh, you'll see it creates a .metrics file 
which in this case starts:

Preview: Tightpage -32891 -32891 32891 32891
Preview: Snippet 1 282168 127431 338831
Preview: Snippet 2 447828 0 491521
Preview: Snippet 3 1612921 597113 22609920
...

Further investigation reveals that it is not the 'lyx' option which causes 
these warnings but the 'tightpage' one.

Nonetheless, this problem is minor. The major problem is that I can't 
generate anythng sensible! The resultant png files are ridiculous ;-) 
Attached is my trial1.png together with the equivalent if using the 
dvips,gs,pnmcrop route. Here, I invoke preview.sty so:

\usepackage[active,delayed,dvips,tightpage,showlabels,lyx]{preview}

Does any of this make sense to you and can you help me resolve the problems?


-- 
Angus

<<attachment: trial1.png>>

<<attachment: trial1.ppm>>

\batchmode
%% LyX 1.4.0cvs created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass{article}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
%% Bold symbol macro for standard LaTeX users
\newcommand{\boldsymbol}[1]{\mbox{\boldmath $#1$}}

%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

\newcommand{\integral}[3]{\int_{#1}^{#2}\! \! \mathrm{d}#3\: }

\newcommand{\Vector}[1]{\boldsymbol{#1}}

\newcommand{\dd}[2]{\frac{\partial#1}{\partial#2}}

\newcommand{\erf}[1]{\textrm{erf}\left(#1\right)}

\usepackage[active,delayed,dvips,tightpage,showlabels,lyx]{preview}

%\AtBeginDocument{\AtBeginDvi{%
%\special{!userdict begin/bop-hook{//bop-hook exec
%<000000faf0e6>{255 div}forall setrgbcolor
%clippath fill setrgbcolor}bind def end}}}

\begin{document}
\begin{preview}
$\rho$
\end{preview}

\begin{preview}
$A$
\end{preview}

\begin{preview}
\[
E=\integral{A}{}{A}\rho^{2}\]

\end{preview}

\begin{preview}
$\rho^{2}$
\end{preview}

\begin{preview}
$dA$
\end{preview}

\begin{preview}
$D'$
\end{preview}

\begin{preview}
$\eta_{\mathrm{d}}$
\end{preview}

\begin{preview}
\begin{equation}
E\left(0\right)-E\left(\kappa\right)\propto\sqrt{\kappa}^{1-D'}\label{eq:variance-diffusivity-dependence}\end{equation}

\end{preview}

\begin{preview}
$E\left(\kappa\right)$
\end{preview}

\begin{preview}
$\kappa$
\end{preview}

\begin{preview}
$E\left(0\right)$
\end{preview}

\begin{preview}
$-D'$
\end{preview}

\begin{preview}
$\varepsilon$
\end{preview}

\begin{preview}
$\varepsilon_{\mathrm{min}}\ll\varepsilon\ll\varepsilon_{\mathrm{max}}$
\end{preview}

\begin{preview}
\begin{equation}
\frac{\partial}{\partial 
t}\left(E\left(0\right)-E\left(t\right)\right)\propto\sqrt{t}^{1-3D'}\label{eq:variance-linear-time-dep}\end{equation}

\end{preview}

\begin{preview}
$\Vector{a}=\left(a,b\right)$
\end{preview}

\begin{preview}
$\delta a$
\end{preview}

\begin{preview}
$\delta b$
\end{preview}

\begin{preview}
$\Vector{x}_{\mathrm{p}}=\left(x_{\mathrm{p}},y_{\mathrm{p}}\right)$
\end{preview}

\begin{preview}
$\partial x_{\mathrm{p}}/\partial a$
\end{preview}

\begin{preview}
$t=0$
\end{preview}

\begin{preview}
$t=\tau$
\end{preview}

\begin{preview}
\begin{equation}
c\left(r^{*},t^{*}\right)=\frac{1}{2}\left[\erf{\frac{1-r^{*}}{2\sqrt{t^{*}}}}+\erf{\frac{1+r^{*}}{2\sqrt{t^{*}}}}\right]\qquad
 t^{*}>0\label{eq:diffusive-conc-dist}\end{equation}

\end{preview}

\begin{preview}
$\textrm{erf}$
\end{preview}

\begin{preview}
$c$
\end{preview}

\begin{preview}
$r^{*}$
\end{preview}

\begin{preview}
$t^{*}$
\end{preview}

\begin{preview}
$\Vector{x}=\left(x,y\right)$
\end{preview}

\begin{preview}
\begin{equation}
\left(\begin{array}{c}
a\\
b\end{array}\right)=\left(\begin{array}{cc}
J_{\mathrm{xa}} & J_{\mathrm{ya}}\\
J_{\mathrm{xb}} & J_{\mathrm{yb}}\end{array}\right)^{-1}\left(\begin{array}{c}
x\\
y\end{array}\right)\label{eq:Eulerian Jacobian transform}\end{equation}

\end{preview}

\begin{preview}
$J_{\mathrm{xa}}$
\end{preview}

\begin{preview}
$J_{\mathrm{ya}}$
\end{preview}

\begin{preview}
$J_{\mathrm{xb}}$
\end{preview}

\begin{preview}
$J_{\mathrm{yb}}$
\end{preview}

\begin{preview}
$J_{\mathrm{ij}}$
\end{preview}

\begin{preview}
\begin{eqnarray*}
J\left(\Vector{a},\tau\right) & = & 
\dd{x_{\mathrm{p}}\left(\Vector{a},\tau\right)}{a}\dd{y_{\mathrm{p}}\left(\Vector{a},\tau\right)}{b}-\dd{x_{\mathrm{p}}\left(\Vector{a},\tau\right)}{b}\dd{y_{\mathrm{p}}\left(\Vector{a},\tau\right)}{a}\\
 & = & 
\rule{0mm}{3ex}J_{\mathrm{xa}}J_{\mathrm{yb}}-J_{\mathrm{xb}}J_{\mathrm{ya}}\end{eqnarray*}

\end{preview}

\begin{preview}
$J$
\end{preview}

\begin{preview}
$\Vector{U}_{\mathrm{p}}=\left(U_{\mathrm{p}},V_{\mathrm{p}}\right)$
\end{preview}

\begin{preview}
\begin{equation}
J_{\mathrm{xa}}=J_{\mathrm{xa}}^{0}+\dd{U_{\mathrm{p}}}{a}\tau\label{eq:stretch-Jxa}\end{equation}

\end{preview}

\begin{preview}
$J_{\mathrm{xa}}^{0}$
\end{preview}

\begin{preview}
$\partial U_{\mathrm{p}}/\partial a$
\end{preview}

\begin{preview}
$\Vector{U}_{\mathrm{f}}$
\end{preview}

\begin{preview}
$\Vector{U}_{\mathrm{p}}$
\end{preview}

\begin{preview}
\[
\dd{U_{\mathrm{p}}\left(a,b,\tau\right)}{a}=J_{\mathrm{xa}}\dd{U_{\mathrm{p}}\left(x,y,t\right)}{x}+J_{\mathrm{ya}}\dd{U_{\mathrm{p}}\left(x,y,t\right)}{y}\]

\end{preview}

\begin{preview}
$\Vector{U}_{\mathrm{f}}=\Vector{U}_{\mathrm{p}}$
\end{preview}


\end{document}

Reply via email to