Hiding Sections With Rst2pdf
Omitting Sections
This is a relatively new feature in rst2pdf (added late 2012, according to the blog post), and wasn’t present in the version I had from Ubuntu’s default repositories in Saucy Salamander (version 0.16). I grabbed the latest (version 0.93) though, and this feature works delightfully well.
Here’s a snippet of an rst file:
SELECT * FROM users u WHERE u.username = :username AND u.password = :password
To generate this document with all the elements present, I use something like this:
The section of the document containing the list of parameters can get a bit long-winded, so I can easily leave out those sections using a command that looks like this:
$options = array( "cache_wsdl" => WSDL_CACHE_NONE, "soap_version" => SOAP_1_1, "trace" => 1, "proxy_host" => "localhost", "proxy_port" => 8888, ); $client = new SoapClient($wsdl, $options);
This generates the same document using the same styles, but omits the sections I named. You can pass more of the same switch to omit as many classes as you need to for your purposes. I’m now using this in all kinds of places, so I thought I’d share!