From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Question on LaTeX scaling of images Date: Thu, 05 Jan 2012 14:35:11 -0500 Message-ID: <7403.1325792111@alphaville.americas.hpqcorp.net> References: <877h17rxsw.fsf@iro.umontreal.ca> <13826.1325711872@alphaville.americas.hpqcorp.net> <8739bvrr8h.fsf@iro.umontreal.ca> <21185.1325722786@alphaville.americas.hpqcorp.net> <80aa62mv0d.fsf@somewhere.org> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rit61-0005YX-JN for emacs-orgmode@gnu.org; Thu, 05 Jan 2012 14:35:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rit5x-0007l0-3F for emacs-orgmode@gnu.org; Thu, 05 Jan 2012 14:35:29 -0500 Received: from g1t0026.austin.hp.com ([15.216.28.33]:46552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rit5w-0007jA-QL for emacs-orgmode@gnu.org; Thu, 05 Jan 2012 14:35:25 -0500 In-Reply-To: Message from "Sebastien Vauban" of "Thu, 05 Jan 2012 09:08:34 +0100." <80aa62mv0d.fsf@somewhere.org> 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: Sebastien Vauban Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Sebastien Vauban wrote: > Using this: > > #+begin_src org > ## +BIND: org-export-latex-image-default-option "" > #+LaTeX_HEADER: \usepackage{calc} > > * foo > > This is an inline image:=20 > #+LaTeX: \raisebox{-\height / 2}{\includegraphics{scomp3.png}} > . It should not be scaled. > #+end_src > > produces that for me: > > #+begin_src latex > This is an inline image:=20 > \raisebox{-\height / 2}{\includegraphics{scomp3.png}} > . It should not be scaled. > #+end_src > > So, it worked out-of-the-box. > The problem is not that it does not work: of course it does. The problem is that it is too closely tied to latex - forget about exporting it to HTML or any other format. > > and I don't know any way to convince it to do it "right". Unless somebody > > can come up with such a way, the only possibility that remains is to hack > > org-latex.el. > > You can try the dirty trick given by Carsten: adding `{}' in front of your > environment -- as "environments are only detected if they are the first thi= > ng > in a new line": > > #+LaTeX: {}\raisebox{-\height / 2}{ > > See http://comments.gmane.org/gmane.emacs.orgmode/21183. > Thanks for the pointer - I'll have to try to remember this for future reference (but we all know how that will work out for me :-) ). However, in this case, the problem is not the recognition of the environment: the latex exporter seems to mangle the link that follows. So far, the only thing that has worked is actually hacking org-latex to insinuate the \raisebox in the proper place. Thanks, Nick