emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Including SVG images in html document
@ 2012-03-15 12:55 Vladimir Lomov
  2012-03-15 14:58 ` Nick Dokos
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Lomov @ 2012-03-15 12:55 UTC (permalink / raw)
  To: emacs-orgmode

Hello,
according to org mode documentation it is possible to include SVG images
while exporting to Docbook, but is it possible to use them in html
export too?

Small example:

#+TITLE: Export to HTML with SVG image
#+AUTHOR: Vladimir Lomov

* SVG image in HTML document

#+name: gnuplot-img1
#+begin_src gnuplot :exports both
set term svg
set output "gnuplot-img1.svg"
plot [-pi:pi] sin(x)
#+end_src

The graph of \sin(x) function in range [-\pi;\pi]
[[file:gnuplot-img1.svg]]

---
WBR, Vladimir Lomov

-- 
No one can feel as helpless as the owner of a sick goldfish.

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

* Re: Including SVG images in html document
  2012-03-15 12:55 Including SVG images in html document Vladimir Lomov
@ 2012-03-15 14:58 ` Nick Dokos
  2012-03-15 15:06   ` Nick Dokos
  0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2012-03-15 14:58 UTC (permalink / raw)
  To: Vladimir Lomov; +Cc: nicholas.dokos, emacs-orgmode

Vladimir Lomov <lomov.vl@gmail.com> wrote:

> Hello,
> according to org mode documentation it is possible to include SVG images
> while exporting to Docbook, but is it possible to use them in html
> export too?
> 
> Small example:
> 
> #+TITLE: Export to HTML with SVG image
> #+AUTHOR: Vladimir Lomov
> 
> * SVG image in HTML document
> 
> #+name: gnuplot-img1
> #+begin_src gnuplot :exports both
> set term svg
> set output "gnuplot-img1.svg"
> plot [-pi:pi] sin(x)
> #+end_src
> 
> The graph of \sin(x) function in range [-\pi;\pi]
> [[file:gnuplot-img1.svg]]
> 

It works if you add a :session *G* header argument to the code block -
without it, I get a blank image.  I'm not sure what the rules are, so I
can't say whether it should work without :session.

Nick

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

* Re: Including SVG images in html document
  2012-03-15 14:58 ` Nick Dokos
@ 2012-03-15 15:06   ` Nick Dokos
  0 siblings, 0 replies; 3+ messages in thread
From: Nick Dokos @ 2012-03-15 15:06 UTC (permalink / raw)
  To: Vladimir Lomov, emacs-orgmode; +Cc: nicholas.dokos

Nick Dokos <nicholas.dokos@hp.com> wrote:

> Vladimir Lomov <lomov.vl@gmail.com> wrote:
> 
> > Hello,
> > according to org mode documentation it is possible to include SVG images
> > while exporting to Docbook, but is it possible to use them in html
> > export too?
> > 
> > Small example:
> > 
> > #+TITLE: Export to HTML with SVG image
> > #+AUTHOR: Vladimir Lomov
> > 
> > * SVG image in HTML document
> > 
> > #+name: gnuplot-img1
> > #+begin_src gnuplot :exports both
> > set term svg
> > set output "gnuplot-img1.svg"
> > plot [-pi:pi] sin(x)
> > #+end_src
> > 
> > The graph of \sin(x) function in range [-\pi;\pi]
> > [[file:gnuplot-img1.svg]]
> > 
> 
> It works if you add a :session *G* header argument to the code block -
> without it, I get a blank image.  I'm not sure what the rules are, so I
> can't say whether it should work without :session.
> 

No, that's wrong: it seems to produce a blank image the first time that
the block is executed, but it works if it is executed a second time
(with or without :session). Not sure why.

Nick

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

end of thread, other threads:[~2012-03-15 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-15 12:55 Including SVG images in html document Vladimir Lomov
2012-03-15 14:58 ` Nick Dokos
2012-03-15 15:06   ` Nick Dokos

Code repositories for project(s) associated with this 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).