summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/tex4ht/javahelp-a.4ht
blob: 6b6d9200d041adc2d33ac890c7726a0a7a1f1cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% javahelp-a.4ht                        2008-07-05-09:27 %
% Copyright (C) 2003--2008       Eitan M. Gurari         %
%                                                        %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
% version 1.3 of this license or (at your option) any    %
% later version. The latest version of this license is   %
% in                                                     %
%   http://www.latex-project.org/lppl.txt                %
% and version 1.3 or later is part of all distributions  %
% of LaTeX version 2003/12/01 or later.                  %
%                                                        %
% This work has the LPPL maintenance status "maintained".%
%                                                        %
% This Current Maintainer of this work                   %
% is Eitan M. Gurari.                                    %
%                                                        %
% If you modify this program your changing its signature %
% with a directive of the following form will be         %
% appreciated.                                           %
%            \message{signature}                         %
%                                                        %
%                             gurari@cse.ohio-state.edu  %
%                 http://www.cse.ohio-state.edu/~gurari  %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\immediate\write-1{version 2008-07-05-09:27}

\NextFile{\jobname.tmp}
\HPage{}
\bgroup
   \catcode`\:=11
   \catcode`\@=11
   \catcode`\"=12
   \Configure{PROLOG}{}
   \Configure{HtmlPar}{}{}{}{}
   \Configure{tableofcontents}{}{}{}{}{}
   \Configure{htf}{0}{+}{}{}{}{}{}{}{}
   \ScriptEnv{dito}{\IgnorePar}{}
   \def\set:endtocitem#1{%
   \csname catchAt:#1\endcsname
   \expandafter\ifx\csname a:end#1\endcsname\relax
      \HCode{</tocitem>}%
   \else
      \expandafter\ifx \csname jh:#1\endcsname\relax
         \append:def\end:jhhook{%
   \csname jh:#1\endcsname
   \expandafter\global\expandafter
               \let\csname jh:#1\endcsname\:UnDef}%
\global\let\end:jhhook\end:jhhook
%
         \def\:tempc##1,{\if ,##1,%
               \expandafter\gob:pardel
            \else
               \expandafter\ifx \csname catchAt:##1\endcsname \relax
  \expandafter\gdef\csname
    catchAt:##1\endcsname{\csname jh:#1\endcsname}%
\else
  \expandafter\pend:def\csname
    catchAt:##1\endcsname{\csname jh:#1\endcsname}%
  \expandafter\global\expandafter\let\csname
    catchAt:##1\expandafter\endcsname\csname catchAt:##1\endcsname
\fi
%
               \expandafter\:tempc
            \fi}%
         \expandafter\expandafter\expandafter
             \:tempc\csname a:end#1\endcsname,,!*?: %
      \fi
      \csname jh:#1\endcsname
\expandafter\gdef\csname jh:#1\endcsname{%
   \expandafter\global\expandafter\let\csname jh:#1\endcsname=\empty
   \HCode{</tocitem><!--/#1-->}}%
%
   \fi
}
\def\gob:pardel#1!*?: {}

   \edef\tocLabel{\ifx\contentsname\:UnDef Table Of Contents\else
               \ifx\contentsname\empty  Table Of Contents\else
               \contentsname\fi\fi}
\edef\indexLabel{\ifx\indexname\:UnDef Index\else
                 \ifx\indexname\empty  Index\else \indexname\fi\fi}
\ifTag{TITLE+}
   {\edef\titleLabel{\LikeRef{TITLE+}}}
   {\def\titleLabel{\jobname}}

\IgnorePar\par\leavevmode\special{t4ht>\jobname.hs}%
\begin{dito}-\
<?xml version="1.0" encoding="ISO-8859-1" ?>
\end{dito}
\begin{dito}-\
    <!DOCTYPE helpset PUBLIC
    "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version \dotVersion//\dTdLaNg"
    "http://java.sun.com/products/javahelp/helpset_\subVersion.dtd">
\end{dito}

\begin{dito}-\
<!-\relax- \jhNote
 -\relax->
<helpset version="\dotVersion">
  <title>\titleLabel</title>
  <maps>
    <homeID>\jobname</homeID>
    <mapref location="\jobname.jhm"/>
  </maps>
  <view>
    <name>TOC</name>
    <label>\tocLabel</label>
    <type>javax.help.TOCView</type>
    <data>\jobname-jht.xml</data>
  </view>
  <view>
    <name>Index</name>
    <label>\indexLabel</label>
    <type>javax.help.IndexView</type>
    <data>\jobname-jhi.xml</data>
  </view>
  <view>
    <name>Search</name>
    <label>Search</label>
    <type>javax.help.SearchView</type>
    <data
      engine="com.sun.java.help.search.DefaultSearchEngine">\jobname-jhs</data>
  </view>
</helpset>
\end{dito}
\IgnorePar\par\leavevmode\special{t4ht<\jobname.hs}

   \bgroup
\immediatetrue
\Configure{TocLink}
   {\HCode{<tocitem target="\a:mapIdTarget"\Hnewline
                    text="}\hbox{#4}\HCode{ ">\Hnewline}}
\let\jh:doTocEntry\:doTocEntry
\def\:doTocEntry#1#2#3{%
   \edef\sectioningKey{\expandafter\gob:IV\string#1}%
   \edef\:temp{\noexpand\ConfigureToc{\sectioningKey}
       {}{\noexpand\set:endtocitem{\sectioningKey}}{}{}}\:temp
   \expandafter\target:info#3//%
\b:mapIdTarget
%
   \jh:doTocEntry#1{#2}{#3}}
\def\gob:IV#1#2#3#4{}
\def\sectioningKey{NoToc}

\IgnorePar\par\leavevmode\special{t4ht>\jobname-jht.xml}%
\begin{dito}-\
<?xml version="1.0" encoding="ISO-8859-1" ?>
\end{dito}
\begin{dito}-\
   <!DOCTYPE toc PUBLIC
   "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version \dotVersion//\dTdLaNg"
   "http://java.sun.com/products/javahelp/toc_\subVersion.dtd">
\end{dito}

\begin{dito}-\
<!-\relax- \jhNote
 -\relax->
<toc version="\dotVersion">
  <tocitem target="\jobname" text="\titleLabel ">
\end{dito}
\let\end:jhhook=\empty
\catcode`\:=12 \catcode`\@=12  \let\contentsname\empty
\NoFonts

     \expandafter\ifx \csname jh:toc\endcsname\relax
   \tableofcontents
\else
   \expandafter\expandafter\expandafter\tableofcontents
   \expandafter\expandafter\expandafter[\csname
                                         jh:toc\endcsname]%
\fi
%
\EndNoFonts
\catcode`\:=11 \catcode`\@=11
\end:jhhook
\begin{dito}
  </tocitem>
</toc>
\end{dito}
\special{t4ht<\jobname-jht.xml}

\egroup

   \bgroup

\IgnorePar\par\leavevmode\special{t4ht>\jobname-jhi.xml}%
\begin{dito}-\
<?xml version="1.0" encoding="ISO-8859-1" ?>
\end{dito}
\begin{dito}-\
   <!DOCTYPE index PUBLIC
   "-//Sun Microsystems Inc.//DTD JavaHelp Index Version \dotVersion//\dTdLaNg"
   "http://java.sun.com/products/javahelp/index_\subVersion.dtd">
\end{dito}

\begin{dito}-\
<!-\relax- \jhNote
 -\relax->
<index version="\dotVersion">
\end{dito}

     \def\beforeindex#1|LNK#2#3{#1}%
\def\indexentry#1#2{\HCode{<indexitem target="indexentry-#2"
                     text="}\beforeindex#1\HCode{ " />\Hnewline}}%
\immediate\openin15=\jobname.4dx
\ifeof15
   \immediate\closein15
\else
   \immediate\closein15
   \input \jobname.4dx
\fi
%
\begin{dito}
</index>
\end{dito}
\special{t4ht<\jobname-jhi.xml}%

\egroup

   \special{t4ht>\jobname.jhm}%
\bgroup
   \Configure{Link}{mapID}{target="\a:mapIdTarget" url=}{}{}
\Configure{TocLink}{\Link{#2}{}\EndLink}
\let\jh:doTocEntry\:doTocEntry
\def\:doTocEntry#1#2#3{%
   \edef\sectioningKey{\expandafter\gob:IV\string#1}%
   \edef\:temp{\noexpand\ConfigureToc{\sectioningKey}
               {}{\relax}{}{}}\:temp
   \expandafter\target:info#3//%
\b:mapIdTarget
%
   \jh:doTocEntry#1{#2}{#3}}
\def\gob:IV#1#2#3#4{}
\def\sectioningKey{NoToc}

  \bgroup \catcode`\:=12 \catcode`\@=12 \let\contentsname\empty
     \expandafter\ifx \csname jh:toc\endcsname\relax
   \tableofcontents
\else
   \expandafter\expandafter\expandafter\tableofcontents
   \expandafter\expandafter\expandafter[\csname
                                         jh:toc\endcsname]%
\fi
%
  \egroup
  \HCode {</map>\Hnewline}
\egroup
\special{t4ht*>\jobname.jhm}%
\special{t4ht*>}%

\egroup
\EndHPage{}