summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-04-03 21:39:22 +0000
committerKarl Berry <karl@freefriends.org>2019-04-03 21:39:22 +0000
commit2030c7655381d02ed462c8c45ee416c2532305f8 (patch)
tree981cded8b0b090b79255f83493a53b7d64c9d5c0 /Master
parent3b7f83d0c3c2e196609666664f5281065c23812b (diff)
babel-japanese (3apr19)
git-svn-id: svn://tug.org/texlive/trunk@50735 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/generic/babel-japanese/README.md2
-rw-r--r--Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdfbin42562 -> 44091 bytes
-rw-r--r--Master/texmf-dist/doc/generic/babel-japanese/japanese.pdfbin131202 -> 139680 bytes
-rw-r--r--Master/texmf-dist/source/generic/babel-japanese/Makefile (renamed from Master/texmf-dist/doc/generic/babel-japanese/Makefile)0
-rw-r--r--Master/texmf-dist/source/generic/babel-japanese/japanese.dtx113
-rw-r--r--Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf88
6 files changed, 144 insertions, 59 deletions
diff --git a/Master/texmf-dist/doc/generic/babel-japanese/README.md b/Master/texmf-dist/doc/generic/babel-japanese/README.md
index c46a824863b..7e52f31134f 100644
--- a/Master/texmf-dist/doc/generic/babel-japanese/README.md
+++ b/Master/texmf-dist/doc/generic/babel-japanese/README.md
@@ -80,6 +80,6 @@ modified under the terms of the LaTeX Project Public License 1.3.
## Release Date
-2017-02-05
+2019-04-03
Japanese TeX Development Community
diff --git a/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf b/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf
index a4420a3d940..622d69cb8de 100644
--- a/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf
+++ b/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/babel-japanese/japanese.pdf b/Master/texmf-dist/doc/generic/babel-japanese/japanese.pdf
index 02b512e3c94..65f89c53968 100644
--- a/Master/texmf-dist/doc/generic/babel-japanese/japanese.pdf
+++ b/Master/texmf-dist/doc/generic/babel-japanese/japanese.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/generic/babel-japanese/Makefile b/Master/texmf-dist/source/generic/babel-japanese/Makefile
index a9d92127097..a9d92127097 100644
--- a/Master/texmf-dist/doc/generic/babel-japanese/Makefile
+++ b/Master/texmf-dist/source/generic/babel-japanese/Makefile
diff --git a/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx b/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx
index 45d1b5784ae..8a7bf5558b9 100644
--- a/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx
+++ b/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx
@@ -4,16 +4,17 @@
% providing Japanese language support for Babel.
%
% Copyright (C) 1999--2007 by ING (Toru INAGAKI)
-% 2016-- by Japanese TeX Development Community
+% 2016--2019 by Japanese TeX Development Community
%
% This package 'japanese.dtx' supports the following Babel package:
%
% ====================================================================
%
-% Copyright 2012-2016 Javier Bezos and Johannes L. Braams.
-% Copyright 1989-2012 Johannes L. Braams and any individual authors
-% listed elsewhere in this file. All rights reserved.
-%
+% Copyright (C) 2012-2018 Javier Bezos and Johannes L. Braams.
+% Copyright (C) 1989-2012 Johannes L. Braams and
+% any individual authors listed elsewhere in this file.
+% All rights reserved.
+%
% It may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
@@ -21,9 +22,9 @@
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
-%
+%
% This work has the LPPL maintenance status "maintained".
-%
+%
% The Current Maintainer of this work is Javier Bezos.
%
% ====================================================================
@@ -45,7 +46,7 @@
%<code>\ProvidesLanguage{japanese}
%<*!sample>
%\ProvidesFile{japanese.dtx}
- [2017/02/05 v2.1 Japanese support for babel (texjporg)]
+ [2019/04/03 v2.2 Japanese support for babel (texjporg)]
%</!sample>
%\fi
%
@@ -303,11 +304,9 @@
% 再定義します。デフォルトの出力は西暦です。和暦を使用する際は,プリアンブルで
% |\和暦| を指定するか,本文で |\和暦\today| のように指定します。
%
-% フラグの準備,平成の計算。
+% フラグの準備。
% \begin{macrocode}
\newif\ifbbl@jpn@Seireki \bbl@jpn@Seirekitrue
-{\advance\year-1988\relax
- \xdef\the@heisei{\the\year}}
% \end{macrocode}
%
% Unicodeな\TeX{}エンジン(Xe\TeX{},Lua\TeX{})の場合は,
@@ -317,12 +316,16 @@
\ifx\kanjiskip\@undefined
\def\西暦{\bbl@jpn@Seirekitrue}%
\def\和暦{\bbl@jpn@Seirekifalse}%
+ \def\bbl@jpn@kanjishowa{昭和}
+ \def\bbl@jpn@kanjiheisei{平成}
+ \def\bbl@jpn@kanjireiwa{令和}
+ \def\bbl@jpn@kanjigan{元}%
\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@gengo\bbl@jpn@maybekansuji\bbl@jpn@gengoyear 年%
\bbl@jpn@maybekansuji\month 月%
\bbl@jpn@maybekansuji\day 日}
\def\bbl@jpn@SeirekiToday{%
@@ -330,7 +333,7 @@
\number\month 月%
\number\day 日}
\def\bbl@jpn@WarekiToday{%
- 平成\the@heisei 年%
+ \bbl@jpn@gengo\number\bbl@jpn@gengoyear 年%
\number\month 月%
\number\day 日}
% \end{macrocode}
@@ -339,6 +342,12 @@
% \begin{macrocode}
\else
\begingroup
+ \kansujichar1=\jis"472F\relax % 年
+ \kansujichar2=\jis"376E\relax % 月
+ \kansujichar3=\jis"467C\relax % 日
+ \xdef\bbl@jpn@kanjinen{\kansuji1}%
+ \xdef\bbl@jpn@kanjigatsu{\kansuji2}%
+ \xdef\bbl@jpn@kanjinichi{\kansuji3}%
\kansujichar1=\jis"403E\relax % 西
\kansujichar2=\jis"4F42\relax % 和
\kansujichar3=\jis"4E71\relax % 暦
@@ -346,22 +355,22 @@
\expandafter\csname\kansuji13\endcsname{\bbl@jpn@Seirekitrue}%
\expandafter\expandafter\expandafter\gdef
\expandafter\csname\kansuji23\endcsname{\bbl@jpn@Seirekifalse}%
- \kansujichar1=\jis"472F\relax % 年
- \kansujichar2=\jis"376E\relax % 月
- \kansujichar3=\jis"467C\relax % 日
\kansujichar4=\jis"4A3F\relax % 平
\kansujichar5=\jis"402E\relax % 成
- \xdef\bbl@jpn@kanjinen{\kansuji1}%
- \xdef\bbl@jpn@kanjigatsu{\kansuji2}%
- \xdef\bbl@jpn@kanjinichi{\kansuji3}%
+ \kansujichar6=\jis"3E3C\relax % 昭
+ \kansujichar7=\jis"4E61\relax % 令
+ \xdef\bbl@jpn@kanjishowa{\kansuji62}%
\xdef\bbl@jpn@kanjiheisei{\kansuji45}%
+ \xdef\bbl@jpn@kanjireiwa{\kansuji72}%
+ \kansujichar0=\jis"3835\relax % 元
+ \xdef\bbl@jpn@kanjigan{\kansuji0}%
\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@gengo\bbl@jpn@maybekansuji\bbl@jpn@gengoyear\bbl@jpn@kanjinen
\bbl@jpn@maybekansuji\month\bbl@jpn@kanjigatsu
\bbl@jpn@maybekansuji\day\bbl@jpn@kanjinichi}
\def\bbl@jpn@SeirekiToday{%
@@ -369,12 +378,41 @@
\number\month\bbl@jpn@kanjigatsu
\number\day\bbl@jpn@kanjinichi}
\def\bbl@jpn@WarekiToday{%
- \bbl@jpn@kanjiheisei\the@heisei\bbl@jpn@kanjinen
+ \bbl@jpn@gengo\number\bbl@jpn@gengoyear\bbl@jpn@kanjinen
\number\month\bbl@jpn@kanjigatsu
\number\day\bbl@jpn@kanjinichi}
\fi
% \end{macrocode}
%
+% |\bbl@jpn@gengo| の内部で,元号を計算します。
+%
+% [2019-04-03] 2019年5月1日から始まる予定の新元号「令和」に対応しました。
+% \begin{macrocode}
+\def\bbl@jpn@gengo#1\bbl@jpn@gengoyear{%
+ \@tempcnta\year\relax
+ \multiply\@tempcnta100
+ \advance\@tempcnta\month
+ \multiply\@tempcnta100
+ \advance\@tempcnta\day
+ \@tempcntb\year\relax
+ \ifnum\@tempcnta<19890108
+ \bbl@jpn@kanjishowa
+ \advance\@tempcntb-1925
+ \else\ifnum\@tempcnta<20190501
+ \bbl@jpn@kanjiheisei
+ \advance\@tempcntb-1988
+ \else
+ \bbl@jpn@kanjireiwa
+ \advance\@tempcntb-2018
+ \fi\fi
+ \ifnum\@tempcntb=1
+ \bbl@jpn@kanjigan % 元年は \number も \kansuji も関係ない
+ \else
+ #1\@tempcntb % この #1 は \number または \bbl@jpn@maybekansuji
+ \fi
+}
+% \end{macrocode}
+%
% (u)p\LaTeXe{}とLua\TeX-jaで組方向判定方法が異なるため,|\catcode| のトリックで
% 別々のコードを使い分けます。Xe\LaTeX{}の場合,およびLua\LaTeX{}でLua\TeX-ja不使用の
% 場合は,縦組をサポートしません。
@@ -406,23 +444,32 @@
% \end{macrocode}
%
% 実際に使用する命令にコピーします。
+%
+% [2019-04-03] 縦数式ディレクションは横組と同じ出力とします。
% \begin{macrocode}
\@namedef{date\CurrentOption}{%
\def\today{%
-P \iftdir
-L \ifnum\ltjgetparameter{direction}=3
-X \ifbbl@jpn@Seireki
-X \bbl@jpn@TateSeirekiToday
+P \iftdir\ifmdir % tate-math
+P \ifbbl@jpn@Seireki
+P \bbl@jpn@SeirekiToday
+P \else
+P \bbl@jpn@WarekiToday
+P \fi
+P \else % tate
+L \ifnum\ltjgetparameter{direction}=3 % tate
+X \ifbbl@jpn@Seireki
+X \bbl@jpn@TateSeirekiToday
+X \else
+X \bbl@jpn@TateWarekiToday
+X \fi
+P \fi
X \else
-X \bbl@jpn@TateWarekiToday
+ \ifbbl@jpn@Seireki
+ \bbl@jpn@SeirekiToday
+ \else
+ \bbl@jpn@WarekiToday
+ \fi
X \fi
-X \else
- \ifbbl@jpn@Seireki
- \bbl@jpn@SeirekiToday
- \else
- \bbl@jpn@WarekiToday
- \fi
-X \fi
}%
}
% \end{macrocode}
diff --git a/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf b/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf
index ab1f9d91ad8..2e58a2da098 100644
--- a/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf
+++ b/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf
@@ -28,7 +28,7 @@
\epTeXinputencoding utf8
\fi
\ProvidesLanguage{japanese}
- [2017/02/05 v2.1 Japanese support for babel (texjporg)]
+ [2019/04/03 v2.2 Japanese support for babel (texjporg)]
\ifx\kanjiskip\@undefined\ifx\directlua\@undefined
\ifx\XeTeXversion\@undefined
\@latex@error{Option '\CurrentOption' requires one of the followings:\MessageBreak
@@ -150,17 +150,19 @@
\let\glossaryname\bbl@jpn@glossaryname
}
\newif\ifbbl@jpn@Seireki \bbl@jpn@Seirekitrue
-{\advance\year-1988\relax
- \xdef\the@heisei{\the\year}}
\ifx\kanjiskip\@undefined
\def\西暦{\bbl@jpn@Seirekitrue}%
\def\和暦{\bbl@jpn@Seirekifalse}%
+ \def\bbl@jpn@kanjishowa{昭和}
+ \def\bbl@jpn@kanjiheisei{平成}
+ \def\bbl@jpn@kanjireiwa{令和}
+ \def\bbl@jpn@kanjigan{元}%
\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@gengo\bbl@jpn@maybekansuji\bbl@jpn@gengoyear 年%
\bbl@jpn@maybekansuji\month 月%
\bbl@jpn@maybekansuji\day 日}
\def\bbl@jpn@SeirekiToday{%
@@ -168,11 +170,17 @@
\number\month 月%
\number\day 日}
\def\bbl@jpn@WarekiToday{%
- 平成\the@heisei 年%
+ \bbl@jpn@gengo\number\bbl@jpn@gengoyear 年%
\number\month 月%
\number\day 日}
\else
\begingroup
+ \kansujichar1=\jis"472F\relax % 年
+ \kansujichar2=\jis"376E\relax % 月
+ \kansujichar3=\jis"467C\relax % 日
+ \xdef\bbl@jpn@kanjinen{\kansuji1}%
+ \xdef\bbl@jpn@kanjigatsu{\kansuji2}%
+ \xdef\bbl@jpn@kanjinichi{\kansuji3}%
\kansujichar1=\jis"403E\relax % 西
\kansujichar2=\jis"4F42\relax % 和
\kansujichar3=\jis"4E71\relax % 暦
@@ -180,22 +188,22 @@
\expandafter\csname\kansuji13\endcsname{\bbl@jpn@Seirekitrue}%
\expandafter\expandafter\expandafter\gdef
\expandafter\csname\kansuji23\endcsname{\bbl@jpn@Seirekifalse}%
- \kansujichar1=\jis"472F\relax % 年
- \kansujichar2=\jis"376E\relax % 月
- \kansujichar3=\jis"467C\relax % 日
\kansujichar4=\jis"4A3F\relax % 平
\kansujichar5=\jis"402E\relax % 成
- \xdef\bbl@jpn@kanjinen{\kansuji1}%
- \xdef\bbl@jpn@kanjigatsu{\kansuji2}%
- \xdef\bbl@jpn@kanjinichi{\kansuji3}%
+ \kansujichar6=\jis"3E3C\relax % 昭
+ \kansujichar7=\jis"4E61\relax % 令
+ \xdef\bbl@jpn@kanjishowa{\kansuji62}%
\xdef\bbl@jpn@kanjiheisei{\kansuji45}%
+ \xdef\bbl@jpn@kanjireiwa{\kansuji72}%
+ \kansujichar0=\jis"3835\relax % 元
+ \xdef\bbl@jpn@kanjigan{\kansuji0}%
\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@gengo\bbl@jpn@maybekansuji\bbl@jpn@gengoyear\bbl@jpn@kanjinen
\bbl@jpn@maybekansuji\month\bbl@jpn@kanjigatsu
\bbl@jpn@maybekansuji\day\bbl@jpn@kanjinichi}
\def\bbl@jpn@SeirekiToday{%
@@ -203,10 +211,33 @@
\number\month\bbl@jpn@kanjigatsu
\number\day\bbl@jpn@kanjinichi}
\def\bbl@jpn@WarekiToday{%
- \bbl@jpn@kanjiheisei\the@heisei\bbl@jpn@kanjinen
+ \bbl@jpn@gengo\number\bbl@jpn@gengoyear\bbl@jpn@kanjinen
\number\month\bbl@jpn@kanjigatsu
\number\day\bbl@jpn@kanjinichi}
\fi
+\def\bbl@jpn@gengo#1\bbl@jpn@gengoyear{%
+ \@tempcnta\year\relax
+ \multiply\@tempcnta100
+ \advance\@tempcnta\month
+ \multiply\@tempcnta100
+ \advance\@tempcnta\day
+ \@tempcntb\year\relax
+ \ifnum\@tempcnta<19890108
+ \bbl@jpn@kanjishowa
+ \advance\@tempcntb-1925
+ \else\ifnum\@tempcnta<20190501
+ \bbl@jpn@kanjiheisei
+ \advance\@tempcntb-1988
+ \else
+ \bbl@jpn@kanjireiwa
+ \advance\@tempcntb-2018
+ \fi\fi
+ \ifnum\@tempcntb=1
+ \bbl@jpn@kanjigan % 元年は \number も \kansuji も関係ない
+ \else
+ #1\@tempcntb % この #1 は \number または \bbl@jpn@maybekansuji
+ \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
@@ -233,20 +264,27 @@
\fi
\@namedef{date\CurrentOption}{%
\def\today{%
-P \iftdir
-L \ifnum\ltjgetparameter{direction}=3
-X \ifbbl@jpn@Seireki
-X \bbl@jpn@TateSeirekiToday
+P \iftdir\ifmdir % tate-math
+P \ifbbl@jpn@Seireki
+P \bbl@jpn@SeirekiToday
+P \else
+P \bbl@jpn@WarekiToday
+P \fi
+P \else % tate
+L \ifnum\ltjgetparameter{direction}=3 % tate
+X \ifbbl@jpn@Seireki
+X \bbl@jpn@TateSeirekiToday
+X \else
+X \bbl@jpn@TateWarekiToday
+X \fi
+P \fi
X \else
-X \bbl@jpn@TateWarekiToday
+ \ifbbl@jpn@Seireki
+ \bbl@jpn@SeirekiToday
+ \else
+ \bbl@jpn@WarekiToday
+ \fi
X \fi
-X \else
- \ifbbl@jpn@Seireki
- \bbl@jpn@SeirekiToday
- \else
- \bbl@jpn@WarekiToday
- \fi
-X \fi
}%
}
\let\bbl@jpn@maybekansuji\number