rgheck <rgh...@...> writes:
>
> On 09/23/2009 10:19 AM, David Wang wrote:
> > I found exported latex source (by File->Export->LaTex(plain)) is not
> > terribly clean. Specifically, \begin{equation} and \end{equation} in general
> > don't start at the first column and occupy one line each [...]
> >
> >
> This is probably a bug. The exported code is meant to be "clean", in
> this sense, and we do our best e.g. to break the lines at 80 characters,
> etc, etc. So you should report this on the bug tracker. It's probably an
> easy fix. I'm not sure, though, because there is a need here to make
> sure we don't out output too many newlines. I.e., this is OK:
> blah blah blah
> \begin{equation}
> ...
> but we do not want:
> blah blah blah
>
> \begin{equation}
> ...
The way this is handled for e.g. \begin{figure} or \begin{table} is to insert a
comment mark (%) and a newline before the \begin{environment}. Applying this to
your example would produce:
blah blah blah%
\begin{equation}
...
or:
blah blah blah
%
\begin{equation}
...
which I think looks very acceptable. The extra newlines would be ignored during
latex processing because of the comment mark. I do not know the details of the
code producing this latex output but this solution should be easy to implement.
Julien