Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lafenghu
latex2html
latex2html-2008-match-multiline.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File latex2html-2008-match-multiline.patch of Package latex2html
Description: Replace $* with "m" matching option This patch replaces the $* flag with the matching option "m" for multiline matching since the former one isn't supported by latest perl. Author: Roland Stigge <stigge@antcom.de> Index: latex2html-2008/latex2html.pin =================================================================== --- latex2html-2008.orig/latex2html.pin +++ latex2html-2008/latex2html.pin @@ -10637,19 +10637,17 @@ sub do_rightquotes { (($HTML_VERSION < 5 sub do_cmd_parbox { local($_) = @_; local($args, $contents, $dum, $pat); - $* = 1; # Multiline matching ON ($dum,$pat) = &get_next_optional_argument; # discard this ($dum,$pat) = &get_next_optional_argument; # discard this ($dum,$pat) = &get_next_optional_argument; # discard this $args .= $pat if ($pat); $pat = &missing_braces unless ( - (s/$next_pair_pr_rx/$pat=$2;''/eo) - ||(s/$next_pair_rx/$pat=$2;''/eo)); + (s/$next_pair_pr_rx/$pat=$2;''/eom) + ||(s/$next_pair_rx/$pat=$2;''/eom)); $args .= "{".$`.$pat."}"; $contents = &missing_braces unless ( - (s/$next_pair_pr_rx/$contents=$2;''/eo) - ||(s/$next_pair_rx/$contents=$2;''/eo)); - $* = 0; # Multiline matching OFF + (s/$next_pair_pr_rx/$contents=$2;''/eom) + ||(s/$next_pair_rx/$contents=$2;''/eom)); $args .= "{".$`.$contents."}"; if ($NO_PARBOX_IMAGES) { $contents = join ('', &do_cmd_par(), $contents, '</P>' ); @@ -11464,7 +11462,6 @@ sub list_helper { # $/ = $savedRS; # - $* = 1; # Multiline matching ON if (($tag =~ /DL/)&&$labels) { local($label,$aft,$br_id); s/\\item\b[\s\r]*([^\[])/do { @@ -11473,9 +11470,8 @@ sub list_helper { $label = &translate_environments( "$O$br_id$C$label$O$br_id$C"); join('',"\\item\[" , $label, "\]$aft" ); - }/eg; + }/egm; } - $* = 0; # Multiline matching OFF # This deals with \item[xxx] ... if ($tag =~ /DL/) { @@ -13192,9 +13188,7 @@ sub wrap_raw_arg_cmds { my $padding = ($after =~ /^[a-zA-Z]/s)? ($cmd =~ /\W$/ ? '':' '):''; if ($raw_arg_cmds{$cmd} && defined &$wrapper) { - $* = 1; ($wrap, $_) = &$wrapper("\\$cmd$star", $padding . $after); - $* = 0; # ...but don't leave an unwanted space at the beginning $_ =~ s/^ //s if($padding && $wrap !~ /\w$/m && (length($_) == length($after)+1) ); Index: latex2html-2008/styles/natbib.perl =================================================================== --- latex2html-2008.orig/styles/natbib.perl +++ latex2html-2008/styles/natbib.perl @@ -1385,12 +1385,10 @@ sub do_env_thebibliography { $citefile = $CURRENT_FILE; $citefiles{$bbl_nr} = $citefile; s/$next_pair_rx//o; - $* = 1; # Multiline matching ON # s/^\s*$//g; # Remove empty lines (otherwise will have paragraphs!) # s/\n//g; # Remove all \n s --- we format the HTML file ourselves. # $* = 0; # Multiline matching OFF - s/\\newblock/\<BR\>/g; # break at each \newblock - $* = 0; # Multiline matching OFF + s/\\newblock/\<BR\>/gm; # break at each \newblock s/\\penalty\d+//mg; # Remove \penalty declarations local($this_item,$this_kind, $title); Index: latex2html-2008/styles/color.perl =================================================================== --- latex2html-2008.orig/styles/color.perl +++ latex2html-2008/styles/color.perl @@ -145,7 +145,6 @@ $BKGSTRING = "bgcolor"; sub read_rgb_colors { local($base_file) = @_; local($file) = $base_file; - local($prev) = $*; local($r,$g,$b,$name,$dir); foreach $dir (split(/$envkey/,$LATEX2HTMLSTYLES)) { $file = "$dir$dd$base_file" @@ -155,7 +154,6 @@ sub read_rgb_colors { if (open(COLORFILE,"<$file")) { print STDOUT "\n(reading colors from $file" if $DEBUG; binmode COLORFILE; - $* = 0; # Multiline matching OFF while (<COLORFILE>) { s/^\s*(\d+)\s+(\d+)\s+(\d+)\s+(\w+(\s\w+)*)\s*/ ($r,$g,$b,$name)=($1,$2,$3,$4); @@ -171,14 +169,12 @@ sub read_rgb_colors { } } } - $* = $prev; # Restore Multiline matching $_[0]; } sub read_cmyk_colors { local($base_file) = @_; local($file) = $base_file; - local($prev) = $*; local($c,$m,$y,$k,$name,$dir,@colors); local($num_rx) = "(\\d|\\d\\.\\d*)"; foreach $dir (split(/$envkey/,$LATEX2HTMLSTYLES)) { @@ -189,7 +185,6 @@ sub read_cmyk_colors { if (open(COLORFILE,"<$file")) { print STDOUT "\n(reading colors from $file"; binmode COLORFILE; - $* = 0; # Multiline matching OFF @colors = (<COLORFILE>); foreach (@colors) { next if (/^\s*$/); @@ -213,7 +208,6 @@ sub read_cmyk_colors { } } } - $* = $prev; # Restore Multiline matching $_[0]; } Index: latex2html-2008/styles/htmllist.perl =================================================================== --- latex2html-2008.orig/styles/htmllist.perl +++ latex2html-2008/styles/htmllist.perl @@ -96,7 +96,6 @@ sub do_env_htmllist{ local($imagemark,$mark,$item_len,$desc_len,$mark_len,$mark_size); $imagemark = &set_htmllist_marker($bullet) if ($bullet); - $* = 1; local($Maxlength) = 99999; local($i,@items_done); print "["; @@ -114,8 +113,8 @@ sub do_env_htmllist{ $_ = $&.$'; push(@items_done,&translate_commands($`)); $mark = &missing_braces unless ( - (s/\\htmlitemmark$any_next_pair_pr_rx/$mark=$2;''/eo) - ||(s/\\htmlitemmark$any_next_pair_rx/$mark=$2;''/eo)); + (s/\\htmlitemmark$any_next_pair_pr_rx/$mark=$2;''/eom) + ||(s/\\htmlitemmark$any_next_pair_rx/$mark=$2;''/eom)); $imagemark = &set_htmllist_marker($mark) if ($mark); # $mark_size = $ImageSizeMarks{$mark}; # $mark = "$ICONSERVER/$ImageMarks{$2}.gif" if ($ImageMarks{$2}); @@ -136,7 +135,6 @@ sub do_env_htmllist{ $_=$'; } } - $* = 0; $_ = join('',@items_done, $_); undef @items_done; #RRM: cannot have anything before the first <LI> @@ -148,7 +146,7 @@ sub do_env_htmllist{ $preitems =~ s/<P( [^>]*)?>//g; $preitems = "\n".$preitems if $preitems; } - $/ = $savedRS; $* = 0; # Multiline matching OFF + $/ = $savedRS; $_ = '<DT>'.$_ unless (/^\s*<D(D|T)/); print "]"; Index: latex2html-2008/versions/html4_1.pl =================================================================== --- latex2html-2008.orig/versions/html4_1.pl +++ latex2html-2008/versions/html4_1.pl @@ -766,9 +766,7 @@ sub translate_colspec { } $celldata .= ' ' if ($celldata =~ /\\\w+$/); - $* = 1; # multiline matching ON - $celldata =~ s/$wrap_parbox_rx/$6/g; - $* = 0; # multiline matching OFF + $celldata =~ s/$wrap_parbox_rx/$6/gm; # $at_text .= $celldata; # if ( $#colspec > -1) { # $colspec[$#colspec] .= join('', "<TD ALIGN=\"LEFT\">",$celldata,'</TD>'); @@ -794,9 +792,7 @@ sub translate_colspec { } $celldata .= ' ' if ($celldata =~ /\\\w+$/); - $* = 1; # multiline matching ON - $celldata =~ s/$wrap_parbox_rx/$6/g; - $* = 0; # multiline matching OFF + $celldata =~ s/$wrap_parbox_rx/$6/gm; $at_text .= $celldata; } elsif ( $char =~ /;|\&/ ) { @@ -965,9 +961,7 @@ sub process_tabular { while (/\\parbox/) { local($parlength) = length($_); - $* = 1; # multiline matching ON - s/$wrap_parbox_rx/&convert_parbox_newlines($6)/eg; - $* = 0; # multiline matching OFF + s/$wrap_parbox_rx/&convert_parbox_newlines($6)/egm; if ($parlength == length($_)) { print "\n*** \\parbox's remain in table!!\n"; @@ -1196,9 +1190,7 @@ sub process_tabular { } $colspec = &translate_environments("$OP$tmp$CP$colspec$OP$tmp$CP"); $colspec = &translate_commands($colspec); - $* = 1; - while ($colspec =~ s/<(\w+)>\s*<\/\1>//g) {}; - $* = 0; + while ($colspec =~ s/<(\w+)>\s*<\/\1>//gm) {}; $colspec = ';SPMnbsp;' if ($colspec =~ /^\s*$/); $colspec = join('', $reopens, $colspec , (@$open_tags_R ? &close_all_tags() : '') @@ -1338,7 +1330,7 @@ sub make_math_comment{ $ecomm = "\n\\end{$env}"; } unless ($env =~/tex2html/); $_ = &revert_to_raw_tex; - $* = 1; s/^\s+//s; s/\s+$//s; $* = 0; + s/^\s+//s; s/\s+$//sm; $_ = $scomm . $_ . $ecomm; return() if (length($_) < 16); $global{'verbatim_counter'}++; @@ -1440,20 +1432,19 @@ sub do_env_equation { local($seqno) = join('',"\n<TD$eqno_class WIDTH=10 ALIGN=\"" , (($EQN_TAGS =~ /L/)? 'LEFT': 'RIGHT') , "\">\n"); - $* = 1; do { # get the equation number $global{'eqn_number'}++; $eqno = &translate_commands('\theequation'); - } unless ((s/(\\nonumber|\\notag)//g)||(/\\tag/)); + } unless ((s/(\\nonumber|\\notag)//gm)||(/\\tag/)); if (/\\tag(\*)?/){ # AmS-TEX line-number tags. if (defined &get_eqn_number ) { ($eqno, $_) = &get_eqn_number(1,$_); } else { - s/\\tag(\*)?//; + s/\\tag(\*)?//m; local($nobrack,$before) = ($1,$`); $_ = $'; - s/next_pair_pr_rx//o; + s/next_pair_pr_rx//om; if ($nobrack) { $eqno = $2; } else { $eqno = join('',$EQNO_START, $2, $EQNO_END) }; $_ = $before; @@ -1461,7 +1452,6 @@ sub do_env_equation { } elsif ($eqno) { $eqno = join('',$EQNO_START, $eqno, $EQNO_END) } else { $eqno = ' ' } # spacer, when no numbering - $* = 0; # include the equation-number, using a <TABLE> local($halign) = " ALIGN=\"CENTER\"" unless $FLUSH_EQN; @@ -1641,7 +1631,7 @@ sub do_env_eqnarray { # if (s/\\lefteqn$OP(\d+)$CP(.*)$OP\1$CP/ $2 /) { if (s/\\lefteqn//) { $return .= "\"LEFT\" COLSPAN=\"3\">"; - $* =1; s/(^\s*|$html_specials{'&'}|\s*$)//g; $*=0; + s/(^\s*|$html_specials{'&'}|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $_ = (($_)? &process_math_in_latex( "indisplay" , '', '', $doimage.$_ ):''); @@ -1666,7 +1656,7 @@ sub do_env_eqnarray { # left column, set using \displaystyle $thismath = shift(@cols); $failed = 0; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); @@ -1686,7 +1676,7 @@ sub do_env_eqnarray { # center column, set using \textstyle $thismath = shift(@cols); $failed = 0; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , 'text', '', $doimage.$thismath ):''); @@ -1706,7 +1696,7 @@ sub do_env_eqnarray { # right column, set using \displaystyle $thismath = shift(@cols); $failed = 0; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); Index: latex2html-2008/versions/html4_01.pl =================================================================== --- latex2html-2008.orig/versions/html4_01.pl +++ latex2html-2008/versions/html4_01.pl @@ -766,9 +766,7 @@ sub translate_colspec { } $celldata .= ' ' if ($celldata =~ /\\\w+$/); - $* = 1; # multiline matching ON - $celldata =~ s/$wrap_parbox_rx/$6/g; - $* = 0; # multiline matching OFF + $celldata =~ s/$wrap_parbox_rx/$6/gm; # $at_text .= $celldata; # if ( $#colspec > -1) { # $colspec[$#colspec] .= join('', "<TD ALIGN=\"LEFT\">",$celldata,'</TD>'); @@ -794,9 +792,7 @@ sub translate_colspec { } $celldata .= ' ' if ($celldata =~ /\\\w+$/); - $* = 1; # multiline matching ON - $celldata =~ s/$wrap_parbox_rx/$6/g; - $* = 0; # multiline matching OFF + $celldata =~ s/$wrap_parbox_rx/$6/gm; $at_text .= $celldata; } elsif ( $char =~ /;|\&/ ) { @@ -965,9 +961,7 @@ sub process_tabular { while (/\\parbox/) { local($parlength) = length($_); - $* = 1; # multiline matching ON - s/$wrap_parbox_rx/&convert_parbox_newlines($6)/eg; - $* = 0; # multiline matching OFF + s/$wrap_parbox_rx/&convert_parbox_newlines($6)/egm; if ($parlength == length($_)) { print "\n*** \\parbox's remain in table!!\n"; @@ -1196,9 +1190,7 @@ sub process_tabular { } $colspec = &translate_environments("$OP$tmp$CP$colspec$OP$tmp$CP"); $colspec = &translate_commands($colspec); - $* = 1; - while ($colspec =~ s/<(\w+)>\s*<\/\1>//g) {}; - $* = 0; + while ($colspec =~ s/<(\w+)>\s*<\/\1>//gm) {}; $colspec = ';SPMnbsp;' if ($colspec =~ /^\s*$/); $colspec = join('', $reopens, $colspec , (@$open_tags_R ? &close_all_tags() : '') @@ -1338,7 +1330,7 @@ sub make_math_comment{ $ecomm = "\n\\end{$env}"; } unless ($env =~/tex2html/); $_ = &revert_to_raw_tex; - $* = 1; s/^\s+//s; s/\s+$//s; $* = 0; + s/^\s+//s; s/\s+$//sm; $_ = $scomm . $_ . $ecomm; return() if (length($_) < 16); $global{'verbatim_counter'}++; @@ -1440,20 +1432,19 @@ sub do_env_equation { local($seqno) = join('',"\n<TD$eqno_class WIDTH=10 ALIGN=\"" , (($EQN_TAGS =~ /L/)? 'LEFT': 'RIGHT') , "\">\n"); - $* = 1; do { # get the equation number $global{'eqn_number'}++; $eqno = &translate_commands('\theequation'); - } unless ((s/(\\nonumber|\\notag)//g)||(/\\tag/)); + } unless ((s/(\\nonumber|\\notag)//gm)||(/\\tag/)); if (/\\tag(\*)?/){ # AmS-TEX line-number tags. if (defined &get_eqn_number ) { ($eqno, $_) = &get_eqn_number(1,$_); } else { - s/\\tag(\*)?//; + s/\\tag(\*)?//m; local($nobrack,$before) = ($1,$`); $_ = $'; - s/next_pair_pr_rx//o; + s/next_pair_pr_rx//om; if ($nobrack) { $eqno = $2; } else { $eqno = join('',$EQNO_START, $2, $EQNO_END) }; $_ = $before; @@ -1461,7 +1452,6 @@ sub do_env_equation { } elsif ($eqno) { $eqno = join('',$EQNO_START, $eqno, $EQNO_END) } else { $eqno = ' ' } # spacer, when no numbering - $* = 0; # include the equation-number, using a <TABLE> local($halign) = " ALIGN=\"CENTER\"" unless $FLUSH_EQN; @@ -1641,7 +1631,7 @@ sub do_env_eqnarray { # if (s/\\lefteqn$OP(\d+)$CP(.*)$OP\1$CP/ $2 /) { if (s/\\lefteqn//) { $return .= "\"LEFT\" COLSPAN=\"3\">"; - $* =1; s/(^\s*|$html_specials{'&'}|\s*$)//g; $*=0; + s/(^\s*|$html_specials{'&'}|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $_ = (($_)? &process_math_in_latex( "indisplay" , '', '', $doimage.$_ ):''); @@ -1666,7 +1656,7 @@ sub do_env_eqnarray { # left column, set using \displaystyle $thismath = shift(@cols); $failed = 0; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); @@ -1686,7 +1676,7 @@ sub do_env_eqnarray { # center column, set using \textstyle $thismath = shift(@cols); $failed = 0; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , 'text', '', $doimage.$thismath ):''); @@ -1706,7 +1696,7 @@ sub do_env_eqnarray { # right column, set using \displaystyle $thismath = shift(@cols); $failed = 0; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); Index: latex2html-2008/versions/html3_2.pl =================================================================== --- latex2html-2008.orig/versions/html3_2.pl +++ latex2html-2008/versions/html3_2.pl @@ -406,9 +406,7 @@ sub translate_colspec { } $celldata .= ' ' if ($celldata =~ /\\\w+$/); - $* = 1; # multiline matching ON - $celldata =~ s/$wrap_parbox_rx/$6/g; - $* = 0; # multiline matching OFF + $celldata =~ s/$wrap_parbox_rx/$6/gm; # $at_text .= $celldata; # if ( $#colspec > -1) { # $colspec[$#colspec] .= join('', "<TD ALIGN=\"LEFT\">",$celldata,'</TD>'); @@ -434,9 +432,7 @@ sub translate_colspec { } $celldata .= ' ' if ($celldata =~ /\\\w+$/); - $* = 1; # multiline matching ON - $celldata =~ s/$wrap_parbox_rx/$6/g; - $* = 0; # multiline matching OFF + $celldata =~ s/$wrap_parbox_rx/$6/gm; $at_text .= $celldata; } elsif ( $char =~ /;|\&/ ) { @@ -596,9 +592,7 @@ sub process_tabular { while (/\\parbox/) { local($parlength) = length($_); - $* = 1; # multiline matching ON - s/$wrap_parbox_rx/&convert_parbox_newlines($6)/eg; - $* = 0; # multiline matching OFF + s/$wrap_parbox_rx/&convert_parbox_newlines($6)/egm; if ($parlength == length($_)) { print "\n*** \\parbox's remain in table!!\n"; @@ -823,9 +817,7 @@ sub process_tabular { } $colspec = &translate_environments("$OP$tmp$CP$colspec$OP$tmp$CP"); $colspec = &translate_commands($colspec); - $* = 1; - while ($colspec =~ s/<(\w+)>\s*<\/\1>//g) {}; - $* = 0; + while ($colspec =~ s/<(\w+)>\s*<\/\1>//gm) {}; $colspec = ';SPMnbsp;' if ($colspec =~ /^\s*$/); $colspec = join('', $reopens, $colspec , (@$open_tags_R ? &close_all_tags() : '') @@ -966,7 +958,7 @@ sub make_math_comment{ $ecomm = "\n\\end{$env}"; } unless ($env =~/tex2html/); $_ = &revert_to_raw_tex; - $* = 1; s/^\s+//s; s/\s+$//s; $* = 0; + s/^\s+//s; s/\s+$//sm; $_ = $scomm . $_ . $ecomm; return() if (length($_) < 16); $global{'verbatim_counter'}++; @@ -1057,20 +1049,19 @@ sub do_env_equation { local($seqno) = join('',"\n<TD$eqno_class WIDTH=10 ALIGN=\"" , (($EQN_TAGS =~ /L/)? 'LEFT': 'RIGHT') , "\">\n"); - $* = 1; do { # get the equation number $global{'eqn_number'}++; $eqno = &translate_commands('\theequation'); - } unless ((s/(\\nonumber|\\notag)//g)||(/\\tag/)); + } unless ((s/(\\nonumber|\\notag)//gm)||(/\\tag/)); if (/\\tag(\*)?/){ # AmS-TEX line-number tags. if (defined &get_eqn_number ) { ($eqno, $_) = &get_eqn_number(1,$_); } else { - s/\\tag(\*)?//; + s/\\tag(\*)?//m; local($nobrack,$before) = ($1,$`); $_ = $'; - s/next_pair_pr_rx//o; + s/next_pair_pr_rx//om; if ($nobrack) { $eqno = $2; } else { $eqno = join('',$EQNO_START, $2, $EQNO_END) }; $_ = $before; @@ -1078,7 +1069,6 @@ sub do_env_equation { } elsif ($eqno) { $eqno = join('',$EQNO_START, $eqno, $EQNO_END) } else { $eqno = ' ' } # spacer, when no numbering - $* = 0; # include the equation-number, using a <TABLE> local($halign) = $math_class unless $FLUSH_EQN; @@ -1255,7 +1245,7 @@ sub do_env_eqnarray { # if (s/\\lefteqn$OP(\d+)$CP(.*)$OP\1$CP/ $2 /) { if (s/\\lefteqn//) { $return .= "\"LEFT\" COLSPAN=\"3\">"; - $* =1; s/(^\s*|$html_specials{'&'}|\s*$)//g; $*=0; + s/(^\s*|$html_specials{'&'}|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $_ = (($_)? &process_math_in_latex( "indisplay" , '', '', $doimage.$_ ):''); @@ -1280,7 +1270,7 @@ sub do_env_eqnarray { # left column, set using \displaystyle $thismath = shift(@cols); $failed = 0; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); @@ -1300,7 +1290,7 @@ sub do_env_eqnarray { # center column, set using \textstyle $thismath = shift(@cols); $failed = 0; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , 'text', '', $doimage.$thismath ):''); @@ -1320,7 +1310,7 @@ sub do_env_eqnarray { # right column, set using \displaystyle $thismath = shift(@cols); $failed = 0; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); Index: latex2html-2008/versions/html4_0.pl =================================================================== --- latex2html-2008.orig/versions/html4_0.pl +++ latex2html-2008/versions/html4_0.pl @@ -745,9 +745,7 @@ sub translate_colspec { } $celldata .= ' ' if ($celldata =~ /\\\w+$/); - $* = 1; # multiline matching ON - $celldata =~ s/$wrap_parbox_rx/$6/g; - $* = 0; # multiline matching OFF + $celldata =~ s/$wrap_parbox_rx/$6/gm; # $at_text .= $celldata; # if ( $#colspec > -1) { # $colspec[$#colspec] .= join('', "<TD ALIGN=\"LEFT\">",$celldata,'</TD>'); @@ -773,9 +771,7 @@ sub translate_colspec { } $celldata .= ' ' if ($celldata =~ /\\\w+$/); - $* = 1; # multiline matching ON - $celldata =~ s/$wrap_parbox_rx/$6/g; - $* = 0; # multiline matching OFF + $celldata =~ s/$wrap_parbox_rx/$6/gm; $at_text .= $celldata; } elsif ( $char =~ /;|\&/ ) { @@ -944,9 +940,7 @@ sub process_tabular { while (/\\parbox/) { local($parlength) = length($_); - $* = 1; # multiline matching ON - s/$wrap_parbox_rx/&convert_parbox_newlines($6)/eg; - $* = 0; # multiline matching OFF + s/$wrap_parbox_rx/&convert_parbox_newlines($6)/egm; if ($parlength == length($_)) { print "\n*** \\parbox's remain in table!!\n"; @@ -1175,9 +1169,7 @@ sub process_tabular { } $colspec = &translate_environments("$OP$tmp$CP$colspec$OP$tmp$CP"); $colspec = &translate_commands($colspec); - $* = 1; - while ($colspec =~ s/<(\w+)>\s*<\/\1>//g) {}; - $* = 0; + while ($colspec =~ s/<(\w+)>\s*<\/\1>//gm) {}; $colspec = ';SPMnbsp;' if ($colspec =~ /^\s*$/); $colspec = join('', $reopens, $colspec , (@$open_tags_R ? &close_all_tags() : '') @@ -1317,7 +1309,7 @@ sub make_math_comment{ $ecomm = "\n\\end{$env}"; } unless ($env =~/tex2html/); $_ = &revert_to_raw_tex; - $* = 1; s/^\s+//s; s/\s+$//s; $* = 0; + s/^\s+//s; s/\s+$//sm; $_ = $scomm . $_ . $ecomm; return() if (length($_) < 16); $global{'verbatim_counter'}++; @@ -1419,20 +1411,19 @@ sub do_env_equation { local($seqno) = join('',"\n<TD$eqno_class WIDTH=10 ALIGN=\"" , (($EQN_TAGS =~ /L/)? 'LEFT': 'RIGHT') , "\">\n"); - $* = 1; do { # get the equation number $global{'eqn_number'}++; $eqno = &translate_commands('\theequation'); - } unless ((s/(\\nonumber|\\notag)//g)||(/\\tag/)); + } unless ((s/(\\nonumber|\\notag)//gm)||(/\\tag/)); if (/\\tag(\*)?/){ # AmS-TEX line-number tags. if (defined &get_eqn_number ) { ($eqno, $_) = &get_eqn_number(1,$_); } else { - s/\\tag(\*)?//; + s/\\tag(\*)?//m; local($nobrack,$before) = ($1,$`); $_ = $'; - s/next_pair_pr_rx//o; + s/next_pair_pr_rx//om; if ($nobrack) { $eqno = $2; } else { $eqno = join('',$EQNO_START, $2, $EQNO_END) }; $_ = $before; @@ -1440,7 +1431,6 @@ sub do_env_equation { } elsif ($eqno) { $eqno = join('',$EQNO_START, $eqno, $EQNO_END) } else { $eqno = ' ' } # spacer, when no numbering - $* = 0; # include the equation-number, using a <TABLE> local($halign) = " ALIGN=\"CENTER\"" unless $FLUSH_EQN; @@ -1620,7 +1610,7 @@ sub do_env_eqnarray { # if (s/\\lefteqn$OP(\d+)$CP(.*)$OP\1$CP/ $2 /) { if (s/\\lefteqn//) { $return .= "\"LEFT\" COLSPAN=\"3\">"; - $* =1; s/(^\s*|$html_specials{'&'}|\s*$)//g; $*=0; + s/(^\s*|$html_specials{'&'}|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $_ = (($_)? &process_math_in_latex( "indisplay" , '', '', $doimage.$_ ):''); @@ -1645,7 +1635,7 @@ sub do_env_eqnarray { # left column, set using \displaystyle $thismath = shift(@cols); $failed = 0; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); @@ -1665,7 +1655,7 @@ sub do_env_eqnarray { # center column, set using \textstyle $thismath = shift(@cols); $failed = 0; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , 'text', '', $doimage.$thismath ):''); @@ -1685,7 +1675,7 @@ sub do_env_eqnarray { # right column, set using \displaystyle $thismath = shift(@cols); $failed = 0; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($NO_SIMPLE_MATH)||($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); Index: latex2html-2008/IndicTeX-HTML/itrans.perl =================================================================== --- latex2html-2008.orig/IndicTeX-HTML/itrans.perl +++ latex2html-2008/IndicTeX-HTML/itrans.perl @@ -406,13 +406,13 @@ sub do_env_pre_itrans { } else { if ($this_par =~ /^\\/) { #catch 'paragraphs' that are just TeX macros - local($savedRS) = $/; $/ = ''; $* = 1; - if ($this_par =~ /^(\s*\\\w+)+$/s ) { + local($savedRS) = $/; $/ = ''; + if ($this_par =~ /^(\s*\\\w+)+$/sm ) { # save them for the next paragraph $saved_par .= $this_par."\n\n"; - $/ = $savedRS; $* = 0; next; + $/ = $savedRS; next; } - $/ = $savedRS; $* = 0; + $/ = $savedRS; } if ($saved_par) { #include any saved macros Index: latex2html-2008/styles/html.perl =================================================================== --- latex2html-2008.orig/styles/html.perl +++ latex2html-2008/styles/html.perl @@ -236,7 +236,7 @@ sub do_cmd_htmladdnormallink{ $url = &missing_braces unless ((s/$next_pair_pr_rx/$url = $2; ''/eo) ||(s/$next_pair_rx/$url = $2; ''/eo)); - $*=1; s/^\s+/\n/; $*=0; + s/^\s+/\n/m; if ($name) { $href = &make_named_href($name,$url,$text) } else { $href = &make_href($url,$text) } print "\nHREF:$href" if ($VERBOSITY > 3); Index: latex2html-2008/styles/more_amsmath.perl =================================================================== --- latex2html-2008.orig/styles/more_amsmath.perl +++ latex2html-2008/styles/more_amsmath.perl @@ -94,7 +94,6 @@ sub get_eqn_number { , $EQNO_END); } } else { $tag = ';SPMnbsp;;SPMnbsp;;SPMnbsp;' } - $*=0; if ($labels) { $labels =~ s/$anchor_mark/$tag/o; ($labels , $scan); @@ -285,7 +284,7 @@ sub process_env_equation { } else { $return .= join('', $mspace , $ecell, $erow); } } else { $thismath = $_; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($doimage)||($failed)) { $thismath = &process_math_in_latex("indisplay",'','' , $doimage.$thismath ) unless ($thismath eq '' ); @@ -430,7 +429,7 @@ sub process_env_multline { # columns to be set using \displaystyle $thismath = $_; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($doimage)||($failed)) { $thismath = &process_math_in_latex("indisplay",'','' , $doimage.$thismath ) unless ($thismath eq '' ); @@ -767,7 +766,7 @@ sub process_env_align{ # alternating right/left aligned $scell = (($scell eq $slcell)? $srcell : $slcell) if ($col_cnt); $thismath = $_; $col_cnt++; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($doimage)||($failed)) { $thismath = &process_math_in_latex("indisplay",'','' , $doimage.$thismath ) unless ($thismath eq '' ); @@ -923,7 +922,7 @@ sub do_env_split { @cols = split(/$mdlim/o); # left column, set using \displaystyle $thismath = shift(@cols); - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($doimage)||($failed)) { $thismath = &process_math_in_latex("indisplay",'','' , $doimage.$thismath ) unless ($thismath eq '' ); @@ -940,7 +939,7 @@ sub do_env_split { # right column, set using \displaystyle $thismath = shift(@cols); - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($doimage)||($failed)) { $thismath = &process_math_in_latex("indisplay",'','' , $doimage.$thismath ) unless ($thismath eq '' ); Index: latex2html-2008/styles/changebar.perl =================================================================== --- latex2html-2008.orig/styles/changebar.perl +++ latex2html-2008/styles/changebar.perl @@ -126,11 +126,11 @@ sub do_env_changebar { $_ = &translate_environments($_); # multiple ends of change-bars have icons on the same line. - $* = 1; local($saveRS) = $/; undef $/; + local($saveRS) = $/; undef $/; s/(($endstr[^<]*<\/$cbstyle>)\s*<BR>(<<\d+>>($cbversion_rx)?)?\s*$)/ - if ($`) {$1} else { $endcb = 0; $2.$3 }/eg; - s/($cbend_rx\s*$)/ if ($`) { $1 } else { $endcb = 0; $2.$4 }/eg; - $* = 0; $/ = $saveRS; + if ($`) {$1} else { $endcb = 0; $2.$3 }/egm; + s/($cbend_rx\s*$)/ if ($`) { $1 } else { $endcb = 0; $2.$4 }/egm; + $/ = $saveRS; if ($this_version) { Index: latex2html-2008/styles/alltt.perl =================================================================== --- latex2html-2008.orig/styles/alltt.perl +++ latex2html-2008/styles/alltt.perl @@ -50,15 +50,15 @@ sub preprocess_alltt { local ($before, $after, $alltt, $alltt_env); local ($alltt_begin) = "<alltt_begin>"; local ($alltt_end) = "<alltt_end>"; - local($saveRS) = $/; $*=1;undef $/; + local($saveRS) = $/; undef $/; while (/\\begin\s*{($alltt_rx)}([ \t]*\n)?/m) { $alltt_env = $1; $alltt = ""; ($before, $after) = ($`, $'); - if ($after =~ /\\end\s*{($alltt_rx)}/s) { + if ($after =~ /\\end\s*{($alltt_rx)}/sm) { ($alltt, $after) = ($`, $'); local(@check) = split("\n",$before); - local($lastline) = pop @check unless ($before =~ s/\n$//s); + local($lastline) = pop @check unless ($before =~ s/\n$//sm); $alltt = &alltt_helper($alltt) # shield special chars unless ($lastline =~ /(^|[^\\])(\\\\)*%.*$/m); # unless commented out undef @check; undef $lastline; @@ -67,8 +67,8 @@ sub preprocess_alltt { , $alltt, $alltt_end, "{$alltt_env}", $after); } $/ = $saveRS; - s/$alltt_begin\{([^\}]*)\}/\\begin{$1}/gos; - s/$alltt_end\{([^\}]*)\}/\\end{$1}/gos; + s/$alltt_begin\{([^\}]*)\}/\\begin{$1}/gosm; + s/$alltt_end\{([^\}]*)\}/\\end{$1}/gosm; } sub alltt_helper { Index: latex2html-2008/styles/amstex.perl =================================================================== --- latex2html-2008.orig/styles/amstex.perl +++ latex2html-2008/styles/amstex.perl @@ -404,7 +404,6 @@ sub get_eqn_number { , $EQNO_END); } } else { $tag = ';SPMnbsp;' } - $*=0; if ($labels) { $labels =~ s/$anchor_mark/$tag/o; ($labels , $scan); Index: latex2html-2008/styles/makeidx.perl =================================================================== --- latex2html-2008.orig/styles/makeidx.perl +++ latex2html-2008/styles/makeidx.perl @@ -189,7 +189,7 @@ sub named_index_entry { # ! -> \001 # @ -> \002 # | -> \003 - $* = 1; $str =~ s/\n\s*/ /g; $* = 0; # remove any newlines + $str =~ s/\n\s*/ /gm; # remove any newlines # protect \001 occurring with images $str =~ s/\001/\016/g; Index: latex2html-2008/styles/webtex.perl =================================================================== --- latex2html-2008.orig/styles/webtex.perl +++ latex2html-2008/styles/webtex.perl @@ -121,29 +121,29 @@ sub convert_to_webtex { if($WEBEQ_IMG_ONLY) { return (1,$no_applet) }; local($savedRS, $failed, $env_id, $_) = ($/,'','',$orig); - $/=''; $* = 1; + $/=''; if ($mode =~ /inline/) { if (/^\s*\\\(/) { $failed = 1 } else { $_ = &revert_to_raw_tex($_); - $_ =~ s/^\s*\$?/\$/s; - $_ =~ s/\$?$/\$/s; + $_ =~ s/^\s*\$?/\$/sm; + $_ =~ s/\$?$/\$/sm; $env_id .= $WEBEQ_INL if $USING_STYLES; } } elsif ($mode =~ /display/) { if (/^\s*\$\$/) { $failed = 1 } else { $_ = &revert_to_raw_tex($_); - $_ =~ s/^\s*(\\\[|\$\$)?/\\\[/s; - $_ =~ s/(\$\$|\\\])?\s*$/\\\]/s; + $_ =~ s/^\s*(\\\[|\$\$)?/\\\[/sm; + $_ =~ s/(\$\$|\\\])?\s*$/\\\]/sm; $env_id .= $WEBEQ_DIS if $USING_STYLES; } } else { print " *** Unknown WebTeX mode, no applet ***"; - $/ = $savedRS; $* = 0; + $/ = $savedRS; return (0,$no_applet) } - $/ = $savedRS; $* = 0; + $/ = $savedRS; return (0,$no_applet) if $failed; ($failed,$_) = &check_only_webtex($_); @@ -325,7 +325,7 @@ sub cleanup_mml_attribs { local($mml_code) = join('',<MML>); close MML; - local($savedRS) = $/; $*=0; $/=''; + local($savedRS) = $/; $/=''; $mml_code =~ s/^\s*<P><CENTER>\n?//s; $mml_code =~ s/\s*<applet code="[^"]*" width=(\d+) height=(\d+) align=(\w+)>\s*/ $width=$1;$height=$2;$align=$3;''/e; Index: latex2html-2008/styles/amsmath.perl =================================================================== --- latex2html-2008.orig/styles/amsmath.perl +++ latex2html-2008/styles/amsmath.perl @@ -458,7 +458,6 @@ sub get_eqn_number { , $EQNO_END); } } else { $tag = ';SPMnbsp;' } - $*=0; if ($labels) { $labels =~ s/$anchor_mark/$tag/o; ($labels , $scan); Index: latex2html-2008/versions/math.pl =================================================================== --- latex2html-2008.orig/versions/math.pl +++ latex2html-2008/versions/math.pl @@ -87,7 +87,7 @@ sub do_env_tex2html_wrap { local($attribs, $border); if (s/$htmlborder_rx//o) { $attribs = $2; $border = (($4)? "$4" : 1) } elsif (s/$htmlborder_pr_rx//o) { $attribs = $2; $border = (($4)? "$4" : 1) } - $* = 1; s/^\s*|\s*$//g; $*=0; + s/^\s*|\s*$//gm; local($saved) = $_; # if (s/^\\\(|^\$|^\\math|\\\)$|\$$|\\endmath//g) {} if (s/^$math_start_rx|${math_end_rx}$//g) {} @@ -174,23 +174,21 @@ sub do_env_equation { local($seqno) = join('',"\n<TD$eqno_class WIDTH=10 ALIGN=\"" , (($EQN_TAGS =~ /L/)? 'LEFT': 'RIGHT') , "\">\n"); - $* = 1; do { # include the equation number, using a <TABLE> $global{'eqn_number'}++; $eqno = join('', $EQNO_START , &simplify(&translate_commands('\theequation')) , $EQNO_END); - } unless ((s/(\\nonumber|\\notag)//g)||(/\\tag/)); - if (s/\\tag(\*)?//){ + } unless ((s/(\\nonumber|\\notag)//gm)||(/\\tag/)); + if (s/\\tag(\*)?//m){ # AmS-TEX line-number tags. local($nobrack,$before) = ($1,$`); $_ = $'; - s/next_pair_pr_rx//o; + s/next_pair_pr_rx//om; if ($nobrack) { $eqno = $2 } else { $eqno = join('',$EQNO_START, $2, $EQNO_END ) } $_ = $before; } - $* = 0; local($halign) = " ALIGN=\"CENTER\"" unless $FLUSH_EQN; if ($EQN_TAGS =~ /L/) { @@ -398,9 +396,9 @@ sub make_math { # remove white space at the extremities # do{ $*=1; s/(^\s+|\s+$)//; $*=0; } unless ($NO_SIMPLE_MATH); - $*=1; s/^\s//o;s/\s$//; $*=0; + s/^\s//o;s/\s$//m; # but not if there is a comment to finish: - $*=1; s/($comment_mark\s*\d+)$/$&\n/; $*=0; + s/($comment_mark\s*\d+)$/$&\n/m; $_; } @@ -1029,7 +1027,7 @@ sub do_env_eqnarray { if (s/\\lefteqn//) { $return .= "\"LEFT\" COLSPAN=\"3\">"; - $* =1; s/(^\s*|$html_specials{'&'}|\s*$)//g; $*=0; + s/(^\s*|$html_specials{'&'}|\s*$)//gm; if (($doimage)||($failed)) { $_ = (($_)? &process_math_in_latex( "indisplay" , '', '', $doimage.$_ ):''); @@ -1048,7 +1046,7 @@ sub do_env_eqnarray { # left column, set using \displaystyle $thismath = shift(@cols); - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); @@ -1064,7 +1062,7 @@ sub do_env_eqnarray { # center column, set using \textstyle $thismath = shift(@cols); if (!($#cols < 0)) { - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , 'text', '', $doimage.$thismath ):''); @@ -1084,7 +1082,7 @@ sub do_env_eqnarray { &write_warnings($eqnarray_warning); print "\n\n *** $eqnarray_warning \n"; } - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); @@ -1447,7 +1445,7 @@ sub translate_math_commands { } ($pre_text,$labels) = &extract_labels($pre_text); - local($savedRS) = $/; $/ = ''; $* = 1; + local($savedRS) = $/; $/ = ''; # if ($pre_text =~ m/^((.|\n)*)\\begin\s*(($O|$OP)\d+($C|$CP))$ams_aligned_envs_rx\3/m) { if ($pre_text =~ m/^()\\begin\s*(($O|$OP)\d+($C|$CP))$ams_aligned_envs_rx\3/m) { local($env,$star,$orig,$cnt) = ($7,$8,$pre_text.$_,1); @@ -1456,7 +1454,7 @@ sub translate_math_commands { # local($savedRS) = $/; $/ = ''; $*=1; while ( $cnt && $found ) { $found = ''; - if ($post_pre_text =~ /\\(begin|end)(($O|$OP)\d+($C|$CP))$env$star\2/s) + if ($post_pre_text =~ /\\(begin|end)(($O|$OP)\d+($C|$CP))$env$star\2/sm) { $pre_text .= $`; $found = $1; $this_env = $&; $post_pre_text = $'; } if ($found =~ /begin/) { @@ -1465,7 +1463,7 @@ sub translate_math_commands { $cnt--; $pre_text .= $this_env if ($cnt > 0) ; } } - $* = 0; $/ = $savedRS; + $/ = $savedRS; $env .= 'star' if $star; local($env_cmd) = 'do_env_'.$env; # parse it further, when possible... @@ -1504,7 +1502,7 @@ sub translate_math_commands { $pre_text = &process_math_in_latex($mode,$style,$slevel,$pre_text) if ($pre_text); } - $* = 0; $/ = $savedRS; + $/ = $savedRS; return($labels . $pre_text) unless ($_); print "\nMore math:\n$_" if ($VERBOSITY > 4); @@ -1572,7 +1570,7 @@ sub make_math_comment{ $ecomm = "\n\\end{$env}"; } unless ($env =~/tex2html/); $_ = &revert_to_raw_tex; - $* = 1; s/^\s+//; s/\s+$//; $* = 0; + s/^\s+//; s/\s+$//m; $_ = $scomm . $_ . $ecomm; return() if (length($_) < 12); $global{'verbatim_counter'}++; @@ -1715,20 +1713,18 @@ sub parse_math_toks { local ($saved) = $_; $_ = $'; # find the \end, including nested environments of same type. - $* = 1; local($cnt, $thisbit, $which) = (1,'',''); - while ( /\\(begin|end)(<#\d+#>)($env|$array_env_rx)(\*|star)?\2/s ) { + while ( /\\(begin|end)(<#\d+#>)($env|$array_env_rx)(\*|star)?\2/sm ) { $thisbit = $` . $&; $_ = $'; $which = $1; do { # mark rows/columns in nested arrays - $thisbit =~ s/;SPMamp;/$array_col_mark/g; - $thisbit =~ s/\\(\\|cr(cr)?(\b|$|\d|\W))/$array_row_mark$3/g; + $thisbit =~ s/;SPMamp;/$array_col_mark/gm; + $thisbit =~ s/\\(\\|cr(cr)?(\b|$|\d|\W))/$array_row_mark$3/gm; } if ($cnt > 1); $this .= $thisbit; if ($which =~ /begin/) {$cnt++} else {$cnt--}; last if (!$cnt); } - $* = 0; # $this =~ s/\\cr(cr)?(\b|$|\d|\\|\W)/\\\\$2/g; local($env_cmd) = "do_env_$env".(($star)? "star" : ''); @@ -1746,11 +1742,9 @@ sub parse_math_toks { $this .= $extra; $this = &process_math_in_latex($mode,$style,$slevel,$this); } else { - $*=1; - $star =~ s/\*/\\\*/o if ($star); - $this =~ s/^\\begin(<#\d+#>)$env$star\1//s; - $this =~ s/\\end(<#\d+#>)$env$star\1\s*$//s; - $*=0; + $star =~ s/\*/\\\*/om if ($star); + $this =~ s/^\\begin(<#\d+#>)$env$star\1//sm; + $this =~ s/\\end(<#\d+#>)$env$star\1\s*$//sm; do { local($in_array) = 1; local($_) = $this; @@ -2498,9 +2492,7 @@ sub get_supsub { } elsif ($5) { $supsub .= $1; $which .= (($5 =~ /b/) ? '_' : '^'); local($multisub_type) = $5; - $* = 1; - s/\\end(($O|$OP)\d+($C|$CP))$multisub_type\1/$supsub .= $`.$&;''/e; - $* = 0; + s/\\end(($O|$OP)\d+($C|$CP))$multisub_type\1/$supsub .= $`.$&;''/em; } else { $supsub .= "\{^\\prime\}" } } # include dummy sup/sub-scripts to enhance the vertical spacing Index: latex2html-2008/versions/html3_1.pl =================================================================== --- latex2html-2008.orig/versions/html3_1.pl +++ latex2html-2008/versions/html3_1.pl @@ -78,7 +78,7 @@ sub do_env_tex2html_wrap { local($attribs, $border); if (s/$htmlborder_rx//o) { $attribs = $2; $border = (($4)? "$4" : 1) } elsif (s/$htmlborder_pr_rx//o) { $attribs = $2; $border = (($4)? "$4" : 1) } - $* = 1; s/^\s*|\s*$//g; $*=0; + s/^\s*|\s*$//gm; local($saved) = $_; # if (s/^\\\(|^\$|^\\math|\\\)$|\$$|\\endmath//g) {} if (s/^$math_start_rx|${math_end_rx}$//g) {} @@ -161,23 +161,21 @@ sub do_env_equation { local($seqno) = join('',"\n<TD$eqno_class WIDTH=10 ALIGN=\"" , (($EQN_TAGS =~ /L/)? 'LEFT': 'RIGHT') , "\">\n"); - $* = 1; do { # include the equation number, using a <TABLE> $global{'eqn_number'}++; $eqno = join('', $EQNO_START , &simplify(&translate_commands('\theequation')) , $EQNO_END); - } unless ((s/(\\nonumber|\\notag)//g)||(/\\tag/)); - if (s/\\tag(\*)?//){ + } unless ((s/(\\nonumber|\\notag)//gm)||(/\\tag/)); + if (s/\\tag(\*)?//m){ # AmS-TEX line-number tags. local($nobrack,$before) = ($1,$`); $_ = $'; - s/next_pair_pr_rx//o; + s/next_pair_pr_rx//om; if ($nobrack) { $eqno = $2 } else { $eqno = join('',$EQNO_START, $2, $EQNO_END ) } $_ = $before; } - $* = 0; local($halign) = " ALIGN=\"CENTER\"" unless $FLUSH_EQN; if ($EQN_TAGS =~ /L/) { @@ -353,7 +351,7 @@ sub make_math { # remove white space at the extremities # do{ $*=1; s/(^\s+|\s+$)//; $*=0; } unless ($NO_SIMPLE_MATH); - $*=1; s/^\s//o;s/\s$//; $*=0; + s/^\s//o;s/\s$//m; $_; } @@ -970,7 +968,7 @@ sub do_env_eqnarray { if (s/\\lefteqn//) { $return .= "\"LEFT\" COLSPAN=\"3\">"; - $* =1; s/(^\s*|$html_specials{'&'}|\s*$)//g; $*=0; + s/(^\s*|$html_specials{'&'}|\s*$)//gm; if (($doimage)||($failed)) { $_ = (($_)? &process_math_in_latex( "indisplay" , '', '', $doimage.$_ ):''); @@ -989,7 +987,7 @@ sub do_env_eqnarray { # left column, set using \displaystyle $thismath = shift(@cols); - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); @@ -1006,7 +1004,7 @@ sub do_env_eqnarray { $thismath = shift(@cols); if (!($#cols < 0)) { #print "\nEQNARRAY:$#cols : $thismath"; - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , 'text', '', $doimage.$thismath ):''); @@ -1026,7 +1024,7 @@ sub do_env_eqnarray { &write_warnings($eqnarray_warning); print "\n\n *** $eqnarray_warning \n"; } - $* =1; $thismath =~ s/(^\s*|\s*$)//g; $*=0; + $thismath =~ s/(^\s*|\s*$)//gm; if (($doimage)||($failed)) { $thismath = (($thismath ne '')? &process_math_in_latex( "indisplay" , '', '', $doimage.$thismath ):''); @@ -1385,7 +1383,7 @@ sub translate_math_commands { } ($pre_text,$labels) = &extract_labels($pre_text); - local($savedRS) = $/; $/ = ''; $* = 1; + local($savedRS) = $/; $/ = ''; # if ($pre_text =~ m/^((.|\n)*)\\begin\s*(($O|$OP)\d+($C|$CP))$ams_aligned_envs_rx\3/m) { if ($pre_text =~ m/^()\\begin\s*(($O|$OP)\d+($C|$CP))$ams_aligned_envs_rx\3/m) { local($env,$star,$orig,$cnt) = ($7,$8,$pre_text.$_,1); @@ -1394,7 +1392,7 @@ sub translate_math_commands { # local($savedRS) = $/; $/ = ''; $*=1; while ( $cnt && $found ) { $found = ''; - if ($post_pre_text =~ /\\(begin|end)(($O|$OP)\d+($C|$CP))$env$star\2/s) + if ($post_pre_text =~ /\\(begin|end)(($O|$OP)\d+($C|$CP))$env$star\2/sm) { $pre_text .= $`; $found = $1; $this_env = $&; $post_pre_text = $'; } if ($found =~ /begin/) { @@ -1403,7 +1401,7 @@ sub translate_math_commands { $cnt--; $pre_text .= $this_env if ($cnt > 0) ; } } - $* = 0; $/ = $savedRS; + $/ = $savedRS; $env .= 'star' if $star; local($env_cmd) = 'do_env_'.$env; # parse it further, when possible... @@ -1430,7 +1428,7 @@ sub translate_math_commands { $pre_text = &process_math_in_latex($mode,$style,$slevel,$pre_text) if ($pre_text); } - $* = 0; $/ = $savedRS; + $/ = $savedRS; return($labels . $pre_text) unless ($_); local($post_text, $this_text, $which_text); @@ -1494,7 +1492,7 @@ sub make_math_comment{ $ecomm = "\n\\end{$env}"; } unless ($env =~/tex2html/); $_ = &revert_to_raw_tex; - $* = 1; s/^\s+//; s/\s+$//; $* = 0; + s/^\s+//; s/\s+$//m; $_ = $scomm . $_ . $ecomm; return() if (length($_) < 12); $global{'verbatim_counter'}++; @@ -1637,20 +1635,18 @@ sub parse_math_toks { local ($saved) = $_; $_ = $'; # find the \end, including nested environments of same type. - $* = 1; local($cnt, $thisbit, $which) = (1,'',''); - while ( /\\(begin|end)(<#\d+#>)($env|$array_env_rx)(\*|star)?\2/s ) { + while ( /\\(begin|end)(<#\d+#>)($env|$array_env_rx)(\*|star)?\2/sm ) { $thisbit = $` . $&; $_ = $'; $which = $1; do { # mark rows/columns in nested arrays - $thisbit =~ s/;SPMamp;/$array_col_mark/g; - $thisbit =~ s/\\(\\|cr(cr)?(\b|$|\d|\W))/$array_row_mark$3/g; + $thisbit =~ s/;SPMamp;/$array_col_mark/gm; + $thisbit =~ s/\\(\\|cr(cr)?(\b|$|\d|\W))/$array_row_mark$3/gm; } if ($cnt > 1); $this .= $thisbit; if ($which =~ /begin/) {$cnt++} else {$cnt--}; last if (!$cnt); } - $* = 0; # $this =~ s/\\cr(cr)?(\b|$|\d|\\|\W)/\\\\$2/g; local($env_cmd) = "do_env_$env".(($star)? "star" : ''); @@ -1668,11 +1664,9 @@ sub parse_math_toks { $this .= $extra; $this = &process_math_in_latex($mode,$style,$slevel,$this); } else { - $*=1; - $star =~ s/\*/\\\*/o if ($star); - $this =~ s/^\\begin(<#\d+#>)$env$star\1//; - $this =~ s/\\end(<#\d+#>)$env$star\1\s*$//; - $*=0; + $star =~ s/\*/\\\*/om if ($star); + $this =~ s/^\\begin(<#\d+#>)$env$star\1//m; + $this =~ s/\\end(<#\d+#>)$env$star\1\s*$//m; do { local($in_array) = 1; local($_) = $this; @@ -2376,9 +2370,7 @@ sub get_supsub { } elsif ($5) { $supsub .= $1; $which .= (($5 =~ /b/) ? '_' : '^'); local($multisub_type) = $5; - $* = 1; - s/\\end(($O|$OP)\d+($C|$CP))$multisub_type\1/$supsub .= $`.$&;''/e; - $* = 0; + s/\\end(($O|$OP)\d+($C|$CP))$multisub_type\1/$supsub .= $`.$&;''/em; } else { $supsub .= "\{^\\prime\}" } } # include dummy sup/sub-scripts to enhance the vertical spacing Index: latex2html-2008/cweb2html/makemake.pl =================================================================== --- latex2html-2008.orig/cweb2html/makemake.pl +++ latex2html-2008/cweb2html/makemake.pl @@ -37,12 +37,11 @@ sub main { $_ = delete $string{'STRING'}; # Blow it away and return the result close IN; - $*=1; #multiline matching on &rip("no $FILES macro found in $source") - unless /^[ \t]*$FILES[ \t]*=((.*\\\n)*.*)/; + unless /^[ \t]*$FILES[ \t]*=((.*\\\n)*.*)/m; $files = $1; - $files =~ s/\#.*\n?//g; - @files = split(/[ \t]*\\\n[ \t]*|[ \t]+/,$files); + $files =~ s/\#.*\n?//gm; + @files = split(/[ \t]*\\\n[ \t]*|[ \t]+/m,$files); shift(@files) unless $files[0]; &rip("no files found in $FILES macro") @@ -51,22 +50,22 @@ sub main { # get template (one allowed currently) &rip("no template found in $source") - unless /^[ \t]*$BEGIN.*\n([\s\S]*)\n[ \t]*$END/; + unless /^[ \t]*$BEGIN.*\n([\s\S]*)\n[ \t]*$END/m; $template = $1; # take out comments - $template =~ s/^[ \t]*#.*\n//g; + $template =~ s/^[ \t]*#.*\n//gm; # reduce contents to static part and output it - s/^[ \t]*$DONOTEDIT[\s\S]*/$DONOTEDIT\n/o; + s/^[ \t]*$DONOTEDIT[\s\S]*/$DONOTEDIT\n/om; print OUT; foreach $file (@files) { next unless $file; - if ($file =~ /[\s\\\#]/) { + if ($file =~ /[\s\\\#]/m) { print "rejecting file <$file>"; } else { $_ = $template; - s/\b$pattern\b/$file/g; + s/\b$pattern\b/$file/gm; print OUT $_,"\n\n"; } } Index: latex2html-2008/foilhtml/foilhtml.dtx =================================================================== --- latex2html-2008.orig/foilhtml/foilhtml.dtx +++ latex2html-2008/foilhtml/foilhtml.dtx @@ -695,9 +695,7 @@ sub make_latex{ $preamble = "\\documentclass\{article\}%\n\\usepackage{html,color}%\n\\makeatletter" unless ($preamble); if (($LATEX_DUMP)&&(!($preamble =~ /\\usepackage\{ldump\}/))) { - $*=1; - $preamble =~ s/(\\document(class|style)[^\n]*\n)/$1\\usepackage\{ldump\}\n/; - $*=0; + $preamble =~ s/(\\document(class|style)[^\n]*\n)/$1\\usepackage\{ldump\}\n/m; } $LOAD_LATEX_COLOR = "\\usepackage[dvips]{color}" unless $LOAD_LATEX_COLOR; $LATEX_COLOR = "\\pagecolor[gray]{.85}" unless $LATEX_COLOR;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor