答案1
listings
通过使用与该选项相同的包,\lstinline
可以listings
实现这一点:\verb
breaklines
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{listings}
\lstset{basicstyle=\ttfamily}
\begin{document}
This is my sentence which has some code a little bit later but
\lstinline[breaklines]+RIGHT HERE IN THE LINE+ which is overflowing and does
not seem to want to obey my margin constraints, so I am not entirely sure what
to do with it.
\end{document}