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
Sorry for using google translate.
You have two options for using the library without changing it:
Use names without separators.
Do as I do:
from odf.attrconverters import make_NCName
from odf.style import Style
from odf.table import Table
display_name = "New Style"
name = make_NCName(display_name)
Style(name=display_name)
...
t = Table(stylename=name)
from odf.opendocument import OpenDocumentText
from odf.style import Style, TextProperties, ParagraphProperties
document_test = OpenDocumentText()
paragraph_style = Style(name='Test', family='paragraph')
paragraph_style.addElement(ParagraphProperties(numberlines='false', linenumber='0'))
paragraph_style.addElement(TextProperties(fontsize='24pt', fontweight='bold'))
document_test.automaticstyles.addElement(paragraph_style)
document_test.contentxml()
Return :
b'<?xml …><office:automatic-styles/><office:body><office:text/></office:body></office:document-content>'
Missing xml syntax of automatic style
I'm test them on Ubuntu 21.04 and Manjaro 21.2.1 with Python 3.9.5 and 3.10.1
The text was updated successfully, but these errors were encountered: