From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Centering graphics in LaTeX export Date: Fri, 16 May 2014 10:51:42 +0200 Message-ID: <87d2fem7hd.fsf@gmail.com> References: <87vbt79i9d.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlDrf-0003Jh-Qt for emacs-orgmode@gnu.org; Fri, 16 May 2014 04:51:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlDrT-0002Rj-Gi for emacs-orgmode@gnu.org; Fri, 16 May 2014 04:51:39 -0400 Received: from plane.gmane.org ([80.91.229.3]:38394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlDrT-0002Pf-AR for emacs-orgmode@gnu.org; Fri, 16 May 2014 04:51:27 -0400 Received: from public by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WlDrR-0003cB-9O for emacs-orgmode@gnu.org; Fri, 16 May 2014 10:51:25 +0200 In-Reply-To: <87vbt79i9d.fsf@somewhere.org> (Francesco Pizzolante's message of "Thu, 15 May 2014 17:25:02 +0200") 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@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Francesco Pizzolante Cc: mailing-list-org-mode Hello, "Francesco Pizzolante" writes: > Here's a small patch that enables centering graphics in LaTeX exports > (as it already exists for tables). Thanks for this. A few, minor, comments follow. > +(defcustom org-latex-images-centered t > + "When non-nil, images are exported in a center environment." > + :group 'org-export-latex > + :type 'boolean) You need to add :version "24.5" :package-version '(Org . "8.3") since this is a new variable. > (comment-include (if (plist-get attr :comment-include) "%" "")) > ;; It is possible to specify width and height in the > ;; ATTR_LATEX line, and also via default variables. > + (centerp (if (plist-member attr :center) > + (plist-get attr :center) > + org-latex-images-centered)) I suggest to move the CENTERP binding above the previous comments. > + path > + (if centerp "\\par}\n" "") > + )) No parens alone on a line, please. You also need to update manual and document the feature. Eventually, could you provide a proper commit message and send an updated patch? Regards, -- Nicolas Goaziou