\ProvidesFile{gloss-japanese.ldf}[polyglossia: module for japanese] \makeatletter % The original was japanese.ldf written by Toru Inagaki for babel.sty % Modified for polyglossia as gloss-japanese.ldf by Norio Iwase with % some additional features for japanese kanji numbering. % Version 0.4.4 \PolyglossiaSetup{japanese}{ hyphennames={nohyphenation}, fontsetup=true } \def\japanese@font{% \@ifundefined{japanesefont}{% \font\zf@basefont="\csname zf@family@fontdef\f@family\endcsname" at \f@size pt}{\japanesefont}} \def\selectnormalfontjapanese{% \let\normalfont=\japanese@font% \let\rmfamily=\japanese@font% \let\sffamily=\japanese@font% \let\ttfamily=\japanese@font% \def\reset@font{\normalfont}} \ifx\l@japanese\@undefined \xpg@nopatterns{Japanese} \adddialect\l@japanese0 \fi \def\japanese@capsformat{% \def\@seccntformat##1{\csname pre##1\endcsname% \csname the##1\endcsname% \csname post##1\endcsname}% \def\postsection{\ }% \textjapanese{節}\space \def\postsubsection{\ }% \textjapanese{節}\space \def\postsubsubsection{\ }% \textjapanese{節}\space \def\presection{}% \textjapanese{第} \def\presubsection{}% \textjapanese{第} \def\presubsubsection{}}% \textjapanese{第} \def\captionsjapanese{% \def\refname{\textjapanese{参考文献}}% \def\abstractname{\textjapanese{概要}}% \def\bibname{\textjapanese{文献目録}}% \def\prefacename{\textjapanese{端書き}}% \def\chaptername{\textjapanese{章~乃}}% \def\postchaptername{}% \def\appendixname{\textjapanese{付録}}% \def\contentsname{\textjapanese{目次}}% \def\listfigurename{\textjapanese{図目次}}% \def\listtablename{\textjapanese{表目次}}% \def\indexname{\textjapanese{索引}}% \def\figurename{\textjapanese{図}}% \def\tablename{\textjapanese{表}}% %\def\thepart{}% \def\partname{\textjapanese{部~乃}}% \def\postpartname{}% \def\pagename{\textjapanese{頁~乃}}% \def\postpagename{}% \def\seename{\textjapanese{参照}}% \def\alsoname{\textjapanese{参照}}% \def\enclname{\textjapanese{添付}}% \def\ccname{\textjapanese{同報}}% \def\headtoname{\textjapanese{宛先}}% \def\proofname{\textjapanese{証明}}% \def\glossaryname{\textjapanese{用語集}}% } \newif\if@WameiReki \@WameiRekifalse% \newif\if@WameiTosi \@WameiTosifalse% \newif\if@WameiTuki \@WameiTukifalse% \newif\if@WameiHi \@WameiHifalse% \newif\if@IzumoTuki \@IzumoTukifalse% \newcount\c@TempJNum% \XeTeXlinebreaklocale "ja"% \XeTeXlinebreakskip = 0em plus 0.1em minus 0.01em% \XeTeXlinebreakpenalty = 0 \def\@JapaneseDigit#1{\ifcase#1 \or 一\or 二\or 三\or 四\or 五\or 六\or 七\or 八\or 九\or 十\or 十一\or 十二\or 十三\or 十四\or 十五\or 十六\or 十七\or 十八\or 十九\or 廿\or 廿一\or 廿二\or 廿三\or 廿四\or 廿五\or 廿六\or 廿七\or 廿八\or 廿九\or 丗\or 丗一\or 丗二\or 丗三\or 丗四\or 丗五\or 丗六\or 丗七\or 丗八\or 丗九\or 四十\or 四十一\or 四十二\or 四十三\or 四十四\or 四十五\or 四十六\or 四十七\or 四十八\or 四十九\or 五十\or 五十一\or 五十二\or 五十三\or 五十四\or 五十五\or 五十六\or 五十七\or 五十八\or 五十九\or 六十\or 六十一\or 六十二\or 六十三\or 六十四\or 六十五\or 六十六\or 六十七\or 六十八\or 六十九\or 七十\or 七十一\or 七十二\or 七十三\or 七十四\or 七十五\or 七十六\or 七十七\or 七十八\or 七十九\or 八十\or 八十一\or 八十二\or 八十三\or 八十四\or 八十五\or 八十六\or 八十七\or 八十八\or 八十九\or 九十\or 九十一\or 九十二\or 九十三\or 九十四\or 九十五\or 九十六\or 九十七\or 九十八\or 九十九\else\@ctrerr\fi\relax} \def\@JapaneseNum#1{\c@TempJNum=#1\divide\c@TempJNum by 1000\relax% \ifnum\c@TempJNum=\z@\c@TempJNum=#1\divide\c@TempJNum by 100\relax% \ifnum\c@TempJNum=\z@\@JapaneseDigit{#1}\relax% \else\ifcase\c@TempJNum\or 百\or 二百\or 三百\or 四百\or 五百\or 六百\or 七百\or 八百\or 九百\fi\c@TempJNum=#1\divide\c@TempJNum by 100\multiply\c@TempJNum by -100\advance\c@TempJNum#1\@JapaneseDigit\c@TempJNum\relax\fi% \else\ifcase\c@TempJNum\or 千\or 二千\or 三千\or 四千\or 五千\or 六千\or 七千\or 八千\or 九千\fi\c@TempJNum=#1\divide\c@TempJNum by 1000\multiply\c@TempJNum by -1000\advance\c@TempJNum#1\divide\c@TempJNum by 100\relax% \ifnum\c@TempJNum=\z@\c@TempJNum=#1\divide\c@TempJNum by 100\multiply\c@TempJNum by -100\advance\c@TempJNum#1\@JapaneseDigit\c@TempJNum\relax% \else\ifcase\c@TempJNum\or 百\or 二百\or 三百\or 四百\or 五百\or 六百\or 七百\or 八百\or 九百\fi\c@TempJNum=#1\divide\c@TempJNum by 100\multiply\c@TempJNum by -100\advance\c@TempJNum#1\@JapaneseDigit\c@TempJNum\relax\fi\fi} \def\@japanesenumber#1{\@tempcnta=#1% \ifnum\@tempcnta=\z@{〇}% \else\ifnum\@tempcnta<\z@{負}\multiply\@tempcnta by -1\fi% \@tempcntb=\@tempcnta\divide\@tempcntb by 10000\relax% \ifnum\@tempcntb=\z@\@JapaneseNum\@tempcnta% \else\@tempcntb=\@tempcnta\divide\@tempcntb by 100000000\relax% \ifnum\@tempcntb=\z@\@tempcntb=\@tempcnta\divide\@tempcntb by 10000% \@JapaneseNum\@tempcntb{万}\@tempcntb=\@tempcnta% \divide\@tempcntb by 10000\multiply\@tempcntb by -10000% \advance\@tempcntb\@tempcnta\relax\@JapaneseNum\@tempcntb% \else\@JapaneseNum\@tempcntb{億}\@tempcntb=\@tempcnta% \divide\@tempcntb by 100000000\multiply\@tempcntb by -100000000% \advance\@tempcntb\@tempcnta\divide\@tempcntb by 10000\relax% \ifnum\@tempcntb=\z@\else\@JapaneseNum\@tempcntb{万}\fi% \@tempcntb=\@tempcnta\divide\@tempcntb by 10000% \multiply\@tempcntb by -10000\advance\@tempcntb\@tempcnta% \@JapaneseNum\@tempcntb\fi\fi\fi} \def\japanesenumber#1{\expandafter\@japanesenumber\csname c@#1\endcsname}% \def\datejapanese{{% \ifnum\year<1868 \xdef\the@WarekiCur{}% \else\ifnum\year<1912 \xdef\the@WarekiCur{明治} \advance\year-1867\relax% \else\ifnum\year<1926 \xdef\the@WarekiCur{大正} \advance\year-1911\relax% \else\ifnum\year<1989 \xdef\the@WarekiCur{昭和} \advance\year-1925\relax% \else\xdef\the@WarekiCur{平成} \advance\year-1988\relax\fi\fi\fi\fi% \xdef\the@WameiTosi{\the\year}% } \def\西暦{\@WameiRekifalse \@WameiTukifalse \@WameiHifalse}% \def\和暦{\@WameiRekitrue \@WameiTosifalse \@WameiTukifalse \@WameiHifalse}% \def\和名暦{\@WameiTositrue \@WameiTukitrue \@WameiHitrue}% \def\数字暦{\@WameiTosifalse \@WameiTukifalse \@WameiHifalse}% \def\出雲月{\@IzumoTukitrue}% \def\大和月{\@IzumoTukifalse}% \def\today{\textjapanese{%\hspace{-.55em}% \if@WameiReki\the@WarekiCur\if@WameiTosi\@JapaneseNum\the@WameiTosi\else\,\the@WameiTosi\fi\else\number\year\,\fi{年}% \if@WameiTuki\ifcase\month\or 睦月\or 如月\or 弥生\or 卯月\or 皐月\or 水無月\or 文月\or 葉月\or 長月\or \if@IzumoTuki 神在月\else 神無月\fi \or 霜月\or 師走\fi\else\,\number\month\,{月}\fi% \if@WameiHi\@JapaneseNum\day\else\,\number\day\,\fi{日}}}} \def\japanese@language{\protect\language=\l@japanese} \def\noextras@japanese{% \japanese@capsformat% } \def\blockextras@japanese{% \japanese@capsformat% } \def\inlineextras@japanese{% \japanese@capsformat% } %% %% Copyright (C) by François Charette %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3 %% of this license of (at your option) any later version. %% The latest version of this license is in %% http://www.latex-project.org/lppl.txt %% and version 1.3 or later is part of all distributions of LaTeX %% version 2005/12/01 or later. %% %% This work has the LPPL maintenance status `maintained'. %% %% The Current Maintainer of this work is François Charette. %% %% %% End of file `gloss-japanese.ldf'.