}gs;
if (($target eq 'tex') || ($target eq 'tex_answer')) {
$output =~ s/^([^&]+)\\begin\{document}//;
$output =~ s/\\end\{document}//;
--- rat/lonpage.pm 2023/09/11 13:26:26 1.144 +++ rat/lonpage.pm 2025/03/19 14:44:03 1.145 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Page Handler # -# $Id: lonpage.pm,v 1.144 2023/09/11 13:26:26 raeburn Exp $ +# $Id: lonpage.pm,v 1.145 2025/03/19 14:44:03 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -424,6 +424,7 @@ ENDEXT } my $output=Apache::lonnet::ssi($src,%posthash); $output=~s|//(\s*)?\s||gs; + $output=~s{\Q