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

長い数式がオーバーフローする問題を修正 #3997

Merged
merged 3 commits into from
Jun 5, 2023

Conversation

zer0-star
Copy link
Member

@zer0-star zer0-star commented Jun 4, 2023

closes: #3863

概ね #3882 の通りだが、数式の表示がおかしくなる(上にズレるなど)問題を修正している

調べた感じだと、overflowに値を設定するとbaselineが変わるかなにかで、inline-blockのときに表示がおかしくなるらしい

関係ありそう(baseline-sourceの既定値であるautoのときの挙動):

https://triple-underscore.github.io/css-inline-ja.html#baseline-source

行内ブロック用には最後の基底線による整列を指定する。
他のもの用には最初の基底線による整列を指定する。

実際、baseline-sourceauto以外を設定すると表示が正常になる(Chromium系しか対応していないようなのでこの手段は使えなかったが)

あと、分数で若干上に見切れることがあるのでpaddingを追加した

@zer0-star zer0-star self-assigned this Jun 4, 2023
@codecov
Copy link

codecov bot commented Jun 4, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (6e53d48) 86.34% compared to head (c79c283) 86.34%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3997   +/-   ##
=======================================
  Coverage   86.34%   86.34%           
=======================================
  Files          66       66           
  Lines        4709     4709           
  Branches      563      563           
=======================================
  Hits         4066     4066           
  Misses        637      637           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@nokhnaton nokhnaton left a comment

Choose a reason for hiding this comment

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

ほとんどよさそうです。横にほんの少しスクロールしちゃうときもあるので、横方向にもpaddingつけても良さそうです。

Copy link
Member

@mehm8128 mehm8128 left a comment

Choose a reason for hiding this comment

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

↑に同じく、x方向にスクロールバー表示されてしまうことがあるのを修正してほしいです
それ以外はいいと思います:kansya_kansya:

@zer0-star zer0-star merged commit ef908d1 into master Jun 5, 2023
10 checks passed
@zer0-star zer0-star deleted the fix/katex-overflowing branch June 5, 2023 12:11
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.

KaTeXで書いた部分がオーバーフローする
3 participants