From bcd1342e15d800cca4ecd23b2903be9270cc35ca Mon Sep 17 00:00:00 2001 From: "AYANOKOUZI, Ryuunosuke" Date: Tue, 3 Nov 2015 09:00:00 +0900 Subject: [PATCH] Add user style sheet and conditional branch for appropriate Japanese PDF typesetting * Japanese-specific style sheet for good Japanese typesetting. * conditional branch for using the style sheet if '--lang=ja-JP' specified. --- build/build-pdf | 6 ++++++ build/dblatex/librement-ja-JP.xsl | 34 +++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 build/dblatex/librement-ja-JP.xsl diff --git a/build/build-pdf b/build/build-pdf index 1421c0d373..4e55f158f5 100755 --- a/build/build-pdf +++ b/build/build-pdf @@ -27,6 +27,12 @@ fi cp -a build/dblatex tmp/$OPT_lang/xml/ cd tmp/$OPT_lang/xml/ +if [ "${OPT_lang}" = "ja-JP" ]; +then + _XSL_USER_STYLESHEET=./dblatex/librement-ja-JP.xsl; + OPT_opts="--backend=xetex --xsl-user=${_XSL_USER_STYLESHEET} "${OPT_opts}; +fi + echo "RUN: dblatex -c dblatex/librement.conf $OPT_opts debian-handbook.xml" if dblatex -c dblatex/librement.conf $OPT_opts debian-handbook.xml; then targetdir="$topdir/publish/$OPT_lang/Debian/$version/pdf/debian-handbook" diff --git a/build/dblatex/librement-ja-JP.xsl b/build/dblatex/librement-ja-JP.xsl new file mode 100644 index 0000000000..00dd7c86af --- /dev/null +++ b/build/dblatex/librement-ja-JP.xsl @@ -0,0 +1,34 @@ + + + + -output-driver='xdvipdfmx' + + + + +\XeTeXtracingfonts=1 +\defaultfontfeatures+{Scale=0.8} +\setmainfont{DejaVu Serif} +\setsansfont{DejaVu Sans} +\setmonofont{DejaVu Sans Mono} +\usepackage[AutoFallBack=true]{zxjatype} +\usepackage[ipa,scale=0.8]{zxjafont} +% +% Please don't use IPAex family fonts like IPAexMincho and/or IPAexGothic. +% Because some characters are converted into Kangxi radical. +% Example: +% 一 (U+4E00) -> ⼀ (U+2F00), +% 人 (U+4EBA) -> ⼈ (U+2F08), +% 非 (U+975E) -> ⾮ (U+2FAE), +% 高 (U+9AD8) -> ⾼ (U+2FBC) etc... +% This conversion is not problem for printing, but +% is problem for searching pdf and converting pdf into text. + + +