GeneralInvalid character in line 4?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
skrat
Posts: 11
Joined: Fri Sep 05, 2014 5:22 pm

Invalid character in line 4?

Post by skrat »

I am losing my mind here. I am using Texmaker 4.4.1 and I am getting an error that should not be there!

The error says:
! Text line contains an invalid character. in line 4 yet here are my first 10 lines:

Code: Select all

\documentclass[titlepage]{article}
\usepackage[utf8]{inputenc}
\usepackage[slovene]{babel}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{enumerate}
\usepackage{rotating}
\usepackage{amsmath}
\usepackage{listings}
\usepackage{multirow}
I have absolutely no idea what to do! But the file is rather long and has been compiled before but now suddenly not anymore and I can't find the error. Attached I am sending the latex file (saddly not in english language)
Lab_cetrta.tex
(19.36 KiB) Downloaded 232 times
Thank you!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Invalid character in line 4?

Post by Stefan Kottwitz »

Hi skrat,

welcome to the forum!

Your attached file runs for me without any problem. The only error messages refer to the missing pictures, but that's fine as they are not here.

Can you post your .log file?

Stefan
LaTeX.org admin
skrat
Posts: 11
Joined: Fri Sep 05, 2014 5:22 pm

Re: Invalid character in line 4?

Post by skrat »

Hi Stefan,

I would love to. Is that the .txt file?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Invalid character in line 4?

Post by Stefan Kottwitz »

That's the .log file. :-) So the file with the file name extension .log, not .txt.
It should be in the same folder / directory.

Stefan
skrat
Posts: 11
Joined: Fri Sep 05, 2014 5:22 pm

Re: Invalid character in line 4?

Post by skrat »

Hi Stefan,

Ok, what I did is... I deleted all files except the .tex file, compiled it again and now everything works nicely. Don't ask me how and why. :D

But thank you for giving me that idea! You saved my life!
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Invalid character in line 4?

Post by Stefan Kottwitz »

Great!

Sometime there's an issue in the .aux file. Deleting that one could already help.

Let us know if anything else occurs!

Stefan
LaTeX.org admin
Post Reply