Getting highlighted clojure code into a presentation

228 views
Skip to first unread message

Korny Sietsma

unread,
May 17, 2013, 11:42:55 PM5/17/13
to clo...@googlegroups.com
Hi folks - I had to prepare some slides for a conference, and I struggled to get nice looking clojure code onto a slide.  I eventually arrived at the following, but it's awfully clunky:

* write code in emacs
* turn off rainbow delimiters as html-fontify doesn't like them
* M-x load-theme whiteboard  (for high contrast)
* M-x htmlfontify-buffer (and save)
* M-x browse-url-of-file (loads in Chrome)
* load same url in Safari as for some reason cut-and-paste from Chrome to Powerpoint is broken
* copy code from Chrome
* paste-special into PowerPoint, as "styled text"

Yes, I know I can just take a screenshot, but that gives you a bitmap that doesn't scale nicely or give you any ability to do last minute editing.  But the above gets tedious very fast - I wonder if there's a better option I've missed?

- Korny

--
Kornelis Sietsma  korny at my surname dot com http://korny.info
.fnord { display: none !important; }

Phil Hagelberg

unread,
May 18, 2013, 12:34:22 AM5/18/13
to clo...@googlegroups.com

I just present from within Emacs itself usually. But when fancier visuals are required I'll present from a browser with HTML produced by htmlize.el. Using a program that doesn't let you store the slide source as plain text (for version control) sounds like a bad idea.

Phil

atkaaz

unread,
May 18, 2013, 1:31:44 AM5/18/13
to clo...@googlegroups.com
I feel silly for even suggesting but is pprint not good enough? do you need colors? (unaware of what those do in emacs)


--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Stuart Sierra

unread,
May 18, 2013, 3:15:58 AM5/18/13
to clo...@googlegroups.com
I wrote my own tool (in ClojureScript) to present Emacs org-mode's HTML export as slides. It's pretty clunky too, but works for code-heavy presentations.

https://github.com/relevance/org-html-slideshow

-S

Korny Sietsma

unread,
May 18, 2013, 3:25:58 AM5/18/13
to clo...@googlegroups.com
If I didn't want colours, I could just cut and paste the text :)  But on a big screen, to a not-necessarily-clojure-literate audience, colours help comprehension.

As for presenting in emacs or another plain-text format - I'd agree for mostly-technical presentations with lots of text.

This was less technical, and involved lots of pictures and diagrams, in which case a gui environment makes life much easier.

Thanks Phil for htmlize.el - not sure how I missed that, it's much like htmlfontify, but handles rainbow parens which is nice.

- Korny

Karsten Schmidt

unread,
May 18, 2013, 7:33:24 AM5/18/13
to clo...@googlegroups.com
Btw. Has anyone managed to run htmlize or htmlfontify with rainbow
delimiters enabled? Both throw errors like this for me (but I really
would like to export w/ rainbow brackets):

Wrong type argument: symbolp, "rainbow-delimiters-depth-1-face"

Thanks, K.

Stefan Kamphausen

unread,
May 18, 2013, 1:19:11 PM5/18/13
to clo...@googlegroups.com
Besides the obvious org-mode which exports with colors to HTML when you use "#+BEGIN_SRC clojure ... #+END_SRC" I also had some fun presenting with marginalia or impress.js, both using Alex Gorbatchev's Syntax Highlighter. (FWIW)

John Gabriele

unread,
May 18, 2013, 10:17:57 PM5/18/13
to clo...@googlegroups.com
On Friday, May 17, 2013 11:42:55 PM UTC-4, Korny wrote:

Yes, I know I can just take a screenshot, but that gives you a bitmap that doesn't scale nicely or give you any ability to do last minute editing.  But the above gets tedious very fast - I wonder if there's a better option I've missed?


Try [Pandoc](http://johnmacfarlane.net/pandoc/). It can do syntax highlighting for Clojure, and also supports various output formats for creating slides (though, I haven't used those).

-- John

Reply all
Reply to author
Forward
0 new messages