emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Question on LaTeX scaling of images


From: Sebastien Vauban
Subject: Re: [O] Question on LaTeX scaling of images
Date: Thu, 05 Jan 2012 09:08:34 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (windows-nt)

Hi Nick and François,

Nick Dokos wrote:
> François Pinard <address@hidden> wrote:
>> The bottom of the image is lined up with the baseline of the text (at first
>> glance at least) in the produced PDF, while in the Emacs buffer, the center
>> 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: 
> #+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: 
> | \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: 
  #+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: 
  \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 thing
in a new line":

  #+LaTeX: {}\raisebox{-\height / 2}{

See http://comments.gmane.org/gmane.emacs.orgmode/21183.

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

[Prev in Thread] Current Thread [Next in Thread]