From: David G. <go...@py...> - 2008-08-05 14:58:13
|
On Tue, Aug 5, 2008 at 10:06, Matthew Leingang <lei...@ci...> wrote: > Basically I want :emphasis:`x\ :sup:`n``, but that doesn't parse. Is > there a workaround to "nest" roles like this? You can define custom roles, either standalone: .. role:: msup Or based on another role: .. role:: esup(sup) Then use them like this: *y*\ :msup:`3`, *x*\ :esup:`2` The resulting classes must be defined in your stylesheet. Here, "msup" should be defined as italic superscript, and esup only as italic (since the superscript will be generated because of the base role). -- David Goodger <http://python.net/~goodger> |