--- author: '' category: '' date: 2012/12/04 22:21:00 description: '' link: '' priority: '' slug: new-rst2pdf-feature-strip-elements-with-class tags: python, rst2pdf title: 'New rst2pdf feature: --strip-elements-with-class' type: text updated: 2012/12/04 22:21:00 url_type: '' --- 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.