[l2h] Warning for undefinded control sequence in math-mode

Gerd Blumenstein Gerd.Blumenstein@da-tex.de
Wed, 30 May 2001 16:54:45 +0200


Hi.

I discovered a little problem with the image generation. If latex2html 
generates an image for an equitation and if there is an undefined control 
sequence, no message will warn the user. Latex2html generates an  image but 
without the definition. Thus the user has to control all images.

I changed the sub below,  so the error message will be printed out.

Gerd Blumenstein.

-------------------------------------------------------------------------------------------------------------
sub process_log_file {
     local($logfile) = @_;
     local($name,$before,$lengthsfound);
     local($TeXpt)= 72/72.27;
     local($image_counter);
     open(LOG, "<$logfile") || die "\nCannot read logfile '$logfile': $!\n";
     while (<LOG>) {
         if (/Overfull/) { $before .= $_ }
         elsif (/latex2htmlLength ([a-zA-Z]+)=(\-?[\d\.]+)pt/) {
	    ${$1} = 0.0+$2; $lengthsfound = 1;
	} elsif (/latex2htmlSize|l2hSize/) {
	    /:([^:]*):/;
	    $name = $1; $name =~ s/\*//g;
	    ++$image_counter;
	    s/:([0-9.]*)pt/$height{$name} = $1*$TeXpt;''/e;
	    s/::([0-9.]*)pt/$depth{$name} = $1*$TeXpt;''/e;
	    s/::([0-9.]*)pt/$width{$name} = $1*$TeXpt;''/e;
	    s/\((.*)\)/$eqno{$name} = 1+$1;''/e;
	    if ($before) {
		local($tmp);
		if ($before =~ /hbox\s*\((\d+\.?\d*)pt/) {
		    $width{$name} = $width{$name}+$1*$TeXpt;
		}
		if ($before =~ /vbox\s*\((\d+\.?\d*)pt/) {
		    $height{$name} = $height{$name}+$1*$TeXpt;
		}
	        $before = '';
	    }
	}
     $LaTeXERROR = 1 if (/^No pages of output./);
# Begin Gerd Blumenstein 30.5.2001				
     if (/Undefined control sequence/../\%$/) {			<----------- added
        m/(.+)/;							<----------- added
        print "$1\n"};						<----------- added
# End Gerd Blumenstein 30.5.2001
     }