Support a way to import images
Closed this issue · 3 comments
It would be nice to have a way to import images using the usual latex commands -- or, if there already is a way to achieve this, to explain this in the user doc. Thanks for this wonderful plugin.
Regards
There are at least two questions here:
- Is it possible to include graphics in Anki notes via LaTeX?
- Can the importer somehow „import the image files“, i.e. copy them to a place where Anki finds them?
The answer to (1) seems to be yes, though I’ve never tried it myself. Have a look at this stackoverflow thread, for example. I’ve also had a report of success for the command \includegraphics[natwidth=550,natheight=642]{path}
. I agree that it would be nice to include some advice on this in the documentation, so if you have any success, please let me know and/or edit the docs accordingly.
As for (2), the answer is: no, not at the moment. Perhaps with a better understanding of (1) (i.e. of what actually needs to be done), this functionality could be added, but I don’t think I’ll have enough time on my hands in the near future to look into this.
Somewhat related: Importing a plain field converts < and > to their html equivalents < and > - without this behaviour, images and gifs could be displayed via <img src = ... >. Is there a way to circumvent this?
Thanks for the amazing tool btw!
I think that would be against the philosophy of this add-on. The internal format of Anki is html. In order to write cards in html, you do not need an add-on. Also, any built-in import tool should work well with html. So if you want to include images with <img src = ... >
, you're most likely looking at the wrong tool here. LaTeX-Note-Importer aims to provide a plain-text interface. The conversion of "<", ">", "&" etc. is exactly what it is supposed to do.