Skip to content

Latex vertical Scroll bar bug is back #3354

Closed
@LuciferUchiha

Description

@LuciferUchiha

Contribution guidelines

  • I've read the contribution guidelines and wholeheartedly agree

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
    ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
    ... the documentation does not mention anything about my problem
    ... there are no open or closed issues that are related to my problem

Description

The bug from Issure484 was reintroduced. As you can see here

Expected behaviour

There is a Vertical Scroll bar next to non inline latex.

Actual behaviour

There is not a Vertical Scroll bar next to non inline latex.

Steps to reproduce

  1. Write in markdown:
$$Per(n)=n!$$
  1. Deploy page
  2. Open page

Package versions

  • Python: 3.x
  • Material: 8.1.2

Configuration

site_name: George's Digital Garden
repo_name: LuciferUchiha/Digital-Garden
repo_url: https://github.com/LuciferUchiha/Digital-Garden

System information

  • Operating system: Windows
  • Browser: Brave

Activity

squidfunk

squidfunk commented on Dec 16, 2021

@squidfunk
Owner

Thanks for reporting. Please provide a reproducible case.

changed the title [-]Latex Scroll bar back after 7.3.5[/-] [+]Latex vertical Scroll bar bug is back[/+] on Dec 16, 2021
added
needs inputIssue needs further input by the reporter
needs reproductionIssue lacks a minimal reproduction .zip file
and removed
needs investigationIssue must be investigated by the maintainers
on Dec 16, 2021
LuciferUchiha

LuciferUchiha commented on Dec 17, 2021

@LuciferUchiha
Author

I have added a bit more Detail with a Link to some evidence

squidfunk

squidfunk commented on Dec 17, 2021

@squidfunk
Owner

I can see the issue on your page but I'm still not able to reproduce it. Using the formula you posted, no scrollbar appears:

Bildschirmfoto 2021-12-17 um 21 06 57

I'm closing this as non-reproducible as it's unclear to me whether you are using customizations that might cause the error, because you supplied incomplete information in the mkdocs.yml section. If you manage to craft a minimal reproducible example with a clean installation, I'm happy to look into it and fix it.

slutske22

slutske22 commented on Dec 29, 2021

@slutske22

I am having the same issue. You can see the scrollbars on my documentation's site here: https://firestarter-io.github.io/node-algorithm/algorithm/firespread/slope/

The code for this particular page can be found here: https://github.com/firestarter-io/node-algorithm/blob/rothermel-slope-aspect-ros/docs/algorithm/firespread/slope.md

If it helps, my mkdocs.yml looks like this:

site_name: name
nav:
  - About: index.md
  - Algorithm:
      - Overview: algorithm/overview.md
      - Data:
          - Types: algorithm/data/types.md
      - Fire Spread:
          - Slope: algorithm/firespread/slope.md
      - Notes: algorithm/notes.md
  - Components:
      - Campaign: components/campaign.md
      - Extent: components/extent/extent.md
      - BurnMatrix: components/burnmatrix.md
      - Cell: components/cell/cell.md
      - Priority Queue: components/queue/queue.md

theme:
  name: material
  logo: assets/flame.png
  favicon: assets/flame-docs.png
  highlightjs: true
extra_css:
  - stylesheets/extra.css
extra_javascript:
  - javascripts/config.js
  - https://polyfill.io/v3/polyfill.min.js?features=es6
  - https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
markdown_extensions:
  - attr_list
  - pymdownx.superfences
  - pymdownx.arithmatex:
      generic: true
  - pymdownx.highlight:
      use_pygments: true

I'm not sure if this is the same as @LuciferUchiha 's issue, or if some external plugins / js / css may be causing the issue.

I came up with a CSS hack. In the project's extra_css, add this:

.MathJax.CtxtMenu_Attached_0 mjx-container[jax='CHTML'][display='true'] {
	margin: 0 !important;
}

That seemed to fix it for me. I'll leave the offending docs published for a little while so @squidfunk can take a look.

Short of a hacky CSS hack to stop this, I'm not sure what I might do to fix it.

LuciferUchiha

LuciferUchiha commented on Dec 29, 2021

@LuciferUchiha
Author

@slutske22 I was able to fix it by adding

.md-typeset div.arithmatex {
    overflow: hidden;
}
facelessuser

facelessuser commented on Dec 29, 2021

@facelessuser
Contributor

Particularly overflow-y should be hidden. That's what I usually do. I don't usually hide the X direction. I don't often overflow in that direction, but I've never seen scroll issues related to the X direction.

LuciferUchiha

LuciferUchiha commented on Dec 29, 2021

@LuciferUchiha
Author

Correct could be slightly preciser however I haven't run into any problems yet with this solution

akhmerov

akhmerov commented on Jan 3, 2022

@akhmerov

Adding an example that seems to reproduce the issue for me:

I have confirmed that the scrollbar isn't gone upon replacing the html content with the one that is known to work, nor upon replacing the stylesheet (both using browser dev tools). All the dom elements seem to have identical sizes with and without the problem.

squidfunk

squidfunk commented on Jan 3, 2022

@squidfunk
Owner

A PR is appreciated. Note that overflow: hidden as suggested in #3354 (comment) is likely not the solution, as this will break scrolling on narrow screens when the formula exceeds the width of the viewport.

14 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @squidfunk@facelessuser@akhmerov@Kryptos-FR@jakobkogler

        Issue actions

          Latex vertical Scroll bar bug is back · Issue #3354 · squidfunk/mkdocs-material