Skip to content

Commit

Permalink
textnormal has higher precedence than textbf, textit
Browse files Browse the repository at this point in the history
  • Loading branch information
mkraetke committed Jan 18, 2024
1 parent db1a400 commit 3d4cce2
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions conf/conf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,27 @@
<xsl:next-match/>
<xsl:text>}</xsl:text>
</template>


<template context="*[local-name() = $text-style-elements]
[@css:font-weight eq 'normal' or @css:font-style eq 'normal']
[(ancestor::*[local-name() = $text-style-elements]/((@css:font-style,
@css:font-weight,
@css:font-variant) != 'normal')
or empty(ancestor::*[local-name() = $text-style-elements]
[@css:font-style|@css:font-weight]))
or (some $role in ancestor::*[@role]/@role
satisfies exists(key('style', @role)[(@css:font-style,
@css:font-weight,
@css:font-variant) != 'normal']))] ">
<xsl:text>\textnormal{</xsl:text>
<xsl:next-match/>
<xsl:text>}</xsl:text>
</template>

<template context="*[local-name() = $text-style-elements]
[ @css:font-style eq 'italic'
or exists(key('style', @role)[@css:font-style eq 'italic'])]">
or ( exists(key('style', @role)[@css:font-style eq 'italic'])
and not(@css:font-style eq 'normal'))]">
<xsl:text>\textit{</xsl:text>
<xsl:next-match/>
<xsl:text>}</xsl:text>
Expand All @@ -538,22 +554,6 @@
<xsl:text>}</xsl:text>
</template>

<template context="*[local-name() = $text-style-elements]
[@css:font-weight eq 'normal']
[(ancestor::*[local-name() = $text-style-elements]/((@css:font-style,
@css:font-weight,
@css:font-variant) != 'normal')
or empty(ancestor::*[local-name() = $text-style-elements]
[@css:font-style|@css:font-weight]))
or (some $role in ancestor::*[@role]/@role
satisfies exists(key('style', @role)[(@css:font-style,
@css:font-weight,
@css:font-variant) != 'normal']))] ">
<xsl:text>\textnormal{</xsl:text>
<xsl:next-match/>
<xsl:text>}</xsl:text>
</template>

<template context="*[local-name() = $text-style-elements]
[@css:font-style eq 'italic' or @css:font-weight eq 'bold']
[matches(., '^[&#x393;&#x394;&#x398;&#x39b;&#x39e;&#x3a0;&#x3a3;&#x3a5;&#x3a6;&#x3a8;-&#x3be;&#x3c0;-&#x3f6;]$')]">
Expand Down

0 comments on commit 3d4cce2

Please sign in to comment.