--- loncom/xml/londefdef.pm 2003/05/22 16:00:53 1.135
+++ loncom/xml/londefdef.pm 2003/06/19 19:15:59 1.142
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.135 2003/05/22 16:00:53 sakharuk Exp $
+# $Id: londefdef.pm,v 1.142 2003/06/19 19:15:59 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}
@@ -1137,7 +1138,7 @@ sub start_big {
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
- $currentstring .= '\large{';
+ $currentstring .= '{\large ';
} elsif ($target eq 'latexsource') {
$currentstring .= '{\Large ';
}
@@ -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 '.$textwidth.' }';
}
return $currentstring;
}
@@ -2198,7 +2199,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') {
@@ -2271,9 +2273,7 @@ sub start_pre {
if ($target eq 'web') {
$currentstring .= $token->[4];
} elsif ($target eq 'tex') {
- my $width = &Apache::lonxml::get_param('TeXwidth',$parstack,$safeeval,undef,0);
- if (not defined $width) {$width ='\textwidth';}
- $currentstring .= '\parbox['.$width.']{\begin{verbatim}';
+ $currentstring .= '\begin{verbatim}';
}
return $currentstring;
}
@@ -2284,7 +2284,7 @@ sub end_pre {
if ($target eq 'web') {
$currentstring .= $token->[2];
} elsif ($target eq 'tex') {
- $currentstring .= '\end{verbatim}}';
+ $currentstring .= '\end{verbatim}';
}
return $currentstring;
}