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

Allow columns to shrink during line breaking. (mathjax/MathJax#3235) #1102

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Jun 6, 2024

During line breaking, when a table column has breaks, the computed width was not always being reduced, leaving the column width the original size, leading to the output bing too wide despite the line breaking.

This PR resolves the problem by allowing columns that are fit, auto, or percentage-width to shrink to the width of the newly broken cells rather than their original widths.

A test case is

<div style="width:20em; border:1px solid black">
\begin{equation*}
\begin{cases}
\def\div{\operatorname{div}}-\div(A(x)Du)=c_\lambda(x)u+( M(x)Du,Du)+h(x)\\
u\in H_0^1(\Omega)\cup L^\infty(\Omega)
\end{cases}
\tag{$P_\lambda$}\label{$P_lambda$}
\end{equation*}
</div>

with overflow set to linebreaks and displayAlign set to left. Without this PR, the tag will be outside the div, and with it, the tag should be properly placed.

Resolves issue mathjax/MathJax#3235.

@dpvc dpvc requested a review from zorkow June 6, 2024 19:06
@dpvc dpvc added this to the v4.0 milestone Jun 6, 2024
Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

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

Works for me.

@dpvc dpvc merged commit 059a670 into develop Jun 14, 2024
@dpvc dpvc deleted the issue3235 branch June 14, 2024 15:14
@dpvc dpvc restored the issue3235 branch June 14, 2024 15:14
@dpvc dpvc deleted the issue3235 branch June 18, 2024 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants