# HG changeset patch # User Bryan O'Sullivan # Date 1256704153 25200 # Node ID 0aeeeab529d6476080881f7b8fc01814f9c74604 # Parent 102f89d20be133b8b0e9ff3596156149db00cc0f# Parent 8a2b0994ccd950f99022246cb5a9a452ef51ea88 Merge with Dongsheng diff -r 102f89d20be1 -r 0aeeeab529d6 Makefile --- a/Makefile Tue Oct 27 22:46:49 2009 -0500 +++ b/Makefile Tue Oct 27 21:29:13 2009 -0700 @@ -6,7 +6,7 @@ FORMATS=html html-single pdf epub PO_LANGUAGES := zh -DBK_LANGUAGES := en +DBK_LANGUAGES := en it LANGUAGES := $(DBK_LANGUAGES) $(PO_LANGUAGES) UPDATEPO = PERLLIB=$(PO4A_LIB) $(PO4A_HOME)/po4a-updatepo -M UTF-8 \ @@ -22,76 +22,38 @@ #rev_id = $(shell hg parents --template '{node|short} ({date|isodate})') rev_id = $(shell hg parents --template '{node|short} ({date|shortdate})') -images := \ - en/figs/bad-merge-1.png \ - en/figs/bad-merge-2.png \ - en/figs/bad-merge-3.png \ - en/figs/bad-merge-4.png \ - en/figs/bad-merge-5.png \ - en/figs/feature-branches.png \ - en/figs/filelog.png \ - en/figs/metadata.png \ - en/figs/mq-stack.png \ - en/figs/revlog.png \ - en/figs/snapshot.png \ - en/figs/tour-history.png \ - en/figs/tour-merge-conflict.png \ - en/figs/tour-merge-merge.png \ - en/figs/tour-merge-pull.png \ - en/figs/tour-merge-sep-repos.png \ - en/figs/undo-manual-merge.png \ - en/figs/undo-manual.png \ - en/figs/undo-non-tip.png \ - en/figs/undo-simple.png \ - en/figs/wdir-after-commit.png \ - en/figs/wdir-branch.png \ - en/figs/wdir-merge.png \ - en/figs/wdir.png \ - en/figs/wdir-pre-branch.png +images-dot := $(wildcard en/figs/*.dot) + +images-svg := $(wildcard en/figs/*.svg) +images-svg :=$(filter-out %-tmp.svg, $(images-svg)) +images-svg -= $(images-dot:dot=svg) + +images-dst := $(wildcard en/figs/*.png) +images-dst += $(images-dot:dot=png) +images-dst += $(images-svg:svg=png) + +images-gen := $(images-dot:dot=png) +images-gen += $(images-svg:svg=png) +images-gen += $(wildcard en/figs/*-tmp.svg) help: - @echo " make epub [LINGUA=en|zh|...]" - @echo " make html [LINGUA=en|zh|...]" - @echo " make html-single [LINGUA=en|zh|...]" - @echo " make pdf [LINGUA=en|zh|...]" - @echo " make validate [LINGUA=en|zh|...] # always before commit!" + @echo " make epub [LINGUA=en|it|zh|...]" + @echo " make html [LINGUA=en|it|zh|...]" + @echo " make html-single [LINGUA=en|it|zh|...]" + @echo " make pdf [LINGUA=en|it|zh|...]" + @echo " make validate [LINGUA=en|it|zh|...] # always before commit!" @echo " make tidypo [LINGUA=zh|...] # always before commit!" @echo " make updatepo [LINGUA=zh|...] # update po files." - @echo " make all [LINGUA=en|zh|...]" + @echo " make all [LINGUA=en|it|zh|...]" @echo " make stat # print statistics about po files." @echo " make clean # Remove the build files." clean: - @rm -fr build po/*.mo hello en/hello en/html en/.validated-00book.xml en/examples/.run en/examples/results \ - stylesheets/system-xsl en/figs/*-tmp.svg \ - web/index-read.html.in \ - en/figs/bad-merge-1.png \ - en/figs/bad-merge-2.png \ - en/figs/bad-merge-3.png \ - en/figs/bad-merge-4.png \ - en/figs/bad-merge-5.png \ - en/figs/feature-branches.png \ - en/figs/filelog.png \ - en/figs/feature-branches.png \ - en/figs/filelog.png \ - en/figs/metadata.png \ - en/figs/mq-stack.png \ - en/figs/revlog.png \ - en/figs/snapshot.png \ - en/figs/tour-history.png \ - en/figs/tour-merge-conflict.png \ - en/figs/tour-merge-merge.png \ - en/figs/tour-merge-pull.png \ - en/figs/tour-merge-sep-repos.png \ - en/figs/undo-manual-merge.png \ - en/figs/undo-manual.png \ - en/figs/undo-non-tip.png \ - en/figs/undo-simple.png \ - en/figs/wdir-after-commit.png \ - en/figs/wdir-branch.png \ - en/figs/wdir-merge.png \ - en/figs/wdir-pre-branch.png \ - en/figs/wdir.png + @rm -fr build hello po/*.mo /tmp/REV*-hello en/examples/results + + @(for l in $(DBK_LANGUAGES); do \ + rm -fr $(subst en/figs/, $$l/figs/, $(images-gen)) $$l/examples/.run;\ + done) all: ifdef LINGUA @@ -117,8 +79,10 @@ tidypo: ifdef LINGUA + ifneq "$(findstring $(LINGUA),$(PO_LANGUAGES))" "" msgcat --sort-by-file --width=80 po/$(LINGUA).po > po/$(LINGUA).tmp && \ mv po/$(LINGUA).tmp po/$(LINGUA).po; + endif else for po in $(wildcard po/*.po); do \ msgcat --sort-by-file --width=80 $$po > $$po.tmp && mv $$po.tmp $$po; \ @@ -131,13 +95,15 @@ $(MAKE) $@ LINGUA=$$l; \ done else -updatepo: -ifneq "$(findstring $(LINGUA),$(PO_LANGUAGES))" "" +po/$(LINGUA).po: $(wildcard en/*.xml) + ifneq "$(findstring $(LINGUA),$(PO_LANGUAGES))" "" (cd po; \ $(UPDATEPO) -m ../en/00book.xml -p $(LINGUA).po; \ ) $(MAKE) tidypo LINGUA=$(LINGUA) -endif + endif + +updatepo: po/$(LINGUA).po endif ifndef LINGUA @@ -149,24 +115,28 @@ validate: build/$(LINGUA)/source/hgbook.xml xmllint --nonet --noout --postvalid --xinclude $< -ifneq "$(findstring $(LINGUA),$(DBK_LANGUAGES))" "" + ifneq "$(findstring $(LINGUA),$(DBK_LANGUAGES))" "" $(LINGUA)/examples/.run: - (cd $(LINGUA)/examples; ./run-example -v -a) - -build/$(LINGUA)/source/hgbook.xml: $(wildcard $(LINGUA)/*.xml) $(images) $(LINGUA)/examples/.run + if test -x $(LINGUA)/examples/run-example; then \ + (cd $(LINGUA)/examples; ./run-example -a); \ + else \ + touch $@; \ + fi + +build/$(LINGUA)/source/hgbook.xml: $(wildcard $(LINGUA)/*.xml) $(subst en/figs/, $(LINGUA)/figs/, $(images-dst)) $(LINGUA)/examples/.run mkdir -p build/$(LINGUA)/source/figs cp $(LINGUA)/figs/*.png build/$(LINGUA)/source/figs cp stylesheets/hgbook.css build/$(LINGUA)/source (cd $(LINGUA); xmllint --nonet --noent --xinclude --postvalid --output ../$@.tmp 00book.xml) cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@ -else + else en/examples/.run: - (cd en/examples; ./run-example -v -a) + (cd en/examples; ./run-example -a) build/en/source/hgbook.xml: ${MAKE} LINGUA=en $@ -build/$(LINGUA)/source/hgbook.xml: $(wildcard en/*.xml) po/$(LINGUA).po $(images) +build/$(LINGUA)/source/hgbook.xml: $(wildcard en/*.xml) po/$(LINGUA).po $(images-dst) en/examples/.run mkdir -p build/$(LINGUA)/source/figs cp en/figs/*.png build/$(LINGUA)/source/figs cp stylesheets/hgbook.css build/$(LINGUA)/source @@ -174,7 +144,7 @@ xmllint --nonet --noent --xinclude --postvalid --output $@.tmp en/hgbook.xml.$(LINGUA) cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@ mv en/hgbook.xml.$(LINGUA) build/$(LINGUA)/source -endif + endif endif @@ -246,6 +216,17 @@ (cd build/$(LINGUA)/source && $(FOP_HOME)/fop.sh -c $(FOP_HOME)/conf/userconfig.xml hgbook.fo ../pdf/hgbook.pdf) endif +$(LINGUA)/figs/%.png: $(LINGUA)/figs/%.svg + if test -x $(LINGUA)/fixsvg; then \ + $(LINGUA)/fixsvg $<; \ + inkscape -D -d 120 -e $@ $<-tmp.svg; \ + else \ + inkscape -D -d 120 -e $@ $<; \ + fi + +$(LINGUA)/figs/%.svg: $(LINGUA)/figs/%.dot + dot -Tsvg -o $@ $< + en/figs/%.png: en/figs/%.svg en/fixsvg en/fixsvg $< inkscape -D -d 120 -e $@ $<-tmp.svg diff -r 102f89d20be1 -r 0aeeeab529d6 Makefile.vars.tmpl --- a/Makefile.vars.tmpl Tue Oct 27 22:46:49 2009 -0500 +++ b/Makefile.vars.tmpl Tue Oct 27 21:29:13 2009 -0700 @@ -1,20 +1,20 @@ # -# Please create your Makefile.vars file from this template file. +# Please create your Makefile.vars from this template file. # # Please use absolute path, DO NOT use relative path ! # -# po4a (>= 0.36.1): Only for PO based Makefile ! +# po4a (>= 0.36.1): Only for PO based translation ! # po4A_HOME=/usr/bin # PO4A_LIB=/usr/share/perl5 -PO4A_HOME=/home/dongsheng/var/svn/i18n-zh/trunk/lib/po4a +PO4A_HOME=/home/dongsheng/vcs/svn/i18n-zh/trunk/lib/po4a PO4A_LIB=$(PO4A_HOME)/lib # saxon65.jar, saxon65-dbxsl.jar, xml-commons-resolver-1.2.jar: Only for pdf format ! -JAVA_LIB=/home/dongsheng/var/svn/i18n-zh/trunk/lib/share/java +JAVA_LIB=/home/dongsheng/vcs/svn/i18n-zh/trunk/lib/share/java # fop (>= 0.9.6): Only for pdf format ! -FOP_HOME=/home/dongsheng/var/svn/i18n-zh/trunk/lib/fop +FOP_HOME=/home/dongsheng/vcs/svn/i18n-zh/trunk/lib/fop # docbook-xsl (>= 1.74.3): Only for ePub format ! -DB2EPUB=/home/dongsheng/var/svn/i18n-zh/trunk/lib/docbook/docbook-xsl/epub/bin/dbtoepub +DB2EPUB=/home/dongsheng/vcs/svn/i18n-zh/trunk/lib/docbook/docbook-xsl/epub/bin/dbtoepub diff -r 102f89d20be1 -r 0aeeeab529d6 README --- a/README Tue Oct 27 22:46:49 2009 -0500 +++ b/README Tue Oct 27 21:29:13 2009 -0700 @@ -8,9 +8,13 @@ Here's a top-level tour of interesting directories: -en English-language content -es Spanish-language content -examples Miscellaneous example scripts -tools Old, largely unused conversion scripts -web Content and comment system for http://hgbook.red-bean.com/ -xsl XSLT scripts for generating HTML +contrib Miscellaneous scripts +en English-language content (DocBook XML format) +stylesheets XSLT scripts for generating HTML +web Content and comment system for http://hgbook.red-bean.com/ + +po PO based translation Chinese translation + +it Italian translation DocBook XML format +es Spanish translation old tex format +ja Japanese translation old tex format diff -r 102f89d20be1 -r 0aeeeab529d6 README.BUILD --- a/README.BUILD Tue Oct 27 22:46:49 2009 -0500 +++ b/README.BUILD Tue Oct 27 21:29:13 2009 -0700 @@ -16,17 +16,13 @@ I. PRIMER - DocBook has a tortured, confusing history. Before you do anything, - take a look at Eric Raymond's excellent "DocBook Demystification HOWTO": + DocBook has a tortured, confusing history. Before you do anything, + take a look at: - http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/ - - It's very short and clears up many things. - + http://wiki.docbook.org/topic/DocBookTutorials II. COMPILING THE DOCS - 1. Install XML DTD and XSL stylesheets for DocBook % sudo apt-get install docbook-xml docbook-xsl @@ -35,27 +31,44 @@ % sudo apt-get install libxml2-utils -3. Install graph drawing tools +3. Install graph drawing and patches tools - % sudo apt-get install graphviz inkscape + % sudo apt-get install graphviz inkscape patchutils 4. Install pdf support % sudo apt-get install openjdk-6-jdk docbook-xsl-saxon libsaxon-java fop - The Makefile will actually invoke tools/fop/fop.sh, you should do + The Makefile will actually invoke $FOP_HOME/fop.sh, you should do some trick, let fop's CLASSPATH include saxon.jar and docbook-xsl-saxon.jar . -5. Make +5. Configure XML Catalogs + For non pdf output, we use xsltproc for XSLT process, xsltproc use system + catalog files automatically, usually /etc/xml/catalog. Users do not need to + care about it. + + For pdf output, we need use the xsl extensions (docbook-xsl-saxon), so we must + create file $JAVA_LIB/CatalogManager.properties like this: + + catalogs=/etc/xml/catalog + relative-catalogs=true + static-catalog=yes + catalog-class-name=org.apache.xml.resolver.Resolver + verbosity=1 + +6. Create Makefile.vars + Please create your Makefile.vars from Makefile.vars.tmpl . + +7. Make Run 'make' for more details, for example: - * make all document(pdf, html and html-single for all languages) + * make all document(pdf, epub, html and html-single for all languages) % make all - * make english document(pdf, html and html-single for all languages) + * make english document(pdf, epub, html and html-single for all languages) % make LINGUA=en all - * make Chinese document(pdf, html and html-single for all languages) + * make Chinese document(pdf, epub, html and html-single for all languages) % make LINGUA=zh all * make Chinese pdf document @@ -65,24 +78,22 @@ In addition to everything in section II: - -1. Get a nice editing environment for SGML/XML. +1. Get a nice editing environment for XML This isn't strictly required, but it's nice when your editor colorizes things, understands the DTD, tells you what tags you can insert, etc. - If you use emacs, we recommend the PSGML major-mode. Most free + If you use emacs, we recommend the nxml-mode. Most free operating systems package it, or its home page is here: - http://www.lysator.liu.se/projects/about_psgml.html + http://www.emacswiki.org/emacs/NxmlMode If you use vim, you might check out xmledit, at: http://www.vim.org/scripts/script.php?script_id=301 - -2. Get a validating parser. +2. Get a validating parser Actually, if you have what you need to compile the documentation, then you almost certainly have an XML validator installed already - @@ -93,7 +104,7 @@ $ make validate -3. Read about DocBook. +3. Read about DocBook You'll want to get real intimate with a DocBook reference, such as can be found at: http://www.docbook.org/tdg/en/html/ diff -r 102f89d20be1 -r 0aeeeab529d6 contrib/hg-package --- a/contrib/hg-package Tue Oct 27 22:46:49 2009 -0500 +++ b/contrib/hg-package Tue Oct 27 21:29:13 2009 -0700 @@ -1,9 +1,13 @@ #!/bin/sh +# +# Package build results & Upload to i18n-zh +# + build_dir=`dirname "$0"`/../build rev_id=`hg parents --template '{date|shortdate}' | sed 's/-//g'` -for l in en zh; do +for l in en zh it; do ( if [ ! -d "${build_dir}/${l}" ] ; then continue diff -r 102f89d20be1 -r 0aeeeab529d6 it/figs/caution.png Binary file it/figs/caution.png has changed diff -r 102f89d20be1 -r 0aeeeab529d6 it/figs/note.png Binary file it/figs/note.png has changed diff -r 102f89d20be1 -r 0aeeeab529d6 it/figs/tip.png Binary file it/figs/tip.png has changed diff -r 102f89d20be1 -r 0aeeeab529d6 it/figs/warning.png Binary file it/figs/warning.png has changed diff -r 102f89d20be1 -r 0aeeeab529d6 po/zh.po --- a/po/zh.po Tue Oct 27 22:46:49 2009 -0500 +++ b/po/zh.po Tue Oct 27 21:29:13 2009 -0700 @@ -42,7 +42,7 @@ msgstr "" "Project-Id-Version: hgbook 1.2\n" "POT-Creation-Date: 2009-05-21 14:26+0800\n" -"PO-Revision-Date: 2009-05-21 16:42+0800\n" +"PO-Revision-Date: 2009-10-21 16:42+0800\n" "Last-Translator: 宋冬生 \n" "Language-Team: Simplified Chinese \n" "MIME-Version: 1.0\n" @@ -2372,7 +2372,7 @@ #. type: Content of: #: ../en/ch01-intro.xml:5 msgid "How did we get here?" -msgstr "" +msgstr "写在前面" #. type: Content of: <book><chapter><sect1><title> #: ../en/ch01-intro.xml:8 diff -r 102f89d20be1 -r 0aeeeab529d6 stylesheets/fo.xsl --- a/stylesheets/fo.xsl Tue Oct 27 22:46:49 2009 -0500 +++ b/stylesheets/fo.xsl Tue Oct 27 21:29:13 2009 -0700 @@ -1,8 +1,12 @@ <?xml version="1.0"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:fo="http://www.w3.org/1999/XSL/Format" + version='1.0'> <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/> + <xsl:param name="l10n.gentext.language" select="'en'"/> + <xsl:param name="paper.type" select="'A4'"></xsl:param> <xsl:param name="draft.mode" select="no"/> <!-- These extensions are required for table printing and other stuff --> @@ -22,42 +26,24 @@ <xsl:param name="section.autolabel" select="1" /> <xsl:param name="section.label.includes.component.label">1</xsl:param> - <xsl:param name="variablelist.as.blocks" select="1" /> <!-- fo only --> - <xsl:param name="hyphenate">false</xsl:param> <!-- fo only --> - <xsl:param name="paper.type" select="'A4'"></xsl:param> <!-- fo only --> + <xsl:param name="variablelist.as.blocks" select="1" /> + <xsl:param name="hyphenate">false</xsl:param> - <!-- Default font settings --> - <!-- - <xsl:param name="title.font.family">sans-serif</xsl:param> - <xsl:param name="body.font.family">serif</xsl:param> - <xsl:param name="sans.font.family">sans-serif</xsl:param> - <xsl:param name="dingbat.font.family">serif</xsl:param> - <xsl:param name="monospace.font.family">monospace</xsl:param> + <!-- Font settings, we use characters out of base14 even for english --> + <xsl:param name="title.font.family">sans-serif,Arial</xsl:param> + <xsl:param name="body.font.family">serif,Times New Roman</xsl:param> + <xsl:param name="sans.font.family">sans-serif,Arial</xsl:param> + <xsl:param name="dingbat.font.family">serif,Times New Roman</xsl:param> + <xsl:param name="monospace.font.family">monospace,Courier New</xsl:param> <xsl:param name="symbol.font.family">Symbol,ZapfDingbats</xsl:param> - --> - <!-- Custom font settings - preferred truetype font --> - <xsl:param name="title.font.family">Calibri,sans-serif,SimHei</xsl:param> - <xsl:param name="body.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param> - <xsl:param name="sans.font.family">Calibri,sans-serif,SimHei</xsl:param> - <xsl:param name="dingbat.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param> - <xsl:param name="monospace.font.family">Courier New,monospace,FangSong</xsl:param> - - <!-- Page related Settings --> + <!-- Page related settings --> <xsl:param name="page.margin.inner">1.5cm</xsl:param> <xsl:param name="page.margin.outer">1.5cm</xsl:param> <xsl:param name="title.margin.left">0pt</xsl:param> <xsl:param name="body.start.indent">24pt</xsl:param> <xsl:param name="body.end.indent">0pt</xsl:param> - <!-- Breaking long lines --> - <xsl:param name="hyphenate.verbatim">0</xsl:param> - <xsl:attribute-set name="monospace.verbatim.properties" - use-attribute-sets="verbatim.properties monospace.properties"> - <xsl:attribute name="wrap-option">wrap</xsl:attribute> - <xsl:attribute name="hyphenation-character">►</xsl:attribute> - </xsl:attribute-set> - <!-- Prevent blank pages in output --> <xsl:template name="book.titlepage.before.verso"> </xsl:template> @@ -66,6 +52,105 @@ <xsl:template name="book.titlepage.separator"> </xsl:template> + <!-- titlepage settings --> + <xsl:template name="book.titlepage"> + <fo:block> + <fo:table table-layout="fixed" space-after.optimum="10pt" width="100%"> + <fo:table-body> + <fo:table-row> + <fo:table-cell> + <fo:block text-align="center"> + <!--fo:external-graphic src="url(figs/cover-logo.png)" + width="90%" height="auto" content-width="scale-to-fit" content-height="scale-to-fit" /--> + </fo:block> + </fo:table-cell> + </fo:table-row> + </fo:table-body> + </fo:table> + </fo:block> + + <fo:block text-align="center" color="#000000" margin-left="1cm" margin-right="1cm" + space-before.optimum="3cm" space-after.optimum="5.0cm" + font-weight="900" font-size="32pt"> + <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute> + + <xsl:value-of select="/book/title"/> + </fo:block> + + <fo:block text-align="center" color="#000080" margin-left="1cm" margin-right="1cm" + space-before.optimum="2cm" space-after.optimum="8.0cm" + font-weight="900" font-size="16pt"> + <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute> + + <xsl:value-of select="/book/subtitle"/> + </fo:block> + + <fo:block text-align="center" color="#000000" margin-left="1cm" margin-right="1cm" + space-before.optimum="8cm" space-after.optimum="10cm" + font-weight="600" font-size="24pt"> + <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute> + + <xsl:call-template name="person.name.list"> + <xsl:with-param name="person.list" select="bookinfo/authorgroup/author"/> + </xsl:call-template> + </fo:block> + + <!--fo:block text-align="end" color="#666D70" margin-left="1cm" margin-right="1cm" + font-family="sans-serif" font-weight="normal" font-size="10pt" > + <xsl:value-of select="/book/subtitle"/> + </fo:block--> + </xsl:template> + + <!-- title settings --> + <xsl:attribute-set name="preface.titlepage.recto.style"> + <xsl:attribute name="color">#7C1C51</xsl:attribute> + </xsl:attribute-set> + <xsl:attribute-set name="chapter.titlepage.recto.style"> + <xsl:attribute name="color">#7C1C51</xsl:attribute> + </xsl:attribute-set> + <xsl:attribute-set name="section.titlepage.recto.style"> + <xsl:attribute name="color">#7C1C51</xsl:attribute> + </xsl:attribute-set> + <xsl:attribute-set name="appendix.titlepage.recto.style"> + <xsl:attribute name="color">#7C1C51</xsl:attribute> + </xsl:attribute-set> + + <!-- Verbatim related settings --> + <xsl:param name="hyphenate.verbatim">0</xsl:param> + + <xsl:attribute-set name="monospace.properties"> + <xsl:attribute name="font-family"> + <xsl:value-of select="$monospace.font.family"/> + </xsl:attribute> + <xsl:attribute name="color">#000080</xsl:attribute> + </xsl:attribute-set> + + <xsl:attribute-set name="monospace.verbatim.properties" + use-attribute-sets="verbatim.properties monospace.properties"> + <xsl:attribute name="border-color">blue</xsl:attribute> + <xsl:attribute name="border-width">thin</xsl:attribute> + <xsl:attribute name="border-style">solid</xsl:attribute> + <xsl:attribute name="font-size">8pt</xsl:attribute> + <xsl:attribute name="wrap-option">wrap</xsl:attribute> + <xsl:attribute name="hyphenation-character">►</xsl:attribute> + <!--xsl:attribute name="hyphenation-character">➤</xsl:attribute--> + </xsl:attribute-set> + + <!-- emphasis settings --> + <xsl:template match="emphasis"> + <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 color="#7C1C51" font-weight="bold"> + <xsl:copy-of select="$content"/> + </fo:inline> + </xsl:template> + <!-- Colourize links in output --> <xsl:attribute-set name="xref.properties"> <xsl:attribute name="color"> diff -r 102f89d20be1 -r 0aeeeab529d6 stylesheets/zh/fo.xsl --- a/stylesheets/zh/fo.xsl Tue Oct 27 22:46:49 2009 -0500 +++ b/stylesheets/zh/fo.xsl Tue Oct 27 21:29:13 2009 -0700 @@ -8,6 +8,13 @@ <xsl:param name="l10n.gentext.language" select="'zh'"/> <!-- Chinese font related settings --> + <xsl:param name="title.font.family">Calibri,sans-serif,SimHei</xsl:param> + <xsl:param name="body.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param> + <xsl:param name="sans.font.family">Calibri,sans-serif,SimHei</xsl:param> + <xsl:param name="dingbat.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param> + <xsl:param name="monospace.font.family">Courier New,monospace,FangSong</xsl:param> + + <!-- Chinese para related settings --> <xsl:param name="body.font.master">12</xsl:param> <xsl:attribute-set name="standard.para.spacing" use-attribute-sets="normal.para.spacing">