But the listings package, whose actual purpose is to format source code, does support word wrapping. So maybe you can use the listings environment instead.
\documentclass{report}
\usepackage{listings}
\lstset{breaklines=true}
\begin{document}
\begin{lstlisting}
some text here
\end{lstlisting}
\end{document}
Here is the full example for the listings package:
\documentclass{report}
\usepackage{listings}
\lstset{breaklines=true}
\begin{document}
\begin{lstlisting}
some text here
\end{lstlisting}
\end{document}
You might also add the following definitions for line numbering and _background_color:
发布评论
评论(2)
本质上你不能。
但是
listings
包的实际目的是格式化源代码,它确实支持自动换行。因此,也许您可以改用listings
环境。Essentially you can’t.
But the
listings
package, whose actual purpose is to format source code, does support word wrapping. So maybe you can use thelistings
environment instead.以下是
listings
包的完整示例:您还可以为行编号和 _background_color 添加以下定义:
为内联代码添加以下定义:
Here is the full example for the
listings
package:You might also add the following definitions for line numbering and _background_color:
Add this for inline code: