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
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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
35 \ifx\jendlinetype\undefined
43 \ifx\mlbaseversion\undefined
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 %% ¤³¤ì¤Ï¤É¤¦ÊѤ¨¤ë¤Î¤¬¤¤¤¤¤Î¤«¤Ê¤¡
58 \message{txi-ja (Multi-Lingual TeX) package [Version \texinfoJPversion]:}
60 \message{txi-ja (NTT JTeX) package [Version \texinfoJPversion]:}
63 \message{txi-ja (ASCII JTeX) package [Version \texinfoJPversion]:}
67 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
68 % Set up fixed words for Japanese.
69 \gdef\putwordAppendix{ÉÕÏ¿}
70 \gdef\putwordChapter{¾Ï}
71 \gdef\putwordfile{¥Õ¥¡¥¤¥ë}
73 \gdef\putwordIndexIsEmpty{(º÷°ú¤¬¶õ¤Ç¤¹)}
74 \gdef\putwordIndexNonexistent{(º÷°ú¤¬¤¢¤ê¤Þ¤»¤ó)}
75 \gdef\putwordInfo{Info}
76 \gdef\putwordInstanceVariableof{Instance Variable of}
77 \gdef\putwordMethodon{Method on}
78 \gdef\putwordNoTitle{̵¥¿¥¤¥È¥ë}
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
122 %\global\lispnarrowing = 0.3in
123 %\global\baselineskip 12pt
124 %\global\parskip 3pt plus 1pt
127 %%\global\hsize = 6.5in
128 %% without @cropmarks
129 %\global\hsize = 6.7in
131 %\global\doublecolumnhsize=2.4in \global\doublecolumnvsize=15.0in
133 %\global\tolerance=700
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}
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 % ÆüËܿ͹¥¤¤Î¥®¥Ã¥·¥êµÍ¤Þ¤Ã¤¿»æ
156 \global\def\afourbook{{\globaldefs = 1
158 \parskip = 3pt plus 2pt minus 1pt
160 \internalpagesizes{248mm}{170mm}{0mm}{-5mm}{0mm}{8mm}%
167 %\global\def\smallbook{
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
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
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 ¡£
209 %\global\kanjifiletype=20 % ??
210 \global\let\min=\dm\global\let\goth=\dg
212 \global\let\dm=\min\global\let\dg=\goth
217 \ifNTTOLD % 92.7.8 by K.Handa
218 \let\next=\jTeXoldJFont%
221 \let\next=\MulTeXJFont%
223 \let\next=\jTeXJFont%
227 \let\next=\pTeXJFont%
231 \def\jTeXoldJFont#1#2#3#4{%
235 \expandafter\gjfont\csname#1\endcsname=dm#3 scaled {#4}%
237 \expandafter\gjfont\csname#1\endcsname=dg#3 scaled {#4}%
241 % backward compatibility for JTeX ¤Ç \gjfont ¤¬Ìµ¤¤¤È¤Ï MulTeX ¤á¡£
243 \def\MulTeXJFont#1#2#3#4{%
248 \expandafter\jfont\csname#1\endcsname=dm#3 scaled #4%
250 \expandafter\jfont\csname#1\endcsname=dg#3 scaled #4%
254 \def\jTeXJFont#1#2#3#4{%
258 \expandafter\gjfont\csname#1\endcsname=dm#3 scaled #4%
260 \expandafter\gjfont\csname#1\endcsname=dg#3 scaled #4%
264 \def\pTeXJFont#1#2#3#4{%
268 \global\expandafter\font\csname#1\endcsname=min#3 scaled #4%
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}
317 % Reduce Overfull/Underfull \hbox by relaxing these glues.
319 \global\jintercharskip=0pt plus 0.5pt minus -0.2pt
320 \global\jasciikanjiskip=2.28854pt plus 0.5pt minus -0.2pt
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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
363 \def\gaddsequence#1{%
365 \def\next{\gaddsequencez#1}%
367 \def\next{\gaddsequencez[0]{#1}}%
372 \def\gaddsequencez[#1]#2{%
374 \def\next{\gaddsequencezz[#1]#2}%
376 \def\next{\gaddsequencezz[#1][lb]{#2}}%
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%
397 \expandafter\gdef\csname#3\endcsname{{#4\csname orig#3\endcsname}}%
399 \expandafter\gdef\csname#3\endcsname{{\csname orig#3\endcsname#4}}%
403 \expandafter\gdef\csname#3\endcsname{#3\csname orig#3\endcsname}%
405 \expandafter\gdef\csname#3\endcsname{\csname orig#3\endcsname#3}%
411 \expandafter\gdef\csname#3\endcsname##1{{#4\csname orig#3\endcsname{##1}}}%
413 \expandafter\gdef\csname#3\endcsname##1{{\csname orig#3\endcsname{##1}#4}}%
417 \expandafter\gdef\csname#3\endcsname##1{#4\csname orig#3\endcsname{##1}}%
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
468 \def\printedmanual{\ignorespaces #5}%
469 \def\printednodename{\ignorespaces #3}%
470 \setbox1=\hbox{\printedmanual}%
471 \setbox0=\hbox{\printednodename}%
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}%
478 % Use the actual chapter/section title appear inside
479 % the square brackets. Use the real section title if we have it.
481 % It is in another manual, so we don't have it.
482 \def\printednodename{\ignorespaces #1}%
485 % We know the real title if we have the xref values.
486 \def\printednodename{\refx{#1-title}{}}%
488 % Otherwise just copy the Info node name.
489 \def\printednodename{\ignorespaces #1}%
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.
504 % \ifnum\filenamelength>0
505 % \startlink attr{/Border [0 0 0]}%
506 % goto file{\the\filename.pdf} name{#1@}%
508 % \startlink attr{/Border [0 0 0]}%
515 % \putwordsection{} ``\printednodename'' \putwordin{} \cite{\printedmanual}%
516 \cite{\printedmanual}¤Î``\printednodename''\putwordsection{}%
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
531 ¡Ö\printednodename ¡×%
532 % [\printednodename],\space
534 \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
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%
545 \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno\putwordSection%
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 %
554 \xreftie'char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno\putwordSection %
557 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
560 \global\def\doublebracket#1{¡Ø#1¡Ù}
561 \global\let\dfn=\doublebracket
563 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%