| % texinfo-zh.tex -- Chinese texinfo.tex loader |
| % Some CJK packages are necessary to load before texinfo.tex. |
| % |
| % Copyright 2016-2025 Free Software Foundation, Inc. |
| % |
| % This program is free software; you can redistribute it and/or modify |
| % it under the terms of the GNU General Public License as published by |
| % the Free Software Foundation; either version 3 of the license, or (at |
| % your option) any later version. |
| % |
| % This program is distributed in the hope that it will be useful, |
| % but WITHOUT ANY WARRANTY; without even the implied warranty of |
| % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| % GNU General Public License for more details. |
| % |
| % You should have received a copy of the GNU General Public License |
| % along with this program. If not, see <https://www.gnu.org/licenses/>. |
| % |
| % Parts of file copied from texinfo-ja.tex in the same directory |
| |
| % |
| % For XeTeX |
| % |
| \ifx\XeTeXrevision\thisisundefined |
| \else |
| % XeTeX 0.9998+ is required. |
| \ifnum\strcmp{\the\XeTeXversion\XeTeXrevision}{0.9998}<0 |
| \errmessage{XeTeX 0.9998+ is required} |
| \fi |
| % zhspacing: Spacing for mixed CJK-English documents in XeTeX |
| % http://www.ctan.org/tex-archive/macros/xetex/generic/zhspacing |
| \openin 1 zhspacing.sty \ifeof 1 |
| \errmessage{zhspacing is not found. |
| It is required for Chinese Texinfo files with XeTeX. |
| http://www.ctan.org/tex-archive/macros/xetex/generic/zhspacing |
| It might be contained in texlive-lang-chinese.} |
| \else |
| \def\zhfont{dummy} % Cancel the request of SimSun font |
| \def\zhpunctfont{dummy} % Cancel the request of SimSun font |
| \input zhspacing.sty |
| \zhspacing |
| \def\txizhpackage{zhspacing} |
| \fi |
| \fi |
| |
| % |
| % For others |
| % |
| \ifx\XeTeXrevision\thisisundefined |
| \errmessage{The TeX engine is not XeTeX. |
| XeTeX is required for Chinese Texinfo files} |
| \fi |
| |
| % Load original texinfo.tex |
| \input texinfo.tex |