5 Dec 2012 ralsina   » (Master)

New rst2pdf feature: --strip-elements-with-class

First new feature in rst2pdf in a long long time, but it was easy to do, and there was an actual user needing it.

This exposes functionality rst2html already had, so that's probably why it was easy to do ;-)

In any case, what is it and what is it good for?

If you mark something with a class, you can now omit it from the output:

.. class:: ignored

This will not be in the output if you use --strip-elements-with-class=ignored

And it's useful, for example, so you can keep slides and presentation notes in the same file. You just put your notes in a class you strip when producing the slides.

Since some classes are automatically assigned for admonitions, this is extra simple:

.. note:: This is a note admonition.

   Note admonitions always have the note class. So you can strip them easily.

And if you don't strip them, they will look pretty.

Syndicated 2012-12-04 22:21:00 from Lateral Opinion

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!