From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: [ox-latex] Bad default value for image width? Date: Sun, 07 Apr 2013 22:17:04 +0200 Message-ID: <87haji85a7.fsf@pank.iue.private> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UP69U-00020A-SZ for emacs-orgmode@gnu.org; Mon, 08 Apr 2013 03:06:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UP69O-0000Br-OQ for emacs-orgmode@gnu.org; Mon, 08 Apr 2013 03:06:04 -0400 Received: from plane.gmane.org ([80.91.229.3]:49558) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UP69O-0000Bj-GD for emacs-orgmode@gnu.org; Mon, 08 Apr 2013 03:05:58 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UP68i-0005WB-KN for emacs-orgmode@gnu.org; Mon, 08 Apr 2013 09:05:16 +0200 Received: from ip-pool-133.iue.it ([192.167.90.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Apr 2013 09:05:16 +0200 Received: from rasmus by ip-pool-133.iue.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 08 Apr 2013 09:05:16 +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 Hi, I don't like that tikz figures are wrapped in a resize box. In particular this plain example is wrapped in a resize box: #+BEGIN_SRC Org * tikz test [[file:test.tikz]] #+ATTR_LATEX: :width "" [[file:test.tikz]] #+END_SRC Produces: #+BEGIN_SRC latex [...] \resizebox{.9\linewidth}{!}{\input{test.tikz}} [...] #+END_SRC Default behavior should be to not wrap it in a resize box as most tikz users will set the width appropriately in their code. The reason is the variable org-latex-image-default-width which is .9\linewidth by default. And I can't seem to set width to nothing. . . The problem is that resize box insertion depends on the following test #+BEGINS_SRC emacs-lisp (when (or (org-string-nw-p width) (org-string-nw-p height)) ...) #+END_SRC which is always true due to the default meaning that I can't escape the resize box. . . Potential resolutions: 1. change the default of org-latex-image-default-width 2. allow for a non-width (:width nil) 3. make a better test for the resize box. Let me know and I might be able to look into it. –Rasmus -- A clever person solves a problem. A wise person avoids it