jdum / odfdo

python library for OpenDocument format (ODF)
Apache License 2.0
48 stars 11 forks source link

Underlining not working? #43

Open caligian opened 1 month ago

caligian commented 1 month ago

Why is this snippet not working? I am using lua files instead of json to feed styles to an app. As a matter of fact, the program goes through the attributes properly but it ignores the props for underlining. I lifted the props right out of an XML with underlined text { name = "subheader", parent_style = "Heading", bold = true, properties = { area = "paragraph", properties = { ["fo:text-align"] = "center", ["style:text-underline-style"] = "single", ["style:text-underline-width"] = "auto", ["style:text-underline-color"] = "black", }, }, }

jdum commented 1 month ago

Hi, Could you be more explicit in your questions ? I'm not sure I understand what you are trying to do, perhaps you can post an example reproducing the problem. About the code posted above, it doesn't seem to be Python or Json to me.

caligian commented 3 weeks ago

It is lua for defining styles which I load in python by evaling. I fixed the problem by creating my own styles.odt and using it as a template. Thank you for your wonderful library, it has helped me tonnes by now!