executablebooks / sphinx-proof

A Sphinx extension for producing proof, theorem, lemma, definition, remark, conjecture, corollary and algorithm directives.
https://sphinx-proof.readthedocs.io/en/latest/
MIT License
30 stars 16 forks source link

Strange scrollbar appearing in the rendering of a labeled equation #74

Closed shailesh1729 closed 2 years ago

shailesh1729 commented 2 years ago

Describe the problem

There is a horizontal scroll bar appearing below a labeled equation.

image

The problem appears to be in the stylesheet

image

In the main.bd-content #main-content div.math overflow-x: auto setting. If I remove this setting, then scroll bar goes away but rendering gets messed up in other places.

Strangely, the problem appears to be local on my Windows laptop. You can see it rendered from the github-pages link:

https://www.indigits.com/cvx-opt-book/basic_real_analysis/differentiability.html#equation-eq-bra-df-f-minus-tangent

When I built from the same code on Netlify (using Linux OS), the problem is gone:

https://convex.indigits.com/basic_real_analysis/differentiability.html#equation-eq-bra-df-f-minus-tangent

Link to your repository or website

https://www.indigits.com/cvx-opt-book/basic_real_analysis/differentiability.html

Steps to reproduce

Here is the markdown code of the lemma:

````{prf:lemma}
If $f$ is differentiable at $x=a$, then

```{math}
:label: eq-bra-df-f-minus-tangent
f(x) = f(a) + [f'(a) + E(x)](x -a)

where $E$ is defined in the neighborhood of $x=a$ and

$$ \lim_{x \to a} E(x) = E(a) = 0. $$

The whole Jupyter Book is hosted on https://github.com/shailesh1729/cvx-opt-book . The particular Markdown file is https://github.com/shailesh1729/cvx-opt-book/blob/main/book/basic_real_analysis/differentiability.md.

The version of Python you're using

3.8.12

Your operating system

Windows 10

Versions of your packages

Jupyter Book      : 0.12.1
External ToC      : 0.2.3
MyST-Parser       : 0.15.2
MyST-NB           : 0.13.1
Sphinx Book Theme : 0.1.7
Jupyter-Cache     : 0.4.3
NbClient          : 0.5.9

Additional context

No response

TimRoith commented 2 years ago

Are you sure this is an issue of sphinx-proof?

I noticed the same behaviour here

https://github.com/executablebooks/sphinx-book-theme/issues/432

without a proof directive. In my case it turned out that it was an issue with the sphinx-book-theme that was fixed here

https://github.com/executablebooks/sphinx-book-theme/pull/447.

shailesh1729 commented 2 years ago

Indeed it was an issue of sphinx-book-theme. After I upgraded to the latest 0.2.0 version of the theme, the issue is gone. Thank you for pointing it out.