sphinx-math-dollar icon indicating copy to clipboard operation
sphinx-math-dollar copied to clipboard

Restrict display math further?

Open asmeurer opened this issue 4 years ago • 5 comments

See https://github.com/sympy/sphinx-math-dollar/pull/12. Display math is currently allowed everywhere inline math is. But that includes things like headers, where display math doesn't make any sense. Should we restrict it? My feeling is we should probably just let it work, as people won't likely do it anyway, but I don't feel strongly about it.

asmeurer avatar Oct 04 '19 23:10 asmeurer

What are drawbacks of using math in headers? I am going to use it and care about reasons why I should not.

vonopr avatar Sep 22 '20 09:09 vonopr

Now, links pointing to seactions with math symbols are not rendered right: math_symbol_in_sphinx_header

source:

.. _scalars:

######################
Calculation of Scalars
######################

.. contents:: :local:


*****************************
Update T,S and $\rho$ scalars
*****************************

vonopr avatar Sep 22 '20 09:09 vonopr

Is this something that broke in the most recent 1.2 release?

asmeurer avatar Sep 22 '20 19:09 asmeurer

If I understand correctly, your issue is that the rho is not blue in the link text? I just tested your example and it seems to render fine in both 1.1.1 and 1.2. Perhaps this is an issue with the CSS of the theme you are using.

asmeurer avatar Sep 22 '20 20:09 asmeurer

As to the original question, this is specifically about restricting display math. Inline math should definitely be allowed in headers. But I don't know if it makes sense for display math (double dollars), whose support was just added in 1.2.

asmeurer avatar Sep 22 '20 20:09 asmeurer