Had same problem with using latexmain and non-existent files causing IOError.
I modified outline.py by adding try and except.
# This longish thing is to make sure that all files are converted into
# \n seperated lines.
try:
contents = '\n'.join(open(fname).read().splitlines())
# TODO what are all the ways in which a tex file can include another?
pat = re.compile(r'^\\(@?)(include|input){(.*?)}', re.M)
contents = re.sub(pat, lambda input: getFileContents(input, ext),
contents)
except IOError:
contents = 'NONE\n'
return ('%%==== FILENAME: %s' % fname) + '\n' + contents
Dont know much python so dont know if this correct but seems to work. I am sure
someone out there can improve it.
Tom
|