1 % texinfo-ja.tex -- Japanese texinfo.tex loader
2 % Some CJK packages are necessary to load before texinfo.tex.
4 % Copyright 2016, 2017 Free Software Foundation, Inc.
6 % This program is free software; you can redistribute it and/or modify
7 % it under the terms of the GNU General Public License as published by
8 % the Free Software Foundation; either version 3 of the license, or (at
9 % your option) any later version.
11 % This program is distributed in the hope that it will be useful,
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 % GNU General Public License for more details.
16 % You should have received a copy of the GNU General Public License
17 % along with this program. If not, see <http://www.gnu.org/licenses/>.
19 % Written by Masamichi Hosoda, 6 May 2016, <trueroad@trueroad.jp>
24 \ifx\luatexversion\thisisundefined
26 % LuaTeX 0.95+ is required.
27 \ifnum\luatexversion<95
28 \errmessage{LuaTeX 0.95+ is required}
30 % LuaTeX-ja: Typeset Japanese with Lua(La)TeX
31 % http://www.ctan.org/tex-archive/macros/luatex/generic/luatexja
32 \openin 1 luatexja.sty \ifeof 1
33 \errmessage{LuaTeX-ja is not found.
34 It is required for Japanese Texinfo files with LuaTeX.
35 http://www.ctan.org/tex-archive/macros/luatex/generic/luatexja
36 It might be contained in texlive-lang-japanese package}
39 \def\txijapackage{LaTeX-ja}
46 \ifx\XeTeXrevision\thisisundefined
48 % XeTeX 0.9998+ is required.
49 \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.9998}<0
50 \errmessage{XeTeX 0.9998+ is required}
52 % zhspacing: Spacing for mixed CJK-English documents in XeTeX
53 % http://www.ctan.org/tex-archive/macros/xetex/generic/zhspacing
55 % This package is originally for Chinese,
56 % but can also used in Japanese.
58 \openin 1 zhspacing.sty \ifeof 1
59 \errmessage{zhspacing is not found.
60 It is required for Japanese Texinfo files with XeTeX.
61 http://www.ctan.org/tex-archive/macros/xetex/generic/zhspacing
62 It might be contained in texlive-lang-chinese.
63 (This package is for Chinese, but can also used in Japanese)}
65 \def\zhfont{dummy} % Cancel the request of SimSun font
66 \def\zhpunctfont{dummy} % Cancel the request of SimSun font
69 \def\txijapackage{zhspacing}
76 \ifx\luatexversion\thisisundefined
77 \ifx\XeTeXrevision\thisisundefined
78 \errmessage{The TeX engine is not LuaTeX / XeTeX.
79 LuaTeX / XeTeX is required for Japanese Texinfo files}
83 % Original texinfo.tex