From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: bug in new exporter Date: Mon, 03 Jun 2013 22:23:36 +0200 Message-ID: <874ndf7xkn.fsf@pank.eu> References: <87d2s388l2.fsf@pank.eu> <87ip1vjdlg.fsf@pierrot.dokosmarshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjbII-0004Ie-L3 for emacs-orgmode@gnu.org; Mon, 03 Jun 2013 16:24:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UjbIE-0000cr-2B for emacs-orgmode@gnu.org; Mon, 03 Jun 2013 16:23:54 -0400 Received: from plane.gmane.org ([80.91.229.3]:42504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UjbID-0000c2-SA for emacs-orgmode@gnu.org; Mon, 03 Jun 2013 16:23:50 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UjbIC-0007kK-74 for emacs-orgmode@gnu.org; Mon, 03 Jun 2013 22:23:48 +0200 Received: from dynamic-adsl-94-34-191-111.clienti.tiscali.it ([94.34.191.111]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Jun 2013 22:23:48 +0200 Received: from rasmus by dynamic-adsl-94-34-191-111.clienti.tiscali.it with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Jun 2013 22:23:48 +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 >>> When I include the following in my org file >>> >>> #+attr_latex: scale=1.5, placement =[htb!] >>> [[file:img/figure2.eps]] >> >> The syntax changes. Something like this might give you what you want. >> >> #+ATTR_LATEX: :placement [htb!] :options scale=1.5 >> #+CAPTION: a float needs a caption >> [[file:fig.pdf]] >> > > One thing that I couldn't figure out is how to get rid of the width > specification altogether. It's a feature. We had a lengthy discussion about it a while ago (myself, Nicholas and Aaron, I believe) You can turn it permanently off by issuing (setq org-latex-image-default-width nil) I tested the code in my "own" Emacs and not emacs -q. To get no width I do #+NAME: name #+ATTR_LATEX: :placement [htb!] :options scale=1.5 :width "" #+CAPTION: a float needs a caption [[file:signature.pdf]] becomes: \begin{figure}[htb!] \centering \includegraphics[scale=1.5]{signature.pdf} \caption{\label{name}a float needs a caption} \end{figure} Org-mode version 8.0.3 (release_8.0.3-183-gca9937 @ /usr/share/emacs/site-lisp/org/). > I also tried > > :width "" > > which fails with a This should work, though, also given the earlier discussion. At least it does for me using the version above and emacs -q. >> From the source code, ox-latex.el, you should be able to get it to >> accept placement without square brackets. > > I don't understand: what do you mean? AFAICT, you *have* to say > > :placement [htb!] > > *including* the square brackets, because the first clause of the cond > triggers and that does not include the square brackets: > OTOH, here you don't want to include the square brackets because the > format *does* add them. That seems to be a slight inconsistency. Right; thanks I missed that. Thanks! This is inconsistent. It also seems wrapfig needs {} tho I've never used it. Perhaps it could be made more consistent? At least the variable and the local arguments should be similar. . . –Rasmus -- Need more coffee. . .