texlive[42738] Master: babel-japanese (17dec16)

commits+karl at tug.org commits+karl at tug.org
Sat Dec 17 21:42:57 CET 2016


Revision: 42738
          http://tug.org/svn/texlive?view=revision&revision=42738
Author:   karl
Date:     2016-12-17 21:42:57 +0100 (Sat, 17 Dec 2016)
Log Message:
-----------
babel-japanese (17dec16)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/generic/babel-japanese/
    trunk/Master/texmf-dist/doc/generic/babel-japanese/Makefile
    trunk/Master/texmf-dist/doc/generic/babel-japanese/README.md
    trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf
    trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.tex
    trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese.pdf
    trunk/Master/texmf-dist/source/generic/babel-japanese/
    trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx
    trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.ins
    trunk/Master/texmf-dist/tex/generic/babel-japanese/
    trunk/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf
    trunk/Master/tlpkg/tlpsrc/babel-japanese.tlpsrc

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

Added: trunk/Master/texmf-dist/doc/generic/babel-japanese/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-japanese/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/babel-japanese/README.md	2016-12-17 20:42:57 UTC (rev 42738)
@@ -0,0 +1,78 @@
+# babel-japanese
+
+The package "babel-japanese" (or shortly, "japanese" package) provides
+`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
+different from that in most Western languages including English, so
+the words like "Part" or "Chapter" cannot be replaced with Japanese
+counterpart. This limitation is due to the design of classes.dtx
+(article.cls etc), which has \chaptername in front of the numbering
+but no sequence behind the number.
+
+The common Japanese classes including (u)jclasses in (u)pLaTeX,
+jsclasses, ltj(s)classes in LuaTeX-ja are well-supported.
+
+
+## Installation
+
+1) Process japanese.ins with some tex engine. For example, using lualatex:
+
+        lualatex japanese.ins
+
+When you use platex, give -kanji=utf8 option.
+
+        platex -kanji=utf8 japanese.ins
+
+You will get japanese.ldf (the main code) and 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.
+
+        platex -kanji=utf8 japanese.dtx
+        dvipdfmx japanese.dvi
+        platex -kanji=utf8 japanese-sample.tex
+        dvipdfmx japanese-sample.dvi
+
+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
+
+4) Execute mktexlsr.
+
+
+## Repository
+
+The bundle is maintained on GitHub:
+  https://github.com/texjporg/babel-japanese
+
+If you have issues, please let us know from the above page.
+
+
+## License
+
+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.
+
+
+## Release Date
+
+2016-12-16
+
+Japanese TeX Development Community

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

Index: trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf	2016-12-17 20:40:20 UTC (rev 42737)
+++ trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf	2016-12-17 20:42:57 UTC (rev 42738)

Property changes on: trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.tex
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese-sample.tex	2016-12-17 20:42:57 UTC (rev 42738)
@@ -0,0 +1,74 @@
+%%
+%% 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'.

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

Index: trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese.pdf	2016-12-17 20:40:20 UTC (rev 42737)
+++ trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese.pdf	2016-12-17 20:42:57 UTC (rev 42738)

Property changes on: trunk/Master/texmf-dist/doc/generic/babel-japanese/japanese.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.dtx	2016-12-17 20:42:57 UTC (rev 42738)
@@ -0,0 +1,465 @@
+% \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--     by Japanese TeX Development Community
+%
+% This package 'japanese.dtx' supports the following Babel package:
+%
+% ====================================================================
+%
+% Copyright 2012-2016 Javier Bezos and Johannes L. Braams.
+% Copyright 1989-2012 Johannes L. Braams and any individual authors
+% listed elsewhere in this file.  All rights reserved.
+% 
+% 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}
+        [2016/12/16 v2.0 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\XeTeXversion\@undefined\ifx\directlua\@undefined
+  \@latex at error{babel-japanese supports 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
+{\advance\year-1988\relax
+ \xdef\the at heisei{\the\year}}
+%    \end{macrocode}
+%
+% Unicodeな\TeX{}エンジン(Xe\TeX{},Lua\TeX{})の場合は,
+% UTF-8エンコーディングで直接和文文字を記述します。
+%    \begin{macrocode}
+\ifx\kanjiskip\@undefined
+  \def\西暦{\bbl at jpn@Seirekitrue}%
+  \def\和暦{\bbl at jpn@Seirekifalse}%
+  \def\bbl at jpn@SeirekiToday{%
+      \number\year 年%
+      \number\month 月%
+      \number\day 日}
+  \def\bbl at jpn@WarekiToday{%
+      平成\the at heisei 年%
+      \number\month 月%
+      \number\day 日}
+%    \end{macrocode}
+%
+% p\TeX{}系では |\kansuji| トリックで同じ命令を定義します。
+%    \begin{macrocode}
+\else
+\begingroup
+  \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}%
+  \kansujichar1=\jis"472F\relax % 年
+  \kansujichar2=\jis"376E\relax % 月
+  \kansujichar3=\jis"467C\relax % 日
+  \kansujichar4=\jis"4A3F\relax % 平
+  \kansujichar5=\jis"402E\relax % 成
+  \xdef\bbl at jpn@SeirekiToday{%
+    \number\year\kansuji1 %
+    \number\month\kansuji2 %
+    \number\day\kansuji3 }
+  \xdef\bbl at jpn@WarekiToday{%
+    \kansuji45 \the at heisei\kansuji1 %
+    \number\month\kansuji2 %
+    \number\day\kansuji3 }
+\endgroup
+\fi
+%    \end{macrocode}
+%
+% 実際に使用する命令。
+%    \begin{macrocode}
+\@namedef{date\CurrentOption}{%
+  \def\today{%
+    \ifbbl at jpn@Seireki
+      \bbl at jpn@SeirekiToday
+    \else
+      \bbl at jpn@WarekiToday
+    \fi}}
+%    \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

Added: trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.ins
===================================================================
--- trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/generic/babel-japanese/japanese.ins	2016-12-17 20:42:57 UTC (rev 42738)
@@ -0,0 +1,49 @@
+%% 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'.

Added: trunk/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf
===================================================================
--- trunk/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf	2016-12-17 20:42:57 UTC (rev 42738)
@@ -0,0 +1,200 @@
+%%
+%% This is file `japanese.ldf',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% 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
+%% 
+%% 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
+%% 
+\ifx\epTeXinputencoding\undefined\else
+  \epTeXinputencoding utf8
+\fi
+\ProvidesLanguage{japanese}
+        [2016/12/16 v2.0 Japanese support for babel (texjporg)]
+\ifx\kanjiskip\@undefined\ifx\XeTeXversion\@undefined\ifx\directlua\@undefined
+  \@latex at error{babel-japanese supports one of the followings:\MessageBreak
+                pTeX, upTeX, XeTeX, LuaTeX\MessageBreak
+                It seems you are running unsupported engine!}\@ehc
+\fi\fi\fi
+\LdfInit\CurrentOption{captions\CurrentOption}
+\ifx\l at japanese\@undefined
+  \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
+\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
+\@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
+  }
+\newif\ifbbl at jpn@Seireki \bbl at jpn@Seirekitrue
+{\advance\year-1988\relax
+ \xdef\the at heisei{\the\year}}
+\ifx\kanjiskip\@undefined
+  \def\西暦{\bbl at jpn@Seirekitrue}%
+  \def\和暦{\bbl at jpn@Seirekifalse}%
+  \def\bbl at jpn@SeirekiToday{%
+      \number\year 年%
+      \number\month 月%
+      \number\day 日}
+  \def\bbl at jpn@WarekiToday{%
+      平成\the at heisei 年%
+      \number\month 月%
+      \number\day 日}
+\else
+\begingroup
+  \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}%
+  \kansujichar1=\jis"472F\relax % 年
+  \kansujichar2=\jis"376E\relax % 月
+  \kansujichar3=\jis"467C\relax % 日
+  \kansujichar4=\jis"4A3F\relax % 平
+  \kansujichar5=\jis"402E\relax % 成
+  \xdef\bbl at jpn@SeirekiToday{%
+    \number\year\kansuji1 %
+    \number\month\kansuji2 %
+    \number\day\kansuji3 }
+  \xdef\bbl at jpn@WarekiToday{%
+    \kansuji45 \the at heisei\kansuji1 %
+    \number\month\kansuji2 %
+    \number\day\kansuji3 }
+\endgroup
+\fi
+\@namedef{date\CurrentOption}{%
+  \def\today{%
+    \ifbbl at jpn@Seireki
+      \bbl at jpn@SeirekiToday
+    \else
+      \bbl at jpn@WarekiToday
+    \fi}}
+\@namedef{extras\CurrentOption}{}
+\@namedef{noextras\CurrentOption}{}
+\ldf at finish\CurrentOption
+\endinput
+%%
+%% End of file `japanese.ldf'.

Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2016-12-17 20:40:20 UTC (rev 42737)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2016-12-17 20:42:57 UTC (rev 42738)
@@ -61,7 +61,7 @@
     babel-estonian babel-finnish babel-french babel-friulan
     babel-galician babel-german babel-georgian babel-greek
     babel-hebrew babel-hungarian
-    babel-icelandic babel-interlingua babel-irish babel-italian
+    babel-icelandic babel-interlingua babel-irish babel-italian babel-japanese
     babel-kurmanji babel-latin babel-latvian babel-macedonian
     babel-norsk babel-occitan babel-piedmontese
     babel-polish babel-portuges babel-romanian babel-romansh

Added: trunk/Master/tlpkg/tlpsrc/babel-japanese.tlpsrc
===================================================================
Modified: trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc	2016-12-17 20:40:20 UTC (rev 42737)
+++ trunk/Master/tlpkg/tlpsrc/collection-langjapanese.tlpsrc	2016-12-17 20:42:57 UTC (rev 42738)
@@ -4,6 +4,7 @@
 #
 depend collection-langcjk
 #
+depend babel-japanese
 depend bxbase
 depend bxcjkjatype
 depend bxjalipsum



More information about the tex-live-commits mailing list