Jwrede / Anki-KaTeX-Markdown

Creates a new Basic and a new Cloze Note Type that support Markdown and KaTeX
74 stars 5 forks source link

Some C code segments are difficult to read in dark mode #45

Open nilsreichardt opened 1 year ago

nilsreichardt commented 1 year ago
image

I have the dark mode enabled in Anki. When I'm writing C code, some of the code segments are difficult to read (see screenshot):

Example code:

#include <stdlib.h>
#include <string.h>

int main() {
    // Allocate memory for 10 characters on the heap
    char *p = (char*) malloc(10 * sizeof(char));

    // Copy more than 10 characters into the allocated memory.
    // This results in a heap-buffer-overflow error.
    strcpy(p, "This string is too long for the allocated buffer");

    // Don't forget to free your memory
    free(p);

    return 0;
}
alexthillen commented 1 year ago

You can try my fork : Anki add on ; Github Fork It adds a new card type (KaTex and Markdown Basic (Color)) It will look like:

image
EngineNeo commented 1 year ago

Thanks for the fork. While it helped with post-card creation issues, it did not fix card creation issues where the text is borderline unreadable without turning on light mode.

image

alexthillen commented 1 year ago

yes you are right, might take a look at card creation as well. Also cloze is not supported inside code block at this moment unfortunately :/

alexthillen commented 7 months ago

In case you are still interested, it's working fine now.

image