[TxMt] Re: sudden latex tidy and latex compiling errors

René Schwaiger sanssecours at f-m.fm
Wed Feb 11 23:05:40 UTC 2015


Hi Anthony,

> Traceback (most recent call last): File "/Users/Anthony/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/bin/texmate.py", line 1061, in status = run_latex(command, filename, cache_filename, verbose) File "/Users/Anthony/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/bin/texmate.py", line 224, in run_latex fatal, errors, warnings = lp.parse_stream() File "/Users/Anthony/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/parsing.py", line 603, in parse_stream return super(LaTexParser, self).parse_stream() File "/Users/Anthony/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/parsing.py", line 187, in parse_stream line = self.get_rewrapped_line() File "/Users/Anthony/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/parsing.py", line 135, in get_rewrapped_line statement += line.rstrip('\n') UnicodeDecodeError: 'utf8' codec can't decode byte 0xa4 in position 1: invalid start byte

It looks like an encoding problem. The log file is probably encoded in something exotic like `T1`, but we try to read it using `utf-8`. This works as long as the log file only contains characters in the range 0-127, but might fail if the characters are in a different range. 

The thing is, that I already tested the recent changes with logs containing unicode characters[1].

[1]: https://github.com/textmate/latex.tmbundle/blob/master/Tests/Log/ünicöde.log

The tests work fine for me. I also could not reproduce the errors you mentioned. I translated a file `unicöde.tex` with the following content:

\documentclass[a4paper, 12pt]{report}
\usepackage{times}

\pdfmapfile{=mtpro2.map}
\usepackage[mtphrb,subscriptcorrection,lite]{mtpro2}

\begin{document}
$e^{i\cdot\pi}=-1$
\end{document}

> I don't think it is a problem with the latex syntax, since the file seems to work in the modes described above. 

You are most certainly right, the syntax is not the problem. Other users have the same problem too[2] :(

[2]: https://github.com/textmate/latex.tmbundle/issues/117  

> Any ideas?

For now a sample document that reproduces the error — on my machine — would be super helpful. Sorry again for the inconvenience.

> Anthony

Kind regards,
  René


More information about the textmate mailing list