1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
\documentclass{article}
\usepackage{url}
\Configure{ProTex}{java,<<<>>>,title,`,list,[[]]}
\usepackage{makeidx}
\makeindex
\begin{document}
\tableofcontents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Compilation Instructions}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{itemize}
\item
Make a subdirectory {\tt jobname-doc}.
\item
Compile the \LaTeX{} file with a command similar to
\index{htlatex}%
`{\tt htlatex
jobname "html,3.2,javahelp,3" "" "-djobname-doc/"}'.
\item
\index{JavaHelp indexer}%
Invoke the JavaHelp indexer to produce the search
database at `jobname-doc/jobname-jhs' with a command
similar to `{\tt java -jar
\$\string{HOME\string}/jh1.1.3/javahelp/bin/jhindexer.jar -db
jobname-doc/jobname-jhs
jobname*.html}'.
\item
\index{JavaHelp URL}%
The URL into the javahelp file, as provided by tex4ht, is
`{\tt jobname-doc/jobname-jh.xml}'.
\item
The java programs should be compiled with commands similar to
\index{javac}%
`{\tt javac -classpath
\$\string{HOME\string}/jh1.1.3/javahelp/lib/jh.jar program.java}'.
\item
The programs should run with commands similar to
\index{java}%
`{\tt java -classpath
\$\string{HOME\string}/jh1.1.3/javahelp/lib/jh.jar;. program}'.
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Sample Program}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\<jhprog\><<<
import java.net.URL;
import javax.help.*;
import javax.swing.*;
public class jhprog {
public static void main(String args[]) {
JHelp helpViewer=null;
try {
ClassLoader cl = jhprog.class.getClassLoader();
URL url = HelpSet.findHelpSet(cl,
"`jobname-doc/`jobname.hs");
helpViewer = new JHelp(new HelpSet(cl, url));
} catch (Exception e) { System.out.println("error");
}
JFrame frame = new JFrame();
frame.setSize(500,500);
frame.getContentPane().add(helpViewer);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setVisible(true);
}
}
>>>
\OutputCode\<jhprog\>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Sample Script}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
The source file \edef\temp{\noexpand\url{\jobname.tex}}\temp{} of this
document got compiled with the command `{\tt jhlatex jhsample "html,3"}', with
{\tt jhlatex} being the following script.\index{htlatex}
\begin{verbatim}
mkdir jh-$1.dir
mkdir jh-$1.dir/$1-doc
htlatex $1 "html,3.2,javahelp,$2" "" "-djh-$1.dir/$1-doc/ -cjavahelp"
tex '\def\filename{{$1}{idx}{4dx}{ind}} \input idxmake.4ht'
makeindex -o $1.ind $1.4dx
htlatex $1 "html,3.2,javahelp" "" "-djh-$1.dir/$1-doc/ -cjavahelp"
cd jh-$1.dir; zip -r $1 * ; cd ..
mv jh-$1.dir/$1.zip .
rm -r -f jh-$1.dir
\end{verbatim}
The compilation produced the following files.
\begin{verbatim}
jhprog.class
jhsample-doc/
jhsample-doc/jhsample.html
jhsample-doc/jhsample.jhm
jhsample-doc/jhsample-jhi.xml
jhsample-doc/jhsample.hs
jhsample-doc/jhsample-jht.xml
jhsample-doc/jhprog.java
\end{verbatim}
\printindex
\end{document}
|