[Debian-handbook-translators] The Debian Administrator's Handbook ready to be translated!

AYANOKOUZI, Ryuunosuke i38w7i3 at yahoo.co.jp
Wed Nov 4 04:58:24 UTC 2015

Hi Raphael,

Thanks for comments. I have rewrote codes[1].
It would be greatly appreciated,
if you review it and give me any suggestion
for making it acceptable to your original repository.

[1] https://github.com/l/debian-handbook/commit/35e9158fc8dc74903d51e1eff9b34dc86b1f0419

> > In connection with that,
> > I know the Japanese pdf generated by debian-handbook.tex
> > via ./build/build-pdf is not so good for Japanese book
> > (missing fonts, word wrap, line break rule, etc...).
> > 
> > So, I just added some code for fixing these issues [1].
> I clearly want to integrate everything needed but I want to understand
> why each change is needed.
> 1/ You are dropping the -q and -E option of xdvipdfmx. Why? A PDF ready for
> print on lulu.com must have all fonts embedded. I understand you might
> want to have those options disabled during "development" to ensure you
> don't embed a font that you don't have the right to... but when I
> generate a final PDF I prefer to be on the safe side.

"-E" force font embedded.
But Japanese font license issues is very complicated for me
(What operation is allowd without extra license fee?
Using the font in the hard-copy commercial products,
embedding the font into PDF, etc...).
Avoiding legal issues and saving checking time,
I want to check font embedding flag is allowed to embed the font into PDF.
If target fonts are allowed to embed, the fonts are embedded.

"-q" suppress warnings which is useful for PDF debugging.
I want to check such warning is acceptable or not also.

If you don't think
we need to take font embedding license into account and confirm warning.
Please direct me to remove corresponding section.
I'll follow your decision.

> 2/ Can you explain the role of each LaTeX command you add (except
> \set{main,sans,mono}font that I clearly understand)?

% Matching Unicode in source file and PDF file.
% I can't exactly say in what case, but sometimes these are not exactly same.
% This will be a problem when searching word or converting PDF into text file.

% Reducing all font size 80%. The value is chosen
% to have the same total page numbers as English PDF.

\setmainfont{DejaVu Serif}
\setsansfont{DejaVu Sans}
\setmonofont{DejaVu Sans Mono}

% Including 'zxjatype' package.
% zxjatype is used for achieving standard Japanese typesetting.
% if this package is not used, like break and hyphenation rule will
% not be good for Japanese (line break are added only after white space).
% When option AutoFallBack=true, {main|sans|mono}fonts are used
% if corresponding glyph for Unicode doesn't exist in
% Japanese font file being set in next line.

% Including 'zxjafont' package.
% zxjafont is used for achieving standard Japanese font family setting.
% if this package is not used, all Japanese characters will not be displayed.
% This is because default {main|sans|mono}fonts has no Japanese glyph.
% Default font settings are defined in ./build/dblatex/config.xsl and are...
% \setmainfont{Gentium Basic}
% \setsansfont[Scale=MatchLowercase]{Linux Biolinum O}
% \setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
% When option ipa is enabled, IPA fonts (IPAMincho and IPAGothic,
% which are free fonts and officially allowed to embedded into PDF) are used.
% Please don't use ipaex for IPAex 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.
% And please take care of font licence also.

> > I don't want those changes in a separate stylesheet, I want them
> > in build/dblatex/config.xsl but they should be protected with a
> ...with a conditional. I don't know exactly how to test for the
> current language in that context but if there is none then we should
> create one by adding a parameter of our own that defines the target
> language in the command line (say "-P tdah.lang=$lang").

./build/build-pdf is injecting lang attribute in book node.
So, following code will work good. You don't need to set "-P tdah.lang=$lang".

<xsl:param name="xetex.font">
    <xsl:when test="/book[@lang='ja-JP']">
    <!-- ja-JP specific xetex.font config -->
    <!-- default xetex.font config -->

> > I would like to push the modification to jessie/master not to new branch (jessie/print-ja?).
> Yes, the change will go to jessie/master. jessie/print-ja would only
> contain random hacks to fix the layout for the specific edition that we
> prepare and that we don't want to integrate in the main branch (because
> they are just hacks like moving text around or adding short TeX commands
> to force a pagebreak, etc.).

I understand. So in what case we need to hack?
I find some problems on generated Japanese and English PDF.
There are many more issues but out of them...
* Sometime text inside sidebar disappeared.
  It looks background (shaded) and foreground (text) have same color.
* Sidebar "GOING FURTHER Installing a non-Debian system in a domU"
  overwrap next list item "--dhcp states that...".
In these cases we need to hack?

> > Last but not least, when you build pdf for Japanese ($ ./build/build-pdf --lang=ja-JP ...),
> > you will need to install another debian packages.
> Which package would that be? Please document them in the Build-Depends
> field of debian/control.

texlive-lang-japanese, ghostscript and lmodern package are needed to build.

I checked required package by building test PDF in chrooted sid.
ghostscript and lmodern are also specified because these package will not installed
if apt-get don't install recommended packages by Build-Depends packages.
It this is not a good way, please inform me.
I'll remove ghostscript and lmodern from Build-Depends.

Ryuunosuke Ayanokouzi
AYANOKOUZI, Ryuunosuke <i38w7i3 at yahoo.co.jp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.alioth.debian.org/pipermail/debian-handbook-translators/attachments/20151104/2662e195/attachment.sig>

More information about the Debian-handbook-translators mailing list