hgbook build

Dongsheng Song dongsheng.song at gmail.com
Tue Mar 15 10:09:16 CDT 2011


On Tue, Mar 15, 2011 at 17:37, Faheem Mitha <faheem at email.unc.edu> wrote:
>
> Hi Dongsheng,
>
> Thank you for your comments.
>
> On Mon, 14 Mar 2011, Dongsheng Song wrote:
>
>> Please do not think after you installed dblatex, you can easy create
>> non-English PDF files.
>
>> I can easy build English files by dblatex [1], but for non-English(e.g.
>> Chinese) version, you must install and configure the required fonts, it's a
>> very complex and painful task.
>
>> This is the reason why I'm not provide dblatex target support.
>
> I'm aware there are problems with the Chinese version. In fact I just wrote
> about it in a message yesterday, and CCed you on it.
>
> However, if dblatex works well for some languages, I suggest that it be used
> for those languages.
>
> I'm still having problems generating the figures, though. This is unrelated
> to the pdf generation as far as I can tell.
>

If you post error message of 'make html LINGUA=en', I can give you some help.
I do not think you have problems after you install dot and inkscape.

> As you are one of the authors of the Chinese translation, do you know why
> the gkai fonts don't work? Are the cyberbit fonts required? BTW, this is my
> ignorance speaking, but since there are multiple Chinese languages, which
> one is being used here?
>                                                          Regards, Faheem
>

Please blame dblatex why it can not use gbsn/gaki font or uming/ukai font.

Font uming (general used for body) and ukai (general used for title) include
almost all Chinese glyphs.

1) dblatex generate invalid font reference
~/vcs/hg/hgbook/build/zh/source$ dblatex -t tex -P latex.encoding=utf8
hgbook.xml
~/vcs/hg/hgbook/build/zh/source$ less hgbook.tex

\ifxetex
\usepackage{fontspec}
\usepackage{xltxtra}
\setmainfont{DejaVu Serif}
\setsansfont{DejaVu Sans}
\setmonofont{DejaVu Sans Mono}
\else
\usepackage[T2A,T2D,T1]{fontenc}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\PrerenderUnicode{äöüÄÜÖß}
\def\hyperparamadd{unicode=true}
\fi

2) If I update font reference
\ifxetex
\usepackage{fontspec}
\usepackage{xltxtra}
\setmainfont{AR PL UMing CN}
\setsansfont{AR PL UKai CN}
\setmonofont{AR PL UMing CN}
\else
\usepackage[T2A,T2D,T1]{fontenc}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
\PrerenderUnicode{äöüÄÜÖß}
\def\hyperparamadd{unicode=true}
\fi

Then I can generate valid pdf file output:
~/vcs/hg/hgbook/build/zh/source$ xelatex hgbook.tex

https://bitbucket.org/dongsheng/hgbook/downloads
https://bitbucket.org/dongsheng/hgbook/downloads/hgbook-zh-dblatex-20100511.pdf

But the pdf output quality is very very poor, e.g. line size are
incorrect, lots of text out of line, etc.
There have very very long way for dblatex used for CJK output.

--
Dongsheng


More information about the Mercurial-devel mailing list