version 1.5, 2005/02/24 08:27:17
|
version 1.7, 2005/02/24 08:32:11
|
Line 43 my $binoper1 = '[-+=><%!#]';
|
Line 43 my $binoper1 = '[-+=><%!#]';
|
my $openparen = '[{(\\[]'; |
my $openparen = '[{(\\[]'; |
my $closeparen = '[})\\]]'; |
my $closeparen = '[})\\]]'; |
my $varname = '[A-Za-z](?:_[0-9]+)?'; |
my $varname = '[A-Za-z](?:_[0-9]+)?'; |
my $greek='alpha|bita|gamma|zita|thita|iota|kappa|lambda|mu|nu|xi|rho|sigma|tau|phi|chi|psi|omega|zepslon|zdelta|xeta|zupslon|pi'; |
my $greek='alpha|(?:(?:(?:var)?(?:[tT]h))|(?:[bz])?)eta|[gG]amma|iota|kappa|[lL]ambda|mu|nu|[xX]i|(?:var)?rho|(?:var)?[sS]igma|tau|(?:var)?(?:[pP])hi|chi|[oO]mega|(?:(?:var)?(?:[eE])|(?:[uU]))psilon|[dD]elta|[pP]si|(?:var)?[pP]i'; |
my $delete='zeroplace'; |
my $delete='zeroplace'; |
my $escape='infty'; |
my $escape='infty'; |
my $specialvalue = '(?:'.$escape.'|'.$greek.'|'.$delete.'|d[a-z]|e)'; |
my $specialvalue = '(?:'.$escape.'|'.$greek.'|'.$delete.'|d[a-z]|e)'; |
Line 607 sub tolatex {
|
Line 607 sub tolatex {
|
} |
} |
}; |
}; |
/special/ && do { |
/special/ && do { |
if ($args[0] eq 'pi') {return '\pi';} else {return $args[0];} |
if ($args[0] =~/($greek|$escape)/) {return '\\'.$1;} |
|
elsif ($args[0] =~/$delete/) {return '';} |
|
else { return $args[0]; } |
}; |
}; |
/varname|(:?number$)/ && return $args[0]; |
/varname|(:?number$)/ && return $args[0]; |
/numberE/ && do { |
/numberE/ && do { |