version 1.233, 2004/08/17 14:18:04
|
version 1.237, 2004/08/25 19:08:32
|
Line 66 sub initialize_londefdef {
|
Line 66 sub initialize_londefdef {
|
@Apache::londefdef::description=(); |
@Apache::londefdef::description=(); |
$Apache::londefdef::DD_redirection=0; |
$Apache::londefdef::DD_redirection=0; |
$Apache::londefdef::DT_redirection=0; |
$Apache::londefdef::DT_redirection=0; |
|
@Apache::londefdef::alphabit=('A'..'Z'); |
|
$Apache::londefdef::alphabit_index=0; |
} |
} |
|
|
#======================= TAG SUBROUTINES ===================== |
#======================= TAG SUBROUTINES ===================== |
Line 1485 sub start_li {
|
Line 1487 sub start_li {
|
if ($target eq 'web') { |
if ($target eq 'web') { |
$currentstring = $token->[4]; |
$currentstring = $token->[4]; |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
my $type=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,1); |
my $type=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0); |
|
my $value=&Apache::lonxml::get_param('value',$parstack,$safeeval,undef,0); |
if ($type=~/circle/) { |
if ($type=~/circle/) { |
$currentstring .= ' \item[o] '; |
$currentstring .= ' \item[o] '; |
} elsif ($type=~/square/) { |
} elsif ($type=~/square/) { |
$currentstring .= ' \item[$\Box$] '; |
$currentstring .= ' \item[$\Box$] '; |
} elsif ($type ne '') { |
} elsif ($type eq 'A') { |
$currentstring .= ' \item['.$type.'] '; |
$currentstring .= ' \item['.$Apache::londefdef::alphabit[$Apache::londefdef::alphabit_index].']'; |
|
$Apache::londefdef::alphabit_index++; |
|
} elsif ($type eq 'a') { |
|
my $lower_case=lc $Apache::londefdef::alphabit[$Apache::londefdef::alphabit_index]; |
|
$currentstring .= ' \item['.$lower_case.']'; |
|
$Apache::londefdef::alphabit_index++; |
|
} elsif ($value ne '') { |
|
$currentstring .= ' \item['.$value.'] '; |
} else { |
} else { |
$currentstring .= ' \item '; |
$currentstring .= ' \item '; |
} |
} |
Line 1630 sub start_ol {
|
Line 1640 sub start_ol {
|
if ($target eq 'web') { |
if ($target eq 'web') { |
$currentstring = $token->[4]; |
$currentstring = $token->[4]; |
} elsif ($target eq 'tex') { |
} elsif ($target eq 'tex') { |
|
$Apache::londefdef::alpabit_index=0; |
my $type=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0); |
my $type=&Apache::lonxml::get_param('type',$parstack,$safeeval,undef,0); |
if ($type eq '1') { |
if ($type eq '1') { |
$currentstring .= '\renewcommand{\labelenumi}{\arabic{enumi}.}'. |
$currentstring .= '\renewcommand{\labelenumi}{\arabic{enumi}.}'. |
Line 2421 sub start_img {
|
Line 2432 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 2479 sub start_img {
|
Line 2484 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 2492 sub start_img {
|
Line 2499 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)= |