texlive[50735] Master/texmf-dist: babel-japanese (3apr19)

commits+karl at tug.org commits+karl at tug.org
Wed Apr 3 23:39:22 CEST 2019


Revision: 50735
          http://tug.org/svn/texlive?view=revision&revision=50735
Author:   karl
Date:     2019-04-03 23:39:22 +0200 (Wed, 03 Apr 2019)
Log Message:
-----------
babel-japanese (3apr19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/generic/babel-japanese/README.md
    trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf
    trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese.pdf
    trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx
    trunk/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf

Added Paths:
-----------
    trunk/Master/texmf-dist/source/generic/babel-japanese/Makefile

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/generic/babel-japanese/Makefile

Deleted: trunk/Master/texmf-dist/doc/generic/babel-japanese/Makefile
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-japanese/Makefile	2019-04-03 21:39:02 UTC (rev 50734)
+++ trunk/Master/texmf-dist/doc/generic/babel-japanese/Makefile	2019-04-03 21:39:22 UTC (rev 50735)
@@ -1,32 +0,0 @@
-# Makefile for babel-japanese
-# Note that all files are UTF-8 (without BOM) encoded!
-
-STRIPTARGET = japanese.ldf japanese-sample.tex
-PDFTARGET = japanese.pdf japanese-sample.pdf
-DVITARGET = japanese.dvi japanese-sample.dvi
-KANJI = --kanji=utf8
-FONTMAP = -f ptex-ipaex.map -f ipaex.map
-
-default: $(STRIPTARGET) $(DVITARGET)
-strip: $(STRIPTARGET)
-all: $(STRIPTARGET) $(PDFTARGET)
-
-japanese.ldf: japanese.dtx
-	platex $(KANJI) japanese.ins
-
-japanese.dvi: japanese.dtx
-	platex $(KANJI) japanese.dtx
-	platex $(KANJI) japanese.dtx
-
-.SUFFIXES: .tex .dvi .pdf
-.tex.dvi:
-	platex $(KANJI) $<
-	platex $(KANJI) $<
-.dvi.pdf:
-	dvipdfmx $(FONTMAP) $<
-
-.PHONY: clean
-clean:
-	rm -f \
-	japanese.ldf japanese-sample.tex \
-	japanese.pdf japanese-sample.pdf

Modified: trunk/Master/texmf-dist/doc/generic/babel-japanese/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-japanese/README.md	2019-04-03 21:39:02 UTC (rev 50734)
+++ trunk/Master/texmf-dist/doc/generic/babel-japanese/README.md	2019-04-03 21:39:22 UTC (rev 50735)
@@ -80,6 +80,6 @@
 
 ## Release Date
 
-2017-02-05
+2019-04-03
 
 Japanese TeX Development Community

Modified: trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/source/generic/babel-japanese/Makefile
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-japanese/Makefile	                        (rev 0)
+++ trunk/Master/texmf-dist/source/generic/babel-japanese/Makefile	2019-04-03 21:39:22 UTC (rev 50735)
@@ -0,0 +1,32 @@
+# Makefile for babel-japanese
+# Note that all files are UTF-8 (without BOM) encoded!
+
+STRIPTARGET = japanese.ldf japanese-sample.tex
+PDFTARGET = japanese.pdf japanese-sample.pdf
+DVITARGET = japanese.dvi japanese-sample.dvi
+KANJI = --kanji=utf8
+FONTMAP = -f ptex-ipaex.map -f ipaex.map
+
+default: $(STRIPTARGET) $(DVITARGET)
+strip: $(STRIPTARGET)
+all: $(STRIPTARGET) $(PDFTARGET)
+
+japanese.ldf: japanese.dtx
+	platex $(KANJI) japanese.ins
+
+japanese.dvi: japanese.dtx
+	platex $(KANJI) japanese.dtx
+	platex $(KANJI) japanese.dtx
+
+.SUFFIXES: .tex .dvi .pdf
+.tex.dvi:
+	platex $(KANJI) $<
+	platex $(KANJI) $<
+.dvi.pdf:
+	dvipdfmx $(FONTMAP) $<
+
+.PHONY: clean
+clean:
+	rm -f \
+	japanese.ldf japanese-sample.tex \
+	japanese.pdf japanese-sample.pdf


Property changes on: trunk/Master/texmf-dist/source/generic/babel-japanese/Makefile
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx	2019-04-03 21:39:02 UTC (rev 50734)
+++ trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx	2019-04-03 21:39:22 UTC (rev 50735)
@@ -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 at jpn@Seireki \bbl at jpn@Seirekitrue
-{\advance\year-1988\relax
- \xdef\the at heisei{\the\year}}
 %    \end{macrocode}
 %
 % Unicodeな\TeX{}エンジン(Xe\TeX{},Lua\TeX{})の場合は,
@@ -317,12 +316,16 @@
 \ifx\kanjiskip\@undefined
   \def\西暦{\bbl at jpn@Seirekitrue}%
   \def\和暦{\bbl at jpn@Seirekifalse}%
+  \def\bbl at jpn@kanjishowa{昭和}
+  \def\bbl at jpn@kanjiheisei{平成}
+  \def\bbl at jpn@kanjireiwa{令和}
+  \def\bbl at jpn@kanjigan{元}%
   \def\bbl at jpn@TateSeirekiToday{%
       \bbl at jpn@maybekansuji\year 年%
       \bbl at jpn@maybekansuji\month 月%
       \bbl at jpn@maybekansuji\day 日}
   \def\bbl at jpn@TateWarekiToday{%
-      平成\bbl at jpn@maybekansuji\the at heisei 年%
+      \bbl at jpn@gengo\bbl at jpn@maybekansuji\bbl at jpn@gengoyear 年%
       \bbl at jpn@maybekansuji\month 月%
       \bbl at jpn@maybekansuji\day 日}
   \def\bbl at jpn@SeirekiToday{%
@@ -330,7 +333,7 @@
       \number\month 月%
       \number\day 日}
   \def\bbl at jpn@WarekiToday{%
-      平成\the at heisei 年%
+      \bbl at jpn@gengo\number\bbl at 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 at jpn@kanjinen{\kansuji1}%
+  \xdef\bbl at jpn@kanjigatsu{\kansuji2}%
+  \xdef\bbl at jpn@kanjinichi{\kansuji3}%
   \kansujichar1=\jis"403E\relax % 西
   \kansujichar2=\jis"4F42\relax % 和
   \kansujichar3=\jis"4E71\relax % 暦
@@ -346,15 +355,15 @@
   \expandafter\csname\kansuji13\endcsname{\bbl at jpn@Seirekitrue}%
   \expandafter\expandafter\expandafter\gdef
   \expandafter\csname\kansuji23\endcsname{\bbl at jpn@Seirekifalse}%
-  \kansujichar1=\jis"472F\relax % 年
-  \kansujichar2=\jis"376E\relax % 月
-  \kansujichar3=\jis"467C\relax % 日
   \kansujichar4=\jis"4A3F\relax % 平
   \kansujichar5=\jis"402E\relax % 成
-  \xdef\bbl at jpn@kanjinen{\kansuji1}%
-  \xdef\bbl at jpn@kanjigatsu{\kansuji2}%
-  \xdef\bbl at jpn@kanjinichi{\kansuji3}%
+  \kansujichar6=\jis"3E3C\relax % 昭
+  \kansujichar7=\jis"4E61\relax % 令
+  \xdef\bbl at jpn@kanjishowa{\kansuji62}%
   \xdef\bbl at jpn@kanjiheisei{\kansuji45}%
+  \xdef\bbl at jpn@kanjireiwa{\kansuji72}%
+  \kansujichar0=\jis"3835\relax % 元
+  \xdef\bbl at jpn@kanjigan{\kansuji0}%
 \endgroup
   \def\bbl at jpn@TateSeirekiToday{%
     \bbl at jpn@maybekansuji\year\bbl at jpn@kanjinen
@@ -361,7 +370,7 @@
     \bbl at jpn@maybekansuji\month\bbl at jpn@kanjigatsu
     \bbl at jpn@maybekansuji\day\bbl at jpn@kanjinichi}
   \def\bbl at jpn@TateWarekiToday{%
-    \bbl at jpn@kanjiheisei\bbl at jpn@maybekansuji\the at heisei\bbl at jpn@kanjinen
+    \bbl at jpn@gengo\bbl at jpn@maybekansuji\bbl at jpn@gengoyear\bbl at jpn@kanjinen
     \bbl at jpn@maybekansuji\month\bbl at jpn@kanjigatsu
     \bbl at jpn@maybekansuji\day\bbl at jpn@kanjinichi}
   \def\bbl at jpn@SeirekiToday{%
@@ -369,12 +378,41 @@
     \number\month\bbl at jpn@kanjigatsu
     \number\day\bbl at jpn@kanjinichi}
   \def\bbl at jpn@WarekiToday{%
-    \bbl at jpn@kanjiheisei\the at heisei\bbl at jpn@kanjinen
+    \bbl at jpn@gengo\number\bbl at jpn@gengoyear\bbl at jpn@kanjinen
     \number\month\bbl at jpn@kanjigatsu
     \number\day\bbl at jpn@kanjinichi}
 \fi
 %    \end{macrocode}
 %
+% |\bbl at jpn@gengo| の内部で,元号を計算します。
+%
+% [2019-04-03] 2019年5月1日から始まる予定の新元号「令和」に対応しました。
+%    \begin{macrocode}
+\def\bbl at jpn@gengo#1\bbl at jpn@gengoyear{%
+  \@tempcnta\year\relax
+  \multiply\@tempcnta100
+  \advance\@tempcnta\month
+  \multiply\@tempcnta100
+  \advance\@tempcnta\day
+  \@tempcntb\year\relax
+  \ifnum\@tempcnta<19890108
+    \bbl at jpn@kanjishowa
+    \advance\@tempcntb-1925
+  \else\ifnum\@tempcnta<20190501
+    \bbl at jpn@kanjiheisei
+    \advance\@tempcntb-1988
+  \else
+    \bbl at jpn@kanjireiwa
+    \advance\@tempcntb-2018
+  \fi\fi
+  \ifnum\@tempcntb=1
+    \bbl at jpn@kanjigan   % 元年は \number も \kansuji も関係ない
+  \else
+    #1\@tempcntb % この #1 は \number または \bbl at 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 at jpn@Seireki
-X     \bbl at jpn@TateSeirekiToday
+P   \iftdir\ifmdir % tate-math
+P     \ifbbl at jpn@Seireki
+P       \bbl at jpn@SeirekiToday
+P     \else
+P       \bbl at jpn@WarekiToday
+P     \fi
+P   \else          % tate
+L   \ifnum\ltjgetparameter{direction}=3 % tate
+X     \ifbbl at jpn@Seireki
+X       \bbl at jpn@TateSeirekiToday
+X     \else
+X       \bbl at jpn@TateWarekiToday
+X     \fi
+P   \fi
 X   \else
-X     \bbl at jpn@TateWarekiToday
+      \ifbbl at jpn@Seireki
+        \bbl at jpn@SeirekiToday
+      \else
+        \bbl at jpn@WarekiToday
+      \fi
 X   \fi
-X  \else
-    \ifbbl at jpn@Seireki
-      \bbl at jpn@SeirekiToday
-    \else
-      \bbl at jpn@WarekiToday
-    \fi
-X  \fi
   }%
 }
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf	2019-04-03 21:39:02 UTC (rev 50734)
+++ trunk/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf	2019-04-03 21:39:22 UTC (rev 50735)
@@ -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 at error{Option '\CurrentOption' requires one of the followings:\MessageBreak
@@ -150,17 +150,19 @@
   \let\glossaryname\bbl at jpn@glossaryname
   }
 \newif\ifbbl at jpn@Seireki \bbl at jpn@Seirekitrue
