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}

```

[![A PDF generated from the previous code. The second line is too long.](https://i.stack.imgur.com/nABtm.png)](https://i.stack.imgur.com/nABtm.png)
I can manually insert `\linebreak`s to fix this, but that feels clunky. Are there any better options?