RML (Report Markup Language) is ReportLab's own language for specifying the appearance of a printed page, which is converted into PDF by the utility rml2pdf.
These RML samples showcase techniques and features for generating various types of ouput and are distributed within our commercial package as test cases. Each should be self explanatory and stand alone.
Demo of sequencing tag for multi-level numbering This initial paragraph doesn't have any numbers, but I've hidden in it a command to "chain" together three level identifiers, so that whenever the level_1 number is ncremented, the ones below it reset to 1. This needs to be done early and should really be allowed in the docinit tag, but isn't yet. The tag looks like <seqChain order= "level1 level2 level_3"/> Heading. Lorem ipsum dolor sit amet.... This contains a tag to "get" the current value of the level_1 counter, and increments it after display. The tag looks like <seq id="level_1">. .This should be numbered "1.1" .This should be numbered "1.2" .This should be numbered "1.3" . Heading. Lorem ipsum dolor sit amet... .This should be numbered "2.1", because the jump in level 1 headings reset the level 2 counter. .This should be numbered "2.2" .This should be numbered "2.3" . Another heading. Duis bibendum urna ac.... In the paragraphs below we use two seq tags; the level 2 one is as you would expect and increments, bt the level 1 tag has <seq id="level_1" inc="no">, meaning "do not increment". You can also pass in an integer, to increment by 0, 1 or something else entirely; you could count down if you wanted to. . Yet another heading. Morbi laoreet magna sit amet... . Yet another heading. Morbi laoreet magna sit amet... . Yet another heading. Morbi laoreet magna sit amet... . Back to outer level. Duis bibendum urna ac... . Just for the hell of it, jump ahead 5 at the inner level using inc="5".... Morbi laoreet magna sit amet... . Yet another heading. Morbi laoreet magna sit amet...