texlive[57078] Master/texmf-dist: babel-japanese (6dec20)

commits+karl at tug.org commits+karl at tug.org
Sun Dec 6 23:14:43 CET 2020


Revision: 57078
          http://tug.org/svn/texlive?view=revision&revision=57078
Author:   karl
Date:     2020-12-06 23:14:43 +0100 (Sun, 06 Dec 2020)
Log Message:
-----------
babel-japanese (6dec20)

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

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese-sample.pdf
    trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese-sample.tex
    trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese.pdf
    trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese.tex
    trunk/Master/texmf-dist/source/generic/babel-japanese/babel-japanese.dtx
    trunk/Master/texmf-dist/source/generic/babel-japanese/babel-japanese.ins

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf
    trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.tex
    trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx
    trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.ins

Modified: trunk/Master/texmf-dist/doc/generic/babel-japanese/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-japanese/README.md	2020-12-06 16:05:32 UTC (rev 57077)
+++ trunk/Master/texmf-dist/doc/generic/babel-japanese/README.md	2020-12-06 22:14:43 UTC (rev 57078)
@@ -4,9 +4,7 @@
 `japanese` option for Babel package. It defines all the language
 definition macros in Japanese.
 
-Currently this package works on pLaTeX, upLaTeX, XeLaTeX and LuaLaTeX.
 
-
 ## Limitations
 
 Note that this package is not perfect: the word order in Japanese is
@@ -22,41 +20,44 @@
 
 ## Installation
 
-1) Process japanese.ins with some tex engine. For example, using lualatex:
+1) Process babel-japanese.ins with some tex engine.
+   For example, using lualatex:
 
-        lualatex japanese.ins
+        lualatex babel-japanese.ins
 
-When you use platex, give -kanji=utf8 option.
+   When you use platex, give -kanji=utf8 option.
 
-        platex -kanji=utf8 japanese.ins
+        platex -kanji=utf8 babel-japanese.ins
 
-You will get japanese.ldf (the main code) and japanese-sample.tex (sample
-document for pLaTeX).
+   You will get japanese.ldf (the main code) and
+   babel-japanese-sample.tex (sample document for pLaTeX).
 
-2) Process documentation, japanese.dtx and japanese-sample.tex, as you wish.
-japanese.dtx can be processed with pLaTeX, upLaTeX or LuaLaTeX.
-japanese-sample.tex is written for pLaTeX or LuaLaTeX.
+2) Process documentation, babel-japanese.dtx and
+   babel-japanese-sample.tex, as you wish.
+   babel-japanese.dtx can be processed with pLaTeX, upLaTeX or LuaLaTeX.
+   babel-japanese-sample.tex is written for pLaTeX or LuaLaTeX.
 
-If you use lualatex:
+   If you use lualatex:
 
-        lualatex japanese.dtx
-        lualatex japanese-sample.tex
+        lualatex babel-japanese.dtx
+        lualatex babel-japanese-sample.tex
 
-If you use platex:
+   If you use platex:
 
-        platex -kanji=utf8 japanese.dtx
-        dvipdfmx japanese.dvi
-        platex -kanji=utf8 japanese-sample.tex
-        dvipdfmx japanese-sample.dvi
+        platex -kanji=utf8 babel-japanese.dtx
+        dvipdfmx babel-japanese.dvi
+        platex -kanji=utf8 babel-japanese-sample.tex
+        dvipdfmx babel-japanese-sample.dvi
 
-3) Deploy the directory or files in an appropriate place under the TEXMF tree.
+3) Deploy the directory or files in an appropriate place under
+   the TEXMF tree.
 
         * japanese.ldf
-               => $TEXMF/tex/latex/japanese
-        * japanese.dtx
-               => $TEXMF/source/latex/japanese
-        * japanese.pdf, japanese-sample.tex, japanese-sample.pdf
-               => $TEXMF/doc/latex/japanese
+               => $TEXMF/tex/generic/babel-japanese/
+        * babel-japanese.dtx
+               => $TEXMF/source/generic/babel-japanese/
+        * babel-japanese-sample.tex, japanese.tex and PDF files
+               => $TEXMF/doc/generic/babel-japanese/
 
 4) Execute mktexlsr.
 
@@ -71,8 +72,8 @@
 
 ## License
 
-Copyright (C) 1999-2007 by ING (Toru Inagaki)
-Copyright (C) 2016-     by Japanese TeX Development Community
+Copyright (C) 1999-2007 by ING (Toru Inagaki)  
+Copyright (C) 2016-     by Japanese TeX Development Community  
 
 This package is free software that can be redistributed and/or
 modified under the terms of the LaTeX Project Public License 1.3.
@@ -80,6 +81,6 @@
 
 ## Release Date
 
-2019-04-03
+2020-12-06
 
 Japanese TeX Development Community

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

Index: trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese-sample.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese-sample.pdf	2020-12-06 16:05:32 UTC (rev 57077)
+++ trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese-sample.pdf	2020-12-06 22:14:43 UTC (rev 57078)

