Skip to content

alexthillen/Anki-KaTeX-Markdown-Reworked

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️🚨 IMPORTANT NOTICE 🚨⚠️

This add-on is archived and no longer maintained. Please switch to the new, modern, and actively maintained version: Better Anki Markdown

Anki Markdown

Latest Release : New Card Type "Markdown and KaTeX Cloze + Show Cloze (Color)"

Latest Update

How to use

Download Anki Add-On

Adding support and improvements of how cards are displayed. Allowing for clozes inside code blocks. Better night mode support & readability. Coloring of the cloze elements.

Creates a new Basic and a new Cloze Note Type that support Markdown and KaTeX: Markdown and KaTeX Basic (Color) and Markdown and KaTeX Cloze (Color).

The following can be used to create a sample cloze card.

# A Dummy Card
## Subtitle
### Math
- {{c1::$\pi=3.1415...$::$\pi=...$}}
### Escaping dollar
$$1\$ < 1€ $$ after

### Escaped c++ code :

```cpp
#include <stdio.h>
{{c2::boost\:\:add_vertex::how to add vertex in boost}}(...);
```

### Python

```py
def print_hello():
  print("{{c2::hello}}")
```

Front Code Back Code Math Front Math Back Light Mode

Features

Customizing Styles

It's possible to customize the note style by editing "_user_style.css" inside the media folder. To find out where your media folder is, please refer to the Anki documentation.

If a value has already been set inside the default "_style.css", you can overwrite it by using the !important flag. If you want to remove a value, you can also use the unset keyword.

/* _user_style.css example */

.nightMode, .night-mode, .night_mode {
  background-color: #1e1e2e !important; /* overwrite value */
}
.nightMode code {
  filter: unset !important; /* remove value */
}

/* !important is not necessary here since ".field" is not set in "_style.css" */
.field {
  display: inline-block;
  text-align: left;
}

The markdown preview will automatically follow all user style modifications.

Used Libraries

Markdown-It
KaTeX

Installation

  • Go to to see how to install this addon for anki
  • To install locally download the latest release and install by opening Anki → Tools → Add-ons → Install from file, then select MDKaTeX.ankiaddon

Fork of : https://github.com/Jwrede/Anki-KaTeX-Markdown.

Credits to

  • Jwrede for starting this cool project.
  • Eljamm for his substantial contributions with dynamic styling and significantly enhancing the code's maintainability.

About

Creates a new Basic and a new Cloze Note Type that support Markdown and KaTeX

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 78.3%
  • CSS 10.6%
  • HTML 8.5%
  • Python 2.6%