问题
There is someway to change the the default bullet 'disc'/'circle' on sphinx ? i tried something like the solution from https://groups.google.com/forum/#!topic/sphinx-users/fNWyyRzoa8I but it doesn't work for me, possibly because i'm not familiar with html and css syntax.
_static/custom.css:
ul.squarelist {
list-style-type: square;
margin-left: 0;
padding-left: 0;
}
li.squarelist {
padding-left: 1em;
text-indent: -1em;
}
test.rst:
.. cssclass:: squarelist
* foo
* bar
output -> test.html:
<ul class="check simple">
<li>foo</li>
<li>bar</li>
</ul>
回答1:
You are close. Here's the code you want.
_static/custom.css (li.squarelist is unnecessary):
ul.squarelist {
list-style-type: square;
margin-left: 0;
padding-left: 0;
}
test.rst (note correct directive and proper indentation):
.. rst-class:: squarelist
* foo
* bar
Yields:
<ul class="squarelist simple">
<li>foo</li>
<li>bar</li>
</ul>
来源:https://stackoverflow.com/questions/46613338/custom-char-for-bulletlist-sphinx