Keeping such a map file up to date manually can be tedious, especially with dynamic documents under revision. An experimental program makemap helps automate this process. This program (which is really a Perl script) takes one mandatory argument and an optional argument. The mandatory argument is the name of a user-map file, defined below. The optional argument is the name of the directory where the HTML map file(s) are to be placed.
The best way of describing how this works is by example.
Suppose a document has two figures designated to
become active image-maps. The first
figure includes a statement like:
\begin{figure} \htmlimage{map=/cgi-bin/imagemap/BlockDiagram.map,...} . . . \end{figure}The second figure has a line like:
\begin{figure} \htmlimage{map=/cgi-bin/imagemap/FlowChart.map,...} . . . \end{figure}
# # Define the location(s) of the labels.pl file(s): # +report/ <URL> # # Define map #1: # BlockDiagram.map: label1 rect 288,145 397,189 label2 rect 307,225 377,252 label2 default # # Define map #2 # FlowChart.map: label3 circle 150,100 200,100 label4 default
+report
states that the symbolic labels
are to be found in the labels.pl contained in the directory
report/, and that its associated URL is as stated. Any number
of external labels.pl files may be so specified.
The block diagram image has two active regions. The first is a rectangle
bounded by corners (288, 145) and (397, 189), while the second is a rectangle
bounded by corners (307, 225) and (377, 252). These coordinates
can be obtained with the aid of a program such as xv.
If the user clicks in the first rectangle,
it will cause a branch to the URL associated
with symbolic label label1 defined in the labels.pl file
found in directory report/. The single active region in the
flow chart figure is a circle centred at (150, 100) and passing through
point (200, 100). Clicking in this region will cause a branch to
symbolic label label3. Labels label2 and label4
will be visited if the user clicks anywhere outside of the explicit
regions. If any labels are not defined in any of the labels.pl
files mentioned, they will be interpreted as URLs without translation.
The HTML image-maps are generated and placed in directory
report/ by invoking the command: makemap report.map report
.
96.1