--- loncom/homework/structuretags.pm 2001/12/04 15:17:56 1.74
+++ loncom/homework/structuretags.pm 2002/01/24 04:18:54 1.78
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.74 2001/12/04 15:17:56 albertel Exp $
+# $Id: structuretags.pm,v 1.78 2002/01/24 04:18:54 harris41 Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -34,7 +34,7 @@ package Apache::structuretags;
use strict;
use Apache::lonnet;
-sub BEGIN {
+BEGIN {
&Apache::lonxml::register('Apache::structuretags',('block','while','randomlist','problem','library','web','tex','part','preduedate','postanswerdate','solved','notsolved','startouttext','endouttext'));
# &Apache::lonxml::register_insert('problem','',('part','postanswerdate','preduedate'))
}
@@ -273,6 +273,8 @@ sub start_problem {
} elsif ($target eq 'modified') {
$result=$token->[4];
$result.=&Apache::edit::handle_insert();
+ } elsif ($target eq 'tex') {
+ $result .= '\begin{document}\noindent\textbf{Problem.}\newline';
} else {
# page_start returned a starting result, delete it if we don't need it
$result = '';
@@ -316,6 +318,8 @@ sub end_problem {
} elsif ($target eq 'edit') {
&Apache::lonxml::debug("in end_problem with $target, edit");
$result='
';
+ } elsif ($target eq 'tex') {
+ $result .= '\end{document}';
}
return $result;
}