fonol / anki-search-inside-add-card

An add-on providing full-text-search and PDF reading functionality to Anki's Add card dialog
https://ankiweb.net/shared/info/1781298089
GNU Affero General Public License v3.0
178 stars 24 forks source link

Latex #248

Open UseYourFrubbles opened 3 years ago

UseYourFrubbles commented 3 years ago

Latex auto-completing

To Reproduce Steps to reproduce the behavior (with add-on enabled):

  1. Go to 'add'
  2. In any text field, type a latex equation (e.g. ( a^{2} = \frac{b}{c} )
  3. For seconds, it will turn into an uneditable equation

Expected behavior After enclosing latex i.e. seconds after typing ")" it will not be edited. In review, latex equations won't show.

Screenshots

image image Now, I can't edit it and it won't show when reviewing image

Environment (please complete the following information):

fonol commented 3 years ago

Hi thanks for the report, that is weird, I never experienced any problems typing mathjax.

  1. Does the problem occur with other add-ons disabled?
  2. What do you mean with the version 2.1.4? I assume it is not your Anki version, because the add-on only works for 2.1.22+, you shouldn't even be able to download it for 2.1.4
milan-tom commented 3 years ago

Mathjax error

I am also facing this issue with MathJax on Anki v2.1.40 (even with all other add-ons disabled). This issue only occurs when "Search on typing" is enabled. Therefore, I assume that the issue is caused by the rendering of MathJax for the preview of the other cards that are being searched is also leaking over into the card currently being edited, causing the MathJax in the current card to be rendered into an immutable state.

fonol commented 3 years ago

Any error in the console (if you start Anki in console mode)? The add-on loads MathJax into the editor window, but restricts it to the add-on's result "cards". It looks to me like MathJax didn't pick up that restriction for you, and goes over the whole page instead of just the cards. Can't really reproduce the error, but I'll include change with the next update that might fix the issue (although I am sceptical :p).

milan-tom commented 3 years ago

I can't see any errors when opening Anki from command prompt.

milan-tom commented 3 years ago

This issue seems to have been resolved after updating Anki to v2.1.43. Thanks for the help anyway.

OcileCollection commented 2 years ago

@UseYourFrubbles Would it be possible to close this issue. It seems to be resolved with the latest updates.