Property changes on: trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese-sample.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese-sample.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese-sample.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese-sample.tex	2020-12-06 22:14:43 UTC (rev 57078)
@@ -0,0 +1,101 @@
+%%
+%% This is file `babel-japanese-sample.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% babel-japanese.dtx  (with options: `sample')
+%% 
+\ifx\epTeXinputencoding\undefined\else
+  \epTeXinputencoding utf8
+\fi
+\ifx\directlua\undefined
+ \ifx\kanjiskip\undefined
+  \ifx\XeTeXversion\undefined
+    % pdfLaTeX: not beautiful
+    \documentclass{book}
+    \usepackage[whole]{bxcjkjatype}
+  \else
+    % XeLaTeX: not beautiful
+    \documentclass{book}
+    \usepackage{zxjatype}
+    \setCJKmainfont{ipaexm.ttf}
+  \fi
+ \else
+  \ifx\ucs\undefined
+    % pLaTeX: OK
+    \documentclass{jbook}
+    \usepackage{minijs}
+  \else
+    % upLaTeX: OK
+    \documentclass{ujbook}
+  \fi
+ \fi
+\else
+    % LuaLaTeX: OK
+    \documentclass{ltjbook}
+\fi
+\usepackage[german,english,japanese]{babel}
+\makeatletter
+\def\tbcaption{\def\@captype{table}\caption{キャプションの例}}
+\def\fgcaption{\def\@captype{figure}\caption{キャプションの例}}
+\makeatother
+\def\yes{--- はい。}
+\def\no{--- いいえ。}
+\def\TEXT{Textverarbeitung mit einem Rechner kann in vielf\"altiger Weise
+erfolgen. Eigenschaften und Leistungsf\"ahigkeit sind hierbei weniger
+vom jeweiligen Rechnertype, sondern vielmehr vom verwendeten
+\textit{Textverarbeitungsprogramm} bestimmt.}
+\def\se{\selectlanguage{english}}
+\def\sj{\selectlanguage{japanese}}
+\def\sg{\selectlanguage{german}}
+\setlength{\hoffset}{-13mm}
+\setlength{\textwidth}{16cm}
+\begin{document}
+
+\chapter{babel}
+\section{japaneseパッケージ}
+japaneseパッケージは日本語による見出し語と日付を出力するためのマクロを
+定義しています。
+
+\fgcaption
+
+\begin{itemize}
+\se
+\item ここで英語(\texttt{english})に変更します。
+(languageの値は\the\language)
+
+\TEXT
+
+ここは英語? \iflanguage{english}{\yes}{\no}\par
+ここはドイツ語? \iflanguage{german}{\yes}{\no}\par
+ここは日本語? \iflanguage{japanese}{\yes}{\no}
+
+※ \verb:\adddialect\l at japanese0: と設定しているため,
+日本語?も「はい」となります。
+
+\sg
+\item ここでドイツ語(\texttt{german})に変更します。
+(languageの値は\the\language)
+
+\TEXT
+
+ここは英語? \iflanguage{english}{\yes}{\no}\par
+ここはドイツ語? \iflanguage{german}{\yes}{\no}\par
+ここは日本語? \iflanguage{japanese}{\yes}{\no}
+
+※ ハイフネーションがドイツ語―旧正書法―に切り替わっている点に注目。
+なお,新正書法(\texttt{ngerman})では
+\texttt{Leis-tungs-f\"a-hig-keit}のように分綴します。
+
+\sj
+\item ここで日本語(\texttt{japanese})に変更します。
+(languageの値は\the\language)
+\tbcaption
+\item \verb:\和暦: は日付の表示をデフォルトの西暦「\today 」から
+和暦「\和暦\today 」に変更します。
+\end{itemize}
+\end{document}
+\endinput
+%%
+%% End of file `babel-japanese-sample.tex'.


Property changes on: trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese-sample.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese.pdf	2020-12-06 16:05:32 UTC (rev 57077)
+++ trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese.pdf	2020-12-06 22:14:43 UTC (rev 57078)

Property changes on: trunk/Master/texmf-dist/doc/generic/babel-japanese/babel-japanese.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf
===================================================================
(Binary files differ)

Deleted: trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.tex	2020-12-06 16:05:32 UTC (rev 57077)
+++ trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.tex	2020-12-06 22:14:43 UTC (rev 57078)
@@ -1,74 +0,0 @@
-%%
-%% This is file `japanese-sample.tex',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% japanese.dtx  (with options: `sample')
-%% 
-\ifx\epTeXinputencoding\undefined\else
-  \epTeXinputencoding utf8
-\fi
-\ifx\directlua\undefined
-  \documentclass{jbook}
-\else
-  \documentclass{ltjbook}
-\fi
-\usepackage[german,english,japanese]{babel}
-\makeatletter
-\def\tbcaption{\def\@captype{table}\caption{キャプションの例}}
-\def\fgcaption{\def\@captype{figure}\caption{キャプションの例}}
-\makeatother
-\def\yes{--- はい。}
-\def\no{--- いいえ。}
-\def\TEXT{Textverarbeitung mit einem Rechner kann in vielf\"altiger Weise
-erfolgen. Eigenschaften und Leistungsf\"ahigkeit sind hierbei weniger
-vom jeweiligen Rechnertype, sondern vielmehr vom verwendeten
-\textit{Textverarbeitungsprogramm} bestimmt.}
-\def\se{\selectlanguage{english}}
-\def\sj{\selectlanguage{japanese}}
-\def\sg{\selectlanguage{german}}
-\setlength{\hoffset}{-13mm}
-\setlength{\textwidth}{16cm}
-\begin{document}
-
-\chapter{babel}
-\section{japaneseパッケージ}
-japaneseパッケージは日本語による見出し語と日付を出力するためのマクロを
-定義しています。
-
-\fgcaption
-
-\begin{itemize}
-\se
-\item ここで英語(\texttt{english})に変更します。(languageの値は\the\language)
-
-\TEXT
-
-ここは英語? \iflanguage{english}{\yes}{\no}\par
-ここはドイツ語? \iflanguage{german}{\yes}{\no}\par
-ここは日本語? \iflanguage{japanese}{\yes}{\no}
-
-※ \verb:\adddialect\l at japanese0: と設定しているため,日本語?も「はい」となります。
-
-\sg
-\item ここでドイツ語(\texttt{german})に変更します。(languageの値は\the\language)
-
-\TEXT
-
-ここは英語? \iflanguage{english}{\yes}{\no}\par
-ここはドイツ語? \iflanguage{german}{\yes}{\no}\par
-ここは日本語? \iflanguage{japanese}{\yes}{\no}
-
-※ ハイフネーションがドイツ語―旧正書法―に切り替わっている点に注目。
-なお,新正書法(\texttt{ngerman})では\texttt{Leis-tungs-f\"a-hig-keit}のように分綴します。
-
-\sj
-\item ここで日本語(\texttt{japanese})に変更します。(languageの値は\the\language)
-\tbcaption
-\item \verb:\和暦: は日付の表示をデフォルトの西暦「\today 」から和暦「\和暦\today 」に変更します。
-\end{itemize}
-\end{document}
-\endinput
-%%
-%% End of file `japanese-sample.tex'.

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

Added: trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese.tex	2020-12-06 22:14:43 UTC (rev 57078)
@@ -0,0 +1,847 @@
+%#!lualatex
+\documentclass[lualatex,a4paper,11pt]{jlreq}
+\usepackage{luatexja-fontspec}
+\newjfontfamily{\HaraMC}[
+    FontFace = {l}{n}{*-Light},
+    FontFace = {m}{n}{*-Regular},
+    FontFace = {b}{n}{*-Bold},
+    BoldFont = {*-Bold},
+  ]{HaranoAjiMincho}
+\newjfontfamily{\HaraGT}[
+    FontFace = {m}{n}{*-Regular},
+    FontFace = {b}{n}{*-Bold},
+    FontFace = {eb}{n}{*-Heavy},
+    BoldFont = {*-Bold},
+  ]{HaranoAjiGothic}
+\newjfontfamily{\HaraMG}[
+    FontFace = {m}{n}{*-Medium},
+  ]{HaranoAjiGothic}
+
+%\usepackage{luatexja-ruby}% for kenten
+% [TODO] https://ja.osdn.net/projects/luatex-ja/ticket/41023
+% => based on okumacro.sty
+\makeatletter
+\def\kenten#1{%
+  \setbox1=\hbox to\z@{\hbox to 1\zw{\hss ・\hss}\hss}%
+  \ht1=.63\zw
+  \@kenten#1\end\relax}
+\def\@kenten#1#2{%
+  \ifx#1\end \let\next=\relax \else
+    \raise.75\zw\copy1\nobreak #1\ifx#2\end\else
+    \hskip\ltjgetparameter{kanjiskip}\relax\fi
+    \let\next=\@kenten
+  \fi\next#2}
+\makeatother
+
+%%%%%%%%%%%%%%%%
+% additional packages
+\usepackage{amsmath}
+\usepackage{array}
+\usepackage[defaultsups]{newpxtext}
+\usepackage[zerostyle=c,straightquotes]{newtxtt}
+\usepackage{newpxmath}
+\usepackage[svgnames]{xcolor}
+\usepackage[hyperfootnotes=false]{hyperref}
+\usepackage{hologo}
+\usepackage{xspace}
+
+\def\Pkg#1{\textsf{#1}}
+\def\Opt#1{\texttt{#1}}
+\def\ClsY#1{\Pkg{\textcolor{Black}{#1}}}
+\def\ClsT#1{\Pkg{\textcolor{Green}{#1}}}
+\def\ClsYT#1{\Pkg{\textcolor{Blue}{#1}}}
+\def\file#1{\textsf{#1}}
+\def\code#1{\texttt{#1}}
+
+\usepackage[japanese,english]{babel}% References in English
+
+\usepackage{listings}
+\lstset{%
+  language=[LaTeX]{TeX},
+  basicstyle={\small\ttfamily},
+  texcsstyle={*\color{blue}},
+  commentstyle={\color{Green}},
+  columns=[l]{fullflexible},
+  numbers=left,
+  xrightmargin=0\zw,
+  xleftmargin=3\zw,
+  aboveskip=3pt,
+  belowskip=3pt,
+  moretexcs={setlength,setmainfont,maketitle,RequirePackage}
+}
+
+\usepackage{shortvrb}
+\MakeShortVerb*{|}
+%%%%%%%%%%%%%%%%
+
+% foreign text -> italic
+\def\Foreign#1{\textit{#1}}
+
+% logos
+\def\eTeX{$\varepsilon$-\TeX}
+\def\pTeX{p\kern-.10em\TeX}
+\def\upTeX{u\pTeX}
+\def\epTeX{$\varepsilon$-\pTeX}
+\def\eupTeX{$\varepsilon$-\upTeX}
+\def\pLaTeX{p\LaTeX}\def\pLaTeXe{p\LaTeXe}
+\def\upLaTeX{u\pLaTeX}\def\upLaTeXe{u\pLaTeXe}
+\def\pdfTeX{\hologo{pdfTeX}}
+\def\pdfLaTeX{\hologo{pdfLaTeX}}
+\def\XeTeX{\hologo{XeTeX}}
+\def\XeLaTeX{\hologo{XeLaTeX}}
+\def\LuaTeX{\hologo{LuaTeX}}
+\def\LuaLaTeX{\hologo{LuaLaTeX}}
+
+\def\TL{\TeX\ Live\xspace}
+\def\JTDC{Japanese \TeX\ Development Community}
+
+\def\_{\leavevmode\vrule width .45em height -.2ex depth .3ex\relax}
+
+\frenchspacing
+\begin{document}
+
+\title{\textsf{\textbf{Guide to Japanese typesetting with \LaTeX}}}
+\author{\JTDC\null
+\thanks{\url{https://texjp.org},\ e-mail: \texttt{issue(at)texjp.org}}}
+\maketitle
+
+% 日本語組版は西欧言語とは全然違う
+Typesetting requirements of Japanese are completely different from
+those of Western languages, so setting parameter values and additional
+hyphenation patterns are not enough.
+
+% babel-japanese (japanese.ldf) は訳語を登録するだけ
+% 日本語組版に必要な設定は行わない
+The package \Pkg{babel-japanese} provides ``\Opt{japanese}''
+option for Babel package.
+However, it only defines translated replacement texts for
+keywords and dates (e.g. ``\contentsname'' $\rightarrow$
+``{\selectlanguage{japanese}\contentsname}'',
+\verb+\today+ $\rightarrow$ ``{\selectlanguage{japanese}\和暦\today}'')
+and it does not care about any Japanese typesetting requirements.
+
+% この文書の目的:ちゃんと日本語する簡単な方法の紹介
+%-- 日本語を「ちゃんと」組むことが西欧言語とは全く異なることを伝える。
+%-- ほんの数文字・数行の行組版だけでも組版規則が全く異なる。
+%-- ページレイアウトに関わる設定値(段落字下げ,行長,行送りなど)が
+%-- 異なるのは,想像の範囲内と思われる。
+This document describes how to get an ``acceptable'' Japanese
+typesetting result and the eminent differences between Western
+and Japanese typesetting requirements.
+
+
+% とりあえず LuaLaTeX + \usepackage{luatexja} オススメ
+\section{Short introduction: using \LuaLaTeX}
+
+To obtain a properly formatted Japanese document, the easiest way
+is to use \LuaLaTeX\ with Lua\TeX-ja package.
+
+\begin{itemize}
+  \item Using the \Pkg{jlreq} class:
+\begin{lstlisting}
+  \documentclass[book]{jlreq}
+  \begin{document}
+  \chapter{日本語の文書}% Japanese document
+  こんにちは,日本。% Hello, Japan.
+  \end{document}
+\end{lstlisting}
+    Save the above as \file{jp1.tex} and run the following command.
+\begin{verbatim}
+    $ lualatex jp1
+\end{verbatim}
+    You will get \file{jp1.pdf} which is properly formatted and
+    a Japanese font family ``HaranoAji Mincho/Gothic'' is embedded.
+ \item If you prefer classes not for Japanese,
+    you can load \Pkg{luatexja} directly:
+\begin{lstlisting}
+  \documentclass{book}
+  \usepackage{luatexja}
+  \begin{document}
+  ...
+\end{lstlisting}
+    * Note that using non-Japanese classes will lead to unnatural
+    page layouts for Japanese books, especially regarding line gaps
+    and line lengths.
+\end{itemize}
+
+
+% 他の選択肢:upLaTeX が先
+\section{Relatively stable alternative: \upLaTeX}
+
+\LuaLaTeX\ is relatively new,
+and Lua\TeX-ja is under active development.
+As a more stable alternative, you can use \upLaTeX.
+It is a somewhat legacy implementation, which requires TFM files
+for typesetting Japanese characters (called JFM).
+
+The \Pkg{jlreq} class also supports \upLaTeX, but here
+we provide an example using an relatively old class \Pkg{jsclasses},
+which has been widely used for over a decade:
+\begin{lstlisting}
+  \documentclass[uplatex]{jsbook}% or, \documentclass{ujbook}
+  \begin{document}
+  ...
+\end{lstlisting}
+Save the above as \file{jp2.tex} and run the following command.
+\begin{verbatim}
+    $ uplatex jp2
+\end{verbatim}
+You will get \file{jp2.dvi}.\bigskip
+
+\upLaTeX\ and \pLaTeX\ (explained later) are often referred to
+as (u)\pLaTeX. They always output DVI files.
+To convert DVI containing Japanese characters into PDF,
+the easiest way is to use dvipdfmx.
+If you have \file{jp2.dvi}, running the following command
+\begin{verbatim}
+    $ dvipdfmx jp2
+\end{verbatim}
+will generate \file{jp2.pdf}.\bigskip
+
+Since the default DVI driver in \TL is set to
+\Opt{dvips},\footnote{Though dvips supports DVI with Japanese fonts,
+additional settings for Ghostscript are required to convert
+the resulting PostScript file into PDF.}
+it is recommended to add a global driver option
+to be passed to all driver-dependent packages
+(e.g. \Pkg{graphicx}, \Pkg{color}, \Pkg{hyperref}):
+\begin{lstlisting}
+  \documentclass[uplatex,dvipdfmx]{jsbook}
+  \usepackage{graphicx}
+  \begin{document}
+  ...
+\end{lstlisting}
+
+
+% レガシーな pLaTeX は最後
+\section{Using legacy \pLaTeX}
+
+Some old Japanese journal classes may require \pLaTeX.
+It is a legacy implementation which was born in 1980s,
+before the release of Unicode 1.0.
+\pLaTeX\ only supports a limited character set, JIS~X~0208
+(6879 characters).
+\begin{lstlisting}
+  \documentclass{jsbook}% or, \documentclass{jbook}
+  \begin{document}
+  ...
+\end{lstlisting}
+Save the above as \file{jp3.tex} and run the following command.
+\begin{verbatim}
+    $ platex jp3
+\end{verbatim}
+You will get \file{jp3.dvi}.
+Again, the DVI file can be converted into PDF using dvipdfmx.
+
+
+% CJK package はサポート外
+\newenvironment{NOTE}{\StartNOTE\small}{\EndNOTE}
+\newcommand*{\NOTEline}[1]{%
+  \par\noindent\makebox[0pt][l]{\rule[.5ex]{\linewidth}{.4pt}}%
+  \makebox{\hspace{.05\linewidth}\rule[#1ex]{.9\linewidth}{.2pt}}\par}
+\newcommand*{\StartNOTE}{\NOTEline{.1}\nobreak}
+\newcommand*{\EndNOTE}{\nobreak\NOTEline{.9}}
+
+\begin{NOTE}
+Note for users who know the \Pkg{CJK} package:
+(u)\pLaTeX\ does \emph{not} support the \Pkg{CJK} package!
+The reasons are the followings:
+\begin{itemize}
+  \item Both the (u)\pLaTeX\ kernel and \file{CJK.sty} redefine
+    the command \verb+\selectfont+, and those definitions are
+    incompatible.
+  \item The input handling of (u)\pTeX\ engine is different
+    from that of Western \TeX\ engines, and Japanese tokens
+    are no longer treated as active characters.
+\end{itemize}
+Anyway, you will not need the \Pkg{CJK} package at all
+when using (u)\pLaTeX.
+\end{NOTE}
+
+
+%% ちゃんと日本語を組むには?
+%-- 禁則文字を除く任意箇所での行分割が可能
+%-- 和文文字直後の改行文字は空白にならない
+%-- 約物どうしの字間調整
+%-- 和欧文間空白の挿入
+\section{Differences between Western and Japanese typesetting}
+
+The sections above described some practical ways to achieve
+``acceptable'' Japanese typesetting results.
+So, what are the minimum requirements for ``acceptable'' results
+for native Japanese readers?
+
+The W3C Working Group Note ``Requirements for Japanese Text Layout''
+\cite{w3c-jlreq} is one of the comprehensive documentation which
+describes issues of text composition in the Japanese writing system.
+However, they are too complicated to explain here thoroughly,\footnote{They
+include specification of basic page layout (\Foreign{kihon-hanmen}; 基本版面),
+vertical alignment of Japanese text (\Foreign{tate-gumi}; 縦組),
+small-sized supplementary text (\Foreign{ruby}; ルビ), inline cutting note
+(\Foreign{warichu}; 割注) etc.} so we focus on the main issues regarding
+simple and short horizontal writing within a few lines.
+
+\newbox\JEXBOX % stores example output
+\newbox\JJgridbox
+\def\JJsq{%
+  \hbox to 1\zw{\hss\fboxsep=-.5\fboxrule\fbox{%
+   \hskip\dimexpr-.5\zw-.2pt\vrule width.4pt height.08\zw depth.12\zw%
+  \hskip\dimexpr.5\zw-.2pt\relax}\hss}}
+\def\JJsb{\hbox to 1\zw{\hss\fboxsep=-.5\fboxrule\fbox{%
+  ■\hskip\dimexpr-.5\zw-.2pt\vrule width.4pt height.08\zw depth.12\zw%
+  \hskip\dimexpr.5\zw-.2pt\relax}\hss}}
+\setbox\JJgridbox=\hbox to 12\zw{%
+  \JJsq\JJsq\JJsq\JJsq\JJsb\JJsq\JJsq\JJsq\JJsq\JJsb\JJsq\JJsq}
+\def\JJoutbox#1{{%
+  \ltjsetparameter{kanjiskip=0pt plus .2\zw minus .2\zw}%
+  \hbox{\textcolor{cyan}{\copy\JJgridbox}\hskip-12\zw%
+  \vbox{\hsize=12\zw\noindent\leftskip0pt\rightskip0pt\parfillskip0pt#1\hss}\vrule}%
+}}
+
+Consider the following input, Listing \ref{list:src1}. Using \LuaLaTeX,
+it is allowed to include any Unicode character out-of-the-box,
+though a suitable Japanese font should be declared.
+
+\begingroup
+\begin{figure}[tbp]
+\ltjsetparameter{kanjiskip=0pt,xkanjiskip=0pt}
+\begin{lstlisting}[caption={Example input using \LuaLaTeX},label={list:src1}]
+  %#!lualatex
+  \documentclass{article}
+  \usepackage{fontspec}
+  \setmainfont{HaranoAjiMincho-Regular}
+  \setlength{\textwidth}{250pt}
+  \setlength{\overfullrule}{5pt}
+  \begin{document}
+  \noindent
+  % first line = exactly 250pt (= 10pt x 25)
+  ◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆\\
+  改行後
+  空白が入る。日本語が連続すると改行できず、はみ出す。\\
+  句読点と、(括弧)の間隔が広い。%
+  日本語とLatinの間が空かない。
+  \end{document}
+\end{lstlisting}
+\end{figure}
+\endgroup
+
+However, the result (Figure \ref{fig:src1}) is not acceptable,
+especially for the following reasons:
+
+\begin{itemize}
+  \item Japanese text has no interword spaces, but
+    line break is allowed between any Japanese characters
+    except before some punctuation marks (\Foreign{kinsoku}; 禁則).
+    The overfull rules that appeared in Figure \ref{fig:src1} come
+    from not knowing such line breaking rules.
+  \item Similarly, it is common to insert a new line character after
+    arbitrary Japanese characters in the input source.
+    Such a new line character should not be treated as a blank space.\\
+    Wrong: \JJoutbox{改行後 空白が入る。…\hfill}\quad
+    Correct: \JJoutbox{改行後空白が入る。…\hfill}
+  \item Ordinary Japanese characters are designed to have virtual
+    full-width (\Foreign{zenkaku}) bounding box. However, spacing
+    between adjacent punctuation marks must be truncated.\\
+    Wrong: \JJoutbox{句読点と、\null (括弧)の間…\hfill}\quad
+    Correct: \JJoutbox{句読点と、(括弧)の間…\hfill}
+  \item It is preferred to insert a quarter em space (\Foreign{shibu aki})
+    between Japanese and Latin characters.\footnote{Such a space
+    is often called ``xkanjiskip'' glue in Japanese \TeX\ world.}\\
+    Wrong: \JJoutbox{日本語と\null Latin\null の間…\hfill}\quad
+    Correct: \JJoutbox{日本語とLatinの間…\hfill}
+\end{itemize}
+Figure \ref{fig:src1-mod} shows an acceptable output of the same text.
+You will see that choosing a Japanese font on Unicode-enabled engine
+is not enough for obtaining properly formatted result.
+
+All of the methods explained in the previous sections, namely
+\begin{enumerate}
+  \item \LuaLaTeX\ with Lua\TeX-ja package,
+  \item \upLaTeX,
+  \item \pLaTeX,
+\end{enumerate}
+are developed to support (most of) the requirements mentioned above,
+and their output is most likely to be acceptable.
+Therefore, we recommend to use one of those platforms.
+
+\begingroup
+\ltjsetparameter{jacharrange={-1,-2,-3,-4,-5,-6,-7,-8,-9}}
+\setmainfont{HaranoAjiMincho-Regular}
+\global\setbox\JEXBOX=\vbox{\hsize=250pt\fontsize{10pt}{12pt}\selectfont
+\setlength{\overfullrule}{5pt}\noindent
+  ◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆\\
+  改行後
+  空白が入る。日本語が連続すると改行できず、はみ出す。\\
+  句読点と、(括弧)の間隔が広い。%
+  日本語とLatinの間が空かない。}
+\endgroup
+
+\begin{figure}[tbp]
+\centering\leavevmode\fbox{\box\JEXBOX}
+\caption{Output from Listing \ref{list:src1} (not acceptable)}
+\label{fig:src1}
+\end{figure}
+
+\begingroup
+\setmainfont{HaranoAjiMincho-Regular}
+\global\setbox\JEXBOX=\vbox{\hsize=250pt\fontsize{10pt}{12pt}\selectfont
+\setlength{\overfullrule}{5pt}\noindent
+  ◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆◆\\
+  改行後
+  空白が入る。日本語が連続すると改行できず、はみ出す。\\
+  句読点と、(括弧)の間隔が広い。%
+  日本語とLatinの間が空かない。}
+\endgroup
+
+\begin{figure}[tbp]
+\centering\leavevmode\fbox{\box\JEXBOX}
+\caption{Acceptable output of the above text}
+\label{fig:src1-mod}
+\end{figure}
+
+
+%% 日本語組版における多書体化の必要性
+%-- 欧文組版で「セリフ体からのイタリック化」に相当するのは
+%-- 和文組版では「明朝体(セリフ)からのゴシック(サンセリフ)化」
+\section{Using multi-weight typefaces for Japanese typesetting}
+
+Latin font families used in Western typesetting consist of
+many typefaces:
+\begin{itemize}
+  \def\FACES{Upright, \textit{Italic},
+    \textbf{Bold}, \textbf{\textit{BoldItalic}}}
+  \item {\rmfamily Serif: \FACES}
+  \item {\sffamily Sans Serif: \FACES}
+  \item {\ttfamily Typewriter: \FACES}
+\end{itemize}
+
+In contrast, Japanese font families provide limited typefaces.
+Most Japanese font families do not provide italic or slanted shapes.
+Rather, these shapes look strange and have rarely been used in
+traditional typesetting.
+Also, there is no typewriter font; ordinary Japanese typefaces are
+inherently designed to have a fixed width.
+\begin{itemize}
+  \item {\mcfamily 明朝 (\Foreign{Mincho}; Japanese Serif)}
+  \item {\gtfamily ゴシック (\Foreign{Gothic}; Japanese Sans Serif)}
+\end{itemize}
+
+Therefore, the typeface used to emphasize in Japanese text is
+different from those often used in Western text:
+\begin{itemize}
+  \item Normal text (in upright shape) and
+    \emph{Emphasized text (in italic shape)}
+  \item 通常の文(in \Foreign{Mincho})と,
+    \emph{強調された文}(in \Foreign{Gothic})か
+    \kenten{強調された文}(with \Foreign{Kenten}; 圏点)
+\end{itemize}
+
+Most of common Japanese classes, including those used in the
+previous sections, use \Foreign{Mincho} and \Foreign{Gothic} with
+a single weight each.
+Nowadays, some multi-weight Japanese fonts are available for free,
+so using them is a good way to overcome the situation.
+The \Opt{[deluxe]} option of packages
+\Pkg{luatexja-preset} (on \LuaLaTeX) or \Pkg{otf} (on (u)\pLaTeX)
+supports maximum of 7 typefaces:
+\begin{itemize}
+  \item {\HaraMC \fontseries{l}\selectfont 細明朝,
+                 \fontseries{m}\selectfont 明朝,
+                 \fontseries{b}\selectfont 太明朝}
+                 (\Foreign{Mincho} Light, Medium and Bold)
+  \item {\HaraGT \fontseries{m}\selectfont ゴシック,
+                 \fontseries{b}\selectfont 太ゴシック,
+                 \fontseries{eb}\selectfont 極太ゴシック}
+                 (\Foreign{Gothic} Medium, Bold and Extra Bold)
+  \item {\HaraMG \fontseries{m}\selectfont 丸ゴシック}
+                 (\Foreign{Maru Gothic} Medium)\footnote{The
+    HaranoAji family used in this documentation does not provide
+    \Foreign{Maru Gothic} (rounded \Foreign{Gothic}) typefaces.}
+\end{itemize}
+With the help of these packages, you can emphasize Japanese text
+by changing to bold, instead of changing Serif to Sans Serif.
+\begin{itemize}
+  \item {\HaraMC 通常の文(in \Foreign{Mincho})と,
+    \textbf{強調された文}(in \Foreign{Mincho} Bold)}
+  \item {\HaraGT 通常の文(in \Foreign{Gothic})と,
+    \textbf{強調された文}(in \Foreign{Gothic} Bold)}
+\end{itemize}
+
+
+%% 各種文書への導線をはる
+\section{Further readings}
+
+\begin{itemize}
+  \item ``The Lua\TeX-ja package'' (\file{luatexja-en.pdf}, in English)
+    \begin{itemize}
+      \item For beginners, refer to Part I ``User's manual.''
+      \item For more interested users, refer to Part II ``Reference.''
+      \item For developers, refer to Part III ``Implementations.''
+      \item Japanese edition: \file{luatexja-ja.pdf}
+    \end{itemize}
+  \item ``Guide to \pTeX\ for developers unfamiliar with Japanese''
+        (\file{ptex-guide-en.pdf}, in English)
+    \begin{itemize}
+      \item For developers who aim to support
+        \pTeX/\pLaTeX\ and its variants \upTeX/\upLaTeX.
+    \end{itemize}
+  \item ``About \upLaTeXe''
+        (\file{uplatex-en.pdf}, in English)
+    \begin{itemize}
+      \item For users of \upLaTeX, but a somewhat legacy document.
+      \item Japanese edition: \file{uplatex-en.pdf}
+    \end{itemize}
+  \item ``About \pLaTeXe''
+        (\file{platex-en.pdf}, in English)
+    \begin{itemize}
+      \item For users of \pLaTeX, but a somewhat legacy document.
+      \item Japanese edition: \file{platex-en.pdf}
+    \end{itemize}
+  \item ``Babel-Option \Opt{japanese}''
+        (\file{babel-japanese.pdf}, in both English and Japanese)
+    \begin{itemize}
+      \item Basic introduction of \Opt{japanese} option of \Pkg{babel}.
+      \item Provides translated replacement texts for keywords and date.
+      \item Note: the translations provided by this package may not
+        become effective on most of Western classes, due to lack of
+        appropriate placeholders inside captions.
+    \end{itemize}
+\end{itemize}
+
+
+%% 日本の成果物
+\section{Japanese deliverables in \TL}
+
+There are many packages developed specially for Japanese typesetting
+in \TL; most of these are installed as part of
+\Pkg{collection-langjapanese}.
+Only a subset of these useful packages are shown below.
+For more details, please refer to individual documentation.
+
+\subsection{Document classes}
+
+Japanese text can be aligned in two directions.
+One is horizontal direction, called \Foreign{yoko-gumi} (横組),
+the other is vertical direction, called \Foreign{tate-gumi} (縦組).
+The list below shows \ClsT{\Foreign{tate} classes in green}
+and \ClsYT{\Foreign{yoko}/\Foreign{tate} classes in blue} (default is
+\Foreign{yoko}, and the class option \Opt{[tate]} switches to
+\Foreign{tate} mode).
+
+All the major frameworks for Japanese typesetting provide
+``standard classes'':
+\begin{itemize}
+  \item Lua\TeX-ja (\Pkg{luatexja} by Lua\TeX-ja project team)
+    \begin{itemize}
+      \item Bundle: \Pkg{ltjsclasses}
+         (\ClsY{ltjsarticle}, \ClsY{ltjsbook}, \ClsY{ltjsreport})
+      \item Bundle: \Pkg{ltjclasses}
+         (\ClsY{ltjarticle}, \ClsY{ltjbook}, \ClsY{ltjreport},
+          \ClsT{ltjtarticle}, \ClsT{ltjtbook}, \ClsT{ltjtreport})
+    \end{itemize}
+  \item \upLaTeX\ (\Pkg{uplatex} by \JTDC)
+    \begin{itemize}
+      \item Bundle: \Pkg{ujclasses}
+         (\ClsY{ujarticle}, \ClsY{ujbook}, \ClsY{ujreport},
+          \ClsT{utarticle}, \ClsT{utbook}, \ClsT{utreport})*
+    \end{itemize}
+  \item \pLaTeX\ (\Pkg{platex} by \JTDC)
+    \begin{itemize}
+      \item Bundle: \Pkg{jclasses}
+         (\ClsY{jarticle}, \ClsY{jbook}, \ClsY{jreport},
+          \ClsT{tarticle}, \ClsT{tbook}, \ClsT{treport})*
+    \end{itemize}
+    * Due to historical reasons, \Pkg{ujclasses} and \Pkg{jclasses}
+    are left with some inconvenient behaviors. You may need to adjust
+    some layout parameters by hand, or use other classes mentioned below.
+\end{itemize}
+
+Other major classes designed for Japanese:
+\begin{itemize}
+  \item Class: \ClsYT{jlreq} (by Noriyuki Abe)
+    \begin{itemize}
+      \item Supports \LuaLaTeX, \upLaTeX\ and \pLaTeX.
+      \item This class aims to implement
+        ``Requirements for Japanese Text Layout''
+        (JLReq, 日本語組版処理の要件, \cite{w3c-jlreq}).
+        The class file and necessary JFM (Japanese font metric) files
+        are included.
+    \end{itemize}
+  \item Bundle: \Pkg{jsclasses} (by Haruhiko Okumura \& \JTDC)
+    \begin{itemize}
+      \item Class: \ClsY{jsarticle}, \ClsY{jsbook}, \ClsY{jsreport}
+      \begin{itemize}
+        \item Supports only \upLaTeX\ (with option \Opt{[uplatex]}) and \pLaTeX.
+        \item In addition to layout adjustments, these classes use
+          newly developed JFM set (jis metrics) to avoid strange
+          behaviors of standard \pTeX\ JFM set (min10 etc).
+          For more details, please refer to \cite{ajt2008okumura}.
+        \item Note: when font size other than 10pt is specified,
+          the engine primitive \verb+\mag+ is employed.
+          Conflicts with other packages can lead to inconsistent
+          results in graphics and/or page size.
+          To avoid this, specify \Opt{nomag} or \Opt{nomag*} option.
+      \end{itemize}
+    \end{itemize}
+\end{itemize}
+
+\subsection{Packages}
+
+\begin{itemize}
+  \item Package: \Pkg{plautopatch} (by Hironobu Yamashita)
+    \begin{itemize}
+      \item Supports \upLaTeX\ and \pLaTeX, but
+        does no harm on other \LaTeX\ (silently ignored).
+      \item (u)\pLaTeX\ users are recommended to load this package
+        \emph{always}, to resolve errors and incompatibilities with
+        Western \LaTeX\ packages which are not aware of (u)\pLaTeX.
+    \end{itemize}
+  \item Package: \Pkg{pxchfon} (by Takayuki Yato)
+    \begin{itemize}
+      \item Supports \upLaTeX\ and \pLaTeX.
+      \item Helps users to declate physical fonts embedded in
+        dvipdfmx's PDF output. It utilizes
+        \verb+\special{pdf:mapline}+ or
+        \verb+\special{pdf:mapfile}+ syntaxes.
+    \end{itemize}
+  \item Package: \Pkg{otf}
+    (\Pkg{japanese-otf}, \Pkg{japanese-otf-uptex} by Shuzaburo Saito \& TTK)
+    \begin{itemize}
+      \item Supports only \upLaTeX\ (with option \Opt{[uplatex]}) and \pLaTeX.
+      \item Main feature 1: allows switching between seven different
+        typefaces, compared to the standard of two typefaces.
+        This function is realized by shipping seven ``logical fonts''
+        (= set of a JFM and a virtual font).
+      \item Main feature 2: provides commands for outputting
+        many characters by specifying Unicode (\verb+\UTF{....}+)
+        or Adobe CID (\verb+\CID{....}+), even with \pLaTeX.
+        This function is realized by mapping a huge real font from
+        lots of smaller subset virtual fonts.
+        A series of shorthand commands (\verb+\aj...+) are
+        also available.
+      \item Lua\TeX-ja provides \Pkg{luatexja-otf} to partially emulate
+        feature 2 of this package.
+    \end{itemize}
+\end{itemize}
+
+\subsection{Other support files}
+
+\begin{itemize}
+  \item \Pkg{ptex-fontmaps}
+    \begin{itemize}
+      \item Provides map files to be used with dvipdfmx and dvips.
+      \item To customize Japanese fonts to be used in the output,
+        please use the command \code{kanji-config-updmap}.
+    \end{itemize}
+  \item \Pkg{cjk-gs-integrate}
+    \begin{itemize}
+      \item Supports easy configuration of Ghostscript for
+        CJK (Chinese, Japanese and Korean) fonts, which is
+        necessary for processing of PostScript file output from dvips.
+    \end{itemize}
+\end{itemize}
+
+
+%% 参考文献
+\begin{thebibliography}{99}
+  \bibitem{w3c-jlreq}
+    W3C Working Group,
+    \newblock ``{\em Requirements for Japanese Text Layout}''.\\
+    \url{https://www.w3.org/TR/jlreq/?lang=en}
+  \bibitem{ajt2008okumura}
+    Haruhiko Okumura,
+    \newblock ``{\em \pTeX\ and Japanese Typesetting}''.
+    \newblock The Asian Journal of \TeX, Volume~2, No.~1, 2008.\\
+    \url{http://ajt.ktug.org/2008/0201okumura.pdf}
+\end{thebibliography}
+
+
+\clearpage
+\appendix
+
+\section{Examples of acceptable Japanese typesetting results}
+
+\subsection{A simple Japanese document}
+
+Using \LuaLaTeX:
+\begin{lstlisting}
+  \documentclass[book]{jlreq}
+  \begin{document}
+  \chapter{日本語がメインのシンプルな文書}
+  こんにちは,日本語に少しEnglishを含めてみます。
+  \end{document}
+\end{lstlisting}
+
+Using \upLaTeX\ (or \pLaTeX) + dvipdfmx:
+\begin{lstlisting}
+  \RequirePackage{plautopatch}% recommended
+  \documentclass[book,dvipdfmx]{jlreq}% driver option
+  \begin{document}
+  \chapter{日本語がメインのシンプルな文書}
+  こんにちは,日本語に少しEnglishを含めてみます。
+  \end{document}
+\end{lstlisting}
+
+Using \pdfLaTeX\ or \XeLaTeX:
+though they have only limited Japanese typesetting capabilities,
+\ClsY{bxjsbook} (from \Pkg{bxjscls} bundle by Takayuki Yato)
+aims to emulate \Pkg{jsclasses} as much as possible.
+Due to technical constraints, manual adjustments are often
+required in the input.\footnote{\pdfTeX\ and \XeTeX\ cannot
+insert a quarter em space (\Foreign{shibu aki}) automatically, so
+the active character \code{\~} is redefined to a macro to
+insert it manually.}
+\begin{lstlisting}
+  \documentclass[pdflatex,ja=standard]{bxjsbook}
+  %\documentclass[xelatex,ja=standard]{bxjsbook}
+  \begin{document}
+  \chapter{日本語がメインのシンプルな文書}
+  こんにちは,日本語に少し~English~を含めてみます。
+  \end{document}
+\end{lstlisting}
+
+\subsection{Changing Japanese fonts}
+
+The default Japanese font family is ``HaranoAji Mincho/Gothic''
+which is derived from Source Han (or Noto) fonts.
+Suppose you want to switch to ``IPAex Mincho/Gothic'' ...
+
+Using \LuaLaTeX:
+\begin{lstlisting}
+  \documentclass[book]{jlreq}
+  \usepackage[ipaex]{luatexja-preset}% pre-defined
+  ...
+\end{lstlisting}
+
+Using \upLaTeX\ (or \pLaTeX) + dvipdfmx:
+\begin{lstlisting}
+  \RequirePackage{plautopatch}% recommended
+  \documentclass[book,dvipdfmx]{jlreq}% driver option
+  \usepackage[ipaex]{pxchfon}% pre-defined
+  ...
+\end{lstlisting}
+
+\subsection{More typefaces}
+
+Using \LuaLaTeX:
+\begin{lstlisting}
+  \documentclass[article]{jlreq}
+  \usepackage{jlreq-deluxe}% multi weight
+  \begin{document}
+  \section{簡単な文章}
+  通常のテキストにはSerifと明朝体を使います。
+  \textbf{太字も使うことができます。}
+  \textsf{Sans Serifにはゴシック体が似合います。
+  \textbf{太字にも対応します。}}
+  \end{document}
+\end{lstlisting}
+
+If you are using \LuaLaTeX\ with classes other than \Pkg{jlreq},
+you can also use \Pkg{luatexja-preset}:
+\begin{lstlisting}
+  \documentclass{ltjsarticle}
+  \usepackage[deluxe]{luatexja-preset}% multi weight
+  \begin{document}
+  ...
+\end{lstlisting}
+
+Using \upLaTeX\ (or \pLaTeX) + dvipdfmx:
+\begin{lstlisting}
+  \documentclass[article,dvipdfmx]{jlreq}% driver option
+  \usepackage{jlreq-deluxe}% multi weight
+  \begin{document}
+  ...
+\end{lstlisting}
+
+The package \Pkg{jlreq-deluxe} is relatively new, and it is
+designed to be used with the \Pkg{jlreq} class.
+Traditionally the \Pkg{otf} package has been widely used
+for over a decade.
+
+Using \upLaTeX\ + dvipdfmx:
+\begin{lstlisting}
+  \documentclass[uplatex,dvipdfmx]{jsarticle}
+  \usepackage[deluxe]{otf}% multi weight
+  \begin{document}
+  ...
+\end{lstlisting}
+
+Using \pLaTeX\ + dvipdfmx:
+\begin{lstlisting}
+  \documentclass[dvipdfmx]{jsarticle}
+  \usepackage[deluxe]{otf}% multi weight
+  \begin{document}
+  ...
+\end{lstlisting}
+
+
+\subsection{Vertical writing}
+
+As a Japanese version of \Pkg{lipsum}, here we use
+\Pkg{bxjalipsum}. It provides several sample texts.
+
+Using \LuaLaTeX:
+\begin{lstlisting}
+  \documentclass[article,tate]{jlreq}
+  \usepackage{bxjalipsum}
+  \begin{document}
+  \title{吾輩は猫である}% I Am A Cat
+  \author{夏目漱石}% Natsume Soseki
+  \maketitle
+  \jalipsum{wagahai}% 吾輩は猫である。名前… (33 paragraphs)
+  \end{document}
+\end{lstlisting}
+
+Using \upLaTeX\ (or \pLaTeX) + dvipdfmx:
+\begin{lstlisting}
+  \documentclass[article,tate,dvipdfmx]{jlreq}% driver option
+  \usepackage{bxjalipsum}
+  \begin{document}
+  % The preamble of the Constitution of Japan
+  \jalipsum{preamble}% 日本国民は、正当に選… (4 paragraphs)
+  \end{document}
+\end{lstlisting}
+
+\subsection{Beamer with Japanese}
+
+Note that the class \Pkg{beamer} is not designed for Japanese.
+% https://qiita.com/zr_tex8r/items/69e8cc32038ff29f5ac3
+% update: \usepackage{pxjahyper} -> supported by plautopatch
+
+Using \LuaLaTeX:\footnote{Since \Pkg{hyperref} 2020-08-14 v7.00f,
+the option \Opt{unicode} is enabled by default, so the explicit
+option is already redundant.}
+\begin{lstlisting}
+  \documentclass[unicode,12pt]{beamer}% ensure unicode for hyperref
+  \usepackage{luatexja}% for Japanese
+  \renewcommand{\kanjifamilydefault}{\gtdefault}% sans-serif also for Japanese
+  \usetheme{Copenhagen}% as you like!
+  \begin{document}
+  \section{日本語のサンプル}
+  \begin{frame}{日本語でBeamerを使う}
+  こんにちは,日本語に少しEnglishを含めてみます。
+  \end{frame}
+  \end{document}
+\end{lstlisting}
+
+Using \upLaTeX\ + dvipdfmx:
+% based on pLaTeX settings
+\begin{lstlisting}
+  \RequirePackage{plautopatch}% loads (at least) the pxjahyper package
+  \documentclass[dvipdfmx,12pt]{beamer}% driver option
+  \usepackage{bxdpx-beamer}% additional settings for dvipdfmx
+  \renewcommand{\kanjifamilydefault}{\gtdefault}% sans-serif also for Japanese
+  ...
+\end{lstlisting}
+
+Using \pLaTeX\ + dvipdfmx:
+\begin{lstlisting}
+  \RequirePackage{plautopatch}% loads (at least) the pxjahyper package
+  \documentclass[dvipdfmx,12pt]{beamer}% driver option
+  \usepackage{bxdpx-beamer}% additional settings for dvipdfmx
+  \usepackage{minijs}% avoid pTeX's standard JFM (min10 etc.)
+  \renewcommand{\kanjifamilydefault}{\gtdefault}% sans-serif also for Japanese
+  ...
+\end{lstlisting}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/generic/babel-japanese/Makefile
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-japanese/Makefile	2020-12-06 16:05:32 UTC (rev 57077)
+++ trunk/Master/texmf-dist/source/generic/babel-japanese/Makefile	2020-12-06 22:14:43 UTC (rev 57078)
@@ -1,23 +1,30 @@
 # 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
+STRIPTARGET = japanese.ldf babel-japanese-sample.tex
+PDFTARGET = babel-japanese.pdf babel-japanese-sample.pdf \
+	japanese.pdf
+DVITARGET = babel-japanese.dvi babel-japanese-sample.dvi
+KANJI = -kanji=utf8
+FONTMAP = -f haranoaji.map -f ptex-haranoaji.map
+TEXMF = $(shell kpsewhich -var-value=TEXMFHOME)
 
 default: $(STRIPTARGET) $(DVITARGET)
 strip: $(STRIPTARGET)
 all: $(STRIPTARGET) $(PDFTARGET)
 
-japanese.ldf: japanese.dtx
-	platex $(KANJI) japanese.ins
+japanese.ldf: babel-japanese.dtx
+	platex $(KANJI) babel-japanese.ins
 
-japanese.dvi: japanese.dtx
-	platex $(KANJI) japanese.dtx
-	platex $(KANJI) japanese.dtx
+babel-japanese.dvi: babel-japanese.dtx
+	platex $(KANJI) babel-japanese.dtx
+	platex $(KANJI) babel-japanese.dtx
 
+japanese.pdf: japanese.tex
+	lualatex japanese.tex
+	lualatex japanese.tex
+	lualatex japanese.tex
+
 .SUFFIXES: .tex .dvi .pdf
 .tex.dvi:
 	platex $(KANJI) $<
@@ -27,6 +34,7 @@
 
 .PHONY: clean
 clean:
-	rm -f \
-	japanese.ldf japanese-sample.tex \
-	japanese.pdf japanese-sample.pdf
+	rm -f *.aux *.log *.out *.toc \
+	japanese.ldf \
+	babel-japanese-sample.tex \
+	*.dvi *.pdf

Added: trunk/Master/texmf-dist/source/generic/babel-japanese/babel-japanese.dtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-japanese/babel-japanese.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/generic/babel-japanese/babel-japanese.dtx	2020-12-06 22:14:43 UTC (rev 57078)
@@ -0,0 +1,559 @@
+% \iffalse meta-comment
+%
+% This file is part of the `japanese' package,
+% providing Japanese language support for Babel.
+%
+% Copyright (C) 1999--2007 by ING (Toru INAGAKI)
+%               2016--2020 by Japanese TeX Development Community
+%
+% \fi
+%
+% ^^A  Ensure UTF-8 input encoding for pLaTeX
+% ^^A  (effective since e-pTeX 20160201, thus TeX Live 2016)
+\ifx\epTeXinputencoding\undefined\else
+  \epTeXinputencoding utf8
+\fi
+%
+%\iffalse
+%    Tell the \LaTeX\ system who we are and write an entry on the
+%    transcript.
+%<*dtx>
+\ProvidesFile{babel-japanese.dtx}
+%</dtx>
+%<code>\ProvidesLanguage{japanese}
+%<*!sample>
+%\ProvidesFile{babel-japanese.dtx}
+        [2020/12/06 v3.0 Japanese support for babel (texjporg)]
+%</!sample>
+%\fi
+%
+%\iffalse
+%
+%<*filedriver>
+\ifx\directlua\undefined
+  \documentclass{jltxdoc}
+  \usepackage{minijs}
+\else
+  \documentclass{ltjltxdoc}
+\fi
+\usepackage[japanese]{babel}% load it
+\GetFileInfo{babel-japanese.dtx}
+\setcounter{StandardModuleDepth}{1}
+\CodelineNumbered
+\MakeShortVerb{\|}
+\OnlyDescription
+\newcommand*\babel{\textsf{babel}}
+\newcommand*\langvar{$\langle \it lang \rangle$}
+\usepackage{hologo}% for XeLaTeX logo
+\def\pTeX{p\kern-.15em\TeX}
+\def\pdfTeX{\hologo{pdfTeX}}
+\def\XeTeX{\hologo{XeTeX}}
+\def\LuaTeX{\hologo{LuaTeX}}
+\def\pdfLaTeX{\hologo{pdfLaTeX}}
+\def\XeLaTeX{\hologo{XeLaTeX}}
+\def\LuaLaTeX{\hologo{LuaLaTeX}}
+\def\pLaTeX{p\hologo{LaTeX}}
+\def\upLaTeX{up\hologo{LaTeX}}
+\begin{document}
+  \DocInput{babel-japanese.dtx}
+\end{document}
+%</filedriver>
+%
+%\fi
+%
+% \title{Babel-Option {\sffamily japanese} version \fileversion}
+% \author{\copyright\ 1999--2007 ING\\
+%                     2016--2020 Japanese \TeX\ Development Community}
+% \date{\filedate}
+% \maketitle
+% \baselineskip=14pt
+%
+% \section*{The Japanese language definition file}
+%
+% The package ``babel-japanese'' provides ``\texttt{japanese}''
+% option for Babel package.
+%
+% \begin{itemize}
+%  \def\textbf#1{{\fontseries{b}\selectfont #1}}
+%  \def\repl#1{``\nobreak#1\nobreak''}
+%  \item \textbf{This package provides only translated
+%     replacement texts for caption keywords and date}
+%     (e.g. \repl{Table of contents} $\rightarrow$ \repl{目次},
+%           \verb+\today+ $\rightarrow$ \repl{\和暦\today}).
+%     \textbf{To display such Japanese terms correctly,
+%     you will need to select a proper Japanese font
+%     and set up Japanese typesetting rules beforehand.}
+%     This is because typesetting requirements of Japanese
+%     (including line breaking and spacing) are completely
+%     different from those of Western languages, so setting
+%     parameter values and additional hyphenation patterns
+%     are not enough. You may need to enable some engine
+%     extensions (\pTeX\ family) or use extensive package
+%     with Japanese support (Lua\TeX-ja).
+%     Please refer to \file{japanese.pdf} for detail.
+%  \item Moreover, \textbf{the translations provided by
+%     this package are \emph{incomplete} either}:
+%     to make full use of this package, you will need some
+%     common Japanese classes.\footnote{e.g.
+%       (u)jclasses or jsclasses for (u)\pLaTeX,
+%       ltj(s)classes for \LuaLaTeX\ with Lua\TeX-ja package.}
+%     This is due to the following reasons:
+%   \begin{itemize}
+%    \item The word order in Japanese is sometimes different
+%     from that in most Western languages
+%     (e.g. ``Part 1'' $\rightarrow$ ``第1部'').
+%    \item Common Western classes (article.cls etc)
+%     provide placeholders in front of the numbering
+%     (e.g. \cs{chaptername}), but lack any placeholders
+%     behind the numbering.\footnote{Starting from
+%     Babel v3.48 (2020-09-01), a new feature to adjust
+%     e.g. chapter format to have placeholders like
+%     \cs{prechaptername} ... \cs{postchaptername} is
+%     going to be added. However, it's still tentative so
+%     currently unused in \file{japanese.ldf}.}
+%     Therefore, the keywords like ``Part'' or ``Chapter''
+%     cannot be simply replaced with Japanese counterpart.
+%   \end{itemize}
+% \end{itemize}
+%
+% The importance of this package is to ``restore'' Japanese
+% keywords which have been defined by Japanese classes
+% but (partially) redefined by other languages while
+% the main text is in Japanese. Example usage:
+%\begin{verbatim}
+% \documentclass{jbook}
+% \usepackage[german,english,japanese]{babel}
+%\end{verbatim}
+%
+% \section*{Babel日本語定義ファイル}
+%
+% \file{japanese}パッケージは,
+% 日本語による見出し語と日付を出力するためのマクロを
+% 定義しています。\babel のオプションの最後で日本語を指定します。
+% \begin{quote}
+% |\usepackage[...,japanese]{babel}|
+% \end{quote}
+%
+% バージョンv2.0以降では,\pTeX{}系(\pLaTeX{},\upLaTeX{})に加えて,
+% ネイティブUnicodeなエンジン(\XeTeX{},\LuaTeX{})もサポートしました。
+% また,バージョンv3.0以降では\pdfLaTeX{}でも動作します。
+% このため,ファイルはUTF-8エンコーディングで保存するようにしてください。
+%
+% 2016年以降,本パッケージのメンテナンスは日本語\TeX{}開発コミュニティ
+% (Japanese \TeX\ Development Community)によって行われています。開発版は
+% GitHubリポジトリ
+%\begin{verbatim}
+%      https://github.com/texjporg/babel-japanese
+%\end{verbatim}
+% にあります。バグ報告は上記のリポジトリ,またはIssue Mailing List
+%\begin{verbatim}
+%      issue at texjp.org
+%\end{verbatim}
+% までお願いします。
+%
+%
+% \section{この文書について}
+%
+% このソースコード説明書(\jobname.pdf)自体は
+% \pLaTeX{},\upLaTeX{},\LuaLaTeX{}で処理できるようになっています。
+%
+%
+% \section{コード}
+%
+% [2020-11-27] エンジン検査は削除しました。
+% ^^A \pTeX{}系(\pLaTeX{},\upLaTeX{})でなく,
+% ^^A かつUnicodeな\TeX{}(\XeLaTeX{},
+% ^^A \LuaLaTeX{})でもない場合は,最初にエラーを出します。
+%
+%    \begin{macrocode}
+%<*code>
+%\ifx\kanjiskip\@undefined\ifx\Umathcode\@undefined
+%  \@latex at error{Option '\CurrentOption' requires
+%                one of the followings:\MessageBreak
+%                pTeX, upTeX, XeTeX, LuaTeX\MessageBreak
+%                It seems you are running unsupported engine!}\@ehc
+%\fi\fi
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\LdfInit\CurrentOption{captions\CurrentOption}
+%    \end{macrocode}
+%
+% \DescribeMacro{\l at japanese}
+% ここでは|\l at japanese|が定義されているか否かを判断し,定義されていれば
+% 日本語用ハイフネーションパターンを読み込みます。
+% \DescribeMacro{\adddialect}
+% しかし,日本語にはハイフネーションパタンが存在しないので
+% |\adddialect|に|\l at japanese|を代入し,\file{language.dat}
+% で最初に指定した言語(言語番号0,通常は英語)のハイフネーションパターンを
+% 使用します。
+%
+% [2016-12-16] 旧バージョン(v1.3)では
+%\begin{quote}\small\begin{verbatim}
+% Package babel Warning: No hyphenation patterns were loaded for
+% (babel)                the language `Japanese'
+% (babel)                I will use the patterns loaded for \language=0
+%                        instead.
+%\end{verbatim}\end{quote}
+% という警告が出るのを無視する方針でしたが,新しい\babel では警告が
+% よりうるさくなっていました。
+%\begin{quote}\small\begin{verbatim}
+% Package babel Warning: No hyphenation patterns were preloaded for
+% (babel)                the language `Japanese' into the format.
+% (babel)                Please, configure your TeX system to add them and
+% (babel)                rebuild the format. Now I will use the patterns
+% (babel)                preloaded for english instead on input line 47.
+%\end{verbatim}\end{quote}
+% そこで,新しいバージョン(v2.0)からは警告を出さないことにして,代わりに
+% ログファイルにのみInfoを出力します。
+%
+%    \begin{macrocode}
+\ifx\l at japanese\@undefined
+%  \@nopatterns{Japanese}% comment out (2016-12-16)
+  \PackageInfo{babel}{%
+    No hyphenation patterns are available for Japanese,\MessageBreak
+    so I will use the patterns preloaded for \bbl at nulllanguage\MessageBreak
+    instead}
+  \adddialect\l at japanese0\fi
+%    \end{macrocode}
+%
+% \DescribeMacro{\captionsjapanese}
+% |\captionsjapanese|マクロは\pLaTeX{}の標準のクラスファイルで使われる
+% 見出し語を日本語で出力します。\LaTeX{}の標準のクラスファイルでも動作
+% しますが,元が英語用ですので,語順の関係上すべてを日本語化することは
+% できません(たとえば,Part 1→第1部とは変更することは不可能です)。
+%
+% [2016-12-15] 「証明」と「用語集」も日本語化するようにしました。
+% |\postpartname| がタイポで |\postpartnam| になっていたのを直しました。
+%
+% UTF-8エンコーディングで直接和文文字を記述します。
+%    \begin{macrocode}
+\def\bbl at jpn@prefacename{前書き}%
+\def\bbl at jpn@refname{参考文献}%
+\def\bbl at jpn@abstractname{概要}%
+\def\bbl at jpn@bibname{参考文献}%
+%\def\bbl at jpn@chaptername{Chapter}%
+\def\bbl at jpn@prechaptername{第}%    -- added
+\def\bbl at jpn@postchaptername{章}%   -- added
+\def\bbl at jpn@presectionname{}%  第  -- added
+\def\bbl at jpn@postsectionname{}% 節  -- added
+\def\bbl at jpn@appendixname{付録}%
+\def\bbl at jpn@contentsname{目次}%
+\def\bbl at jpn@listfigurename{図目次}%
+\def\bbl at jpn@listtablename{表目次}%
+\def\bbl at jpn@indexname{索引}%
+\def\bbl at jpn@figurename{図}%
+\def\bbl at jpn@tablename{表}%
+%\def\bbl at jpn@partname{Part}%
+\def\bbl at jpn@prepartname{第}%       -- added
+\def\bbl at jpn@postpartname{部}%      -- added
+%\def\bbl at jpn@enclname{encl}%     同封物
+%\def\bbl at jpn@ccname{cc}%         Cc
+%\def\bbl at jpn@headtoname{To}%     To(宛先)
+%\def\bbl at jpn@pagename{Page}%     ページ
+%\def\bbl at jpn@seename{see}%       参照
+%\def\bbl at jpn@alsoname{see also}% も参照
+\def\bbl at jpn@proofname{証明}%
+\def\bbl at jpn@glossaryname{用語集}%
+%    \end{macrocode}
+%
+% 実際の命令にこれらをコピーします。
+%    \begin{macrocode}
+\@namedef{captions\CurrentOption}{%
+  \let\prefacename\bbl at jpn@prefacename
+  \let\refname\bbl at jpn@refname
+  \let\abstractname\bbl at jpn@abstractname
+  \let\bibname\bbl at jpn@bibname
+  %\def\chaptername{Chapter}%
+  \let\prechaptername\bbl at jpn@prechaptername   % -- added
+  \let\postchaptername\bbl at jpn@postchaptername % -- added
+  \let\presectionname\bbl at jpn@presectionname   % -- added
+  \let\postsectionname\bbl at jpn@postsectionname % -- added
+  \let\appendixname\bbl at jpn@appendixname
+  \let\contentsname\bbl at jpn@contentsname
+  \let\listfigurename\bbl at jpn@listfigurename
+  \let\listtablename\bbl at jpn@listtablename
+  \let\indexname\bbl at jpn@indexname
+  \let\figurename\bbl at jpn@figurename
+  \let\tablename\bbl at jpn@tablename
+  %\def\partname{Part}%
+  \let\prepartname\bbl at jpn@prepartname   % -- added
+  \let\postpartname\bbl at jpn@postpartname % -- added
+  %\def\enclname{encl}%     同封物
+  %\def\ccname{cc}%         Cc
+  %\def\headtoname{To}%     To(宛先)
+  %\def\pagename{Page}%     ページ
+  %\def\seename{see}%       参照
+  %\def\alsoname{see also}% も参照
+  \let\proofname\bbl at jpn@proofname
+  \let\glossaryname\bbl at jpn@glossaryname
+  }
+%    \end{macrocode}
+%
+% \DescribeMacro{\datejapanese}
+% |\datejapanese|マクロは日本語で日付を出力するように |\today|コマンドを
+% 再定義します。デフォルトの出力は西暦です。和暦を使用する際は,プリアンブルで 
+% |\和暦| を指定するか,本文で |\和暦\today| のように指定します。
+%
+% フラグの準備。
+%    \begin{macrocode}
+\newif\ifbbl at jpn@Seireki \bbl at jpn@Seirekitrue
+%    \end{macrocode}
+%
+% UTF-8エンコーディングで直接和文文字を記述します。
+% \pdfLaTeX{}や\XeLaTeX{}の場合は
+% |\bbl at jpn@Tate...| の2つは実際には使いません。
+%    \begin{macrocode}
+\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@gengo\bbl at jpn@maybekansuji\bbl at jpn@gengoyear 年%
+    \bbl at jpn@maybekansuji\month 月%
+    \bbl at jpn@maybekansuji\day 日}
+\def\bbl at jpn@SeirekiToday{%
+    \number\year 年%
+    \number\month 月%
+    \number\day 日}
+\def\bbl at jpn@WarekiToday{%
+    \bbl at jpn@gengo\number\bbl at jpn@gengoyear 年%
+    \number\month 月%
+    \number\day 日}
+%    \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)\pLaTeX{}とLua\TeX-jaで組方向判定方法が異なるため,
+% |\catcode| のトリックで別々のコードを使い分けます。
+% \pdfLaTeX{}や\XeLaTeX{}の場合,および\LuaLaTeX{}で
+% Lua\TeX-ja不使用の場合は,縦組をサポートしません。
+%    \begin{macrocode}
+\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
+\ifx\directlua\@undefined
+  \ifx\kanjiskip\@undefined       % pdftex/xetex
+    \catcode`\L=14\relax
+    \catcode`\P=14\relax
+    \catcode`\X=14\relax
+  \else                           % ptex/uptex
+    \catcode`\L=14\relax
+    \catcode`\P=9\relax
+    \catcode`\X=9\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
+%    \end{macrocode}
+%
+% 実際に使用する命令にコピーします。
+%
+% [2019-04-03] 縦数式ディレクションは横組と同じ出力とします。
+%    \begin{macrocode}
+\@namedef{date\CurrentOption}{%
+  \def\today{{%
+P   \ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi % 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
+X   \else
+      \ifbbl at jpn@Seireki
+        \bbl at jpn@SeirekiToday
+      \else
+        \bbl at jpn@WarekiToday
+      \fi
+X   \fi
+  }}%
+}
+%    \end{macrocode}
+%
+% [2017-02-05] 新機能:|\languageattribute{japanese}{kansujitoday}|を指定すると,
+% 縦書きでは |\today| の表記が漢数字(例:二〇一六年一二月二八日)になります。
+%    \begin{macrocode}
+\let\bbl at jpn@maybekansuji\number
+\bbl at declare@ttribute{japanese}{kansujitoday}{\let\bbl at jpn@maybekansuji\kansuji}
+%    \end{macrocode}
+%
+% トリックに使用した文字の |\catcode| を元に戻します。
+%    \begin{macrocode}
+\catcode`\L=\bbl at jpn@l at catcode\relax
+\catcode`\P=\bbl at jpn@p at catcode\relax
+\catcode`\X=\bbl at jpn@x at catcode\relax
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\@namedef{extras\CurrentOption}{}
+\@namedef{noextras\CurrentOption}{}
+\ldf at finish\CurrentOption
+%</code>
+%    \end{macrocode}
+%
+% \section*{謝辞}
+%
+% Babel-Option \Lopt{japanese}の作成に当って,バグフィックスや改良案を
+% ご提案いただいた方に感謝します。
+% bookworm $<$BYV01204$>$さんから,新しい言語を定義し,それに固有の
+% 言語番号を付けるマクロ \verb+\addlanguage+の機能について,詳しい
+% 解説をいただきました。本パッケージでは採用していませんが,\babel
+% の言語切り替え機能を理解する上でたいへん参考になりました。
+% Tony $<$PAG01322$>$さんから,キャプションと日付の定義について
+% ご提案をいただきました。
+% 大石勝 $<$DZH00446$>$さんから,初版に含まれていた \verb+\ifx\undefined+
+% のバグをご指摘いただきました。
+%
+% \section*{変更履歴}
+% \begin{itemize}
+% \item 2005年2月:日付の定義を修正しました。
+% \item 2007年10月:ZRさんからいただいた詳細なご指摘をもとに修正しました。\\
+% \verb|http://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/48625.html|
+% \item 2007年12月:ZRさん,ttkさんからいただいたご指摘を反映しました。
+% \item 2016年12月:日本語\TeX{}開発コミュニティが開発を引き継ぎました。
+%   以降の変更履歴は本文中に直接書いてあります。
+% \item 2020年12月:冒頭のドキュメントを英語にしました。
+%   また,このドキュメントを\file{japanese.pdf}から
+%   \file{babel-japanese.pdf}にリネームし,新たに「ちゃんと日本語
+%   する方法」を概説する新版\file{japanese.pdf}を追加しました。
+% \end{itemize}
+%
+% \StopEventually{}
+%
+%    \begin{macrocode}
+%<*sample>
+\ifx\directlua\undefined
+ \ifx\kanjiskip\undefined
+  \ifx\XeTeXversion\undefined
+    % pdfLaTeX: not beautiful
+    \documentclass{book}
+    \usepackage[whole]{bxcjkjatype}
+  \else
+    % XeLaTeX: not beautiful
+    \documentclass{book}
+    \usepackage{zxjatype}
+    \setCJKmainfont{ipaexm.ttf}
+  \fi
+ \else
+  \ifx\ucs\undefined
+    % pLaTeX: OK
+    \documentclass{jbook}
+    \usepackage{minijs}
+  \else
+    % upLaTeX: OK
+    \documentclass{ujbook}
+  \fi
+ \fi
+\else
+    % LuaLaTeX: OK
+    \documentclass{ltjbook}
+\fi
+\usepackage[german,english,japanese]{babel}
+\makeatletter
+\def\tbcaption{\def\@captype{table}\caption{キャプションの例}}
+\def\fgcaption{\def\@captype{figure}\caption{キャプションの例}}
+\makeatother
+\def\yes{--- はい。}
+\def\no{--- いいえ。}
+\def\TEXT{Textverarbeitung mit einem Rechner kann in vielf\"altiger Weise
+erfolgen. Eigenschaften und Leistungsf\"ahigkeit sind hierbei weniger
+vom jeweiligen Rechnertype, sondern vielmehr vom verwendeten
+\textit{Textverarbeitungsprogramm} bestimmt.}
+\def\se{\selectlanguage{english}}
+\def\sj{\selectlanguage{japanese}}
+\def\sg{\selectlanguage{german}}
+\setlength{\hoffset}{-13mm}
+\setlength{\textwidth}{16cm}
+\begin{document}
+
+\chapter{babel}
+\section{japaneseパッケージ}
+japaneseパッケージは日本語による見出し語と日付を出力するためのマクロを
+定義しています。
+
+\fgcaption
+
+\begin{itemize}
+\se
+\item ここで英語(\texttt{english})に変更します。
+(languageの値は\the\language)
+
+\TEXT
+
+ここは英語? \iflanguage{english}{\yes}{\no}\par
+ここはドイツ語? \iflanguage{german}{\yes}{\no}\par
+ここは日本語? \iflanguage{japanese}{\yes}{\no}
+
+※ \verb:\adddialect\l at japanese0: と設定しているため,
+日本語?も「はい」となります。
+
+\sg
+\item ここでドイツ語(\texttt{german})に変更します。
+(languageの値は\the\language)
+
+\TEXT
+
+ここは英語? \iflanguage{english}{\yes}{\no}\par
+ここはドイツ語? \iflanguage{german}{\yes}{\no}\par
+ここは日本語? \iflanguage{japanese}{\yes}{\no}
+
+※ ハイフネーションがドイツ語―旧正書法―に切り替わっている点に注目。
+なお,新正書法(\texttt{ngerman})では
+\texttt{Leis-tungs-f\"a-hig-keit}のように分綴します。
+
+\sj
+\item ここで日本語(\texttt{japanese})に変更します。
+(languageの値は\the\language)
+\tbcaption
+\item \verb:\和暦: は日付の表示をデフォルトの西暦「\today 」から
+和暦「\和暦\today 」に変更します。
+\end{itemize}
+\end{document}
+%</sample>
+%    \end{macrocode>
+%
+% \Finale
+%
+\endinput


Property changes on: trunk/Master/texmf-dist/source/generic/babel-japanese/babel-japanese.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/generic/babel-japanese/babel-japanese.ins
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-japanese/babel-japanese.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/generic/babel-japanese/babel-japanese.ins	2020-12-06 22:14:43 UTC (rev 57078)
@@ -0,0 +1,51 @@
+%% japanese.ins
+%%
+%% Docstrip installation instruction file
+%% for the `japanese' package (Japanese support for Babel)
+%%
+%%
+
+\def\batchfile{babel-japanese.ins}
+\input docstrip.tex
+
+\expandafter\ifx\csname declarepreamble\endcsname\relax
+  \Msg{==> This file requires docstrip version 2.4 or later}
+  \Msg{}\expandafter\endinput\fi
+
+\keepsilent
+
+\preamble
+
+This file is part of the `japanese' package,
+providing Japanese language support for Babel.
+
+Copyright (C) 1999--2007 by ING (Toru INAGAKI)
+              2016--2020 by Japanese TeX Development Community
+
+This package is free software that can be redistributed and/or
+modified under the terms of the LaTeX Project Public License.
+
+Previous version of this work was written by ING, based on ideas
+from bookworm, Tony and Ohishi.
+Current maintainer is Japanese TeX Development Community.
+
+Please report errors to
+  Japanese TeX Development Community Issue List <issue at texjp.org>
+or, GitHub repository is also available:
+  https://github.com/texjporg/babel-japanese
+
+\endpreamble
+
+\declarepreamble\emptypreamble
+\endpreamble
+
+\Msg{*** Generating files ***}
+\generateFile{japanese.ldf}{f}
+   {\from{babel-japanese.dtx}{code}}
+\usepreamble\emptypreamble
+\generateFile{babel-japanese-sample.tex}{f}
+   {\from{babel-japanese.dtx}{sample}}
+\endbatchfile
+
+%%
+%% End of file `japanese.ins'.

