You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preview programs display lists in md like pandoc converting it.
But all lists and tables in docx document have "compact" style, what doesn't let me to customise their representations in docx individually
p.s. I've written python script, which replaces lists to paragraphs with custom styles in md, but don't working properly with sorted lists, because it doesn't start a new list numbering from "1" and continue numbering
p.s. Maybe I should to direct this issue to pandoc developers
I search solution to fix the problem described in https://stackoverflow.com/questions/58024749/how-to-format-lists-in-pandoc-generated-docx-documents.
I've tried to write solution by myself with panflute, but honestly hasn't gotten any success. Is it possible to write full script or script with pseudocode to replace styles of lists?
upd: According to https://stackoverflow.com/questions/43730436/pandoc-replace-heading-with-custom-style-for-word-docx
've written this code:
from panflute import *
def action( elem, doc ):
if isinstance( elem, BulletList ):
#return Div( elem, attributes={'custom-style': 'Header{}'.format(elem.level)} )
return Div( BulletList(*elem.content), attributes={'custom-style': 'List Bullet {}'.format(elem.level)} )
def main(doc=None):
return run_filter( action, doc=doc )
if name == "main":
main()
but I get error : AttributeError: 'BulletList' object has no attribute 'level'
Is there solution to find out BulletList element level?
The text was updated successfully, but these errors were encountered: