使用 RestructuredText 和 Sphinx 来包含预先格式化的文件 [英] Using RestructuredText and Sphinx to include a preformatted file
本文介绍了使用 RestructuredText 和 Sphinx 来包含预先格式化的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在努力使这个片段工作:
I'm trying to make this fragment work:
Version History
---------------
These are the versions over time::
.. include:: ../../CHANGES.txt
也就是说,使用 include 指令,以便将文件作为块引用包含在内.一旦进入块引用,指令就会被引用.我想要块引用中的文件内容.
That is, use the include directive so that a file is included as a block quote. Once inside a block quote, the directive is quoted. I want the contents of the file in a block quote.
知道怎么做吗?
推荐答案
我认为 ..literalinclude:: 指令应该给你你想要的.
I think the .. literalinclude:: directive should give you what you want.
这篇关于使用 RestructuredText 和 Sphinx 来包含预先格式化的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文