Myles English <[email protected]> wrote:
>
> Hi Seb,
>
> Sebastien Vauban writes:
>
> > Hi Myles,
> >
> > Myles English wrote:
> >> This patch replaces every occurence of the \begin{center} environment
> >> with \centering in the file contrib/lisp/org-e-latex.el.
> >> ...
> >> - (format "\\begin{center}\n%s\\end{center}" contents)))
> >> + (format "\\centering\n%s" contents)))
> >
> > Wouldn't you have to replace
> >
> > \begin{center}
> > ...
> > \end{center}
> >
> > by
> >
> > {\centering
> > ...
> > }
> >
> > ? That is, add a group around?
>
> I don't think so, at least I have not come across that usage, and it
> seems to work without. Do you know different?
>
If a \centering occurs at top-level in a latex document,
then *everything* after it will be centered: it's a declaration that
remains in force for the current group (which is the rest of the
document if it occurs at top-level).
\begin{center}...\end{center} is essentially {\centering ...} except
that it also starts a new paragraph.
It's not clear to me at least, that wholesale replacement is the correct
thing to do: it needs to be looked at on a case-by-case basis I think.
Nick