Firefox slide show with embedded SVG

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Firefox slide show with embedded SVG

Jonathan Baron
Now that T. Jake Luciani has created a working RSvgDevice package
(with one function called devSVG), we can produce SVG output from
ordinary plots, not necessarily just those made with grid.

Since Firefox and Mozilla support SVG (in recent versions), this
might be a good way to put figures in web pages in a way that can
be easily scaled, and even (with tweaking) manipulated with
scripts.  (Note that gridSVG can also help here, although I
haven't tried it.)

I have now (finally) figured out how to get SVG into a slide
show.  I use Firefox for talks (and lectures).  I remove the
sidebar and all toolbars, and move the location window into the
one remaining bar, the one with "File" etc.  (I like this
anyway.)  Then I use F11 to toggle fullscreen.  The usual keys go
from slide to slide (PgUp, PgDn).  There is an associated css
file that is required for this to work.

An example, with only one SVG image in it (in slide #12), is in
the notes for a couple of lectures I plan to start this week:

Unfortunately, this one does not take advantage of the
possibility of using units other than px, because I know it works
on the classroom projector.  It was also not made with R.  Oh
well.  It does show how to embed the image.

The main trick here is to use xml, which requires very strict
coding: no upper case tags; all tags closed; etc.  (See the
example for how to do this.)  Firefox turns out to be great at
reporting xml errors, so this was not very frustrating to do.

Jonathan Baron, Professor of Psychology, University of Pennsylvania
Home page:

[hidden email] mailing list
PLEASE do read the posting guide!