--- doc/help/render.texxml.pl 2002/07/19 14:27:05 1.3 +++ doc/help/render.texxml.pl 2004/09/14 22:26:17 1.18 @@ -33,8 +33,8 @@ if ( scalar(@ARGV) < 2 ) { print (< $tmpdir/$fileroot.tex" ); +if (system ( "perl texxml2latex.pl $fileroot.texxml $include_filenames > $tmpdir/$fileroot.tex" )) { + $! = 1; + die "Terminated render because texxml2latex failed; see previous error message."; +}; print "Copying .eps files...\n"; system ( "cp $epssource/* $tmpdir/" ); -# \scrollmode\input causes LaTeX to not stop on errors print "Running Latex...\n"; -system ( "cd $tmpdir; latex \"\\scrollmode\\input $fileroot\" $redir; latex \"\\scrollmode\\input $fileroot\ $redir; latex \"\\scrollmode\\input $fileroot\ $redir; " ); +system ( "cd $tmpdir; echo | latex $fileroot $redir; echo | latex $fileroot $redir; makeindex $fileroot.idx; echo | latex $fileroot\ $redir; " ); print "Running dvips...\n"; -system ( "cd $tmpdir; dvips -f $fileroot.dvi > $fileroot.ps $redir " ); +system ( "cd $tmpdir; dvips -Ppdf -G0 -f $fileroot.dvi > $fileroot.ps " ); print "Copying ps file...\n"; system ( "cp $tmpdir/$fileroot.ps ."); +print "Converting to PDF (may take a bit)...\n"; +system ( "ps2pdf $fileroot.ps $fileroot.pdf" ); + print "Clearing temp directory...\n"; -#system ( "rm -rf $tmpdir" ); +system ( "rm -rf $tmpdir" ); if ( -e $fileroot . ".ps" ) { - print "$fileroot.ps is ready.\n"; + print "$fileroot.ps and $fileroot.pdf are ready.\n"; } else {