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 /build | |
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.
Diffstat (limited to 'build')
-rwxr-xr-x | build/buildone.sh | 15 | ||||
-rw-r--r-- | build/dblatex.xsl | 42 |
2 files changed, 49 insertions, 8 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> |