svn commit: r42458 - in projects/db5: ja_JP.eucJP/share/xsl share/xsl zh_CN.GB2312/share/xsl zh_TW.Big5/share/xsl
Gabor Kovesdan
gabor at FreeBSD.org
Sat Jul 27 13:59:51 UTC 2013
Author: gabor
Date: Sat Jul 27 13:59:50 2013
New Revision: 42458
URL: http://svnweb.freebsd.org/changeset/doc/42458
Log:
- Do not use italic fonts in CJK languages since they do not have such glyphs;
always use just bold when italic is used in other scripts
Added:
projects/db5/share/xsl/freebsd-fo-cjk.xsl (contents, props changed)
Modified:
projects/db5/ja_JP.eucJP/share/xsl/freebsd-fo.xsl
projects/db5/zh_CN.GB2312/share/xsl/freebsd-fo.xsl
projects/db5/zh_TW.Big5/share/xsl/freebsd-fo.xsl
Modified: projects/db5/ja_JP.eucJP/share/xsl/freebsd-fo.xsl
==============================================================================
--- projects/db5/ja_JP.eucJP/share/xsl/freebsd-fo.xsl Sat Jul 27 10:25:49 2013 (r42457)
+++ projects/db5/ja_JP.eucJP/share/xsl/freebsd-fo.xsl Sat Jul 27 13:59:50 2013 (r42458)
@@ -13,6 +13,9 @@
<!-- Language-specific general customizations -->
<xsl:import href="freebsd-common.xsl"/>
+ <!-- Pull in the CJK-specific stylesheet -->
+ <xsl:import href="http://www.FreeBSD.org/XML/doc/share/xsl/freebsd-fo-cjk.xsl"/>
+
<!--
JAPANESE-SPECIFIC PARAMETERS
-->
Added: projects/db5/share/xsl/freebsd-fo-cjk.xsl
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/db5/share/xsl/freebsd-fo-cjk.xsl Sat Jul 27 13:59:50 2013 (r42458)
@@ -0,0 +1,92 @@
+<?xml version='1.0'?>
+
+<!-- $FreeBSD$ -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format"
+ xmlns:db="http://docbook.org/ns/docbook"
+ exclude-result-prefixes="db"
+ version="1.0">
+
+ <!--
+ This file holds customizations that commonly
+ apply to CJK languages.
+ -->
+
+ <!-- Use bold instead of italic since CJK languages do not
+ have italic glyphs -->
+ <xsl:template name="inline.italicseq">
+ <xsl:param name="content">
+ <xsl:call-template name="simple.xlink">
+ <xsl:with-param name="content">
+ <xsl:apply-templates/>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:param>
+
+ <fo:inline font-weight="bold">
+ <xsl:call-template name="anchor"/>
+ <xsl:if test="@dir">
+ <xsl:attribute name="direction">
+ <xsl:choose>
+ <xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when>
+ <xsl:otherwise>rtl</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </xsl:if>
+ <xsl:copy-of select="$content"/>
+ </fo:inline>
+ </xsl:template>
+
+ <xsl:template match="*" mode="insert.olink.docname.markup">
+ <xsl:param name="docname" select="''"/>
+
+ <fo:inline font-weight="bold">
+ <xsl:value-of select="$docname"/>
+ </fo:inline>
+ </xsl:template>
+
+ <xsl:template name="title.xref">
+ <xsl:param name="target" select="."/>
+ <xsl:choose>
+ <xsl:when test="local-name($target) = 'figure'
+ or local-name($target) = 'example'
+ or local-name($target) = 'equation'
+ or local-name($target) = 'table'
+ or local-name($target) = 'dedication'
+ or local-name($target) = 'acknowledgements'
+ or local-name($target) = 'preface'
+ or local-name($target) = 'bibliography'
+ or local-name($target) = 'glossary'
+ or local-name($target) = 'index'
+ or local-name($target) = 'setindex'
+ or local-name($target) = 'colophon'">
+ <xsl:call-template name="gentext.startquote"/>
+ <xsl:apply-templates select="$target" mode="title.markup"/>
+ <xsl:call-template name="gentext.endquote"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:inline font-weight="bold">
+ <xsl:apply-templates select="$target" mode="title.markup"/>
+ </fo:inline>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+
+ <xsl:template match="db:chapter|db:appendix" mode="insert.title.markup">
+ <xsl:param name="purpose"/>
+ <xsl:param name="xrefstyle"/>
+ <xsl:param name="title"/>
+
+ <xsl:choose>
+ <xsl:when test="$purpose = 'xref'">
+ <fo:inline font-weight="bold">
+ <xsl:copy-of select="$title"/>
+ </fo:inline>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:copy-of select="$title"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>
Modified: projects/db5/zh_CN.GB2312/share/xsl/freebsd-fo.xsl
==============================================================================
--- projects/db5/zh_CN.GB2312/share/xsl/freebsd-fo.xsl Sat Jul 27 10:25:49 2013 (r42457)
+++ projects/db5/zh_CN.GB2312/share/xsl/freebsd-fo.xsl Sat Jul 27 13:59:50 2013 (r42458)
@@ -13,6 +13,9 @@
<!-- Language-specific general customizations -->
<xsl:import href="freebsd-common.xsl"/>
+ <!-- Pull in the CJK-specific stylesheet -->
+ <xsl:import href="http://www.FreeBSD.org/XML/doc/share/xsl/freebsd-fo-cjk.xsl"/>
+
<!--
CHINESE-SPECIFIC PARAMETERS
-->
Modified: projects/db5/zh_TW.Big5/share/xsl/freebsd-fo.xsl
==============================================================================
--- projects/db5/zh_TW.Big5/share/xsl/freebsd-fo.xsl Sat Jul 27 10:25:49 2013 (r42457)
+++ projects/db5/zh_TW.Big5/share/xsl/freebsd-fo.xsl Sat Jul 27 13:59:50 2013 (r42458)
@@ -13,6 +13,9 @@
<!-- Language-specific general customizations -->
<xsl:import href="freebsd-common.xsl"/>
+ <!-- Pull in the CJK-specific stylesheet -->
+ <xsl:import href="http://www.FreeBSD.org/XML/doc/share/xsl/freebsd-fo-cjk.xsl"/>
+
<!--
CHINESE-SPECIFIC PARAMETERS
-->
More information about the svn-doc-projects
mailing list