Jean-Marc Lasgouttes wrote:
> I am all for the use of \begin{centering}...\end{centering}, except
> that we need to make sure that there is a \par break before the \end

Yes, in contrary to the patch on bugzilla, I have changed this in my latest 
patch (in parallel to the "usual" end tags):

@@ -777,24 +797,39 @@
                break;
        case LYX_ALIGN_LEFT:
                if (getParLanguage(bparams)->babel() != "hebrew") {
-                       os << "\\end{flushleft}";
+                       if (noTrivlistCentering())
+                               os << "\\par\\end{raggedright}";
+                       else
+                               os << "\\par\\end{flushleft}";
                        column = 15;
                } else {
-                       os << "\\end{flushright}";
+                       if (noTrivlistCentering())
+                               os << "\\par\\end{raggedright}";
+                       else
+                               os << "\\par\\end{flushright}";
                        column = 16;
                }
                break;

etc.

> Another problem is that I am not 100% sure that we want to use
> centering only in the float context. I understand this is what is
> wanted in most of the cases, but we should decide whether we want to
> use it for main text too, maybe...

I am not shure, but I think we should be close to what counts as ordinary 
LaTeX usage. In LaTeX, people are usually using the trivlist solutions, i.e. 
\begin{center} and friends. I am no expert in LaTeX internals, but I guess 
the trivlist and the additional space has some reason (?).

As for other environments, I do not know. It has shown that tabular cells need 
a different approach. If we find other environments that should use 
centering, we can always add them to noTrivlistCentering()

> JMarc
>
> PS: Juergen, I really appreciate that you want to solve this issue, as
> I feel somewhat guilty of letting it languish for so long.

No need to worry. I just want to make shure that it is not forgotten, as I 
think it is an important goal to produce best possible output. And your 
comments are always very rational and therefore welcome, no matter at what 
time ;-)

Regards,
Juergen.

Reply via email to