Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about rst2pdf (old posts, page 12)

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

First new fea­ture in rst2pdf in a long long time, but it was easy to do, and there was an ac­tu­al us­er need­ing it.

This ex­pos­es func­tion­al­i­ty rst2html al­ready had, so that's prob­a­bly why it was easy to do ;-)

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

If you mark some­thing with a class, you can now omit it from the out­put:

.. class:: ignored

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

And it's use­ful, for ex­am­ple, so you can keep slides and pre­sen­ta­tion notes in the same file. You just put your notes in a class you strip when pro­duc­ing the slides.

Since some class­es are au­to­mat­i­cal­ly as­signed for ad­mo­ni­tion­s, this is ex­tra sim­ple:

.. 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 pret­ty.

Rst2pdf 0.92 released, now has a website.

Just re­leased rst2pdf ver­sion 0.92. Rst2pdf is a tool to con­vert re­struc­tured text to PDF with­out re­quir­ing mul­ti­-hun­dred-megabytes of soft­ware. It sup­ports styling, mul­ti­ple page lay­out­s, font em­bed­ding, vec­tor im­ages, and much more.

Al­so, now it has a re­al web­site: http://rst2pdf.ralsi­na.me

Try it out and let me know of the ob­vi­ous, hor­ri­ble bug I for­got to fix (hap­pens in most rst2pdf re­leas­es ;-)

So, rst2pdf is now 0.91

Turns out there was a ma­jor, show stop­per bug in rst2pdf 0.90: sphinx sup­port was ab­so­lute­ly bro­ken. Not bro­ken as in bug­gy, bro­ken as in it had syn­tax er­rors.

So, 0.91 is now re­leased, and on­ly bro­ken in the tra­di­tion­al sense. En­joy!


Contents © 2000-2024 Roberto Alsina