From: "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Question on LaTeX scaling of images
Date: Thu, 05 Jan 2012 23:04:09 +0100 [thread overview]
Message-ID: <80hb09lsbq.fsf@somewhere.org> (raw)
In-Reply-To: 7403.1325792111@alphaville.americas.hpqcorp.net
Hi Nick,
Nick Dokos wrote:
> Sebastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> 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.
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 ;-)
>> > 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 :-) ).
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
--
Sebastien Vauban
next prev parent reply other threads:[~2012-01-05 22:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-04 20:57 Question on LaTeX scaling of images François Pinard
2012-01-04 21:17 ` Nick Dokos
2012-01-04 23:18 ` François Pinard
2012-01-05 0:19 ` Nick Dokos
2012-01-05 8:08 ` Sebastien Vauban
2012-01-05 19:35 ` Nick Dokos
2012-01-05 22:04 ` Sebastien Vauban [this message]
2012-01-05 23:04 ` Nick Dokos
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80hb09lsbq.fsf@somewhere.org \
--to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).