Page 1 of 1
Adding Note and Warning icons to doc output
Posted: Wed Jun 17, 2020 9:33 pm
by mdslup
Using the Dita to Microsoft Word transformation, how can I add warning and caution icons the warning and caution notes?
I don't see an option for that in the Normal.docx file.
https://www.oxygenxml.com/doc/versions/ ... ml?hl=word
Re: Adding Note and Warning icons to doc output
Posted: Fri Jun 19, 2020 9:20 am
by Radu
Hi,
I also looked in the XSLT stylesheets in the "DITA-OT3.x/plugins/com.elovirta.ooxml/docx/word/document.topic.xsl" there is a template which outputs the note type to upper case:
Code: Select all
<xsl:template match="*[contains(@class, ' topic/note ')]" mode="prefix">
<w:r>
<w:rPr>
<w:caps/>
<w:b w:val="true"/>
</w:rPr>
<w:t>
<xsl:variable name="type" select="x:note-type(.)" as="xs:string"/>
<xsl:call-template name="getVariable">
<xsl:with-param name="id" select="concat(upper-case(substring($type, 1, 1)),
substring($type, 2))"/>
</xsl:call-template>
<xsl:text>:</xsl:text>
</w:t>
<!--w:tab/-->
<w:t>
<xsl:attribute name="xml:space">preserve</xsl:attribute>
<xsl:text> </xsl:text>
</w:t>
</w:r>
</xsl:template>
but there seems to be no support for icons. Maybe you can add an issue on the publishing plugin's issues list:
https://github.com/jelovirt/com.elovirta.ooxml/issues
Regards,
Radu