LaTeX 中有一个叫做 verbatim
环境,它可以让您在文档中输入任意文本,并且不会对其进行格式化。
另外还有一个命令 \verb
,它和 verbatim
环境类似,但是它只能用于单行文本。
例如:
\begin{verbatim}
This is some text that will not be formatted.
\end{verbatim}
This is a single line of text with \verb|verbatim-style| formatting.