File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 6
6
import math
7
7
import os
8
8
import sys
9
+ import errno
9
10
import re
10
11
import shutil
11
12
import tempfile
@@ -316,8 +317,14 @@ def __init__(self):
316
317
stdin = subprocess .PIPE ,
317
318
stdout = subprocess .PIPE ,
318
319
cwd = self .tmpdir )
319
- except OSError :
320
- raise RuntimeError ("Error starting process '%s'" % self .texcommand )
320
+ except OSError as e :
321
+ if e .errno == errno .ENOENT :
322
+ raise RuntimeError ("Latex command not found. "
323
+ "Install '%s' or change pgf.texsystem to the desired command."
324
+ % self .texcommand
325
+ )
326
+ else :
327
+ raise RuntimeError ("Error starting process '%s'" % self .texcommand )
321
328
test_input = self .latex_header + latex_end
322
329
stdout , stderr = latex .communicate (test_input .encode ("utf-8" ))
323
330
if latex .returncode != 0 :
You can’t perform that action at this time.
0 commit comments