The attached patches for 1.4.x and 1.5.x work for me. Please test.
- writeToFile('a b.tex', r'\nonstopmode\message{working^^J}' ) - if ''.join(cmdOutput(LATEX + ' "a b"')).find('working') != -1: + writeToFile('a b.tex', r'\message{working^^J}' ) + if os.name == 'nt': + latex_out = ''.join(cmdOutput(LATEX + ' "\\nonstopmode\\input{\\"a b\\"}"'))
use r' ' and tripple quote can reduce the use of backslash. Something like LATEX + r' ''\nonstopmode\inout{\"a b'"}}' )) + else: + latex_out = ''.join(cmdOutput(LATEX + ' \'\\nonstopmode\input{"a b"}\'')) I think find (or even simpler 'working' in latex_out) can handle new lines, so ''.join is not needed. I will test the patches. Bo