70
|
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
|
|
11 %% 92.7.8 by K.Handa
|
|
12 \newif\ifNTT
|
|
13 \ifx\gtfam\undefined
|
|
14 \NTTtrue
|
|
15 \else
|
|
16 \NTTfalse
|
|
17 \fi
|
|
18
|
|
19 \newif\ifNTTOLD
|
|
20 \ifNTT
|
|
21 \ifx\jendlinetype\undefined
|
|
22 \NTTOLDtrue
|
|
23 \else
|
|
24 \NTTOLDfalse
|
|
25 \fi
|
|
26 \fi
|
|
27 %% end of patch
|
|
28
|
|
29 %% TeX macros to handle Japanese texinfo files
|
|
30 %% 92/05/24 merged jtexinfo.tex (by H. Isozaki and N. Hikichi) into this
|
|
31 %% Created by Satoru Tomura (tomura@etl.go.jp)
|
|
32
|
|
33 \def\jtexinfoversion{1.03}
|
|
34
|
|
35 \ifNTT
|
|
36 \message{jtexinfo(NTT JTeX) package [Version \jtexinfoversion]:}
|
|
37 \else
|
|
38 \message{jtexinfo(ASCII JTeX) package [Version \jtexinfoversion]:}
|
|
39 \fi
|
|
40 \message{}
|
|
41
|
|
42
|
|
43
|
|
44 %% 日本語フォントに関する互換性
|
|
45 \ifNTT
|
|
46 \kanjifiletype=20
|
|
47 \let\min=\dm\let\dg=\goth
|
|
48 \else
|
|
49 \let\dm=\min\let\goth=\dg
|
|
50 \fi
|
|
51
|
|
52 %% 日本語フォントの定義
|
|
53 \ifNTT
|
|
54 \ifNTTOLD % 92.7.8 by K.Handa
|
|
55 \jfont\tendm=dm10 scaled {\magstephalf}
|
|
56 \jfont\tendg=dg10 scaled {\magstephalf}
|
|
57 \else
|
|
58 \jfont\tendm=dm10 scaled \magstephalf
|
|
59 \jfont\tendg=dg10 scaled \magstephalf
|
|
60 \fi
|
|
61 \else
|
|
62 \font\tendm=min10 scaled \magstephalf
|
|
63 \font\tendg=goth10 scaled \magstephalf
|
|
64 \fi
|
|
65
|
|
66 %% Fonts for title
|
|
67 \ifNTT
|
|
68 \jfont\titledm=dm12 scaled \magstep3
|
|
69 \jfont\titledg=dg12 scaled \magstep3
|
|
70 \else
|
|
71 %\font\titledm=min12 scaled \magstep3
|
|
72 \font\titledm=min10 scaled \magstep5
|
|
73 %\font\titledg=goth12 scaled \magstep3
|
|
74 \font\titledg=goth10 scaled \magstep5
|
|
75 \fi
|
|
76
|
|
77 %% Fonts for indics and small examples
|
|
78 \ifNTT
|
|
79 \jfont\inddm=dm9
|
|
80 \jfont\inddg=dg9
|
|
81 \else
|
|
82 \font\inddm=min9
|
|
83 \font\inddg=goth9
|
|
84 \fi
|
|
85 \def\indexfonts{\let\it=\indit \let\sl=\indsl \let\bf=\indbf \let\rm=\indrm \let\dm=\inddm \let\dg=\inddg}
|
|
86
|
|
87 %% Fonts for headings
|
|
88 \ifNTT
|
|
89 \jfont\chapdm=dm12 scaled \magstep2
|
|
90 \jfont\chapdg=dg12 scaled \magstep2
|
|
91 \else
|
|
92 %\font\chapdm=min12 scaled \magstep2
|
|
93 \font\chapdm=min10 scaled \magstep3
|
|
94 %\font\chapdg=goth12 scaled \magstep2
|
|
95 \font\chapdg=goth10 scaled \magstep3
|
|
96 \fi
|
|
97
|
|
98 \ifNTT
|
|
99 \jfont\secdm=dm12 scaled \magstep1
|
|
100 \jfont\secdg=dg12 scaled \magstep1
|
|
101 \else
|
|
102 %\font\secdm=min12 scaled \magstep1
|
|
103 \font\secdm=min10 scaled \magstep2
|
|
104 %\font\secdg=goth12 scaled \magstep1
|
|
105 \font\secdg=goth10 scaled \magstep2
|
|
106 \fi
|
|
107
|
|
108 \ifNTT
|
|
109 \ifNTTOLD % 92.7.8 by K.Handa
|
|
110 \jfont\ssecdm=dm12 scaled {\magstephalf}
|
|
111 \jfont\ssecdg=dg12 scaled {\magstephalf}
|
|
112 \else
|
|
113 \jfont\ssecdm=dm12 scaled \magstephalf
|
|
114 \jfont\ssecdg=dg12 scaled \magstephalf
|
|
115 \fi
|
|
116 \else
|
|
117 %\font\ssecdm=min12 scaled \magstephalf
|
|
118 \font\ssecdm=min10 at 13pt
|
|
119 %\font\ssecdg=goth12 scaled \magstephalf
|
|
120 \font\ssecdg=goth10 at 13pt
|
|
121 \fi
|
|
122
|
|
123 \def\textfonts{\let\rm=\tenrm\let\it=\tenit\let\sl=\tensl\let\bf=\tenbf\let\smallcaps=\tensc\let\sf=\tensf%
|
|
124 \let\dm=\tendm\let\dg=\tendg\dm}
|
|
125 \def\chapfonts{\let\rm=\chaprm\let\it=\chapit\let\sl=\chapsl\let\bf=\chapbf\let\tt=\chaptt\let\sf=\chapsf%
|
|
126 \let\dm=\chapdm\let\dg=\chapdg\dg}
|
|
127 \def\secfonts{\let\rm=\secrm\let\it=\secit\let\sl=\secsl\let\bf=\secbf\let\tt=\sectt\let\sf=\secsf%
|
|
128 \let\dm=\secdm\let\dg=\secdg\dg}
|
|
129 \def\subsecfonts{\let\rm=\ssecrm\let\it=\ssecit\let\sl=\ssecsl\let\bf=\ssecbf\let\tt=\ssectt\let\sf=\ssecsf%
|
|
130 \let\dm=\ssecdm\let\dg=\ssecdg\dm}
|
|
131
|
|
132 \def\i#1{{\sl\dg #1}}
|
|
133 \def\b#1{{\bf\dg #1}}
|
|
134
|
|
135 \def\titlefont#1{{\titlerm\titledg #1}}
|
|
136
|
|
137 % インデックスにソートキーを[]で指定する.
|
|
138 \def\Jempty{}
|
|
139 \def\singleindexer #1{\singleindexerB#1[]\singleindexerA}
|
|
140 % 93.4.29 by N.Hikichi
|
|
141 % \def\singleindexerB#1[#2]{\edef\Jone{#1}\edef\Jtwo{#2}%
|
|
142 \def\singleindexerB#1[#2]{\def\Jone{#1}\def\Jtwo{#2}%
|
|
143 \ifx\Jempty\Jtwo\let\Jnext=\relax\let\singleindexerA=\singleindexerD%
|
|
144 \else\let\Jnext=\singleindexerC\let\singleindexerA=\singleindexerE\fi%
|
|
145 \Jnext}
|
|
146 \def\singleindexerC#1[]{}
|
|
147 \def\singleindexerD{\doind{\indexname}{\Jone}}
|
|
148 \def\singleindexerE{\Jdoind{\indexname}{\Jone}{\Jtwo}}
|
|
149
|
|
150 \def\Jdoind #1#2#3{%
|
|
151 {\indexdummies % Must do this here, since \bf, etc expand at this stage
|
|
152 \count10=\lastpenalty %
|
|
153 \escapechar=`\\%
|
|
154 {\let\folio=0% Expand all macros now EXCEPT \folio
|
|
155 \def\rawbackslashxx{\indexbackslash}% \indexbackslash isn't defined now
|
|
156 % so it will be output as is; and it will print as backslash in the indx.
|
|
157 %
|
|
158 % Now process the index-string once, with all font commands turned off,
|
|
159 % to get the string to sort the index by.
|
|
160 {\indexnofonts
|
|
161 \xdef\temp1{#3}%
|
|
162 }%
|
|
163 % Now produce the complete index entry. We process the index-string again,
|
|
164 % this time with font commands expanded, to get what to print in the index.
|
|
165 \edef\temp{%
|
|
166 \write \csname#1indfile\endcsname{%
|
|
167 \realbackslash entry {\temp1}{\folio}{#2}}}%
|
|
168 \temp }%
|
|
169 \penalty\count10}}
|
|
170
|
|
171 \outer\def\initial #1{%
|
|
172 {\let\tentt=\sectt \let\sf=\sectt
|
|
173 \let\dm=\secdm\let\dg=\secdg\dg%%***
|
|
174 \ifdim\lastskip<\initialskipamount
|
|
175 \removelastskip \penalty-200 \vskip \initialskipamount\fi
|
|
176 \line{\secbf\secdg#1\hfill}\kern 2pt\penalty3000}}%%***
|
|
177
|
|
178 % 非互換な日本語化部分
|
|
179
|
|
180 %%%\def\inforefzzz #1,#2,#3,#4**{See Info file \file{\losespace#3{}}, node `\losespace#1{}'}
|
|
181 \def\inforefzzz #1,#2,#3,#4**{Info ファイル \file{\losespace#3{}},node `\losespace#1{}' 参照}
|
|
182
|
|
183 %%%\def\pxref #1{see \xrefX [#1,,,,,,,]}
|
|
184 %%%\def\xref #1{See \xrefX [#1,,,,,,,]}
|
|
185 \def\pxref #1{\xrefX [#1,,,,,,,] 参照}
|
|
186 \def\xref #1{\xrefX [#1,,,,,,,] 参照}
|
|
187
|
|
188 %%\def\xrefX [#1,#2,#3,#4,#5,#6]{%
|
|
189 %%\setbox1=\hbox{\i{\losespace#5{}}}%
|
|
190 %%\setbox0=\hbox{\losespace#3{}}%
|
|
191 %%\ifdim \wd0 =0pt \setbox0=\hbox{\losespace#1{}}\fi%
|
|
192 %%\ifdim \wd1 >0pt%
|
|
193 %%section \unhbox0{} in \unhbox1%
|
|
194 %%\else%
|
|
195 %%\refx{#1-snt} [\unhbox0], page\tie \refx{#1-pg}%
|
|
196 %%\fi }
|
|
197 \def\xrefX [#1,#2,#3,#4,#5,#6]{%
|
|
198 \setbox1=\hbox{\i{\losespace#5{}}}%
|
|
199 \setbox0=\hbox{\losespace#3{}}%
|
|
200 \ifdim \wd0 =0pt \setbox0=\hbox{\losespace#1{}}\fi%
|
|
201 \ifdim \wd1 >0pt%
|
|
202 \unhbox1 の \unhbox0{} 節%
|
|
203 \else%
|
|
204 \refx{#1-snt} [\unhbox0], \tie \refx{#1-pg} 頁%
|
|
205 \fi }
|
|
206
|
|
207 %%\def\Ysectionnumberandtype{%
|
|
208 %%\ifnum\secno=0 chapter\xreftie\the\chapno %
|
|
209 %%\else \ifnum \subsecno=0 section\xreftie\the\chapno.\the\secno %
|
|
210 %%\else \ifnum \subsubsecno=0 %
|
|
211 %%section\xreftie\the\chapno.\the\secno.\the\subsecno %
|
|
212 %%\else %
|
|
213 %%section\xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno %
|
|
214 %%\fi \fi \fi }
|
|
215
|
|
216 \def\Ysectionnumberandtype{%
|
|
217 \ifnum\secno=0 \xreftie\the\chapno 章%
|
|
218 \else \ifnum \subsecno=0 \xreftie\the\chapno.\the\secno 節%
|
|
219 \else \ifnum \subsubsecno=0 %
|
|
220 \xreftie\the\chapno.\the\secno.\the\subsecno 小節%
|
|
221 \else %
|
|
222 \xreftie\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno 小々節%
|
|
223 \fi \fi \fi }
|
|
224
|
|
225 %
|
|
226 % A4 size(Japanese) define, top margin = 20, bottom margin = 21,
|
|
227 % left margin = 30, right margin = 15
|
|
228 %
|
|
229 \def\a4book{
|
|
230 \global\lispnarrowing = 0.3in
|
|
231 \global\baselineskip 12pt
|
|
232 \global\parskip 3pt plus 1pt
|
|
233
|
|
234 % for @cropmarks
|
|
235 %\global\hsize = 6.5in
|
|
236 % without @cropmarks
|
|
237 \global\hsize = 6.7in
|
|
238
|
|
239 \global\doublecolumnhsize=2.4in \global\doublecolumnvsize=15.0in
|
|
240 \global\vsize=9.8in
|
|
241 \global\tolerance=700
|
|
242 \global\hfuzz=1pt
|
|
243
|
|
244 \global\pagewidth=\hsize
|
|
245 \global\pageheight=\vsize
|
|
246 \global\font\ninett=cmtt9
|
|
247
|
|
248 \global\let\smalllisp=\smalllispx
|
|
249 \global\let\smallexample=\smalllispx
|
|
250 \global\def\Esmallexample{\Esmalllisp}
|
|
251
|
|
252 % for @cropmarks
|
|
253 %\global\voffset = -1.0in
|
|
254 %\global\hoffset = -0.2in
|
|
255
|
|
256 % without @cropmarks
|
|
257 \global\voffset = 0.0in
|
|
258 %\global\hoffset = -1.0in
|
|
259 \global\hoffset = -0.2in
|
|
260 }
|
|
261
|