17.4 APSS


40800 makehelp (options,file)
invokes the automatic translator for generating help pages
40803 setenv ("xpl4outhelp",path)
sets the APSS output stream

Once we have constructed a fine quantlet, we are interested in other people using it. This is done by publishing the quantlet technology via an HTML file. Other students and scientists may use the quantlet then inside the XploRe Auto Pilot Support System (APSS), see Figure 17.5.

Figure 17.5: APSS start page.
\includegraphics[scale=0.8]{apssneu}

We are now ready to publish our first quantlet with the tools that are available in XploRe . First we define where the HTML file should be written. We do this via the 40815 setenv command by setting the APSS output stream to go into the directory C:\XploRe

  setenv("xpl4outhelp","C:\XploRe")
We may check the effect of this command by clicking the Main item and then the Info item. We see that the output stream is set to the desired directory.

In the next step it is necessary to provide all information which will be contained in the resulting HTML file. This is done very easily by including the following header directly in the source code of our quantlet. A template of the header is inserted automatically via the Insert help item in the Tools menu and you can fill in all the desired information. You should do this very carefully in order to allow other users to run your quantlet comfortably. Typically, it starts immediately after the 40818 proc statement.

Recall our first quantlet myquant from Section 17.1. The beginning of the quantlet myquant.xpl should look like this:

  proc() = myquant(obs1)
  ; --------------------------------------------------------
  ;   Library      stats      
  ; --------------------------------------------------------
  ;   See_also     linreg
  ; --------------------------------------------------------
  ;   Macro        myquant
  ; --------------------------------------------------------
  ;   Description  plot of the effect of outliers in linear 
  ;                regression model              
  ; --------------------------------------------------------
  ;   Usage        myquant(obs1)  
  ;   Input
  ;     Parameter    obs1
  ;     Definition   2x1 vector - coordinates of an outlier
  ;   Output
  ;     Parameter    
  ;     Definition 
  ; --------------------------------------------------------
  ;   Notes    works fine 
  ; --------------------------------------------------------
  ;   Example  myquant(#(10,45)) 
  ; --------------------------------------------------------
  ;   Result   produces a plot of true regression line and
  ;            the regression line 
  ; --------------------------------------------------------
  ;   Keywords     myquant
  ; --------------------------------------------------------
  ;   Reference    lecture notes, XploRe manual      
  ; --------------------------------------------------------
  ;   Link
  ; --------------------------------------------------------
  ;   Author       anonymous
  ;---------------------------------------------------------
     n = 10
40822 XLGquant20.xpl

Figure 17.6: Helpfile for myquant.
\includegraphics[width=1.3\defpicwidth]{help.ps}

Now you are ready to create the HTML help file with the 40828 makehelp command

  makehelp("html","C:\XploRe\myquant.xpl")
This command automatically creates an HTML help file myquant.xpl in directory C:\XploRe which was beforehand specified as the output directory for the help file by the command 40831 setenv . You can have a look at the resulting file with Netscape Navigator (Figure 17.6), Internet Explorer or any other World Wide Web browser of your choice.

The first argument of 40834 makehelp specifies which type of help file will be created. Possible choices are "html" for HTML help file, "ascii" for ascii help file and "latex" for manual page. The second argument specifies the XploRe program for which the help file will be created.

You do not have to restrict yourself to generating only one help file. You can easily create the complete APSS (Auto Pilot Support System). The command

  makehelp("html","C:\XploRe")
generates the complete help system from the files in directories C:\XploRe\hlp2 and C:\XploRe\lib and writes the resulting files in C:\XploRe\help and C:\XploRe\help\text directories. Before you call this command, you should check whether these directories exist and whether you have permission to write into them.