I am working on a book that uses a lot of math in prefix notation. I
created an HTML file that uses span elements inside other span elements.
This is possible in HTML but impossible in reST, as far as I can tell.
Here is a sample of what I'm doing in plain HTML:
<tr><td class="prefix">= <span class="unchanging">* a 0</span> 0</td>
<td>Given</td></tr>
<tr><td class="prefix">= + <span class="unchanged">* a 0</span> <span
class="changing">0</span> 0</td>
<td class="blue-indicator">Identity of +</td></tr>
<tr><td class="prefix">= <span class="changing">+ <span
class="unchanging">* a 0</span> <span class="changed">+ a
<sup>-</sup>a</span></span> 0</td>
<td class="green-indicator">Inverse of +</td></tr>
The CSS styles portions of the line with blue or green overlines and
underlines.
I have created a role in my reST to handle the prefix tag, and that uses
the monospace font I want to use, but I cannot add code to get the
overlines and underlines.
Here is what this looks like in my reST:
.. list-table:: A Proof
:widths: 7 3
:class: proof
* - :prefix:`=` :unchanging:`* a 0` :prefix:`0`
- Given
* - :prefix:`= +` :unchanged:`* a 0` :changing:`0` :prefix:`0`
- Identity of +
* - |there4| :prefix:`* a 0 0`
- |QED|
I have to break up my inline prefix statements in ways I don't like. I
think the reST is unreadable (not that the HTML is readable, but at least
it works).
I also have to use the replacements (which spit out unicode characters)
outside of inline elements. Replacements don't work inside inline elements
in reST.
Any ideas how I can make this cleaner?
Thanks.
--
You received this message because you are subscribed to the Google Groups
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.