I played some more with this. It transpires that fleqn does not, 
after all, enable me to position the preview in the same place 
on the LyX screen as the editable view. LaTeX still retains the 
concept of a page width and all that happens is that the 
equation is positioned differently within this width. Ie, we end 
up with an enormous right hand margin ;-)

An alternative to this "fix" might be to use 
        $ \displaystyle ... $
when outputting \[ ... \] equations. I attach the two snippets 
generated from the test file below. To my eyes, snippet2.png is 
exactly what we're looking for here (and it would be trivial to 
create such output).

What do you lot, the pseudo-users think?

Angus

> =============================================
\documentclass{article}

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

\begin{document}

%% As output by mathed at the moment
\begin{preview}
\[ E=\int_{A}\!\!\mathrm{d}A\:\rho^{2} \]
\end{preview}

%% As might be output by mathed if people decide 
%% that this gives "better" results
\begin{preview}
$ \displaystyle E=\int_{A}\!\!\mathrm{d}A\:\rho^{2} $
\end{preview}

\end{document}
> =============================================
$ latex snippet
$ dvips -o snippet.ps snippet.dvi
$ gs -q -dNOPAUSE -dBATCH -dSAFER \
        -sDEVICE=png16m -sOutputFile=snippet%d.png \
        -dGraphicsAlphaBit=4 -dTextAlphaBits=4 -r130 snippet.ps
=============================================

Attachment: snippet2.png
Description: PNG image

Attachment: snippet1.png
Description: PNG image

Reply via email to