Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 49bd18a

Browse files
committed
Make LaTeX preview show things in displaymath mode, since that's what
we're trying to emulate. svn path=/trunk/matplotlib/; revision=3672
1 parent aec132e commit 49bd18a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

examples/mathtext_examples.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
import os, sys
3+
import os, sys, re
44

55
stests = [
66
r'Kerning: AVA $AVA$',
@@ -66,6 +66,7 @@ def doall():
6666
fd.write("\\begin{enumerate}\n")
6767

6868
for i, s in enumerate(stests):
69+
s = re.sub(r"(?<!\\)\$", "$$", s)
6970
fd.write("\\item %s\n" % s)
7071

7172
fd.write("\\end{enumerate}\n")

0 commit comments

Comments
 (0)