On 23 May 2011 18:33, Frank Lanitz frank@frank.uvena.de wrote:
Am 23.05.2011 10:08, schrieb Lex Trotman:
Me too. Unfortunately I wasn't able to create this by using RST but failed. Input is welcome.
Replace the h1 and h2 CSS definitions with the following:
body { counter-reset: counter1; counter-reset: counter2; } h1:before { content: counter(counter1) " "; } h1.title:before { content: ""; } h1 { counter-increment: counter1; counter-reset: counter2; font-size: 1.4em } h2:before { content: counter(counter1) "." counter(counter2) " "; } h2 { counter-increment: counter2; font-size: 1.3em }
Its not only about the html, but also the generated PDF as well as the plain text version.
I'm just following the Rest documentation which said to number HTML with CSS, don't know how to do plain text.
I thought PDF was generated via latex and I wasn't about to try to tell *you* how to get Latex to do the numbering :-)
And like a great man once said: "all interesting programs have at least one counter, at least one loop and at least one bug", so the first line should read
body { counter-reset: counter1 -1 counter2; }
otherwise the heading counts as 1.
Cheers Lex
Cheers, Frank _______________________________________________ Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany