diff options
author | Holger Wansing <holgerw@debian.org> | 2016-12-28 18:34:00 +0000 |
---|---|---|
committer | Holger Wansing <holgerw@debian.org> | 2016-12-28 18:34:00 +0000 |
commit | db57aeee6afcaf09d9bcc5ac3d66569712c40630 (patch) | |
tree | 7228caee2953d44bc086ec9c7270c54a8e1b1cb1 | |
parent | 410dda724a0728c4d68bb422dda9a4f35c795add (diff) | |
download | installation-guide-db57aeee6afcaf09d9bcc5ac3d66569712c40630.zip |
Change build chain for pdf variant from jade to dblatex
and activate pdf for Chinese, Greek, Japanese and Vietnamese.
Thanks to victory for the patch.
-rwxr-xr-x | build/buildone.sh | 15 | ||||
-rw-r--r-- | build/dblatex.xsl | 42 | ||||
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/control | 11 |
4 files changed, 63 insertions, 11 deletions
diff --git a/build/buildone.sh b/build/buildone.sh index 9c2792a16..80261bfcf 100755 --- a/build/buildone.sh +++ b/build/buildone.sh @@ -227,15 +227,14 @@ create_dvi () { } create_pdf() { - - [ -x "`which dvipdf 2>/dev/null`" ] || return 9 - create_dvi - RET=$?; [ $RET -ne 0 ] && return $RET + [ -x "`which dblatex 2>/dev/null`" ] || return 9 echo "Info: creating .pdf file..." - ( cd $tempdir ; dvipdf install.${language}.dvi ) + ( dblatex -d -V -T db2latex -b xetex -p ./dblatex.xsl \ + -o $tempdir/install.${language}.pdf \ + $tempdir/install.${language}.profiled.xml --param=lingua=${language} ) RET=$?; [ $RET -ne 0 ] && return $RET mv $tempdir/install.${language}.pdf $destdir/ @@ -280,9 +279,9 @@ BUILD_OK="" BUILD_FAIL="" for format in $formats ; do case "$language" in - el|ja|vi|zh_CN|zh_TW) + __) if [ "$format" = "pdf" -o "$format" = "ps" ] ; then - echo "Warning: pdf and ps formats are currently not supported for Chinese, Greek, Japanese and Vietnamese" + echo "Warning: pdf and ps formats are currently not supported for __." BUILD_SKIP="$BUILD_SKIP $format" continue fi @@ -309,7 +308,7 @@ for format in $formats ; do BUILD_FAIL="$BUILD_FAIL $format" echo "Error: build of $format failed because of missing build dependencies" >&2 if [ "$format" = "pdf" ] ; then - echo "Error: (make sure you have ghostscript, openjade and jadetex installed for PDF builds)" >&2 + echo "Error: (make sure you have ghostscript and dblatex installed for PDF builds)" >&2 fi ;; *) diff --git a/build/dblatex.xsl b/build/dblatex.xsl new file mode 100644 index 000000000..dc3eee070 --- /dev/null +++ b/build/dblatex.xsl @@ -0,0 +1,42 @@ +<?xml version='1.0' encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> + + <xsl:param name="latex.encoding">utf8</xsl:param> + <xsl:param name="latex.class.options">10pt,onecolumn</xsl:param> + <xsl:param name="xetex.font"> + <xsl:choose> + <xsl:when test="contains(/book/@lang,'ja')"> + <xsl:text>\usepackage{xeCJK} </xsl:text> + <xsl:text>\setCJKmainfont{IPAPGothic} </xsl:text> + <xsl:text>\setCJKsansfont{IPAPGothic} </xsl:text> + <xsl:text>\setCJKmonofont{IPAPGothic} </xsl:text> + <xsl:text>\setmainfont{IPAPGothic} </xsl:text> + <xsl:text>\setsansfont{IPAPGothic} </xsl:text> + <xsl:text>\setmonofont{IPAPGothic} </xsl:text> + </xsl:when> + <xsl:when test="contains(/book/@lang,'ko')"> + <xsl:text>\usepackage{xeCJK} </xsl:text> + <xsl:text>\setCJKmainfont{WenQuanYi Micro Hei} </xsl:text> + <xsl:text>\setCJKsansfont{WenQuanYi Micro Hei} </xsl:text> + <xsl:text>\setCJKmonofont{WenQuanYi Micro Hei Mono} </xsl:text> + <xsl:text>\setmainfont{WenQuanYi Micro Hei} </xsl:text> + <xsl:text>\setsansfont{WenQuanYi Micro Hei} </xsl:text> + <xsl:text>\setmonofont{WenQuanYi Micro Hei Mono} </xsl:text> + </xsl:when> + <xsl:when test="contains(/book/@lang,'zh')"> + <xsl:text>\usepackage{xeCJK} </xsl:text> + <xsl:text>\setCJKmainfont{WenQuanYi Micro Hei} </xsl:text> + <xsl:text>\setCJKsansfont{WenQuanYi Micro Hei} </xsl:text> + <xsl:text>\setCJKmonofont{WenQuanYi Micro Hei Mono} </xsl:text> + <xsl:text>\setmainfont{WenQuanYi Micro Hei} </xsl:text> + <xsl:text>\setsansfont{WenQuanYi Micro Hei} </xsl:text> + <xsl:text>\setmonofont{WenQuanYi Micro Hei Mono} </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>\setmainfont{FreeSerif} </xsl:text> + <xsl:text>\setsansfont{FreeSans} </xsl:text> + <xsl:text>\setmonofont{FreeMono} </xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:param> +</xsl:stylesheet> diff --git a/debian/changelog b/debian/changelog index defa65dcb..12e29daa2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,12 @@ installation-guide (2016XXXX) UNRELEASED; urgency=medium [ Baptiste Jammet ] * Document how to use debootstrap with foreign architectures. + [ Holger Wansing ] + * Change build chain for pdf variant from jade to dblatex + and activate pdf for Chinese, Greek, Japanese and Vietnamese + (pdf was not supported before for those languages). + Thanks to victory for the patch. + -- Samuel Thibault <sthibault@debian.org> Tue, 22 Nov 2016 23:20:02 +0100 installation-guide (20161031) unstable; urgency=medium diff --git a/debian/control b/debian/control index afc0a1559..33eb7ee19 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.9.5 Vcs-Svn: svn://svn.debian.org/d-i/trunk/manual Vcs-Browser: http://anonscm.debian.org/viewvc/d-i/trunk/manual/ Build-Depends: debhelper (>= 6) -Build-Depends-Indep: docbook, docbook-xml, docbook-xsl, xsltproc, gawk, libhtml-parser-perl, w3m, poxml, jadetex, openjade, docbook-dsssl, ghostscript, texlive-lang-cyrillic, texlive-lang-czechslovak, texlive-lang-european, texlive-lang-french, texlive-lang-german, texlive-lang-greek, texlive-lang-italian, texlive-lang-other, texlive-lang-portuguese, texlive-lang-spanish, ko.tex-base, cm-super +Build-Depends-Indep: docbook, docbook-xml, docbook-xsl, xsltproc, gawk, libhtml-parser-perl, w3m, poxml, jadetex, openjade, dblatex, docbook-dsssl, ghostscript, texlive-lang-cyrillic, texlive-lang-czechslovak, texlive-lang-european, texlive-lang-french, texlive-lang-german, texlive-lang-greek, texlive-lang-italian, texlive-lang-other, texlive-lang-portuguese, texlive-lang-spanish, ko.tex-base, cm-super, fonts-wqy-microhei # This comment can also be used to generate a Build-Depends-Indep line, by # running the debian/genbuilddeps program. So put each build dep on its own # line, prefixed by " - " and to comment out a build dep, start the line @@ -27,6 +27,9 @@ Build-Depends-Indep: docbook, docbook-xml, docbook-xsl, xsltproc, gawk, libhtml- # Translations of the manual are done in po files via poxml. # - jadetex # - openjade +# ps variants are build using jade. +# - dblatex +# pdf variants are build using dblatex. # - docbook-dsssl # Used for producing pdf and ps files. # - ghostscript @@ -50,9 +53,11 @@ Build-Depends-Indep: docbook, docbook-xml, docbook-xsl, xsltproc, gawk, libhtml- # All texlive-lang-* packages provide hyphenation and other # language-specific support. # - ko.tex-base -# Font for Korean pdf. +# Font for Korean ps. # - cm-super -# Font for Russian pdf. +# Font for Russian ps. +# - fonts-wqy-microhei +# Font for Korean and Chinese pdf. Package: installation-guide-amd64 Architecture: all |