[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [patch] manual: pdf builds succeeded for all disabled langs



This posting is for getting '[patch]' in the subject line.

On Tue, Dec 27, 2016 at 01:59:04PM +0900, victory wrote:
> 
> building **.pdf succeeded by using dblatex instead of jade;
> all en/el/ja/vi/zh_CN/zh_TW builds succeeded;
> of course I dont read their letters, just looked at a glance.
> not tested for non-disabled-langs other than en,
>  but I think those do not fail by dblatex, either.
> patch is below.
> 
> Index: build/buildone.sh
> ===================================================================
> --- build/buildone.sh	(??????????????? 71)
> +++ build/buildone.sh	(???????????????)
> @@ -227,15 +227,14 @@
>  }
>  
>  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_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 __."


Ah, that is what this patch^Wfix is about.


>                  BUILD_SKIP="$BUILD_SKIP $format"
>                  continue
>              fi
> Index: build/dblatex.xsl
> ===================================================================
> --- build/dblatex.xsl	(??????????????? 0)
> +++ build/dblatex.xsl	(???????????????)
> @@ -0,0 +1,33 @@
> +<?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}&#10;</xsl:text>
> +	<xsl:text>\setCJKmainfont{IPAPGothic}&#10;</xsl:text>
> +	<xsl:text>\setCJKsansfont{IPAPGothic}&#10;</xsl:text>
> +	<xsl:text>\setCJKmonofont{IPAPGothic}&#10;</xsl:text>
> +        <xsl:text>\setmainfont{IPAPGothic}&#10;</xsl:text>
> +        <xsl:text>\setsansfont{IPAPGothic}&#10;</xsl:text>
> +        <xsl:text>\setmonofont{IPAPGothic}&#10;</xsl:text>
> +    </xsl:when>
> +    <xsl:when test="contains(/book/@lang,'zh')">
> +	<xsl:text>\usepackage{xeCJK}&#10;</xsl:text>
> +	<xsl:text>\setCJKmainfont{HanaMinA}&#10;</xsl:text>
> +	<xsl:text>\setCJKsansfont{HanaMinA}&#10;</xsl:text>
> +	<xsl:text>\setCJKmonofont{HanaMinA}&#10;</xsl:text>
> +        <xsl:text>\setmainfont{HanaMinA}&#10;</xsl:text>
> +        <xsl:text>\setsansfont{HanaMinA}&#10;</xsl:text>
> +        <xsl:text>\setmonofont{HanaMinA}&#10;</xsl:text>
> +    </xsl:when>

        when language is vietnamese
             .... seems to be missing ...
        /when


      greek, 'el', is other one from the above

> -        el|ja|vi|zh_CN|zh_TW)
> -                echo "Warning: pdf and ps formats are currently not supported for Chinese, Greek, Japanese and Vietnamese"


> +    <xsl:otherwise>
> +        <xsl:text>\setmainfont{FreeSerif}&#10;</xsl:text>
> +        <xsl:text>\setsansfont{FreeSans}&#10;</xsl:text>
> +        <xsl:text>\setmonofont{FreeMono}&#10;</xsl:text>
> +    </xsl:otherwise>
> +   </xsl:choose>
> +  </xsl:param>
> +</xsl:stylesheet>
> 
> -- 
> victory
> no need to CC me :-)


Groeten
Geert Stappers
-- 
I'm also subscribed the mailinglist.


Reply to: