Jwrede / Anki-KaTeX-Markdown

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

Issue about Katex #9

Closed pilgrimlyieu closed 3 years ago

pilgrimlyieu commented 3 years ago

1 2 What's wrong with it? I have OCD. πŸ˜‚ Please rescue me! The mathrm font doesn't work.

$\begin{cases}\sin\alpha\sin\beta=\dfrac{1}{2}[\sin(\alpha+\beta)+\sin(\alpha-\beta)]\\\sin\alpha\cos\beta=-\dfrac{1}{2}[\cos(\alpha+\beta)-\cos(\alpha-\beta)]\\\cos\alpha\cos\beta=\dfrac{1}{2}[\cos(\alpha+\beta)+\cos(\alpha-\beta)]\end{cases}$

The problem doesn't happen in AnkiDroid so it would not trouble meπŸ˜‚.

ficapy commented 3 years ago

What's wrong with it? I have OCD. πŸ˜‚ Please rescue me! The mathrm font doesn't work.

Maybe you should give the original input instead of only screenshots, it would be easier to identify the problem

pilgrimlyieu commented 3 years ago

What's wrong with it? I have OCD. πŸ˜‚ Please rescue me! The mathrm font doesn't work.

Maybe you should give the original input instead of only screenshots, it would be easier to identify the problem

Thanks you for reminding me!

Jwrede commented 3 years ago

I think this has to do with the syntax highlighting you're using in the program you are copying the input from, Anki pastes not only the text but the syntax highlighting as well, can you copy the text as it is in anki into a comment here?

pilgrimlyieu commented 3 years ago

I think this has to do with the syntax highlighting you're using in the program you are copying the input from, Anki pastes not only the text but the syntax highlighting as well, can you copy the text as it is in anki into a comment here?

$\begin{cases}\sin\alpha\sin\beta=\dfrac{1}{2}[\sin(\alpha+\beta)+\sin(\alpha-\beta)]\\\sin\alpha\cos\beta=-\dfrac{1}{2}[\cos(\alpha+\beta)-\cos(\alpha-\beta)]\\\cos\alpha\cos\beta=\dfrac{1}{2}[\cos(\alpha+\beta)+\cos(\alpha-\beta)]\end{cases}$
pilgrimlyieu commented 3 years ago

I think this has to do with the syntax highlighting you're using in the program you are copying the input from, Anki pastes not only the text but the syntax highlighting as well, can you copy the text as it is in anki into a comment here?

Aha, the problem is solved when I copy again from this:)

Jwrede commented 3 years ago

Try copying it without a code block in github, github strips the css from the input if it's in a code block

pilgrimlyieu commented 3 years ago

Thanks for your help and paticnt!

Jwrede commented 3 years ago

Yea if you take the original text where the problem was and then press ctrl+shift+x you'll see there are alot of HTML classes that don't belong there, this is because Anki copies text color or bold text as well

pilgrimlyieu commented 3 years ago

1 2

$\begin{cases}\sin\alpha+\sin\beta={{c1::2\sin\dfrac{\alpha+\beta}{2}\cos\dfrac{\alpha-\beta}{2}}}\\\sin\alpha-\sin\beta={{c2::2\cos\dfrac{\alpha+\beta}{2}\sin\dfrac{\alpha-\beta}{2}}}\\\cos\alpha+\cos\beta={{c3::2\cos\dfrac{\alpha+\beta}{2}\cos\dfrac{\alpha-\beta}{2}}}\\\cos\alpha-\cos\beta={{c4::-2\sin\dfrac{\alpha+\beta}{2}\sin\dfrac{\alpha-\beta}{2}}}\end{cases}$

New problem! I am dizzy now.