schacon / showoff

moved to puppetlabs/showoff!
2.41k stars 13 forks source link

Making markdown engine configurable per slideshow #152

Closed grundprinzip closed 12 years ago

grundprinzip commented 13 years ago

Sometimes I need to put math on my slides and this was pretty much a showstopper for showoff for me, but then I discovered Marukus math mode (via Jekyll). Since the markdown engine is now selected via tilt, I added a feature that allows choosing the markdown engine per slideshow (with redcarpet as default).

As a result you can write something like this in your showoff.json

    { 
        /*other config*/
        "markdown" : "maruku",
        "maruku" : {
            "use_tex" : true
        }
    }

And this will render the math formulas using blahtex as images and put them on your slides.

Documentation + Tests included.

goncalossilva commented 13 years ago

Out of curiosity, what happens if I omit "use_text": true?

The documentation makes it seem like that option is mandatory. If it is, I think we should specify it by default.

grundprinzip commented 13 years ago

if you omit use_tex it will only use the default of maruku without the special latex features.

grundprinzip commented 13 years ago

To avoid trouble, the settings will per default load the value with false.