version 1.232, 2004/08/16 17:11:10
|
version 1.236, 2004/08/23 15:23:53
|
Line 1134 sub end_p {
|
Line 1134 sub end_p {
|
$currentstring .= $token->[2]; |
$currentstring .= $token->[2]; |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
my $align=&Apache::lonxml::get_param('align',$parstack,$safeeval,undef,1); |
my $align=&Apache::lonxml::get_param('align',$parstack,$safeeval,undef,1); |
if ($align eq 'center') { |
if (not defined $align) { |
|
$currentstring.='\strut\\\\\strut '; |
|
} elsif ($align eq 'center') { |
$currentstring .= '\end{center}'; |
$currentstring .= '\end{center}'; |
} elsif ($align eq 'right') { |
} elsif ($align eq 'right') { |
$currentstring .= '}}'; |
$currentstring .= '}}'; |
} elsif ($align eq 'left') { |
} elsif ($align eq 'left') { |
$currentstring .= '}\hfill}'; |
$currentstring .= '}\hfill}'; |
} |
} |
} |
} |
return $currentstring; |
return $currentstring; |
} |
} |
Line 2419 sub start_img {
|
Line 2421 sub start_img {
|
} |
} |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
$src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); |
$src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src); |
#if uploaded restore the path |
|
if ($src=~/^\/uploaded\/([^\/]+)\/([^\/]+)\/simplepage\/([^\/]+)$/) { |
|
$src=&Apache::loncommon::propath($1,$2).'/userfiles/simplepage/'.$3; |
|
} elsif ($src=~/^\/uploaded\/([^\/]+)\/([^\/]+)\/aboutme\/([^\/]+)$/) { |
|
$src=&Apache::loncommon::propath($1,$2).'/userfiles/aboutme/'.$3; |
|
} |
|
#if original gif/jpg/png file exist do following: |
#if original gif/jpg/png file exist do following: |
if (-e $src) { |
if (-e $src) { |
#what is the image size? |
#what is the image size? |
Line 2477 sub start_img {
|
Line 2473 sub start_img {
|
$currentstring .=&Apache::edit::text_arg('height (pixel):','height',$token,5).'<br />'; |
$currentstring .=&Apache::edit::text_arg('height (pixel):','height',$token,5).'<br />'; |
$currentstring .=&Apache::edit::text_arg('TeXwidth (mm):','TeXwidth',$token,5); |
$currentstring .=&Apache::edit::text_arg('TeXwidth (mm):','TeXwidth',$token,5); |
$currentstring .=&Apache::edit::text_arg('TeXheight (mm):','TeXheight',$token,5); |
$currentstring .=&Apache::edit::text_arg('TeXheight (mm):','TeXheight',$token,5); |
|
$currentstring .=&Apache::edit::select_arg('Alignment:','align', |
|
['','bottom','middle','top','left','right'],$token,5); |
$currentstring .=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); |
$currentstring .=&Apache::edit::end_row().&Apache::edit::start_spanning_row(); |
my $src=&Apache::lonxml::get_param('src',$parstack,$safeeval); |
my $src=&Apache::lonxml::get_param('src',$parstack,$safeeval); |
my $alt=&Apache::lonxml::get_param('alt',$parstack,$safeeval); |
my $alt=&Apache::lonxml::get_param('alt',$parstack,$safeeval); |
Line 2490 sub start_img {
|
Line 2488 sub start_img {
|
my ($osrc,$owidth,$oheight)= |
my ($osrc,$owidth,$oheight)= |
($token->[2]{'src'},$token->[2]{'width'},$token->[2]{'height'}); |
($token->[2]{'src'},$token->[2]{'width'},$token->[2]{'height'}); |
my $ctag=&Apache::edit::get_new_args($token,$parstack, |
my $ctag=&Apache::edit::get_new_args($token,$parstack, |
$safeeval,'src','alt', |
$safeeval,'src','alt','align', |
'TeXwidth','TeXheight', |
'TeXwidth','TeXheight', |
'width','height'); |
'width','height'); |
my ($nsrc,$nwidth,$nheight)= |
my ($nsrc,$nwidth,$nheight)= |