version 1.113, 2004/07/06 14:58:30
|
version 1.118, 2004/08/25 19:38:58
|
Line 453 sub optionlist_correction {
|
Line 453 sub optionlist_correction {
|
if ($TeXlayout eq 'vertical') { |
if ($TeXlayout eq 'vertical') { |
$texoptionlist.=' \vskip 0 mm ', |
$texoptionlist.=' \vskip 0 mm ', |
} else { |
} else { |
$texoptionlist.=','; |
$texoptionlist.=', '; |
} |
} |
} |
} |
chop($texoptionlist); |
$texoptionlist=~s/, $//; |
if ($TeXlayout ne 'vertical') {$texoptionlist.='.';} |
if ($TeXlayout ne 'vertical') {$texoptionlist.='.';} |
} else { |
} else { |
if ($TeXlayout ne 'vertical') {$texoptionlist='\\item [] \\vskip -5 mm';} |
if ($TeXlayout ne 'vertical') {$texoptionlist='\\item [] \\vskip -5 mm';} |
Line 491 sub webbubbles {
|
Line 491 sub webbubbles {
|
|
|
|
|
sub bubbles { |
sub bubbles { |
my ($ralphabit,$ropt) = @_; |
my ($ralphabit,$ropt,$responce) = @_; |
my @alphabet = @$ralphabit; |
my @alphabet = @$ralphabit; |
my @opt = @$ropt; |
my @opt = @$ropt; |
my ($result,$head,$line) =('','',''); |
my ($result,$head,$line) =('','',''); |
Line 508 sub bubbles {
|
Line 508 sub bubbles {
|
for (my $ind=0;$ind<=$number_of_bubbles;$ind++) { |
for (my $ind=0;$ind<=$number_of_bubbles;$ind++) { |
my $leftmargin; |
my $leftmargin; |
$opt[$ind]=&Apache::lonxml::latex_special_symbols($opt[$ind]); |
$opt[$ind]=&Apache::lonxml::latex_special_symbols($opt[$ind]); |
|
if ($responce eq 'rankresponce') {$opt[$ind]='Rank '.$opt[$ind];} |
if ($ind==0) {$leftmargin=6;} else {$leftmargin=10;} |
if ($ind==0) {$leftmargin=6;} else {$leftmargin=10;} |
$current_length += (length($opt[$ind])+length($alphabet[$ind])+4)*2; |
$current_length += (length($opt[$ind])+length($alphabet[$ind])+4)*2; |
if ($current_length<($textwidth-$leftmargin) and $ind!=$number_of_bubbles) { |
if ($current_length<($textwidth-$leftmargin) and $ind!=$number_of_bubbles) { |
Line 603 sub end_foil {
|
Line 604 sub end_foil {
|
my $result = ''; |
my $result = ''; |
if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') { |
if ($target eq 'web' || $target eq 'tex' || $target eq 'analyze') { |
$text=&Apache::lonxml::endredirection; |
$text=&Apache::lonxml::endredirection; |
|
if ($target eq 'tex') {$text=~s/\\strut\s*\\\\\s*\\strut/\\vskip 0 mm/;} |
if (($target eq 'tex') and ($Apache::lonhomework::type ne 'exam') and ($text=~/\S/)) {$text = '\vspace*{-2 mm}\item '.$text;} |
if (($target eq 'tex') and ($Apache::lonhomework::type ne 'exam') and ($text=~/\S/)) {$text = '\vspace*{-2 mm}\item '.$text;} |
} |
} |
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' |
if ($target eq 'web' || $target eq 'grade' || $target eq 'answer' |
Line 648 sub end_foil {
|
Line 650 sub end_foil {
|
|
|
sub start_drawoptionlist { |
sub start_drawoptionlist { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
return $token->[4]; |
if ($target ne 'meta') { |
|
return $token->[4]; |
|
} |
} |
} |
|
|
sub end_drawoptionlist { |
sub end_drawoptionlist { |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; |
return $token->[2]; |
if ($target ne 'meta') { |
|
return $token->[2]; |
|
} |
} |
} |
|
|
sub insert_foil { |
sub insert_foil { |