#!/usr/local/bin/perl5
#
# Copyright (C) 1996,1997,1998,1999,2000,2001
# Associated Universities, Inc. Washington DC, USA.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
#
# Correspondence concerning AIPS++ should be addressed as follows:
# Internet email: aips2-request@nrao.edu.
# Postal address: AIPS++ Project Office
# National Radio Astronomy Observatory
# 520 Edgemont Road
# Charlottesville, VA 22903-2475 USA
#
# $Id$
#
use Getopt::Long;
use Cwd;
$/ = "";
$* = 1;
$mtext = "[^}]*";
$etext = "([^\}]*\{[^\}]*\}[^\}]*|[^\}]*)";
$wlabel = "\\subsubsection";
$tbflabel = '\\flushleft\\vspace{.20in}\\textbf';
$theText = "";
$args = "";
$end_section = "\\vspace{.18in}\n\\hrule";
# OK first we make sure we can tokenize everything by adding an endaips2help
# token after the \\end{ah}
$result = &GetOptions('glish', 'noheaders', 'package=s', 'outline');
if($opt_noheaders == 0 && $opt_glish == 0 && $opt_outline == 0){
print "\\documentclass{book}\n";
print "\\usepackage{html, longtable, epsfig}\n";
print "\\begin{document}\n";
print "\\newcommand{\\starthelptab}{\n";
print "\\begin{tabular}{|l p{0.25in}p{0.36in}p{2.79in}|}\n";
print "}\n";
print "\\begin{htmlonly}\n";
print "\\newcommand{\\starthelptab}{\n";
print "\\begin{tabular}{|l p{0.25in}p{0.75in}p{2.38in}|}\n";
print "}\n";
print "\\end{htmlonly}\n";
print "\\input{aips2defs}\n";
}
$pack = $opt_package;
if($opt_glish == 1){
$pack = "help::pkg.$opt_package";
print "\# atoms$opt_package.g: help atoms for the $opt_package package. \n";
print "\# Copyright (C) 1999\n";
print "\# Associated Universities, Inc. Washington DC, USA.\n";
print "\#\n";
print "\# This library is free software; you can redistribute it and/or modify it\n";
print "\# under the terms of the GNU Library General Public License as published by\n";
print "\# the Free Software Foundation; either version 2 of the License, or (at your\n";
print "\# option) any later version.\n";
print "\#\n";
print "\# This library is distributed in the hope that it will be useful, but WITHOUT\n";
print "\# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n";
print "\# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public\n";
print "\# License for more details.\n";
print "\#\n";
print "\# You should have received a copy of the GNU Library General Public License\n";
print "\# along with this library; if not, write to the Free Software Foundation,\n";
print "\# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.\n";
print "\#\n";
print "\# Correspondence concerning AIPS++ should be addressed as follows:\n";
print "\# Internet email: aips2-request\@nrao.edu.\n";
print "\# Postal address: AIPS++ Project Office\n";
print "\# National Radio Astronomy Observatory\n";
print "\# 520 Edgemont Road\n";
print "\# Charlottesville, VA 22903-2475 USA\n";
print "\#\n";
print "\# \$Id$pack.g,v 11.2 1999/05/21 01:53:22 wbrouw Exp \$\n";
print "\n";
print "pragma include once\n";
print "val $pack := [=];\n";