From eab708fce88447b819c488c228ad901dd1e6d1eb 2021-12-06 18:36:13 From: Ben Greiner Date: 2021-12-06 18:36:13 Subject: [PATCH] use alphachannel for aliased png latex --- diff --git a/IPython/lib/latextools.py b/IPython/lib/latextools.py index 540d3f5..a7bb08d 100644 --- a/IPython/lib/latextools.py +++ b/IPython/lib/latextools.py @@ -161,9 +161,26 @@ def latex_to_png_dvipng(s, wrap, color='Black', scale=1.0): resolution = round(150*scale) subprocess.check_call( - ["dvipng", "-T", "tight", "-D", str(resolution), "-z", "9", - "-bg", "transparent", "-o", outfile, dvifile, "-fg", color], - cwd=workdir, stdout=devnull, stderr=devnull) + [ + "dvipng", + "-T", + "tight", + "-D", + str(resolution), + "-z", + "9", + "-bg", + "Transparent", + "-o", + outfile, + dvifile, + "-fg", + color, + ], + cwd=workdir, + stdout=devnull, + stderr=devnull, + ) with outfile.open("rb") as f: return f.read() diff --git a/IPython/utils/timing.py b/IPython/utils/timing.py index 32741ac..92f6883 100644 --- a/IPython/utils/timing.py +++ b/IPython/utils/timing.py @@ -62,7 +62,6 @@ if resource is not None and hasattr(resource, "getrusage"): Similar to clock(), but return a tuple of user/system times.""" return resource.getrusage(resource.RUSAGE_SELF)[:2] - else: # There is no distinction of user/system time under windows, so we just use # time.perff_counter() for everything...