<xsl:template name="makeInline">
<xsl:param name="before"/>
<xsl:param name="style"/>
<xsl:param name="after"/>
<xsl:value-of select="$before"/>
<xsl:sequence select="tei:makeHyperTarget(@xml:id)"/>
<xsl:choose>
<xsl:when test="$style=('add','unclear','bibl','docAuthor','titlem','italic','mentioned','term','foreign') and not(tei:findLanguage(.) = ('ja','ko','zh','zh-TW'))">
<xsl:text>\textit{</xsl:text>
<xsl:value-of select="tei:escapeChars(normalize-space(.),.)"/>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:when test="$style=('add','unclear','bibl','docAuthor','titlem','italic','mentioned','term','foreign') and tei:findLanguage(.) = 'ja'">
<xsl:text>{\textJapanese </xsl:text>
<xsl:value-of select="tei:escapeChars(normalize-space(.),.)"/>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:when test="$style=('add','unclear','bibl','docAuthor','titlem','italic','mentioned','term','foreign') and tei:findLanguage(.) = 'ko'">
<xsl:text>{\textKorean </xsl:text>
<xsl:value-of select="tei:escapeChars(normalize-space(.),.)"/>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:when test="$style=('add','unclear','bibl','docAuthor','titlem','italic','mentioned','term','foreign') and tei:findLanguage(.) = ('zh','zh-TW')">
<xsl:text>{\textChinese </xsl:text>
<xsl:value-of select="tei:escapeChars(normalize-space(.),.)"/>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:when test="$style='supplied'">
<xsl:value-of select="tei:escapeChars(normalize-space(.),.)"/>
</xsl:when>
<xsl:when test="$style='bold'">
<xsl:text>\textbf{</xsl:text>
<xsl:value-of select="tei:escapeChars(normalize-space(.),.)"/>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:when test="$style='strikethrough'">
<xsl:text>\sout{</xsl:text>
<xsl:value-of select="tei:escapeChars(normalize-space(.),.)"/>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:when test="$style='sup'">
<xsl:text>\textsuperscript{</xsl:text>
<xsl:value-of select="tei:escapeChars(normalize-space(.),.)"/>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:when test="$style='sub'">
<xsl:text>\textsubscript{</xsl:text>
<xsl:value-of select="tei:escapeChars(normalize-space(.),.)"/>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:when test="local-name()='label'">
<xsl:text>\textbf{</xsl:text>
<xsl:apply-templates/>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:when test="not($style)">
<xsl:sequence select="concat('{\',local-name(),' ')"/>
<xsl:apply-templates/>
<xsl:text>}</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:sequence select="concat('{\',$style[1], ' ')"/>
<xsl:apply-templates/>
<xsl:text>}</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="$after"/>
</xsl:template> |