Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

Mathjax does not scale properly with font sizes other than the default

Open mincrowave opened this issue 9 months ago • 9 comments

Checked for duplicates?

  • [x] This issue is not a duplicate

Does it also happen in the desktop version?

  • [x] This bug does not occur in the latest version of Anki Desktop

What are the steps to reproduce this bug?

Increased my phone (Samsung)'s font size in the Settings app and viewed Mathjax in Ankidroid. Improper scaling also occurs with font sizes lower than the default. It occurs on both the old and new study screens, and on both the preview screen and the screen displayed when taking a card.

Expected behaviour

What happened: The Mathjax did not scale properly. More specifically, it seems the spacing between it and surrounding elements (both regular text and other Mathjax) was smaller or larger than it should be (for larger font sizes and smaller font sizes respectively). What should have happened: The Mathjax should have scaled properly, with the spacing between it and surrounding elements increasing for larger font sizes and decreasing for smaller ones.

Debug info

AnkiDroid Version = 2.23.3 (9001068fd4819c6fb66cb8239e7166868ab47859)  
Backend Version = 0.1.62-anki25.09.2 (25.09.2 3890e12c9e48c028c3f12aa58cb64bd9f8895e30)  
Android Version = 14 (SDK 34)  
ProductFlavor = full  
Device Info = samsung | samsung | a52sxq | a52sxqxx | SM-A528B | qcom  
Webview User Agent = Mozilla/5.0 (Linux; Android 14; SM-A528B Build/UP1A.231005.007; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/144.0.7559.132 Mobile Safari/537.36  
ACRA UUID = cdff68cf-dc6b-4a95-820a-59efab81d32b  
FSRS = 5.1.0 (Enabled: true)  
Crash Reports Enabled = true

(Optional) Anything else you want to share?

Screenshots of the improper scaling Larger font size: New study screen: Image Preview

Image Taking card

Old study screen:

Image Preview

Image Taking card

Smaller font size: Image New study screen, preview

Research

  • [x] I have checked the manual and the FAQ and could not find a solution to my issue
  • [ ] (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)

mincrowave avatar Feb 16 '26 08:02 mincrowave

Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/ankidroid/Anki-Android/wiki/Contributing

welcome[bot] avatar Feb 16 '26 08:02 welcome[bot]

reproduced this issue and currently working on it.

argon2r avatar Feb 16 '26 11:02 argon2r

@argon2r You still working on this issue?

Alok-Silswal avatar Feb 18 '26 08:02 Alok-Silswal

@Alok-Silswal Yes

argon2r avatar Feb 18 '26 21:02 argon2r

@argon2r are you still working on this issue?

KT-1114 avatar Mar 20 '26 12:03 KT-1114

Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] avatar Jun 18 '26 13:06 github-actions[bot]

Still occurs in version 2.24.0.

mincrowave avatar Jun 18 '26 13:06 mincrowave

Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] avatar Sep 16 '26 16:09 github-actions[bot]

I put in some work today under https://github.com/ankidroid/Anki-Android/issues/20776#issuecomment-5701389617 and have a fix.

Closing this as a duplicate

  • https://github.com/ankidroid/Anki-Android/issues/20776#issuecomment-5701389617

david-allison avatar Sep 16 '26 17:09 david-allison