From: taffit Date: Wed, 11 Jan 2012 04:21:34 +0000 (+0000) Subject: [dev-ref] Use XeTeX backend (closes: #629530) and add the Japanese PDF X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=developers-reference.git;a=commitdiff_plain;h=f9e6ba50d75877dc53b348265ece0ee50477e8b7 [dev-ref] Use XeTeX backend (closes: #629530) and add the Japanese PDF git-svn-id: svn://anonscm.debian.org/ddp/manuals/trunk/developers-reference@9033 313b444b-1b9f-4f58-a734-7bb04f332e8d --- diff --git a/Makefile b/Makefile index 860e219..cfc064b 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ TARGETS := $(foreach fmt,$(FORMATS),developers-reference.$(fmt)) \ $(foreach fmt,$(FORMATS), \ $(lng)/developers-reference.$(fmt))) # list of targets, that currently cannot build -BLACKLIST := ja/developers-reference.pdf +#BLACKLIST := ja/developers-reference.pdf # hopefully overwritten by caller, e.g. debian/rules VERSION=unknown @@ -80,11 +80,7 @@ ifndef LINGUA FORCE: else $(LINGUA)/%.dbk: %.dbk $(patsubst %.dbk,po4a/$(LINGUA)/%.po,%.dbk) -# $(TRANSLATE) -m $< -p po4a/$(@:.dbk=.po) -l $@ -a ?po4a/$(@:.dbk=.add) -# workaround to "-a ?" only possible with po4a version in Squeeze, otherwise build is broken in Lenny - if [ -f po4a/$(@:.dbk=.add) ]; then \ - $(TRANSLATE) -m $< -p po4a/$(@:.dbk=.po) -l $@ -a po4a/$(@:.dbk=.add); else \ - $(TRANSLATE) -m $< -p po4a/$(@:.dbk=.po) -l $@; fi + $(TRANSLATE) -m $< -p po4a/$(@:.dbk=.po) -l $@ -a ?po4a/$(@:.dbk=.add) $(LINGUA)/common.ent: common.ent cd $(@D) && ln -sf ../$(@F) . @@ -95,10 +91,16 @@ developers-reference.txt: $(CURDIR)/developers-reference.txt $(XP) $(DBK2HTML1) $(@D)/index.dbk \ | w3m -o display_charset=UTF-8 -cols 70 -dump -no-graph -T text/html > $@ +XSLT := xslt + developers-reference.pdf: $(CURDIR)/developers-reference.pdf %/developers-reference.pdf: $(addprefix %/,$(SOURCES)) - TOP=`pwd` && cd $(@D) && $(DBLATEX) index.dbk \ - && mv index.dbk.pdf $(@F) + $(DBLATEX) $(@D)/index.dbk \ + --backend=xetex \ + --xsl-user=$(XSLT)/user_param.xsl \ + --xsl-user=$(XSLT)/xetex_param.xsl \ + --param=lingua=$(@D) \ + && mv $(@D)/index.dbk.pdf $@ .PHONY: pot pot: $(patsubst %.dbk,po4a/po/%.pot,$(SOURCES)) diff --git a/debian/changelog b/debian/changelog index fd918ae..d4c60bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -26,8 +26,11 @@ developers-reference (3.4.7) UNRELEASED; urgency=low * Add doc-base file for the German translation. * Update French translation. * Typo fix, thanks to Andreas Moog. Closes: #655096 + * Use XeTeX backend, that fix quotes in examples. Closes: #629530 + * Build the Japanese PDF, thanks to Osamu Aoki and the maint-guide build + process. - -- David Prévot Sun, 08 Jan 2012 14:57:56 -0400 + -- David Prévot Tue, 10 Jan 2012 23:46:30 -0400 developers-reference (3.4.6) unstable; urgency=low diff --git a/debian/control b/debian/control index a0f76e7..35e3f9d 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,9 @@ Priority: optional Maintainer: Developers Reference Maintainers Uploaders: Lucas Nussbaum , Marc 'HE' Brockschmidt , Raphaël Hertzog Standards-Version: 3.9.2 -Build-Depends-Indep: docbook-xsl (>= 1.71.0), dblatex (>= 0.2), xsltproc, libxml2-utils, po4a, w3m +Build-Depends-Indep: docbook-xsl (>= 1.71.0), dblatex (>= 0.2), xsltproc, libxml2-utils, po4a, w3m, + fonts-ipafont-gothic, fonts-ipafont-mincho, gsfonts, latex-cjk-xcjk, lmodern, + texlive-lang-cyrillic, texlive-lang-french, texlive-lang-german, texlive-xetex Build-Depends: debhelper (>= 5) Vcs-Svn: svn://svn.debian.org/ddp/manuals/trunk/developers-reference Vcs-Browser: http://svn.debian.org/wsvn/ddp/manuals/trunk/developers-reference?op=log diff --git a/debian/developers-reference-ja.doc-base b/debian/developers-reference-ja.doc-base index 874fe3c..495c4c9 100644 --- a/debian/developers-reference-ja.doc-base +++ b/debian/developers-reference-ja.doc-base @@ -12,3 +12,6 @@ Section: Debian Format: HTML Index: /usr/share/doc/developers-reference-ja/index.html Files: /usr/share/doc/developers-reference-ja/*.html + +Format: PDF +Files: /usr/share/doc/developers-reference-ja/developers-reference.pdf diff --git a/debian/rules b/debian/rules index 899b145..5ca0113 100755 --- a/debian/rules +++ b/debian/rules @@ -11,8 +11,8 @@ docbasedir := $(prefix)$(docbaserel) # list of language packages, in the form pkg-LANG; must jibe # with debian/control -langs := fr de -langs_nopdf := ja +langs := de fr ja +langs_nopdf := # tool abstraction install_file := install -o root -g root -m 644 -p diff --git a/xslt/user_param.xsl b/xslt/user_param.xsl new file mode 100644 index 0000000..7248736 --- /dev/null +++ b/xslt/user_param.xsl @@ -0,0 +1,21 @@ + + + + + + maybe + 1 + utf8 + 1 + nohyphen + + + + + + + diff --git a/xslt/xetex_param.xsl b/xslt/xetex_param.xsl new file mode 100644 index 0000000..04ea199 --- /dev/null +++ b/xslt/xetex_param.xsl @@ -0,0 +1,117 @@ + + + + + + + + + \setmainfont{Nimbus Roman No9 L} + \setsansfont{Nimbus Sans L} + \setmonofont{Nimbus Mono L} + \usepackage{xeCJK} + + + + \setCJKmainfont{AR PL SungtiL GB} + \setCJKsansfont{WenQuanYi Zen Hei} + \setCJKmonofont{WenQuanYi Zen Hei Mono} + + + + \setCJKmainfont{AR PL Mingti2L Big5} + \setCJKsansfont{WenQuanYi Zen Hei} + \setCJKmonofont{WenQuanYi Zen Hei Mono} + + + + \setCJKmainfont{IPAMincho} + \setCJKsansfont{IPAPGothic} + \setCJKmonofont{IPAGothic} + + + + \setCJKmainfont{UnBatang} + \setCJKsansfont{UnDotum} + \setCJKmonofont{UnDotum} + + + + + + + +