diff options
author | Karl Berry <karl@freefriends.org> | 2017-02-05 23:18:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-02-05 23:18:29 +0000 |
commit | b19f23929a106d899701663e30149fa6c02b1061 (patch) | |
tree | c95f1432eed759102c913ad7a505f40f8e0fb3f0 /Master/texmf-dist/tex/generic/babel-japanese | |
parent | 2628a70d98f12b364a8164b3ccaae5a882a2a4dc (diff) |
babel-japanese (5feb17)
git-svn-id: svn://tug.org/texlive/trunk@43145 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel-japanese')
-rw-r--r-- | Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf | 88 |
1 files changed, 75 insertions, 13 deletions
diff --git a/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf b/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf index f15dcb1d9ba..ab1f9d91ad8 100644 --- a/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf +++ b/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf @@ -28,12 +28,14 @@ \epTeXinputencoding utf8 \fi \ProvidesLanguage{japanese} - [2016/12/16 v2.0 Japanese support for babel (texjporg)] -\ifx\kanjiskip\@undefined\ifx\XeTeXversion\@undefined\ifx\directlua\@undefined - \@latex@error{babel-japanese supports one of the followings:\MessageBreak + [2017/02/05 v2.1 Japanese support for babel (texjporg)] +\ifx\kanjiskip\@undefined\ifx\directlua\@undefined +\ifx\XeTeXversion\@undefined + \@latex@error{Option '\CurrentOption' requires one of the followings:\MessageBreak pTeX, upTeX, XeTeX, LuaTeX\MessageBreak It seems you are running unsupported engine!}\@ehc -\fi\fi\fi +\fi +\fi\fi \LdfInit\CurrentOption{captions\CurrentOption} \ifx\l@japanese\@undefined \PackageInfo{babel}{% @@ -153,6 +155,14 @@ \ifx\kanjiskip\@undefined \def\西暦{\bbl@jpn@Seirekitrue}% \def\和暦{\bbl@jpn@Seirekifalse}% + \def\bbl@jpn@TateSeirekiToday{% + \bbl@jpn@maybekansuji\year 年% + \bbl@jpn@maybekansuji\month 月% + \bbl@jpn@maybekansuji\day 日} + \def\bbl@jpn@TateWarekiToday{% + 平成\bbl@jpn@maybekansuji\the@heisei 年% + \bbl@jpn@maybekansuji\month 月% + \bbl@jpn@maybekansuji\day 日} \def\bbl@jpn@SeirekiToday{% \number\year 年% \number\month 月% @@ -175,23 +185,75 @@ \kansujichar3=\jis"467C\relax % 日 \kansujichar4=\jis"4A3F\relax % 平 \kansujichar5=\jis"402E\relax % 成 - \xdef\bbl@jpn@SeirekiToday{% - \number\year\kansuji1 % - \number\month\kansuji2 % - \number\day\kansuji3 } - \xdef\bbl@jpn@WarekiToday{% - \kansuji45 \the@heisei\kansuji1 % - \number\month\kansuji2 % - \number\day\kansuji3 } + \xdef\bbl@jpn@kanjinen{\kansuji1}% + \xdef\bbl@jpn@kanjigatsu{\kansuji2}% + \xdef\bbl@jpn@kanjinichi{\kansuji3}% + \xdef\bbl@jpn@kanjiheisei{\kansuji45}% \endgroup + \def\bbl@jpn@TateSeirekiToday{% + \bbl@jpn@maybekansuji\year\bbl@jpn@kanjinen + \bbl@jpn@maybekansuji\month\bbl@jpn@kanjigatsu + \bbl@jpn@maybekansuji\day\bbl@jpn@kanjinichi} + \def\bbl@jpn@TateWarekiToday{% + \bbl@jpn@kanjiheisei\bbl@jpn@maybekansuji\the@heisei\bbl@jpn@kanjinen + \bbl@jpn@maybekansuji\month\bbl@jpn@kanjigatsu + \bbl@jpn@maybekansuji\day\bbl@jpn@kanjinichi} + \def\bbl@jpn@SeirekiToday{% + \number\year\bbl@jpn@kanjinen + \number\month\bbl@jpn@kanjigatsu + \number\day\bbl@jpn@kanjinichi} + \def\bbl@jpn@WarekiToday{% + \bbl@jpn@kanjiheisei\the@heisei\bbl@jpn@kanjinen + \number\month\bbl@jpn@kanjigatsu + \number\day\bbl@jpn@kanjinichi} +\fi +\chardef\bbl@jpn@l@catcode=\catcode`\L\relax +\chardef\bbl@jpn@p@catcode=\catcode`\P\relax +\chardef\bbl@jpn@x@catcode=\catcode`\X\relax +\ifx\directlua\@undefined + \ifx\XeTeXversion\@undefined % ptex/uptex + \catcode`\L=14\relax + \catcode`\P=9\relax + \catcode`\X=9\relax + \else % xetex + \catcode`\L=14\relax + \catcode`\P=14\relax + \catcode`\X=14\relax + \fi +\else + \ifx\luatexjaLoaded\@undefined % luatex + \catcode`\L=14\relax + \catcode`\P=14\relax + \catcode`\X=14\relax + \else % luatex + luatexja + \catcode`\L=9\relax + \catcode`\P=14\relax + \catcode`\X=9\relax + \fi \fi \@namedef{date\CurrentOption}{% \def\today{% +P \iftdir +L \ifnum\ltjgetparameter{direction}=3 +X \ifbbl@jpn@Seireki +X \bbl@jpn@TateSeirekiToday +X \else +X \bbl@jpn@TateWarekiToday +X \fi +X \else \ifbbl@jpn@Seireki \bbl@jpn@SeirekiToday \else \bbl@jpn@WarekiToday - \fi}} + \fi +X \fi + }% +} +\let\bbl@jpn@maybekansuji\number +\bbl@declare@ttribute{japanese}{kansujitoday}{\let\bbl@jpn@maybekansuji\kansuji} +\catcode`\L=\bbl@jpn@l@catcode\relax +\catcode`\P=\bbl@jpn@p@catcode\relax +\catcode`\X=\bbl@jpn@x@catcode\relax \@namedef{extras\CurrentOption}{} \@namedef{noextras\CurrentOption}{} \ldf@finish\CurrentOption |