How can I force LaTeX to 'hyphenate' the following text? Such that the margins are not overridden (see picture). Is there a way to prevent this?
Edit: This is the file after adding -
\documentclass[12pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage{graphicx}
\usepackage{lmodern}
\geometry{a4paper,left=25mm,right=25mm, top=2cm, bottom=2cm}
\begin{document}
\noindent \texttt{LinearDiscriminantAnalysis}, \texttt{QuadraticDiscriminantAnalysis}, \texttt{Perceptron}, \texttt{GaussianNB}, \texttt{LogisticRegression}, \texttt{DecisionTreeClassifier}, \texttt{SVC}, \texttt{MLPClassifier} and \texttt{KNeighborsClassifier}.\\
\\
Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
\end{document}
\texttt{KNeighbors\-Classifier}
– David Carlisle May 1 '18 at 19:36\sloppy
somewhere before the paragraph to give tex a bit of help – David Carlisle May 1 '18 at 19:48\\ \\
to get a blank line in the output – David Carlisle May 1 '18 at 19:54\\ \\
or\noindent
, see my answer where I specified that paragraphs are not indented but are set off with vertical space. You should almost never need\\
outside of tables and two consecutive ones (or one at the end of a paragraph) are always wrong and generate an underfull box of maximum (10000) badness, – David Carlisle May 1 '18 at 20:34\\
never ends a paragraph, if you want to end a paragraph use a blank line. If you want paragraphs to be offset with vertical space and no indent use a document class that uses that design or use the parskip package as I used in my answer. If you use\\
atth eend of a paragraph you will get bad layout and a warning "underfull hbox badness 10000" note that is the maximum badness, tex is telling you the output is as bad as it can be by its internal consistency checking. – David Carlisle May 2 '18 at 20:26