1

Possible Duplicate:
LaTeX baffled by BOM---Unicode's byte order mark.

I have a large text file in .docx format, and I used LibreOffice to convert it to plain text so I could nicely format it with LaTeX.

I've fixed as many of the problems as I could find (unescaped %s, etc), but there's one persistent bug in the document that still remains.

When I run LaTeX, I get as an error:

! LaTeX Error: Missing \begin{document}.
...
l.1 
     ��%\documentclass{article}

My preamble consists of

\documentclass{article}
\begin{document}

so I'm definitely not just missing a \begin{document}.

I suspect the ��% means that LibreOffice put a few unicode characters at the beginning of the file (I don't know what the � is, it just shows up as a question mark on my computer), and that this is causing LaTeX to fail somehow.

If these characters are the problem, how do I remove them?

If these characters aren't the problem, what else could it be?

Dan
  • 869

0 Answers0