If I have long words inside \texttt blocks, in my case for writing about variable names, sometimes the word-wrapping doesn't quite work, resulting in slightly-too-long lines.
\documentclass{report}
\begin{document}
Most of the time, LaTeX line-wrapping works fine. However, sometimes when I'm writing about code with lots of \texttt{long\_monospace\_variables}, \texttt{the\_line\_wrapping} doesn't quite get the position correct resulting in slightly-too-long lines.
\end{document}
I can manually insert \linebreaks to fix this, but that feels clunky. Are there any better options?



\texttt{long\_monospace\_variables}to be broken? – Manuel Jun 18 '16 at 09:05