diff --git a/converters/latex_transformer.py b/converters/latex_transformer.py index 30ab44b..7f8e018 100644 --- a/converters/latex_transformer.py +++ b/converters/latex_transformer.py @@ -63,6 +63,9 @@ def remove_math_space(text): math_lines += 1 if math_lines > 1: within_math = False + ptext = ptext+text[math_start_index:index]+"\n" + print 'catching up with --',text[math_start_index:index],'--' + # Remember the last character so we can easily watch # for backslashes last_character = char diff --git a/nbconvert2.py b/nbconvert2.py index b0f947e..3b7f527 100755 --- a/nbconvert2.py +++ b/nbconvert2.py @@ -128,7 +128,7 @@ class NbconvertApp(Application): if not os.path.exists(out_root+'_files'): os.mkdir(files_dir) for key in keys: - with io.open(os.path.join(files_dir, key), 'wb') as f: + with io.open(os.path.join(files_dir, key), 'w') as f: f.write(resources['figures'][key]) elif self.stdout: print('''====================== Keys in Resources ==================================''')