Your Style ? Stylish presentations without Powerpoint or Keynote

11 11 2011

For the last few days I’ve been investigating possibilities to create presentations that will output a mixture of HTML / CSS / JS and are created by either using plain HTML or some kind of markup language. The general idea behind this approach is that for 90% of the presentation you create you will follow a simple set of styles and you will not need some special visualizations.

What is most interesting for me is to use my standard work environment, like my editor of choice and leave the styling to a predefined set of markups, probably following some corporate identity guidelines.

Long story short, I’m disappointed with what I’ve seen. Basically there are two reasons why everything I looked at falls short of my requirements:

  • PDF generation – I want to generate a PDF of my slides that I can easily distribute (static HTML does not do the trick, publishing slides to Heruko or Github neither)
  • Templates – I have no idea why non of the tools I looked at provides simple support for templates. Is CI something that was lost in the whirlwinds of Web 2.0? And by templates I mean more than putting a logo at the bottom right.

And here are the tools I observed with their shortcomings:

  • Showoff – Markdown for the slides is perfect, templating impossible and PDF generation fails for images defined by CSS backgrounds ( I might have a patch for that)
  • Deck.js – HTML is just to noisy to work on slides, print markup does not look like the original slide
  • Slippy – HTML is to noisy
  • LaTeX Beamer – LaTeX as markup is fine for me, PDF output is perfect, templating is a pain in the …

In general the markup based solutions are very easy to setup and use, but typically fall short to allow fine-grained customization of the layout. The simplest example is that there is typically no way to place the slide title and the slide body separately.

As a result it looks like I’m back to Powerpoint.


Easy parsing of sysfs to get CPU topology data using libsystopo

20 01 2011

When you are working with main memory it is crucial to make sure that all the data structures are correctly sized and aligned. A typical approach is to create blocks of data that are processed independently. For the developer, the question is how large such blocks should be? The answer is that those blocks should always be either cache sized.

Now, how large is the cache on the system you are using? Either you can go for experiments detecting the different cache levels and the cache line sizes, or if you are happy to have a Intel Linux system at hand, to simply explore the information as it is stored in the sysfs filesystem exported by the Kernel.

However, parsing this information at development time might be ok, at run-time the best way is to adjust the system settings based on the actual configuration. At the moment, libudev does not support to read the information, so your off to yourself.

To avoid that everybody writes the same code I took some time to write a small library that reads the information about the CPU caches and the CPU topology and allows to easily process this information in your program. You can find the most current version of the code as usual at Github.

#include <systopo.h>
using namespace systopo;

int main(void)
    System s = getSystemTopology();
    return 0;

The System definition parses all data from sysfs and can be reviewed here:

    struct Cache
        size_t coherency_line_size;
        size_t level;
        size_t number_of_sets;
        size_t physical_line_partition;
        size_t size;
        size_t ways_of_associativity;
        std::string type;

    struct Topology
        size_t core_id;
        size_t physical_package_id;
        std::vector<size_t> core_siblings;
        std::vector<size_t> thread_siblings;
    struct CPU
        std::vector<Cache> caches;
        Topology topology;

    struct System
        std::vector<CPU> cpus;
        std::vector<size_t> online_cpus;
        std::vector<size_t> offline_cpus;

For more information about the meaning of the Topology please refer to the Kernel documentation. The meaning for the CPU cache fields should be clear or refer to “What every programmer should know about memory”.

If you have feedback, comments or ideas, I’m glad to respond!

– Martin

Emacs DBLP Mode for better Papers in LaTeX

25 10 2010

Do you remember the last time you were writing a paper and you knew that you reached the perfect point for a citation. You knew the author or the paper but you did not want to lookup the BibTeX entry or even create it? So you started to use rDBLP, but now you have to lookup the citation key every time again and again. Since your BibTeX file is now build after the paper was compiled the first time, there is no chance to use common BibTeX management tools.

As a consequence from this problem I wrote a small minor mode for Emacs that allows to search the DBLP database directly from Emacs and insert the correct citation key.

To install this minor mode follow these steps:

  1. Go to your local site lisp directory – e.g. ~/.emacs.d/elisp
  2. git clone
  3. and now add the following lines to your Emacs configuration to activate the minor mode as soon as you enter LaTeX mode
;; DBLP mode
(add-to-list 'load-path "~/.emacs.d/elisp/dblp.el")
(require 'dblp)
(add-hook 'LaTeX-mode-hook 'dblp-mode)

If you want to use the querying hit “C-M-c” if the DBLP mode is activated and this will start an interactive mode to query DBLP.

Currently the minor mode requires Ruby to be available on the platform. I plan to port the parser and querying to Lisp but currently it’s easier for me to write it in Ruby. Do you have any comments or questions, please leave me a message in the comments.


rDBLP version 0.4.5 released

11 10 2010

DBLP version 0.4.5 is more or less a maintenance release. It fixes several connection problems and as an improvement removes the cross-reference from the BibTeX entry. The book title in the main entry is now replaced by the title of the cross-reference. This should be more convenient with regards to the limited space in a research paper.

To update your gem execute

sudo gem install dblp

For more detail see my original post.


Emacs Movement Shortcuts Wallpaper

9 10 2010

Stumbling across the Vim Movements Shortcuts Wallpaper, I decided to make one for Emacs. Basically I really like the idea of having a real quick reference to the most important shortcuts on your desktop.

Emacs Wallpaper

If you have any additional shortcuts that you would love to have, please leave a comment. If you want to modify the wallpaper, I uploaded the original PDF version of the wallpaper that you can easily modify with any tool of your choice.


[slimtimercli] Version 0.1.8 published

5 02 2010

It’s been while since I worked on slimtimercli but today I received a pull request via Github telling me that evaryont polished the gem and updated it and fixed some bugs. I took a few minutes to make slimtimercli use gemcutter and published it again — with version 0.1.8.

I love open source software!

– Martin

Be kind? Re-Kind! – Easy Reformatting of Scientific Papers

31 01 2010

The first time I held a Kindle in my hands I thought, this might be a game changer – at least until you start reading scientific papers which have a two column layout. Which is great for printed media, but as soon as you want to read it using a device zooming won’t help. Thanks to a hint of Christian I found this blog entry from Steven Wittens presenting the idea of cutting a two-column PDF page into 4 pieces. The complete program was written in Python and a no-brainer to execute – if you love the command line as I do. Unfortunately lot’s of my colleagues don’t and were wishing for a nice UI to easily drag and drop files to rework.

Based on the idea of Steven I rewrote the code and added the possibility to have multiple configurations (as how many columns you are splitting and how many vertical splits you want to make) and put it together using Titanium application. The result is a neat desktop app that presents a simple UI for the task.

To select files that you want to split just drag and drop them in the dropbox and click on process as soon as you are finished. The output files will be in the same directory as the input files but with a rekind appended to the filename.

To download the applicaton for Mac or Linux go to its Titanium application page, the complete source for the Titanium project and is available on Github using the MIT license.

As usual I’m glad for any feedback and feature requests.