Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:GA
latex2html
latex2html-2012-match-multiline.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File latex2html-2012-match-multiline.diff 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> Refreshed for latex2html 2012 Index: latex2html.pin =================================================================== --- latex2html.pin.orig 2013-11-25 13:09:05.115061067 +0100 +++ latex2html.pin 2013-11-25 13:09:26.719320051 +0100 @@ -11473,7 +11473,7 @@ $label = &translate_environments( "$O$br_id$C$label$O$br_id$C"); join('',"\\item\[" , $label, "\]$aft" ); - }/eg; + }/egm; } #$* = 0; # Multiline matching OFF Index: styles/natbib.perl =================================================================== --- styles/natbib.perl.orig 2002-11-29 12:49:18.000000000 +0100 +++ styles/natbib.perl 2013-11-25 13:09:05.116061079 +0100 @@ -1385,12 +1385,10 @@ $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: styles/color.perl =================================================================== --- styles/color.perl.orig 2013-11-25 13:09:05.077060611 +0100 +++ styles/color.perl 2013-11-25 13:09:05.116061079 +0100 @@ -145,7 +145,6 @@ 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 @@ 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 @@ } } } - $* = $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 @@ 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 @@ } } } - $* = $prev; # Restore Multiline matching $_[0]; } Index: styles/htmllist.perl =================================================================== --- styles/htmllist.perl.orig 2002-11-29 12:49:18.000000000 +0100 +++ styles/htmllist.perl 2013-11-25 13:09:05.116061079 +0100 @@ -96,7 +96,6 @@ 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 @@ $_ = $&.$'; 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 @@ $_=$'; } } - $* = 0; $_ = join('',@items_done, $_); undef @items_done; #RRM: cannot have anything before the first <LI> @@ -148,7 +146,7 @@ $preitems =~ s/<P( [^>]*)?>//g; $preitems = "\n".$preitems if $preitems; } - $/ = $savedRS; $* = 0; # Multiline matching OFF + $/ = $savedRS; $_ = '<DT>'.$_ unless (/^\s*<D(D|T)/); print "]"; Index: versions/html4_1.pl =================================================================== --- versions/html4_1.pl.orig 2004-01-01 07:15:01.000000000 +0100 +++ versions/html4_1.pl 2013-11-25 13:09:05.117061091 +0100 @@ -766,9 +766,7 @@ } $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 @@ } $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 @@ 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 @@ } $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 @@ $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 @@ 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 @@ } 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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: versions/html4_01.pl =================================================================== --- versions/html4_01.pl.orig 2004-01-01 07:15:01.000000000 +0100 +++ versions/html4_01.pl 2013-11-25 13:09:05.117061091 +0100 @@ -766,9 +766,7 @@ } $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 @@ } $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 @@ 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 @@ } $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 @@ $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 @@ 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 @@ } 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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: versions/html3_2.pl =================================================================== --- versions/html3_2.pl.orig 2002-11-29 12:49:19.000000000 +0100 +++ versions/html3_2.pl 2013-11-25 13:09:05.117061091 +0100 @@ -406,9 +406,7 @@ } $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 @@ } $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 @@ 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 @@ } $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 @@ $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 @@ 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 @@ } 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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: versions/html4_0.pl =================================================================== --- versions/html4_0.pl.orig 2004-01-01 07:15:00.000000000 +0100 +++ versions/html4_0.pl 2013-11-25 13:09:05.117061091 +0100 @@ -745,9 +745,7 @@ } $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 @@ } $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 @@ 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 @@ } $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 @@ $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 @@ 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 @@ } 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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: IndicTeX-HTML/itrans.perl =================================================================== --- IndicTeX-HTML/itrans.perl.orig 2013-11-25 13:09:05.071060540 +0100 +++ IndicTeX-HTML/itrans.perl 2013-11-25 13:09:05.117061091 +0100 @@ -406,13 +406,13 @@ } 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: styles/html.perl =================================================================== --- styles/html.perl.orig 2013-11-25 13:09:05.078060623 +0100 +++ styles/html.perl 2013-11-25 13:09:05.118061103 +0100 @@ -236,7 +236,7 @@ $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: styles/more_amsmath.perl =================================================================== --- styles/more_amsmath.perl.orig 2002-11-29 12:49:18.000000000 +0100 +++ styles/more_amsmath.perl 2013-11-25 13:09:05.118061103 +0100 @@ -94,7 +94,6 @@ , $EQNO_END); } } else { $tag = ';SPMnbsp;;SPMnbsp;;SPMnbsp;' } - $*=0; if ($labels) { $labels =~ s/$anchor_mark/$tag/o; ($labels , $scan); @@ -285,7 +284,7 @@ } 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 @@ # 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 @@ # 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 @@ @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 @@ # 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: styles/changebar.perl =================================================================== --- styles/changebar.perl.orig 2002-11-29 12:49:17.000000000 +0100 +++ styles/changebar.perl 2013-11-25 13:09:05.118061103 +0100 @@ -126,11 +126,11 @@ $_ = &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: styles/alltt.perl =================================================================== --- styles/alltt.perl.orig 2002-11-29 12:49:17.000000000 +0100 +++ styles/alltt.perl 2013-11-25 13:09:05.118061103 +0100 @@ -50,15 +50,15 @@ 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 @@ , $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: styles/amstex.perl =================================================================== --- styles/amstex.perl.orig 2002-11-29 12:49:17.000000000 +0100 +++ styles/amstex.perl 2013-11-25 13:09:05.118061103 +0100 @@ -404,7 +404,6 @@ , $EQNO_END); } } else { $tag = ';SPMnbsp;' } - $*=0; if ($labels) { $labels =~ s/$anchor_mark/$tag/o; ($labels , $scan); Index: styles/makeidx.perl =================================================================== --- styles/makeidx.perl.orig 2002-11-29 12:49:18.000000000 +0100 +++ styles/makeidx.perl 2013-11-25 13:09:05.118061103 +0100 @@ -189,7 +189,7 @@ # ! -> \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: styles/webtex.perl =================================================================== --- styles/webtex.perl.orig 2013-11-25 13:09:05.078060623 +0100 +++ styles/webtex.perl 2013-11-25 13:09:05.118061103 +0100 @@ -121,29 +121,29 @@ 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 @@ 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: styles/amsmath.perl =================================================================== --- styles/amsmath.perl.orig 2004-01-01 07:15:00.000000000 +0100 +++ styles/amsmath.perl 2013-11-25 13:09:05.118061103 +0100 @@ -458,7 +458,6 @@ , $EQNO_END); } } else { $tag = ';SPMnbsp;' } - $*=0; if ($labels) { $labels =~ s/$anchor_mark/$tag/o; ($labels , $scan); Index: versions/math.pl =================================================================== --- versions/math.pl.orig 2004-01-01 07:15:01.000000000 +0100 +++ versions/math.pl 2013-11-25 13:09:05.119061115 +0100 @@ -87,7 +87,7 @@ 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 @@ 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 @@ # 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 @@ 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 @@ # 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 @@ # 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 @@ &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 @@ } ($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 @@ # 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 @@ $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 @@ $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 @@ $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 @@ 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 @@ $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 @@ } 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: versions/html3_1.pl =================================================================== --- versions/html3_1.pl.orig 2002-11-29 12:49:19.000000000 +0100 +++ versions/html3_1.pl 2013-11-25 13:09:05.119061115 +0100 @@ -78,7 +78,7 @@ 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 @@ 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 @@ # 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 @@ 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 @@ # 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 @@ $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 @@ &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 @@ } ($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 @@ # 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 @@ $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 @@ $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 @@ $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 @@ 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 @@ $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 @@ } 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: cweb2html/makemake.pl =================================================================== --- cweb2html/makemake.pl.orig 2013-11-25 13:09:05.098060863 +0100 +++ cweb2html/makemake.pl 2013-11-25 13:09:05.119061115 +0100 @@ -37,12 +37,11 @@ $_ = 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 @@ # 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: foilhtml/foilhtml.dtx =================================================================== --- foilhtml/foilhtml.dtx.orig 2002-11-29 12:49:12.000000000 +0100 +++ foilhtml/foilhtml.dtx 2013-11-25 13:09:05.119061115 +0100 @@ -695,9 +695,7 @@ $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