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

Can I use this with Anki, and if so, how? #247

Open
pinetreemoonlight opened this issue Sep 28, 2023 · 1 comment
Open

Can I use this with Anki, and if so, how? #247

pinetreemoonlight opened this issue Sep 28, 2023 · 1 comment
Labels

Comments

@pinetreemoonlight
Copy link

Apologies for the really dumb question. I came across this repo when searching for a solution to my issue with Mathjax in Anki.

I want to somehow implement automatic line breaks for Mathjax equations into my card templates. Currently, whenever an equation is too long, it simply goes out of bounds of my template.

Would itbe possible to use Mathjax-Accessibility to solve this issue?

@dpvc
Copy link
Member

dpvc commented Oct 8, 2023

This repository is the development repository for the assistive tools for MathJax v2. The current version of MathJax is v3.2.2, and v4.0.0 is out in beta release. MathJax v2 does have automatic line breaking available for display equations, so if you are using v2, you sh9ould be able to turn that on with your MathJax configuration. Version 3 doesn't have automatic line breaking, but v4 does (for both in-line and display equations), so if you are using v3, you may want to consider trying the v4 beta release and see if that does what you need. V4 also has other options for wide equations, like scaling them down, or adding sliders.

I don't know the layout of Anki cards, but the automatic line-breaking relies on being able to determine the width of the DOM element that contains the math. Some elements are "shrink-wrap" elements, like table cells, and stretch to accommodate their contents, so MathJax can't tell where to break in those elements. So it might take a little fiddling to get it to work in that case.

@dpvc dpvc added the question label Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants