LaTeX compilation in TextMate sometimes throws a parsing error. Others have experienced the same problem, but AFAIK, no solution has been found yet (see https://stackoverflow.com/questions/74837558/pb-latex-compilation-with-textmate-under-os-ventura-13 for example). This error is not related to LaTeX: the document compiles just fine using the terminal.

Now, I did investigate a bit, and it seems that the culprits may be accented characters, hyphenation and \usepackage[T1]{fontenc} (that I thought to be mandatory for correct hyphenation when using accented characters... )

Here is a MWE, that typesets fine when the fontenc package is not used, but fails when it is.

\usepackage[T1]{fontenc} % If this line is commented, everything goes smoothly

\begin{minipage}[t]{3cm} % A narrow minipage to force some hyphenation
   éèàéééééééù éèàéééééééù some text with accented characters

The error:

Traceback (most recent call last): 
File "/Users/johndoe/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/bin/texmate.py", line 1054, in status = run_latex(command, filename, cache_filename, verbose) 
File "/Users/johndoe/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/bin/texmate.py", line 228, in run_latex fatal, errors, warnings = lp.parse_stream() 
File "/Users/johndoe/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/Python/parsing.py", line 611, in parse_stream return super(LaTexParser, self).parse_stream() 
File "/Users/johndoe/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/Python/parsing.py", line 195, in parse_stream line = self.get_rewrapped_line() 
File "/Users/johndoe/Library/Application Support/TextMate/Managed/Bundles/LaTeX.tmbundle/Support/lib/Python/parsing.py", line 140, in get_rewrapped_line line = to_utf8(self.input_stream.readline()) 
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) 
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 77: invalid continuation byte

Alas, I do not know how to investigate any further. Any idea on why this is happening would be most welcome!

P.S. I'm on MacOS 12.6.3, TextMate 2.0.23 with up-to-date bundles, TeXLive 2022 (also up-to-date).

  • the problem is probably that something that is not utf8 is written to the log-file or to some console (it writes []\T1/cmr/m/n/10 éèàéééééééù encoded in 8-bit (latin1) in my log). There was a similar looking issue once in miktex github.com/MiKTeX/miktex/issues/581. There is not much one can do on the latex site, report this to textmate. Commented Feb 2, 2023 at 14:47
  • Thank you Ulrike for the clues, it seems similar indeed. I have also reported to TextMate, but I tried here anyway in case someone had the issue already (and it more responsive also ;-) ).
    – Bibi
    Commented Feb 3, 2023 at 8:11

1 Answer 1


In case someone lands here: the issue has been solved (see https://github.com/textmate/latex.tmbundle/issues/198).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .