LaTeX forum ⇒ Generalstrange build error

LaTeX specific issues not fitting into one of the other forums of this category.
yotama9
Posts: 61
Joined: Thu Sep 24, 2009 2:59 pm

strange build error

Postby yotama9 » Sun Nov 15, 2009 6:15 pm

Hi.

I can't compile my latex document. On texmaker I get 100 error of the following type:

  1. ! Text line contains an invalid character.
  2. l.2
  3.  
  4. A funny symbol that I can't read has just been input.
  5. Continue, and I'll forget that it ever happened.


here is the beginning of the document:

  1. \documentclass[titlepage]{report}
  2. \usepackage{amsmath}


on texwork I get:
  1. ! Text line contains an invalid character.
  2. l.2


what's going on?

Thanks.

Yotam

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Sun Nov 15, 2009 6:28 pm

Create a new file with these two lines and a minimal document. Do not copy them but type them new and try again.


Best regards
Thorsten
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

yotama9
Posts: 61
Joined: Thu Sep 24, 2009 2:59 pm

Postby yotama9 » Sun Nov 15, 2009 6:43 pm

I created hello world! file and it worked just fine:

  1. \documentclass[titlepage]{report}
  2. \usepackage{amsmath}
  3. \begin{document}
  4. hello world!
  5. \end{document}

yotama9
Posts: 61
Joined: Thu Sep 24, 2009 2:59 pm

Postby yotama9 » Mon Nov 16, 2009 4:19 pm

I created a new document and copied all my thesis there apart from the \usepakcage{}s. I add all the packages manually and latex would work fine. I then removed all the openning text from the first document including the first paragraph and tried. I got the expected error of now \begin{document}. When I copied the relevant part from the new document I got the same error.

User avatar
localghost
Site Moderator
Posts: 9204
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Mon Nov 16, 2009 5:42 pm

Reduce the problem to a minimal working example (MWE) to make it comprehensible. Perhaps there is an invisible character (or more) in your code. Put all the files together in an archive and attach it to your next post.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

yotama9
Posts: 61
Joined: Thu Sep 24, 2009 2:59 pm

Postby yotama9 » Tue Nov 17, 2009 1:54 pm

I copied the file and the copy is fine.

Also, I edited the file to include the following:

\begin{document}
hello world!
\end{document}

and I get the same error. I have attached the file.
Attachments
thesis.tex
(44 Bytes) Downloaded 286 times

vezous
Posts: 1
Joined: Mon Jul 02, 2012 9:24 pm

Postby vezous » Mon Jul 02, 2012 9:47 pm

I checked the document for bad characters (I sometimes turn my keyboard to cyrilic while falling asleep above the keyboard) and there was none, still this error was there.

It helped me to delete all the files produced during compiling (*.aux, *.log, *.gz, *.toc).

NeilPhan
Posts: 1
Joined: Thu Aug 16, 2012 6:46 pm

Postby NeilPhan » Thu Aug 16, 2012 6:55 pm

I found the reason why that happened.
You just copy the entire document in Latex to a new document and compile again.
It normally happens when I copy some texts from Microsoft Word to Latex. Maybe Microsoft Word text has some invisible crazy characters.

josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Postby josephwright » Thu Aug 16, 2012 8:07 pm

Which editor are you using? Some add a 'byte order marker' at the start of files, and this will confuse TeX as it does not recognise this concept.
Joseph Wright


Return to “General”

Who is online

Users browsing this forum: No registered users and 6 guests