2013-02-11 93 views

回答

5

您可以使用以下方法:

.. class:: center 

This paragraph will be centered. 
1

如果你想在rst2html.py(docutils的0.12)使用中央標籤(如上所述),你應該創建一個CSS文件,即通過mystyle.css加入如下一行到它:

.center {text-align: center;} 

對於轉換您的第一個文件,即myrst.rst到HTML文件,請使用以下命令

rst2html myrst.rst myrst.html --stylesheet=mystyle.css,html4css1.css 

通過使用此方法,以下代碼運行良好。

.. class:: center 

This paragraph will be centered. 
相關問題