OSDN Git Service

26d6129fa8daee0576e1d7d0724c3e77bb328374
[linuxjm/jm.git] / info / build-aux / txi-ja.tex
1 % txi-ja.tex -- Japanese translations and font definitions for texinfo.tex.
2 %
3 % Copyright 1999, 2007, 2008, 2016 Free Software Foundation, Inc.
4
5 % This program is free software; you can redistribute it and/or modify
6 % it under the terms of the GNU General Public License as published by
7 % the Free Software Foundation; either version 3 of the license, or (at
8 % your option) any later version.
9 %
10 % This program is distributed in the hope that it will be useful,
11 % but WITHOUT ANY WARRANTY; without even the implied warranty of
12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 % GNU General Public License for more details.
14 %
15 % You should have received a copy of the GNU General Public License
16 % along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 %
18 % Written by Masamichi Hosoda, 5 May 2016, <trueroad@trueroad.jp>
19
20 \txisetlanguage{USenglish}{2}{3}
21
22 \plainnonfrenchspacing
23
24 \gdef\putwordAppendix{付録}
25 \gdef\putwordChapter{Chapter}
26 \gdef\putworderror{エラー}
27 \gdef\putwordfile{ファイル}
28 \gdef\putwordin{in}
29 \gdef\putwordIndexIsEmpty{(インデックスが空です)}
30 \gdef\putwordIndexNonexistent{(インデックスがありません)}
31 \gdef\putwordInfo{Info}
32 \gdef\putwordInstanceVariableof{Instance Variable of}
33 \gdef\putwordMethodon{Method on}
34 \gdef\putwordNoTitle{無題}
35 \gdef\putwordof{of}
36 \gdef\putwordon{on}
37 \gdef\putwordpage{p.}
38 \gdef\putwordsection{section}
39 \gdef\putwordSection{Section}
40 \gdef\putwordsee{see}
41 \gdef\putwordSee{See}
42 \gdef\putwordShortTOC{簡単な目次}
43 \gdef\putwordTOC{目次}
44 % And for MODIFIED VERSION, texinfo-modified.tex
45 \gdef\putwordChapterPre{} % "第"をつけるなら "\gdef\putwordChapterPre{第@tie }" と定義すること。
46 \gdef\putwordChapterSuf{章}
47 \gdef\putwordSectionPre{} % "第"について同上。
48 \gdef\putwordSectionSuf{節}
49 \gdef\putwordAppendixPre{付録}
50 \gdef\putwordAppendixChapterSuf{章}
51 \gdef\putwordAppendixSectionSuf{章}
52 \gdef\putwordSeeSuf{参照}
53 %
54 \gdef\putwordMJan{1月}
55 \gdef\putwordMFeb{2月}
56 \gdef\putwordMMar{3月}
57 \gdef\putwordMApr{4月}
58 \gdef\putwordMMay{5月}
59 \gdef\putwordMJun{6月}
60 \gdef\putwordMJul{7月}
61 \gdef\putwordMAug{8月}
62 \gdef\putwordMSep{9月}
63 \gdef\putwordMOct{10月}
64 \gdef\putwordMNov{11月}
65 \gdef\putwordMDec{12月}
66 %
67 \gdef\putwordDefmac{マクロ}
68 \gdef\putwordDefspec{特殊フォーム}
69 \gdef\putwordDefvar{変数}
70 \gdef\putwordDefopt{ユーザオプション}
71 \gdef\putwordDeffunc{関数}
72
73 % Produces Year Month Day style of output.
74 \def\today{%
75   \number\year 年\space
76   \ifcase\month
77   \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
78   \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
79   \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
80   \fi
81   \space\number\day 日}
82
83
84 %
85 % Japanese font definitions
86 %
87
88 \ifx\txijapackage\thisisundefined
89   \errmessage{Required CJK package is not found.
90   Use `texinfo-ja.tex' instead of `texinfo.tex'}
91 \else
92
93   %
94   % For LuaTeX
95   %
96   \ifx\luatexversion\thisisundefined
97   \else
98     % Definitions for a main text size of 11pt.  (The default in Texinfo.)
99     % Japanese font size is muliplied by 0.962216.
100     \let\definealphabetictextfontsizexi\definetextfontsizexi
101     \gdef\definetextfontsizexi{%
102       % Text fonts (11.2pt, magstep1).
103       \jfont\textmc{file:ipaexm.ttf:jfm=ujis} at 10.78pt
104       \jfont\textgt{file:ipaexg.ttf:jfm=ujis} at 10.78pt
105
106       % Fonts for indices, footnotes, small examples (9pt).
107       \jfont\smallmc{file:ipaexm.ttf:jfm=ujis} at 8.66pt
108       \jfont\smallgt{file:ipaexg.ttf:jfm=ujis} at 8.66pt
109
110       % Fonts for small examples (8pt).
111       \jfont\smallermc{file:ipaexm.ttf:jfm=ujis} at 7.70pt
112       \jfont\smallergt{file:ipaexg.ttf:jfm=ujis} at 7.70pt
113
114       % Fonts for title page (20.4pt):
115       \jfont\titlemc{file:ipaexm.ttf:jfm=ujis} at 19.63pt
116       \jfont\titlegt{file:ipaexg.ttf:jfm=ujis} at 19.63pt
117
118       % Chapter (and unnumbered) fonts (17.28pt).
119       \jfont\chapmc{file:ipaexm.ttf:jfm=ujis} at 16.63pt
120       \jfont\chapgt{file:ipaexg.ttf:jfm=ujis} at 16.63pt
121
122       % Section fonts (14.4pt).
123       \jfont\secmc{file:ipaexm.ttf:jfm=ujis} at 13.86pt
124       \jfont\secgt{file:ipaexg.ttf:jfm=ujis} at 13.86pt
125
126       % Subsection fonts (13.15pt).
127       \jfont\ssecmc{file:ipaexm.ttf:jfm=ujis} at 12.65pt
128       \jfont\ssecgt{file:ipaexg.ttf:jfm=ujis} at 12.65pt
129
130       % Reduced fonts for @acro in text (10pt).
131       \jfont\reducedmc{file:ipaexm.ttf:jfm=ujis} at 9.62pt
132       \jfont\reducedgt{file:ipaexg.ttf:jfm=ujis} at 9.62pt
133
134       % Fonts for short table of contents.
135       \jfont\shortcontmc{file:ipaexm.ttf:jfm=ujis} at 11.55pt
136       \jfont\shortcontgt{file:ipaexg.ttf:jfm=ujis} at 11.55pt
137
138       \definealphabetictextfontsizexi
139     }
140
141     % Definitions for a main text size of 10pt.
142     % Japanese font size is muliplied by 0.962216.
143     \let\definealphabetictextfontsizex\definetextfontsizex
144     \gdef\definetextfontsizex{%
145       % Text fonts (10pt).
146       \jfont\textmc{file:ipaexm.ttf:jfm=ujis} at 9.62pt
147       \jfont\textgt{file:ipaexg.ttf:jfm=ujis} at 9.62pt
148
149       % Fonts for indices, footnotes, small examples (9pt).
150       \jfont\smallmc{file:ipaexm.ttf:jfm=ujis} at 8.66pt
151       \jfont\smallgt{file:ipaexg.ttf:jfm=ujis} at 8.66pt
152
153       % Fonts for small examples (8pt).
154       \jfont\smallermc{file:ipaexm.ttf:jfm=ujis} at 7.70pt
155       \jfont\smallergt{file:ipaexg.ttf:jfm=ujis} at 7.70pt
156
157       % Fonts for title page (20.4pt):
158       \jfont\titlemc{file:ipaexm.ttf:jfm=ujis} at 19.63pt
159       \jfont\titlegt{file:ipaexg.ttf:jfm=ujis} at 19.63pt
160
161       % Chapter fonts (14.4pt).
162       \jfont\chapmc{file:ipaexm.ttf:jfm=ujis} at 13.86pt
163       \jfont\chapgt{file:ipaexg.ttf:jfm=ujis} at 13.86pt
164
165       % Section fonts (12pt).
166       \jfont\secmc{file:ipaexm.ttf:jfm=ujis} at 11.55pt
167       \jfont\secgt{file:ipaexg.ttf:jfm=ujis} at 11.55pt
168
169       % Subsection fonts (10pt).
170       \jfont\ssecmc{file:ipaexm.ttf:jfm=ujis} at 9.62pt
171       \jfont\ssecgt{file:ipaexg.ttf:jfm=ujis} at 9.62pt
172
173       % Reduced fonts for @acro in text (9pt).
174       \jfont\reducedmc{file:ipaexm.ttf:jfm=ujis} at 8.66pt
175       \jfont\reducedgt{file:ipaexg.ttf:jfm=ujis} at 8.66pt
176
177       % Fonts for short table of contents.
178       \jfont\shortcontmc{file:ipaexm.ttf:jfm=ujis} at 11.55pt
179       \jfont\shortcontgt{file:ipaexg.ttf:jfm=ujis} at 11.55pt
180
181       \definealphabetictextfontsizex
182     }
183
184     % Ignore LuaTeX-ja added line end comment
185     % https://osdn.jp/ticket/browse.php?group_id=5593&tid=36096
186     %
187     % Re-define texinfo.tex's \parseargusing
188     \def\parseargusing#1#2{%
189       \def\argtorun{#2}%
190       \begingroup
191         \ifx\ltjlineendcomment\thisisundefined
192           % Ignore U+FFFFF for LuaTeX-ja <= 20160208.0
193           \catcode"FFFFF=9
194         \else
195           % Ignore the character \ltjlineendcomment for LuaTeX-ja > 20160208.0
196           \catcode\ltjlineendcomment=9
197         \fi
198         \obeylines
199         \spaceisspace
200         #1%
201         \parseargline\empty% Insert the \empty token, see \finishparsearg below.
202     }
203     % Re-define texinfo.tex's \c
204     \def\c{\begingroup \catcode`\^^M=\active%
205       \ifx\ltjlineendcomment\thisisundefined
206         % Ignore U+FFFFF for LuaTeX-ja <= 20160208.0
207         \catcode"FFFFF=9%
208       \else
209         % Ignore the character \ltjlineendcomment for LuaTeX-ja > 20160208.0
210         \catcode\ltjlineendcomment=9%
211       \fi
212     \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
213     \cxxx}
214     % Re-let \c related macro
215     \let\comment=\c
216     % Re-let \comment related macros
217     \let\setfilename=\comment
218     \let\dircategory=\comment
219     \let\definfoenclose=\comment
220     \let\footnotestyle=\comment
221   \fi % LuaTeX
222
223   %
224   % For XeTeX
225   %
226   \ifx\XeTeXrevision\thisisundefined
227   \else
228     % Fix some Japanese character class
229     % (unicode-letters.tex is wrong.)
230     \def\do#1{\XeTeXcharclass"#1=1 }
231     \do{3041}\do{3043}\do{3045}\do{3047}\do{3049}\do{3063}
232     \do{3083}\do{3085}\do{3087}\do{308E}\do{3095}\do{3096}
233     \do{30A1}\do{30A3}\do{30A5}\do{30A7}\do{30A9}\do{30C3}
234     \do{30E3}\do{30E5}\do{30E7}\do{30EE}\do{30F5}\do{30F6}
235     \do{30FC}\do{31F0}\do{31F1}\do{31F2}\do{31F3}\do{31F4}
236     \do{31F5}\do{31F6}\do{31F7}\do{31F8}\do{31F9}\do{31FA}
237     \do{31FB}\do{31FC}\do{31FD}\do{31FE}\do{31FF}
238
239     % Add some character class
240     \do{2015}\do{2016}\do{2025}\do{2030}\do{2032}\do{2033}
241     \do{203B}\do{2103}\do{212B}
242
243     \do{2500}\do{2501}\do{2502}\do{2503}\do{250C}\do{250F}
244     \do{2510}\do{2513}\do{2514}\do{2517}\do{2518}\do{251B}
245     \do{251C}\do{251D}\do{2520}\do{2523}\do{2524}\do{2525}
246     \do{2528}\do{252B}\do{252C}\do{252F}\do{2530}\do{2533}
247     \do{2534}\do{2537}\do{2538}\do{253B}\do{253C}\do{253F}
248     \do{2542}\do{254B}
249
250     \do{25A0}\do{25A1}\do{25B2}\do{25B3}\do{25BC}\do{25BD}
251     \do{25C6}\do{25C7}\do{25CB}\do{25CE}\do{25CF}\do{25EF}
252     \do{2605}\do{2606}\do{2640}\do{2642}
253
254     \do{3000}
255
256     % Setting Japanese font instead of Chinese font
257     \def\setjafont#1{%
258       \let\zhfont#1\let\zhpunctfont#1%
259       \let\zhextafont#1\let\zhextbfont#1%
260     }
261
262     % Definitions for a main text size of 11pt.  (The default in Texinfo.)
263     % Japanese font size is muliplied by 0.962216.
264     \let\definealphabetictextfontsizexi\definetextfontsizexi
265     \gdef\definetextfontsizexi{%
266       % Text fonts (11.2pt, magstep1).
267       \font\textmczzz"[ipaexm.ttf]:mapping=tex-text" at 10.78pt
268       \font\textgtzzz"[ipaexg.ttf]:mapping=tex-text" at 10.78pt
269       \def\textmc{\setjafont\textmczzz}
270       \def\textgt{\setjafont\textgtzzz}
271
272       % Fonts for indices, footnotes, small examples (9pt).
273       \font\smallmczzz"[ipaexm.ttf]:mapping=tex-text" at 8.66pt
274       \font\smallgtzzz"[ipaexg.ttf]:mapping=tex-text" at 8.66pt
275       \def\smallmc{\setjafont\smallmczzz}
276       \def\smallgt{\setjafont\smallgtzzz}
277
278       % Fonts for small examples (8pt).
279       \font\smallermczzz"[ipaexm.ttf]:mapping=tex-text" at 7.70pt
280       \font\smallergtzzz"[ipaexg.ttf]:mapping=tex-text" at 7.70pt
281       \def\smallermc{\setjafont\smallermczzz}
282       \def\smallergt{\setjafont\smallergtzzz}
283
284       % Fonts for title page (20.4pt):
285       \font\titlemczzz"[ipaexm.ttf]:mapping=tex-text" at 19.63pt
286       \font\titlegtzzz"[ipaexg.ttf]:mapping=tex-text" at 19.63pt
287       \def\titlemc{\setjafont\titlemczzz}
288       \def\titlegt{\setjafont\titlegtzzz}
289
290       % Chapter (and unnumbered) fonts (17.28pt).
291       \font\chapmczzz"[ipaexm.ttf]:mapping=tex-text" at 16.63pt
292       \font\chapgtzzz"[ipaexg.ttf]:mapping=tex-text" at 16.63pt
293       \def\chapmc{\setjafont\chapmczzz}
294       \def\chapgt{\setjafont\chapgtzzz}
295
296       % Section fonts (14.4pt).
297       \font\secmczzz"[ipaexm.ttf]:mapping=tex-text" at 13.86pt
298       \font\secgtzzz"[ipaexg.ttf]:mapping=tex-text" at 13.86pt
299       \def\secmc{\setjafont\secmczzz}
300       \def\secgt{\setjafont\secgtzzz}
301
302       % Subsection fonts (13.15pt).
303       \font\ssecmczzz"[ipaexm.ttf]:mapping=tex-text" at 12.65pt
304       \font\ssecgtzzz"[ipaexg.ttf]:mapping=tex-text" at 12.65pt
305       \def\ssecmc{\setjafont\ssecmczzz}
306       \def\ssecgt{\setjafont\ssecgtzzz}
307
308       % Reduced fonts for @acro in text (10pt).
309       \font\reducedmczzz"[ipaexm.ttf]:mapping=tex-text" at 9.62pt
310       \font\reducedgtzzz"[ipaexg.ttf]:mapping=tex-text" at 9.62pt
311       \def\reducedmc{\setjafont\reducedmczzz}
312       \def\reducedgt{\setjafont\reducedgtzzz}
313
314       % Fonts for short table of contents.
315       \font\shortcontmczzz"[ipaexm.ttf]:mapping=tex-text" at 11.55pt
316       \font\shortcontgtzzz"[ipaexg.ttf]:mapping=tex-text" at 11.55pt
317       \def\shortcontmc{\setjafont\shortcontmczzz}
318       \def\shortcontgt{\setjafont\shortcontgtzzz}
319
320       \definealphabetictextfontsizexi
321     }
322
323     % Definitions for a main text size of 10pt.
324     % Japanese font size is muliplied by 0.962216.
325     \let\definealphabetictextfontsizex\definetextfontsizex
326     \gdef\definetextfontsizex{%
327       % Text fonts (10pt).
328       \font\textmczzz"[ipaexm.ttf]:mapping=tex-text" at 9.62pt
329       \font\textgtzzz"[ipaexg.ttf]:mapping=tex-text" at 9.62pt
330       \def\textmc{\setjafont\textmczzz}
331       \def\textgt{\setjafont\textgtzzz}
332
333       % Fonts for indices, footnotes, small examples (9pt).
334       \font\smallmczzz"[ipaexm.ttf]:mapping=tex-text" at 8.66pt
335       \font\smallgtzzz"[ipaexg.ttf]:mapping=tex-text" at 8.66pt
336       \def\smallmc{\setjafont\smallmczzz}
337       \def\smallgt{\setjafont\smallgtzzz}
338
339       % Fonts for small examples (8pt).
340       \font\smallermczzz"[ipaexm.ttf]:mapping=tex-text" at 7.70pt
341       \font\smallergtzzz"[ipaexg.ttf]:mapping=tex-text" at 7.70pt
342       \def\smallermc{\setjafont\smallermczzz}
343       \def\smallergt{\setjafont\smallergtzzz}
344
345       % Fonts for title page (20.4pt):
346       \font\titlemczzz"[ipaexm.ttf]:mapping=tex-text" at 19.63pt
347       \font\titlegtzzz"[ipaexg.ttf]:mapping=tex-text" at 19.63pt
348       \def\titlemc{\setjafont\titlemczzz}
349       \def\titlegt{\setjafont\titlegtzzz}
350
351       % Chapter fonts (14.4pt).
352       \font\chapmczzz"[ipaexm.ttf]:mapping=tex-text" at 13.86pt
353       \font\chapgtzzz"[ipaexg.ttf]:mapping=tex-text" at 13.86pt
354       \def\chapmc{\setjafont\chapmczzz}
355       \def\chapgt{\setjafont\chapgtzzz}
356
357       % Section fonts (12pt).
358       \font\secmczzz"[ipaexm.ttf]:mapping=tex-text" at 11.55pt
359       \font\secgtzzz"[ipaexg.ttf]:mapping=tex-text" at 11.55pt
360       \def\secmc{\setjafont\secmczzz}
361       \def\secgt{\setjafont\secgtzzz}
362
363       % Subsection fonts (10pt).
364       \font\ssecmczzz"[ipaexm.ttf]:mapping=tex-text" at 9.62pt
365       \font\ssecgtzzz"[ipaexg.ttf]:mapping=tex-text" at 9.62pt
366       \def\ssecmc{\setjafont\ssecmczzz}
367       \def\ssecgt{\setjafont\ssecgtzzz}
368
369       % Reduced fonts for @acro in text (9pt).
370       \font\reducedmczzz"[ipaexm.ttf]:mapping=tex-text" at 8.66pt
371       \font\reducedgtzzz"[ipaexg.ttf]:mapping=tex-text" at 8.66pt
372       \def\reducedmc{\setjafont\reducedmczzz}
373       \def\reducedgt{\setjafont\reducedgtzzz}
374
375       % Fonts for short table of contents.
376       \font\shortcontmczzz"[ipaexm.ttf]:mapping=tex-text" at 11.55pt
377       \font\shortcontgtzzz"[ipaexg.ttf]:mapping=tex-text" at 11.55pt
378       \def\shortcontmc{\setjafont\shortcontmczzz}
379       \def\shortcontgt{\setjafont\shortcontgtzzz}
380
381       \definealphabetictextfontsizex
382     }
383
384     % Japanese line break settings
385     \XeTeXlinebreaklocale "ja_JP"
386     \XeTeXlinebreakskip=0em plus 0.1em minus 0.01em
387     \XeTeXlinebreakpenalty=0
388
389     % For copy & paste Unicode characters (XeTeX 0.99995+)
390     \ifx\XeTeXgenerateactualtext\thisisundefined
391     \else
392       \XeTeXgenerateactualtext=1
393     \fi
394
395   \fi % XeTeX
396
397   \iftxinativeunicodecapable
398
399     % Sync fonts
400
401     \let\alphabeticrm\rm
402     \gdef\rm{\alphabeticrm\tenmc}
403
404     \let\alphabeticit\it
405     \gdef\it{\alphabeticit\tenmc}
406
407     \let\alphabeticsl\sl
408     \gdef\sl{\alphabeticsl\tengt}
409
410     \let\alphabeticbf\bf
411     \gdef\bf{\alphabeticbf\tengt}
412
413     \let\alphabetictt\tt
414     \gdef\tt{\alphabetictt\tengt}
415
416     % Add fonts
417
418     \let\alphabetictextfonts\textfonts
419     \gdef\textfonts{%
420       \alphabetictextfonts
421       \let\tenmc\textmc
422       \let\tengt\textgt
423     }
424
425     \let\alphabetictitlefonts\titlefonts
426     \gdef\titlefonts{%
427       \alphabetictitlefonts
428       \let\tenmc\titlemc
429       \let\tengt\titlegt
430     }
431
432     \let\alphabeticchapfonts\chapfonts
433     \gdef\chapfonts{%
434       \alphabeticchapfonts
435       \let\tenmc\chapmc
436       \let\tengt\chapgt
437     }
438
439     \let\alphabeticsecfonts\secfonts
440     \gdef\secfonts{%
441       \alphabeticsecfonts
442       \let\tenmc\secmc
443       \let\tengt\secgt
444     }
445
446     \let\alphabeticsubsecfonts\subsecfonts
447     \gdef\subsecfonts{%
448       \alphabeticsubsecfonts
449       \let\tenmc\ssecmc
450       \let\tengt\ssecgt
451     }
452
453     \global\let\subsubsecfonts\subsecfonts
454
455     \let\alphabeticreducedfonts\reducedfonts
456     \gdef\reducedfonts{%
457       \alphabeticreducedfonts
458       \let\tenmc\reducedmc
459       \let\tengt\reducedgt
460     }
461
462     \let\alphabeticsmallfonts\smallfonts
463     \gdef\smallfonts{%
464       \alphabeticsmallfonts
465       \let\tenmc\smallmc
466       \let\tengt\smallgt
467     }
468
469     \let\alphabeticsmallerfonts\smallerfonts
470     \gdef\smallerfonts{%
471       \alphabeticsmallerfonts
472       \let\tenmc\smallermc
473       \let\tengt\smallergt
474     }
475
476     \let\smallexamplefonts\smallfonts
477
478     % Reset fonts
479
480     \globaldefs = 1
481     \definetextfontsizexi
482     \globaldefs = 0
483
484   \fi % \iftxinativeunicodecapable
485
486 \fi % \ifx\txijapackage\thisisundefined