emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Why does export of images to LaTeX requires either org-special-blocks or org-jsinfo?
@ 2012-11-21  8:41 Francesco Pizzolante
  2012-11-21 13:40 ` Suvayu Ali
  0 siblings, 1 reply; 5+ messages in thread
From: Francesco Pizzolante @ 2012-11-21  8:41 UTC (permalink / raw)
  To: mailing-list-org-mode

Hi,

I have noticed that the correct export of images in LaTeX requires one of
these 2 packages: org-special-blocks or org-jsinfo.

While I cannot see any relation between these packages and the export of
images in LaTeX, if none of these 2 packages is loaded then images are
exported as \href instead of \includegraphics, in other words, as links
instead of images.

Here's the code I used to check this:

    ╭────
    │ (setq org-modules nil)
    │ ;;(require 'org-special-blocks)
    │ ;;(require 'org-jsinfo)
    ╰────

Please let me know if you have any explanation to this behaviour.

Thanks a lot.

Regards,
 Francesco

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why does export of images to LaTeX requires either org-special-blocks or org-jsinfo?
  2012-11-21  8:41 Why does export of images to LaTeX requires either org-special-blocks or org-jsinfo? Francesco Pizzolante
@ 2012-11-21 13:40 ` Suvayu Ali
       [not found]   ` <20121121134034.GA31515-nvtJ+N3H+Ig9gPbrd+1kzlEPDqVayaqo@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Suvayu Ali @ 2012-11-21 13:40 UTC (permalink / raw)
  To: emacs-orgmode

On Wed, Nov 21, 2012 at 09:41:39AM +0100, Francesco Pizzolante wrote:
> Hi,
> 
> I have noticed that the correct export of images in LaTeX requires one of
> these 2 packages: org-special-blocks or org-jsinfo.
> 
> While I cannot see any relation between these packages and the export of
> images in LaTeX, if none of these 2 packages is loaded then images are
> exported as \href instead of \includegraphics, in other words, as links
> instead of images.
> 
> Here's the code I used to check this:
> 
>     ╭────
>     │ (setq org-modules nil)
>     │ ;;(require 'org-special-blocks)
>     │ ;;(require 'org-jsinfo)
>     ╰────
> 
> Please let me know if you have any explanation to this behaviour.
> 

Those modules are optional.  How do you write your links in the org
file?  To be included in LaTeX export with includegraphics, the
description part of the link should be empty.  e.g.

  [[/path/to/image]]

This creates an inline image in the final pdf.  You can add a caption by
adding a caption line like this:

  #+CAPTION: Some caption

If you add a caption, then the image is enclosed in a floating
environment (figure in this case).

For details see the manual: (info "(org) Images in LaTeX export")

HTH

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why does export of images to LaTeX requires either org-special-blocks or org-jsinfo?
       [not found]   ` <20121121134034.GA31515-nvtJ+N3H+Ig9gPbrd+1kzlEPDqVayaqo@public.gmane.org>
@ 2012-11-21 14:37     ` Francesco Pizzolante
  2012-11-21 15:16       ` Achim Gratz
  0 siblings, 1 reply; 5+ messages in thread
From: Francesco Pizzolante @ 2012-11-21 14:37 UTC (permalink / raw)
  To: Suvayu Ali; +Cc: emacs-orgmode-mXXj517/zsQ

Hi Suvayu,

> Those modules are optional.  How do you write your links in the org
> file?  To be included in LaTeX export with includegraphics, the
> description part of the link should be empty.  e.g.
>
>   [[/path/to/image]]
>
> This creates an inline image in the final pdf.

That's exactly what I do and it works perfectly until you do this (trying to
load as few modules as possible):

    ╭────
    │ (setq org-modules nil)
    ╰────

Then, you'll see that images will be exported as links instead of images
(\href instead of \includegraphics).

What I don't understand is that you fix the issue by loading either
org-special-blocks or org-jsinfo (uncommenting one of these 2 lines):

    ╭────
    │ (require 'org-special-blocks)
    │ ;;(require 'org-jsinfo)
    ╰────

Thus, it seems like these packages are not optional (or, at least, of the 2)
to get the correct export of inline images to LaTeX.

Any idea why this behavior?

Regards,
 Francesco

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why does export of images to LaTeX requires either org-special-blocks or org-jsinfo?
  2012-11-21 14:37     ` Francesco Pizzolante
@ 2012-11-21 15:16       ` Achim Gratz
       [not found]         ` <87pq37c7gp.fsf-9O0xPIFIXLULmYpASZe/Uw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Achim Gratz @ 2012-11-21 15:16 UTC (permalink / raw)
  To: emacs-orgmode

Francesco Pizzolante writes:
> That's exactly what I do and it works perfectly until you do this (trying to
> load as few modules as possible):
>
>     ╭────
>     │ (setq org-modules nil)
>     ╰────

Then don't do that…

> Then, you'll see that images will be exported as links instead of images
> (\href instead of \includegraphics).
>
> What I don't understand is that you fix the issue by loading either
> org-special-blocks or org-jsinfo (uncommenting one of these 2 lines):
>
>     ╭────
>     │ (require 'org-special-blocks)
>     │ ;;(require 'org-jsinfo)
>     ╰────
>
> Thus, it seems like these packages are not optional (or, at least, of the 2)
> to get the correct export of inline images to LaTeX.
>
> Any idea why this behavior?

Both of these will load org-html, either directly or indirectly.  With
that the default definition for org-export-html-inline-images comes into
existence, which despite the name is also used for other exporters.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Why does export of images to LaTeX requires either org-special-blocks or org-jsinfo?
       [not found]         ` <87pq37c7gp.fsf-9O0xPIFIXLULmYpASZe/Uw@public.gmane.org>
@ 2012-11-21 16:04           ` Francesco Pizzolante
  0 siblings, 0 replies; 5+ messages in thread
From: Francesco Pizzolante @ 2012-11-21 16:04 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-orgmode-mXXj517/zsQ

Hi Achim,

> Both of these will load org-html, either directly or indirectly.  With
> that the default definition for org-export-html-inline-images comes into
> existence, which despite the name is also used for other exporters.

Thanks a lot for the explanation.

Is there a plan to make this variable independent of the html backend?

Regards,
 Francesco

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-21 16:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-21  8:41 Why does export of images to LaTeX requires either org-special-blocks or org-jsinfo? Francesco Pizzolante
2012-11-21 13:40 ` Suvayu Ali
     [not found]   ` <20121121134034.GA31515-nvtJ+N3H+Ig9gPbrd+1kzlEPDqVayaqo@public.gmane.org>
2012-11-21 14:37     ` Francesco Pizzolante
2012-11-21 15:16       ` Achim Gratz
     [not found]         ` <87pq37c7gp.fsf-9O0xPIFIXLULmYpASZe/Uw@public.gmane.org>
2012-11-21 16:04           ` Francesco Pizzolante

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).