-{\advance\year-1988\relax
- \xdef\the at heisei{\the\year}}
 \ifx\kanjiskip\@undefined
   \def\西暦{\bbl at jpn@Seirekitrue}%
   \def\和暦{\bbl at jpn@Seirekifalse}%
+  \def\bbl at jpn@kanjishowa{昭和}
+  \def\bbl at jpn@kanjiheisei{平成}
+  \def\bbl at jpn@kanjireiwa{令和}
+  \def\bbl at jpn@kanjigan{元}%
   \def\bbl at jpn@TateSeirekiToday{%
       \bbl at jpn@maybekansuji\year 年%
       \bbl at jpn@maybekansuji\month 月%
       \bbl at jpn@maybekansuji\day 日}
   \def\bbl at jpn@TateWarekiToday{%
-      平成\bbl at jpn@maybekansuji\the at heisei 年%
+      \bbl at jpn@gengo\bbl at jpn@maybekansuji\bbl at jpn@gengoyear 年%
       \bbl at jpn@maybekansuji\month 月%
       \bbl at jpn@maybekansuji\day 日}
   \def\bbl at jpn@SeirekiToday{%
@@ -168,11 +170,17 @@
       \number\month 月%
       \number\day 日}
   \def\bbl at jpn@WarekiToday{%
-      平成\the at heisei 年%
+      \bbl at jpn@gengo\number\bbl at jpn@gengoyear 年%
       \number\month 月%
       \number\day 日}
 \else
 \begingroup
