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 09:08:34 +0100 Message-ID: <80aa62mv0d.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> 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 and Fran=C3=A7ois, Nick Dokos wrote: > Fran=C3=A7ois Pinard wrote: >> The bottom of the image is lined up with the baseline of the text (at fi= rst >> glance at least) in the produced PDF, while in the Emacs buffer, the cen= ter >> of the image is, which looks a bit nicer. Do we have some control over >> this? > > You can do something like this: > > ## +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. > > Of course that's hardly a satisfactory state of affairs. The obvious > way of doing it however does not work: > > ,---- > | #+LaTeX: \raisebox{-\height / 2}{ > | [[./scomp3.png]] > | #+LaTeX: } > `---- > > The latex exporter mangles it to: > > ,---- > | This is an inline image:=20 > | \raisebox{-\height / 2}{% > | [[./scomp3.png][./scomp3.png]] > | }% > | . It should not be scaled. > `---- 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. > 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. Best regards, Seb --=20 Sebastien Vauban