Using RestructuredText and Sphinx to include a preformatted file

旧城冷巷雨未停 提交于 2019-12-07 05:23:47

问题


I'm trying to make this fragment work:

Version History
---------------

These are the versions over time::

    .. include:: ../../CHANGES.txt 

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.

Any idea how to do this?


回答1:


I think the .. literalinclude:: directive should give you what you want.



来源:https://stackoverflow.com/questions/2465080/using-restructuredtext-and-sphinx-to-include-a-preformatted-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!