+  \kansujichar1=\jis"472F\relax % 年
+  \kansujichar2=\jis"376E\relax % 月
+  \kansujichar3=\jis"467C\relax % 日
+  \xdef\bbl at jpn@kanjinen{\kansuji1}%
+  \xdef\bbl at jpn@kanjigatsu{\kansuji2}%
+  \xdef\bbl at jpn@kanjinichi{\kansuji3}%
   \kansujichar1=\jis"403E\relax % 西
   \kansujichar2=\jis"4F42\relax % 和
   \kansujichar3=\jis"4E71\relax % 暦
@@ -180,15 +188,15 @@
   \expandafter\csname\kansuji13\endcsname{\bbl at jpn@Seirekitrue}%
   \expandafter\expandafter\expandafter\gdef
   \expandafter\csname\kansuji23\endcsname{\bbl at jpn@Seirekifalse}%
-  \kansujichar1=\jis"472F\relax % 年
-  \kansujichar2=\jis"376E\relax % 月
-  \kansujichar3=\jis"467C\relax % 日
   \kansujichar4=\jis"4A3F\relax % 平
   \kansujichar5=\jis"402E\relax % 成
-  \xdef\bbl at jpn@kanjinen{\kansuji1}%
-  \xdef\bbl at jpn@kanjigatsu{\kansuji2}%
-  \xdef\bbl at jpn@kanjinichi{\kansuji3}%
+  \kansujichar6=\jis"3E3C\relax % 昭
+  \kansujichar7=\jis"4E61\relax % 令
+  \xdef\bbl at jpn@kanjishowa{\kansuji62}%
   \xdef\bbl at jpn@kanjiheisei{\kansuji45}%
