From: Nicolas G. <nic...@ne...> - 2007-10-31 12:43:01
|
Hi, for personal use in any case, and for anyone interested if any, I'd like to change the way the LaTeX writer deals with:: .. class:: c1...ci...cn upon sections and paragraphs. Right now, afaik, the writer produces comments like: % class: c1...ci...cn whereas I'd like it to generate something like \AtBeginc1 ... \AtBeginci ... \AtBegincn before generating the related node, and something like \AtEndc1 ... \AtEndci ... \AtEndcn after generating the node. So far I'm araid I couldn't figure out which part of the writer could be involved with this, so I'd be interested in a little help to getting started, and in comments/feedback on this need / informal proposal cheers, Nicolas |
From: G. M. <mi...@us...> - 2007-11-02 09:45:36
|
On 31.10.07, Nicolas Girard wrote: > Hi, > for personal use in any case, and for anyone interested if any, I'd like to > change the way the LaTeX writer deals with:: > .. class:: c1...ci...cn > upon sections and paragraphs. Actually, I'd like to see a generic solution as currently the handling of classes is breaking `syntax highlight via pygments`__. __ http://docutils.sourceforge.net/sandbox/code-block-directive/docs/syntax-highlight.html#writing However, converting classes in the sense of CSS to something equivalent in latex is a hard task. * Class settings should be ignored by writers that do not implement them. Currently, you can style the html output with some class argument without affecting the PDF generation. With your proposal, such an rst-file would fail to convert to PDF if you do not have a stylesheet that defines all the \AtBegin* and \AtEnd* commands. * The order of the class arguments is irrelevant: ``.. class:: c1 ci cn`` == ``.. class:: ci cn c1`` * The scope of class settings should be confined to the "classified" object (doctree elemet). > whereas I'd like it to generate something like > \AtBeginc1 ... > \AtEndc1 CamelCase commands are in LaTeX an indication for "use only in preamble or packages". Günter |