version 1.348, 2006/12/19 22:30:52
|
version 1.352, 2007/01/18 20:48:02
|
Line 1559 sub start_a {
|
Line 1559 sub start_a {
|
my $href=&Apache::lonxml::get_param('href',$parstack,$safeeval, |
my $href=&Apache::lonxml::get_param('href',$parstack,$safeeval, |
undef,1); |
undef,1); |
$currentstring=&Apache::lonenc::encrypt_ref($token,{'href'=>$href}); |
$currentstring=&Apache::lonenc::encrypt_ref($token,{'href'=>$href}); |
} elsif ($target eq 'tex') { |
|
my $a=&Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1); |
|
my $b=&Apache::lonxml::get_param('name',$parstack,$safeeval,undef,1); |
|
if ($a=~/\S/) { |
|
$a=~s/([^\\])%/$1\\\%/g; |
|
$currentstring .= '\ref{URI: '.$a.'}'; |
|
} elsif ($b=~/\S/) { |
|
$currentstring .= '\ref{Anchor: '.$b.'}'; |
|
} else { |
|
$currentstring.=''; |
|
} |
|
} |
} |
return $currentstring; |
return $currentstring; |
} |
} |
Line 1580 sub end_a {
|
Line 1569 sub end_a {
|
if ($target eq 'web' || $target eq 'webgrade') { |
if ($target eq 'web' || $target eq 'webgrade') { |
$currentstring .= $token->[2]; |
$currentstring .= $token->[2]; |
} |
} |
|
if ($target eq 'tex') { |
|
my $href = |
|
&Apache::lonxml::get_param('href',$parstack,$safeeval,undef,1); |
|
my $name = |
|
&Apache::lonxml::get_param('name',$parstack,$safeeval,undef,1); |
|
if ($href =~ /\S/) { |
|
$href =~ s/([^\\])%/$1\\\%/g; |
|
$currentstring .= ' ({\tt URI:'.&Apache::lonxml::latex_special_symbols($href).'})'; |
|
} elsif ($name =~ /\S/) { |
|
$currentstring .= ' ({\tt Anchor:'.&Apache::lonxml::latex_special_symbols($name).'})'; |
|
} else { |
|
$currentstring.=''; |
|
} |
|
} |
return $currentstring; |
return $currentstring; |
} |
} |
|
|
Line 2251 sub end_table {
|
Line 2254 sub end_table {
|
} |
} |
$have_rowspan++; |
$have_rowspan++; |
$output .= '\multirow{'.$rowspan.'}[0]{*}{'; |
$output .= '\multirow{'.$rowspan.'}[0]{*}{'; |
|
|
|
$Apache::londefdef::table[-1]{'content'}[$in][$jn] =~ |
|
s{^\s*\\par\s*}{}; |
|
$Apache::londefdef::table[-1]{'content'}[$in][$jn] =~ |
|
s{\s*\\vskip\s*0pt\s*$}{}; |
|
|
# |
# |
# If we did not throw in a multicolumn to align, then add |
# If we did not throw in a multicolumn to align, then add |
# an extra { |
# an extra { |
Line 2891 sub start_img {
|
Line 2900 sub start_img {
|
$currentstring = '\begin{minipage}[l]{'.$width_param.'mm}' |
$currentstring = '\begin{minipage}[l]{'.$width_param.'mm}' |
.$currentstring.'\end{minipage}'; |
.$currentstring.'\end{minipage}'; |
} elsif ($latex_rendering eq "wrapfigure" |
} elsif ($latex_rendering eq "wrapfigure" |
|| $latexrendering ne 'none') { # wrapfig render |
|| $latex_rendering ne 'none') { # wrapfig render |
$currentstring = |
$currentstring = |
'\begin{wrapfigure}{l}{'.$width_param.'mm}' |
'\begin{wrapfigure}{l}{'.$width_param.'mm}' |
.'\scalebox{1.0}{'.$currentstring.'}\end{wrapfigure}'; |
.'\scalebox{1.0}{'.$currentstring.'}\end{wrapfigure}'; |
Line 2903 sub start_img {
|
Line 2912 sub start_img {
|
$currentstring = '\begin{minipage}[r]{'.$width_param.'mm}' |
$currentstring = '\begin{minipage}[r]{'.$width_param.'mm}' |
.$currentstring.'\end{minipage}'; |
.$currentstring.'\end{minipage}'; |
} elsif ($latex_rendering eq "wrapfigure" |
} elsif ($latex_rendering eq "wrapfigure" |
|| $latexrendering ne 'none') { # wrapfig render |
|| $latex_rendering ne 'none') { # wrapfig render |
$currentstring = |
$currentstring = |
'\begin{wrapfigure}{r}{'.$width_param.'mm}' |
'\begin{wrapfigure}{r}{'.$width_param.'mm}' |
.'\scalebox{1.0}{'.$currentstring.'}\end{wrapfigure}'; |
.'\scalebox{1.0}{'.$currentstring.'}\end{wrapfigure}'; |