Kon*_*lph 18
基本上你不能.
但是listings,实际用途是格式化源代码的包确实支持自动换行.所以也许你可以改用listings环境.
use*_*007 13
以下是该listings软件包的完整示例:
\documentclass{report}
\usepackage{listings}
\lstset{breaklines=true}
\begin{document}
\begin{lstlisting}
some text here
\end{lstlisting}
\end{document}
Run Code Online (Sandbox Code Playgroud)
您还可以为行编号和_background_color 添加以下定义:
\lstset{numbers=left, numberstyle=\scriptsize\ttfamily, numbersep=10pt, captionpos=b}
\lstset{backgroundcolor=\color{gray-5}}
\lstset{basicstyle=\small\ttfamily}
\lstset{framesep=4pt}
Run Code Online (Sandbox Code Playgroud)
为内联代码添加此内容:
\newcommand{\inlineCode}{\lstinline[basicstyle=\normalsize\ttfamily]}
Run Code Online (Sandbox Code Playgroud)