问题:
How do I insert code into a LaTeX document?如何在 LaTeX 文档中插入代码? Is there something like:有没有类似的东西:
\begin{code}## Heading ##
...
\end{code}
The only thing that I really need is indentation and a fixed width font.我唯一真正需要的是缩进和固定宽度的字体。 Syntax highlighting could be nice although it is definitely not required.语法高亮可能很好,尽管它绝对不是必需的。
解决方案:
参考一: https://stackoom.com/question/DJzN参考二: Inserting code in this LaTeX document with indentation