-1) {
- # $colspec[$#colspec] .= join('', "",$celldata,' | ');
-@@ -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\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
- 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('', "",$celldata,' | ');
-@@ -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\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
- 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('', "",$celldata,' | ');
-@@ -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\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
- 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('', "",$celldata,' | ');
-@@ -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\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
- 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* (<<\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) = "";
- local ($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('',);
- close MML;
-
-- local($savedRS) = $/; $*=0; $/='';
-+ local($savedRS) = $/; $/='';
- $mml_code =~ s/^\s*\n?//s;
- $mml_code =~ s/\s* | | | |