=================================================================== RCS file: /home/cvs/OpenXM_contrib/pari-2.2/misc/Attic/tex2mail,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -r1.1 -r1.2 --- OpenXM_contrib/pari-2.2/misc/Attic/tex2mail 2001/10/02 11:17:00 1.1 +++ OpenXM_contrib/pari-2.2/misc/Attic/tex2mail 2002/09/11 07:26:46 1.2 @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Id: tex2mail,v 1.1 2001/10/02 11:17:00 noro Exp $ +# $Id: tex2mail,v 1.2 2002/09/11 07:26:46 noro Exp $ # # Features: # % at the end of a line followed by \n\n is recognized as end of @@ -737,12 +737,13 @@ sub center { local($h1,$l1,$b1,$sp1,$str1)=split(/,/,$_[0],5); $h1 || $h1++; if (($left=$len-$l1)<=0) {return $_[0];} - $left=int($left/2); + local($LHS,$RHS); + $LHS = int($left/2); $RHS = $left - $LHS; local($out,$first)=("",1); for (split(/\n/,$str1,$h1)) { if ($first) {$first=0;} else {$out .= "\n";} - $out .= " " x $left . $_; + $out .= " " x $LHS. $_ . " " x $RHS; } return "$h1,$len,$b1,0,$out"; }