Show More
@@ -151,9 +151,26 b" def latex_to_png_dvipng(s, wrap, color='Black', scale=1.0):" | |||
|
151 | 151 | |
|
152 | 152 | resolution = round(150*scale) |
|
153 | 153 | subprocess.check_call( |
|
154 | ["dvipng", "-T", "tight", "-D", str(resolution), "-z", "9", | |
|
155 | "-bg", "transparent", "-o", outfile, dvifile, "-fg", color], | |
|
156 | cwd=workdir, stdout=devnull, stderr=devnull) | |
|
154 | [ | |
|
155 | "dvipng", | |
|
156 | "-T", | |
|
157 | "tight", | |
|
158 | "-D", | |
|
159 | str(resolution), | |
|
160 | "-z", | |
|
161 | "9", | |
|
162 | "-bg", | |
|
163 | "Transparent", | |
|
164 | "-o", | |
|
165 | outfile, | |
|
166 | dvifile, | |
|
167 | "-fg", | |
|
168 | color, | |
|
169 | ], | |
|
170 | cwd=workdir, | |
|
171 | stdout=devnull, | |
|
172 | stderr=devnull, | |
|
173 | ) | |
|
157 | 174 | |
|
158 | 175 | with open(outfile, "rb") as f: |
|
159 | 176 | 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