Show More
@@ -161,9 +161,26 b" def latex_to_png_dvipng(s, wrap, color='Black', scale=1.0):" | |||
|
161 | 161 | |
|
162 | 162 | resolution = round(150*scale) |
|
163 | 163 | subprocess.check_call( |
|
164 | ["dvipng", "-T", "tight", "-D", str(resolution), "-z", "9", | |
|
165 | "-bg", "transparent", "-o", outfile, dvifile, "-fg", color], | |
|
166 | cwd=workdir, stdout=devnull, stderr=devnull) | |
|
164 | [ | |
|
165 | "dvipng", | |
|
166 | "-T", | |
|
167 | "tight", | |
|
168 | "-D", | |
|
169 | str(resolution), | |
|
170 | "-z", | |
|
171 | "9", | |
|
172 | "-bg", | |
|
173 | "Transparent", | |
|
174 | "-o", | |
|
175 | outfile, | |
|
176 | dvifile, | |
|
177 | "-fg", | |
|
178 | color, | |
|
179 | ], | |
|
180 | cwd=workdir, | |
|
181 | stdout=devnull, | |
|
182 | stderr=devnull, | |
|
183 | ) | |
|
167 | 184 | |
|
168 | 185 | with outfile.open("rb") as f: |
|
169 | 186 | return f.read() |
@@ -62,7 +62,6 b' if resource is not None and hasattr(resource, "getrusage"):' | |||
|
62 | 62 | Similar to clock(), but return a tuple of user/system times.""" |
|
63 | 63 | return resource.getrusage(resource.RUSAGE_SELF)[:2] |
|
64 | 64 | |
|
65 | ||
|
66 | 65 | else: |
|
67 | 66 | # There is no distinction of user/system time under windows, so we just use |
|
68 | 67 | # time.perff_counter() for everything... |
General Comments 0
You need to be logged in to leave comments.
Login now