2 % txi-ja.tex -- Japanese translations and font definitions for texinfo.tex.
4 % Copyright 1999, 2007, 2008, 2016 Free Software Foundation, Inc.
6 % This program is free software; you can redistribute it and/or modify
7 % it under the terms of the GNU General Public License as published by
8 % the Free Software Foundation; either version 3 of the license, or (at
9 % your option) any later version.
11 % This program is distributed in the hope that it will be useful,
12 % but WITHOUT ANY WARRANTY; without even the implied warranty of
13 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 % GNU General Public License for more details.
16 % You should have received a copy of the GNU General Public License
17 % along with this program. If not, see <http://www.gnu.org/licenses/>.
19 % Written by Masamichi Hosoda, 5 May 2016, <trueroad@trueroad.jp>
21 \txisetlanguage{USenglish}{2}{3}
23 \plainnonfrenchspacing
25 \gdef\putwordAppendix{付録}
26 \gdef\putwordChapter{Chapter}
27 \gdef\putworderror{エラー}
28 \gdef\putwordfile{ファイル}
30 \gdef\putwordIndexIsEmpty{(インデックスが空です)}
31 \gdef\putwordIndexNonexistent{(インデックスがありません)}
32 \gdef\putwordInfo{Info}
33 \gdef\putwordInstanceVariableof{Instance Variable of}
34 \gdef\putwordMethodon{Method on}
35 \gdef\putwordNoTitle{無題}
39 \gdef\putwordsection{section}
40 \gdef\putwordSection{Section}
43 \gdef\putwordShortTOC{簡単な目次}
55 \gdef\putwordMOct{10月}
56 \gdef\putwordMNov{11月}
57 \gdef\putwordMDec{12月}
59 \gdef\putwordDefmac{マクロ}
60 \gdef\putwordDefspec{特殊フォーム}
61 \gdef\putwordDefvar{変数}
62 \gdef\putwordDefopt{ユーザオプション}
63 \gdef\putwordDeffunc{関数}
65 % Produces Year Month Day style of output.
69 \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
70 \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
71 \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
77 % Japanese font definitions
80 \ifx\txijapackage\thisisundefined
81 \errmessage{Required CJK package is not found.
82 Use `texinfo-ja.tex' instead of `texinfo.tex'}
88 \ifx\luatexversion\thisisundefined
90 % Definitions for a main text size of 11pt. (The default in Texinfo.)
91 % Japanese font size is muliplied by 0.962216.
92 \let\definealphabetictextfontsizexi\definetextfontsizexi
93 \gdef\definetextfontsizexi{%
94 % Text fonts (11.2pt, magstep1).
95 \jfont\textmc{file:ipaexm.ttf:jfm=ujis} at 10.78pt
96 \jfont\textgt{file:ipaexg.ttf:jfm=ujis} at 10.78pt
98 % Fonts for indices, footnotes, small examples (9pt).
99 \jfont\smallmc{file:ipaexm.ttf:jfm=ujis} at 8.66pt
100 \jfont\smallgt{file:ipaexg.ttf:jfm=ujis} at 8.66pt
102 % Fonts for small examples (8pt).
103 \jfont\smallermc{file:ipaexm.ttf:jfm=ujis} at 7.70pt
104 \jfont\smallergt{file:ipaexg.ttf:jfm=ujis} at 7.70pt
106 % Fonts for title page (20.4pt):
107 \jfont\titlemc{file:ipaexm.ttf:jfm=ujis} at 19.63pt
108 \jfont\titlegt{file:ipaexg.ttf:jfm=ujis} at 19.63pt
110 % Chapter (and unnumbered) fonts (17.28pt).
111 \jfont\chapmc{file:ipaexm.ttf:jfm=ujis} at 16.63pt
112 \jfont\chapgt{file:ipaexg.ttf:jfm=ujis} at 16.63pt
114 % Section fonts (14.4pt).
115 \jfont\secmc{file:ipaexm.ttf:jfm=ujis} at 13.86pt
116 \jfont\secgt{file:ipaexg.ttf:jfm=ujis} at 13.86pt
118 % Subsection fonts (13.15pt).
119 \jfont\ssecmc{file:ipaexm.ttf:jfm=ujis} at 12.65pt
120 \jfont\ssecgt{file:ipaexg.ttf:jfm=ujis} at 12.65pt
122 % Reduced fonts for @acro in text (10pt).
123 \jfont\reducedmc{file:ipaexm.ttf:jfm=ujis} at 9.62pt
124 \jfont\reducedgt{file:ipaexg.ttf:jfm=ujis} at 9.62pt
126 % Fonts for short table of contents.
127 \jfont\shortcontmc{file:ipaexm.ttf:jfm=ujis} at 11.55pt
128 \jfont\shortcontgt{file:ipaexg.ttf:jfm=ujis} at 11.55pt
130 \definealphabetictextfontsizexi
133 % Definitions for a main text size of 10pt.
134 % Japanese font size is muliplied by 0.962216.
135 \let\definealphabetictextfontsizex\definetextfontsizex
136 \gdef\definetextfontsizex{%
138 \jfont\textmc{file:ipaexm.ttf:jfm=ujis} at 9.62pt
139 \jfont\textgt{file:ipaexg.ttf:jfm=ujis} at 9.62pt
141 % Fonts for indices, footnotes, small examples (9pt).
142 \jfont\smallmc{file:ipaexm.ttf:jfm=ujis} at 8.66pt
143 \jfont\smallgt{file:ipaexg.ttf:jfm=ujis} at 8.66pt
145 % Fonts for small examples (8pt).
146 \jfont\smallermc{file:ipaexm.ttf:jfm=ujis} at 7.70pt
147 \jfont\smallergt{file:ipaexg.ttf:jfm=ujis} at 7.70pt
149 % Fonts for title page (20.4pt):
150 \jfont\titlemc{file:ipaexm.ttf:jfm=ujis} at 19.63pt
151 \jfont\titlegt{file:ipaexg.ttf:jfm=ujis} at 19.63pt
153 % Chapter fonts (14.4pt).
154 \jfont\chapmc{file:ipaexm.ttf:jfm=ujis} at 13.86pt
155 \jfont\chapgt{file:ipaexg.ttf:jfm=ujis} at 13.86pt
157 % Section fonts (12pt).
158 \jfont\secmc{file:ipaexm.ttf:jfm=ujis} at 11.55pt
159 \jfont\secgt{file:ipaexg.ttf:jfm=ujis} at 11.55pt
161 % Subsection fonts (10pt).
162 \jfont\ssecmc{file:ipaexm.ttf:jfm=ujis} at 9.62pt
163 \jfont\ssecgt{file:ipaexg.ttf:jfm=ujis} at 9.62pt
165 % Reduced fonts for @acro in text (9pt).
166 \jfont\reducedmc{file:ipaexm.ttf:jfm=ujis} at 8.66pt
167 \jfont\reducedgt{file:ipaexg.ttf:jfm=ujis} at 8.66pt
169 % Fonts for short table of contents.
170 \jfont\shortcontmc{file:ipaexm.ttf:jfm=ujis} at 11.55pt
171 \jfont\shortcontgt{file:ipaexg.ttf:jfm=ujis} at 11.55pt
173 \definealphabetictextfontsizex
176 % Ignore LuaTeX-ja added line end comment
177 % https://osdn.jp/ticket/browse.php?group_id=5593&tid=36096
179 % Re-define texinfo.tex's \parseargusing
180 \def\parseargusing#1#2{%
183 \ifx\ltjlineendcomment\thisisundefined
184 % Ignore U+FFFFF for LuaTeX-ja <= 20160208.0
187 % Ignore the character \ltjlineendcomment for LuaTeX-ja > 20160208.0
188 \catcode\ltjlineendcomment=9
193 \parseargline\empty% Insert the \empty token, see \finishparsearg below.
195 % Re-define texinfo.tex's \comment
196 \def\comment{\begingroup \catcode`\^^M=\active%
197 \ifx\ltjlineendcomment\thisisundefined
198 % Ignore U+FFFFF for LuaTeX-ja <= 20160208.0
201 % Ignore the character \ltjlineendcomment for LuaTeX-ja > 20160208.0
202 \catcode\ltjlineendcomment=9%
204 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other\commentxxx}%
205 % Re-let \comment related macros
206 \let\setfilename=\comment
207 \let\dircategory=\comment
208 \let\definfoenclose=\comment
209 \let\footnotestyle=\comment
210 % Re-define texinfo.tex's \c
211 \def\c{\begingroup \catcode`\^^M=\active%
212 \ifx\ltjlineendcomment\thisisundefined
213 % Ignore U+FFFFF for LuaTeX-ja <= 20160208.0
216 % Ignore the character \ltjlineendcomment for LuaTeX-ja > 20160208.0
217 \catcode\ltjlineendcomment=9%
219 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
221 % Re-let \c related macro
228 \ifx\XeTeXrevision\thisisundefined
230 % Fix some Japanese character class
231 % (unicode-letters.tex is wrong.)
232 \def\do#1{\XeTeXcharclass"#1=1 }
233 \do{3041}\do{3043}\do{3045}\do{3047}\do{3049}\do{3063}
234 \do{3083}\do{3085}\do{3087}\do{308E}\do{3095}\do{3096}
235 \do{30A1}\do{30A3}\do{30A5}\do{30A7}\do{30A9}\do{30C3}
236 \do{30E3}\do{30E5}\do{30E7}\do{30EE}\do{30F5}\do{30F6}
237 \do{30FC}\do{31F0}\do{31F1}\do{31F2}\do{31F3}\do{31F4}
238 \do{31F5}\do{31F6}\do{31F7}\do{31F8}\do{31F9}\do{31FA}
239 \do{31FB}\do{31FC}\do{31FD}\do{31FE}\do{31FF}
241 % Add some character class
242 \do{2015}\do{2016}\do{2025}\do{2030}\do{2032}\do{2033}
243 \do{203B}\do{2103}\do{212B}
245 \do{2500}\do{2501}\do{2502}\do{2503}\do{250C}\do{250F}
246 \do{2510}\do{2513}\do{2514}\do{2517}\do{2518}\do{251B}
247 \do{251C}\do{251D}\do{2520}\do{2523}\do{2524}\do{2525}
248 \do{2528}\do{252B}\do{252C}\do{252F}\do{2530}\do{2533}
249 \do{2534}\do{2537}\do{2538}\do{253B}\do{253C}\do{253F}
252 \do{25A0}\do{25A1}\do{25B2}\do{25B3}\do{25BC}\do{25BD}
253 \do{25C6}\do{25C7}\do{25CB}\do{25CE}\do{25CF}\do{25EF}
254 \do{2605}\do{2606}\do{2640}\do{2642}
258 % Setting Japanese font instead of Chinese font
260 \let\zhfont#1\let\zhpunctfont#1%
261 \let\zhextafont#1\let\zhextbfont#1%
264 % Definitions for a main text size of 11pt. (The default in Texinfo.)
265 % Japanese font size is muliplied by 0.962216.
266 \let\definealphabetictextfontsizexi\definetextfontsizexi
267 \gdef\definetextfontsizexi{%
268 % Text fonts (11.2pt, magstep1).
269 \font\textmczzz"[ipaexm.ttf]:mapping=tex-text" at 10.78pt
270 \font\textgtzzz"[ipaexg.ttf]:mapping=tex-text" at 10.78pt
271 \def\textmc{\setjafont\textmczzz}
272 \def\textgt{\setjafont\textgtzzz}
274 % Fonts for indices, footnotes, small examples (9pt).
275 \font\smallmczzz"[ipaexm.ttf]:mapping=tex-text" at 8.66pt
276 \font\smallgtzzz"[ipaexg.ttf]:mapping=tex-text" at 8.66pt
277 \def\smallmc{\setjafont\smallmczzz}
278 \def\smallgt{\setjafont\smallgtzzz}
280 % Fonts for small examples (8pt).
281 \font\smallermczzz"[ipaexm.ttf]:mapping=tex-text" at 7.70pt
282 \font\smallergtzzz"[ipaexg.ttf]:mapping=tex-text" at 7.70pt
283 \def\smallermc{\setjafont\smallermczzz}
284 \def\smallergt{\setjafont\smallergtzzz}
286 % Fonts for title page (20.4pt):
287 \font\titlemczzz"[ipaexm.ttf]:mapping=tex-text" at 19.63pt
288 \font\titlegtzzz"[ipaexg.ttf]:mapping=tex-text" at 19.63pt
289 \def\titlemc{\setjafont\titlemczzz}
290 \def\titlegt{\setjafont\titlegtzzz}
292 % Chapter (and unnumbered) fonts (17.28pt).
293 \font\chapmczzz"[ipaexm.ttf]:mapping=tex-text" at 16.63pt
294 \font\chapgtzzz"[ipaexg.ttf]:mapping=tex-text" at 16.63pt
295 \def\chapmc{\setjafont\chapmczzz}
296 \def\chapgt{\setjafont\chapgtzzz}
298 % Section fonts (14.4pt).
299 \font\secmczzz"[ipaexm.ttf]:mapping=tex-text" at 13.86pt
300 \font\secgtzzz"[ipaexg.ttf]:mapping=tex-text" at 13.86pt
301 \def\secmc{\setjafont\secmczzz}
302 \def\secgt{\setjafont\secgtzzz}
304 % Subsection fonts (13.15pt).
305 \font\ssecmczzz"[ipaexm.ttf]:mapping=tex-text" at 12.65pt
306 \font\ssecgtzzz"[ipaexg.ttf]:mapping=tex-text" at 12.65pt
307 \def\ssecmc{\setjafont\ssecmczzz}
308 \def\ssecgt{\setjafont\ssecgtzzz}
310 % Reduced fonts for @acro in text (10pt).
311 \font\reducedmczzz"[ipaexm.ttf]:mapping=tex-text" at 9.62pt
312 \font\reducedgtzzz"[ipaexg.ttf]:mapping=tex-text" at 9.62pt
313 \def\reducedmc{\setjafont\reducedmczzz}
314 \def\reducedgt{\setjafont\reducedgtzzz}
316 % Fonts for short table of contents.
317 \font\shortcontmczzz"[ipaexm.ttf]:mapping=tex-text" at 11.55pt
318 \font\shortcontgtzzz"[ipaexg.ttf]:mapping=tex-text" at 11.55pt
319 \def\shortcontmc{\setjafont\shortcontmczzz}
320 \def\shortcontgt{\setjafont\shortcontgtzzz}
322 \definealphabetictextfontsizexi
325 % Definitions for a main text size of 10pt.
326 % Japanese font size is muliplied by 0.962216.
327 \let\definealphabetictextfontsizex\definetextfontsizex
328 \gdef\definetextfontsizex{%
330 \font\textmczzz"[ipaexm.ttf]:mapping=tex-text" at 9.62pt
331 \font\textgtzzz"[ipaexg.ttf]:mapping=tex-text" at 9.62pt
332 \def\textmc{\setjafont\textmczzz}
333 \def\textgt{\setjafont\textgtzzz}
335 % Fonts for indices, footnotes, small examples (9pt).
336 \font\smallmczzz"[ipaexm.ttf]:mapping=tex-text" at 8.66pt
337 \font\smallgtzzz"[ipaexg.ttf]:mapping=tex-text" at 8.66pt
338 \def\smallmc{\setjafont\smallmczzz}
339 \def\smallgt{\setjafont\smallgtzzz}
341 % Fonts for small examples (8pt).
342 \font\smallermczzz"[ipaexm.ttf]:mapping=tex-text" at 7.70pt
343 \font\smallergtzzz"[ipaexg.ttf]:mapping=tex-text" at 7.70pt
344 \def\smallermc{\setjafont\smallermczzz}
345 \def\smallergt{\setjafont\smallergtzzz}
347 % Fonts for title page (20.4pt):
348 \font\titlemczzz"[ipaexm.ttf]:mapping=tex-text" at 19.63pt
349 \font\titlegtzzz"[ipaexg.ttf]:mapping=tex-text" at 19.63pt
350 \def\titlemc{\setjafont\titlemczzz}
351 \def\titlegt{\setjafont\titlegtzzz}
353 % Chapter fonts (14.4pt).
354 \font\chapmczzz"[ipaexm.ttf]:mapping=tex-text" at 13.86pt
355 \font\chapgtzzz"[ipaexg.ttf]:mapping=tex-text" at 13.86pt
356 \def\chapmc{\setjafont\chapmczzz}
357 \def\chapgt{\setjafont\chapgtzzz}
359 % Section fonts (12pt).
360 \font\secmczzz"[ipaexm.ttf]:mapping=tex-text" at 11.55pt
361 \font\secgtzzz"[ipaexg.ttf]:mapping=tex-text" at 11.55pt
362 \def\secmc{\setjafont\secmczzz}
363 \def\secgt{\setjafont\secgtzzz}
365 % Subsection fonts (10pt).
366 \font\ssecmczzz"[ipaexm.ttf]:mapping=tex-text" at 9.62pt
367 \font\ssecgtzzz"[ipaexg.ttf]:mapping=tex-text" at 9.62pt
368 \def\ssecmc{\setjafont\ssecmczzz}
369 \def\ssecgt{\setjafont\ssecgtzzz}
371 % Reduced fonts for @acro in text (9pt).
372 \font\reducedmczzz"[ipaexm.ttf]:mapping=tex-text" at 8.66pt
373 \font\reducedgtzzz"[ipaexg.ttf]:mapping=tex-text" at 8.66pt
374 \def\reducedmc{\setjafont\reducedmczzz}
375 \def\reducedgt{\setjafont\reducedgtzzz}
377 % Fonts for short table of contents.
378 \font\shortcontmczzz"[ipaexm.ttf]:mapping=tex-text" at 11.55pt
379 \font\shortcontgtzzz"[ipaexg.ttf]:mapping=tex-text" at 11.55pt
380 \def\shortcontmc{\setjafont\shortcontmczzz}
381 \def\shortcontgt{\setjafont\shortcontgtzzz}
383 \definealphabetictextfontsizex
386 % Japanese line break settings
387 \XeTeXlinebreaklocale "ja_JP"
388 \XeTeXlinebreakskip=0em plus 0.1em minus 0.01em
389 \XeTeXlinebreakpenalty=0
391 % For copy & paste Unicode characters (XeTeX 0.99995+)
392 \ifx\XeTeXgenerateactualtext\thisisundefined
394 \XeTeXgenerateactualtext=1
399 \iftxinativeunicodecapable
404 \gdef\rm{\alphabeticrm\tenmc}
407 \gdef\it{\alphabeticit\tenmc}
410 \gdef\sl{\alphabeticsl\tengt}
413 \gdef\bf{\alphabeticbf\tengt}
416 \gdef\tt{\alphabetictt\tengt}
420 \let\alphabetictextfonts\textfonts
427 \let\alphabetictitlefonts\titlefonts
429 \alphabetictitlefonts
434 \let\alphabeticchapfonts\chapfonts
441 \let\alphabeticsecfonts\secfonts
448 \let\alphabeticsubsecfonts\subsecfonts
450 \alphabeticsubsecfonts
455 \global\let\subsubsecfonts\subsecfonts
457 \let\alphabeticreducedfonts\reducedfonts
459 \alphabeticreducedfonts
464 \let\alphabeticsmallfonts\smallfonts
466 \alphabeticsmallfonts
471 \let\alphabeticsmallerfonts\smallerfonts
473 \alphabeticsmallerfonts
478 \let\smallexamplefonts\smallfonts
483 \definetextfontsizexi
486 \fi % \iftxinativeunicodecapable
488 \fi % \ifx\txijapackage\thisisundefined