I've been using this solution for months and haven't encountered any issues, so I wanted to share 👍
The Issue
Generated documents with multiple text styles applied, e.g. <b><i>some text</i></b>, were only being displayed with one of those styles applied when opened in Word (version 16.70).
For example, a piece of text that's underlined, bold, and italic would only appear as italic in Word.
The issue occurs when Word renders some text that has this kind of formatting, with separate <w:rPr> tags for each style:
Word will only display one <w:rPr> at a time, so in this case the text would appear to only be italic.
The Solution
I added explicit checks within base.xlst for each combination of formatting. This results in a singular <w:rPr> tag for each block of formatted text, as opposed to a separate tag for each style.
I also updated the spec files to reflect this change.
I've been using this solution for months and haven't encountered any issues, so I wanted to share 👍
The Issue
Generated documents with multiple text styles applied, e.g.
<b><i>some text</i></b>
, were only being displayed with one of those styles applied when opened in Word (version 16.70).For example, a piece of text that's underlined, bold, and italic would only appear as italic in Word.
The issue occurs when Word renders some text that has this kind of formatting, with separate
<w:rPr>
tags for each style:Word will only display one
<w:rPr>
at a time, so in this case the text would appear to only be italic.The Solution
I added explicit checks within
base.xlst
for each combination of formatting. This results in a singular<w:rPr>
tag for each block of formatted text, as opposed to a separate tag for each style.I also updated the spec files to reflect this change.