The following piece of reStructuredText does not give the result I expect.
*:sup:`superscript`*
Expected result: superscript
Actual result: :sup:`superscript`
The reason why it is happening is clear (reST text roles cannot be nested), however how can I obtain the expected result?
To get a new line immediately following a few long lines I have to a) start a new (empty) line and b) THEN (on the next line) follow it with | <my new line> .
For comments, add 2 periods .. followed by a newline and then your comment indented.
You can use substitution:
The chemical formula for pure water is |H2O|.
.. |H2O| replace:: H\ :sub:`2`\ O
See the reStructuredText spec for further information on character-level markup and the substitution mechanism.
As specified in a FAQ, this is not currently possible without using the raw
directive or without using a custom, ad-hoc directive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With