Giter Club home page Giter Club logo

htmltalk's Introduction

An HTML5 Astrophysics Talk

I recently had my last straw dealing with LibreOffice and decided to try to take the plunge and make a scientific presentation using HTML5 and JavaScript. I was very happy with how things went, so I thought I'd share how I did it. Of course you can check out the talk on a live website.

The actual talk was a colloquium at Bucknell University, aimed primarily at physics undergraduates with a 45-minute run time. It was given on September 19, 2013.

The basic rundown

The presentation is built on a great little framework called reveal.js. It worked out really well for my needs. It’s on Github too.

What are some of the key features that make this viable for scientific talks, at least the kind that I give?

  • Easy support for embedded math using MathJax
  • Good support for PDF plots using pdf.js
  • A nice “presenter console” mode built into reveal.js.
  • Support for exporting as a PDF (just in case …) also built into reveal.js.

What are the advantages?

  • Much faster to edit presentation, reorder slides, etc: all done in text. This may not sound super significant, but all I can say is that compared to Impress, for me the experience was vastly more pleasant.
  • I’m very happy with the look of the talk. The typography is much better than what I could ever bother to achieve with LibreOffice.
  • Possibly more portable across machines than some aspects of PowerPoint-type presentations.
  • I feel much more confident in doing video and fancy effects in a web browser than LibreOffice.
  • Possibility to build in truly fancy effects with interactive JavaScript doodads. To be investigated in the future …
  • Development of the presentation can be tracked in a version control system such as Git.

What are the disadvantages?

  • Layout and styling using HTML and CSS are difficult and annoying for normal people. The Firefox inspector tools helped greatly. Really, only a few tricks are necessary for standard slide layouts, but I suspect that this will be a dealbreaker for folks without web experience.
  • You need to be careful about not relying on network resources for your slide content … unless you’re sure that the computer using your talk will always have a good Internet connection.
  • Media assets may need format conversion. I had to transcode my videos to WebM format, and even though pdf.js works well, I ended up converting my PDFs to SVG since they render more easily.
  • You need to remake all of your existing slides, of course.

What are the novel aspects of this particular presentation?

  • Customized theme that I think is pretty nice. (But I would, wouldn’t I?)
  • Small reveal.js plugin to interface with pdf.js easily.
  • Small reveal.js plugin to autostart a movie when its slide is shown.
  • Hacked reveal.js MathJax plugin to size things more nicely (not generically useful, probably).
  • iframe example to show embedding of a website in the presentation.
  • Use of Git submodules to include JS libraries.
  • Downloaded copies of Google Web Fonts to avoid needing web access while presenting.

What tools were helpful for making this presentation?

  • Git for version control.
  • Good knowledge of Emacs for efficient HTML editing.
  • Keyboard compose key and Greek layout for fast entry of non-ASCII symbols.
  • Significant background information plus Firefox web developer tools and reference information for getting the various HTML and CSS things to work.
  • pdftocairo for converting PDFs to SVGs.
  • Transmaggedon for transcoding videos to WebM.
  • PiTiVi for mild editing of YouTube videos.
  • My setup for extracting figures from PDFs, as PDFs, on Linux.

“Should I try using this, or stick with LibreOffice Impress / PowerPoint / Keynote?”

  • After reading all of the above, you probably can tell what the right answer is for you. All I can say is that if you hate Impress, HTML might be an easier and nicer option than you might think. I was extremely happy with how easy it was to put together an attractive set of slides that looked the way I wanted … but I have a ton of background knowledge that made that process easier for me than it will be for most people.

Testing a local copy

To test out the slides on your local machine:

  1. Clone this repository.
  2. Enter the directory and fetch the dependent libraries with git submodule update --init.
  3. Download and unpack what I call the “assets”, the various large graphics and video files. Here’s a zipfile of the assets (113 MB).
  4. Finally, firefox ./slides.html.

I tested this only on Firefox, though you need to use Chrome for PDF export (see below). I’m not to keen to get into browser compatibility testing, so I hope it works for you, but no guarantees.

Exporting the presentation in PDF

This is a bit of a hassle but is possible. Huzzah! See also the instructions provided with reveal.js.

  1. Open the presentation in Google Chrome, launching Chrome with the flag --allow-file-access-from-files.
  2. Edit the URL to end with the query ?print-pdf.
  3. Print with Ctrl-P as usual. Various options may need to be set:
  • Destination to Save as PDF
  • Layout to Landscape
  • Margins to None
  • Background colors and images option enabled
  1. Save it.

Bare-bones template

The skeleton branch removes a few nonessential files and content specific to this talk, leaving a bare-bones template upon which new talks can be built.

htmltalk's People

Contributors

pkgw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.