1 % txi-ja.tex -- Japanese translations and font definitions for texinfo.tex.
3 % Copyright 1999, 2007, 2008, 2016 Free Software Foundation, Inc.
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.
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.
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/>.
18 % Written by Masamichi Hosoda, 5 May 2016, <trueroad@trueroad.jp>
20 \txisetlanguage{USenglish}{2}{3}
22 \plainnonfrenchspacing
24 \gdef\putwordAppendix{付録}
25 \gdef\putwordChapter{Chapter}
26 \gdef\putworderror{エラー}
27 \gdef\putwordfile{ファイル}
29 \gdef\putwordIndexIsEmpty{(インデックスが空です)}
30 \gdef\putwordIndexNonexistent{(インデックスがありません)}
31 \gdef\putwordInfo{Info}
32 \gdef\putwordInstanceVariableof{Instance Variable of}
33 \gdef\putwordMethodon{Method on}
34 \gdef\putwordNoTitle{無題}
38 \gdef\putwordsection{section}
39 \gdef\putwordSection{Section}
42 \gdef\putwordShortTOC{簡単な目次}
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{参照}
63 \gdef\putwordMOct{10月}
64 \gdef\putwordMNov{11月}
65 \gdef\putwordMDec{12月}
67 \gdef\putwordDefmac{マクロ}
68 \gdef\putwordDefspec{特殊フォーム}
69 \gdef\putwordDefvar{変数}
70 \gdef\putwordDefopt{ユーザオプション}
71 \gdef\putwordDeffunc{関数}
73 % Produces Year Month Day style of output.
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
85 % Japanese font definitions
88 \ifx\txijapackage\thisisundefined
89 \errmessage{Required CJK package is not found.
90 Use `texinfo-ja.tex' instead of `texinfo.tex'}
96 \ifx\luatexversion\thisisundefined
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
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
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
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
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
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
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
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
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
138 \definealphabetictextfontsizexi
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{%
146 \jfont\textmc{file:ipaexm.ttf:jfm=ujis} at 9.62pt
147 \jfont\textgt{file:ipaexg.ttf:jfm=ujis} at 9.62pt
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
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
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
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
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
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
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
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
181 \definealphabetictextfontsizex
184 % Ignore LuaTeX-ja added line end comment
185 % https://osdn.jp/ticket/browse.php?group_id=5593&tid=36096
187 % Re-define texinfo.tex's \parseargusing
188 \def\parseargusing#1#2{%
191 \ifx\ltjlineendcomment\thisisundefined
192 % Ignore U+FFFFF for LuaTeX-ja <= 20160208.0
195 % Ignore the character \ltjlineendcomment for LuaTeX-ja > 20160208.0
196 \catcode\ltjlineendcomment=9
201 \parseargline\empty% Insert the \empty token, see \finishparsearg below.
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
209 % Ignore the character \ltjlineendcomment for LuaTeX-ja > 20160208.0
210 \catcode\ltjlineendcomment=9%
212 \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
214 % Re-let \c related macro
216 % Re-let \comment related macros
217 \let\setfilename=\comment
218 \let\dircategory=\comment
219 \let\definfoenclose=\comment
220 \let\footnotestyle=\comment
226 \ifx\XeTeXrevision\thisisundefined
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}
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}
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}
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}
256 % Setting Japanese font instead of Chinese font
258 \let\zhfont#1\let\zhpunctfont#1%
259 \let\zhextafont#1\let\zhextbfont#1%
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}
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}
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}
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}
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}
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}
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}
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}
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}
320 \definealphabetictextfontsizexi
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{%
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}
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}
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}
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}
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}
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}
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}
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}
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}
381 \definealphabetictextfontsizex
384 % Japanese line break settings
385 \XeTeXlinebreaklocale "ja_JP"
386 \XeTeXlinebreakskip=0em plus 0.1em minus 0.01em
387 \XeTeXlinebreakpenalty=0
389 % For copy & paste Unicode characters (XeTeX 0.99995+)
390 \ifx\XeTeXgenerateactualtext\thisisundefined
392 \XeTeXgenerateactualtext=1
397 \iftxinativeunicodecapable
402 \gdef\rm{\alphabeticrm\tenmc}
405 \gdef\it{\alphabeticit\tenmc}
408 \gdef\sl{\alphabeticsl\tengt}
411 \gdef\bf{\alphabeticbf\tengt}
414 \gdef\tt{\alphabetictt\tengt}
418 \let\alphabetictextfonts\textfonts
425 \let\alphabetictitlefonts\titlefonts
427 \alphabetictitlefonts
432 \let\alphabeticchapfonts\chapfonts
439 \let\alphabeticsecfonts\secfonts
446 \let\alphabeticsubsecfonts\subsecfonts
448 \alphabeticsubsecfonts
453 \global\let\subsubsecfonts\subsecfonts
455 \let\alphabeticreducedfonts\reducedfonts
457 \alphabeticreducedfonts
462 \let\alphabeticsmallfonts\smallfonts
464 \alphabeticsmallfonts
469 \let\alphabeticsmallerfonts\smallerfonts
471 \alphabeticsmallerfonts
476 \let\smallexamplefonts\smallfonts
481 \definetextfontsizexi
484 \fi % \iftxinativeunicodecapable
486 \fi % \ifx\txijapackage\thisisundefined