+  \xdef\bbl at jpn@kanjireiwa{\kansuji72}%
+  \kansujichar0=\jis"3835\relax % 元
+  \xdef\bbl at jpn@kanjigan{\kansuji0}%
 \endgroup
   \def\bbl at jpn@TateSeirekiToday{%
     \bbl at jpn@maybekansuji\year\bbl at jpn@kanjinen
@@ -195,7 +203,7 @@
     \bbl at jpn@maybekansuji\month\bbl at jpn@kanjigatsu
     \bbl at jpn@maybekansuji\day\bbl at jpn@kanjinichi}
   \def\bbl at jpn@TateWarekiToday{%
-    \bbl at jpn@kanjiheisei\bbl at jpn@maybekansuji\the at heisei\bbl at jpn@kanjinen
+    \bbl at jpn@gengo\bbl at jpn@maybekansuji\bbl at jpn@gengoyear\bbl at jpn@kanjinen
     \bbl at jpn@maybekansuji\month\bbl at jpn@kanjigatsu
     \bbl at jpn@maybekansuji\day\bbl at jpn@kanjinichi}
   \def\bbl at jpn@SeirekiToday{%
@@ -203,10 +211,33 @@
     \number\month\bbl at jpn@kanjigatsu
     \number\day\bbl at jpn@kanjinichi}
   \def\bbl at jpn@WarekiToday{%
-    \bbl at jpn@kanjiheisei\the at heisei\bbl at jpn@kanjinen
+    \bbl at jpn@gengo\number\bbl at jpn@gengoyear\bbl at jpn@kanjinen
     \number\month\bbl at jpn@kanjigatsu
     \number\day\bbl at jpn@kanjinichi}
 \fi
