LK's Fixes: cloze fixes for MathJax and LaTeX

AnkiWeb addon 1182986005

Provides nine previewable, undoable clean-up tools that fix cloze LaTeX/MathJax, fractions, divs, links, spaces, photo credits, span formatting and trailing lines across selected notes.
AI-generated summary; may contain mistakes.

note-managementformattingclozebugfix-workaround

Open on AnkiWeb Find alternatives

AnkiWeb

Votes
0 (πŸ‘ 0 Β· πŸ‘Ž 0)
Updated
2026-11-17
Anki versions
26.09.2~
License
Not found (this does not mean that the addon has no license)
Virus scan
No ClamAV match A match does not prove malware. No match does not prove that the code is safe.
Languages
Python, JSON
Description language
en

Maintenance

active

  • Last update or commit: 2026-11-17 (14 days before the snapshot).

GitHub

No GitHub repository linked.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
26.09.2+2026-11-17
History across monthly snapshots

Loading…

Similar addons

Fix MathJax in Cloze

Fixes cloze conflicts by replacing internal }} with } }, handling trailing braces and nested clozes, and removing non-breaking spaces inside MathJax, with browser and reviewer bulk-fix actions.

note-managementformattingclozebugfix-workaround

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 ⭐ 0 Anki 2.1.1~ Updated 2026-04-20
Gemini LaTeX Fixer

Converts dollar-sign LaTeX from AI text into Anki's MathJax format automatically on paste, and bulk-converts existing collections via a Tools menu item.

card-creationnote-managementformatting

5 votes 38% approval πŸ‘ 4 Β· πŸ‘Ž 1 Anki 2.1.66~ Updated 2026-03-05
Flashcards Grid Preview

Displays all cards from the selected deck in a customizable, paginated grid with hover/click flipping, flip-all mode, and LaTeX rendering, though images, audio, and other media are unsupported.

formattingshortcutsappearancecard-templates

1 votes 21% approval πŸ‘ 1 Β· πŸ‘Ž 0 ⭐ 0 Anki 2.1.1~ Updated 2025-09-22

Description

Please read first

  • This add-on was made for my own note types (LK-cloze and LK-IO). Out of the box it skips every other note type. To use it on yours, open Help β†’ LK's fixes Settings and tick your note types and the fields each tool should read.
  • Back up your collection before the first run (File β†’ Export β†’ Anki Collection Package).
  • Tested on Anki 26.09.2. Use at your own risk.

LK's fixes

Nine small clean-up tools for your notes, under Tools β†’ LK's fixes, plus Run All to go through them in one pass. Nothing is saved until you have seen a preview and pressed Apply, and every run can be undone with Edit β†’ Undo.

The tools

  • Cloze Fix: Anki ends a cloze blank at the first }}, so LaTeX like \frac{W_{out}}{W_{in}} inside a blank cuts it short. This writes } } instead. It understands nested clozes and LaTeX line breaks (\\). Blanks whose braces never close are listed for you, not changed.
  • Div to Line Break: rewrites <div> lines as <br> line breaks. The field looks the same; a blank line stays one blank line.
  • Fraction: turns plain-text fractions and units into inline MathJax: m/s β†’ \(\frac{m}{s}\), 1/2 β†’ \(\frac{1}{2}\), 0.0821 LΒ·atm/(molΒ·K) β†’ 0.0821 \(\frac{L*atm}{mol*K}\). It is careful on purpose: it leaves words like and/or, ratios like 50/50, anything already in MathJax, HTML tags, links and cloze markers alone.
  • LaTeX check: lists every note whose MathJax or LaTeX won't display, in a window like Anki's Empty Cards (click a note id to open it in the Browser). It renders with Anki's own MathJax and settings, so \ce{…} chemistry counts as fine. It only reports and never changes anything.
  • Link Clean Up: moves Khan Academy and YouTube links from one field to another (Extra β†’ Source by default) as plain URLs, one per line, and removes leftover link code such as a stray </a>. Other links are left alone.
  • NBSP to Space: replaces every non-breaking space (&nbsp;) with a normal space.
  • Photo Credit: removes photo-credit lines (small or italic "Photo credit: …" text, however it is wrapped). The image stays. Credits it doesn't recognise are listed for you to check.
  • Span Formatting: removes formatting pasted in from websites on <span> tags (fonts, sizes, colours, backgrounds). Bold, italic, underline, strikethrough, superscript and subscript stay.
  • Trailing Lines Fix: deletes empty lines and empty code after the last line of text in a field.

How each tool works

  1. Choose what to run on: the notes selected in the Browser, a search, or the whole collection.
  2. A preview shows every field that would change, before and after, with the changes highlighted. Uncheck any note you want to leave alone, or press Show all in Browser to look at them first.
  3. Apply saves the checked notes as one undo step. A summary shows what changed, plus any notes listed for you to check by hand.

Only field text changes, never scheduling, flags, suspension, decks or review history. Fields such as ID, Image and the image-occlusion mask fields are never written. If a change would break a cloze blank, that note is skipped and listed.

Run All

Tools β†’ LK's fixes β†’ Run All… asks once which notes to use, then goes through every tool that is turned on, in a sensible order (Cloze Fix first, Trailing Lines Fix and the LaTeX check last). Each tool stops at its preview so you can Apply, Skip or Stop; a tool with nothing to change is passed automatically. Afterwards it runs Anki's own Empty Cards, Check Media and Check Database, waiting for you to close each window, and ends with one summary.

Settings

Help β†’ LK's fixes Settings lets you:

  • turn each tool on or off (a tool that is off is greyed out in the menu and skipped by Run All)
  • choose, per tool, which note types it runs on and which fields it reads
  • choose which fields Link Clean Up moves links from and to
  • tag every note a fix changes (e.g. LK::Fixed::Fraction), off by default
  • choose which of Anki's checks Run All finishes with

Light on your Anki

The add-on only loads when you use one of its tools. It does nothing while you study or edit cards.