-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The first step to allowing math directives to be rendered on PyPI is to enable the directive's warning to pass. `docutils` tells us to pass a path to the `math_output` setting. Since we `clean` the output, we can pass anything we want, as control of the CSS will be handed on PyPI. Refs: https://docutils.sourceforge.io/docs/user/config.html#math-output This does **not** solve for Markdown math. Resolves #115 Resolves #172 Signed-off-by: Mike Fiedler <miketheman@gmail.com>
- Loading branch information
1 parent
bb88dab
commit e52f968
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<p>A <tt>math</tt> directive:</p> | ||
<div class="math"> | ||
\begin{equation*} | ||
\alpha _t(i) = P(O_1, O_2, \ldots O_t, q_t = S_i \lambda ) | ||
\end{equation*} | ||
</div> | ||
<p>A <tt>:math:</tt> role:</p> | ||
<p>The area of a circle is <span class="math">\(A_\text{c} = (\pi/4) d^2\)</span>.</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.. Sample from https://docutils.sourceforge.io/docs/ref/rst/directives.html#math | ||
A ``math`` directive: | ||
|
||
.. math:: | ||
α_t(i) = P(O_1, O_2, … O_t, q_t = S_i λ) | ||
.. Sample from https://docutils.sourceforge.io/docs/ref/rst/roles.html#math | ||
A ``:math:`` role: | ||
|
||
The area of a circle is :math:`A_\text{c} = (\pi/4) d^2`. |