使用缩进在此 LaTeX 文档中插入代码 - Inserting code in this LaTeX document with indentation

问题:

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章