From 974747ad940c7af2d357d26c452f2a078c244ecd Mon Sep 17 00:00:00 2001 From: ikelley Date: Mon, 22 Apr 2002 20:58:12 +0000 Subject: update git-svn-id: http://svn.cactuscode.org/flesh/trunk@2746 17b73243-c579-4c4c-a9d2-2d5706c11dac --- lib/sbin/InterLatex.pl | 463 +++++++++++++++++++++++++------------------------ 1 file changed, 234 insertions(+), 229 deletions(-) diff --git a/lib/sbin/InterLatex.pl b/lib/sbin/InterLatex.pl index c6c89d50..c43ef23a 100755 --- a/lib/sbin/InterLatex.pl +++ b/lib/sbin/InterLatex.pl @@ -1,7 +1,20 @@ #!/usr/bin/perl -s #use strict; -use vars qw($cctk_home $debug $verbose $h $help $spacing $width $cellsintable $document_type $outdir $arrangements_dir $thornlist); +use vars qw($cctk_home $debug $verbose $h $help $document_type $outdir $directory $thornlist); + +#/*@@ +# @file InterLatex.pl +# @date Sun Mar 3 19:05:41 CET 2002 +# @author Ian Kelley +# @desc +# This program will take as input a thornlist, and outputs a latex table +# that contains the information in the thorns' interface.ccl file(s). This latex +# table can then be used as a stand-alone document, or as a section of a large +# "ThornGuide" +# @enddesc +# @version +#@@*/ ######################### # ->> InterLatex.pl <<- # @@ -13,42 +26,20 @@ use vars qw($cctk_home $debug $verbose $h $help $spacing $width $cellsintable $d if ($h || $help) { print "--> InterLatex.pl <--\n"; print "Options:\n"; -# print "\t-th= : (semi opt) thorn to process\n"; -# print "\t-arr= : (semi opt) arrangement to process\n"; -# print "\t-processall : (opt) process all arrangements\n"; - print "\t-thornlist= : (opt) thornlist to process\n"; - print "\n"; -# print "\t-grouping= : (opt) file ouput grouping scope (bythorn/byarrangement/all)\n"; - print "\t-directory= : (opt) dir. of arrangements (default arrangements/)\n"; - print "\t-outdir= : (opt) directory to dump output files, default is .\n"; - print "\n"; -# print "\t-dump : (opt) dumps output to screen, not in Latex\n"; - print "\t-document_type : (opt) creates a TeX document, not just a table\n"; -# print "\t-section : (opt) makes this a section of a greater document\n"; - print "\t-cellsintable= : (opt) the number of cells in any given table\n"; - print "\t-spacing= : (opt) vertical spacing between elements (default 6mm)\n"; - print "\t-width= : (opt) fixed width of table (default 150mm)\n"; + print "\t-thornlist= : thornlist to process\n"; + print "\t-directory= : directory of arrangements (default arrangements/)\n"; + print "\t-outdir= : directory to dump output files, default is .\n"; + print "\t-document_type= : create a 'document' or 'section'\n"; + print "\t-cctk_home= : root directory of cactus installation\n"; print "\n"; - print "\t-verbose : (opt) gives verbose output to screen\n"; - print "\t-h/-help : (opt) this screen\n"; + print "\t-verbose : gives verbose output to screen\n"; + print "\t-debug : debug mode, does not produce output files\n"; + print "\t-h|-help : this screen\n"; print "Example:\n"; - print "\tperl -s /lib/sbin/InterLatex.pl -processall -document -outdir=testdirectory -document \n"; + print "\t\$ perl -s lib/sbin/InterLatex.pl -outdir=/tmp/ -thornlist=WaveToyC.th -document_type=document \n"; exit 0; } -#/*@@ -# @file InterLatex.pl -# @date Sun Mar 3 19:05:41 CET 2002 -# @author Ian Kelley -# @desc -# This program will take as input a thornlist, and outputs a latex table -# that contains the information in the thorns' interface.ccl file(s). This latex -# table can then be used as a stand-alone document, or as a section of a large -# "ThornGuide" -# @enddesc -# @version -#@@*/ - # setup the cctk_home, if it doesn't exist, we leave it blank $cctk_home .= '/' if (($cctk_home !~ /\/$/) && (defined $cctk_home)); @@ -76,15 +67,22 @@ require "$sbin_dir/MakeUtils.pl"; my $start_directory = `pwd`; chomp ($start_directory); - my @valid_groups = qw(private public protected); -########################### -# COMMAND LINE VAR. CHECK # -########################### -$width ||= "150mm"; -$spacing ||= "3mm"; -$cellsintable ||= 6; +# fixed width of table +my $width = "150mm"; + +# spacing between tables +my $spacing = "3mm"; + +# maximum number of cells in a table +my $cellsintable = 6; + +# set some defaults +$document_type ||= 'section'; + +my $start_directory = `pwd`; +chomp ($start_directory); # set some variables in ThornUtils(.pm) namespace $ThornUtils::cctk_home = $cctk_home; @@ -92,9 +90,6 @@ $ThornUtils::start_directory = $start_directory; $ThornUtils::verbose = $verbose; $ThornUtils::debug = $debug; -# set some defaults -$document_type ||= 'section'; - ################## # INITIALIZATION # ################## @@ -109,14 +104,9 @@ my @listOfThorns; ThornUtils::CreateSystemDatabase(\%system_database); -#@valid_groups = qw(private protected public); - -$start_directory=`pwd`; -chomp($start_directory); - # get/setup the output directory and the arrangements directory $outdir = ThornUtils::SetupOutputDirectory($outdir); -$arrangements_dir = ThornUtils::GetArrangementsDir($arrangements_dir); +my $arrangements_dir = ThornUtils::GetArrangementsDir($directory); # determine thornlist, create one if one doesn't exist if (defined $thornlist) { @@ -128,53 +118,12 @@ if (defined $thornlist) { @listOfThorns = ThornUtils::CreateThornlist($arrangements_dir); } -# this will return us a hash with keys as thorn names, and values as absolute paths to the -# thorn's directory param.ccl can be located in that path. -# We need this information to create a parameter database using create_parameter_database -# -# We are not doing ''one'' call to parameter_database as we easily could, because there is NO WAY -# (currently) to distinguish between two identical thorns in different arrangements. So we -# would get stuff from Alphathorns/IOHDF5 in CactusBase/IOHDF5, or/and visa-versa. +%pathsToThorns = ThornUtils::GetThornPaths(\@listOfThorns, $arrangements_dir, "interface.ccl", 1); -#ThornUtils::ClassifyThorns(\%arrangements, @listOfThorns); - -%pathsToThorns = ThornUtils::GetThornPaths(\@listOfThorns, $arrangements_dir, "interface.ccl", 1); -%interface_database = &create_interface_database(scalar(keys %system_database), %system_database, %pathsToThorns); +%interface_database = &create_interface_database(scalar(keys %system_database), %system_database, %pathsToThorns); %arrangements_database = &ReadInterfaceDatabase(\%interface_database); -#$arrangements_database{$arrangement}->{$thorn} = &ReadInterfaceDatabase(\%interface_database, "$arrangement/$thorn"); - - -#foreach my $arrangement (keys %arrangements) { -# foreach my $thorn (@{$arrangements{$arrangement}}) { -# $arrangements_database{$arrangement}->{$thorn} = &ReadInterfaceDatabase(\%interface_database, "$arrangement/$thorn"); -# } -#} -#exit 0; -#exit 0; -# lets go through, one arrangement at a time -#foreach my $arrangement (keys %arrangements) -#{ -# print "\narrangement=$arrangement" if ($debug); - # now each thorn in the given arrangement - # foreach my $thorn (@{$arrangements{$arrangement}}) - # { - # print "\n\tthorn=$thorn" if ($debug); - - # get the path for this individual thorn - # %pathsToThorns = ThornUtils::GetThornPaths(["$arrangement/$thorn"], $arrangements_dir, "interface.ccl"); - - # now we create a parameter database (for one thorn), using the function - # &create_parameter_database which is provided by 'parameter_parser.pl' - # %interface_database = &create_interface_database(scalar(keys %system_database), %system_database, %pathsToThorns); - - # Go split up the information we have recieved (again, for just this one thorn) -# $arrangements_database{$arrangement}->{$thorn} = &ReadInterfaceDatabase(\%interface_database); -# } -#} - -#exit 0; -# just dump out the data-structure if we are in debug mode, don't create any files + if ($debug) { ThornUtils::Dump(\%arrangements_database); print "\n"; @@ -184,8 +133,6 @@ if ($debug) { } print "\nFinished.\n"; -#%interface_database = &create_interface_database(scalar(keys %system_database), %system_database, %$thorn); -#&ReadLatexDatabase(%interface_database); ######################################################################### # END OF MAIN SECTION OF THE PROGRAM # @@ -195,39 +142,24 @@ print "\nFinished.\n"; # BEGINNING OF SUB-ROUTINES # ######################################################################### -######################################################################### -# ReadLatexDataBase # -# Calls parameter_parser.pl, which will read in the param.ccl file # -# from a single thorn and return all data as a %hash table, which we # -# will then parse to put into our own %hash tables named according to # -# the variable names. # -# # -# %(variable_name) : any number of hashes created with their names # -# being the variable names, they then have $keys # -# (descriptions) with $values (well, values) # -# (e.g.) $name{"default"} = "Cactus"; # -# @global \ # -# @restricted \ -> arrays containing the names of the relative # -# @private / hashes that are contained within their scopes # -# @shared / (masterlist contained in @valid_types) # -######################################################################### +#/*@@ +# @routine ReadInterfaceDatabase +# @date Sun Mar 3 01:54:37 CET 2002 +# @author Ian Kelley +# @desc +# +# @enddesc +# @version +#@@*/ sub ReadInterfaceDatabase { my (%interfaceDatabase) = %{$_[0]}; -# my $interested = $_[1]; - - #my (%arrangementsDatabase) = %{$_[1]}; - my %newDatabase; - # my %thorn; foreach (sort keys %interfaceDatabase) { - #next if (! (lc($_) cmp lc($interested))); - -# print "\n--> :<->: [$_] = [$interfaceDatabase{$_}]"; - print "\n--> [$_] = [$interfaceDatabase{$_}]" if (($debug>1) && ($verbose)); + print STDERR "\n--> [$_] = [$interfaceDatabase{$_}]" if (($debug>1) && ($verbose)); # save he original key, as we will make it all lower case later # and need the original for hash keys @@ -240,34 +172,32 @@ sub ReadInterfaceDatabase # drop the keys to lower-case, as they are all upper-case tr/A-Z/a-z/; /^(.*?)\/(.*?)( |$)/; + my ($arrangement, $thorn) = ($1, $2); + next if /^implementation/; next if ($interfaceDatabase{$old_key} !~ /\w/); + if (/^([^\s]+) ([^\s]+) ([^\s]+) ([^\s]+) ([^\s]+) ([^\s]+)$/) { -print #STDERR "\n($1) ($2) ($3) ($4) ($5) ($6) [$interfaceDatabase{$old_key}]"; - # $arrangementsDatabase{$arrangement}->{$thorn}->{$1}->{$2}->{$3}->{$4}->{$5}->{$6} = $interfaceDatabase{$old_key}; - $newDatabase{$arrangement}->{$thorn}->{$2}->{$3}->{$4}->{$5}->{$6} = $interfaceDatabase{$old_key}; + $newDatabase{$arrangement}->{$thorn}->{$2}->{$3}->{$4}->{$5}->{$6} = $interfaceDatabase{$old_key}; } elsif (/^([^\s]+) ([^\s]+) ([^\s]+) ([^\s]+) ([^\s]+)$/) { -print STDERR "\n($1) ($2) ($3) ($4) ($5) ($6) [$interfaceDatabase{$old_key}]"; -# $arrangementsDatabase{$arrangement}->{$thorn}->{$1}->{$2}->{$3}->{$4}->{$5} = $interfaceDatabase{$old_key}; - $newDatabase{$arrangement}->{$thorn}->{$2}->{$3}->{$4}->{$5} = $interfaceDatabase{$old_key}; + print STDERR "\n-->($2) $_"; + if ($2 eq "add" || $2 eq "uses" || $2 eq "provides") { + $newDatabase{$arrangement}->{$thorn}->{$2}->{$4}->{$5} = $interfaceDatabase{$old_key}; + } else { + $newDatabase{$arrangement}->{$thorn}->{$2}->{$3}->{$4}->{$5} = $interfaceDatabase{$old_key}; + } } elsif (/^([^\s]+) ([^\s]+) ([^\s]+) ([^\s]+)$/) { if ($2 eq "group") { - $newDatabase{$arrangement}->{$thorn}->{"group details"}->{$3}->{$4} = $interfaceDatabase{$old_key}; + $newDatabase{$arrangement}->{$thorn}->{"group details"}->{$3}->{$4} = $interfaceDatabase{$old_key}; } else { - $newDatabase{$arrangement}->{$thorn}->{$2}->{$3}->{$4} = $interfaceDatabase{$old_key}; + $newDatabase{$arrangement}->{$thorn}->{$2}->{$3}->{$4} = $interfaceDatabase{$old_key}; } -print STDERR "\n($1) ($2) ($3) ($4) ($5) ($6) [$interfaceDatabase{$old_key}]"; -# $arrangementsDatabase{$arrangement}->{$thorn}->{$1}->{$2}->{$3}->{$4} = $interfaceDatabase{$old_key}; } elsif (/^([^\s]+) ([^\s]+) ([^\s]+)$/) { -print STDERR "\n($1) ($2) ($3) ($4) ($5) ($6) [$interfaceDatabase{$old_key}]"; - #$arrangementsDatabase{$arrangement}->{$thorn}->{$1}->{$2}->{$3} = $interfaceDatabase{$old_key}; - $newDatabase{$arrangement}->{$thorn}->{$2}->{$3} = $interfaceDatabase{$old_key}; - } elsif (/^([^\s]+) ([^\s]+)$/) { -print STDERR "\n($1) ($2) ($3) ($4) ($5) ($6) [$interfaceDatabase{$old_key}]"; - # $arrangementsDatabase{$arrangement}->{$thorn}->{$1}->{$2} = $interfaceDatabase{$old_key}; - $newDatabase{$arrangement}->{$thorn}->{$2} = $interfaceDatabase{$old_key}; + $newDatabase{$arrangement}->{$thorn}->{$2}->{$3} = $interfaceDatabase{$old_key}; + } elsif (/^([^\s]+) ([^\s]+)$/) { + $newDatabase{$arrangement}->{$thorn}->{$2} = $interfaceDatabase{$old_key}; } else { print "\n--> Confused: [$_] = [$interfaceDatabase{$_}]"; } @@ -275,9 +205,6 @@ print STDERR "\n($1) ($2) ($3) ($4) ($5) ($6) [$interfaceDatabase{$old_key}]"; } return %newDatabase; - #return %arrangementsDatabase; - #delete $interfaceDatabase{$interested}; - #return \%thorn; } #/*@@ @@ -295,39 +222,29 @@ sub ProcessOneThorn my (%thorn) = %{$_[0]}; my $arrangement = $_[1]; my $thorn = $_[2]; + my $latex_output = ""; my $ofh = ThornUtils::StartDocument("inter", $thorn, $outdir, $arrangement, "Interfaces", $document_type); - # go get the latex for setting the width of the columns based on the longest variable we have - # (contained in the vaor $paragraph_len -# if (defined $thorn{"variables"}) { -# $latex_output = ThornUtils::SetWidth($TABLE_WIDTH, ThornUtils::CleanForLatex(FindMaxVarLen($thorn{"variables"}))); -# } - - # go through each group, then find all variables in the specific group type and generate the tables calling - # the function &CreateLatexTable &LatexTableElement(\%thorn); - # foreach my $group_type (sort keys %{$thorn{"groups"}}) - # { - # foreach my $variable_name (sort @{$thorn{"groups"}{$group_type}}) - # { - # send in the 'variable' hash, the name of the variable, and the longest variable in this thorn -# $latex_output .= &CreateLatexTable($thorn{"variables"}{$variable_name}, $variable_name); -## } -# } print $latex_output; ThornUtils::EndDocument($ofh, $document_type); } -######################################################################### -# LatexTableElement # -# Takes whatever table element is currently reffered to by $table # -# and prints it out into a LaTeX table. Only nifty things it curr. # -# does is NOT print ranges for BOOLEAN and SHARED elements. # -######################################################################### +#/*@@ +# @routine LatexTableElement +# @date Sun Mar 3 01:54:37 CET 2002 +# @author Ian Kelley +# @desc +# Takes whatever table element is currently reffered to by $table +# and prints it out into a LaTeX table. Only nifty things it curr. +# does is NOT print ranges for BOOLEAN and SHARED elements. +# @enddesc +# @version +#@@*/ sub LatexTableElement { # get the stuff passed in, first is a hash of the given variable, second is the name of the variable, @@ -344,95 +261,116 @@ sub LatexTableElement PrintVar("Implements", $thorn{"implements"}); PrintVar("Inherits", $thorn{"inherits"}) if ($thorn{"inherits"} !~ /^$/); - #$thorn{"implements"} - #$thorn{"inherits"}; + my $printgridtitle = 1; + foreach my $group_scope (@valid_groups) + { + next if (! defined $thorn{$group_scope}); - my $printgridtitle = 1; - foreach my $group_scope (@valid_groups) - { - next if (! defined $thorn{$group_scope}); + my @groups = split/\s+/, $thorn{$group_scope}->{"groups"}; + + next if (@groups < 1); - my @groups = split/\s+/, $thorn{$group_scope}->{"groups"}; + print "\n\\subsection\*\{Grid Variables\}" if ($printgridtitle); -# foreach (@groups) { -# print STDERR "\n$_ is var in $group_scope [$thorn{$group_scope}->{\"groups\"}]"; -# } - next if (@groups < 1); + my $gs_scope = $group_scope; + $gs_scope =~ tr/a-z/A-Z/; - print "\n\\subsection\*\{Grid Variables\}" if ($printgridtitle); - my $gs_scope = $group_scope; - $gs_scope =~ tr/a-z/A-Z/; - print "\n\\vspace\{5mm\}\\subsubsection\{$gs_scope GROUPS\}\n"; + print "\n\\vspace\{5mm\}\\subsubsection\{$gs_scope GROUPS\}\n"; + print "\n\\vspace\{5mm\}\n\n\\begin\{tabular*\}\{$width\}\{|c|c\@\{\\extracolsep\{\\fill\}\}|rl|\} \\hline \n"; + print "~ \{\\bf Group Names\} ~ & ~ \{\\bf Variable Names\} ~ &\{\\bf Details\} ~ & ~\\\\ \n"; + print "\\hline \n"; + + $printgridtitle = 0; + my $counter = 0; + + foreach my $group (@groups) + { + $group =~ tr/A-Z/a-z/; + next if ($thorn{"group"}->{$group} =~ /^$/); + + if (( ! ($counter % $cellsintable)) && ($counter ne 0) ) + { + print "\\end\{tabular*\} \n\n"; + print "\n\n\\vspace\{5mm\}"; print "\n\\vspace\{5mm\}\n\n\\begin\{tabular*\}\{$width\}\{|c|c\@\{\\extracolsep\{\\fill\}\}|rl|\} \\hline \n"; - print "~ \{\\bf Group Names\} ~ & ~ \{\\bf Variable Names\} ~ &\{\\bf Details\} ~ & ~\\\\ \n"; + print "~ \{\\bf Group Names\} ~ & ~ \{\\bf Variable Names\} ~ &\{\\bf Details\} ~ & ~ \\\\ \n"; print "\\hline \n"; + } + + # print group name + print ThornUtils::ToLower(ThornUtils::CleanForLatex($group)); + my $firstpass = 1; + + my @group_variables = split/\s+/, ThornUtils::CleanForLatex($thorn{"group"}{$group}); + $counter++; - $printgridtitle = 0; - my $counter = 0; - foreach my $group (@groups) + my $var_counter = 0; + foreach my $group_detail (keys %{$thorn{"group details"}->{$group}}) + { + my $value = ThornUtils::CleanForLatex($thorn{"group details"}->{$group}->{$group_detail}); + + # print nothign as we are dealing with the same group + if (! $firstpass) { + print "~ &"; + $firstpass = 0; + } + + my $new_counter = 1; + if (@temp = split/,/, $value) { - next if ($thorn{"group"}->{$group} =~ /^$/); - - if (( ! ($counter % $cellsintable)) && ($counter ne 0) ) + foreach my $val (@temp) { - print "\\end\{tabular*\} \n\n"; - print "\n\n\\vspace\{5mm\}"; - print "\n\\vspace\{5mm\}\n\n\\begin\{tabular*\}\{$width\}\{|c|c\@\{\\extracolsep\{\\fill\}\}|rl|\} \\hline \n"; - print "~ \{\\bf Group Names\} ~ & ~ \{\\bf Variable Names\} ~ &\{\\bf Details\} ~ & ~ \\\\ \n"; - print "\\hline \n"; + if ($new_counter--) { + print " & $group_variables[$var_counter] & " . ExpandGroupName($group_detail) . " & $val \\\\ \n"; + } else { + print "& ~ & " . ExpandGroupName($group_detail) ." & $val \\\\ \n"; + } } + } else { + print "$group_variables[$var_counter] & " . ExpandGroupName($group_detail) . " & $value \\\\ \n"; + } - # print group name - print ThornUtils::ToLower(ThornUtils::CleanForLatex($group)); - my $firstpass = 1; + $var_counter++; + } #foreach %{thorn...} - my @group_variables = split/\s+/, ThornUtils::CleanForLatex($thorn{"group"}{$group}); - $counter++; + print "\\hline \n"; + } #foreach @groups - my $var_counter = 0; - foreach my $group_detail (keys %{$thorn{"group details"}->{$group}}) - { - my $value = ThornUtils::CleanForLatex($thorn{"group details"}->{$group}->{$group_detail}); + print "\\end\{tabular*\} \n\n"; + delete $thorn{$group_scope}; + } # foreach @valid_groups - # print nothign as we are dealing with the same group - if (! $firstpass) { - print "~ &"; $firstpass=0; - } - my $new_counter = 1; - if (@temp = split/,/, $value) - { - foreach my $val (@temp) - { - if ($new_counter--) { - print " & $group_variables[$var_counter] & " . ExpandGroupName($group_detail) . " & $val \\\\ \n"; - } else { - print "& ~ & " . ExpandGroupName($group_detail) ." & $val \\\\ \n"; - } - } - } else { - print "$group_variables[$var_counter] & " . ExpandGroupName($group_detail) . " & $val \\\\ \n"; - } - $var_counter++; - } #foreach %{thorn...} - print "\\hline \n"; - } #foreach @groups - print "\\end\{tabular*\} \n\n"; - delete $thorn{$group_scope}; - } # foreach @valid_groups - print "\n\n\\vspace\{5mm\}"; + print "\n\n\\vspace\{5mm\}"; + PrintHeaderOrFunction("Adds Header", $thorn{"add"}->{"header"}, $thorn{"add"}); + PrintHeaderOrFunction("Uses Header", $thorn{"uses"}->{"header"}, $thorn{"uses"}); + PrintHeaderOrFunction("Provides", $thorn{"provides"}->{"function"}, $thorn{"provides"}); #&PrintData("HEADER"); #&PrintData("SOURCE"); #&PrintData("FUNCTION"); -} ## END :LatexTableElement: +} -sub PrintVar { +#/*@@ +# @routine PrintVar +# @date Sun Mar 3 01:54:37 CET 2002 +# @author Ian Kelley +# @desc +# +# @enddesc +# @version +#@@*/ +sub PrintVar +{ my $title = shift; - my $var = shift; + my $var = shift; + + my %alias = %{$_[0]}; my @temp; + return if ($var !~ /\w/); + print "\n\n\\noindent \{\\bf ". ThornUtils::Translate(ThornUtils::CleanForLatex($title)) ."\}: "; if (@temp = split/\s+/, $var) @@ -446,7 +384,65 @@ sub PrintVar { print "\n\\vspace\{2mm\}"; } -sub ExpandGroupName { +#/*@@ +# @routine PrintHeaderOrFunction +# @date Sun Mar 3 01:54:37 CET 2002 +# @author Ian Kelley +# @desc +# +# @enddesc +# @version +#@@*/ +sub PrintHeaderOrFunction +{ + my $title = shift; + my $var = shift; + + my %alias = %{$_[0]}; + + my @temp; + + return if ($var !~ /\w/); + + print "\n\n\\noindent \{\\bf ". ThornUtils::Translate(ThornUtils::CleanForLatex($title)) ."\}: "; + + if (@temp = split/\s+/, $var) + { + foreach (@temp) + { + my $lc_var = $_; + $lc_var =~ tr/A-Z/a-z/; + + print "\n\n" . ThornUtils::CleanForLatex($_); + + if ( (defined $alias{$lc_var}) && ($alias{$lc_var}->{"to"} ne $_) ) { + print " to " . ThornUtils::CleanForLatex($alias{$lc_var}->{"to"}); + } + } + } else { + my $lc_var = $var; + $lc_var =~ tr/A-Z/a-z/; + + print "\n\n" . ThornUtils::CleanForLatex($var); + + if ( (defined $alias{$lc_var}) && ($alias{$lc_var}->{"to"} ne $var) ) { + print " to " . ThornUtils::CleanForLatex($alias{$lc_var}->{"to"}); + } + } + print "\n\\vspace\{2mm\}"; +} + +#/*@@ +# @routine ExpandGroupName +# @date Sun Mar 3 01:54:37 CET 2002 +# @author Ian Kelley +# @desc +# +# @enddesc +# @version +#@@*/ +sub ExpandGroupName +{ my $name = shift; if ($name eq "stype") { @@ -466,6 +462,15 @@ sub ExpandGroupName { } } +#/*@@ +# @routine PrintData +# @date Sun Mar 3 01:54:37 CET 2002 +# @author Ian Kelley +# @desc +# +# @enddesc +# @version +#@@*/ sub PrintData { my $type = shift; @@ -500,6 +505,6 @@ sub PrintData print "\n\n$_"; } } - } #if + } } -} ## END :PrintData: +} -- cgit v1.2.3