elapouya / python-docx-template

Use a docx as a jinja2 template
GNU Lesser General Public License v2.1
1.92k stars 378 forks source link

The underline=True option in docxtpl RichText does not work in WPS #530

Closed liren-sun closed 3 months ago

liren-sun commented 3 months ago

Describe your problem

I am trying to use the RichText feature of docxtpl to generate text with underline. I find all parts surrounded by and tags in the text, and try to add underline to these parts. Then I add these underlined texts to a RichText object and save this object to a .docx file. However, when I open this file in WPS, I find that the underline does not appear.

More details about your problem

raw_content = ['<u>克雷芒蒂娜·帕洛斯基(Clementine Pawlotsky,主播):勒梅特是法国《世界报》的记者,其新xxxxx》由塔兰迪尔出版社出版,他在书中讲述了这段人生经历。</u>']

Provide a test case

image

Screenshots

image