Hi everyone,
I have such an error message:
! LaTeX Error: Missing \begin{document}.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.46 \DeclareUnicodeCharacter{00A4}{\textcurrency}
You're in trouble here. Try typing <return> to proceed.
If that doesn't work, type X <return> to quit.
! Missing = inserted for \ifnum.
<to be read again>
A
l.46 \DeclareUnicodeCharacter{00A4}{\textcurrency}
I was expecting to see `<', `=', or `>'. Didn't.
! Missing number, treated as zero.
<to be read again>
A
l.46 \DeclareUnicodeCharacter{00A4}{\textcurrency}
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
! Missing = inserted for \ifnum.
<to be read again>
A
l.47 \DeclareUnicodeCharacter{00A7}{\textsection}
I was expecting to see `<', `=', or `>'. Didn't.
! Missing number, treated as zero.
<to be read again>
A
l.47 \DeclareUnicodeCharacter{00A7}{\textsection}
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
! Missing = inserted for \ifnum.
<to be read again>
A
l.48 ...lareUnicodeCharacter{00AB}{\guillemotleft}
I was expecting to see `<', `=', or `>'. Didn't.
! Missing number, treated as zero.
<to be read again>
A
l.48 ...lareUnicodeCharacter{00AB}{\guillemotleft}
A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
What is the solution? Thanks
Fonts & Character Sets ⇒ Problem with special characters
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Problem with special characters
Can you post your document preamble, until
The first error message shows, that there's some normal text (no macro) that should be part of the document, not a preamble. This can be a small mistake there. To see that simple text causes this:
We get that error, because "text" has to go to the actual document part.
Stefan
\begin{document}
?The first error message shows, that there's some normal text (no macro) that should be part of the document, not a preamble. This can be a small mistake there. To see that simple text causes this:
Code: Select all
\documentclass{article}
text
\begin{document}
text
\end{document}
Stefan
LaTeX.org admin
Problem with special characters
Hi Stefan,
Thank you. This link was also helpful:
https://tex.stackexchange.com/questions ... ontal-mode
Thank you. This link was also helpful:
https://tex.stackexchange.com/questions ... ontal-mode
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Problem with special characters
Sometimes it's just a small typo in the preamble, so a macro name may become a normal text word, so causing that error.
By the way, the other errors may be because of a character encoding issue, or just errors in consequence of the first one. Often there is a single error, and LaTeX tries to continue compiling but is already in a wrong mode so it cannot recover and throws more errors. Usually I would just check and and fix the first error because of this. For example: if one forgets to end the math mode of an equation, all the other text may be considered as wrong in math mode still, throwing errors, all is fixed after fixing the initially forgotten math mode closing.
Good to see that it's solved.
Stefan
By the way, the other errors may be because of a character encoding issue, or just errors in consequence of the first one. Often there is a single error, and LaTeX tries to continue compiling but is already in a wrong mode so it cannot recover and throws more errors. Usually I would just check and and fix the first error because of this. For example: if one forgets to end the math mode of an equation, all the other text may be considered as wrong in math mode still, throwing errors, all is fixed after fixing the initially forgotten math mode closing.
Good to see that it's solved.
Stefan
LaTeX.org admin