From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [ox-latex] Bad default value for image width? Date: Wed, 10 Apr 2013 13:52:08 +0200 Message-ID: <87y5cqiown.fsf@pank.iue.private> References: <87haji85a7.fsf@pank.iue.private> <8761zv9xd0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPtZa-0004UR-9J for emacs-orgmode@gnu.org; Wed, 10 Apr 2013 07:52:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPtZW-0006Wg-RO for emacs-orgmode@gnu.org; Wed, 10 Apr 2013 07:52:18 -0400 Received: from mout.gmx.net ([212.227.17.22]:64576) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPtZW-0006Vt-Hh for emacs-orgmode@gnu.org; Wed, 10 Apr 2013 07:52:14 -0400 Received: from mailout-eu.gmx.com ([10.1.101.213]) by mrigmx.server.lan (mrigmx002) with ESMTP (Nemesis) id 0MKwSE-1UPtZT2aUy-000357 for ; Wed, 10 Apr 2013 13:52:11 +0200 In-Reply-To: <8761zv9xd0.fsf@gmail.com> (Nicolas Goaziou's message of "Wed, 10 Apr 2013 00:02:03 +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: n.goaziou@gmail.com Cc: emacs-orgmode@gnu.org Nicolas, >> I don't like that tikz figures are wrapped in a resize box.=20=20 > > Set `org-latex-image-default-width' to "". But as my second email shows this still doesn't work with captions. . . This exmample: #+BEGIN_SRC org #+BEGIN_SRC emacs-lisp (make-local-variable 'org-latex-image-default-width) (setq org-latex-image-default-width "") #+END_SRC #+NAME:firm-ts-fig #+CAPTION: test [[file:figs/test.tikz]] no caption [[file:figs/test.tikz]] #+END_SRC > That's not correct. It is always true because (:width "") means width > becomes "\"\"", not "". IOW, `org-export-read-attribute' is unable to > parse a real empty string. I see.=20 > This wouldn't help to solve the general problem. Though, you can change > it in your config to something else, as suggested above. I have. But I don't think it's a sensible default. It's against what your usual stand of Org not trying to be too clever. You would also not put tables in resize boxes to make them "fit" on the page. Here's another example where the default causes a non-sensible behavior. #+BEGIN_SRC org #+BEGIN_SRC emacs-lisp :exports none (url-copy-file "http://orgmode.org/img/org-mode-unicorn-logo.png" "logo.png= ") #+END_SRC * My raster picture This is a low res. picture with the right size^{TM} [[file:logo.png]] #+END_SRC >> 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. > I think the correct solution would be to fix `org-export-read-attribute' > so it can read empty strings. I think this is the solution to a general problem. But I still find the default width to be wrong. It only works as intended when I have a slightly too large picture. And then, if anything, I'd want full page width.=20=20 It's a bad default for - Picture smaller than textwidth - Picture crafted to the document which shouldn't have a width. It's a decent solution for=20 - pictures which are unintentionally larger than textwidth. But IMO it's my responsibility, and not Org's, to fix these images/situations. In usually exhibit good judgment of these matters, so I'll take your word for it. But I fail to see its usefulness as a default. > If "" is really read as "", """" will still be read as "\"\"\"\"", and > it will not be possible to obtain "\"\"". Fine with me.=20 > Another possibility is to read the empty string as the empty string > instead of nil, that is > > #+attr_latex: :prop1 :prop2 1 I like the "" better. It works better with my "intuitive logic". =E2=80=93Rasmus --=20 Hvor meget poesi tror De kommer ud af et glas isvand?