ankitects / ankitects/anki

Browser preview does not use MathJax preamble in card template

Open
#3,799 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
30.5k
Forks
3.2k
Avg merge
2d 8h
Merged PRs (30d)
72

Description

I have a MathJax preamble defined in my front and back card templates. This is respected in some places (views/previews), but not in others (editors).

![Image](https://github.com/user-attachments/assets/64ca8fc3-28bc-4e5a-bffd-8e0c0d7fec23)

![Image](https://github.com/user-attachments/assets/aeff9a93-20ce-4884-b6e8-44bfa63fe234)

I would have expected and liked for the WYSIWYG editor to also include these, though I understand that the MathJax instance used here does not have access to the context of the card.

Would there be a good workaround available?

Contributor guide

Open the contributing guide

Research direction

Start by tracing how the MathJax preamble is handled in views/previews and comparing that with the editors and WYSIWYG browser preview. Done should mean the editor preview applies the front and back card template preambles consistently, or the supported workaround is documented.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.