可以从 reStructuredText 文件导入文本并放入其他文件吗?
It is possible to import text from reStructuredText File and put into other file?
我有两个文件 engine.rst 和 car.rst
在文件中 engine.rst
|
Engine
======
V8 Engine with turbo
文件car.rst
.. _Engine: engine.rst
|
Car
======
Ford Mustang
Engine
------
`Engine`_
我想在car.rst中包含engine.rst的内容,因为我需要在多个文件中使用engine.rst
最后我可以添加包含其他文件的文本,但该文件必须是 .txt 以避免警告所以我的代码如下:
文件car.rst
|
Car
======
Ford Mustang
Engine
------
.. include:: engine.txt
我有两个文件 engine.rst 和 car.rst 在文件中 engine.rst
|
Engine
======
V8 Engine with turbo
文件car.rst
.. _Engine: engine.rst
|
Car
======
Ford Mustang
Engine
------
`Engine`_
我想在car.rst中包含engine.rst的内容,因为我需要在多个文件中使用engine.rst
最后我可以添加包含其他文件的文本,但该文件必须是 .txt 以避免警告所以我的代码如下:
文件car.rst
|
Car
======
Ford Mustang
Engine
------
.. include:: engine.txt