From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: [PATCH] org-e-latex: Tables get correct amount of vertical space Date: Tue, 13 Nov 2012 17:15:17 +0100 Message-ID: <801ufxscmi.fsf@somewhere.org> References: <87d2zhr2ym.fsf@gmail.com> <80a9ulsgdv.fsf@somewhere.org> <87a9ulr19m.fsf@gmail.com> <11825.1352822198@alphaville> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Myles and Nick, Nick Dokos wrote: > Myles English wrote: >> Sebastien Vauban writes: >> > 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? >>=20 >> 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). As confirmed by Nick, \centering just changes the layout for ever... up to = the end of the document. Why does it work? I guess because there are grouping commands inserted by = Org at other places, that stop the propagation of the centering that far... But it's dangerous to count on them, IMHO. > \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. I think that's a safe replacement (_with_ the grouping), and with something= I forgot about (well seen Nick!): the \par. See, for example, https://groups.google.com/forum/?fromgroups=3D#!topic/fr.comp.text.tex/0s4W= fsIfmy8 for the answer of Manuel P=C3=A9gouri=C3=A9-Gonnard, one reference wrt LaTe= X questions: "replace the environment by {\centering ... \par}" Best regards, Seb --=20 Sebastien Vauban