Some lines in my document are italicized, with no spaces between words, and continue after the edge of the document. The rest of the document is fine. Here is the beginning:
\documentclass[runningheads]{llncs}
\usepackage{graphicx}
\usepackage{float}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage[explicit]{titlesec}
\usepackage{amsmath,amssymb} % define this before the line numbering.
\usepackage[width=122mm,left=12mm,paperwidth=146mm,height=193mm,top=12mm,paperheight=217mm]{geometry}
\begin{document}
\pagestyle{headings}
And then, for example:
\subsection{b)}\\
\\
Given that h(n) is admissible, the algorithm will be optimal for:\\
f(n)=(2-w)[g(n) + w/(2-w)h(n)]
\\
when w/(2-w) \leq 1, that is when w \leq 1 the algorithm is optimal.\\ It
behaves like an A* algorithm following the heuristic:
f(n) = g(n) + w/(2-w) h(n)
And below is the result:
Any help is appreciated!

tabularfor tables) and as a last resort to help TeX break lines. Use them sparingly. I really recommend you check out a starter guide http://tex.stackexchange.com/questions/11/what-are-good-learning-resources-for-a-latex-beginner – Au101 Nov 11 '15 at 02:18