mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
allow includegraphics in latex
This commit is contained in:
parent
70008a8f40
commit
adf4f4687c
1 changed files with 2 additions and 1 deletions
|
@ -72,9 +72,10 @@ def _buildImg(col, latex, fname, model):
|
||||||
model["latexPost"])
|
model["latexPost"])
|
||||||
latex = latex.encode("utf8")
|
latex = latex.encode("utf8")
|
||||||
# it's only really secure if run in a jail, but these are the most common
|
# it's only really secure if run in a jail, but these are the most common
|
||||||
|
tmplatex = latex.replace("\\includegraphics", "")
|
||||||
for bad in ("write18", "\\readline", "\\input", "\\include", "\\catcode",
|
for bad in ("write18", "\\readline", "\\input", "\\include", "\\catcode",
|
||||||
"\\openout", "\\write", "\\loop", "\\def", "\\shipout"):
|
"\\openout", "\\write", "\\loop", "\\def", "\\shipout"):
|
||||||
if bad in latex:
|
if bad in tmplatex:
|
||||||
return _("""\
|
return _("""\
|
||||||
For security reasons, '%s' is not allowed on cards. You can still use \
|
For security reasons, '%s' is not allowed on cards. You can still use \
|
||||||
it by placing the command in a different package, and importing that \
|
it by placing the command in a different package, and importing that \
|
||||||
|
|
Loading…
Reference in a new issue