New feature: toggle visibility of mime buttons.
[more-wl.git] / doc / txi-ja.tex
blob77ec53e30aaa09c4fdffd80054e541767ea6eaed
1 %% TeX macros to handle Japanese texinfo files for Egg
2 %% Modified by Satoru Tomura (tomura@etl.go.jp)
3 %% 92.7.8 modified for Mule Ver.0.9.5 by K.Handa <handa@etl.go.jp>
4 %% To detect type of jTeX and its version, the method
5 %% posted by Takafumi SAKURAI <sakurai@math.metro-u.ac.jp> is used.
6 %% 92.9.30 modified for Mule Ver.0.9.6 by K.Handa <handa@etl.go.jp>
7 %% For unknown reason, \newif\ifNTTOLD should be before
8 %% \ifNTT.
9 %% 93.4.29 modified for Mule Ver.0.9.7 by N.Hikichi <hikichi@sra.co.jp>
10 %% 95.10.6 modified for texinfo 2.145 by K.Handa <handa@etl.go.jp>
11 %% 95.10.13 modified by J.Sato <jun@svgw.rd.casio.co.jp>
12 %% Support many Japanese oriented phrases (reference, etc)
13 %% 95.10.14 modified by K.Handa <handa@etl.go.jp>
14 %% Bug for handling index fixed.
15 %% 96.1.16 modified by J.Sato <jun@svgw.rd.casio.co.jp>
16 %% index with [] of @deffn.
17 %% 99.6.27 modified by Moimoi <fukusaka@xa2.so-net.ne.jp>
18 %% for texinfo 1999-05-25.6
19 %% 2000.2.23 modified by Moimoi <fukusaka@xa2.so-net.ne.jp>
20 %% for texinfo.tex 1999-09-25.10
21 %% 2000.4.11 modified by Moimoi <fukusaka@xa2.so-net.ne.jp>
22 %% for texinfo.tex 1999-09-25.10
23 %% fixed for jTeX/pTeX/MulTeX
24 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
25 %% 92.7.8 by K.Handa
26 \newif\ifNTT
27 \ifx\gtfam\undefined
28 \NTTtrue
29 \else
30 \NTTfalse
31 \fi
33 \newif\ifNTTOLD
34 \ifNTT
35 \ifx\jendlinetype\undefined
36 \NTTOLDtrue
37 \else
38 \NTTOLDfalse
39 \fi
40 \fi
42 \newif\ifMULTEX
43 \ifx\mlbaseversion\undefined
44 \MULTEXfalse
45 \else
46 \MULTEXtrue
47 \fi
49 %% TeX macros to handle Japanese texinfo files
50 %% 92/05/24 merged jtexinfo.tex (by H. Isozaki and N. Hikichi) into this
51 %% Created by Satoru Tomura (tomura@etl.go.jp)
53 \def\texinfoJPversion{2.145J.2+++}
54 %% ¤³¤ì¤Ï¤É¤¦ÊѤ¨¤ë¤Î¤¬¤¤¤¤¤Î¤«¤Ê¤¡
56 \ifNTT
57 \ifMULTEX
58 \message{txi-ja (Multi-Lingual TeX) package [Version \texinfoJPversion]:}
59 \else
60 \message{txi-ja (NTT JTeX) package [Version \texinfoJPversion]:}
61 \fi
62 \else
63 \message{txi-ja (ASCII JTeX) package [Version \texinfoJPversion]:}
64 \fi
65 \message{}
67 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
68 % Set up fixed words for Japanese.
69 \gdef\putwordAppendix{ÉÕÏ¿}
70 \gdef\putwordChapter{¾Ï}
71 \gdef\putwordfile{¥Õ¥¡¥¤¥ë}
72 \gdef\putwordin{in}
73 \gdef\putwordIndexIsEmpty{(º÷°ú¤¬¶õ¤Ç¤¹)}
74 \gdef\putwordIndexNonexistent{(º÷°ú¤¬¤¢¤ê¤Þ¤»¤ó)}
75 \gdef\putwordInfo{Info}
76 \gdef\putwordInstanceVariableof{Instance Variable of}
77 \gdef\putwordMethodon{Method on}
78 \gdef\putwordNoTitle{̵¥¿¥¤¥È¥ë}
79 \gdef\putwordof{of}
80 \gdef\putwordon{on}
81 \gdef\putwordpage{p.\gobble}
82 \gdef\putwordsection{Àá}
83 \gdef\putwordSection{Àá}
84 \gdef\putwordsee{»²¾È}
85 \gdef\putwordSee{¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤}
86 \gdef\putwordShortTOC{´ÊάÌܼ¡}
87 \gdef\putwordTOC{Ìܼ¡}
89 \global\newif\ifIGUMO\IGUMOfalse
90 \gdef\igumo{\IGUMOtrue}
91 \gdef\putwordMJan{ËÓ·î}
92 \gdef\putwordMFeb{Ç¡·î}
93 \gdef\putwordMMar{ÌïÀ¸}
94 \gdef\putwordMApr{±¬·î}
95 \gdef\putwordMMay{»©·î}
96 \gdef\putwordMJun{¿å̵·î}
97 \gdef\putwordMJul{ʸ·î}
98 \gdef\putwordMAug{ÍÕ·î}
99 \gdef\putwordMSep{Ĺ·î}
100 \gdef\putwordMOct{\ifIGUMO{¿Àºß·î}\else{¿À̵·î}\fi}
101 \gdef\putwordMNov{Áú·î}
102 \gdef\putwordMDec{»ÕÁö}
104 \gdef\putwordDefmac{¥Þ¥¯¥í}
105 \gdef\putwordDefspec{Special Form}
106 \gdef\putwordDefvar{ÊÑ¿ô}
107 \gdef\putwordDefopt{¥ª¥×¥·¥ç¥ó}
108 \gdef\putwordDeftypevar{ÊÑ¿ô}
109 \gdef\putwordDeffunc{´Ø¿ô}
110 \gdef\putwordDeftypefun{´Ø¿ô}
112 \def\today{\number\year ǯ \number\month ·î \number\day Æü}
114 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
116 % A4 size(Japanese) define, top margin = 20, bottom margin = 21,
117 % left margin = 30, right margin = 15
120 % ???
121 %\global\def\a4book{
122 %\global\lispnarrowing = 0.3in
123 %\global\baselineskip 12pt
124 %\global\parskip 3pt plus 1pt
126 %% for @cropmarks
127 %%\global\hsize = 6.5in
128 %% without @cropmarks
129 %\global\hsize = 6.7in
131 %\global\doublecolumnhsize=2.4in \global\doublecolumnvsize=15.0in
132 %\global\vsize=9.8in
133 %\global\tolerance=700
134 %\global\hfuzz=1pt
136 %\global\pagewidth=\hsize
137 %\global\pageheight=\vsize
138 %\global\font\ninett=cmtt9
140 %\global\let\smalllisp=\smalllispx
141 %\global\let\smallexample=\smalllispx
142 %\global\def\Esmallexample{\Esmalllisp}
144 %% for @cropmarks
145 %%\global\voffset = -1.0in
146 %%\global\hoffset = -0.2in
148 %% without @cropmarks
149 %\global\voffset = 0.0in
150 %%\global\hoffset = -1.0in
151 %\global\hoffset = -0.2in
154 % ÆüËܿ͹¥¤­¤Î¥®¥Ã¥·¥êµÍ¤Þ¤Ã¤¿»æ
155 % hack please !!
156 \global\def\afourbook{{\globaldefs = 1
157 \setleading{12pt}%
158 \parskip = 3pt plus 2pt minus 1pt
160 \internalpagesizes{248mm}{170mm}{0mm}{-5mm}{0mm}{8mm}%
162 \tolerance = 700
163 \hfuzz = 1pt
166 %% @smallbook for B5
167 %\global\def\smallbook{
168 %\outerhsize=182mm
169 %\outervsize=257mm
170 %\hoffset=-0.3in
171 %\voffset=-0.3in
173 %% These values for secheadingskip and subsecheadingskip are
174 %% experiments. RJC 7 Aug 1992
175 %\global\secheadingskip = 17pt plus 6pt minus 3pt
176 %\global\subsecheadingskip = 14pt plus 6pt minus 3pt
178 %\global\lispnarrowing = 0.3in
179 %\setleading{14pt}
180 %\advance\topskip by -7mm
181 %\global\parskip 3pt plus 1pt
182 %\global\hsize = 5.5in
183 %\global\vsize=8.25in
184 %\global\tolerance=700
185 %\global\hfuzz=1pt
186 %\global\contentsrightmargin=0pt
187 %\global\deftypemargin=0pt
188 %\global\defbodyindent=.5cm
190 %\global\pagewidth=\hsize
191 %\global\pageheight=\vsize
193 %\global\let\smalllisp=\smalllispx
194 %\global\let\smallexample=\smalllispx
195 %\global\def\Esmallexample{\Esmalllisp}
198 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
199 %% ÆüËܸì¥Õ¥©¥ó¥È¤Ë´Ø¤¹¤ë¸ß´¹À­
201 % Debian/Linux ¤Ç¥Ñ¥Ã¥±¡¼¥¸²½¤µ¤ì¤Æ¤¤¤ë
202 % NTT jTeX / ASCII pTeX / MulTeX(ÆüËܸì¸ÂÄê) ¤Î¤ß¹Íθ¤·¤Æ¤¤¤ë¡£
203 % (¾¤Î¥µ¥¤¥È¤ÎÆüËܸìTeX¤âƱÍͤÀ¤È´üÂÔ¤·¤Æ¤ë¡¢¡¢¡¢)
205 % xdvi/jdvi2kps ¤Ç»È¤Ã¤Æ¤¤¤ë vf ¤Î¼ïÎà¤Ï 5,6,7,8,9,10/min,goth ¡£
208 \ifNTT
209 %\global\kanjifiletype=20 % ??
210 \global\let\min=\dm\global\let\goth=\dg
211 \else
212 \global\let\dm=\min\global\let\dg=\goth
215 \def\uniJFont{%
216 \ifNTT%
217 \ifNTTOLD % 92.7.8 by K.Handa
218 \let\next=\jTeXoldJFont%
219 \else
220 \ifMULTEX
221 \let\next=\MulTeXJFont%
222 \else
223 \let\next=\jTeXJFont%
226 \else%
227 \let\next=\pTeXJFont%
228 \fi%
229 \next}
231 \def\jTeXoldJFont#1#2#3#4{%
232 \def\tempa{#2}
233 \def\tempb{dm}
234 \ifx\tempa\tempb% dm
235 \expandafter\gjfont\csname#1\endcsname=dm#3 scaled {#4}%
236 \else% dg
237 \expandafter\gjfont\csname#1\endcsname=dg#3 scaled {#4}%
238 \fi%
241 % backward compatibility for JTeX ¤Ç \gjfont ¤¬Ìµ¤¤¤È¤Ï MulTeX ¤á¡£
243 \def\MulTeXJFont#1#2#3#4{%
244 \def\tempa{#2}
245 \def\tempb{dm}
246 {\globaldefs=1%
247 \ifx\tempa\tempb% dm
248 \expandafter\jfont\csname#1\endcsname=dm#3 scaled #4%
249 \else% dg
250 \expandafter\jfont\csname#1\endcsname=dg#3 scaled #4%
251 \fi}%
254 \def\jTeXJFont#1#2#3#4{%
255 \def\tempa{#2}
256 \def\tempb{dm}
257 \ifx\tempa\tempb% dm
258 \expandafter\gjfont\csname#1\endcsname=dm#3 scaled #4%
259 \else% dg
260 \expandafter\gjfont\csname#1\endcsname=dg#3 scaled #4%
261 \fi%
264 \def\pTeXJFont#1#2#3#4{%
265 \def\tempa{#2}
266 \def\tempb{dm}
267 \ifx\tempa\tempb% dm
268 \global\expandafter\font\csname#1\endcsname=min#3 scaled #4%
269 \else% dg
270 \global\expandafter\font\csname#1\endcsname=goth#3 scaled #4%
275 % ÆüËܸì¥Õ¥©¥ó¥È¤ÎÄêµÁ
278 %% Fonts for text (10pt)
279 \uniJFont{textdm}{dm}{10}{1000}
280 \uniJFont{textdg}{dg}{10}{1000}
282 \global\setfont\textrm\rmshape{10}{1000}
283 \global\setfont\texttt\ttshape{10}{1000}
284 \global\setfont\textbf\bfshape{10}{1000}
285 \global\setfont\textit\itshape{10}{1000}
286 \global\setfont\textsl\slshape{10}{1000}
287 \global\setfont\textsf\sfshape{10}{1000}
288 \global\setfont\textsc\scshape{10}{1000}
289 \global\setfont\textttsl\ttslshape{10}{1000}
290 \global\font\texti=cmmi10
291 \global\font\textsy=cmsy10
293 %% Fonts for shortcontext (12pt)
294 \uniJFont{shortcontdm}{dm}{10}{\magstep1}
295 \uniJFont{shortcontdg}{dg}{10}{\magstep1}
297 %% Fonts for title (20.74pt)
298 \uniJFont{titledm}{dg}{10}{\magstep4}
300 %% Fonts for indics and small examples
301 \uniJFont{smalldm}{dm}{9}{1000}
302 \uniJFont{smalldg}{dg}{9}{1000}
304 %% Fonts for headings (17.28pt)
305 \uniJFont{chapdm}{dg}{10}{\magstep3}
306 \uniJFont{chapdg}{dg}{10}{\magstep3}
308 %% Fonts for sections (14.40pt)
309 \uniJFont{secdm}{dm}{10}{\magstep2}
310 \uniJFont{secdg}{dg}{10}{\magstep2}
312 %% Fonts for subsections (13.15pt)
313 \uniJFont{ssecdm}{dm}{10}{1315}
314 \uniJFont{ssecdg}{dg}{10}{1315}
316 % 95.11.2 by K.Handa
317 % Reduce Overfull/Underfull \hbox by relaxing these glues.
318 \ifNTT
319 \global\jintercharskip=0pt plus 0.5pt minus -0.2pt
320 \global\jasciikanjiskip=2.28854pt plus 0.5pt minus -0.2pt
323 %%%%
325 %% (^^;)
326 %\global\def\tendm{}
327 %\global\def\tendg{}
329 %% Re-definitions
330 \gdef\addjfont#1#2{%
331 \cslet{orig#1}{#1}%
332 \expandafter\def\csname#1\endcsname{\csname orig#1\endcsname\csname #2\endcsname}%
335 \def\gaddjfont#1#2{{\globaldefs=1\addjfont{#1}{#2}}}
337 \def\gaddjfonts#1#2{{\globaldefs=1%
338 \cslet{orig#1fonts}{#1fonts}%
339 \expandafter\def\csname#1fonts\endcsname{\csname orig#1fonts\endcsname\cslet{tendm}{#2dm}\cslet{tendg}{#2dg}}%
342 \gaddjfont{rm}{tendm}
343 \gaddjfont{bf}{tendg}
344 \gaddjfont{sl}{tendg}
345 \gaddjfont{authorrm}{secdm}
347 \gaddjfonts{text}{text}
348 \gaddjfonts{title}{title}
349 \gaddjfonts{chap}{chap}
350 \gaddjfonts{sec}{sec}
351 \gaddjfonts{subsec}{ssec}
352 \gaddjfonts{small}{small}
354 \global\let\subsubsecfonts = \subsecfonts
355 \global\let\subsecentryfonts = \textfonts
356 \global\let\subsubsecentryfonts = \textfonts
358 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
360 %% Utility routines.
363 \def\gaddsequence#1{%
364 \if#1[%]
365 \def\next{\gaddsequencez#1}%
366 \else%
367 \def\next{\gaddsequencez[0]{#1}}%
368 \fi%
369 \next%
372 \def\gaddsequencez[#1]#2{%
373 \if#2[%]
374 \def\next{\gaddsequencezz[#1]#2}%
375 \else%
376 \def\next{\gaddsequencezz[#1][lb]{#2}}%
377 \fi%
378 \next%
381 \newif\ifL\newif\ifB
382 \def\aslb{\Ltrue\Btrue}
383 \def\asla{\Ltrue\Bfalse}
384 \def\asgb{\Lfalse\Btrue}
385 \def\asga{\Lfalse\Bfalse}
388 %% ±ø¤¤¥Þ¥¯¥í¤À¤Ê¤¡¡Á
391 \def\gaddsequencezz[#1][#2]#3#4{%
392 \global\cslet{orig#3}{#3}%
393 \csname as#2\endcsname%
394 \ifcase#1%
395 \ifL
396 \ifB
397 \expandafter\gdef\csname#3\endcsname{{#4\csname orig#3\endcsname}}%
398 \else
399 \expandafter\gdef\csname#3\endcsname{{\csname orig#3\endcsname#4}}%
401 \else
402 \ifB
403 \expandafter\gdef\csname#3\endcsname{#3\csname orig#3\endcsname}%
404 \else
405 \expandafter\gdef\csname#3\endcsname{\csname orig#3\endcsname#3}%
408 \or
409 \ifL
410 \ifB
411 \expandafter\gdef\csname#3\endcsname##1{{#4\csname orig#3\endcsname{##1}}}%
412 \else
413 \expandafter\gdef\csname#3\endcsname##1{{\csname orig#3\endcsname{##1}#4}}%
415 \else
416 \ifB
417 \expandafter\gdef\csname#3\endcsname##1{#4\csname orig#3\endcsname{##1}}%
418 \else
419 \expandafter\gdef\csname#3\endcsname##1{\csname orig#3\endcsname{##1}#4}%
425 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
427 \gaddsequence[1]{initial}{%
428 \addjfont{secbf}{secdg}%
431 \gaddsequence{summarycontents}{%
432 \addjfont{shortcontrm}{shortcontdm}%
433 \addjfont{shortcontbf}{shortcontdg}%
434 \addjfont{shortcontsl}{shortcontdg}%
436 \global\let\shortcontents = \summarycontents
438 \gaddsequence{shorttitlepagezzz}{%
439 \addjfont{chaprm}{chapdm}%
445 \global\def\thischapterspace{\hskip \SETthischapterspace em}
446 \set thischapterspace 1
448 \gaddsequence[1][ga]{chapterzzz}{%
449 \xdef\thischapter{Âè\the\chapno\putwordChapter{}\thischapterspace\noexpand\thischaptername}%
452 \gaddsequence[1][ga]{appendixzzz}{%
453 \xdef\thischapter{\putwordAppendix{}\appendixletter\thischapterspace\noexpand\thischaptername}%
456 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
461 \global\def\inforefzzz #1,#2,#3,#4**{\putwordInfo{}\putwordfile{} \file{\ignorespaces #3{}}, ¥Î¡¼¥É\samp{\ignorespaces#1{}}\putwordSee{}}
463 \global\def\pxref#1{\xrefX[#1,,,,,,,]\putwordsee{}}
464 \global\def\xref#1{\xrefX[#1,,,,,,,]\putwordSee{}}
466 \global\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
467 \unsepspaces
468 \def\printedmanual{\ignorespaces #5}%
469 \def\printednodename{\ignorespaces #3}%
470 \setbox1=\hbox{\printedmanual}%
471 \setbox0=\hbox{\printednodename}%
472 \ifdim \wd0 = 0pt
473 % No printed node name was explicitly given.
474 \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
475 % Use the node name inside the square brackets.
476 \def\printednodename{\ignorespaces #1}%
477 \else
478 % Use the actual chapter/section title appear inside
479 % the square brackets. Use the real section title if we have it.
480 \ifdim \wd1 > 0pt
481 % It is in another manual, so we don't have it.
482 \def\printednodename{\ignorespaces #1}%
483 \else
484 \ifhavexrefs
485 % We know the real title if we have the xref values.
486 \def\printednodename{\refx{#1-title}{}}%
487 \else
488 % Otherwise just copy the Info node name.
489 \def\printednodename{\ignorespaces #1}%
490 \fi%
495 % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
496 % insert empty discretionaries after hyphens, which means that it will
497 % not find a line break at a hyphen in a node names. Since some manuals
498 % are best written with fairly long node names, containing hyphens, this
499 % is a loss. Therefore, we give the text of the node name again, so it
500 % is as if TeX is seeing it for the first time.
501 % \ifpdf
502 % \leavevmode
503 % \getfilename{#4}%
504 % \ifnum\filenamelength>0
505 % \startlink attr{/Border [0 0 0]}%
506 % goto file{\the\filename.pdf} name{#1@}%
507 % \else
508 % \startlink attr{/Border [0 0 0]}%
509 % goto name{#1@}%
510 % \fi
511 % \linkcolor
512 % \fi
514 \ifdim \wd1 > 0pt
515 % \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}%
516 \cite{\printedmanual}¤Î``\printednodename''\putwordsection{}%
517 \else
518 % _ (for example) has to be the character _ for the purposes of the
519 % control sequence corresponding to the node, but it has to expand
520 % into the usual \leavevmode...\vrule stuff for purposes of
521 % printing. So we \turnoffactive for the \refx-snt, back on for the
522 % printing, back off for the \refx-pg.
523 {\normalturnoffactive
524 % Only output a following space if the -snt ref is nonempty; for
525 % @unnumbered and @anchor, it won't be.
526 \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
527 % \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
528 \ifdim \wd2 > 0pt \refx{#1-snt}\fi
530 % [mynode],
531 ¡Ö\printednodename ¡×%
532 % [\printednodename],\space
533 % page 3
534 \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
536 \endlink
537 \endgroup}
539 \global\def\Ysectionnumberandtype{%
540 \ifnum\secno=0 Âè\the\chapno\putwordChapter%
541 \else \ifnum \subsecno=0 \the\chapno.\the\secno\putwordSection%
542 \else \ifnum \subsubsecno=0 %
543 \the\chapno.\the\secno.\the\subsecno\putwordSection%
544 \else %
545 \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno\putwordSection%
546 \fi \fi \fi }
548 \global\def\Yappendixletterandtype{%
549 \ifnum\secno=0 \putwordAppendix\xreftie'char\the\appendixno{}%
550 \else \ifnum \subsecno=0 \xreftie'char\the\appendixno.\the\secno\putwordSection %
551 \else \ifnum \subsubsecno=0 %
552 \xreftie'char\the\appendixno.\the\secno.\the\subsecno\putwordSection %
553 \else %
554 \xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno\putwordSection %
555 \fi \fi \fi }
557 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
559 % @dfn
560 \global\def\doublebracket#1{¡Ø#1¡Ù}
561 \global\let\dfn=\doublebracket
563 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%