Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll overflow for long equations #1476

Merged
merged 14 commits into from
Nov 22, 2020
Merged

Conversation

friggog
Copy link
Contributor

@friggog friggog commented Nov 11, 2020

Resolves #1470

@friggog friggog changed the title Overflow for long equations Scroll overflow for long equations Nov 11, 2020
@mortenpi mortenpi added Format: HTML Related to the default HTML output Type: Bug labels Nov 11, 2020
@mortenpi mortenpi added this to the 0.25.4 milestone Nov 11, 2020
@mortenpi
Copy link
Member

This works great for KaTeX but not for MathJax. I think it should be enough to apply a class on the <div> that surrounds the equation

mdconvert(m::Markdown.LaTeX, ::MDBlockContext; kwargs...) = Tag(:div)(string("\\[", m.formula, "\\]"))

and then apply the overflow-x style to that <div>?

@friggog
Copy link
Contributor Author

friggog commented Nov 16, 2020

@mortenpi good point, I think this should now work for all packages. The margin fix is a bit hacky but it seems like the easiest way to get clean layouts

@mortenpi mortenpi modified the milestones: 0.25.4, 0.25.5 Nov 17, 2020
Copy link
Member

@mortenpi mortenpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for iterating on this @friggog!

I'll just note here that it looks like MathJax doesn't actually break inline equations like KaTeX does. But I don't think there's much we can do about it here.

@mortenpi mortenpi merged commit 5498315 into JuliaDocs:master Nov 22, 2020
mortenpi pushed a commit that referenced this pull request Nov 22, 2020
@mortenpi mortenpi mentioned this pull request Nov 22, 2020
@friggog friggog deleted the math-overflow branch November 23, 2020 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Format: HTML Related to the default HTML output Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Long math ... overflows the div
2 participants