summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel-japanese/japanese.ldf
blob: 7dbe0be11954c1182e5c25e3fcbeb062ac4b9bb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
%%
%% This is file `japanese.ldf',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% 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--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@texjp.org>
%% or, GitHub repository is also available:
%%   https://github.com/texjporg/babel-japanese
%% 
\ifx\epTeXinputencoding\undefined\else
  \epTeXinputencoding utf8
\fi
\ProvidesLanguage{japanese}
        [2020/12/06 v3.0 Japanese support for babel (texjporg)]
\LdfInit\CurrentOption{captions\CurrentOption}
\ifx\l@japanese\@undefined
  \PackageInfo{babel}{%
    No hyphenation patterns are available for Japanese,\MessageBreak
    so I will use the patterns preloaded for \bbl@nulllanguage\MessageBreak
    instead}
  \adddialect\l@japanese0\fi
\def\bbl@jpn@prefacename{前書き}%
\def\bbl@jpn@refname{参考文献}%
\def\bbl@jpn@abstractname{概要}%
\def\bbl@jpn@bibname{参考文献}%
\def\bbl@jpn@prechaptername{第}%    -- added
\def\bbl@jpn@postchaptername{章}%   -- added
\def\bbl@jpn@presectionname{}%  第  -- added
\def\bbl@jpn@postsectionname{}% 節  -- added
\def\bbl@jpn@appendixname{付録}%
\def\bbl@jpn@contentsname{目次}%
\def\bbl@jpn@listfigurename{図目次}%
\def\bbl@jpn@listtablename{表目次}%
\def\bbl@jpn@indexname{索引}%
\def\bbl@jpn@figurename{図}%
\def\bbl@jpn@tablename{表}%
\def\bbl@jpn@prepartname{第}%       -- added
\def\bbl@jpn@postpartname{部}%      -- added
\def\bbl@jpn@proofname{証明}%
\def\bbl@jpn@glossaryname{用語集}%
\@namedef{captions\CurrentOption}{%
  \let\prefacename\bbl@jpn@prefacename
  \let\refname\bbl@jpn@refname
  \let\abstractname\bbl@jpn@abstractname
  \let\bibname\bbl@jpn@bibname
  %\def\chaptername{Chapter}%
  \let\prechaptername\bbl@jpn@prechaptername   % -- added
  \let\postchaptername\bbl@jpn@postchaptername % -- added
  \let\presectionname\bbl@jpn@presectionname   % -- added
  \let\postsectionname\bbl@jpn@postsectionname % -- added
  \let\appendixname\bbl@jpn@appendixname
  \let\contentsname\bbl@jpn@contentsname
  \let\listfigurename\bbl@jpn@listfigurename
  \let\listtablename\bbl@jpn@listtablename
  \let\indexname\bbl@jpn@indexname
  \let\figurename\bbl@jpn@figurename
  \let\tablename\bbl@jpn@tablename
  %\def\partname{Part}%
  \let\prepartname\bbl@jpn@prepartname   % -- added
  \let\postpartname\bbl@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@jpn@proofname
  \let\glossaryname\bbl@jpn@glossaryname
  }
\newif\ifbbl@jpn@Seireki \bbl@jpn@Seirekitrue
\def\西暦{\bbl@jpn@Seirekitrue}%
\def\和暦{\bbl@jpn@Seirekifalse}%
\def\bbl@jpn@kanjishowa{昭和}
\def\bbl@jpn@kanjiheisei{平成}
\def\bbl@jpn@kanjireiwa{令和}
\def\bbl@jpn@kanjigan{元}%
\def\bbl@jpn@TateSeirekiToday{%
    \bbl@jpn@maybekansuji\year 年%
    \bbl@jpn@maybekansuji\month 月%
    \bbl@jpn@maybekansuji\day 日}
\def\bbl@jpn@TateWarekiToday{%
    \bbl@jpn@gengo\bbl@jpn@maybekansuji\bbl@jpn@gengoyear 年%
    \bbl@jpn@maybekansuji\month 月%
    \bbl@jpn@maybekansuji\day 日}
\def\bbl@jpn@SeirekiToday{%
    \number\year 年%
    \number\month 月%
    \number\day 日}
\def\bbl@jpn@WarekiToday{%
    \bbl@jpn@gengo\number\bbl@jpn@gengoyear 年%
    \number\month 月%
    \number\day 日}
\def\bbl@jpn@gengo#1\bbl@jpn@gengoyear{%
  \@tempcnta\year\relax
  \multiply\@tempcnta100
  \advance\@tempcnta\month
  \multiply\@tempcnta100
  \advance\@tempcnta\day
  \@tempcntb\year\relax
  \ifnum\@tempcnta<19890108
    \bbl@jpn@kanjishowa
    \advance\@tempcntb-1925
  \else\ifnum\@tempcnta<20190501
    \bbl@jpn@kanjiheisei
    \advance\@tempcntb-1988
  \else
    \bbl@jpn@kanjireiwa
    \advance\@tempcntb-2018
  \fi\fi
  \ifnum\@tempcntb=1
    \bbl@jpn@kanjigan   % 元年は \number も \kansuji も関係ない
  \else
    #1\@tempcntb % この #1 は \number または \bbl@jpn@maybekansuji
  \fi
}
\chardef\bbl@jpn@l@catcode=\catcode`\L\relax
\chardef\bbl@jpn@p@catcode=\catcode`\P\relax
\chardef\bbl@jpn@x@catcode=\catcode`\X\relax
\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
\@namedef{date\CurrentOption}{%
  \def\today{{%
P   \ifnum1=\iftdir\ifmdir0\else1\fi\else0\fi % tate
L   \ifnum\ltjgetparameter{direction}=3 % tate
X     \ifbbl@jpn@Seireki
X       \bbl@jpn@TateSeirekiToday
X     \else
X       \bbl@jpn@TateWarekiToday
X     \fi
X   \else
      \ifbbl@jpn@Seireki
        \bbl@jpn@SeirekiToday
      \else
        \bbl@jpn@WarekiToday
      \fi
X   \fi
  }}%
}
\let\bbl@jpn@maybekansuji\number
\bbl@declare@ttribute{japanese}{kansujitoday}{\let\bbl@jpn@maybekansuji\kansuji}
\catcode`\L=\bbl@jpn@l@catcode\relax
\catcode`\P=\bbl@jpn@p@catcode\relax
\catcode`\X=\bbl@jpn@x@catcode\relax
\@namedef{extras\CurrentOption}{}
\@namedef{noextras\CurrentOption}{}
\ldf@finish\CurrentOption
\endinput
%%
%% End of file `japanese.ldf'.