Show More
@@ -45,7 +45,9 b' def print_basic_unicode(o, p, cycle):' | |||
|
45 | 45 | |
|
46 | 46 | |
|
47 | 47 | def print_png(o): |
|
48 | """A function to display sympy expression using LaTex -> PNG.""" | |
|
48 | """ | |
|
49 | A function to display sympy expression using inline style LaTeX in PNG. | |
|
50 | """ | |
|
49 | 51 | s = latex(o, mode='inline') |
|
50 | 52 | # mathtext does not understand certain latex flags, so we try to replace |
|
51 | 53 | # them with suitable subs. |
@@ -56,9 +58,13 b' def print_png(o):' | |||
|
56 | 58 | |
|
57 | 59 | |
|
58 | 60 | def print_display_png(o): |
|
59 | """A function to display sympy expression using LaTex -> PNG.""" | |
|
61 | """ | |
|
62 | A function to display sympy expression using display style LaTeX in PNG. | |
|
63 | """ | |
|
60 | 64 | s = latex(o, mode='plain') |
|
61 | 65 | s = s.strip('$') |
|
66 | # As matplotlib does not support display style, dvipng backend is | |
|
67 | # used here. | |
|
62 | 68 | png = latex_to_png('$$%s$$' % s, backend='dvipng') |
|
63 | 69 | return png |
|
64 | 70 |
General Comments 0
You need to be logged in to leave comments.
Login now