+\def\bbl at jpn@gengo#1\bbl at jpn@gengoyear{%
+  \@tempcnta\year\relax
+  \multiply\@tempcnta100
+  \advance\@tempcnta\month
+  \multiply\@tempcnta100
+  \advance\@tempcnta\day
+  \@tempcntb\year\relax
+  \ifnum\@tempcnta<19890108
+    \bbl at jpn@kanjishowa
+    \advance\@tempcntb-1925
+  \else\ifnum\@tempcnta<20190501
+    \bbl at jpn@kanjiheisei
+    \advance\@tempcntb-1988
+  \else
+    \bbl at jpn@kanjireiwa
+    \advance\@tempcntb-2018
+  \fi\fi
+  \ifnum\@tempcntb=1
+    \bbl at jpn@kanjigan   % 元年は \number も \kansuji も関係ない
+  \else
+    #1\@tempcntb % この #1 は \number または \bbl at jpn@maybekansuji
+  \fi
+}
 \chardef\bbl at jpn@l at catcode=\catcode`\L\relax
 \chardef\bbl at jpn@p at catcode=\catcode`\P\relax
 \chardef\bbl at jpn@x at catcode=\catcode`\X\relax
@@ -233,20 +264,27 @@
 \fi
 \@namedef{date\CurrentOption}{%
   \def\today{%
-P  \iftdir
-L  \ifnum\ltjgetparameter{direction}=3
-X   \ifbbl at jpn@Seireki
-X     \bbl at jpn@TateSeirekiToday
+P   \iftdir\ifmdir % tate-math
+P     \ifbbl at jpn@Seireki
+P       \bbl at jpn@SeirekiToday
+P     \else
+P       \bbl at jpn@WarekiToday
+P     \fi
+P   \else          % tate
+L   \ifnum\ltjgetparameter{direction}=3 % tate
+X     \ifbbl at jpn@Seireki
+X       \bbl at jpn@TateSeirekiToday
+X     \else
+X       \bbl at jpn@TateWarekiToday
+X     \fi
+P   \fi
 X   \else
-X     \bbl at jpn@TateWarekiToday
+      \ifbbl at jpn@Seireki
+        \bbl at jpn@SeirekiToday
+      \else
+        \bbl at jpn@WarekiToday
+      \fi
 X   \fi
-X  \else
-    \ifbbl at jpn@Seireki
-      \bbl at jpn@SeirekiToday
-    \else
-      \bbl at jpn@WarekiToday
-    \fi
-X  \fi
   }%
 }
 \let\bbl at jpn@maybekansuji\number



More information about the tex-live-commits mailing list