Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e6b9604

Browse filesBrowse files
committed
Fix for latex call on PS backend on windows
Sometimes, the filename for "latexfile" ends up in the short 8.3 format on windows, but latex does not like the `~ ` in the filename.
1 parent 2a4863c commit e6b9604
Copy full SHA for e6b9604

File tree

Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-0
lines changed

‎lib/matplotlib/backends/backend_ps.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_ps.py
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,10 @@ def convert_psfrags(tmpfile, psfrags, font_preamble, custom_preamble,
14521452
# multiple
14531453
if sys.platform == 'win32': precmd = '%s &&'% os.path.splitdrive(tmpdir)[0]
14541454
else: precmd = ''
1455+
#Replace \\ for / so latex does not think there is a function call
1456+
latexfile = latexfile.replace("\\", "/")
1457+
# Replace ~ so Latex does not think it is line break
1458+
latexfile = latexfile.replace("~", "\\string~")
14551459
command = '%s cd "%s" && latex -interaction=nonstopmode "%s" > "%s"'\
14561460
%(precmd, tmpdir, latexfile, outfile)
14571461
verbose.report(command, 'debug')

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.