Fonts & Character Sets ⇒ Problem with special characters
Problem with special characters
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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Problem with special characters
\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
Problem with special characters
Thank you. This link was also helpful:
https://tex.stackexchange.com/questions ... ontal-mode
- Stefan Kottwitz
- Site Admin
- Posts: 10360
- Joined: Mon Mar 10, 2008 9:44 pm
Problem with special characters
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