|
PyDS has a new restructured text mode named strict structured text. This comes in handy if you often write stuff that might include # or $ chars or something like this - usually this would trigger the cheetah template processor. With strict structured text this won't happen, as cheetah isn't called. The only thing that is used in this case is docutils alone. But you might have some macros or nuggets for PyDS that you want to call from your postings.
For example, I have a macro to link a wikipedia page. If I want to use this in strict structured text, I need to call a directive pyds-macro. This works as follows:
.. |httg| pyds-macro:: wikipediaLink
:definition: The Hitchhiker's Guide to the Galaxy
:language: en
Now I can reference this new definition as |httg| everywhere in the posting where I need the reference to this wikipedia definition.
If you read the source for the macro, you may notice an additional parameter alt - this is created automatically with docutils. So if you need to call macros from strict structured text, your macro should have this attribute defined currently. This problem is fixed in the CVS version (the additional parameter definition is only needed with 0.7.1). Another way is to use nuggets, as they can accept any parameters, even parameters they don't actually use. The needed directive is called pyds-nugget.
|