Reputation: 1068
In Doxygen you can add a html tag inside docstrings as follow
"""!
x<sub>1</sub>,
"""
the stylesheet for it
sub {
vertical-align: sub;
font-size: smaller;
}
Is that possible to do in Sphinx? If so, how? It don't need to be in a docstring it can be anywhere in rst file.
What I tried so far in my rst file
x<sub>1</sub>,
.. x<sub>1</sub>,
without success
I tried to escape tag
x/<sub>1/</sub>,
again without success
I'm sure I missed something here.
Upvotes: 1
Views: 693
Reputation: 15045
Use the :subscript:
role:
H\ :sub:`2`\ O
or
The chemical formula for pure water is |H2O|.
.. |H2O| replace:: H\ :sub:`2`\ O
You could also use :raw:
, but heed its warnings.
Upvotes: 3