--- loncom/xml/londefdef.pm 2008/09/11 14:47:24 1.392 +++ loncom/xml/londefdef.pm 2008/11/10 11:17:50 1.396 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.392 2008/09/11 14:47:24 bisitz Exp $ +# $Id: londefdef.pm,v 1.396 2008/11/10 11:17:50 foxr Exp $ # # # Copyright Michigan State University Board of Trustees @@ -139,7 +139,7 @@ sub start_m { # detect simple math mode entry exits, and convert them # to use \ensuremath ... unless there's a \verb inside. if (! ($currentstring=~/\\verb/)) { - if ($currentstring=~/^\s*\$[^\$].*[^\$]\$\s*$/) { + if ($currentstring=~/^\s*\$[^\$].*\$\s*$/) { $currentstring=~s/^(\s*)\$/$1/; $currentstring=~s/\$(\s*)$/$1/; $currentstring='\ensuremath{'.$currentstring.'}'; @@ -202,6 +202,7 @@ sub start_html { '\usepackage{wrapfig}'. '\usepackage{picins}'. '\usepackage[T1]{fontenc}'."\n". + '\usepackage{lmodern}'."\n". '\usepackage[postscript]{ucs}'."\n". '\usepackage[utf8x]{inputenc}'."\n". '\usepackage{pifont}' ."\n". @@ -609,7 +610,7 @@ sub edit_controls { &Apache::lonxml::renderingoptions().' -
+

'; return $result; @@ -2025,6 +2026,7 @@ sub start_table { if ($target eq 'web' || $target eq 'webgrade') { $currentstring .= $token->[4]; } elsif ($target eq 'tex') { + &disable_para(); # Can't have paras in a table. push(@Apache::londefdef::table, {}); $Apache::londefdef::table[-1]{'row_number'} = -1; #maximum table's width (default coincides with text line length) @@ -2523,7 +2525,8 @@ sub end_table { pop @Apache::londefdef::table; undef @Apache::londefdef::table; } - } + } + &enable_para(); } return $currentstring; }