version 1.46, 2005/02/24 05:26:00
|
version 1.48, 2005/02/24 05:40:08
|
Line 237 sub algebra {
|
Line 237 sub algebra {
|
sub prepare_algebra { |
sub prepare_algebra { |
my ($string)=@_; |
my ($string)=@_; |
|
|
#protect the confusable greek symbols |
# change some multi character operators into single character operators |
|
$string =~ s/<>/\#/g; |
|
$string =~ s/<\=/\%/g; |
|
$string =~ s/>\=/\!/g; |
|
|
|
# makes the decision about what is a minus sign easier |
|
$string =~ s/([\=\>\<\%\!\#] *)-/$1 zeroplace -/g; |
|
|
|
# protect the confusable greek symbols |
$string =~ s/delta/zdelta/g; |
$string =~ s/delta/zdelta/g; |
$string =~ s/beta/bita/g; |
$string =~ s/beta/bita/g; |
$string =~ s/theta/thita/g; |
$string =~ s/theta/thita/g; |
Line 251 sub prepare_algebra {
|
Line 259 sub prepare_algebra {
|
|
|
sub postprocess_algebra { |
sub postprocess_algebra { |
my ($string)=@_; |
my ($string)=@_; |
|
|
|
# remove the chunk used to sepearate out the minus signs |
|
$string =~ s/zeroplace//g; |
|
|
|
# exapnd out some operators |
|
$string =~ s/\#/\\not= /g; |
|
$string =~ s/\%/\\leq /g; |
|
$string =~ s/\!/\\geq /g; |
|
|
# replace some special symbols with the LaTeX equivalents |
# replace some special symbols with the LaTeX equivalents |
$string =~ s/infty/\\infty/g; |
$string =~ s/infty/\\infty/g; |