Make dvipng use transparent background by default (#2036)

* make dvipng use transparent background by default

Note that if using all-lowercase 'transparent', it will give "a simple fully transparent background with non-transparent antialiased pixels", which is unnecessary.

* latex.py: format
This commit is contained in:
gnnoh 2022-08-31 16:49:22 +08:00 committed by GitHub
parent 0eaa80dd28
commit e4f1d9952b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,18 @@ from anki.utils import call, is_mac, namedtmp, tmpdir
pngCommands = [
["latex", "-interaction=nonstopmode", "tmp.tex"],
["dvipng", "-D", "200", "-T", "tight", "tmp.dvi", "-o", "tmp.png"],
[
"dvipng",
"-bg",
"Transparent",
"-D",
"200",
"-T",
"tight",
"tmp.dvi",
"-o",
"tmp.png",
],
]
svgCommands = [