--- loncom/xml/londefdef.pm 2003/06/03 13:15:02 1.137
+++ loncom/xml/londefdef.pm 2003/06/19 20:14:13 1.143
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.137 2003/06/03 13:15:02 sakharuk Exp $
+# $Id: londefdef.pm,v 1.143 2003/06/19 20:14:13 sakharuk Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -158,6 +158,7 @@ sub start_html {
} elsif ($target eq 'tex') {
@Apache::londefdef::table = ();
$currentstring .= '\documentclass[letterpaper]{article}
+ \batchmode
\newcommand{\keephidden}[1]{}
\renewcommand{\deg}{$^{\circ}$}
\usepackage{textcomp}
@@ -1700,11 +1701,11 @@ sub end_dd {
#--
tag
sub start_table {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
- my $textwidth;
+ my $textwidth='';
if (not defined @Apache::londefdef::table) {
$textwidth=&recalc($ENV{'form.textwidth'});
- $textwidth=~/(\d+)/;
- $textwidth=$1;
+ $textwidth=~/(\d+\.?\d*)/;
+ $textwidth=0.95*$1;
} else {
$textwidth=&Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0);
}
@@ -1746,7 +1747,7 @@ sub start_table {
$Apache::londefdef::table[-1]{'vvinc'} = '';
}
$Apache::londefdef::table[-1]{'output'} = ' \noindent \begin{tabular} ';
- $currentstring = '\keephidden{NEW TABLE ENTRY '.$textwidth.'}';
+ $currentstring = '\keephidden{NEW TABLE ENTRY}';
}
return $currentstring;
}
@@ -1824,6 +1825,7 @@ sub end_table {
} else {
$currentstring .= $Apache::londefdef::table[-1]{'output'};
pop @Apache::londefdef::table;
+ undef @Apache::londefdef::table;
}
}
return $currentstring;
@@ -1911,7 +1913,7 @@ sub end_td {
$Apache::londefdef::table[-1]{'TeXlength'} .= '0,';
}
}
- for (my $in=0; $in<=$#{$Apache::londefdef::table[-1]{'include'}};$in++) {
+ for (my $in=0; $in<=$#{$Apache::londefdef::table[-1]{'include'}};$in++) {
$data=~s/\\keephidden\{NEW TABLE ENTRY\}/$Apache::londefdef::table[-1]{'include'}[$in]/;
}
@{ $Apache::londefdef::table[-1]{'rowdata'} }[$current_row] .= '\parbox{TOBECHANGEDONNUMBER}{'.$data.'} '.$Apache::londefdef::table[-1]{'vinc'};
@@ -2198,7 +2200,8 @@ sub start_allow {
my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_;
my $src = &Apache::lonxml::get_param('src',$parstack,$safeeval,undef,1);
$src=&Apache::lonnet::filelocation($Apache::lonxml::pwd[-1],$src);
- $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=$src;
+ $Apache::lonxml::extlinks[$#Apache::lonxml::extlinks+1]=
+ &Apache::lonnet::clutter($src);
&image_replication($src);
my $result;
if ($target eq 'edit') {