Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Overflow LaTeX formulas #4304

@RubenVanEldik

Description

@RubenVanEldik

Summary

Formulas in LaTeX formulas can get quite long pretty quickly. Right now if a formula is longer than the viewport the whole app will get a scrollbar, which looks kinda ugly. (see attachments)

Steps to reproduce

  1. Add a long LaTeX formula (like r"Full\ load\ hours_{source} = \frac{\sum_{t=1}^{8760} production_{source}}{capacity_{source}} = 8760 \times Capacity\ factor_{source}")
  2. Decrease the width of the browser viewport

Expected behavior:

I would expect the formula to get a scrollbar so you could nicely scroll through the formula without affecting the whole screen.

Actual behavior:

The whole app becomes wider and a scrollbar appears at the bottom of the page. The problem seems to be solved by adding overflow-x to .stMarkdown, but I don't know enough about this to create a PR myself.

Is this a regression?

I don't know, I've been using Streamlit for only a few days. :)

Debug info

  • Streamlit version: v1.4.0
  • Browser version: Safari (both desktop and mobile) and Chrome

Schermafbeelding 2022-01-20 om 13 58 36

Schermafbeelding 2022-01-20 om 13 58 46


Community voting on feature requests enables the Streamlit team to understand which features are most important to our users.

If you'd like the Streamlit team to prioritize this feature request, please use the 👍 (thumbs up emoji) reaction in response to the initial post.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature:st.latexRelated to the `st.latex` elementtype:enhancementRequests for feature enhancements or new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions