version 1.92, 2008/12/04 09:51:14
|
version 1.93, 2008/12/04 19:53:53
|
Line 248 sub mimetex_valign {
|
Line 248 sub mimetex_valign {
|
$ua->timeout(10); |
$ua->timeout(10); |
$ua->env_proxy; |
$ua->env_proxy; |
#header without imagedata saved to response: |
#header without imagedata saved to response: |
my $response = $ua->head('http://lcdevhost.localdomain/cgi-bin/mimetex.cgi?'.$texstring); |
my $response = $ua->head('http://localhost.localdomain/cgi-bin/mimetex.cgi?'.$texstring); |
if ($response->is_success) { |
if ($response->is_success) { |
#get the valign-value: |
#get the valign-value: |
return($response->headers->{'vertical-align'});} |
return($response->headers->{'vertical-align'});} |
Line 267 sub mimetex_converted {
|
Line 267 sub mimetex_converted {
|
$$texstring='\\displaystyle \\Large '.$$texstring; |
$$texstring='\\displaystyle \\Large '.$$texstring; |
} |
} |
|
|
# FIXME |
my $result='<img src="/cgi-bin/mimetex.cgi?'.&escape($$texstring).'" style="vertical-align:'.&mimetex_valign($$texstring).'px" alt="$'.$$texstring.'$" />'; |
# this is the line that calls the new function mimetex_valign above: |
|
# my $result='<img src="/cgi-bin/mimetex.cgi?'.&escape($$texstring).'" style="vertical-align:'.&mimetex_valign($$texstring).'px" alt="$'.$$texstring.'$" />'; |
|
# |
|
# this line is the old implementation without valign of the images: |
|
my $result='<img src="/cgi-bin/mimetex.cgi?'.&escape($$texstring).'" alt="$'.$$texstring.'$" />'; |
|
if ($displaystyle) { |
if ($displaystyle) { |
$result='<center>'.$result.'</center>'; |
$result='<center>'.$result.'</center>'; |
} |
} |