hgbook
changeset 887:0aeeeab529d6
Merge with Dongsheng
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue Oct 27 21:29:13 2009 -0700 (2009-10-27) |
parents | 102f89d20be1 8a2b0994ccd9 |
children | 93154fbaae9b |
files |
line diff
1.1 --- a/Makefile Tue Oct 27 22:46:49 2009 -0500 1.2 +++ b/Makefile Tue Oct 27 21:29:13 2009 -0700 1.3 @@ -6,7 +6,7 @@ 1.4 FORMATS=html html-single pdf epub 1.5 1.6 PO_LANGUAGES := zh 1.7 -DBK_LANGUAGES := en 1.8 +DBK_LANGUAGES := en it 1.9 LANGUAGES := $(DBK_LANGUAGES) $(PO_LANGUAGES) 1.10 1.11 UPDATEPO = PERLLIB=$(PO4A_LIB) $(PO4A_HOME)/po4a-updatepo -M UTF-8 \ 1.12 @@ -22,76 +22,38 @@ 1.13 #rev_id = $(shell hg parents --template '{node|short} ({date|isodate})') 1.14 rev_id = $(shell hg parents --template '{node|short} ({date|shortdate})') 1.15 1.16 -images := \ 1.17 - en/figs/bad-merge-1.png \ 1.18 - en/figs/bad-merge-2.png \ 1.19 - en/figs/bad-merge-3.png \ 1.20 - en/figs/bad-merge-4.png \ 1.21 - en/figs/bad-merge-5.png \ 1.22 - en/figs/feature-branches.png \ 1.23 - en/figs/filelog.png \ 1.24 - en/figs/metadata.png \ 1.25 - en/figs/mq-stack.png \ 1.26 - en/figs/revlog.png \ 1.27 - en/figs/snapshot.png \ 1.28 - en/figs/tour-history.png \ 1.29 - en/figs/tour-merge-conflict.png \ 1.30 - en/figs/tour-merge-merge.png \ 1.31 - en/figs/tour-merge-pull.png \ 1.32 - en/figs/tour-merge-sep-repos.png \ 1.33 - en/figs/undo-manual-merge.png \ 1.34 - en/figs/undo-manual.png \ 1.35 - en/figs/undo-non-tip.png \ 1.36 - en/figs/undo-simple.png \ 1.37 - en/figs/wdir-after-commit.png \ 1.38 - en/figs/wdir-branch.png \ 1.39 - en/figs/wdir-merge.png \ 1.40 - en/figs/wdir.png \ 1.41 - en/figs/wdir-pre-branch.png 1.42 +images-dot := $(wildcard en/figs/*.dot) 1.43 + 1.44 +images-svg := $(wildcard en/figs/*.svg) 1.45 +images-svg :=$(filter-out %-tmp.svg, $(images-svg)) 1.46 +images-svg -= $(images-dot:dot=svg) 1.47 + 1.48 +images-dst := $(wildcard en/figs/*.png) 1.49 +images-dst += $(images-dot:dot=png) 1.50 +images-dst += $(images-svg:svg=png) 1.51 + 1.52 +images-gen := $(images-dot:dot=png) 1.53 +images-gen += $(images-svg:svg=png) 1.54 +images-gen += $(wildcard en/figs/*-tmp.svg) 1.55 1.56 help: 1.57 - @echo " make epub [LINGUA=en|zh|...]" 1.58 - @echo " make html [LINGUA=en|zh|...]" 1.59 - @echo " make html-single [LINGUA=en|zh|...]" 1.60 - @echo " make pdf [LINGUA=en|zh|...]" 1.61 - @echo " make validate [LINGUA=en|zh|...] # always before commit!" 1.62 + @echo " make epub [LINGUA=en|it|zh|...]" 1.63 + @echo " make html [LINGUA=en|it|zh|...]" 1.64 + @echo " make html-single [LINGUA=en|it|zh|...]" 1.65 + @echo " make pdf [LINGUA=en|it|zh|...]" 1.66 + @echo " make validate [LINGUA=en|it|zh|...] # always before commit!" 1.67 @echo " make tidypo [LINGUA=zh|...] # always before commit!" 1.68 @echo " make updatepo [LINGUA=zh|...] # update po files." 1.69 - @echo " make all [LINGUA=en|zh|...]" 1.70 + @echo " make all [LINGUA=en|it|zh|...]" 1.71 @echo " make stat # print statistics about po files." 1.72 @echo " make clean # Remove the build files." 1.73 1.74 clean: 1.75 - @rm -fr build po/*.mo hello en/hello en/html en/.validated-00book.xml en/examples/.run en/examples/results \ 1.76 - stylesheets/system-xsl en/figs/*-tmp.svg \ 1.77 - web/index-read.html.in \ 1.78 - en/figs/bad-merge-1.png \ 1.79 - en/figs/bad-merge-2.png \ 1.80 - en/figs/bad-merge-3.png \ 1.81 - en/figs/bad-merge-4.png \ 1.82 - en/figs/bad-merge-5.png \ 1.83 - en/figs/feature-branches.png \ 1.84 - en/figs/filelog.png \ 1.85 - en/figs/feature-branches.png \ 1.86 - en/figs/filelog.png \ 1.87 - en/figs/metadata.png \ 1.88 - en/figs/mq-stack.png \ 1.89 - en/figs/revlog.png \ 1.90 - en/figs/snapshot.png \ 1.91 - en/figs/tour-history.png \ 1.92 - en/figs/tour-merge-conflict.png \ 1.93 - en/figs/tour-merge-merge.png \ 1.94 - en/figs/tour-merge-pull.png \ 1.95 - en/figs/tour-merge-sep-repos.png \ 1.96 - en/figs/undo-manual-merge.png \ 1.97 - en/figs/undo-manual.png \ 1.98 - en/figs/undo-non-tip.png \ 1.99 - en/figs/undo-simple.png \ 1.100 - en/figs/wdir-after-commit.png \ 1.101 - en/figs/wdir-branch.png \ 1.102 - en/figs/wdir-merge.png \ 1.103 - en/figs/wdir-pre-branch.png \ 1.104 - en/figs/wdir.png 1.105 + @rm -fr build hello po/*.mo /tmp/REV*-hello en/examples/results 1.106 + 1.107 + @(for l in $(DBK_LANGUAGES); do \ 1.108 + rm -fr $(subst en/figs/, $$l/figs/, $(images-gen)) $$l/examples/.run;\ 1.109 + done) 1.110 1.111 all: 1.112 ifdef LINGUA 1.113 @@ -117,8 +79,10 @@ 1.114 1.115 tidypo: 1.116 ifdef LINGUA 1.117 + ifneq "$(findstring $(LINGUA),$(PO_LANGUAGES))" "" 1.118 msgcat --sort-by-file --width=80 po/$(LINGUA).po > po/$(LINGUA).tmp && \ 1.119 mv po/$(LINGUA).tmp po/$(LINGUA).po; 1.120 + endif 1.121 else 1.122 for po in $(wildcard po/*.po); do \ 1.123 msgcat --sort-by-file --width=80 $$po > $$po.tmp && mv $$po.tmp $$po; \ 1.124 @@ -131,13 +95,15 @@ 1.125 $(MAKE) $@ LINGUA=$$l; \ 1.126 done 1.127 else 1.128 -updatepo: 1.129 -ifneq "$(findstring $(LINGUA),$(PO_LANGUAGES))" "" 1.130 +po/$(LINGUA).po: $(wildcard en/*.xml) 1.131 + ifneq "$(findstring $(LINGUA),$(PO_LANGUAGES))" "" 1.132 (cd po; \ 1.133 $(UPDATEPO) -m ../en/00book.xml -p $(LINGUA).po; \ 1.134 ) 1.135 $(MAKE) tidypo LINGUA=$(LINGUA) 1.136 -endif 1.137 + endif 1.138 + 1.139 +updatepo: po/$(LINGUA).po 1.140 endif 1.141 1.142 ifndef LINGUA 1.143 @@ -149,24 +115,28 @@ 1.144 validate: build/$(LINGUA)/source/hgbook.xml 1.145 xmllint --nonet --noout --postvalid --xinclude $< 1.146 1.147 -ifneq "$(findstring $(LINGUA),$(DBK_LANGUAGES))" "" 1.148 + ifneq "$(findstring $(LINGUA),$(DBK_LANGUAGES))" "" 1.149 $(LINGUA)/examples/.run: 1.150 - (cd $(LINGUA)/examples; ./run-example -v -a) 1.151 - 1.152 -build/$(LINGUA)/source/hgbook.xml: $(wildcard $(LINGUA)/*.xml) $(images) $(LINGUA)/examples/.run 1.153 + if test -x $(LINGUA)/examples/run-example; then \ 1.154 + (cd $(LINGUA)/examples; ./run-example -a); \ 1.155 + else \ 1.156 + touch $@; \ 1.157 + fi 1.158 + 1.159 +build/$(LINGUA)/source/hgbook.xml: $(wildcard $(LINGUA)/*.xml) $(subst en/figs/, $(LINGUA)/figs/, $(images-dst)) $(LINGUA)/examples/.run 1.160 mkdir -p build/$(LINGUA)/source/figs 1.161 cp $(LINGUA)/figs/*.png build/$(LINGUA)/source/figs 1.162 cp stylesheets/hgbook.css build/$(LINGUA)/source 1.163 (cd $(LINGUA); xmllint --nonet --noent --xinclude --postvalid --output ../$@.tmp 00book.xml) 1.164 cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@ 1.165 -else 1.166 + else 1.167 en/examples/.run: 1.168 - (cd en/examples; ./run-example -v -a) 1.169 + (cd en/examples; ./run-example -a) 1.170 1.171 build/en/source/hgbook.xml: 1.172 ${MAKE} LINGUA=en $@ 1.173 1.174 -build/$(LINGUA)/source/hgbook.xml: $(wildcard en/*.xml) po/$(LINGUA).po $(images) 1.175 +build/$(LINGUA)/source/hgbook.xml: $(wildcard en/*.xml) po/$(LINGUA).po $(images-dst) en/examples/.run 1.176 mkdir -p build/$(LINGUA)/source/figs 1.177 cp en/figs/*.png build/$(LINGUA)/source/figs 1.178 cp stylesheets/hgbook.css build/$(LINGUA)/source 1.179 @@ -174,7 +144,7 @@ 1.180 xmllint --nonet --noent --xinclude --postvalid --output $@.tmp en/hgbook.xml.$(LINGUA) 1.181 cat $@.tmp | sed 's/\$$rev_id\$$/${rev_id}/' > $@ 1.182 mv en/hgbook.xml.$(LINGUA) build/$(LINGUA)/source 1.183 -endif 1.184 + endif 1.185 1.186 endif 1.187 1.188 @@ -246,6 +216,17 @@ 1.189 (cd build/$(LINGUA)/source && $(FOP_HOME)/fop.sh -c $(FOP_HOME)/conf/userconfig.xml hgbook.fo ../pdf/hgbook.pdf) 1.190 endif 1.191 1.192 +$(LINGUA)/figs/%.png: $(LINGUA)/figs/%.svg 1.193 + if test -x $(LINGUA)/fixsvg; then \ 1.194 + $(LINGUA)/fixsvg $<; \ 1.195 + inkscape -D -d 120 -e $@ $<-tmp.svg; \ 1.196 + else \ 1.197 + inkscape -D -d 120 -e $@ $<; \ 1.198 + fi 1.199 + 1.200 +$(LINGUA)/figs/%.svg: $(LINGUA)/figs/%.dot 1.201 + dot -Tsvg -o $@ $< 1.202 + 1.203 en/figs/%.png: en/figs/%.svg en/fixsvg 1.204 en/fixsvg $< 1.205 inkscape -D -d 120 -e $@ $<-tmp.svg
2.1 --- a/Makefile.vars.tmpl Tue Oct 27 22:46:49 2009 -0500 2.2 +++ b/Makefile.vars.tmpl Tue Oct 27 21:29:13 2009 -0700 2.3 @@ -1,20 +1,20 @@ 2.4 # 2.5 -# Please create your Makefile.vars file from this template file. 2.6 +# Please create your Makefile.vars from this template file. 2.7 # 2.8 # Please use absolute path, DO NOT use relative path ! 2.9 # 2.10 2.11 -# po4a (>= 0.36.1): Only for PO based Makefile ! 2.12 +# po4a (>= 0.36.1): Only for PO based translation ! 2.13 # po4A_HOME=/usr/bin 2.14 # PO4A_LIB=/usr/share/perl5 2.15 -PO4A_HOME=/home/dongsheng/var/svn/i18n-zh/trunk/lib/po4a 2.16 +PO4A_HOME=/home/dongsheng/vcs/svn/i18n-zh/trunk/lib/po4a 2.17 PO4A_LIB=$(PO4A_HOME)/lib 2.18 2.19 # saxon65.jar, saxon65-dbxsl.jar, xml-commons-resolver-1.2.jar: Only for pdf format ! 2.20 -JAVA_LIB=/home/dongsheng/var/svn/i18n-zh/trunk/lib/share/java 2.21 +JAVA_LIB=/home/dongsheng/vcs/svn/i18n-zh/trunk/lib/share/java 2.22 2.23 # fop (>= 0.9.6): Only for pdf format ! 2.24 -FOP_HOME=/home/dongsheng/var/svn/i18n-zh/trunk/lib/fop 2.25 +FOP_HOME=/home/dongsheng/vcs/svn/i18n-zh/trunk/lib/fop 2.26 2.27 # docbook-xsl (>= 1.74.3): Only for ePub format ! 2.28 -DB2EPUB=/home/dongsheng/var/svn/i18n-zh/trunk/lib/docbook/docbook-xsl/epub/bin/dbtoepub 2.29 +DB2EPUB=/home/dongsheng/vcs/svn/i18n-zh/trunk/lib/docbook/docbook-xsl/epub/bin/dbtoepub
3.1 --- a/README Tue Oct 27 22:46:49 2009 -0500 3.2 +++ b/README Tue Oct 27 21:29:13 2009 -0700 3.3 @@ -8,9 +8,13 @@ 3.4 3.5 Here's a top-level tour of interesting directories: 3.6 3.7 -en English-language content 3.8 -es Spanish-language content 3.9 -examples Miscellaneous example scripts 3.10 -tools Old, largely unused conversion scripts 3.11 -web Content and comment system for http://hgbook.red-bean.com/ 3.12 -xsl XSLT scripts for generating HTML 3.13 +contrib Miscellaneous scripts 3.14 +en English-language content (DocBook XML format) 3.15 +stylesheets XSLT scripts for generating HTML 3.16 +web Content and comment system for http://hgbook.red-bean.com/ 3.17 + 3.18 +po PO based translation Chinese translation 3.19 + 3.20 +it Italian translation DocBook XML format 3.21 +es Spanish translation old tex format 3.22 +ja Japanese translation old tex format
4.1 --- a/README.BUILD Tue Oct 27 22:46:49 2009 -0500 4.2 +++ b/README.BUILD Tue Oct 27 21:29:13 2009 -0700 4.3 @@ -16,17 +16,13 @@ 4.4 4.5 I. PRIMER 4.6 4.7 - DocBook has a tortured, confusing history. Before you do anything, 4.8 - take a look at Eric Raymond's excellent "DocBook Demystification HOWTO": 4.9 + DocBook has a tortured, confusing history. Before you do anything, 4.10 + take a look at: 4.11 4.12 - http://tldp.org/HOWTO/DocBook-Demystification-HOWTO/ 4.13 - 4.14 - It's very short and clears up many things. 4.15 - 4.16 + http://wiki.docbook.org/topic/DocBookTutorials 4.17 4.18 II. COMPILING THE DOCS 4.19 4.20 - 4.21 1. Install XML DTD and XSL stylesheets for DocBook 4.22 4.23 % sudo apt-get install docbook-xml docbook-xsl 4.24 @@ -35,27 +31,44 @@ 4.25 4.26 % sudo apt-get install libxml2-utils 4.27 4.28 -3. Install graph drawing tools 4.29 +3. Install graph drawing and patches tools 4.30 4.31 - % sudo apt-get install graphviz inkscape 4.32 + % sudo apt-get install graphviz inkscape patchutils 4.33 4.34 4. Install pdf support 4.35 4.36 % sudo apt-get install openjdk-6-jdk docbook-xsl-saxon libsaxon-java fop 4.37 4.38 - The Makefile will actually invoke tools/fop/fop.sh, you should do 4.39 + The Makefile will actually invoke $FOP_HOME/fop.sh, you should do 4.40 some trick, let fop's CLASSPATH include saxon.jar and docbook-xsl-saxon.jar . 4.41 4.42 -5. Make 4.43 +5. Configure XML Catalogs 4.44 + For non pdf output, we use xsltproc for XSLT process, xsltproc use system 4.45 + catalog files automatically, usually /etc/xml/catalog. Users do not need to 4.46 + care about it. 4.47 + 4.48 + For pdf output, we need use the xsl extensions (docbook-xsl-saxon), so we must 4.49 + create file $JAVA_LIB/CatalogManager.properties like this: 4.50 + 4.51 + catalogs=/etc/xml/catalog 4.52 + relative-catalogs=true 4.53 + static-catalog=yes 4.54 + catalog-class-name=org.apache.xml.resolver.Resolver 4.55 + verbosity=1 4.56 + 4.57 +6. Create Makefile.vars 4.58 + Please create your Makefile.vars from Makefile.vars.tmpl . 4.59 + 4.60 +7. Make 4.61 Run 'make' for more details, for example: 4.62 4.63 - * make all document(pdf, html and html-single for all languages) 4.64 + * make all document(pdf, epub, html and html-single for all languages) 4.65 % make all 4.66 4.67 - * make english document(pdf, html and html-single for all languages) 4.68 + * make english document(pdf, epub, html and html-single for all languages) 4.69 % make LINGUA=en all 4.70 4.71 - * make Chinese document(pdf, html and html-single for all languages) 4.72 + * make Chinese document(pdf, epub, html and html-single for all languages) 4.73 % make LINGUA=zh all 4.74 4.75 * make Chinese pdf document 4.76 @@ -65,24 +78,22 @@ 4.77 4.78 In addition to everything in section II: 4.79 4.80 - 4.81 -1. Get a nice editing environment for SGML/XML. 4.82 +1. Get a nice editing environment for XML 4.83 4.84 This isn't strictly required, but it's nice when your editor 4.85 colorizes things, understands the DTD, tells you what tags you can 4.86 insert, etc. 4.87 4.88 - If you use emacs, we recommend the PSGML major-mode. Most free 4.89 + If you use emacs, we recommend the nxml-mode. Most free 4.90 operating systems package it, or its home page is here: 4.91 4.92 - http://www.lysator.liu.se/projects/about_psgml.html 4.93 + http://www.emacswiki.org/emacs/NxmlMode 4.94 4.95 If you use vim, you might check out xmledit, at: 4.96 4.97 http://www.vim.org/scripts/script.php?script_id=301 4.98 4.99 - 4.100 -2. Get a validating parser. 4.101 +2. Get a validating parser 4.102 4.103 Actually, if you have what you need to compile the documentation, 4.104 then you almost certainly have an XML validator installed already - 4.105 @@ -93,7 +104,7 @@ 4.106 4.107 $ make validate 4.108 4.109 -3. Read about DocBook. 4.110 +3. Read about DocBook 4.111 4.112 You'll want to get real intimate with a DocBook reference, such as 4.113 can be found at: http://www.docbook.org/tdg/en/html/
5.1 --- a/contrib/hg-package Tue Oct 27 22:46:49 2009 -0500 5.2 +++ b/contrib/hg-package Tue Oct 27 21:29:13 2009 -0700 5.3 @@ -1,9 +1,13 @@ 5.4 #!/bin/sh 5.5 5.6 +# 5.7 +# Package build results & Upload to i18n-zh 5.8 +# 5.9 + 5.10 build_dir=`dirname "$0"`/../build 5.11 rev_id=`hg parents --template '{date|shortdate}' | sed 's/-//g'` 5.12 5.13 -for l in en zh; do 5.14 +for l in en zh it; do 5.15 ( 5.16 if [ ! -d "${build_dir}/${l}" ] ; then 5.17 continue
6.1 Binary file it/figs/caution.png has changed
7.1 Binary file it/figs/note.png has changed
8.1 Binary file it/figs/tip.png has changed
9.1 Binary file it/figs/warning.png has changed
10.1 --- a/po/zh.po Tue Oct 27 22:46:49 2009 -0500 10.2 +++ b/po/zh.po Tue Oct 27 21:29:13 2009 -0700 10.3 @@ -42,7 +42,7 @@ 10.4 msgstr "" 10.5 "Project-Id-Version: hgbook 1.2\n" 10.6 "POT-Creation-Date: 2009-05-21 14:26+0800\n" 10.7 -"PO-Revision-Date: 2009-05-21 16:42+0800\n" 10.8 +"PO-Revision-Date: 2009-10-21 16:42+0800\n" 10.9 "Last-Translator: 宋冬生 <songdonogsheng@live.cn>\n" 10.10 "Language-Team: Simplified Chinese <i18n-zh@googlegroups.com >\n" 10.11 "MIME-Version: 1.0\n" 10.12 @@ -2372,7 +2372,7 @@ 10.13 #. type: Content of: <book><chapter><title> 10.14 #: ../en/ch01-intro.xml:5 10.15 msgid "How did we get here?" 10.16 -msgstr "" 10.17 +msgstr "写在前面" 10.18 10.19 #. type: Content of: <book><chapter><sect1><title> 10.20 #: ../en/ch01-intro.xml:8
11.1 --- a/stylesheets/fo.xsl Tue Oct 27 22:46:49 2009 -0500 11.2 +++ b/stylesheets/fo.xsl Tue Oct 27 21:29:13 2009 -0700 11.3 @@ -1,8 +1,12 @@ 11.4 <?xml version="1.0"?> 11.5 -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> 11.6 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 11.7 + xmlns:fo="http://www.w3.org/1999/XSL/Format" 11.8 + version='1.0'> 11.9 11.10 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/> 11.11 11.12 + <xsl:param name="l10n.gentext.language" select="'en'"/> 11.13 + <xsl:param name="paper.type" select="'A4'"></xsl:param> 11.14 <xsl:param name="draft.mode" select="no"/> 11.15 11.16 <!-- These extensions are required for table printing and other stuff --> 11.17 @@ -22,42 +26,24 @@ 11.18 <xsl:param name="section.autolabel" select="1" /> 11.19 <xsl:param name="section.label.includes.component.label">1</xsl:param> 11.20 11.21 - <xsl:param name="variablelist.as.blocks" select="1" /> <!-- fo only --> 11.22 - <xsl:param name="hyphenate">false</xsl:param> <!-- fo only --> 11.23 - <xsl:param name="paper.type" select="'A4'"></xsl:param> <!-- fo only --> 11.24 + <xsl:param name="variablelist.as.blocks" select="1" /> 11.25 + <xsl:param name="hyphenate">false</xsl:param> 11.26 11.27 - <!-- Default font settings --> 11.28 - <!-- 11.29 - <xsl:param name="title.font.family">sans-serif</xsl:param> 11.30 - <xsl:param name="body.font.family">serif</xsl:param> 11.31 - <xsl:param name="sans.font.family">sans-serif</xsl:param> 11.32 - <xsl:param name="dingbat.font.family">serif</xsl:param> 11.33 - <xsl:param name="monospace.font.family">monospace</xsl:param> 11.34 + <!-- Font settings, we use characters out of base14 even for english --> 11.35 + <xsl:param name="title.font.family">sans-serif,Arial</xsl:param> 11.36 + <xsl:param name="body.font.family">serif,Times New Roman</xsl:param> 11.37 + <xsl:param name="sans.font.family">sans-serif,Arial</xsl:param> 11.38 + <xsl:param name="dingbat.font.family">serif,Times New Roman</xsl:param> 11.39 + <xsl:param name="monospace.font.family">monospace,Courier New</xsl:param> 11.40 <xsl:param name="symbol.font.family">Symbol,ZapfDingbats</xsl:param> 11.41 - --> 11.42 11.43 - <!-- Custom font settings - preferred truetype font --> 11.44 - <xsl:param name="title.font.family">Calibri,sans-serif,SimHei</xsl:param> 11.45 - <xsl:param name="body.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param> 11.46 - <xsl:param name="sans.font.family">Calibri,sans-serif,SimHei</xsl:param> 11.47 - <xsl:param name="dingbat.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param> 11.48 - <xsl:param name="monospace.font.family">Courier New,monospace,FangSong</xsl:param> 11.49 - 11.50 - <!-- Page related Settings --> 11.51 + <!-- Page related settings --> 11.52 <xsl:param name="page.margin.inner">1.5cm</xsl:param> 11.53 <xsl:param name="page.margin.outer">1.5cm</xsl:param> 11.54 <xsl:param name="title.margin.left">0pt</xsl:param> 11.55 <xsl:param name="body.start.indent">24pt</xsl:param> 11.56 <xsl:param name="body.end.indent">0pt</xsl:param> 11.57 11.58 - <!-- Breaking long lines --> 11.59 - <xsl:param name="hyphenate.verbatim">0</xsl:param> 11.60 - <xsl:attribute-set name="monospace.verbatim.properties" 11.61 - use-attribute-sets="verbatim.properties monospace.properties"> 11.62 - <xsl:attribute name="wrap-option">wrap</xsl:attribute> 11.63 - <xsl:attribute name="hyphenation-character">►</xsl:attribute> 11.64 - </xsl:attribute-set> 11.65 - 11.66 <!-- Prevent blank pages in output --> 11.67 <xsl:template name="book.titlepage.before.verso"> 11.68 </xsl:template> 11.69 @@ -66,6 +52,105 @@ 11.70 <xsl:template name="book.titlepage.separator"> 11.71 </xsl:template> 11.72 11.73 + <!-- titlepage settings --> 11.74 + <xsl:template name="book.titlepage"> 11.75 + <fo:block> 11.76 + <fo:table table-layout="fixed" space-after.optimum="10pt" width="100%"> 11.77 + <fo:table-body> 11.78 + <fo:table-row> 11.79 + <fo:table-cell> 11.80 + <fo:block text-align="center"> 11.81 + <!--fo:external-graphic src="url(figs/cover-logo.png)" 11.82 + width="90%" height="auto" content-width="scale-to-fit" content-height="scale-to-fit" /--> 11.83 + </fo:block> 11.84 + </fo:table-cell> 11.85 + </fo:table-row> 11.86 + </fo:table-body> 11.87 + </fo:table> 11.88 + </fo:block> 11.89 + 11.90 + <fo:block text-align="center" color="#000000" margin-left="1cm" margin-right="1cm" 11.91 + space-before.optimum="3cm" space-after.optimum="5.0cm" 11.92 + font-weight="900" font-size="32pt"> 11.93 + <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute> 11.94 + 11.95 + <xsl:value-of select="/book/title"/> 11.96 + </fo:block> 11.97 + 11.98 + <fo:block text-align="center" color="#000080" margin-left="1cm" margin-right="1cm" 11.99 + space-before.optimum="2cm" space-after.optimum="8.0cm" 11.100 + font-weight="900" font-size="16pt"> 11.101 + <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute> 11.102 + 11.103 + <xsl:value-of select="/book/subtitle"/> 11.104 + </fo:block> 11.105 + 11.106 + <fo:block text-align="center" color="#000000" margin-left="1cm" margin-right="1cm" 11.107 + space-before.optimum="8cm" space-after.optimum="10cm" 11.108 + font-weight="600" font-size="24pt"> 11.109 + <xsl:attribute name="font-family"><xsl:value-of select="$title.font.family" /></xsl:attribute> 11.110 + 11.111 + <xsl:call-template name="person.name.list"> 11.112 + <xsl:with-param name="person.list" select="bookinfo/authorgroup/author"/> 11.113 + </xsl:call-template> 11.114 + </fo:block> 11.115 + 11.116 + <!--fo:block text-align="end" color="#666D70" margin-left="1cm" margin-right="1cm" 11.117 + font-family="sans-serif" font-weight="normal" font-size="10pt" > 11.118 + <xsl:value-of select="/book/subtitle"/> 11.119 + </fo:block--> 11.120 + </xsl:template> 11.121 + 11.122 + <!-- title settings --> 11.123 + <xsl:attribute-set name="preface.titlepage.recto.style"> 11.124 + <xsl:attribute name="color">#7C1C51</xsl:attribute> 11.125 + </xsl:attribute-set> 11.126 + <xsl:attribute-set name="chapter.titlepage.recto.style"> 11.127 + <xsl:attribute name="color">#7C1C51</xsl:attribute> 11.128 + </xsl:attribute-set> 11.129 + <xsl:attribute-set name="section.titlepage.recto.style"> 11.130 + <xsl:attribute name="color">#7C1C51</xsl:attribute> 11.131 + </xsl:attribute-set> 11.132 + <xsl:attribute-set name="appendix.titlepage.recto.style"> 11.133 + <xsl:attribute name="color">#7C1C51</xsl:attribute> 11.134 + </xsl:attribute-set> 11.135 + 11.136 + <!-- Verbatim related settings --> 11.137 + <xsl:param name="hyphenate.verbatim">0</xsl:param> 11.138 + 11.139 + <xsl:attribute-set name="monospace.properties"> 11.140 + <xsl:attribute name="font-family"> 11.141 + <xsl:value-of select="$monospace.font.family"/> 11.142 + </xsl:attribute> 11.143 + <xsl:attribute name="color">#000080</xsl:attribute> 11.144 + </xsl:attribute-set> 11.145 + 11.146 + <xsl:attribute-set name="monospace.verbatim.properties" 11.147 + use-attribute-sets="verbatim.properties monospace.properties"> 11.148 + <xsl:attribute name="border-color">blue</xsl:attribute> 11.149 + <xsl:attribute name="border-width">thin</xsl:attribute> 11.150 + <xsl:attribute name="border-style">solid</xsl:attribute> 11.151 + <xsl:attribute name="font-size">8pt</xsl:attribute> 11.152 + <xsl:attribute name="wrap-option">wrap</xsl:attribute> 11.153 + <xsl:attribute name="hyphenation-character">►</xsl:attribute> 11.154 + <!--xsl:attribute name="hyphenation-character">➤</xsl:attribute--> 11.155 + </xsl:attribute-set> 11.156 + 11.157 + <!-- emphasis settings --> 11.158 + <xsl:template match="emphasis"> 11.159 + <xsl:param name="content"> 11.160 + <xsl:call-template name="simple.xlink"> 11.161 + <xsl:with-param name="content"> 11.162 + <xsl:apply-templates/> 11.163 + </xsl:with-param> 11.164 + </xsl:call-template> 11.165 + </xsl:param> 11.166 + 11.167 + <fo:inline color="#7C1C51" font-weight="bold"> 11.168 + <xsl:copy-of select="$content"/> 11.169 + </fo:inline> 11.170 + </xsl:template> 11.171 + 11.172 <!-- Colourize links in output --> 11.173 <xsl:attribute-set name="xref.properties"> 11.174 <xsl:attribute name="color">
12.1 --- a/stylesheets/zh/fo.xsl Tue Oct 27 22:46:49 2009 -0500 12.2 +++ b/stylesheets/zh/fo.xsl Tue Oct 27 21:29:13 2009 -0700 12.3 @@ -8,6 +8,13 @@ 12.4 <xsl:param name="l10n.gentext.language" select="'zh'"/> 12.5 12.6 <!-- Chinese font related settings --> 12.7 + <xsl:param name="title.font.family">Calibri,sans-serif,SimHei</xsl:param> 12.8 + <xsl:param name="body.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param> 12.9 + <xsl:param name="sans.font.family">Calibri,sans-serif,SimHei</xsl:param> 12.10 + <xsl:param name="dingbat.font.family">Cambria,Cambria Math,serif,SimSun</xsl:param> 12.11 + <xsl:param name="monospace.font.family">Courier New,monospace,FangSong</xsl:param> 12.12 + 12.13 + <!-- Chinese para related settings --> 12.14 <xsl:param name="body.font.master">12</xsl:param> 12.15 12.16 <xsl:attribute-set name="standard.para.spacing" use-attribute-sets="normal.para.spacing">