[l2h] l2h new error

Shigeharu TAKENO shige at iee.niit.ac.jp
Fri Jul 13 05:59:58 CEST 2018


shige 07/13 2018
----------------

I wrote:
| I will consider the solution for problems 3) and 4).

I think the following patch may workaround these problem 1-4) 
(this is for latex2html.pin in latex2html-2017.2).

----- From here -----
--- latex2html.pin.ORG	2018-07-13 12:46:13.674636000 +0900
+++ latex2html.pin	2018-07-13 12:55:51.674987000 +0900
@@ -11162,7 +11162,14 @@
 
 	# Search for [aAiI1] which is not between a pair of { }
 	# Other cases like "\theenumi" are not handled
-	@label_fields = $standard_label =~ /$enum_label_rx/;
+	# @label_fields = $standard_label =~ /$enum_label_rx/;
+	# 07/13 2018 shige
+	my $std_label = $standard_label;
+	$std_label =~ s/$any_next_pair_rx/\{$2\}/g;
+	@label_fields = $std_label =~ /$enum_label_rx/;
+	$label_fields[0] =~ s/[\{\}]//g;
+	$label_fields[$#label_fields] =~ s/[\{\}]//g;
+	$std_label =~ s/[\{\}]//g;
 	if (($standard_label =~ /^[aAiI1]$/)&&(not(/item\s*\[/))) {
 	    $enum_type = ' TYPE="'.$standard_label.'"';
 	    $standard_label = '';
@@ -11173,9 +11180,12 @@
 #	local($thislabel) = "\&$label_func";
 #	do { local($_) = $thislabel; &make_unique($_);
 #	     $enum{'theenum' . $rlevel} = $_; };
-	    $standard_label = 
+	    # $standard_label = 
+	    # 07/13 2018 shige
+	    $standard_label = ($#label_fields > 0) ?
 		"\"$label_fields[0]\" . eval(\$enum{\"theenum$rlevel\"})"
-		. ".\"$label_fields[$#label_fields]\"";
+		. ".\"$label_fields[$#label_fields]\"" :
+		$std_label;    
 	    $enum{'labelenum' . $rlevel} = $standard_label;
 	}
     }  elsif (s/^((.|\n)+?)\\item/$preitems=$1;"\\item"/es) {
@@ -11193,9 +11203,16 @@
 	    $label_part = '"'.$label_part.'"';
 	    $enum{$cmd} = $label_part;
         }
-	$standard_label = 
-	    "\"$label_fields[0]\" . eval(\$enum{\"theenum$rlevel\"})"
-	    . ".\"$label_fields[$#label_fields]\"" if ($cmd);
+	# $standard_label = 
+	#    "\"$label_fields[0]\" . eval(\$enum{\"theenum$rlevel\"})"
+	#    . ".\"$label_fields[$#label_fields]\"" if ($cmd);
+	# 07/13 2018 shige
+	if ($cmd) {
+	    $standard_label = ($#label_fields > 0) ? 
+		"\"$label_fields[0]\" . eval(\$enum{\"theenum$rlevel\"})"
+		. ".\"$label_fields[$#label_fields]\"" :
+		$std_label;
+	}
 	$_ = $pre_preitems . $preitems . $_ if ($pre_preitems||$preitems);
     } else {
 	@enum_default_type = ('A', '1', 'a', 'i', 'A') unless (@enum_default_type);
@@ -11244,7 +11261,9 @@
 		$item = "[$enum_label\]$item";
 		$enum_label =~ s/\.$//;
 	    }
-	    if ($standard_label) {
+	    # if ($standard_label) {
+	    # 07/13 2018 shige
+	    if ($standard_label && $standard_label !~ /eval\(/) {
 	        $item =~ s/(\\labelitem$rlevel|$standard_label)/$enum_label/g
 	    } else {
 	        $item =~ s/(\\labelitem$rlevel)/$enum_label/g
@@ -15928,7 +15947,9 @@
 }
 sub Alph{
     local($num)=@_;
-    &falph(eval($enum{$num}));
+    # &falph(eval($enum{$num}));
+    # 07/13 2018 shige
+    &fAlph(eval($enum{$num}));
 }
 
 sub Roman{
@@ -16469,7 +16490,9 @@
     # used for labels in {enumerate} environments
     $standard_label_rx = 
 	"\\s*[[]\\s*((($any_next_pair_rx4)|([[][^]]*[]])|[^]])*)[]]";
-    $enum_label_rx = "^((({[^{}]*})|([^{}]))*)([aAiI1])(.*)";
+    # $enum_label_rx = "^((({[^{}]*})|([^{}]))*)([aAiI1])(.*)";
+    # 07/13 2018 shige
+    $enum_label_rx = "^(((\{[^\{\}]*\})|([^\{\}]))*)([aAiI1])(.*)";
     $enum_level = 0;	# level for enumerate (1-4, i-iv)
 
 
----- To here -----

+========================================================+
 Shigeharu TAKENO     NIigata Institute of Technology
                       kashiwazaki,Niigata 945-1195 JAPAN
 shige at iee.niit.ac.jp   TEL(&FAX): +81-257-22-8161
+========================================================+


More information about the latex2html mailing list