<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% $Id: tex4ht-javahelp.tex 680 2020-03-16 17:42:41Z karl $
% compile 3 times: latex tex4ht-javahelp   
%             or  xhlatex tex4ht-javahelp "html,3,sections+"
%
% Copyright 2009-2020 TeX Users Group
% Copyright 2003-2009 Eitan M. Gurari
% Released under LPPL 1.3c+.
% See tex4ht-cpright.tex for license text.

\ifx \HTML\UnDef
   \def\HTML{javahelp} 
   \def\PREAMBLE{%
      \usepackage{url}%
%      \usepackage{moreverb}
%      \usepackage{hyperref}%
   }
   \def\CONFIG{\jobname}
   \def\MAKETITLE{\author{Eitan M. Gurari}}
   \def\next{\input mktex4ht.4ht  \endinput}
   \expandafter\next
\fi

\input{common-code}
\input{common}
\input{tex4ht-cpright}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\verbatiminput#1{%
\immediate\openin15=#1
\immediate\ifeof15 \else
\immediate\closein15
   \bgroup
   \tt
   \catcode`\\=12
   \catcode`\{=12
   \catcode`\}=12
   \catcode`\%=12
%   \catcode`\ =12
   \catcode`\&amp;=12
   \catcode`\#=12
   \catcode`\$=12
   \catcode`\~=12
   \catcode`\^=12
   \catcode`\_=12
   \input #1
   \egroup
\fi
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{The Outline}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%
\section{The Root}
%%%%%%%%%%%%%%%%%%%

% \&lt;javahelp.4ht\&gt;&lt;&lt;&lt;
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
% % javahelp.4ht                         |version %
% % Copyright (C) |CopyYear.2003.       Eitan M. Gurari         %
% |&lt;TeX4ht copyright|&gt;
% &gt;&gt;&gt;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Constructs}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\def\JHDIR{...../}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Introduction}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Review}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

JavaHelp is an online documentation system for use by Java-based
applications. 


\begin{itemize}
\item
It can be activated with the
`javahelp' options. For instance, 
`\verb+htlatex jobname "html,3.2,javahelp,unicode,3" " -cmozhtf -u10" "-cjavahelp"+'. 
\item  Supports HTML 3.2 (+?) and (some?) CSS 1.0 as imported 
files as well as style attributes.
\end{itemize}


TeX4ht does the following for JavaHelp

\begin{itemize}
\item Creates keys for the entries in the table of contents
and the index
\item Maps the keys into th erl's of the toc and the index (jobname.jhm)
\item Maps the keys to the entries referenced by the toc (jobname-jht.xml)
and to the entries referenced by the toc (jobname-jhi.xml)
\item Creates a manifest of the files (jhelpset.hs), under the assumption
that jhindexer set a search directory at jobname-jhs
`{\tt java -jar /n/gold/5/gurari/javahelp.dir/jh1.1.3/javahelp/bin/jhindexer.jar -db jobname-jhs *.html}'
\end{itemize}



The javahelp.4ht file should not be loaded before the leading
\verb+\tableofcontents+ command got active.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{References}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{itemize}
\item \url{C:/jh1.1.3/doc/spec/FileFormat.html}
\item \url{http://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/javahelp/javahelp.html}
\item \url{http://developer.java.sun.com/developer/JDCTechTips/2002/tt0423.html}
\item \url{http://developer.java.sun.com/developer/JDCTechTips/2002/tt0521.html}
\item \url{http://www.oreilly.de/catalog/creatingjavahelp/examples/}
\end{itemize}


%%%%%%%%%%%%%
\subsection{Importing CSS}
%%%%%%%%%%%%%

\&lt;configure javahelp tex4ht\&gt;&lt;&lt;&lt;
\:CheckOption{-css} \if:Option \else
   \Log:Note{to ignore CSS code, use the command line option `-css}
   \:CheckOption{css-in} \if:Option
      \Log:Note{the inline CSS code is extracted from the input of the
          previous compilation, so an extra compilation might be needed}
      \Configure{@HEAD}{|&lt;css inline|&gt;}
   \else
      \Log:Note{for inline CSS code, use the command line option `css-in'}
      \Configure{@HEAD}{\HCode{&lt;link
         rel="stylesheet" type="text/css"
         href="\aa:CssFile"\xml:empty&gt;\Hnewline}}
   \fi
\fi
&gt;&gt;&gt;


\&lt;css inline\&gt;&lt;&lt;&lt;
\openin15=\jobname .css 
\ifeof15   \:warning{Missing file: \jobname .css }%
\else
\bgroup 
   \catcode`\{=12  \catcode`\}=12  \catcode`\%=12  \catcode`\#=12 
   \HCode{\Hnewline&lt;style type="text/css"&gt;\Hnewline &lt;!-- \Hnewline}% 
   \loop  
      \read15 to \:temp    
      \def\:tempa{\par}\ifx \:temp\:tempa \let\:temp\empty \fi
   \ifeof15\else  
      \expandafter\tmp:toks\expandafter{\:temp}% 
      \HCode{\the\tmp:toks \Hnewline}% 
   \repeat 
   \HCode{\Hnewline--&gt;\Hnewline&lt;/style&gt;\Hnewline}% 
\egroup 
\fi 
\closein15 
&gt;&gt;&gt;


\&lt;configure javahelp tex4ht\&gt;&lt;&lt;&lt;
|&lt;0,32,4 preambles|&gt;
\ifx \a:FontCss:\:UnDef
   \Configure{FontCss}{Font\string_Css##1}
                   {Font\string_Css\string_Plus\space##1}
\fi
\expandafter\ifx \csname aa:Css\endcsname\relax
   \Configure{Css}{Css: ##1}
\fi
&gt;&gt;&gt;





\&lt;configure javahelp latex\&gt;&lt;&lt;&lt;
|&lt;jh defs|&gt;
\Configure{Preamble}
  {\:CheckOption{-css} \if:Option 
   \else |&lt;default cascade style sheets|&gt;\fi}
  {|&lt;jh at start|&gt;}
\Configure{@/BODY}
  {\relax
   \ifnum \FileNumber=1
       \SaveEndP
       \input javahelp-a.4ht
       \RecallEndP
   \fi
  }
&gt;&gt;&gt;



\&lt;0,32,4 preambles\&gt;&lt;&lt;&lt;
\:CheckOption{-css} \if:Option 
   \def\Css#1{}
   \NewConfigure{CssFile}{2}
\else
   |&lt;cascade style sheets|&gt;
\fi
&gt;&gt;&gt;

\&lt;cascade style sheets\&gt;&lt;&lt;&lt;
\def\Css#1{{\def\:temp{\Configure{Needs}}%
   \expandafter\:temp\expandafter{\aa:Css}\Needs{#1}}}
&gt;&gt;&gt;

\&lt;cascade style sheets\&gt;&lt;&lt;&lt;
\ScriptCommand{\CssFile}{%
    \immediate\write-1{--- file \aa:CssFile\space ---}%
    \def\FontSize##1##2{\:Context{##1}\ht:special{t4ht;\%##2}\%}%
    \def\FontName##1{\:Context{##1}\ht:special{t4ht;=}}%
    \def\:Context##1{\ht:special{t4ht&gt;\jobname.tmp}##1\ht:special
       {t4ht&gt;\aa:CssFile}}%
    \ht:special{t4ht&gt;\jobname.tmp}\ht:special{t4ht&gt;\aa:CssFile}%
    \bgroup \everypar{}\NoFonts  \bb:CssFile \hfil\break}
  {\egroup \EndNoFonts
    \ht:special{t4ht&lt;\aa:CssFile}\ht:special{t4ht&lt;\jobname.tmp}}
\let\Css:File=\CssFile
\def\CssFile{\futurelet\:temp\Css:Fl}
\def\Css:Fl{\ifx [\:temp  \expandafter\Css:fl
   \else \expand:after{\Css:File \space}\fi}
\def\Css:fl[#1]{\Css:File\space \css:files #1,,|&lt;par del|&gt;}
\def\css:files#1,#2|&lt;par del|&gt;{\def\:temp{#1}\ifx \:temp\empty
   \else \def\:temp{\in:css#1.|&lt;par del|&gt;\css:files#2,,|&lt;par del|&gt;}\fi
   \:temp }
\def\in:css#1.#2|&lt;par del|&gt;{\def\:temp{#2}\ifx \:temp\empty
      \inc:ss#1.css|&lt;par del|&gt;
   \else \inc:ss#1.#2|&lt;par del|&gt;\fi}
\def\inc:ss#1.|&lt;par del|&gt;{|&lt;input css file|&gt; }
\NewConfigure{CssFile}[2]{\def\aa:CssFile{#1}\def\bb:CssFile{#2}}
&gt;&gt;&gt;



\&lt;default cascade style sheets\&gt;&lt;&lt;&lt;
{\ifdim \lastskip&gt;\z@ \unskip\fi  \IgnorePar\parindent\z@
\leavevmode}%
\immediate\write-1{--- file \aa:CssFile\space ---}%
\ht:special{t4ht&gt;\aa:CssFile}\ht:special{t4ht=\Hnewline /* css.sty */}%
\ht:special{t4ht&lt;\aa:CssFile}%
&gt;&gt;&gt;

\&lt;input css file\&gt;&lt;&lt;&lt;
     \immediate\openin15=#1
     \ifeof15 \immediate\closein15
        \:warning{Missing file: #1}%
     \else \immediate\closein15     \input #1 \fi
&gt;&gt;&gt;



%%%%%%%%%%%%%
\subsection{Tabular}
%%%%%%%%%%%%%

\&lt;configure javahelp latex\&gt;&lt;&lt;&lt;
\:CheckOption{no-array}\if:Option \else
   |&lt;html latex array/tabular Config 4.0t|&gt;
\fi
&gt;&gt;&gt;



\&lt;configure javahelp array\&gt;&lt;&lt;&lt;
|&lt;html latex array/tabular Config 4.0t|&gt;
&gt;&gt;&gt;


\&lt;html latex array/tabular Config 4.0t\&gt;&lt;&lt;&lt;
\:CheckOption{pic-tabular}  \if:Option \else
   \ConfigureEnv{tabular}
     {|&lt;configure tabular noalign|&gt;%
      \IgnorePar|&lt;inline comment|&gt;\EndP\HCode{&lt;div class="tabular"&gt;}%
      \PushStack\Col:Marg\AllColMargins
     }
     {\HCode{&lt;/div&gt;}\PopStack\Col:Marg\AllColMargins\ShowPar
      |&lt;configure clear noalign|&gt;%
      |&lt;try env inline par|&gt;%
     }{}{}
   \Css{div.tabular, div.center div.tabular {text-align: center; 
           margin-top:0.5em; margin-bottom:0.5em;  }} 
   \Css{table.tabular td  p{margin-top:0em;}}  
   \Css{table.tabular {margin-left: auto;
                       margin-right: auto;}}    |% centering |%
\fi
&gt;&gt;&gt;


\verb'\AllColMargins' Return a binary string in which 1 represents
a column, and 0 represents a `@'. \verb'\ColMargins' retrieves the
zeros before the 1's that represent the current and following 1's.

\&lt;html latex array/tabular Config 4.0t\&gt;&lt;&lt;&lt;
\def\ColMargins{%
   \ifx \AllColMargins\empty
      \:warning{Empty \string\AllColMargins}%
   \else
      \tmp:cnt=\HCol\relax 
      \expandafter\nosp:hbr\AllColMargins 1//%
   \fi }
\def\nosp:hbr#11#2//{\ifnum \tmp:cnt&gt;1 \advance\tmp:cnt by -1
   \nosp:hbr#2//\else\nosp:gt#11#2//\fi}
\def\nosp:gt#11#21#3//{%
   \def\:temp{#1}\ifx \:temp\empty 1\else 0\fi
   \def\:temp{#2}\ifx \:temp\empty 1\else 0\fi}
&gt;&gt;&gt;




\&lt;html latex array/tabular Config 4.0t\&gt;&lt;&lt;&lt;
\Configure{VBorder}
    {\global\let\oldVBorder=\empty}
    {\gdef\oldVBorder{border="1"}}
    {}{}
\Configure{halignTB&lt;&gt;}{tabular}{\HCode{id="TBL-\TableNo" 
                                             class="tabular"\Hnewline 
   \oldVBorder \GROUPS\Hnewline
   }&lt;&gt;\HAlign}
\Css{table[rules] {border-left:solid black 0.4pt; 
                   border-right:solid black 0.4pt; }}
\:CheckOption{pic-tabular}  \if:Option \else
   \Configure{tabular}
      {\ifvmode \IgnorePar\fi \EndP \halignTB{tabular}\putVBorder }
      {\HCode{&lt;/table&gt;}}
      {\HCode{&lt;tr \Hnewline}\halignTR 
                            \HCode{ id="TBL-\TableNo-\HRow-"&gt;}}
      {\r:HA}
      {\HCode{&lt;td \ifnum \HMultispan&gt;1 colspan="\HMultispan"\fi}%
         \halignTD \HCode{ id="TBL-\TableNo-\HRow-\HCol"
         \Hnewline class="td}|&lt;tabular td align|&gt;%
         \HCode{"&gt;}|&lt;td save EndP|&gt;%
         |&lt;start array par box|&gt;\PushStack\Table:Stck\TableNo}
      {|&lt;end array par box|&gt;\PopStack\Table:Stck\TableNo \d:HA}
\fi
\def\R:HA{\HCode{&lt;tr \Hnewline}\halignTR\HCode{&gt;}}
\def\r:HA{\HCode{&lt;/tr&gt;}}
\def\D:HA{|&lt;td save EndP|&gt; \HCode{&lt;td 
   \ifnum \HMultispan&gt;1 colspan="\HMultispan"\fi}%
   \halignTD \HCode{\Hnewline&gt;}\ShowPar\par}
\def\d:HA{\ifvmode \IgnorePar \fi \EndP\HCode{&lt;/td&gt;}|&lt;td recall EndP|&gt;}
|&lt;configuring @()|&gt;
\Css{td.td00{ padding-left:0pt; padding-right:0pt; }}
\Css{td.td01{ padding-left:0pt; padding-right:5pt; }}
\Css{td.td10{ padding-left:5pt; padding-right:0pt; }}
\Css{td.td11{ padding-left:5pt; padding-right:5pt; }}
&gt;&gt;&gt;






\&lt;configure tabular noalign\&gt;&lt;&lt;&lt;
\Configure{noalign}%
  {\f:tabular\d:tabular \HCode{&lt;tr&gt;&lt;td colspan="\ar:cnt"&gt;}}
  {\HCode{&lt;/td&gt;&lt;/tr&gt;}\pend:def\TableNo{0}\c:tabular\e:tabular}%
&gt;&gt;&gt;

\&lt;inline comment\&gt;&lt;&lt;&lt;
\ifvmode\else\HCode{&lt;!--tex4ht:inline--&gt;}\fi
&gt;&gt;&gt;


\&lt;configure clear noalign\&gt;&lt;&lt;&lt;
\Configure{noalign}{}{}%
&gt;&gt;&gt;


\&lt;try env inline par\&gt;&lt;&lt;&lt;
\ShowPar 
&gt;&gt;&gt;

\&lt;try inline par\&gt;&lt;&lt;&lt;
\ShowPar \par{\HCondtrue\noindent}%
&gt;&gt;&gt;


\&lt;tabular td align\&gt;&lt;&lt;&lt;
\NoFonts
           \bgroup
              \ifx \ttfamily\:UnDef \else \ttfamily\fi
              \ColMargins
           \egroup 
\EndNoFonts
&gt;&gt;&gt;


\&lt;td save EndP\&gt;&lt;&lt;&lt;
\SaveEndP 
&gt;&gt;&gt;

\&lt;td recall EndP\&gt;&lt;&lt;&lt;
\RecallEndP 
&gt;&gt;&gt;

\&lt;start array par box\&gt;&lt;&lt;&lt;
\par  \ShowPar
&gt;&gt;&gt;

\&lt;end array par box\&gt;&lt;&lt;&lt;
\IgnorePar \EndP
&gt;&gt;&gt;


\&lt;configuring @()\&gt;&lt;&lt;&lt;
\Configure{@{}}{}
&gt;&gt;&gt;




\&lt;html latex array/tabular Config 4.0t\&gt;&lt;&lt;&lt;
\Configure{halignTB&lt;&gt;}{array}{\HCode{id="TBL-\TableNo" class="array"\Hnewline
    \GROUPS\Hnewline
   }&lt;&gt;\HAlign}
\Css{table[rules] {border-left:solid black 0.4pt; 
                   border-right:solid black 0.4pt; }}
\:CheckOption{pic-array}  \if:Option \else
   \Configure{array}
      {\ifvmode \IgnorePar\fi \EndP\halignTB{array}\putVBorder}
      {\HCode{&lt;/table&gt;}}
      {\R:HA}
      {\r:HA}
      {\D:HA\HCode{&lt;div class="td}|&lt;tabular td align|&gt;%
            \HCode{"&gt;}|&lt;start array par box|&gt;\pic:env}
      {|&lt;end array par box|&gt;\HCode{&lt;/div&gt;}\d:HA}
   \Configure{arrayparbox}{\ShowPar}
\fi
&gt;&gt;&gt;






\&lt;html latex array/tabular Config 4.0t\&gt;&lt;&lt;&lt;
  \let\VBorder=\empty   \let\AllColMargins=\empty
  \Configure{VBorder}
     {\let\VBorder=\empty \let\AllColMargins=\empty
      \global\let\GROUPS=\empty \HAssign\NewGroup = 0 
      \gHAdvance\Next:TableNo by 1 \global\let\TableNo=\Next:TableNo 
      \global\let\oldVBorder=\empty
     }
     {\xdef\VBorder{\VBorder\ifnum \NewGroup&gt; 0 &lt;/colgroup&gt;\fi}
      \HAssign\NewGroup = 0  \gdef\GROUPS{rules="groups"}%
      \gdef\oldVBorder{border="1" }%
     }
     {\Advance:\NewGroup by 1 
      \ifnum \NewGroup=1 \xdef\VBorder{\VBorder&lt;colgroup 
          id="TBL-\TableNo-\ar:cnt g"&gt;}\fi      
      \xdef\VBorder{\VBorder&lt;col\Hnewline id="TBL-\TableNo
         -\ar:cnt"\xml:empty&gt;}\xdef\AllColMargins{\AllColMargins1}}
     {\xdef\AllColMargins{\AllColMargins 0}}
%  \Configure{HBorder}
%     {&lt;tr\Hnewline class="hline"&gt;} {&lt;td&gt;&lt;hr\xml:empty&gt;&lt;/td&gt;}   {&lt;/tr&gt;}
%     {&lt;tr\Hnewline class="cline"&gt;}
%     {&lt;td&gt;&lt;/td&gt;} {&lt;td&gt;&lt;hr\xml:empty&gt;&lt;/td&gt;} {&lt;/tr&gt;}
%     {&lt;tr\Hnewline class="vspace" style="font-size:\HBorderspace"&gt;} 
%         {&lt;td\Hnewline&gt;\string&amp;nbsp;&lt;/td&gt;} {&lt;/tr&gt;}
%  \Configure{putHBorder}{\HCode{\HBorder}}
\HAssign\Next:TableNo=0 \global\let\TableNo=\Next:TableNo
\Css{.hline hr, .cline hr{  height : 1px; margin:0px; }}
&gt;&gt;&gt;




\&lt;html latex array/tabular Config 4.0t\&gt;&lt;&lt;&lt;
\def\putVBorder{\expandafter\put:VBorder\VBorder&lt;/&gt;|&lt;par del|&gt;}
\def\put:VBorder#1&lt;/#2&gt;#3|&lt;par del|&gt;{\def\:temp{#2}\ifx\:temp\empty
     \HCode{\VBorder}%
     \def\:temp{#1}\ifx\:temp\empty \else\HCode{&lt;/colgroup&gt;}\fi
  \else  \def\:temp{\put:VBorder#3|&lt;par del|&gt;}\expandafter\:temp\fi
}
&gt;&gt;&gt;


\&lt;html latex array/tabular Config 4.0t\&gt;&lt;&lt;&lt;
\Configure{multicolumn}
   {\let\col:Css\empty
    \Configure{VBorder} 
       {}
       {\edef\col:Css{\col:Css
                     border-\ifnum \ar:cnt=0 left\else right\fi
                     :solid black 0.4pt;}%
       }{}{}%
   }
   {\ifx \col:Css\empty \else 
        \Css{td\#TBL-\TableNo-\HRow-\HCol{\col:Css}}% 
    \fi
   }
   {\ifvmode\IgnorePar\fi     
    \HCode{&lt;div class="multicolumn" }\HColAlign\HCode{&gt;}%
    \ifx \col:Css\empty \else 
        \Css{td\#TBL-\TableNo-\HRow-\HCol{\col:Css}}% 
    \fi
   }
   {\ifvmode\IgnorePar\fi \EndP\HCode{&lt;/div&gt;}}
&gt;&gt;&gt;

\&lt;html latex array/tabular Config 4.0t\&gt;&lt;&lt;&lt;
\def\pic:env{%
   \def\begin##1{\bgroup
      \def\end####1{\o:end:{####1}\EndPicture\egroup}%
      \ifx \EndPicture\:UnDef
           \Picture+{ class="##1" style="text-align:middle"}%
      \else \let\EndPicture=\empty\fi
      \o:begin:{##1}}%
}
&gt;&gt;&gt;


\&lt;configure javahelp tex4ht\&gt;&lt;&lt;&lt;
\Configure{halignTD} {}{}
   {&lt;}{\HCode{ style="white-space:nowrap; text-align:left;"}}
   {-}{\HCode{ style="white-space:nowrap; text-align:center;"}}
   {&gt;}{\HCode{ style="white-space:nowrap; text-align:right;"}}
   {^}{\HCode{ style="vertical-align:top; white-space:nowrap;"}}
   {=}{\HCode{ style="vertical-align:baseline; white-space:nowrap;"}}
   {||}{\HCode{ style="vertical-align:middle; white-space:nowrap;"}}
   {_}{\HCode{ style="vertical-align:bottom; white-space:nowrap;"}}
   {p}{\HCode{ style="white-space:normal; text-align:left;"}\Protect\a:HColWidth}
   {m}{\HCode{ style="white-space:nowrap; text-align:left; vertical-align:middle;"}}
   {b}{\HCode{ style="white-space:nowrap; text-align:left; vertical-align:baseline;"}}
   {}
\NewConfigure{HColWidth}{1}
\Configure{HColWidth}{}
&gt;&gt;&gt;





%%%%%%%%%%%%%
\subsection{Long Tables}
%%%%%%%%%%%%%


\&lt;configure javahelp longtable\&gt;&lt;&lt;&lt;
  |&lt;config new longtable|&gt;
&gt;&gt;&gt;


\&lt;configure javahelp longtable\&gt;&lt;&lt;&lt;
\:CheckOption{pic-longtable}  \if:Option
   \ConfigureEnv{longtable}
     {\IgnorePar\EndP\Tg&lt;div class="pic-longtable"&gt;\Picture*{}}
     {\EndPicture\Tg&lt;/div&gt;}{}{}
   \Css{div.pic-longtable {text-align:center;}}
\else
   \Log:Note{for pictorial longtable,
                      use the command line option `pic-longtable'}
\fi
&gt;&gt;&gt;



\&lt;config new longtable\&gt;&lt;&lt;&lt;   
\Configure{halignTB&lt;&gt;}{longtable}{\HCode{id="TBL-\TableNo"
                                      class="longtable"\Hnewline 
   \oldVBorder \GROUPS\Hnewline
   }&lt;&gt;\HAlign}
\Css{table[rules] {border-left:solid black 0.4pt; 
                   border-right:solid black 0.4pt; }}
\Configure{longtable}
   {\IgnorePar\EndP
     \HCode{|&lt;show input line no|&gt;&lt;div class="longtable"&gt;}%
    \halignTB{longtable}\putVBorder }
   {\HCode{&lt;/table&gt;&lt;/div&gt;}}
   {\HCode{&lt;tr \Hnewline}\halignTR\HCode{ id="TBL-\TableNo-\HRow-"&gt;}}
   {\r:HA}
   {\HCode{&lt;td \ifnum \HMultispan&gt;1 colspan="\HMultispan"\fi}%
    \halignTD \HCode{ id="TBL-\TableNo-\HRow-\HCol"
    \Hnewline class="td}|&lt;tabular td align|&gt;%
    \HCode{"&gt;}|&lt;td save EndP|&gt;%
    |&lt;start array par box|&gt;\PushStack\Table:Stck\TableNo}
   {\PopStack\Table:Stck\TableNo |&lt;end array par box|&gt;\d:HA}
\Css{div.longtable{text-align:center;}}
\Configure{longtableparbox}{\IgnorePar\leavevmode\ShowPar\par}
&gt;&gt;&gt;



\&lt;show input line no\&gt;&lt;&lt;&lt;
&lt;!--l. \the\inputlineno--&gt;%
&gt;&gt;&gt;


%%%%%%%%%%%%%
\subsection{Color Tables}
%%%%%%%%%%%%%


\&lt;configure javahelp colortbl\&gt;&lt;&lt;&lt;
\Configure{@classz}
   {\let\begin:current@color|=\relax
    \let\end:current@color|=\relax }
   {%
     \ifx \CT@column@color\relax \else 
     \ifx \CT@column@color\empty \else{%
         \def\CT@color{\@ifnextchar[\color:ii\color:i}%
         \CT@column@color|&lt;par del|&gt;%
         \edef\:temp{\noexpand\add:color
            {background-color}{\:temp}{\ar:cnt}}\:temp
     }\fi \fi
   }
   {\begin:current@color}
   {\end:current@color}
\Configure{rowcolor}{\row:clr}
\def\row:clr#1{{%
  \HAdvance\HRow by 1
  \add:color{background-color}{#1}{\HRow-}}}
\Configure{text-colortbl}
  {\add:color{color}{\current@color}{\HRow-\HCol}}
\Configure{cell-colortbl}
   {\add:color{background-color}{\current@color}{\HRow-\HCol}}
\def\add:color#1#2#3{%
  \Configure{SetHColor}{\Css{ \#TBL-\TableNo-#3{ #1:\HColor }}}{#2}}
&gt;&gt;&gt;

%%%%%%%%%%%%%
\subsection{Color}
%%%%%%%%%%%%%


\&lt;configure javahelp color\&gt;&lt;&lt;&lt;
\HAssign\textcolorN=0
\Configure{colorbox}
    {\bgroup
     \gHAdvance\textcolorN by 1
     \ifvmode \let\v:colorbox\def \IgnorePar \EndP
     \else \let\v:colorbox=\relax \fi
     |&lt;colorbox background|&gt;%
     \HCode{&lt;\ifx \v:colorbox\def div\else span\fi \Hnewline
                  class="colorbox" id="colorbox\textcolorN"&gt;}}%
    {\ifx \v:colorbox\def \EndP\HCode{&lt;/div&gt;}\par
     \else \HCode{&lt;/span&gt;}\fi 
     \egroup
    }
&gt;&gt;&gt;




\&lt;configure javahelp color\&gt;&lt;&lt;&lt;
\Configure{textcolor}
   {\gHAdvance\textcolorN by 1
    \Configure{color}%
      {\Configure{SetHColor}
           {\Css{span\#textcolor\textcolorN{color:\HColor}}}}%
    \HCode{&lt;span id="textcolor\textcolorN"&gt;}}%
   {\HCode{&lt;/span&gt;}}
&gt;&gt;&gt;



\&lt;colorbox background\&gt;&lt;&lt;&lt;
\let\A:color=\a:color
\Configure{color}%
  {\let\a:color=\A:color
   \Configure{SetHColor}
       {\Css{\ifx \v:colorbox\def div\else span\fi
             \#colorbox\textcolorN{background-color:\HColor;}}}}%
&gt;&gt;&gt;


\&lt;\&gt;&lt;&lt;&lt;
\Configure{fcolorbox}
   {\gHAdvance\textcolorN by 1
    \let\A:color=\a:color
    \Configure{color}%
        {\Configure{SetHColor}{\Css{\#colorbox\textcolorN{border: 
                                  solid 1px \HColor;}}}}%
     \Configure{fbox}{\leavevmode
              \gHAdvance\textcolorN by -1  \let\a:color=\A:color}{}}
    {}
&gt;&gt;&gt;


\&lt;color.sty config 4.0t\&gt;&lt;&lt;&lt;
\Configure{fcolorbox}
   {\bgroup\gHAdvance\textcolorN by 1
     \ifvmode \let\v:colorbox\def \IgnorePar \EndP 
     \else \let\v:colorbox=\relax \fi
     \HCode{&lt;\ifx \v:colorbox\def div\else span\fi \Hnewline
                  class="colorbox" id="colorbox\textcolorN"&gt;}%    
    |&lt;fcolorbox border|&gt;%
    \Configure{fbox}{\leavevmode }{}%
}
{\ifx \v:colorbox\def \EndP\HCode{&lt;/div&gt;}\par
 \else \HCode{&lt;/span&gt;}\fi  \egroup}
&gt;&gt;&gt;

\&lt;fcolorbox border\&gt;&lt;&lt;&lt;
\let\A:color=\a:color
\Configure{color}%
    {|&lt;fcolor background|&gt;%
     \Configure{SetHColor}{%
         \Css{\#colorbox\textcolorN{border: solid 1px  \HColor;}}}%
    }%
&gt;&gt;&gt;

\&lt;fcolor background\&gt;&lt;&lt;&lt;
\Configure{color}%
    {\let\a:color=\A:color
     \Configure{SetHColor}{%           
         \Css{\#colorbox\textcolorN{background-color: \HColor;}}%
    }}%
&gt;&gt;&gt;



%%%%%%%%%%%%%
\subsection{Fonts}
%%%%%%%%%%%%%




\&lt;configure javahelp fontmath \&gt;&lt;&lt;&lt;
\Configure{textbf}
    {\ifimmediate\else \Protect\HCode{&lt;b&gt;}\fi}
    {\ifimmediate\else \Protect\HCode{&lt;/b&gt;}\fi}
\Configure{textit}
    {\ifimmediate\else \Protect\HCode{&lt;i&gt;}\fi}
    {\ifimmediate\else \Protect\HCode{&lt;/i&gt;}\fi}
\Configure{textsl}
    {\ifimmediate\else \Protect\HCode{&lt;i&gt;}\fi}
    {\ifimmediate\else \Protect\HCode{&lt;/i&gt;}\fi}
\Configure{texttt}
    {\ifimmediate\else \Protect\HCode{&lt;tt&gt;}\fi}
    {\ifimmediate\else \Protect\HCode{&lt;/tt&gt;}\fi}
\Configure{emph}
    {\ifimmediate\else \Protect\HCode{&lt;em&gt;}\fi}
    {\ifimmediate\else \Protect\HCode{&lt;/em&gt;}\fi}
&gt;&gt;&gt;


\&lt;configure javahelp fontmath\&gt;&lt;&lt;&lt;
\Configure{jhxml}
{%
   \let\textbf\empty
   \let\textit\empty
   \let\textsl\empty
   \let\texttt\empty
   \let\textsc\empty
   \let\emph\empty
}  
&gt;&gt;&gt;



\&lt;configure javahelp inputenc\&gt;&lt;&lt;&lt;
\Configure{jhxml}
{%
   \let\IeC\empty
}  
&gt;&gt;&gt;

%%%%%%%%%%%%%
\subsection{French}
%%%%%%%%%%%%%



\&lt;configure javahelp frenchb\&gt;&lt;&lt;&lt;
\Configure{jhxml}
{%
  \expandafter\def\csname 
     a:frenchb-thinspace\endcsname##1frenchb-thinspace\endcsname{}%
}
&gt;&gt;&gt;

\&lt;configure javahelp frenchb \&gt;&lt;&lt;&lt;
\expandafter\let\csname jha:ftsp\expandafter\endcsname 
                        \csname a:frenchb-thinspace\endcsname 
\expandafter\def\csname a:frenchb-thinspace\endcsname{%
   \ifimmediate
      \expandafter\jha:ftspignore
   \else
      \expandafter\jha:ftsp
   \fi
}
\def\jha:ftspignore#1frenchb-thinspace\endcsname{}
&gt;&gt;&gt;



%%%%%%%%%%%%%
\subsection{Ulem}
%%%%%%%%%%%%%



\&lt;configure javahelp ulem\&gt;&lt;&lt;&lt;
\Configure{uline}
   {\HCode{&lt;span class="uline"&gt;}} {\HCode{&lt;/span&gt;}}
\Css{.uline{ text-decoration:underline; }}
\Configure{uuline}
   {\HCode{&lt;span class="uuline"&gt;}} {\HCode{&lt;/span&gt;}}
\Css{.uuline{ text-decoration:underline; }}
\Configure{sout}
   {\HCode{&lt;span class="sout"&gt;}} {\HCode{&lt;/span&gt;}}
\Css{span.sout {text-decoration: line-through }}
\Configure{xout}
   {\HCode{&lt;span class="xout"&gt;&lt;span class="underline"&gt;}} 
   {\HCode{&lt;/span&gt;&lt;/span&gt;}}
\Css{span.xout {text-decoration: line-through }}
\Configure{uwave}
   {\HCode{&lt;span class="uwave"&gt;}} 
   {\HCode{&lt;/span&gt;}}
\Css{span.uwave {text-decoration:underline }}
&gt;&gt;&gt;




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{The JavaHelp Files}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%




\&lt;javahelp\&gt;&lt;&lt;&lt;
% javahelp.4ht (|version), generated from |jobname.tex
% Copyright 2009-2019 TeX Users Group
% Copyright |CopyYear.2003. Eitan M. Gurari
|&lt;TeX4ht copywrite|&gt;
&gt;&gt;&gt;

\&lt;double acute iso-8859-2\&gt;&lt;&lt;&lt;
|&lt;double acute code|&gt;%
&gt;&gt;&gt;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{The HTML Documentation (*.html)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Prepare a \LaTeX{} file and compile it for HTML 3.2. For instance,
with the command {\tt htlatex jobname "html,3.2,3,javahelp"}.

% \special{t4ht&gt;foo.log}
% \special{t4ht=...x...}
% \special{t4ht*&gt;foo.log}
% \special{t4ht*&gt;}


\&lt;configure javahelp Preamble\&gt;&lt;&lt;&lt;
|&lt;instructions for log|&gt;
% \newif\ifimmediate
% \immediatefalse
&gt;&gt;&gt;



\&lt;jh defs\&gt;&lt;&lt;&lt;
\def\Write:File#1#2{%
  \special{t4ht&gt;#1}%
  \special{t4ht=#2}%
  \special{t4ht*&gt;#1}%
  \special{t4ht*&gt;}%
}
&gt;&gt;&gt;


\&lt;configure javahelp Preamble\&gt;&lt;&lt;&lt;
\NewConfigure{jhxml}[1]{\concat:config\a:jhxml{#1}} 
\let\a:jhxml\relax 
&gt;&gt;&gt;

\&lt;javahelp-a.4ht\&gt;&lt;&lt;&lt;
% javahelp-a.4ht (|version), generated from |jobname.tex
% Copyright (C) 2009-2010 TeX Users Group
% Copyright (C) |CopyYear.2003. Eitan M. Gurari
|&lt;TeX4ht copywrite|&gt;
\NextFile{\jobname.tmp}
\HPage{}
\bgroup 
   \catcode`\:=11
   \catcode`\@=11
   \catcode`\"=12
   \Configure{PROLOG}{}   
   \Configure{HtmlPar}{}{}{}{}
   \Configure{tableofcontents}{}{}{}{}{}
   \Configure{htf}{0}{+}{}{}{}{}{}{}{}
   \ScriptEnv{dito}{\IgnorePar}{}
   \a:jhxml
   |&lt;jh util|&gt;
   |&lt;jh root|&gt;
   |&lt;jh toc|&gt;
   |&lt;jh index|&gt;
   |&lt;jh at end|&gt;
\egroup
\EndHPage{}
&gt;&gt;&gt;

The HPage above is to ensure the all the references in the javahelp
files will be to locations at other files, and so they will explicitly
include the names of the files being referenced.  The page is empty
and not referenced by other pages.

\&lt;instructions for log\&gt;&lt;&lt;&lt;
\immediate\write-1{--------------- JavaHelp -----------------}
\immediate\write-1{The entry (HelpSet) file for the java program
                                         is at `\jobname.hs'}
\immediate\write-1{Generate a search database
                             with, for instance, the command}
  \immediate\write-1{ java -jar
    ...../jh1.1.3/javahelp/bin/jhindexer.jar
    -db \jobname-jhs \jobname*.html}
\immediate\write-1{Compile the java program with a command similar to}
  \immediate\write-1{ javac -classpath
    ...../jh1.1.3/javahelp/lib/jh.jar  program.java}
\immediate\write-1{Run the java program with a command similar to}
  \immediate\write-1{ java -classpath
    ...../jh1.1.3/javahelp/lib/jh.jar;. program}
\immediate\write-1{JavaHelp might require a compilation for HTML 3.2,
     for instance,}
\immediate\write-1{ htlatex \jobname\space "html,javahelp,3.2,3"}
\immediate\write-1{------------------------------------------}
&gt;&gt;&gt;



\&lt;jh defs\&gt;&lt;&lt;&lt;
\def\jhNote{%
     Created for JavaHelp
     (http://java.sun.com/products/javahelp/)\Hnewline
     by TeX4ht (https://tug.org/tex4ht/)\Hnewline
     from \jobname.tex \space
  }
&gt;&gt;&gt;

We can't keep the comment boundaries 
in the macro because the adjacent hyphens
in some cases merge into a n-dash
  under font encoding T1. For instance,

\begin{verbatim}
   \documentclass{report} 
     \usepackage[T1]{fontenc}        
   \begin{document} 
    
   \ScriptEnv{dito}{}{} 
    
   \begin{dito} 
   --[]-[] 
   \end{dito} 
   \end{document} 
\end{verbatim}



\&lt;tex4ht note\&gt;&lt;&lt;&lt;
\jhNote
&gt;&gt;&gt;



\&lt;par del\&gt;&lt;&lt;&lt;
!*?: &gt;&gt;&gt;





\&lt;jh defs\&gt;&lt;&lt;&lt;
\Configure{crosslinks}{}{}{}{}{}{}{}{}{}
&gt;&gt;&gt;


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{The JavaHelp Root File (HelpSet File: jobname.hs)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

This file introduces the files in the help distribution.


\&lt;jobname.hs: url of jh root file\&gt;&lt;&lt;&lt;
\jobname.hs&gt;&gt;&gt;


The etension name must be `hs'!



\&lt;dtd lang\&gt;&lt;&lt;&lt;
\dTdLaNg&gt;&gt;&gt;

\&lt;jh defs\&gt;&lt;&lt;&lt;
\def\dTdLaNg{\expandafter
  \ifx \csname a:dtd-lang\endcsname\relax EN\else
    \csname a:dtd-lang\endcsname
  \fi   }
&gt;&gt;&gt;

\&lt;jh root\&gt;&lt;&lt;&lt;
|&lt;jh root config|&gt;
\IgnorePar\par\leavevmode\special{t4ht&gt;|&lt;jobname.hs: url of jh root file|&gt;}%
\begin{dito}-\
&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
\end{dito}
|&lt;helpset DTD|&gt;
\begin{dito}-\
&lt;!-\relax- |&lt;tex4ht note|&gt; -\relax-&gt;
&lt;helpset version="\dotVersion"&gt;
  &lt;title&gt;|&lt;title label|&gt;&lt;/title&gt;
  &lt;maps&gt;
    &lt;homeID&gt;|&lt;home id|&gt;&lt;/homeID&gt;
    &lt;mapref location="|&lt;url of jh keys file|&gt;"/&gt;
  &lt;/maps&gt;
  &lt;view&gt;
    &lt;name&gt;TOC&lt;/name&gt;
    &lt;label&gt;|&lt;toc label|&gt;&lt;/label&gt;
    &lt;type&gt;javax.help.TOCView&lt;/type&gt;
    &lt;data&gt;|&lt;url of jh toc file|&gt;&lt;/data&gt;
  &lt;/view&gt;
  &lt;view&gt;
    &lt;name&gt;Index&lt;/name&gt;
    &lt;label&gt;|&lt;index label|&gt;&lt;/label&gt;
    &lt;type&gt;javax.help.IndexView&lt;/type&gt;
    &lt;data&gt;|&lt;url of the jh index|&gt;&lt;/data&gt;
  &lt;/view&gt;
  &lt;view&gt;
    &lt;name&gt;Search&lt;/name&gt;
    &lt;label&gt;|&lt;search dir label|&gt;&lt;/label&gt;
    &lt;type&gt;javax.help.SearchView&lt;/type&gt;
    &lt;data 
      engine="com.sun.java.help.search.DefaultSearchEngine"&gt;|&lt;url of jh serach dir|&gt;&lt;/data&gt;
  &lt;/view&gt;
&lt;/helpset&gt;
\end{dito}
\IgnorePar\par\leavevmode\special{t4ht&lt;|&lt;jobname.hs: url of jh root file|&gt;}
&gt;&gt;&gt;



\&lt;toc label\&gt;&lt;&lt;&lt;
\tocLabel&gt;&gt;&gt;

\&lt;index label\&gt;&lt;&lt;&lt;
\indexLabel&gt;&gt;&gt;

\&lt;search dir label\&gt;&lt;&lt;&lt;
Search&gt;&gt;&gt;

\&lt;title label\&gt;&lt;&lt;&lt;
\titleLabel&gt;&gt;&gt;


\&lt;jh root config\&gt;&lt;&lt;&lt;
\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}}
&gt;&gt;&gt;



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{The JavaHelp Search Directory (jobname-jhs)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\&lt;url of jh serach dir\&gt;&lt;&lt;&lt;
\jobname-jhs&gt;&gt;&gt;

\def\JHINDEXER{java -jar
\JHDIR jh2.0/javahelp/bin/jhindexer.jar
    -db \jobname-jhs \jobname*.html}




Use a  command similar to `{\tt \JHINDEXER}'
to create a search directory \verb+JavaHelpSearch+ for JavaHelp from the HTML pages of the documentation.





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{The JavaHelp Keys to URLs Mapping (jobname.jhm)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\&lt;url of jh keys file\&gt;&lt;&lt;&lt;
\jobname.jhm&gt;&gt;&gt;


The homeId tag provides the default entry to present when a HelpSet is
first shown.

\&lt;home id\&gt;&lt;&lt;&lt;
\jobname&gt;&gt;&gt;                

The default  entry point can be overwritten in:

\&lt;entry point\&gt;&lt;&lt;&lt;
\jobname&gt;&gt;&gt;



Assigns keys to locations within the HTML document.



\&lt;jh at start\&gt;&lt;&lt;&lt;
\Write:File
   {|&lt;url of jh keys file|&gt;}
   {|&lt;map preamble|&gt;}
&gt;&gt;&gt;


\&lt;map preamble\&gt;&lt;&lt;&lt;
&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;\Hnewline
|&lt;map DTD|&gt;
\Hnewline &lt;!-- |&lt;tex4ht note|&gt; --&gt;\Hnewline
&lt;map version="\dotVersion"&gt;\Hnewline
&lt;mapID target="|&lt;entry point|&gt;" url="\jobname.html"/&gt;\Hnewline
&gt;&gt;&gt;


\&lt;jh defs\&gt;&lt;&lt;&lt;
\HAssign\mapEntry=0
&gt;&gt;&gt;


\&lt;add index entry to map\&gt;&lt;&lt;&lt;
\gHAdvance\mapEntry by 1
\Write:File
   {|&lt;url of jh keys file|&gt;}%
   {&lt;mapID target="indexentry-\mapEntry" 
             url="\RefFileNumber\FileNumber
       \#\title:chs {dx\last:haddr}{\cur:th\:currentlabel}%
           " /&gt;\Hnewline}%
&gt;&gt;&gt;



\&lt;jh defs\&gt;&lt;&lt;&lt;
\AtBeginDocument{%
  \let\jh:toc=\auto:toc
  \expandafter\append:defI\csname tableofcontents*\endcsname{%
     \global\let\jh:toc=\auto:toc }%
}
&gt;&gt;&gt;


\&lt;load table of contents\&gt;&lt;&lt;&lt;
\expandafter\ifx \csname jh:toc\endcsname\relax
   \tableofcontents
\else
   \expandafter\expandafter\expandafter\tableofcontents
   \expandafter\expandafter\expandafter[\csname
                                         jh:toc\endcsname]%
\fi
&gt;&gt;&gt;

\&lt;jh at end\&gt;&lt;&lt;&lt;
\special{t4ht&gt;|&lt;url of jh keys file|&gt;}%
\bgroup
   |&lt;jh map for toc|&gt;
  \bgroup \catcode`\:=12 \catcode`\@=12 \let\contentsname\empty
     |&lt;load table of contents|&gt;%
  \egroup
  \HCode {&lt;/map&gt;\Hnewline}
\egroup
\special{t4ht*&gt;|&lt;url of jh keys file|&gt;}%
\special{t4ht*&gt;}%
&gt;&gt;&gt;

\&lt;jh map for toc\&gt;&lt;&lt;&lt;
\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
   |&lt;config toc target entry|&gt;%
   \jh:doTocEntry#1{#2}{#3}}
\def\gob:IV#1#2#3#4{}
\def\sectioningKey{NoToc}
&gt;&gt;&gt;





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{The JavaHelp TOC (jobname-jht.xml)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\&lt;url of jh toc file\&gt;&lt;&lt;&lt;
\jobname-jht.xml&gt;&gt;&gt;

\&lt;jh toc\&gt;&lt;&lt;&lt;
\bgroup
%\immediatetrue
|&lt;jh TOC config|&gt;
|&lt;start jh TOC|&gt;
     |&lt;load table of contents|&gt;%
|&lt;end jh TOC|&gt;
\egroup
&gt;&gt;&gt;

\&lt;start jh TOC\&gt;&lt;&lt;&lt;
\IgnorePar\par\leavevmode\special{t4ht&gt;|&lt;url of jh toc file|&gt;}%
\begin{dito}-\
&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
\end{dito}
|&lt;toc DTD|&gt;
\begin{dito}-\
&lt;!-\relax- |&lt;tex4ht note|&gt; -\relax-&gt;
&lt;toc version="\dotVersion"&gt;
  &lt;tocitem target="|&lt;entry point|&gt;" text="|&lt;title label|&gt;|&lt;uni sp|&gt;"&gt;
\end{dito}
\let\end:jhhook=\empty
\catcode`\:=12 \catcode`\@=12  \let\contentsname\empty
\NoFonts
&gt;&gt;&gt;

\&lt;end jh TOC\&gt;&lt;&lt;&lt;
\EndNoFonts
\catcode`\:=11 \catcode`\@=11
\end:jhhook
\begin{dito}
  &lt;/tocitem&gt;
&lt;/toc&gt;
\end{dito}
\special{t4ht&lt;|&lt;url of jh toc file|&gt;}
&gt;&gt;&gt;



\&lt;jh TOC config\&gt;&lt;&lt;&lt;
\Configure{TocLink}
   {\HCode{&lt;tocitem target="\a:mapIdTarget"\Hnewline
                    text="}\hbox{#4}\HCode{|&lt;uni sp|&gt;"&gt;\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
   |&lt;config toc target entry|&gt;%
   \jh:doTocEntry#1{#2}{#3}}
\def\gob:IV#1#2#3#4{}
\def\sectioningKey{NoToc}
&gt;&gt;&gt;



\&lt;jh util\&gt;&lt;&lt;&lt;
\def\set:endtocitem#1{%
   \csname catchAt:#1\endcsname
   \expandafter\ifx\csname a:end#1\endcsname\relax
      \HCode{&lt;/tocitem&gt;}%
   \else
      \expandafter\ifx \csname jh:#1\endcsname\relax
         |&lt;end tocitem at end of toc|&gt;%
         \def\:tempc##1,{\if ,##1,%
               \expandafter\gob:pardel
            \else              
               |&lt;end tocitem at toc entry of diff type|&gt;%
               \expandafter\:tempc
            \fi}%
         \expandafter\expandafter\expandafter
             \:tempc\csname a:end#1\endcsname,,|&lt;par del|&gt;%
      \fi
      |&lt;end tocitem at toc entry of same type|&gt;%   
   \fi
}
\def\gob:pardel#1|&lt;par del|&gt;{}
&gt;&gt;&gt;


\&lt;end tocitem at toc entry of same type\&gt;&lt;&lt;&lt;
\csname jh:#1\endcsname
\expandafter\gdef\csname jh:#1\endcsname{%
   \expandafter\global\expandafter\let\csname jh:#1\endcsname=\empty
   \HCode{&lt;/tocitem&gt;&lt;!--/#1--&gt;}}%
&gt;&gt;&gt;

\&lt;end tocitem at toc entry of diff type\&gt;&lt;&lt;&lt;
\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
&gt;&gt;&gt;


\&lt;end tocitem at end of toc\&gt;&lt;&lt;&lt;
\append:def\end:jhhook{%
   \csname jh:#1\endcsname
   \expandafter\global\expandafter
               \let\csname jh:#1\endcsname\:UnDef}%
\global\let\end:jhhook\end:jhhook
&gt;&gt;&gt;




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{The JavaHelp Index (jobname-jhi.xml)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\&lt;url of the jh index\&gt;&lt;&lt;&lt;
\jobname-jhi.xml&gt;&gt;&gt;

\&lt;jh index\&gt;&lt;&lt;&lt;
\bgroup
|&lt;jh IDX config|&gt;
|&lt;start jh IDX|&gt;
     |&lt;load index entries|&gt;%
|&lt;end jh IDX|&gt;
\egroup
&gt;&gt;&gt;


\&lt;start jh IDX\&gt;&lt;&lt;&lt;
\IgnorePar\par\leavevmode\special{t4ht&gt;|&lt;url of the jh index|&gt;}%
\begin{dito}-\
&lt;?xml version="1.0" encoding="ISO-8859-1" ?&gt;
\end{dito}
|&lt;index DTD|&gt;
\begin{dito}-\
&lt;!-\relax- |&lt;tex4ht note|&gt; -\relax-&gt;
&lt;index version="\dotVersion"&gt;
\end{dito}
&gt;&gt;&gt;

\&lt;end jh IDX\&gt;&lt;&lt;&lt;
\begin{dito}
&lt;/index&gt;
\end{dito}
\special{t4ht&lt;|&lt;url of the jh index|&gt;}%
&gt;&gt;&gt;


\&lt;load index entries\&gt;&lt;&lt;&lt;
\let\indexname\empty
\def\gobbleLnk#1, \LNK#2#3#4#5{#1\HCode{" target="indexentry-#5"}}
\Configure{theindex}
   {}{}
   {\hbox\bgroup\HCode{&lt;\string !--index-item--&gt;&lt;indexitem 
          text="}\gobbleLnk}
   {\HCode{/&gt;}\egroup\hfill\break}
   {\hbox\bgroup\HCode{&lt;\string !--subex-item--&gt;&lt;indexitem 
          text="}\gobbleLnk}
   {\HCode{/&gt;}\egroup\hfill\break}
   {\hbox\bgroup\HCode{&lt;\string !--subsubitem--&gt;&lt;indexitem 
          text="}\gobbleLnk}
   {\HCode{/&gt;}\egroup\hfill\break}
   {}
\immediate\openin15=\jobname.ind
\ifeof15 
   \immediate\closein15
\else
   \immediate\closein15
   \input \jobname.ind
\fi
&gt;&gt;&gt;



\&lt;load index entriesNO\&gt;&lt;&lt;&lt;
\def\beforeindex#1||LNK#2#3{#1}%
\def\indexentry#1#2{\HCode{&lt;indexitem target="indexentry-#2" 
                     text="}\beforeindex#1\HCode{|&lt;uni sp|&gt;" /&gt;\Hnewline}}%
\immediate\openin15=\jobname.4dx
\ifeof15 
   \immediate\closein15
\else
   \immediate\closein15
   \input \jobname.4dx
\fi
&gt;&gt;&gt;


\&lt;jh defs\&gt;&lt;&lt;&lt;
\HAssign\indexEntry=0
\append:defI\@wrindex{%
   |&lt;add index entry to map|&gt;%
}
&gt;&gt;&gt;


JavaHelp has problems with unicode values at the end of text fields in
the toc of within the jht file: it refuses `\verb+text="Men&amp;#252;"+'
(but accepts `\verb+text="Men&amp;#252; "+'). The following adds spaces at
the end of the text attribute values.

\&lt;uni sp\&gt;&lt;&lt;&lt;
 &gt;&gt;&gt;

A similar problem occurs when two unicode character codes follow each
other. In this case, the second one is not properly rendered.


%%%%%%%%%%%%%
\subsection{Configuring Link Targets}
%%%%%%%%%%%%%

\&lt;config toc target entry\&gt;&lt;&lt;&lt;
\expandafter\target:info#3//%
\b:mapIdTarget
&gt;&gt;&gt;

\&lt;jh defs\&gt;&lt;&lt;&lt;
\def\target:info#1#2#3#4#5#6//{%
    \let\sectionType=\sectioningKey
    \let\sectionId\TocCount
    \Advance:\sectionId 1
    \def\sectionName{#5}%   
  }
\NewConfigure{mapIdTarget}{2}
\Configure{mapIdTarget}
   {\sectionType-\sectionId}
   {}
&gt;&gt;&gt;



%%%%%%%%%%%%%
\subsection{Version Information}
%%%%%%%%%%%%%



\&lt;helpset DTD\&gt;&lt;&lt;&lt;
\begin{dito}-\
    &lt;!DOCTYPE helpset PUBLIC 
    "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version \dotVersion//|&lt;dtd lang|&gt;"
    "http://java.sun.com/products/javahelp/helpset_\subVersion.dtd"&gt;
\end{dito}
&gt;&gt;&gt;

\&lt;toc DTD\&gt;&lt;&lt;&lt;
\begin{dito}-\
   &lt;!DOCTYPE toc PUBLIC 
   "-//Sun Microsystems Inc.//DTD JavaHelp TOC Version \dotVersion//|&lt;dtd lang|&gt;" 
   "http://java.sun.com/products/javahelp/toc_\subVersion.dtd"&gt;
\end{dito}
&gt;&gt;&gt;

\&lt;index DTD\&gt;&lt;&lt;&lt;
\begin{dito}-\
   &lt;!DOCTYPE index PUBLIC
   "-//Sun Microsystems Inc.//DTD JavaHelp Index Version \dotVersion//|&lt;dtd lang|&gt;"    
   "http://java.sun.com/products/javahelp/index_\subVersion.dtd"&gt;
\end{dito}
&gt;&gt;&gt;


\&lt;old index DTD\&gt;&lt;&lt;&lt;
   &lt;!DOCTYPE index PUBLIC
   "-//Sun Microsystems Inc.//DTD JavaHelp Index Version \dotVersion//|&lt;dtd lang|&gt;"    
   "http://java.sun.com/products/javahelp/index_\subVersion.dtd"&gt;
&gt;&gt;&gt;





\&lt;map DTD\&gt;&lt;&lt;&lt;
&lt;!DOCTYPE map PUBLIC\Hnewline
     "-//Sun Microsystems Inc.//DTD
                    JavaHelp Map Version \dotVersion//|&lt;dtd lang|&gt;"\Hnewline
     "http://java.sun.com/products/javahelp/map_\subVersion.dtd"&gt;  &gt;&gt;&gt;


\&lt;jh defs\&gt;&lt;&lt;&lt;
\:CheckOption{jh1.0} \if:Option
   \def\dotVersion{1.0}
   \def\subVersion{1\string_0}
\else
   \def\dotVersion{2.0}
   \def\subVersion{2\string_0}
\fi
&gt;&gt;&gt;







%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Incorporate JavaHelp into a program}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Url of JavaHelp root file (jobname.hs)

\url{http://supportweb.cs.bham.ac.uk/documentation/tutorials/docsystem/build/tutorials/javahelp/javahelp.html}

%// javac -classpath  ~/javahelp.dir/jh2.0/javahelp/lib/jh.jar program.java 
%// java -classpath  ~/javahelp.dir/jh2.0/javahelp/lib/jh.jar program    

\&lt;program\&gt;&lt;&lt;&lt;
import java.net.URL;
import javax.help.*;
import javax.swing.*;
public class program {
           //^^^^^^^
   public static void main(String args[]) {
      JHelp helpViewer=null;
      try {
         ClassLoader cl = program.class.getClassLoader();
                        //^^^^^^^
         URL url = HelpSet.findHelpSet(cl, 
                              "|&lt;jobname.hs: url of jh root file|&gt;");
         HelpSet hs = new HelpSet(cl, url);
         helpViewer = new JHelp( hs );
         /*
            helpViewer.setCurrentID("|&lt;entry point|&gt;");
         */
      } catch (Exception e) { 
          System.out.println("error"); System.exit(0); 
      }
      JFrame frame = new JFrame();
      frame.getContentPane().add(helpViewer);
      frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
      frame.setSize(500,500);
      frame.setVisible(true);
   }
}
&gt;&gt;&gt;


\url{http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javahelp/}

\&lt;HelpMenu\&gt;&lt;&lt;&lt;
import java.net.*;
import javax.help.*;
import javax.swing.*;
import java.awt.event.*;

public class HelpMenu {
   JFrame f;
   JMenuItem topics;

   public HelpMenu() {
     f = new JFrame("Menu Example");
     JMenuBar mbar = new JMenuBar();
     
     // a file menu
     JMenu file = new JMenu("File");
     JMenu help = new JMenu("Help");

     // add an item to the help menu
     help.add(topics = new JMenuItem("Help Topics"));

     // add the menu items to the menu bar
     mbar.add(file);
     mbar.add(help);

     // 1. create HelpSet and HelpBroker objects
     HelpSet hs = getHelpSet(|&lt;jobname.hs: url of jh root file|&gt;); 
     HelpBroker hb = hs.createHelpBroker();

     // 2. assign help to components
/* 
     CSH.setCurrentID("|&lt;entry point|&gt;");
*/     
     // 3. handle events
     topics.addActionListener(new CSH.DisplayHelpFromSource(hb));

     // attach menubar to frame, set its size, and make it visible
     f.setJMenuBar(mbar);
     f.setSize(500, 300);
     f.setVisible(true);
   }

   /**
    * find the helpset file and create a HelpSet object
    */
   public HelpSet getHelpSet(String helpsetfile) {
      HelpSet hs = null;
      ClassLoader cl = this.getClass().getClassLoader();
      try {
        URL hsURL = HelpSet.findHelpSet(cl, helpsetfile);
        hs = new HelpSet(null, hsURL);
      } catch(Exception ee) {
        System.out.println("HelpSet: "+ee.getMessage());
        System.out.println("HelpSet: "+ helpsetfile + " not found");
      }
      return hs;
   }

   public static void main(String argv[]) {
      new HelpMenu();
   }
}
&gt;&gt;&gt;









%%%%%%%%%%%%%%%%%%%%%
\subsection{Compiling}
%%%%%%%%%%%%%%%%%%%%%

\def\JAVAC{javac -classpath \JHDIR jh2.0/javahelp/lib/jh.jar program.java}

Add JavaHelp to your program, say `program.java', and compile the
program with the command `{\tt \JAVAC}'.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Running}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def\RUN{java -classpath \JHDIR jh2.0/javahelp/lib/jh.jar;. program}

Use the a command similar to  `{\tt \RUN}'.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Compressing (with JAR)}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%





\begin{verbatim}
javac -classpath c:\jh1.1.3\javahelp\lib\jhall.jar
      -d c:\temp
      JavaHelpTest.java 

jar cvfm JavaHelpTest.jar  manifest JavaHelpTest.class

java -jar jh1.3.1/demos/bin/UserGuide.jar 
\end{verbatim}






%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Getting the JavaHelp Software}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Download JavaHelp from 
      \url{http://java.sun.com/products/javahelp/download_binary.html}
and unzip it into some directory (say {\tt \JHDIR}).


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Sample}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Help Set}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\verbatiminput{\jobname.hs}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Map Files}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\verbatiminput{\jobname.jhm}   


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Table of Contents}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\verbatiminput{\jobname-jht.xml}  


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Index}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\verbatiminput{\jobname-jhi.xml}   
%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% \OutputCodE\&lt;javahelp.4ht\&gt;
\OutputCodE\&lt;javahelp-a.4ht\&gt;

\ifOption{javahelp}
   {
    \Needs{"xhlatex \jobname\space \string\"html,3,javahelp\string\""}
    \Needs{"xhlatex \jobname\space \string\"html,3,javahelp\string\""}
   }
   {}

\endinput

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%







</pre></body></html>