8000 Merge pull request #5928 from Grillard/master · tacaswell/matplotlib@92f463c · GitHub
[go: up one dir, main page]

Skip to content

Commit 92f463c

Browse files
committed
Merge pull request matplotlib#5928 from Grillard/master
fix for latex call on PS backend closes matplotlib#5923
1 parent 20151c3 commit 92f463c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/backends/backend_ps.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,10 @@ def convert_psfrags(tmpfile, psfrags, font_preamble, custom_preamble,
14641464
# multiple
14651465
if sys.platform == 'win32': precmd = '%s &&'% os.path.splitdrive(tmpdir)[0]
14661466
else: precmd = ''
1467+
#Replace \\ for / so latex does not think there is a function call
1468+
latexfile = latexfile.replace("\\", "/")
1469+
# Replace ~ so Latex does not think it is line break
1470+
latexfile = latexfile.replace("~", "\\string~")
14671471
command = '%s cd "%s" && latex -interaction=nonstopmode "%s" > "%s"'\
14681472
%(precmd, tmpdir, latexfile, outfile)
14691473
verbose.report(command, 'debug')

0 commit comments

Comments
 (0)
0