我试图让它在工作python-docx:
我可以使用的项目符号列表:
from docx import Document
doc = Document()
p = doc.add_paragraph()
p.style = 'List Bullet'
r = p.add_run()
r.add_text("Item 1")
# Something's gotta come here to get the Sub-Item 1
r = p.add_run()
r.add_text("Item 2")
# Something's gotta come here to get the Sub-Item 2
Run Code Online (Sandbox Code Playgroud)
我认为,在中间添加另一段无济于事,因为从本质上讲,这意味着我将List Bullet使用与其父级相同的格式而不是我想要的类似于孩子的格式来制作另一段。另外,run在同一段中添加另一个也无济于事(我尝试过此操作,弄乱了整个过程..)。有办法吗?