From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Question on LaTeX scaling of images Date: Thu, 05 Jan 2012 23:04:09 +0100 Message-ID: <80hb09lsbq.fsf@somewhere.org> 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> <7403.1325792111@alphaville.americas.hpqcorp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: 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-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Nick, Nick Dokos wrote: > Sebastien Vauban wrote: > >> Using this: >>=20 >> #+begin_src org >> ## +BIND: org-export-latex-image-default-option "" >> #+LaTeX_HEADER: \usepackage{calc} >>=20 >> * foo >>=20 >> This is an inline image:=3D20 >> #+LaTeX: \raisebox{-\height / 2}{\includegraphics{scomp3.png}} >> . It should not be scaled. >> #+end_src >>=20 >> produces that for me: >>=20 >> #+begin_src latex >> This is an inline image:=3D20 >> \raisebox{-\height / 2}{\includegraphics{scomp3.png}} >> . It should not be scaled. >> #+end_src >>=20 >> 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. OK; sorry. I just took the bad expression, it seems. By bad, I mean the workaround you used, not the original expression you wanted to use. I guess= it was somehow too early in the morning for me=C2=A0;-) >> > and I don't know any way to convince it to do it "right". Unless someb= ody >> > can come up with such a way, the only possibility that remains is to h= ack >> > org-latex.el. >>=20 >> You can try the dirty trick given by Carsten: adding `{}' in front of yo= ur >> environment -- as "environments are only detected if they are the first = thi=3D >> ng >> in a new line": >>=20 >> #+LaTeX: {}\raisebox{-\height / 2}{ >>=20 >> 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 :-) ). Not sure to grasp that last sentence... > 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. Did you send a patch? Or is this too fragile to be applied to the core? I really think I will need such a thing quite soon -- I've got such a problematic LaTeX construct coming up in slides I'm working on. Best regards, Seb --=20 Sebastien Vauban