| 1 |
% $Id: tex4ht-javahelp.tex 680 2020-03-16 17:42:41Z karl $ |
| 2 |
% compile 3 times: latex tex4ht-javahelp |
| 3 |
% or xhlatex tex4ht-javahelp "html,3,sections+" |
| 4 |
% |
| 5 |
% Copyright 2009-2020 TeX Users Group |
| 6 |
% Copyright 2003-2009 Eitan M. Gurari |
| 7 |
% Released under LPPL 1.3c+. |
| 8 |
% See tex4ht-cpright.tex for license text. |
| 9 |
|
| 10 |
\ifx \HTML\UnDef |
| 11 |
\def\HTML{javahelp} |
| 12 |
\def\PREAMBLE{% |
| 13 |
\usepackage{url}% |
| 14 |
% \usepackage{moreverb} |
| 15 |
% \usepackage{hyperref}% |
| 16 |
} |
| 17 |
\def\CONFIG{\jobname} |
| 18 |
\def\MAKETITLE{\author{Eitan M. Gurari}} |
| 19 |
\def\next{\input mktex4ht.4ht \endinput} |
| 20 |
\expandafter\next |
| 21 |
\fi |
| 22 |
|
| 23 |
\input{common-code} |
| 24 |
\input{common} |
| 25 |
\input{tex4ht-cpright} |
| 26 |
|
| 27 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 28 |
|
| 29 |
\def\verbatiminput#1{% |
| 30 |
\immediate\openin15=#1 |
| 31 |
\immediate\ifeof15 \else |
| 32 |
\immediate\closein15 |
| 33 |
\bgroup |
| 34 |
\tt |
| 35 |
\catcode`\\=12 |
| 36 |
\catcode`\{=12 |
| 37 |
\catcode`\}=12 |
| 38 |
\catcode`\%=12 |
| 39 |
% \catcode`\ =12 |
| 40 |
\catcode`\&=12 |
| 41 |
\catcode`\#=12 |
| 42 |
\catcode`\$=12 |
| 43 |
\catcode`\~=12 |
| 44 |
\catcode`\^=12 |
| 45 |
\catcode`\_=12 |
| 46 |
\input #1 |
| 47 |
\egroup |
| 48 |
\fi |
| 49 |
} |
| 50 |
|
| 51 |
|
| 52 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 53 |
\chapter{The Outline} |
| 54 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 55 |
|
| 56 |
%%%%%%%%%%%%%%%%%%% |
| 57 |
\section{The Root} |
| 58 |
%%%%%%%%%%%%%%%%%%% |
| 59 |
|
| 60 |
% \<javahelp.4ht\><<< |
| 61 |
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 62 |
% % javahelp.4ht |version % |
| 63 |
% % Copyright (C) |CopyYear.2003. Eitan M. Gurari % |
| 64 |
% |<TeX4ht copyright|> |
| 65 |
% >>> |
| 66 |
|
| 67 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 68 |
\chapter{Constructs} |
| 69 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 70 |
|
| 71 |
|
| 72 |
\def\JHDIR{...../} |
| 73 |
|
| 74 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 82 |
\section{Introduction} |
| 83 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 84 |
|
| 85 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 86 |
\subsection{Review} |
| 87 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 88 |
|
| 89 |
JavaHelp is an online documentation system for use by Java-based |
| 90 |
applications. |
| 91 |
|
| 92 |
|
| 93 |
\begin{itemize} |
| 94 |
\item |
| 95 |
It can be activated with the |
| 96 |
`javahelp' options. For instance, |
| 97 |
`\verb+htlatex jobname "html,3.2,javahelp,unicode,3" " -cmozhtf -u10" "-cjavahelp"+'. |
| 98 |
\item Supports HTML 3.2 (+?) and (some?) CSS 1.0 as imported |
| 99 |
files as well as style attributes. |
| 100 |
\end{itemize} |
| 101 |
|
| 102 |
|
| 103 |
TeX4ht does the following for JavaHelp |
| 104 |
|
| 105 |
\begin{itemize} |
| 106 |
\item Creates keys for the entries in the table of contents |
| 107 |
and the index |
| 108 |
\item Maps the keys into th erl's of the toc and the index (jobname.jhm) |
| 109 |
\item Maps the keys to the entries referenced by the toc (jobname-jht.xml) |
| 110 |
and to the entries referenced by the toc (jobname-jhi.xml) |
| 111 |
\item Creates a manifest of the files (jhelpset.hs), under the assumption |
| 112 |
that jhindexer set a search directory at jobname-jhs |
| 113 |
`{\tt java -jar /n/gold/5/gurari/javahelp.dir/jh1.1.3/javahelp/bin/jhindexer.jar -db jobname-jhs *.html}' |
| 114 |
\end{itemize} |
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
The javahelp.4ht file should not be loaded before the leading |
| 119 |
\verb+\tableofcontents+ command got active. |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 124 |
\subsection{References} |
| 125 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 126 |
|
| 127 |
\begin{itemize} |
| 128 |
\item \url{C:/jh1.1.3/doc/spec/FileFormat.html} |
| 129 |
\item \url{http://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/javahelp/javahelp.html} |
| 130 |
\item \url{http://developer.java.sun.com/developer/JDCTechTips/2002/tt0423.html} |
| 131 |
\item \url{http://developer.java.sun.com/developer/JDCTechTips/2002/tt0521.html} |
| 132 |
\item \url{http://www.oreilly.de/catalog/creatingjavahelp/examples/} |
| 133 |
\end{itemize} |
| 134 |
|
| 135 |
|
| 136 |
%%%%%%%%%%%%% |
| 137 |
\subsection{Importing CSS} |
| 138 |
%%%%%%%%%%%%% |
| 139 |
|
| 140 |
\<configure javahelp tex4ht\><<< |
| 141 |
\:CheckOption{-css} \if:Option \else |
| 142 |
\Log:Note{to ignore CSS code, use the command line option `-css} |
| 143 |
\:CheckOption{css-in} \if:Option |
| 144 |
\Log:Note{the inline CSS code is extracted from the input of the |
| 145 |
previous compilation, so an extra compilation might be needed} |
| 146 |
\Configure{@HEAD}{|<css inline|>} |
| 147 |
\else |
| 148 |
\Log:Note{for inline CSS code, use the command line option `css-in'} |
| 149 |
\Configure{@HEAD}{\HCode{<link |
| 150 |
rel="stylesheet" type="text/css" |
| 151 |
href="\aa:CssFile"\xml:empty>\Hnewline}} |
| 152 |
\fi |
| 153 |
\fi |
| 154 |
>>> |
| 155 |
|
| 156 |
|
| 157 |
\<css inline\><<< |
| 158 |
\openin15=\jobname .css |
| 159 |
\ifeof15 \:warning{Missing file: \jobname .css }% |
| 160 |
\else |
| 161 |
\bgroup |
| 162 |
\catcode`\{=12 \catcode`\}=12 \catcode`\%=12 \catcode`\#=12 |
| 163 |
\HCode{\Hnewline<style type="text/css">\Hnewline <!-- \Hnewline}% |
| 164 |
\loop |
| 165 |
\read15 to \:temp |
| 166 |
\def\:tempa{\par}\ifx \:temp\:tempa \let\:temp\empty \fi |
| 167 |
\ifeof15\else |
| 168 |
\expandafter\tmp:toks\expandafter{\:temp}% |
| 169 |
\HCode{\the\tmp:toks \Hnewline}% |
| 170 |
\repeat |
| 171 |
\HCode{\Hnewline-->\Hnewline</style>\Hnewline}% |
| 172 |
\egroup |
| 173 |
\fi |
| 174 |
\closein15 |
| 175 |
>>> |
| 176 |
|
| 177 |
|
| 178 |
\<configure javahelp tex4ht\><<< |
| 179 |
|<0,32,4 preambles|> |
| 180 |
\ifx \a:FontCss:\:UnDef |
| 181 |
\Configure{FontCss}{Font\string_Css##1} |
| 182 |
{Font\string_Css\string_Plus\space##1} |
| 183 |
\fi |
| 184 |
\expandafter\ifx \csname aa:Css\endcsname\relax |
| 185 |
\Configure{Css}{Css: ##1} |
| 186 |
\fi |
| 187 |
>>> |
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 |
\<configure javahelp latex\><<< |
| 194 |
|<jh defs|> |
| 195 |
\Configure{Preamble} |
| 196 |
{\:CheckOption{-css} \if:Option |
| 197 |
\else |<default cascade style sheets|>\fi} |
| 198 |
{|<jh at start|>} |
| 199 |
\Configure{@/BODY} |
| 200 |
{\relax |
| 201 |
\ifnum \FileNumber=1 |
| 202 |
\SaveEndP |
| 203 |
\input javahelp-a.4ht |
| 204 |
\RecallEndP |
| 205 |
\fi |
| 206 |
} |
| 207 |
>>> |
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
\<0,32,4 preambles\><<< |
| 212 |
\:CheckOption{-css} \if:Option |
| 213 |
\def\Css#1{} |
| 214 |
\NewConfigure{CssFile}{2} |
| 215 |
\else |
| 216 |
|<cascade style sheets|> |
| 217 |
\fi |
| 218 |
>>> |
| 219 |
|
| 220 |
\<cascade style sheets\><<< |
| 221 |
\def\Css#1{{\def\:temp{\Configure{Needs}}% |
| 222 |
\expandafter\:temp\expandafter{\aa:Css}\Needs{#1}}} |
| 223 |
>>> |
| 224 |
|
| 225 |
\<cascade style sheets\><<< |
| 226 |
\ScriptCommand{\CssFile}{% |
| 227 |
\immediate\write-1{--- file \aa:CssFile\space ---}% |
| 228 |
\def\FontSize##1##2{\:Context{##1}\ht:special{t4ht;\%##2}\%}% |
| 229 |
\def\FontName##1{\:Context{##1}\ht:special{t4ht;=}}% |
| 230 |
\def\:Context##1{\ht:special{t4ht>\jobname.tmp}##1\ht:special |
| 231 |
{t4ht>\aa:CssFile}}% |
| 232 |
\ht:special{t4ht>\jobname.tmp}\ht:special{t4ht>\aa:CssFile}% |
| 233 |
\bgroup \everypar{}\NoFonts \bb:CssFile \hfil\break} |
| 234 |
{\egroup \EndNoFonts |
| 235 |
\ht:special{t4ht<\aa:CssFile}\ht:special{t4ht<\jobname.tmp}} |
| 236 |
\let\Css:File=\CssFile |
| 237 |
\def\CssFile{\futurelet\:temp\Css:Fl} |
| 238 |
\def\Css:Fl{\ifx [\:temp \expandafter\Css:fl |
| 239 |
\else \expand:after{\Css:File \space}\fi} |
| 240 |
\def\Css:fl[#1]{\Css:File\space \css:files #1,,|<par del|>} |
| 241 |
\def\css:files#1,#2|<par del|>{\def\:temp{#1}\ifx \:temp\empty |
| 242 |
\else \def\:temp{\in:css#1.|<par del|>\css:files#2,,|<par del|>}\fi |
| 243 |
\:temp } |
| 244 |
\def\in:css#1.#2|<par del|>{\def\:temp{#2}\ifx \:temp\empty |
| 245 |
\inc:ss#1.css|<par del|> |
| 246 |
\else \inc:ss#1.#2|<par del|>\fi} |
| 247 |
\def\inc:ss#1.|<par del|>{|<input css file|> } |
| 248 |
\NewConfigure{CssFile}[2]{\def\aa:CssFile{#1}\def\bb:CssFile{#2}} |
| 249 |
>>> |
| 250 |
|
| 251 |
|
| 252 |
|
| 253 |
\<default cascade style sheets\><<< |
| 254 |
{\ifdim \lastskip>\z@ \unskip\fi \IgnorePar\parindent\z@ |
| 255 |
\leavevmode}% |
| 256 |
\immediate\write-1{--- file \aa:CssFile\space ---}% |
| 257 |
\ht:special{t4ht>\aa:CssFile}\ht:special{t4ht=\Hnewline /* css.sty */}% |
| 258 |
\ht:special{t4ht<\aa:CssFile}% |
| 259 |
>>> |
| 260 |
|
| 261 |
\<input css file\><<< |
| 262 |
\immediate\openin15=#1 |
| 263 |
\ifeof15 \immediate\closein15 |
| 264 |
\:warning{Missing file: #1}% |
| 265 |
\else \immediate\closein15 \input #1 \fi |
| 266 |
>>> |
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
%%%%%%%%%%%%% |
| 271 |
\subsection{Tabular} |
| 272 |
%%%%%%%%%%%%% |
| 273 |
|
| 274 |
\<configure javahelp latex\><<< |
| 275 |
\:CheckOption{no-array}\if:Option \else |
| 276 |
|<html latex array/tabular Config 4.0t|> |
| 277 |
\fi |
| 278 |
>>> |
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
\<configure javahelp array\><<< |
| 283 |
|<html latex array/tabular Config 4.0t|> |
| 284 |
>>> |
| 285 |
|
| 286 |
|
| 287 |
\<html latex array/tabular Config 4.0t\><<< |
| 288 |
\:CheckOption{pic-tabular} \if:Option \else |
| 289 |
\ConfigureEnv{tabular} |
| 290 |
{|<configure tabular noalign|>% |
| 291 |
\IgnorePar|<inline comment|>\EndP\HCode{<div class="tabular">}% |
| 292 |
\PushStack\Col:Marg\AllColMargins |
| 293 |
} |
| 294 |
{\HCode{</div>}\PopStack\Col:Marg\AllColMargins\ShowPar |
| 295 |
|<configure clear noalign|>% |
| 296 |
|<try env inline par|>% |
| 297 |
}{}{} |
| 298 |
\Css{div.tabular, div.center div.tabular {text-align: center; |
| 299 |
margin-top:0.5em; margin-bottom:0.5em; }} |
| 300 |
\Css{table.tabular td p{margin-top:0em;}} |
| 301 |
\Css{table.tabular {margin-left: auto; |
| 302 |
margin-right: auto;}} |% centering |% |
| 303 |
\fi |
| 304 |
>>> |
| 305 |
|
| 306 |
|
| 307 |
\verb'\AllColMargins' Return a binary string in which 1 represents |
| 308 |
a column, and 0 represents a `@'. \verb'\ColMargins' retrieves the |
| 309 |
zeros before the 1's that represent the current and following 1's. |
| 310 |
|
| 311 |
\<html latex array/tabular Config 4.0t\><<< |
| 312 |
\def\ColMargins{% |
| 313 |
\ifx \AllColMargins\empty |
| 314 |
\:warning{Empty \string\AllColMargins}% |
| 315 |
\else |
| 316 |
\tmp:cnt=\HCol\relax |
| 317 |
\expandafter\nosp:hbr\AllColMargins 1//% |
| 318 |
\fi } |
| 319 |
\def\nosp:hbr#11#2//{\ifnum \tmp:cnt>1 \advance\tmp:cnt by -1 |
| 320 |
\nosp:hbr#2//\else\nosp:gt#11#2//\fi} |
| 321 |
\def\nosp:gt#11#21#3//{% |
| 322 |
\def\:temp{#1}\ifx \:temp\empty 1\else 0\fi |
| 323 |
\def\:temp{#2}\ifx \:temp\empty 1\else 0\fi} |
| 324 |
>>> |
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
\<html latex array/tabular Config 4.0t\><<< |
| 330 |
\Configure{VBorder} |
| 331 |
{\global\let\oldVBorder=\empty} |
| 332 |
{\gdef\oldVBorder{border="1"}} |
| 333 |
{}{} |
| 334 |
\Configure{halignTB<>}{tabular}{\HCode{id="TBL-\TableNo" |
| 335 |
class="tabular"\Hnewline |
| 336 |
\oldVBorder \GROUPS\Hnewline |
| 337 |
}<>\HAlign} |
| 338 |
\Css{table[rules] {border-left:solid black 0.4pt; |
| 339 |
border-right:solid black 0.4pt; }} |
| 340 |
\:CheckOption{pic-tabular} \if:Option \else |
| 341 |
\Configure{tabular} |
| 342 |
{\ifvmode \IgnorePar\fi \EndP \halignTB{tabular}\putVBorder } |
| 343 |
{\HCode{</table>}} |
| 344 |
{\HCode{<tr \Hnewline}\halignTR |
| 345 |
\HCode{ id="TBL-\TableNo-\HRow-">}} |
| 346 |
{\r:HA} |
| 347 |
{\HCode{<td \ifnum \HMultispan>1 colspan="\HMultispan"\fi}% |
| 348 |
\halignTD \HCode{ id="TBL-\TableNo-\HRow-\HCol" |
| 349 |
\Hnewline class="td}|<tabular td align|>% |
| 350 |
\HCode{">}|<td save EndP|>% |
| 351 |
|<start array par box|>\PushStack\Table:Stck\TableNo} |
| 352 |
{|<end array par box|>\PopStack\Table:Stck\TableNo \d:HA} |
| 353 |
\fi |
| 354 |
\def\R:HA{\HCode{<tr \Hnewline}\halignTR\HCode{>}} |
| 355 |
\def\r:HA{\HCode{</tr>}} |
| 356 |
\def\D:HA{|<td save EndP|> \HCode{<td |
| 357 |
\ifnum \HMultispan>1 colspan="\HMultispan"\fi}% |
| 358 |
\halignTD \HCode{\Hnewline>}\ShowPar\par} |
| 359 |
\def\d:HA{\ifvmode \IgnorePar \fi \EndP\HCode{</td>}|<td recall EndP|>} |
| 360 |
|<configuring @()|> |
| 361 |
\Css{td.td00{ padding-left:0pt; padding-right:0pt; }} |
| 362 |
\Css{td.td01{ padding-left:0pt; padding-right:5pt; }} |
| 363 |
\Css{td.td10{ padding-left:5pt; padding-right:0pt; }} |
| 364 |
\Css{td.td11{ padding-left:5pt; padding-right:5pt; }} |
| 365 |
>>> |
| 366 |
|
| 367 |
|
| 368 |
|
| 369 |
|
| 370 |
|
| 371 |
|
| 372 |
\<configure tabular noalign\><<< |
| 373 |
\Configure{noalign}% |
| 374 |
{\f:tabular\d:tabular \HCode{<tr><td colspan="\ar:cnt">}} |
| 375 |
{\HCode{</td></tr>}\pend:def\TableNo{0}\c:tabular\e:tabular}% |
| 376 |
>>> |
| 377 |
|
| 378 |
\<inline comment\><<< |
| 379 |
\ifvmode\else\HCode{<!--tex4ht:inline-->}\fi |
| 380 |
>>> |
| 381 |
|
| 382 |
|
| 383 |
\<configure clear noalign\><<< |
| 384 |
\Configure{noalign}{}{}% |
| 385 |
>>> |
| 386 |
|
| 387 |
|
| 388 |
\<try env inline par\><<< |
| 389 |
\ShowPar |
| 390 |
>>> |
| 391 |
|
| 392 |
\<try inline par\><<< |
| 393 |
\ShowPar \par{\HCondtrue\noindent}% |
| 394 |
>>> |
| 395 |
|
| 396 |
|
| 397 |
\<tabular td align\><<< |
| 398 |
\NoFonts |
| 399 |
\bgroup |
| 400 |
\ifx \ttfamily\:UnDef \else \ttfamily\fi |
| 401 |
\ColMargins |
| 402 |
\egroup |
| 403 |
\EndNoFonts |
| 404 |
>>> |
| 405 |
|
| 406 |
|
| 407 |
\<td save EndP\><<< |
| 408 |
\SaveEndP |
| 409 |
>>> |
| 410 |
|
| 411 |
\<td recall EndP\><<< |
| 412 |
\RecallEndP |
| 413 |
>>> |
| 414 |
|
| 415 |
\<start array par box\><<< |
| 416 |
\par \ShowPar |
| 417 |
>>> |
| 418 |
|
| 419 |
\<end array par box\><<< |
| 420 |
\IgnorePar \EndP |
| 421 |
>>> |
| 422 |
|
| 423 |
|
| 424 |
\<configuring @()\><<< |
| 425 |
\Configure{@{}}{} |
| 426 |
>>> |
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
\<html latex array/tabular Config 4.0t\><<< |
| 432 |
\Configure{halignTB<>}{array}{\HCode{id="TBL-\TableNo" class="array"\Hnewline |
| 433 |
\GROUPS\Hnewline |
| 434 |
}<>\HAlign} |
| 435 |
\Css{table[rules] {border-left:solid black 0.4pt; |
| 436 |
border-right:solid black 0.4pt; }} |
| 437 |
\:CheckOption{pic-array} \if:Option \else |
| 438 |
\Configure{array} |
| 439 |
{\ifvmode \IgnorePar\fi \EndP\halignTB{array}\putVBorder} |
| 440 |
{\HCode{</table>}} |
| 441 |
{\R:HA} |
| 442 |
{\r:HA} |
| 443 |
{\D:HA\HCode{<div class="td}|<tabular td align|>% |
| 444 |
\HCode{">}|<start array par box|>\pic:env} |
| 445 |
{|<end array par box|>\HCode{</div>}\d:HA} |
| 446 |
\Configure{arrayparbox}{\ShowPar} |
| 447 |
\fi |
| 448 |
>>> |
| 449 |
|
| 450 |
|
| 451 |
|
| 452 |
|
| 453 |
|
| 454 |
|
| 455 |
\<html latex array/tabular Config 4.0t\><<< |
| 456 |
\let\VBorder=\empty \let\AllColMargins=\empty |
| 457 |
\Configure{VBorder} |
| 458 |
{\let\VBorder=\empty \let\AllColMargins=\empty |
| 459 |
\global\let\GROUPS=\empty \HAssign\NewGroup = 0 |
| 460 |
\gHAdvance\Next:TableNo by 1 \global\let\TableNo=\Next:TableNo |
| 461 |
\global\let\oldVBorder=\empty |
| 462 |
} |
| 463 |
{\xdef\VBorder{\VBorder\ifnum \NewGroup> 0 </colgroup>\fi} |
| 464 |
\HAssign\NewGroup = 0 \gdef\GROUPS{rules="groups"}% |
| 465 |
\gdef\oldVBorder{border="1" }% |
| 466 |
} |
| 467 |
{\Advance:\NewGroup by 1 |
| 468 |
\ifnum \NewGroup=1 \xdef\VBorder{\VBorder<colgroup |
| 469 |
id="TBL-\TableNo-\ar:cnt g">}\fi |
| 470 |
\xdef\VBorder{\VBorder<col\Hnewline id="TBL-\TableNo |
| 471 |
-\ar:cnt"\xml:empty>}\xdef\AllColMargins{\AllColMargins1}} |
| 472 |
{\xdef\AllColMargins{\AllColMargins 0}} |
| 473 |
% \Configure{HBorder} |
| 474 |
% {<tr\Hnewline class="hline">} {<td><hr\xml:empty></td>} {</tr>} |
| 475 |
% {<tr\Hnewline class="cline">} |
| 476 |
% {<td></td>} {<td><hr\xml:empty></td>} {</tr>} |
| 477 |
% {<tr\Hnewline class="vspace" style="font-size:\HBorderspace">} |
| 478 |
% {<td\Hnewline>\string </td>} {</tr>} |
| 479 |
% \Configure{putHBorder}{\HCode{\HBorder}} |
| 480 |
\HAssign\Next:TableNo=0 \global\let\TableNo=\Next:TableNo |
| 481 |
\Css{.hline hr, .cline hr{ height : 1px; margin:0px; }} |
| 482 |
>>> |
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
\<html latex array/tabular Config 4.0t\><<< |
| 488 |
\def\putVBorder{\expandafter\put:VBorder\VBorder</>|<par del|>} |
| 489 |
\def\put:VBorder#1</#2>#3|<par del|>{\def\:temp{#2}\ifx\:temp\empty |
| 490 |
\HCode{\VBorder}% |
| 491 |
\def\:temp{#1}\ifx\:temp\empty \else\HCode{</colgroup>}\fi |
| 492 |
\else \def\:temp{\put:VBorder#3|<par del|>}\expandafter\:temp\fi |
| 493 |
} |
| 494 |
>>> |
| 495 |
|
| 496 |
|
| 497 |
\<html latex array/tabular Config 4.0t\><<< |
| 498 |
\Configure{multicolumn} |
| 499 |
{\let\col:Css\empty |
| 500 |
\Configure{VBorder} |
| 501 |
{} |
| 502 |
{\edef\col:Css{\col:Css |
| 503 |
border-\ifnum \ar:cnt=0 left\else right\fi |
| 504 |
:solid black 0.4pt;}% |
| 505 |
}{}{}% |
| 506 |
} |
| 507 |
{\ifx \col:Css\empty \else |
| 508 |
\Css{td\#TBL-\TableNo-\HRow-\HCol{\col:Css}}% |
| 509 |
\fi |
| 510 |
} |
| 511 |
{\ifvmode\IgnorePar\fi |
| 512 |
\HCode{<div class="multicolumn" }\HColAlign\HCode{>}% |
| 513 |
\ifx \col:Css\empty \else |
| 514 |
\Css{td\#TBL-\TableNo-\HRow-\HCol{\col:Css}}% |
| 515 |
\fi |
| 516 |
} |
| 517 |
{\ifvmode\IgnorePar\fi \EndP\HCode{</div>}} |
| 518 |
>>> |
| 519 |
|
| 520 |
\<html latex array/tabular Config 4.0t\><<< |
| 521 |
\def\pic:env{% |
| 522 |
\def\begin##1{\bgroup |
| 523 |
\def\end####1{\o:end:{####1}\EndPicture\egroup}% |
| 524 |
\ifx \EndPicture\:UnDef |
| 525 |
\Picture+{ class="##1" style="text-align:middle"}% |
| 526 |
\else \let\EndPicture=\empty\fi |
| 527 |
\o:begin:{##1}}% |
| 528 |
} |
| 529 |
>>> |
| 530 |
|
| 531 |
|
| 532 |
\<configure javahelp tex4ht\><<< |
| 533 |
\Configure{halignTD} {}{} |
| 534 |
{<}{\HCode{ style="white-space:nowrap; text-align:left;"}} |
| 535 |
{-}{\HCode{ style="white-space:nowrap; text-align:center;"}} |
| 536 |
{>}{\HCode{ style="white-space:nowrap; text-align:right;"}} |
| 537 |
{^}{\HCode{ style="vertical-align:top; white-space:nowrap;"}} |
| 538 |
{=}{\HCode{ style="vertical-align:baseline; white-space:nowrap;"}} |
| 539 |
{||}{\HCode{ style="vertical-align:middle; white-space:nowrap;"}} |
| 540 |
{_}{\HCode{ style="vertical-align:bottom; white-space:nowrap;"}} |
| 541 |
{p}{\HCode{ style="white-space:normal; text-align:left;"}\Protect\a:HColWidth} |
| 542 |
{m}{\HCode{ style="white-space:nowrap; text-align:left; vertical-align:middle;"}} |
| 543 |
{b}{\HCode{ style="white-space:nowrap; text-align:left; vertical-align:baseline;"}} |
| 544 |
{} |
| 545 |
\NewConfigure{HColWidth}{1} |
| 546 |
\Configure{HColWidth}{} |
| 547 |
>>> |
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
|
| 552 |
|
| 553 |
%%%%%%%%%%%%% |
| 554 |
\subsection{Long Tables} |
| 555 |
%%%%%%%%%%%%% |
| 556 |
|
| 557 |
|
| 558 |
\<configure javahelp longtable\><<< |
| 559 |
|<config new longtable|> |
| 560 |
>>> |
| 561 |
|
| 562 |
|
| 563 |
\<configure javahelp longtable\><<< |
| 564 |
\:CheckOption{pic-longtable} \if:Option |
| 565 |
\ConfigureEnv{longtable} |
| 566 |
{\IgnorePar\EndP\Tg<div class="pic-longtable">\Picture*{}} |
| 567 |
{\EndPicture\Tg</div>}{}{} |
| 568 |
\Css{div.pic-longtable {text-align:center;}} |
| 569 |
\else |
| 570 |
\Log:Note{for pictorial longtable, |
| 571 |
use the command line option `pic-longtable'} |
| 572 |
\fi |
| 573 |
>>> |
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
\<config new longtable\><<< |
| 578 |
\Configure{halignTB<>}{longtable}{\HCode{id="TBL-\TableNo" |
| 579 |
class="longtable"\Hnewline |
| 580 |
\oldVBorder \GROUPS\Hnewline |
| 581 |
}<>\HAlign} |
| 582 |
\Css{table[rules] {border-left:solid black 0.4pt; |
| 583 |
border-right:solid black 0.4pt; }} |
| 584 |
\Configure{longtable} |
| 585 |
{\IgnorePar\EndP |
| 586 |
\HCode{|<show input line no|><div class="longtable">}% |
| 587 |
\halignTB{longtable}\putVBorder } |
| 588 |
{\HCode{</table></div>}} |
| 589 |
{\HCode{<tr \Hnewline}\halignTR\HCode{ id="TBL-\TableNo-\HRow-">}} |
| 590 |
{\r:HA} |
| 591 |
{\HCode{<td \ifnum \HMultispan>1 colspan="\HMultispan"\fi}% |
| 592 |
\halignTD \HCode{ id="TBL-\TableNo-\HRow-\HCol" |
| 593 |
\Hnewline class="td}|<tabular td align|>% |
| 594 |
\HCode{">}|<td save EndP|>% |
| 595 |
|<start array par box|>\PushStack\Table:Stck\TableNo} |
| 596 |
{\PopStack\Table:Stck\TableNo |<end array par box|>\d:HA} |
| 597 |
\Css{div.longtable{text-align:center;}} |
| 598 |
\Configure{longtableparbox}{\IgnorePar\leavevmode\ShowPar\par} |
| 599 |
>>> |
| 600 |
|
| 601 |
|
| 602 |
|
| 603 |
\<show input line no\><<< |
| 604 |
<!--l. \the\inputlineno-->% |
| 605 |
>>> |
| 606 |
|
| 607 |
|
| 608 |
%%%%%%%%%%%%% |
| 609 |
\subsection{Color Tables} |
| 610 |
%%%%%%%%%%%%% |
| 611 |
|
| 612 |
|
| 613 |
\<configure javahelp colortbl\><<< |
| 614 |
\Configure{@classz} |
| 615 |
{\let\begin:current@color|=\relax |
| 616 |
\let\end:current@color|=\relax } |
| 617 |
{% |
| 618 |
\ifx \CT@column@color\relax \else |
| 619 |
\ifx \CT@column@color\empty \else{% |
| 620 |
\def\CT@color{\@ifnextchar[\color:ii\color:i}% |
| 621 |
\CT@column@color|<par del|>% |
| 622 |
\edef\:temp{\noexpand\add:color |
| 623 |
{background-color}{\:temp}{\ar:cnt}}\:temp |
| 624 |
}\fi \fi |
| 625 |
} |
| 626 |
{\begin:current@color} |
| 627 |
{\end:current@color} |
| 628 |
\Configure{rowcolor}{\row:clr} |
| 629 |
\def\row:clr#1{{% |
| 630 |
\HAdvance\HRow by 1 |
| 631 |
\add:color{background-color}{#1}{\HRow-}}} |
| 632 |
\Configure{text-colortbl} |
| 633 |
{\add:color{color}{\current@color}{\HRow-\HCol}} |
| 634 |
\Configure{cell-colortbl} |
| 635 |
{\add:color{background-color}{\current@color}{\HRow-\HCol}} |
| 636 |
\def\add:color#1#2#3{% |
| 637 |
\Configure{SetHColor}{\Css{ \#TBL-\TableNo-#3{ #1:\HColor }}}{#2}} |
| 638 |
>>> |
| 639 |
|
| 640 |
%%%%%%%%%%%%% |
| 641 |
\subsection{Color} |
| 642 |
%%%%%%%%%%%%% |
| 643 |
|
| 644 |
|
| 645 |
\<configure javahelp color\><<< |
| 646 |
\HAssign\textcolorN=0 |
| 647 |
\Configure{colorbox} |
| 648 |
{\bgroup |
| 649 |
\gHAdvance\textcolorN by 1 |
| 650 |
\ifvmode \let\v:colorbox\def \IgnorePar \EndP |
| 651 |
\else \let\v:colorbox=\relax \fi |
| 652 |
|<colorbox background|>% |
| 653 |
\HCode{<\ifx \v:colorbox\def div\else span\fi \Hnewline |
| 654 |
class="colorbox" id="colorbox\textcolorN">}}% |
| 655 |
{\ifx \v:colorbox\def \EndP\HCode{</div>}\par |
| 656 |
\else \HCode{</span>}\fi |
| 657 |
\egroup |
| 658 |
} |
| 659 |
>>> |
| 660 |
|
| 661 |
|
| 662 |
|
| 663 |
|
| 664 |
\<configure javahelp color\><<< |
| 665 |
\Configure{textcolor} |
| 666 |
{\gHAdvance\textcolorN by 1 |
| 667 |
\Configure{color}% |
| 668 |
{\Configure{SetHColor} |
| 669 |
{\Css{span\#textcolor\textcolorN{color:\HColor}}}}% |
| 670 |
\HCode{<span id="textcolor\textcolorN">}}% |
| 671 |
{\HCode{</span>}} |
| 672 |
>>> |
| 673 |
|
| 674 |
|
| 675 |
|
| 676 |
\<colorbox background\><<< |
| 677 |
\let\A:color=\a:color |
| 678 |
\Configure{color}% |
| 679 |
{\let\a:color=\A:color |
| 680 |
\Configure{SetHColor} |
| 681 |
{\Css{\ifx \v:colorbox\def div\else span\fi |
| 682 |
\#colorbox\textcolorN{background-color:\HColor;}}}}% |
| 683 |
>>> |
| 684 |
|
| 685 |
|
| 686 |
\<\><<< |
| 687 |
\Configure{fcolorbox} |
| 688 |
{\gHAdvance\textcolorN by 1 |
| 689 |
\let\A:color=\a:color |
| 690 |
\Configure{color}% |
| 691 |
{\Configure{SetHColor}{\Css{\#colorbox\textcolorN{border: |
| 692 |
solid 1px \HColor;}}}}% |
| 693 |
\Configure{fbox}{\leavevmode |
| 694 |
\gHAdvance\textcolorN by -1 \let\a:color=\A:color}{}} |
| 695 |
{} |
| 696 |
>>> |
| 697 |
|
| 698 |
|
| 699 |
\<color.sty config 4.0t\><<< |
| 700 |
\Configure{fcolorbox} |
| 701 |
{\bgroup\gHAdvance\textcolorN by 1 |
| 702 |
\ifvmode \let\v:colorbox\def \IgnorePar \EndP |
| 703 |
\else \let\v:colorbox=\relax \fi |
| 704 |
\HCode{<\ifx \v:colorbox\def div\else span\fi \Hnewline |
| 705 |
class="colorbox" id="colorbox\textcolorN">}% |
| 706 |
|<fcolorbox border|>% |
| 707 |
\Configure{fbox}{\leavevmode }{}% |
| 708 |
} |
| 709 |
{\ifx \v:colorbox\def \EndP\HCode{</div>}\par |
| 710 |
\else \HCode{</span>}\fi \egroup} |
| 711 |
>>> |
| 712 |
|
| 713 |
\<fcolorbox border\><<< |
| 714 |
\let\A:color=\a:color |
| 715 |
\Configure{color}% |
| 716 |
{|<fcolor background|>% |
| 717 |
\Configure{SetHColor}{% |
| 718 |
\Css{\#colorbox\textcolorN{border: solid 1px \HColor;}}}% |
| 719 |
}% |
| 720 |
>>> |
| 721 |
|
| 722 |
\<fcolor background\><<< |
| 723 |
\Configure{color}% |
| 724 |
{\let\a:color=\A:color |
| 725 |
\Configure{SetHColor}{% |
| 726 |
\Css{\#colorbox\textcolorN{background-color: \HColor;}}% |
| 727 |
}}% |
| 728 |
>>> |
| 729 |
|
| 730 |
|
| 731 |
|
| 732 |
%%%%%%%%%%%%% |
| 733 |
\subsection{Fonts} |
| 734 |
%%%%%%%%%%%%% |
| 735 |
|
| 736 |
|
| 737 |
|
| 738 |
|
| 739 |
\<configure javahelp fontmath \><<< |
| 740 |
\Configure{textbf} |
| 741 |
{\ifimmediate\else \Protect\HCode{<b>}\fi} |
| 742 |
{\ifimmediate\else \Protect\HCode{</b>}\fi} |
| 743 |
\Configure{textit} |
| 744 |
{\ifimmediate\else \Protect\HCode{<i>}\fi} |
| 745 |
{\ifimmediate\else \Protect\HCode{</i>}\fi} |
| 746 |
\Configure{textsl} |
| 747 |
{\ifimmediate\else \Protect\HCode{<i>}\fi} |
| 748 |
{\ifimmediate\else \Protect\HCode{</i>}\fi} |
| 749 |
\Configure{texttt} |
| 750 |
{\ifimmediate\else \Protect\HCode{<tt>}\fi} |
| 751 |
{\ifimmediate\else \Protect\HCode{</tt>}\fi} |
| 752 |
\Configure{emph} |
| 753 |
{\ifimmediate\else \Protect\HCode{<em>}\fi} |
| 754 |
{\ifimmediate\else \Protect\HCode{</em>}\fi} |
| 755 |
>>> |
| 756 |
|
| 757 |
|
| 758 |
\<configure javahelp fontmath\><<< |
| 759 |
\Configure{jhxml} |
| 760 |
{% |
| 761 |
\let\textbf\empty |
| 762 |
\let\textit\empty |
| 763 |
\let\textsl\empty |
| 764 |
\let\texttt\empty |
| 765 |
\let\textsc\empty |
| 766 |
\let\emph\empty |
| 767 |
} |
| 768 |
>>> |
| 769 |
|
| 770 |
|
| 771 |
|
| 772 |
\<configure javahelp inputenc\><<< |
| 773 |
\Configure{jhxml} |
| 774 |
{% |
| 775 |
\let\IeC\empty |
| 776 |
} |
| 777 |
>>> |
| 778 |
|
| 779 |
%%%%%%%%%%%%% |
| 780 |
\subsection{French} |
| 781 |
%%%%%%%%%%%%% |
| 782 |
|
| 783 |
|
| 784 |
|
| 785 |
\<configure javahelp frenchb\><<< |
| 786 |
\Configure{jhxml} |
| 787 |
{% |
| 788 |
\expandafter\def\csname |
| 789 |
a:frenchb-thinspace\endcsname##1frenchb-thinspace\endcsname{}% |
| 790 |
} |
| 791 |
>>> |
| 792 |
|
| 793 |
\<configure javahelp frenchb \><<< |
| 794 |
\expandafter\let\csname jha:ftsp\expandafter\endcsname |
| 795 |
\csname a:frenchb-thinspace\endcsname |
| 796 |
\expandafter\def\csname a:frenchb-thinspace\endcsname{% |
| 797 |
\ifimmediate |
| 798 |
\expandafter\jha:ftspignore |
| 799 |
\else |
| 800 |
\expandafter\jha:ftsp |
| 801 |
\fi |
| 802 |
} |
| 803 |
\def\jha:ftspignore#1frenchb-thinspace\endcsname{} |
| 804 |
>>> |
| 805 |
|
| 806 |
|
| 807 |
|
| 808 |
%%%%%%%%%%%%% |
| 809 |
\subsection{Ulem} |
| 810 |
%%%%%%%%%%%%% |
| 811 |
|
| 812 |
|
| 813 |
|
| 814 |
\<configure javahelp ulem\><<< |
| 815 |
\Configure{uline} |
| 816 |
{\HCode{<span class="uline">}} {\HCode{</span>}} |
| 817 |
\Css{.uline{ text-decoration:underline; }} |
| 818 |
\Configure{uuline} |
| 819 |
{\HCode{<span class="uuline">}} {\HCode{</span>}} |
| 820 |
\Css{.uuline{ text-decoration:underline; }} |
| 821 |
\Configure{sout} |
| 822 |
{\HCode{<span class="sout">}} {\HCode{</span>}} |
| 823 |
\Css{span.sout {text-decoration: line-through }} |
| 824 |
\Configure{xout} |
| 825 |
{\HCode{<span class="xout"><span class="underline">}} |
| 826 |
{\HCode{</span></span>}} |
| 827 |
\Css{span.xout {text-decoration: line-through }} |
| 828 |
\Configure{uwave} |
| 829 |
{\HCode{<span class="uwave">}} |
| 830 |
{\HCode{</span>}} |
| 831 |
\Css{span.uwave {text-decoration:underline }} |
| 832 |
>>> |
| 833 |
|
| 834 |
|
| 835 |
|
| 836 |
|
| 837 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 838 |
\section{The JavaHelp Files} |
| 839 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 840 |
|
| 841 |
|
| 842 |
|
| 843 |
|
| 844 |
\<javahelp\><<< |
| 845 |
% javahelp.4ht (|version), generated from |jobname.tex |
| 846 |
% Copyright 2009-2019 TeX Users Group |
| 847 |
% Copyright |CopyYear.2003. Eitan M. Gurari |
| 848 |
|<TeX4ht copywrite|> |
| 849 |
>>> |
| 850 |
|
| 851 |
\<double acute iso-8859-2\><<< |
| 852 |
|<double acute code|>% |
| 853 |
>>> |
| 854 |
|
| 855 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 856 |
\subsection{The HTML Documentation (*.html)} |
| 857 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 858 |
|
| 859 |
Prepare a \LaTeX{} file and compile it for HTML 3.2. For instance, |
| 860 |
with the command {\tt htlatex jobname "html,3.2,3,javahelp"}. |
| 861 |
|
| 862 |
% \special{t4ht>foo.log} |
| 863 |
% \special{t4ht=...x...} |
| 864 |
% \special{t4ht*>foo.log} |
| 865 |
% \special{t4ht*>} |
| 866 |
|
| 867 |
|
| 868 |
\<configure javahelp Preamble\><<< |
| 869 |
|<instructions for log|> |
| 870 |
% \newif\ifimmediate |
| 871 |
% \immediatefalse |
| 872 |
>>> |
| 873 |
|
| 874 |
|
| 875 |
|
| 876 |
\<jh defs\><<< |
| 877 |
\def\Write:File#1#2{% |
| 878 |
\special{t4ht>#1}% |
| 879 |
\special{t4ht=#2}% |
| 880 |
\special{t4ht*>#1}% |
| 881 |
\special{t4ht*>}% |
| 882 |
} |
| 883 |
>>> |
| 884 |
|
| 885 |
|
| 886 |
\<configure javahelp Preamble\><<< |
| 887 |
\NewConfigure{jhxml}[1]{\concat:config\a:jhxml{#1}} |
| 888 |
\let\a:jhxml\relax |
| 889 |
>>> |
| 890 |
|
| 891 |
\<javahelp-a.4ht\><<< |
| 892 |
% javahelp-a.4ht (|version), generated from |jobname.tex |
| 893 |
% Copyright (C) 2009-2010 TeX Users Group |
| 894 |
% Copyright (C) |CopyYear.2003. Eitan M. Gurari |
| 895 |
|<TeX4ht copywrite|> |
| 896 |
\NextFile{\jobname.tmp} |
| 897 |
\HPage{} |
| 898 |
\bgroup |
| 899 |
\catcode`\:=11 |
| 900 |
\catcode`\@=11 |
| 901 |
\catcode`\"=12 |
| 902 |
\Configure{PROLOG}{} |
| 903 |
\Configure{HtmlPar}{}{}{}{} |
| 904 |
\Configure{tableofcontents}{}{}{}{}{} |
| 905 |
\Configure{htf}{0}{+}{}{}{}{}{}{}{} |
| 906 |
\ScriptEnv{dito}{\IgnorePar}{} |
| 907 |
\a:jhxml |
| 908 |
|<jh util|> |
| 909 |
|<jh root|> |
| 910 |
|<jh toc|> |
| 911 |
|<jh index|> |
| 912 |
|<jh at end|> |
| 913 |
\egroup |
| 914 |
\EndHPage{} |
| 915 |
>>> |
| 916 |
|
| 917 |
The HPage above is to ensure the all the references in the javahelp |
| 918 |
files will be to locations at other files, and so they will explicitly |
| 919 |
include the names of the files being referenced. The page is empty |
| 920 |
and not referenced by other pages. |
| 921 |
|
| 922 |
\<instructions for log\><<< |
| 923 |
\immediate\write-1{--------------- JavaHelp -----------------} |
| 924 |
\immediate\write-1{The entry (HelpSet) file for the java program |
| 925 |
is at `\jobname.hs'} |
| 926 |
\immediate\write-1{Generate a search database |
| 927 |
with, for instance, the command} |
| 928 |
\immediate\write-1{ java -jar |
| 929 |
...../jh1.1.3/javahelp/bin/jhindexer.jar |
| 930 |
-db \jobname-jhs \jobname*.html} |
| 931 |
\immediate\write-1{Compile the java program with a command similar to} |
| 932 |
\immediate\write-1{ javac -classpath |
| 933 |
...../jh1.1.3/javahelp/lib/jh.jar program.java} |
| 934 |
\immediate\write-1{Run the java program with a command similar to} |
| 935 |
\immediate\write-1{ java -classpath |
| 936 |
...../jh1.1.3/javahelp/lib/jh.jar;. program} |
| 937 |
\immediate\write-1{JavaHelp might require a compilation for HTML 3.2, |
| 938 |
for instance,} |
| 939 |
\immediate\write-1{ htlatex \jobname\space "html,javahelp,3.2,3"} |
| 940 |
\immediate\write-1{------------------------------------------} |
| 941 |
>>> |
| 942 |
|
| 943 |
|
| 944 |
|
| 945 |
\<jh defs\><<< |
| 946 |
\def\jhNote{% |
| 947 |
Created for JavaHelp |
| 948 |
(http://java.sun.com/products/javahelp/)\Hnewline |
| 949 |
by TeX4ht (https://tug.org/tex4ht/)\Hnewline |
| 950 |
from \jobname.tex \space |
| 951 |
} |
| 952 |
>>> |
| 953 |
|
| 954 |
We can't keep the comment boundaries |
| 955 |
in the macro because the adjacent hyphens |
| 956 |
in some cases merge into a n-dash |
| 957 |
under font encoding T1. For instance, |
| 958 |
|
| 959 |
\begin{verbatim} |
| 960 |
\documentclass{report} |
| 961 |
\usepackage[T1]{fontenc} |
| 962 |
\begin{document} |
| 963 |
|
| 964 |
\ScriptEnv{dito}{}{} |
| 965 |
|
| 966 |
\begin{dito} |
| 967 |
--[]-[] |
| 968 |
\end{dito} |
| 969 |
\end{document} |
| 970 |
\end{verbatim} |
| 971 |
|
| 972 |
|
| 973 |
|
| 974 |
\<tex4ht note\><<< |
| 975 |
\jhNote |
| 976 |
>>> |
| 977 |
|
| 978 |
|
| 979 |
|
| 980 |
\<par del\><<< |
| 981 |
!*?: >>> |
| 982 |
|
| 983 |
|
| 984 |
|
| 985 |
|
| 986 |
|
| 987 |
\<jh defs\><<< |
| 988 |
\Configure{crosslinks}{}{}{}{}{}{}{}{}{} |
| 989 |
>>> |
| 990 |
|
| 991 |
|
| 992 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 993 |
\subsection{The JavaHelp Root File (HelpSet File: jobname.hs)} |
| 994 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 995 |
|
| 996 |
This file introduces the files in the help distribution. |
| 997 |
|
| 998 |
|
| 999 |
\<jobname.hs: url of jh root file\><<< |
| 1000 |
\jobname.hs>>> |
| 1001 |
|
| 1002 |
|
| 1003 |
The etension name must be `hs'! |
| 1004 |
|
| 1005 |
|
| 1006 |
|
| 1007 |
\<dtd lang\><<< |
| 1008 |
\dTdLaNg>>> |
| 1009 |
|
| 1010 |
\<jh defs\><<< |
| 1011 |
\def\dTdLaNg{\expandafter |
| 1012 |
\ifx \csname a:dtd-lang\endcsname\relax EN\else |
| 1013 |
\csname a:dtd-lang\endcsname |
| 1014 |
\fi } |
| 1015 |
>>> |
| 1016 |
|
| 1017 |
\<jh root\><<< |
| 1018 |
|<jh root config|> |
| 1019 |
\IgnorePar\par\leavevmode\special{t4ht>|<jobname.hs: url of jh root file|>}% |
| 1020 |
\begin{dito}-\ |
| 1021 |
<?xml version="1.0" encoding="ISO-8859-1" ?> |
| 1022 |
\end{dito} |
| 1023 |
|<helpset DTD|> |
| 1024 |
\begin{dito}-\ |
| 1025 |
<!-\relax- |<tex4ht note|> -\relax-> |
| 1026 |
<helpset version="\dotVersion"> |
| 1027 |
<title>|<title label|></title> |
| 1028 |
<maps> |
| 1029 |
<homeID>|<home id|></homeID> |
| 1030 |
<mapref location="|<url of jh keys file|>"/> |
| 1031 |
</maps> |
| 1032 |
<view> |
| 1033 |
<name>TOC</name> |
| 1034 |
<label>|<toc label|></label> |
| 1035 |
<type>javax.help.TOCView</type> |
| 1036 |
<data>|<url of jh toc file|></data> |
| 1037 |
</view> |
| 1038 |
<view> |
| 1039 |
<name>Index</name> |
| 1040 |
<label>|<index label|></label> |
| 1041 |
<type>javax.help.IndexView</type> |
| 1042 |
<data>|<url of the jh index|></data> |
| 1043 |
</view> |
| 1044 |
<view> |
| 1045 |
<name>Search</name> |
| 1046 |
<label>|<search dir label|></label> |
| 1047 |
<type>javax.help.SearchView</type> |
| 1048 |
<data |
| 1049 |
engine="com.sun.java.help.search.DefaultSearchEngine">|<url of jh serach dir|></data> |
| 1050 |
</view> |
| 1051 |
</helpset> |
| 1052 |
\end{dito} |
| 1053 |
\IgnorePar\par\leavevmode\special{t4ht<|<jobname.hs: url of jh root file|>} |
| 1054 |
>>> |
| 1055 |
|
| 1056 |
|
| 1057 |
|
| 1058 |
\<toc label\><<< |
| 1059 |
\tocLabel>>> |
| 1060 |
|
| 1061 |
\<index label\><<< |
| 1062 |
\indexLabel>>> |
| 1063 |
|
| 1064 |
\<search dir label\><<< |
| 1065 |
Search>>> |
| 1066 |
|
| 1067 |
\<title label\><<< |
| 1068 |
\titleLabel>>> |
| 1069 |
|
| 1070 |
|
| 1071 |
\<jh root config\><<< |
| 1072 |
\edef\tocLabel{\ifx\contentsname\:UnDef Table Of Contents\else |
| 1073 |
\ifx\contentsname\empty Table Of Contents\else |
| 1074 |
\contentsname\fi\fi} |
| 1075 |
\edef\indexLabel{\ifx\indexname\:UnDef Index\else |
| 1076 |
\ifx\indexname\empty Index\else \indexname\fi\fi} |
| 1077 |
\ifTag{TITLE+} |
| 1078 |
{\edef\titleLabel{\LikeRef{TITLE+}}} |
| 1079 |
{\def\titleLabel{\jobname}} |
| 1080 |
>>> |
| 1081 |
|
| 1082 |
|
| 1083 |
|
| 1084 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1085 |
\subsection{The JavaHelp Search Directory (jobname-jhs)} |
| 1086 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1087 |
|
| 1088 |
|
| 1089 |
\<url of jh serach dir\><<< |
| 1090 |
\jobname-jhs>>> |
| 1091 |
|
| 1092 |
\def\JHINDEXER{java -jar |
| 1093 |
\JHDIR jh2.0/javahelp/bin/jhindexer.jar |
| 1094 |
-db \jobname-jhs \jobname*.html} |
| 1095 |
|
| 1096 |
|
| 1097 |
|
| 1098 |
|
| 1099 |
Use a command similar to `{\tt \JHINDEXER}' |
| 1100 |
to create a search directory \verb+JavaHelpSearch+ for JavaHelp from the HTML pages of the documentation. |
| 1101 |
|
| 1102 |
|
| 1103 |
|
| 1104 |
|
| 1105 |
|
| 1106 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1107 |
\subsection{The JavaHelp Keys to URLs Mapping (jobname.jhm)} |
| 1108 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1109 |
|
| 1110 |
|
| 1111 |
|
| 1112 |
\<url of jh keys file\><<< |
| 1113 |
\jobname.jhm>>> |
| 1114 |
|
| 1115 |
|
| 1116 |
The homeId tag provides the default entry to present when a HelpSet is |
| 1117 |
first shown. |
| 1118 |
|
| 1119 |
\<home id\><<< |
| 1120 |
\jobname>>> |
| 1121 |
|
| 1122 |
The default entry point can be overwritten in: |
| 1123 |
|
| 1124 |
\<entry point\><<< |
| 1125 |
\jobname>>> |
| 1126 |
|
| 1127 |
|
| 1128 |
|
| 1129 |
Assigns keys to locations within the HTML document. |
| 1130 |
|
| 1131 |
|
| 1132 |
|
| 1133 |
\<jh at start\><<< |
| 1134 |
\Write:File |
| 1135 |
{|<url of jh keys file|>} |
| 1136 |
{|<map preamble|>} |
| 1137 |
>>> |
| 1138 |
|
| 1139 |
|
| 1140 |
\<map preamble\><<< |
| 1141 |
<?xml version="1.0" encoding="ISO-8859-1" ?>\Hnewline |
| 1142 |
|<map DTD|> |
| 1143 |
\Hnewline <!-- |<tex4ht note|> -->\Hnewline |
| 1144 |
<map version="\dotVersion">\Hnewline |
| 1145 |
<mapID target="|<entry point|>" url="\jobname.html"/>\Hnewline |
| 1146 |
>>> |
| 1147 |
|
| 1148 |
|
| 1149 |
\<jh defs\><<< |
| 1150 |
\HAssign\mapEntry=0 |
| 1151 |
>>> |
| 1152 |
|
| 1153 |
|
| 1154 |
\<add index entry to map\><<< |
| 1155 |
\gHAdvance\mapEntry by 1 |
| 1156 |
\Write:File |
| 1157 |
{|<url of jh keys file|>}% |
| 1158 |
{<mapID target="indexentry-\mapEntry" |
| 1159 |
url="\RefFileNumber\FileNumber |
| 1160 |
\#\title:chs {dx\last:haddr}{\cur:th\:currentlabel}% |
| 1161 |
" />\Hnewline}% |
| 1162 |
>>> |
| 1163 |
|
| 1164 |
|
| 1165 |
|
| 1166 |
\<jh defs\><<< |
| 1167 |
\AtBeginDocument{% |
| 1168 |
\let\jh:toc=\auto:toc |
| 1169 |
\expandafter\append:defI\csname tableofcontents*\endcsname{% |
| 1170 |
\global\let\jh:toc=\auto:toc }% |
| 1171 |
} |
| 1172 |
>>> |
| 1173 |
|
| 1174 |
|
| 1175 |
\<load table of contents\><<< |
| 1176 |
\expandafter\ifx \csname jh:toc\endcsname\relax |
| 1177 |
\tableofcontents |
| 1178 |
\else |
| 1179 |
\expandafter\expandafter\expandafter\tableofcontents |
| 1180 |
\expandafter\expandafter\expandafter[\csname |
| 1181 |
jh:toc\endcsname]% |
| 1182 |
\fi |
| 1183 |
>>> |
| 1184 |
|
| 1185 |
\<jh at end\><<< |
| 1186 |
\special{t4ht>|<url of jh keys file|>}% |
| 1187 |
\bgroup |
| 1188 |
|<jh map for toc|> |
| 1189 |
\bgroup \catcode`\:=12 \catcode`\@=12 \let\contentsname\empty |
| 1190 |
|<load table of contents|>% |
| 1191 |
\egroup |
| 1192 |
\HCode {</map>\Hnewline} |
| 1193 |
\egroup |
| 1194 |
\special{t4ht*>|<url of jh keys file|>}% |
| 1195 |
\special{t4ht*>}% |
| 1196 |
>>> |
| 1197 |
|
| 1198 |
\<jh map for toc\><<< |
| 1199 |
\Configure{Link}{mapID}{target="\a:mapIdTarget" url=}{}{} |
| 1200 |
\Configure{TocLink}{\Link{#2}{}\EndLink} |
| 1201 |
\let\jh:doTocEntry\:doTocEntry |
| 1202 |
\def\:doTocEntry#1#2#3{% |
| 1203 |
\edef\sectioningKey{\expandafter\gob:IV\string#1}% |
| 1204 |
\edef\:temp{\noexpand\ConfigureToc{\sectioningKey} |
| 1205 |
{}{\relax}{}{}}\:temp |
| 1206 |
|<config toc target entry|>% |
| 1207 |
\jh:doTocEntry#1{#2}{#3}} |
| 1208 |
\def\gob:IV#1#2#3#4{} |
| 1209 |
\def\sectioningKey{NoToc} |
| 1210 |
>>> |
| 1211 |
|
| 1212 |
|
| 1213 |
|
| 1214 |
|
| 1215 |
|
| 1216 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1217 |
\subsection{The JavaHelp TOC (jobname-jht.xml)} |
| 1218 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1219 |
|
| 1220 |
\<url of jh toc file\><<< |
| 1221 |
\jobname-jht.xml>>> |
| 1222 |
|
| 1223 |
\<jh toc\><<< |
| 1224 |
\bgroup |
| 1225 |
%\immediatetrue |
| 1226 |
|<jh TOC config|> |
| 1227 |
|<start jh TOC|> |
| 1228 |
|<load table of contents|>% |
| 1229 |
|<end jh TOC|> |
| 1230 |
\egroup |
| 1231 |
>>> |
| 1232 |
|
| 1233 |
\<start jh TOC\><<< |
| 1234 |
\IgnorePar\par\leavevmode\special{t4ht>|<url of jh toc file|>}% |
| 1235 |
\begin{dito}-\ |
| 1236 |
<?xml version="1.0" encoding="ISO-8859-1" ?> |
| 1237 |
\end{dito} |
| 1238 |
|<toc DTD|> |
| 1239 |
\begin{dito}-\ |
| 1240 |
<!-\relax- |<tex4ht note|> -\relax-> |
| 1241 |
<toc version="\dotVersion"> |
| 1242 |
<tocitem target="|<entry point|>" text="|<title label|>|<uni sp|>"> |
| 1243 |
\end{dito} |
| 1244 |
\let\end:jhhook=\empty |
| 1245 |
\catcode`\:=12 \catcode`\@=12 \let\contentsname\empty |
| 1246 |
\NoFonts |
| 1247 |
>>> |
| 1248 |
|
| 1249 |
\<end jh TOC\><<< |
| 1250 |
\EndNoFonts |
| 1251 |
\catcode`\:=11 \catcode`\@=11 |
| 1252 |
\end:jhhook |
| 1253 |
\begin{dito} |
| 1254 |
</tocitem> |
| 1255 |
</toc> |
| 1256 |
\end{dito} |
| 1257 |
\special{t4ht<|<url of jh toc file|>} |
| 1258 |
>>> |
| 1259 |
|
| 1260 |
|
| 1261 |
|
| 1262 |
\<jh TOC config\><<< |
| 1263 |
\Configure{TocLink} |
| 1264 |
{\HCode{<tocitem target="\a:mapIdTarget"\Hnewline |
| 1265 |
text="}\hbox{#4}\HCode{|<uni sp|>">\Hnewline}} |
| 1266 |
\let\jh:doTocEntry\:doTocEntry |
| 1267 |
\def\:doTocEntry#1#2#3{% |
| 1268 |
\edef\sectioningKey{\expandafter\gob:IV\string#1}% |
| 1269 |
\edef\:temp{\noexpand\ConfigureToc{\sectioningKey} |
| 1270 |
{}{\noexpand\set:endtocitem{\sectioningKey}}{}{}}\:temp |
| 1271 |
|<config toc target entry|>% |
| 1272 |
\jh:doTocEntry#1{#2}{#3}} |
| 1273 |
\def\gob:IV#1#2#3#4{} |
| 1274 |
\def\sectioningKey{NoToc} |
| 1275 |
>>> |
| 1276 |
|
| 1277 |
|
| 1278 |
|
| 1279 |
\<jh util\><<< |
| 1280 |
\def\set:endtocitem#1{% |
| 1281 |
\csname catchAt:#1\endcsname |
| 1282 |
\expandafter\ifx\csname a:end#1\endcsname\relax |
| 1283 |
\HCode{</tocitem>}% |
| 1284 |
\else |
| 1285 |
\expandafter\ifx \csname jh:#1\endcsname\relax |
| 1286 |
|<end tocitem at end of toc|>% |
| 1287 |
\def\:tempc##1,{\if ,##1,% |
| 1288 |
\expandafter\gob:pardel |
| 1289 |
\else |
| 1290 |
|<end tocitem at toc entry of diff type|>% |
| 1291 |
\expandafter\:tempc |
| 1292 |
\fi}% |
| 1293 |
\expandafter\expandafter\expandafter |
| 1294 |
\:tempc\csname a:end#1\endcsname,,|<par del|>% |
| 1295 |
\fi |
| 1296 |
|<end tocitem at toc entry of same type|>% |
| 1297 |
\fi |
| 1298 |
} |
| 1299 |
\def\gob:pardel#1|<par del|>{} |
| 1300 |
>>> |
| 1301 |
|
| 1302 |
|
| 1303 |
\<end tocitem at toc entry of same type\><<< |
| 1304 |
\csname jh:#1\endcsname |
| 1305 |
\expandafter\gdef\csname jh:#1\endcsname{% |
| 1306 |
\expandafter\global\expandafter\let\csname jh:#1\endcsname=\empty |
| 1307 |
\HCode{</tocitem><!--/#1-->}}% |
| 1308 |
>>> |
| 1309 |
|
| 1310 |
\<end tocitem at toc entry of diff type\><<< |
| 1311 |
\expandafter\ifx \csname catchAt:##1\endcsname \relax |
| 1312 |
\expandafter\gdef\csname |
| 1313 |
catchAt:##1\endcsname{\csname jh:#1\endcsname}% |
| 1314 |
\else |
| 1315 |
\expandafter\pend:def\csname |
| 1316 |
catchAt:##1\endcsname{\csname jh:#1\endcsname}% |
| 1317 |
\expandafter\global\expandafter\let\csname |
| 1318 |
catchAt:##1\expandafter\endcsname\csname catchAt:##1\endcsname |
| 1319 |
\fi |
| 1320 |
>>> |
| 1321 |
|
| 1322 |
|
| 1323 |
\<end tocitem at end of toc\><<< |
| 1324 |
\append:def\end:jhhook{% |
| 1325 |
\csname jh:#1\endcsname |
| 1326 |
\expandafter\global\expandafter |
| 1327 |
\let\csname jh:#1\endcsname\:UnDef}% |
| 1328 |
\global\let\end:jhhook\end:jhhook |
| 1329 |
>>> |
| 1330 |
|
| 1331 |
|
| 1332 |
|
| 1333 |
|
| 1334 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1335 |
\subsection{The JavaHelp Index (jobname-jhi.xml)} |
| 1336 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1337 |
|
| 1338 |
\<url of the jh index\><<< |
| 1339 |
\jobname-jhi.xml>>> |
| 1340 |
|
| 1341 |
\<jh index\><<< |
| 1342 |
\bgroup |
| 1343 |
|<jh IDX config|> |
| 1344 |
|<start jh IDX|> |
| 1345 |
|<load index entries|>% |
| 1346 |
|<end jh IDX|> |
| 1347 |
\egroup |
| 1348 |
>>> |
| 1349 |
|
| 1350 |
|
| 1351 |
\<start jh IDX\><<< |
| 1352 |
\IgnorePar\par\leavevmode\special{t4ht>|<url of the jh index|>}% |
| 1353 |
\begin{dito}-\ |
| 1354 |
<?xml version="1.0" encoding="ISO-8859-1" ?> |
| 1355 |
\end{dito} |
| 1356 |
|<index DTD|> |
| 1357 |
\begin{dito}-\ |
| 1358 |
<!-\relax- |<tex4ht note|> -\relax-> |
| 1359 |
<index version="\dotVersion"> |
| 1360 |
\end{dito} |
| 1361 |
>>> |
| 1362 |
|
| 1363 |
\<end jh IDX\><<< |
| 1364 |
\begin{dito} |
| 1365 |
</index> |
| 1366 |
\end{dito} |
| 1367 |
\special{t4ht<|<url of the jh index|>}% |
| 1368 |
>>> |
| 1369 |
|
| 1370 |
|
| 1371 |
\<load index entries\><<< |
| 1372 |
\let\indexname\empty |
| 1373 |
\def\gobbleLnk#1, \LNK#2#3#4#5{#1\HCode{" target="indexentry-#5"}} |
| 1374 |
\Configure{theindex} |
| 1375 |
{}{} |
| 1376 |
{\hbox\bgroup\HCode{<\string !--index-item--><indexitem |
| 1377 |
text="}\gobbleLnk} |
| 1378 |
{\HCode{/>}\egroup\hfill\break} |
| 1379 |
{\hbox\bgroup\HCode{<\string !--subex-item--><indexitem |
| 1380 |
text="}\gobbleLnk} |
| 1381 |
{\HCode{/>}\egroup\hfill\break} |
| 1382 |
{\hbox\bgroup\HCode{<\string !--subsubitem--><indexitem |
| 1383 |
text="}\gobbleLnk} |
| 1384 |
{\HCode{/>}\egroup\hfill\break} |
| 1385 |
{} |
| 1386 |
\immediate\openin15=\jobname.ind |
| 1387 |
\ifeof15 |
| 1388 |
\immediate\closein15 |
| 1389 |
\else |
| 1390 |
\immediate\closein15 |
| 1391 |
\input \jobname.ind |
| 1392 |
\fi |
| 1393 |
>>> |
| 1394 |
|
| 1395 |
|
| 1396 |
|
| 1397 |
\<load index entriesNO\><<< |
| 1398 |
\def\beforeindex#1||LNK#2#3{#1}% |
| 1399 |
\def\indexentry#1#2{\HCode{<indexitem target="indexentry-#2" |
| 1400 |
text="}\beforeindex#1\HCode{|<uni sp|>" />\Hnewline}}% |
| 1401 |
\immediate\openin15=\jobname.4dx |
| 1402 |
\ifeof15 |
| 1403 |
\immediate\closein15 |
| 1404 |
\else |
| 1405 |
\immediate\closein15 |
| 1406 |
\input \jobname.4dx |
| 1407 |
\fi |
| 1408 |
>>> |
| 1409 |
|
| 1410 |
|
| 1411 |
\<jh defs\><<< |
| 1412 |
\HAssign\indexEntry=0 |
| 1413 |
\append:defI\@wrindex{% |
| 1414 |
|<add index entry to map|>% |
| 1415 |
} |
| 1416 |
>>> |
| 1417 |
|
| 1418 |
|
| 1419 |
JavaHelp has problems with unicode values at the end of text fields in |
| 1420 |
the toc of within the jht file: it refuses `\verb+text="Menü"+' |
| 1421 |
(but accepts `\verb+text="Menü "+'). The following adds spaces at |
| 1422 |
the end of the text attribute values. |
| 1423 |
|
| 1424 |
\<uni sp\><<< |
| 1425 |
>>> |
| 1426 |
|
| 1427 |
A similar problem occurs when two unicode character codes follow each |
| 1428 |
other. In this case, the second one is not properly rendered. |
| 1429 |
|
| 1430 |
|
| 1431 |
%%%%%%%%%%%%% |
| 1432 |
\subsection{Configuring Link Targets} |
| 1433 |
%%%%%%%%%%%%% |
| 1434 |
|
| 1435 |
\<config toc target entry\><<< |
| 1436 |
\expandafter\target:info#3//% |
| 1437 |
\b:mapIdTarget |
| 1438 |
>>> |
| 1439 |
|
| 1440 |
\<jh defs\><<< |
| 1441 |
\def\target:info#1#2#3#4#5#6//{% |
| 1442 |
\let\sectionType=\sectioningKey |
| 1443 |
\let\sectionId\TocCount |
| 1444 |
\Advance:\sectionId 1 |
| 1445 |
\def\sectionName{#5}% |
| 1446 |
} |
| 1447 |
\NewConfigure{mapIdTarget}{2} |
| 1448 |
\Configure{mapIdTarget} |
| 1449 |
{\sectionType-\sectionId} |
| 1450 |
{} |
| 1451 |
>>> |
| 1452 |
|
| 1453 |
|
| 1454 |
|
| 1455 |
%%%%%%%%%%%%% |
| 1456 |
\subsection{Version Information} |
| 1457 |
%%%%%%%%%%%%% |
| 1458 |
|
| 1459 |
|
| 1460 |
|
| 1461 |
\<helpset DTD\><<< |
| 1462 |
\begin{dito}-\ |
| 1463 |
<!DOCTYPE helpset PUBLIC |
| 1464 |
"-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version \dotVersion//|<dtd lang|>" |
| 1465 |
"http://java.sun.com/products/javahelp/helpset_\subVersion.dtd"> |
| 1466 |
\end{dito} |
| 1467 |
>>> |
| 1468 |
|
| 1469 |
\<toc DTD\><<< |
| 1470 |
\begin{dito}-\ |
| 1471 |
<!DOCTYPE toc PUBLIC |
| 1472 |
"-//Sun Microsystems Inc.//DTD JavaHelp TOC Version \dotVersion//|<dtd lang|>" |
| 1473 |
"http://java.sun.com/products/javahelp/toc_\subVersion.dtd"> |
| 1474 |
\end{dito} |
| 1475 |
>>> |
| 1476 |
|
| 1477 |
\<index DTD\><<< |
| 1478 |
\begin{dito}-\ |
| 1479 |
<!DOCTYPE index PUBLIC |
| 1480 |
"-//Sun Microsystems Inc.//DTD JavaHelp Index Version \dotVersion//|<dtd lang|>" |
| 1481 |
"http://java.sun.com/products/javahelp/index_\subVersion.dtd"> |
| 1482 |
\end{dito} |
| 1483 |
>>> |
| 1484 |
|
| 1485 |
|
| 1486 |
\<old index DTD\><<< |
| 1487 |
<!DOCTYPE index PUBLIC |
| 1488 |
"-//Sun Microsystems Inc.//DTD JavaHelp Index Version \dotVersion//|<dtd lang|>" |
| 1489 |
"http://java.sun.com/products/javahelp/index_\subVersion.dtd"> |
| 1490 |
>>> |
| 1491 |
|
| 1492 |
|
| 1493 |
|
| 1494 |
|
| 1495 |
|
| 1496 |
\<map DTD\><<< |
| 1497 |
<!DOCTYPE map PUBLIC\Hnewline |
| 1498 |
"-//Sun Microsystems Inc.//DTD |
| 1499 |
JavaHelp Map Version \dotVersion//|<dtd lang|>"\Hnewline |
| 1500 |
"http://java.sun.com/products/javahelp/map_\subVersion.dtd"> >>> |
| 1501 |
|
| 1502 |
|
| 1503 |
\<jh defs\><<< |
| 1504 |
\:CheckOption{jh1.0} \if:Option |
| 1505 |
\def\dotVersion{1.0} |
| 1506 |
\def\subVersion{1\string_0} |
| 1507 |
\else |
| 1508 |
\def\dotVersion{2.0} |
| 1509 |
\def\subVersion{2\string_0} |
| 1510 |
\fi |
| 1511 |
>>> |
| 1512 |
|
| 1513 |
|
| 1514 |
|
| 1515 |
|
| 1516 |
|
| 1517 |
|
| 1518 |
|
| 1519 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1520 |
\subsection{Incorporate JavaHelp into a program} |
| 1521 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1522 |
|
| 1523 |
Url of JavaHelp root file (jobname.hs) |
| 1524 |
|
| 1525 |
\url{http://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/javahelp/javahelp.html} |
| 1526 |
|
| 1527 |
%// javac -classpath ~/javahelp.dir/jh2.0/javahelp/lib/jh.jar program.java |
| 1528 |
%// java -classpath ~/javahelp.dir/jh2.0/javahelp/lib/jh.jar program |
| 1529 |
|
| 1530 |
\<program\><<< |
| 1531 |
import java.net.URL; |
| 1532 |
import javax.help.*; |
| 1533 |
import javax.swing.*; |
| 1534 |
public class program { |
| 1535 |
//^^^^^^^ |
| 1536 |
public static void main(String args[]) { |
| 1537 |
JHelp helpViewer=null; |
| 1538 |
try { |
| 1539 |
ClassLoader cl = program.class.getClassLoader(); |
| 1540 |
//^^^^^^^ |
| 1541 |
URL url = HelpSet.findHelpSet(cl, |
| 1542 |
"|<jobname.hs: url of jh root file|>"); |
| 1543 |
HelpSet hs = new HelpSet(cl, url); |
| 1544 |
helpViewer = new JHelp( hs ); |
| 1545 |
/* |
| 1546 |
helpViewer.setCurrentID("|<entry point|>"); |
| 1547 |
*/ |
| 1548 |
} catch (Exception e) { |
| 1549 |
System.out.println("error"); System.exit(0); |
| 1550 |
} |
| 1551 |
JFrame frame = new JFrame(); |
| 1552 |
frame.getContentPane().add(helpViewer); |
| 1553 |
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); |
| 1554 |
frame.setSize(500,500); |
| 1555 |
frame.setVisible(true); |
| 1556 |
} |
| 1557 |
} |
| 1558 |
>>> |
| 1559 |
|
| 1560 |
|
| 1561 |
\url{http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javahelp/} |
| 1562 |
|
| 1563 |
\<HelpMenu\><<< |
| 1564 |
import java.net.*; |
| 1565 |
import javax.help.*; |
| 1566 |
import javax.swing.*; |
| 1567 |
import java.awt.event.*; |
| 1568 |
|
| 1569 |
public class HelpMenu { |
| 1570 |
JFrame f; |
| 1571 |
JMenuItem topics; |
| 1572 |
|
| 1573 |
public HelpMenu() { |
| 1574 |
f = new JFrame("Menu Example"); |
| 1575 |
JMenuBar mbar = new JMenuBar(); |
| 1576 |
|
| 1577 |
// a file menu |
| 1578 |
JMenu file = new JMenu("File"); |
| 1579 |
JMenu help = new JMenu("Help"); |
| 1580 |
|
| 1581 |
// add an item to the help menu |
| 1582 |
help.add(topics = new JMenuItem("Help Topics")); |
| 1583 |
|
| 1584 |
// add the menu items to the menu bar |
| 1585 |
mbar.add(file); |
| 1586 |
mbar.add(help); |
| 1587 |
|
| 1588 |
// 1. create HelpSet and HelpBroker objects |
| 1589 |
HelpSet hs = getHelpSet(|<jobname.hs: url of jh root file|>); |
| 1590 |
HelpBroker hb = hs.createHelpBroker(); |
| 1591 |
|
| 1592 |
// 2. assign help to components |
| 1593 |
/* |
| 1594 |
CSH.setCurrentID("|<entry point|>"); |
| 1595 |
*/ |
| 1596 |
// 3. handle events |
| 1597 |
topics.addActionListener(new CSH.DisplayHelpFromSource(hb)); |
| 1598 |
|
| 1599 |
// attach menubar to frame, set its size, and make it visible |
| 1600 |
f.setJMenuBar(mbar); |
| 1601 |
f.setSize(500, 300); |
| 1602 |
f.setVisible(true); |
| 1603 |
} |
| 1604 |
|
| 1605 |
/** |
| 1606 |
* find the helpset file and create a HelpSet object |
| 1607 |
*/ |
| 1608 |
public HelpSet getHelpSet(String helpsetfile) { |
| 1609 |
HelpSet hs = null; |
| 1610 |
ClassLoader cl = this.getClass().getClassLoader(); |
| 1611 |
try { |
| 1612 |
URL hsURL = HelpSet.findHelpSet(cl, helpsetfile); |
| 1613 |
hs = new HelpSet(null, hsURL); |
| 1614 |
} catch(Exception ee) { |
| 1615 |
System.out.println("HelpSet: "+ee.getMessage()); |
| 1616 |
System.out.println("HelpSet: "+ helpsetfile + " not found"); |
| 1617 |
} |
| 1618 |
return hs; |
| 1619 |
} |
| 1620 |
|
| 1621 |
public static void main(String argv[]) { |
| 1622 |
new HelpMenu(); |
| 1623 |
} |
| 1624 |
} |
| 1625 |
>>> |
| 1626 |
|
| 1627 |
|
| 1628 |
|
| 1629 |
|
| 1630 |
|
| 1631 |
|
| 1632 |
|
| 1633 |
|
| 1634 |
|
| 1635 |
%%%%%%%%%%%%%%%%%%%%% |
| 1636 |
\subsection{Compiling} |
| 1637 |
%%%%%%%%%%%%%%%%%%%%% |
| 1638 |
|
| 1639 |
\def\JAVAC{javac -classpath \JHDIR jh2.0/javahelp/lib/jh.jar program.java} |
| 1640 |
|
| 1641 |
Add JavaHelp to your program, say `program.java', and compile the |
| 1642 |
program with the command `{\tt \JAVAC}'. |
| 1643 |
|
| 1644 |
|
| 1645 |
|
| 1646 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1647 |
\subsection{Running} |
| 1648 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1649 |
|
| 1650 |
\def\RUN{java -classpath \JHDIR jh2.0/javahelp/lib/jh.jar;. program} |
| 1651 |
|
| 1652 |
Use the a command similar to `{\tt \RUN}'. |
| 1653 |
|
| 1654 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1655 |
\subsection{Compressing (with JAR)} |
| 1656 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1657 |
|
| 1658 |
|
| 1659 |
|
| 1660 |
|
| 1661 |
|
| 1662 |
\begin{verbatim} |
| 1663 |
javac -classpath c:\jh1.1.3\javahelp\lib\jhall.jar |
| 1664 |
-d c:\temp |
| 1665 |
JavaHelpTest.java |
| 1666 |
|
| 1667 |
jar cvfm JavaHelpTest.jar manifest JavaHelpTest.class |
| 1668 |
|
| 1669 |
java -jar jh1.3.1/demos/bin/UserGuide.jar |
| 1670 |
\end{verbatim} |
| 1671 |
|
| 1672 |
|
| 1673 |
|
| 1674 |
|
| 1675 |
|
| 1676 |
|
| 1677 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1678 |
\subsection{Getting the JavaHelp Software} |
| 1679 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1680 |
|
| 1681 |
|
| 1682 |
Download JavaHelp from |
| 1683 |
\url{http://java.sun.com/products/javahelp/download_binary.html} |
| 1684 |
and unzip it into some directory (say {\tt \JHDIR}). |
| 1685 |
|
| 1686 |
|
| 1687 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1688 |
\section{Sample} |
| 1689 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1690 |
|
| 1691 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1692 |
\subsection{Help Set} |
| 1693 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1694 |
|
| 1695 |
\verbatiminput{\jobname.hs} |
| 1696 |
|
| 1697 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1698 |
\subsection{Map Files} |
| 1699 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1700 |
|
| 1701 |
\verbatiminput{\jobname.jhm} |
| 1702 |
|
| 1703 |
|
| 1704 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1705 |
\subsection{Table of Contents} |
| 1706 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1707 |
|
| 1708 |
\verbatiminput{\jobname-jht.xml} |
| 1709 |
|
| 1710 |
|
| 1711 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1712 |
\subsection{Index} |
| 1713 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1714 |
|
| 1715 |
\verbatiminput{\jobname-jhi.xml} |
| 1716 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1717 |
|
| 1718 |
% \OutputCodE\<javahelp.4ht\> |
| 1719 |
\OutputCodE\<javahelp-a.4ht\> |
| 1720 |
|
| 1721 |
\ifOption{javahelp} |
| 1722 |
{ |
| 1723 |
\Needs{"xhlatex \jobname\space \string\"html,3,javahelp\string\""} |
| 1724 |
\Needs{"xhlatex \jobname\space \string\"html,3,javahelp\string\""} |
| 1725 |
} |
| 1726 |
{} |
| 1727 |
|
| 1728 |
\endinput |
| 1729 |
|
| 1730 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 1731 |
|
| 1732 |
|
| 1733 |
|
| 1734 |
|
| 1735 |
|
| 1736 |
|
| 1737 |
|