--- loncom/xml/algebra/algebra2tex.pl 2005/02/24 01:21:51 1.1 +++ loncom/xml/algebra/algebra2tex.pl 2006/03/13 19:22:37 1.4 @@ -6,12 +6,18 @@ use AlgParser; my $parser = new AlgParserWithImplicitExpand; my $ret; -$ret = $parser -> parse($ARGV[0]); -if ( ref($ret) ) { - $parser -> tostring(); - $parser -> normalize(); - print $parser -> tolatex(); -} else { - print $parser->{htmlerror}; +foreach $str (@ARGV) { + print($str.$/); + $ret = $parser->parse($str); + if ( ref($ret) ) { + print('1). '.$parser->tostring() .$/); + print('2). '.$parser->tolatex() .$/); + print('3). '.$parser->normalize().$/); + print('4). '.$parser->tostring() .$/); + print('5). '.$parser->tolatex() .$/); + } else { + print($parser->{htmlerror}.$/); + } + print "\n"; }