LaTeX forum ⇒ Texmaker and TeXstudio ⇒ Error missing \begin...

Information and discussion about Texmaker, an integrated LaTeX environment for several platforms, and the related TeXstudio
Shaktale
Posts: 2
Joined: Wed Mar 24, 2021 12:37 am

Error missing \begin...

Hello:
I am learning to use latex. This is my first post here. If I put it where it isn't, I'm sorry. I still don't really know how the page works.
The problem I have is:
I decided to change the left and right margins a bit and the following error: "missing \ begin {document}. ... 00cm, top = 2.00cm, bottom = 2.50cm] {geometry}". I put back the values I had before and it keeps giving me the same error. When older, I put a blank page before the title that was not there before. I don't know what it means or why it does it. Can somebody help me? My code is the following:
\documentclass[a4paper,openany,oneside,10pt]{book}

\usepackage[Spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{multicol}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.50cm]{geometry}.
\usepackage{amssymb, amsmath}
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}

\title{{\Huge Técnicas Experimentales I}\\
\large Prácticas de laboratorio }
\author{Raquel Solleiro Vaamonde}
\date{2021}

\begin{document}
text
\end{document}

Bartman
Posts: 179
Joined: Fri Jan 03, 2020 2:39 pm
The topic doesn't fit the sub-forum. It isn't the editor that causes the error message, but the LaTeX program that is used. Please try to start the next topic in an appropriate environment.

At least I find the first error message in the log file:

Package babel Error: Unknown option Spanish'. Either you misspelled it
(babel)                or the language definition file Spanish.ldf was not found.

After resolving this problem, you may encounter the error message you mentioned, which the point triggered after loading the geometry package.

Off topic notes:

The selected font size is already set for this document class.

According to ltnews on CTAN you don't have to load the inputenc package with this option since April 2018.

Shaktale
Posts: 2
Joined: Wed Mar 24, 2021 12:37 am
Thank you very much for your response and sorry for putting the post in the wrong place. As I put in it, I just registered on the page and I still do not know very well how it goes. Sorry for any inconvenience this may have caused.
Thank you very much for your recommendations and for the time spent responding.

Stefan Kottwitz
Posts: 9679
Joined: Mon Mar 10, 2008 9:44 pm
Hi Shaktale,

welcome to the forum!

Btw. I think the babel option should be in small letters:

\usepackage[spanish]{babel}

Though babel versions make take the capitalized Spanish as an alias.

I had to think twice to understand that Bartman meant the actual period/point/dot after the geometry line, since I was looking for a point in the meaning of an idea or cause.

This also compiles in the forum here, when I click the "Run LaTeX here" button:

\documentclass[a4paper,openany,oneside,10pt]{book}

\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{multicol}
\usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.50cm]{geometry}
\usepackage{amssymb, amsmath}
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}

\title{{\Huge Técnicas Experimentales I}\\
\large Prácticas de laboratorio }
\author{Raquel Solleiro Vaamonde}
\date{2021}

\begin{document}
\maketitle
text
\end{document}`

Stefan