Render MathJax expressions in the Browser Sort Field column

Render MathJax in the Browser’s Sort Field column

The Browser’s Sort Field column currently displays raw MathJax source, such as \(\ce{AlCl3}\), while the editor below renders the same expression after the note is selected.

I would like to make MathJax expressions readable directly in the Sort Field column, without requiring each note to be selected.

The Browser currently uses a Qt item view with plain-text cells, while MathJax is rendered inside a web view. A possible implementation would:

  1. reuse Anki’s existing MathJax-to-SVG conversion;
  2. render only visible cells asynchronously;
  3. cache results by expression, theme and font size;
  4. use a Qt item delegate to draw mixed text and SVG;
  5. fall back to the original source if rendering fails.

Before preparing a PR, would this approach be acceptable in core Anki? Would maintainers prefer an add-on proof of concept first?

An add-on is a good first step to get quick feedback from users and decide if it should become a core feature.

The browser screen is likely to be migrated to a webview in the future (there’s nothing concrete planned yet - the editor/main screen rework needs to be finished first and that’s been going for years now).