如何在单词之间添加额外的水平空格

时间:2015-02-05 23:12:01

标签: python-sphinx restructuredtext

我想在单词之间留出更多空间。我不希望这是一个全局设置,但我想在某些地方使用它,例如在尝试显示文件格式示例时

-0.906638958281220     -0.657018016704405     -0.728731730614787\n
-0.786972436949130     -0.657627328226054     -0.787627155672891\n
-0.777310920528387     -0.784783890438497     -0.593932422372214\n
 0.995954003399787     -0.696941212792459     -0.096196347815229\n
-0.900490089683701     -0.833132404483661      0.228899514508313\n
-0.934597263489565     -0.763072730515099      0.417292195793138\n
-0.802394301831597     -0.767756191733287      0.691687709627505\n

sphinx'make html'输出将自动删除多个空格,它将如下所示

-0.906638958281220 -0.657018016704405 -0.728731730614787
-0.786972436949130 -0.657627328226054 -0.787627155672891
-0.777310920528387 -0.784783890438497 -0.593932422372214
0.995954003399787 -0.696941212792459 -0.096196347815229
-0.900490089683701 -0.833132404483661 0.228899514508313
-0.934597263489565 -0.763072730515099 0.417292195793138
-0.802394301831597 -0.767756191733287 0.691687709627505

由于

1 个答案:

答案 0 :(得分:2)

使用:: code blocks可以解决问题

some text above
::
LEAVE AN EMPTY LINE
    -0.906638958281220     -0.657018016704405     -0.728731730614787
    -0.786972436949130     -0.657627328226054     -0.787627155672891
    -0.777310920528387     -0.784783890438497     -0.593932422372214
     0.995954003399787     -0.696941212792459     -0.096196347815229
    -0.900490089683701     -0.833132404483661      0.228899514508313
    -0.934597263489565     -0.763072730515099      0.417292195793138
    -0.802394301831597     -0.767756191733287      0.691687709627505
LEAVE AN EMPTY LINE
some text below

结果将如下所示

some text above
-0.906638958281220     -0.657018016704405     -0.728731730614787
-0.786972436949130     -0.657627328226054     -0.787627155672891
-0.777310920528387     -0.784783890438497     -0.593932422372214
 0.995954003399787     -0.696941212792459     -0.096196347815229
-0.900490089683701     -0.833132404483661      0.228899514508313
-0.934597263489565     -0.763072730515099      0.417292195793138
-0.802394301831597     -0.767756191733287      0.691687709627505
some text below