From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: behavior of org-image-actual-size with units in attr_* :width Date: Wed, 01 Oct 2014 19:51:31 -0400 Message-ID: References: <877g0j8ubx.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZTgK-0003R8-Kg for emacs-orgmode@gnu.org; Wed, 01 Oct 2014 19:51:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZTgF-000337-Sn for emacs-orgmode@gnu.org; Wed, 01 Oct 2014 19:51:40 -0400 Received: from mail-qg0-x22f.google.com ([2607:f8b0:400d:c04::22f]:46402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZTgF-00032b-Lm for emacs-orgmode@gnu.org; Wed, 01 Oct 2014 19:51:35 -0400 Received: by mail-qg0-f47.google.com with SMTP id i50so1126457qgf.20 for ; Wed, 01 Oct 2014 16:51:33 -0700 (PDT) Received: from Johns-MacBook-Air.local (c-24-3-17-30.hsd1.pa.comcast.net. [24.3.17.30]) by mx.google.com with ESMTPSA id l46sm1922034qgd.27.2014.10.01.16.51.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Oct 2014 16:51:33 -0700 (PDT) In-Reply-To: <877g0j8ubx.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Wed, 01 Oct 2014 21:26:42 +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: emacs-orgmode@gnu.org Nicolas Goaziou writes: is it the case that ATTR_HTML width attributes are only in pixels? If so, that is certainly an easier modification to make, and would solve my problem (we almost exclusively use attr_latex for that export). Your comment inspired me to solve it this way: #+attr_latex: :width 4in :placement [H] #+attr_org: :width 400 [[./images/batch-multiple.png]] For inline images, the attr_org is found first, but in latex export it is ignored and it gets the width there. Maybe no change is needed at all. > Hello, > > John Kitchin writes: > >> I have set this in my init file >> >> (setq org-image-actual-width '(600)) >> >> It works great, unless I use: >> #+attr_latex: :width 4in >> >> This makes my images 4 inches wide in LaTeX, but it sets my images to >> approximately 4 pixels wide! >> >> I feel like it is worth modifying the regexp that gets the width to >> catch these cases and fall back on the variable value when they >> exist. Any thoughts? > > I wonder if this kludge makes any sense in the general case. As you > noticed, units given in a LaTeX attributes line will probably be > different from pixels. > > What about limiting the regexp to ATTR_HTML lines only? > > > Regards, -- ----------------------------------- John Kitchin Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu