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