<%PERL> require RG::Parser; $File ||= \( "" ); $session{rp}->save($File, 1); # enable hidden my $out; $out =~ s!]*>!!g; $out =~ s!(]*>)!$1div$2!g; use File::Temp; use File::Spec; my ($fh, $filename) = File::Temp::tempfile( File::Spec->catfile(File::Spec->tmpdir(), 'XXXXXXXX'), SUFFIX => '.tex' ); $filename =~ s|\\|/|g; my $basename = $filename; $m->print("

", loc("Converting file, please wait...\n\n\n")); my $handler = RG::Backend->new('Latex', undef, undef, $Conf); $handler->process($File, {}, \$out) or $m->print($handler->error); print $fh $out; close $fh; $m->print("
\n\n\n"); <%ARGS> $File => $session{file}