考虑http://en.cppreference.com/w/cpp/container/vector/vector上“复杂性”列表中的“2-3”项。我如何在reStructuredText/Sphinx中实现同样的目标?
我得到的最接近的是写作
| 1) ...
| 2-3) ...
| 4) ...但这会破坏列表格式(枚举数和分隔行没有正确缩进)。另一种选择是使用表,但我不想使用表格式。
发布于 2014-09-10 09:57:08
找到了以下解决办法。将列表定义为
.. rst-class:: custom-enumeration
==== ===
\1) ...
2-3) ...
\4) ...
==== ===并将以下片段添加到CSS文件中。
/* Define enumerations with custom enumerators */
table.custom-enumeration td {
border: 0px none;
}
table.custom-enumeration td:first-child {
padding-right: 5px;
text-align: right;
}https://stackoverflow.com/questions/25545795
复制相似问题