Deleted: trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx	2020-12-06 16:05:32 UTC (rev 57077)
+++ trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx	2020-12-06 22:14:43 UTC (rev 57078)
@@ -1,590 +0,0 @@
-% \iffalse meta-comment
-%
-% This file is part of the `japanese' package,
-% providing Japanese language support for Babel.
-%
-% Copyright (C) 1999--2007 by ING (Toru INAGAKI)
-%               2016--2019 by Japanese TeX Development Community
-%
-% This package 'japanese.dtx' supports the following Babel package:
-%
-% ====================================================================
-%
-% 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.
-% 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 2003/12/01 or later.
-%
-% This work has the LPPL maintenance status "maintained".
-%
-% The Current Maintainer of this work is Javier Bezos.
-%
-% ====================================================================
-%
-% \fi
-%
-% ^^A  Ensure UTF-8 input encoding for pLaTeX
-% ^^A  (effective since e-pTeX 20160201, thus TeX Live 2016)
-\ifx\epTeXinputencoding\undefined\else
-  \epTeXinputencoding utf8
-\fi
-%
-%\iffalse
-%    Tell the \LaTeX\ system who we are and write an entry on the
-%    transcript.
-%<*dtx>
-\ProvidesFile{japanese.dtx}
-%</dtx>
-%<code>\ProvidesLanguage{japanese}
-%<*!sample>
-%\ProvidesFile{japanese.dtx}
-        [2019/04/03 v2.2 Japanese support for babel (texjporg)]
-%</!sample>
-%\fi
-%
-%\iffalse
-%
-%<*filedriver>
-\ifx\directlua\undefined
-  \documentclass{jltxdoc}
-\else
-  \documentclass{ltjltxdoc}
-\fi
-\GetFileInfo{japanese.dtx}
-\setcounter{StandardModuleDepth}{1}
-\CodelineNumbered
-\MakeShortVerb{\|}
-\OnlyDescription
-\newcommand*\babel{\textsf{babel}}
-\newcommand*\langvar{$\langle \it lang \rangle$}
-%\newcommand*\Lopt[1]{\textsf{#1}}
-%\newcommand*\file[1]{\texttt{#1}}
-\begin{document}
-  \DocInput{japanese.dtx}
-\end{document}
-%</filedriver>
-%
-%\fi
-%
-% \title{Babel-Option {\sffamily japanese} {\Large version \fileversion}}
-% \author{\copyright\ 1999--2007 ING\\ 2016-- Japanese \TeX\ Development Community}
-% \date{\filedate}
-% \maketitle
-% \baselineskip=14pt
-%
-% \section*{The Japanese language}
-%
-% \file{japanese}パッケージは日本語による見出し語と日付を出力するためのマクロを
-% 定義しています。\babel のオプションの最後で日本語を指定します。
-% \begin{quote}
-% |\usepackage[...,japanese]{babel}|
-% \end{quote}
-%
-% バージョンv2.0以降では,p\TeX{}系(p\LaTeX{},up\LaTeX{})に加えて,
-% 新しいUnicodeな\TeX{}エンジン(Xe\TeX{},Lua\TeX{})もサポートしました。
-% このため,ファイルはUTF-8エンコーディングで保存するようにしてください。
-%
-% 2016年以降,本パッケージのメンテナンスは日本語\TeX{}開発コミュニティ
-% (Japanese \TeX\ Development Community)によって行われています。開発版は
-% GitHubリポジトリ
-%\begin{verbatim}
-%      https://github.com/texjporg/babel-japanese
-%\end{verbatim}
-% にあります。バグ報告は上記のリポジトリ,またはIssue Mailing List
-%\begin{verbatim}
-%      issue at texjp.org
-%\end{verbatim}
-% までお願いします。
-%
-%
-% \section{この文書について}
-%
-% この文書ファイル(\jobname.pdf)自体はp\LaTeX{},up\LaTeX{},Lua\LaTeX{}で
-% 処理できるようになっています。
-%
-%
-% \section{コード}
-%
-% p\TeX{}系(p\LaTeX{},up\LaTeX{})でなく,かつUnicodeな\TeX{}(Xe\LaTeX{},
-% Lua\LaTeX{})でもない場合は,最初にエラーを出します。
-%
-%    \begin{macrocode}
-%<*code>
-\ifx\kanjiskip\@undefined\ifx\directlua\@undefined
-\ifx\XeTeXversion\@undefined
-  \@latex at 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
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-\LdfInit\CurrentOption{captions\CurrentOption}
-%    \end{macrocode}
-% \DescribeMacro{\l at japanese}
-% ここでは|\l at japanese|が定義されているか否かを判断し,定義されていれば
-% 日本語用ハイフネーションパターンを読み込みます。
-% \DescribeMacro{\adddialect}
-% しかし,日本語にはハイフネーションパタンが存在しないので
-% |\adddialect|に|\l at japanese|を代入し,\file{language.dat}
-% で最初に指定した言語(言語番号0,通常は英語)のハイフネーションパターンを
-% 使用します。
-%
-% [2016-12-16] 旧バージョン(v1.3)では
-%\begin{quote}\small\begin{verbatim}
-% Package babel Warning: No hyphenation patterns were loaded for
-% (babel)                the language `Japanese'
-% (babel)                I will use the patterns loaded for \language=0
-%                        instead.
-%\end{verbatim}\end{quote}
-% という警告が出るのを無視する方針でしたが,新しい\babel では警告が
-% よりうるさくなっていました。
-%\begin{quote}\small\begin{verbatim}
-% Package babel Warning: No hyphenation patterns were preloaded for
-% (babel)                the language `Japanese' into the format.
-% (babel)                Please, configure your TeX system to add them and
-% (babel)                rebuild the format. Now I will use the patterns
-% (babel)                preloaded for english instead on input line 47.
-%\end{verbatim}\end{quote}
-% そこで,新しいバージョン(v2.0)からは警告を出さないことにして,代わりに
-% ログファイルにのみInfoを出力します。
-%
-%    \begin{macrocode}
-\ifx\l at japanese\@undefined
-%  \@nopatterns{Japanese}% comment out (2016-12-16)
-  \PackageInfo{babel}{%
-    No hyphenation patterns are available for Japanese,\MessageBreak
-    so I will use the patterns preloaded for \bbl at nulllanguage\MessageBreak
-    instead}
-  \adddialect\l at japanese0\fi
-%    \end{macrocode}
-%
-% \DescribeMacro{\captionsjapanese}
-% |\captionsjapanese|マクロはp\LaTeX{}の標準のクラスファイルで使われる
-% 見出し語を日本語で出力します。\LaTeX{}の標準のクラスファイルでも動作
-% しますが,元が英語用ですので,語順の関係上すべてを日本語化することは
-% できません(たとえば、Part 1→第1部とは変更することは不可能です)。
-%
-% [2016-12-15] 「証明」と「用語集」も日本語化するようにしました。
-% |\postpartname| がタイポで |\postpartnam| になっていたのを直しました。
-%
-% 新しいUnicodeな\TeX{}エンジン(Xe\TeX{},Lua\TeX{})の場合は,
-% UTF-8エンコーディングで直接和文文字を記述します。
-%    \begin{macrocode}
-\ifx\kanjiskip\@undefined
-  \def\bbl at jpn@prefacename{前書き}%
-  \def\bbl at jpn@refname{参考文献}%
-  \def\bbl at jpn@abstractname{概要}%
-  \def\bbl at jpn@bibname{参考文献}%
-  %\def\bbl at jpn@chaptername{Chapter}%
-  \def\bbl at jpn@prechaptername{第}%    -- added
-  \def\bbl at jpn@postchaptername{章}%   -- added
-  \def\bbl at jpn@presectionname{}%  第  -- added
-  \def\bbl at jpn@postsectionname{}% 節  -- added
-  \def\bbl at jpn@appendixname{付録}%
-  \def\bbl at jpn@contentsname{目次}%
-  \def\bbl at jpn@listfigurename{図目次}%
-  \def\bbl at jpn@listtablename{表目次}%
-  \def\bbl at jpn@indexname{索引}%
-  \def\bbl at jpn@figurename{図}%
-  \def\bbl at jpn@tablename{表}%
-  %\def\bbl at jpn@partname{Part}%
-  \def\bbl at jpn@prepartname{第}%       -- added
-  \def\bbl at jpn@postpartname{部}%      -- added
-  %\def\bbl at jpn@enclname{encl}%     同封物
-  %\def\bbl at jpn@ccname{cc}%         Cc
-  %\def\bbl at jpn@headtoname{To}%     To(宛先)
-  %\def\bbl at jpn@pagename{Page}%     ページ
-  %\def\bbl at jpn@seename{see}%       参照
-  %\def\bbl at jpn@alsoname{see also}% も参照
-  \def\bbl at jpn@proofname{証明}%
-  \def\bbl at jpn@glossaryname{用語集}%
-%    \end{macrocode}
-%
-% p\TeX{}系の場合は,UTF-8を読めない可能性があるため,
-% |\kansuji| トリックを使って和文文字の代わりにします。
-%
-%    \begin{macrocode}
-\else
-\begingroup
-  \kansujichar1=\jis"4130\relax % 前
-  \kansujichar2=\jis"3D71\relax % 書
-  \kansujichar3=\jis"242D\relax % き
-  \kansujichar4=\jis"3B32\relax % 参
-  \kansujichar5=\jis"394D\relax % 考
-  \kansujichar6=\jis"4A38\relax % 文
-  \kansujichar7=\jis"3825\relax % 献
-  \kansujichar8=\jis"3335\relax % 概
-  \kansujichar9=\jis"4D57\relax % 要
-  \xdef\bbl at jpn@prefacename{\kansuji123}%
-  \xdef\bbl at jpn@refname{\kansuji4567}%
-  \xdef\bbl at jpn@abstractname{\kansuji89}%
-  \xdef\bbl at jpn@bibname{\kansuji4567}%
-  \kansujichar1=\jis"4268\relax % 第
-  \kansujichar2=\jis"3E4F\relax % 章
-  \kansujichar3=\jis"4061\relax % 節
-  \kansujichar4=\jis"4955\relax % 付
-  \kansujichar5=\jis"4F3F\relax % 録
-  \kansujichar6=\jis"3A77\relax % 索
-  \kansujichar7=\jis"307A\relax % 引
-  \kansujichar8=\jis"4974\relax % 部
-  \xdef\bbl at jpn@prechaptername{\kansuji1}%
-  \xdef\bbl at jpn@postchaptername{\kansuji2}%
-  \xdef\bbl at jpn@presectionname{}%
-  \xdef\bbl at jpn@postsectionname{}%
-  \xdef\bbl at jpn@appendixname{\kansuji45}%
-  \xdef\bbl at jpn@indexname{\kansuji67}%
-  \xdef\bbl at jpn@prepartname{\kansuji1}%
-  \xdef\bbl at jpn@postpartname{\kansuji8}%
-  \kansujichar1=\jis"4C5C\relax % 目
-  \kansujichar2=\jis"3C21\relax % 次
-  \kansujichar3=\jis"3F5E\relax % 図
-  \kansujichar4=\jis"493D\relax % 表
-  \kansujichar5=\jis"3E5A\relax % 証
-  \kansujichar6=\jis"4C40\relax % 明
-  \kansujichar7=\jis"4D51\relax % 用
-  \kansujichar8=\jis"386C\relax % 語
-  \kansujichar9=\jis"3D38\relax % 集
-  \xdef\bbl at jpn@contentsname{\kansuji12}%
-  \xdef\bbl at jpn@listfigurename{\kansuji312}%
-  \xdef\bbl at jpn@listtablename{\kansuji412}%
-  \xdef\bbl at jpn@figurename{\kansuji3}%
-  \xdef\bbl at jpn@tablename{\kansuji4}%
-  \xdef\bbl at jpn@proofname{\kansuji56}%
-  \xdef\bbl at jpn@glossaryname{\kansuji789}%
-\endgroup
-\fi
-%    \end{macrocode}
-%
-% 実際の命令にこれらをコピーします。
-%
-%    \begin{macrocode}
-\@namedef{captions\CurrentOption}{%
-  \let\prefacename\bbl at jpn@prefacename
-  \let\refname\bbl at jpn@refname
-  \let\abstractname\bbl at jpn@abstractname
-  \let\bibname\bbl at jpn@bibname
-  %\def\chaptername{Chapter}%
-  \let\prechaptername\bbl at jpn@prechaptername   % -- added
-  \let\postchaptername\bbl at jpn@postchaptername % -- added
-  \let\presectionname\bbl at jpn@presectionname   % -- added
-  \let\postsectionname\bbl at jpn@postsectionname % -- added
-  \let\appendixname\bbl at jpn@appendixname
-  \let\contentsname\bbl at jpn@contentsname
-  \let\listfigurename\bbl at jpn@listfigurename
-  \let\listtablename\bbl at jpn@listtablename
-  \let\indexname\bbl at jpn@indexname
-  \let\figurename\bbl at jpn@figurename
-  \let\tablename\bbl at jpn@tablename
-  %\def\partname{Part}%
-  \let\prepartname\bbl at jpn@prepartname   % -- added
-  \let\postpartname\bbl at jpn@postpartname % -- added
-  %\def\enclname{encl}%     同封物
-  %\def\ccname{cc}%         Cc
-  %\def\headtoname{To}%     To(宛先)
-  %\def\pagename{Page}%     ページ
-  %\def\seename{see}%       参照
-  %\def\alsoname{see also}% も参照
-  \let\proofname\bbl at jpn@proofname
-  \let\glossaryname\bbl at jpn@glossaryname
-  }
-%    \end{macrocode}
-%
-% \DescribeMacro{\datejapanese}
-% |\datejapanese|マクロは日本語で日付を出力するように |\today|コマンドを
-% 再定義します。デフォルトの出力は西暦です。和暦を使用する際は,プリアンブルで 
-% |\和暦| を指定するか,本文で |\和暦\today| のように指定します。
-%
-% フラグの準備。
-%    \begin{macrocode}
-\newif\ifbbl at jpn@Seireki \bbl at jpn@Seirekitrue
-%    \end{macrocode}
-%
-% Unicodeな\TeX{}エンジン(Xe\TeX{},Lua\TeX{})の場合は,
-% UTF-8エンコーディングで直接和文文字を記述します。
-% Xe\TeX{}の場合は |\bbl at jpn@Tate...| の2つは実際には使いません。
-%    \begin{macrocode}
-\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@gengo\bbl at jpn@maybekansuji\bbl at jpn@gengoyear 年%
-      \bbl at jpn@maybekansuji\month 月%
-      \bbl at jpn@maybekansuji\day 日}
-  \def\bbl at jpn@SeirekiToday{%
-      \number\year 年%
-      \number\month 月%
-      \number\day 日}
-  \def\bbl at jpn@WarekiToday{%
-      \bbl at jpn@gengo\number\bbl at jpn@gengoyear 年%
-      \number\month 月%
-      \number\day 日}
-%    \end{macrocode}
-%
-% p\TeX{}系では |\kansuji| トリックで同じ命令を定義します。
-%    \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 % 暦
-  \expandafter\expandafter\expandafter\gdef
-  \expandafter\csname\kansuji13\endcsname{\bbl at jpn@Seirekitrue}%
-  \expandafter\expandafter\expandafter\gdef
-  \expandafter\csname\kansuji23\endcsname{\bbl at jpn@Seirekifalse}%
-  \kansujichar4=\jis"4A3F\relax % 平
-  \kansujichar5=\jis"402E\relax % 成
-  \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
-    \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@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{%
-    \number\year\bbl at jpn@kanjinen
-    \number\month\bbl at jpn@kanjigatsu
-    \number\day\bbl at jpn@kanjinichi}
-  \def\bbl at jpn@WarekiToday{%
-    \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不使用の
-% 場合は,縦組をサポートしません。
-%    \begin{macrocode}
-\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
-\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
-%    \end{macrocode}
-%
-% 実際に使用する命令にコピーします。
-%
-% [2019-04-03] 縦数式ディレクションは横組と同じ出力とします。
-%    \begin{macrocode}
-\@namedef{date\CurrentOption}{%
-  \def\today{%
-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
-      \ifbbl at jpn@Seireki
-        \bbl at jpn@SeirekiToday
-      \else
-        \bbl at jpn@WarekiToday
-      \fi
-X   \fi
-  }%
-}
-%    \end{macrocode}
-%
-% [2017-02-05] 新機能:|\languageattribute{japanese}{kansujitoday}|を指定すると,
-% 縦書きでは |\today| の表記が漢数字(例:二〇一六年一二月二八日)になります。
-%    \begin{macrocode}
-\let\bbl at jpn@maybekansuji\number
-\bbl at declare@ttribute{japanese}{kansujitoday}{\let\bbl at jpn@maybekansuji\kansuji}
-%    \end{macrocode}
-%
-% トリックに使用した文字の |\catcode| を元に戻します。
-%    \begin{macrocode}
-\catcode`\L=\bbl at jpn@l at catcode\relax
-\catcode`\P=\bbl at jpn@p at catcode\relax
-\catcode`\X=\bbl at jpn@x at catcode\relax
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-\@namedef{extras\CurrentOption}{}
-\@namedef{noextras\CurrentOption}{}
-\ldf at finish\CurrentOption
-%</code>
-%    \end{macrocode}
-%
-% \section*{謝辞}
-%
-% Babel-Option \Lopt{japanese}の作成に当って,バグフィックスや改良案を
-% ご提案いただいた方に感謝します。
-% bookworm $<$BYV01204$>$さんから,新しい言語を定義し,それに固有の
-% 言語番号を付けるマクロ \verb+\addlanguage+の機能について,詳しい
-% 解説をいただきました。本パッケージでは採用していませんが,\babel
-% の言語切り替え機能を理解する上でたいへん参考になりました。
-% Tony $<$PAG01322$>$さんから,キャプションと日付の定義について
-% ご提案をいただきました。
-% 大石勝 $<$DZH00446$>$さんから,初版に含まれていた \verb+\ifx\undefined+
-% のバグをご指摘いただきました。
-%
-% \section*{変更履歴}
-% \begin{itemize}
-% \item 2005年2月:日付の定義を修正しました。
-% \item 2007年10月:ZRさんからいただいた詳細なご指摘をもとに修正しました。\\
-% \verb|http://oku.edu.mie-u.ac.jp/~okumura/texfaq/qa/48625.html|
-% \item 2007年12月:ZRさん,ttkさんからいただいたご指摘を反映しました。
-% \item 2016年12月:日本語\TeX{}開発コミュニティが開発を引き継ぎました。
-% 以降の変更履歴は本文中に直接書いてあります。
-% \end{itemize}
-%
-% \StopEventually{}
-%
-%    \begin{macrocode}
-%<*sample>
-\ifx\directlua\undefined
-  \documentclass{jbook}
-\else
-  \documentclass{ltjbook}
-\fi
-\usepackage[german,english,japanese]{babel}
-\makeatletter
-\def\tbcaption{\def\@captype{table}\caption{キャプションの例}}
-\def\fgcaption{\def\@captype{figure}\caption{キャプションの例}}
-\makeatother
-\def\yes{--- はい。}
-\def\no{--- いいえ。}
-\def\TEXT{Textverarbeitung mit einem Rechner kann in vielf\"altiger Weise
-erfolgen. Eigenschaften und Leistungsf\"ahigkeit sind hierbei weniger
-vom jeweiligen Rechnertype, sondern vielmehr vom verwendeten
-\textit{Textverarbeitungsprogramm} bestimmt.}
-\def\se{\selectlanguage{english}}
-\def\sj{\selectlanguage{japanese}}
-\def\sg{\selectlanguage{german}}
-\setlength{\hoffset}{-13mm}
-\setlength{\textwidth}{16cm}
-\begin{document}
-
-\chapter{babel}
-\section{japaneseパッケージ}
-japaneseパッケージは日本語による見出し語と日付を出力するためのマクロを
-定義しています。
-
-\fgcaption
-
-\begin{itemize}
-\se
-\item ここで英語(\texttt{english})に変更します。(languageの値は\the\language)
-
-\TEXT
-
-ここは英語? \iflanguage{english}{\yes}{\no}\par
-ここはドイツ語? \iflanguage{german}{\yes}{\no}\par
-ここは日本語? \iflanguage{japanese}{\yes}{\no}
-
-※ \verb:\adddialect\l at japanese0: と設定しているため,日本語?も「はい」となります。
-
-\sg
-\item ここでドイツ語(\texttt{german})に変更します。(languageの値は\the\language)
-
-\TEXT
-
-ここは英語? \iflanguage{english}{\yes}{\no}\par
-ここはドイツ語? \iflanguage{german}{\yes}{\no}\par
-ここは日本語? \iflanguage{japanese}{\yes}{\no}
-
-※ ハイフネーションがドイツ語―旧正書法―に切り替わっている点に注目。
-なお,新正書法(\texttt{ngerman})では\texttt{Leis-tungs-f\"a-hig-keit}のように分綴します。
-
-\sj
-\item ここで日本語(\texttt{japanese})に変更します。(languageの値は\the\language)
-\tbcaption
-\item \verb:\和暦: は日付の表示をデフォルトの西暦「\today 」から和暦「\和暦\today 」に変更します。
-\end{itemize}
-\end{document}
-%</sample>
-%    \end{macrocode>
-%
-% \Finale
-%
-\endinput

Deleted: trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.ins
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.ins	2020-12-06 16:05:32 UTC (rev 57077)
+++ trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.ins	2020-12-06 22:14:43 UTC (rev 57078)
@@ -1,49 +0,0 @@
-%% japanese.ins
-%%
-%% Docstrip installation instruction file
-%% for the `japanese' package (Japanese support for Babel)
-%%
-%%
-
-\def\batchfile{japanese.ins}
-\input docstrip.tex
-
-\expandafter\ifx\csname declarepreamble\endcsname\relax
-  \Msg{==> This file requires docstrip version 2.4}
-  \Msg{}\expandafter\endinput\fi
-
-\keepsilent
-
-\preamble
-
-This file is part of the `japanese' package,
-providing Japanese language support for Babel.
-
-Copyright (C) 1999--2007 by ING (Toru INAGAKI)
-              2016--     by Japanese TeX Development Community
-
-This package is free software that can be redistributed and/or
-modified under the terms of the LaTeX Project Public License.
-
-Previous version of this work was written by ING, based on ideas
-from bookworm, Tony and Ohishi.
-Current maintainer is Japanese TeX Development Community.
-
-Please report errors to
-  Japanese TeX Development Community Issue List <issue at texjp.org>
-or, GitHub repository is also available:
-  https://github.com/texjporg/babel-japanese
-
-\endpreamble
-
-\declarepreamble\emptypreamble
-\endpreamble
-
-\Msg{*** Generating files ***}
-\generateFile{japanese.ldf}{f}{\from{japanese.dtx}{code}}
-\usepreamble\emptypreamble
-\generateFile{japanese-sample.tex}{f}{\from{japanese.dtx}{sample}}
-\endbatchfile
-
-%%
-%% End of file `japanese.ins'.

Modified: trunk/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf	2020-12-06 16:05:32 UTC (rev 57077)
+++ trunk/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf	2020-12-06 22:14:43 UTC (rev 57078)
@@ -4,13 +4,13 @@
 %%
 %% The original source files were:
 %%
-%% japanese.dtx  (with options: `code')
+%% babel-japanese.dtx  (with options: `code')
 %% 
 %% This file is part of the `japanese' package,
 %% providing Japanese language support for Babel.
 %% 
 %% Copyright (C) 1999--2007 by ING (Toru INAGAKI)
-%%               2016--     by Japanese TeX Development Community
+%%               2016--2020 by Japanese TeX Development Community
 %% 
 %% This package is free software that can be redistributed and/or
 %% modified under the terms of the LaTeX Project Public License.
@@ -28,14 +28,7 @@
   \epTeXinputencoding utf8
 \fi
 \ProvidesLanguage{japanese}
-        [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
-                pTeX, upTeX, XeTeX, LuaTeX\MessageBreak
-                It seems you are running unsupported engine!}\@ehc
-\fi
-\fi\fi
+        [2020/12/06 v3.0 Japanese support for babel (texjporg)]
 \LdfInit\CurrentOption{captions\CurrentOption}
 \ifx\l at japanese\@undefined
   \PackageInfo{babel}{%
@@ -43,83 +36,25 @@
     so I will use the patterns preloaded for \bbl at nulllanguage\MessageBreak
     instead}
   \adddialect\l at japanese0\fi
-\ifx\kanjiskip\@undefined
-  \def\bbl at jpn@prefacename{前書き}%
-  \def\bbl at jpn@refname{参考文献}%
-  \def\bbl at jpn@abstractname{概要}%
-  \def\bbl at jpn@bibname{参考文献}%
-  %\def\bbl at jpn@chaptername{Chapter}%
-  \def\bbl at jpn@prechaptername{第}%    -- added
-  \def\bbl at jpn@postchaptername{章}%   -- added
-  \def\bbl at jpn@presectionname{}%  第  -- added
-  \def\bbl at jpn@postsectionname{}% 節  -- added
-  \def\bbl at jpn@appendixname{付録}%
-  \def\bbl at jpn@contentsname{目次}%
-  \def\bbl at jpn@listfigurename{図目次}%
-  \def\bbl at jpn@listtablename{表目次}%
-  \def\bbl at jpn@indexname{索引}%
-  \def\bbl at jpn@figurename{図}%
-  \def\bbl at jpn@tablename{表}%
-  %\def\bbl at jpn@partname{Part}%
-  \def\bbl at jpn@prepartname{第}%       -- added
-  \def\bbl at jpn@postpartname{部}%      -- added
-  %\def\bbl at jpn@enclname{encl}%     同封物
-  %\def\bbl at jpn@ccname{cc}%         Cc
-  %\def\bbl at jpn@headtoname{To}%     To(宛先)
-  %\def\bbl at jpn@pagename{Page}%     ページ
-  %\def\bbl at jpn@seename{see}%       参照
-  %\def\bbl at jpn@alsoname{see also}% も参照
-  \def\bbl at jpn@proofname{証明}%
-  \def\bbl at jpn@glossaryname{用語集}%
-\else
-\begingroup
-  \kansujichar1=\jis"4130\relax % 前
-  \kansujichar2=\jis"3D71\relax % 書
-  \kansujichar3=\jis"242D\relax % き
-  \kansujichar4=\jis"3B32\relax % 参
-  \kansujichar5=\jis"394D\relax % 考
-  \kansujichar6=\jis"4A38\relax % 文
-  \kansujichar7=\jis"3825\relax % 献
-  \kansujichar8=\jis"3335\relax % 概
-  \kansujichar9=\jis"4D57\relax % 要
-  \xdef\bbl at jpn@prefacename{\kansuji123}%
-  \xdef\bbl at jpn@refname{\kansuji4567}%
-  \xdef\bbl at jpn@abstractname{\kansuji89}%
-  \xdef\bbl at jpn@bibname{\kansuji4567}%
-  \kansujichar1=\jis"4268\relax % 第
-  \kansujichar2=\jis"3E4F\relax % 章
-  \kansujichar3=\jis"4061\relax % 節
-  \kansujichar4=\jis"4955\relax % 付
-  \kansujichar5=\jis"4F3F\relax % 録
-  \kansujichar6=\jis"3A77\relax % 索
-  \kansujichar7=\jis"307A\relax % 引
-  \kansujichar8=\jis"4974\relax % 部
-  \xdef\bbl at jpn@prechaptername{\kansuji1}%
-  \xdef\bbl at jpn@postchaptername{\kansuji2}%
-  \xdef\bbl at jpn@presectionname{}%
-  \xdef\bbl at jpn@postsectionname{}%
-  \xdef\bbl at jpn@appendixname{\kansuji45}%
-  \xdef\bbl at jpn@indexname{\kansuji67}%
-  \xdef\bbl at jpn@prepartname{\kansuji1}%
-  \xdef\bbl at jpn@postpartname{\kansuji8}%
-  \kansujichar1=\jis"4C5C\relax % 目
-  \kansujichar2=\jis"3C21\relax % 次
-  \kansujichar3=\jis"3F5E\relax % 図
-  \kansujichar4=\jis"493D\relax % 表
-  \kansujichar5=\jis"3E5A\relax % 証
-  \kansujichar6=\jis"4C40\relax % 明
-  \kansujichar7=\jis"4D51\relax % 用
-  \kansujichar8=\jis"386C\relax % 語
-  \kansujichar9=\jis"3D38\relax % 集
-  \xdef\bbl at jpn@contentsname{\kansuji12}%
-  \xdef\bbl at jpn@listfigurename{\kansuji312}%
-  \xdef\bbl at jpn@listtablename{\kansuji412}%
-  \xdef\bbl at jpn@figurename{\kansuji3}%
-  \xdef\bbl at jpn@tablename{\kansuji4}%
-  \xdef\bbl at jpn@proofname{\kansuji56}%
-  \xdef\bbl at jpn@glossaryname{\kansuji789}%
-\endgroup
-\fi
+\def\bbl at jpn@prefacename{前書き}%
+\def\bbl at jpn@refname{参考文献}%
+\def\bbl at jpn@abstractname{概要}%
+\def\bbl at jpn@bibname{参考文献}%
+\def\bbl at jpn@prechaptername{第}%    -- added
+\def\bbl at jpn@postchaptername{章}%   -- added
+\def\bbl at jpn@presectionname{}%  第  -- added
+\def\bbl at jpn@postsectionname{}% 節  -- added
+\def\bbl at jpn@appendixname{付録}%
+\def\bbl at jpn@contentsname{目次}%
+\def\bbl at jpn@listfigurename{図目次}%
+\def\bbl at jpn@listtablename{表目次}%
+\def\bbl at jpn@indexname{索引}%
+\def\bbl at jpn@figurename{図}%
+\def\bbl at jpn@tablename{表}%
+\def\bbl at jpn@prepartname{第}%       -- added
+\def\bbl at jpn@postpartname{部}%      -- added
+\def\bbl at jpn@proofname{証明}%
+\def\bbl at jpn@glossaryname{用語集}%
 \@namedef{captions\CurrentOption}{%
   \let\prefacename\bbl at jpn@prefacename
   \let\refname\bbl at jpn@refname
@@ -150,71 +85,28 @@
   \let\glossaryname\bbl at jpn@glossaryname
   }
 \newif\ifbbl at jpn@Seireki \bbl at jpn@Seirekitrue
-\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@gengo\bbl at jpn@maybekansuji\bbl at jpn@gengoyear 年%
-      \bbl at jpn@maybekansuji\month 月%
-      \bbl at jpn@maybekansuji\day 日}
-  \def\bbl at jpn@SeirekiToday{%
-      \number\year 年%
-      \number\month 月%
-      \number\day 日}
-  \def\bbl at jpn@WarekiToday{%
-      \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 % 暦
-  \expandafter\expandafter\expandafter\gdef
-  \expandafter\csname\kansuji13\endcsname{\bbl at jpn@Seirekitrue}%
-  \expandafter\expandafter\expandafter\gdef
-  \expandafter\csname\kansuji23\endcsname{\bbl at jpn@Seirekifalse}%
-  \kansujichar4=\jis"4A3F\relax % 平
-  \kansujichar5=\jis"402E\relax % 成
-  \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
-    \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@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{%
-    \number\year\bbl at jpn@kanjinen
-    \number\month\bbl at jpn@kanjigatsu
-    \number\day\bbl at jpn@kanjinichi}
-  \def\bbl at jpn@WarekiToday{%
-    \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@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@gengo\bbl at jpn@maybekansuji\bbl at jpn@gengoyear 年%
+    \bbl at jpn@maybekansuji\month 月%
+    \bbl at jpn@maybekansuji\day 日}
+\def\bbl at jpn@SeirekiToday{%
+    \number\year 年%
+    \number\month 月%
+    \number\day 日}
+\def\bbl at jpn@WarekiToday{%
+    \bbl at jpn@gengo\number\bbl at jpn@gengoyear 年%
+    \number\month 月%
+    \number\day 日}
 \def\bbl at jpn@gengo#1\bbl at jpn@gengoyear{%
   \@tempcnta\year\relax
   \multiply\@tempcnta100
@@ -242,14 +134,14 @@
 \chardef\bbl at jpn@p at catcode=\catcode`\P\relax
 \chardef\bbl at jpn@x at catcode=\catcode`\X\relax
 \ifx\directlua\@undefined
-  \ifx\XeTeXversion\@undefined    % ptex/uptex
+  \ifx\kanjiskip\@undefined       % pdftex/xetex
     \catcode`\L=14\relax
+    \catcode`\P=14\relax
+    \catcode`\X=14\relax
+  \else                           % 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
@@ -263,14 +155,8 @@
   \fi
 \fi
 \@namedef{date\CurrentOption}{%
-  \def\today{%
-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
+  \def\today{{%
+P   \ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi % tate
 L   \ifnum\ltjgetparameter{direction}=3 % tate
 X     \ifbbl at jpn@Seireki
 X       \bbl at jpn@TateSeirekiToday
@@ -277,7 +163,6 @@
 X     \else
 X       \bbl at jpn@TateWarekiToday
 X     \fi
-P   \fi
 X   \else
       \ifbbl at jpn@Seireki
         \bbl at jpn@SeirekiToday
@@ -285,7 +170,7 @@
         \bbl at jpn@WarekiToday
       \fi
 X   \fi
-  }%
+  }}%
 }
 \let\bbl at jpn@maybekansuji\number
 \bbl at declare@ttribute{japanese}{kansujitoday}{\let\bbl at jpn@maybekansuji\kansuji}



More information about the tex-live-commits mailing list.