The R Project SVN R

Rev

Rev 35463 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 35463 Rev 35592
Line 1736... Line 1736...
1736
	        ## info goes to ${pkgname}-manual.log.
1736
	        ## info goes to ${pkgname}-manual.log.
1737
		## We also suppress all output from running LaTeX.
1737
		## We also suppress all output from running LaTeX.
1738
                ## We could also write stdout to a tempfile and replay
1738
                ## We could also write stdout to a tempfile and replay
1739
                ## this in case of problems.  But does this really help?
1739
                ## this in case of problems.  But does this really help?
1740
		my $cmd = "${R::Vars::LATEX}";
1740
		my $cmd = "${R::Vars::LATEX}";
-
 
1741
		if($WINDOWS) {
-
 
1742
		    ## check if we have MiKTeX and call latex accordingly
-
 
1743
		    ## (can't do this in R::Vars::LATEX as we need R::Utils.)
-
 
1744
		    my $Rout = R_tempfile("Rlatex");
-
 
1745
		    my $cmd2 = "$cmd --version > ${Rout}";
-
 
1746
		    R_system($cmd2);
-
 
1747
		    my $is_miktex = 0;
-
 
1748
		    open ROUT, "< $Rout";
-
 
1749
		    while (<ROUT>) {
-
 
1750
			chomp;
-
 
1751
			$is_miktex = 1 if /^MiKTeX/;
-
 
1752
		    }
-
 
1753
		    close ROUT;
-
 
1754
		    unlink($Rout);
-
 
1755
		    $out =~ s/\w//;
-
 
1756
		    if($is_miktex) {
-
 
1757
			my $R_HOME = $ENV{"R_HOME"};
-
 
1758
			$cmd .= " --include-directory=$R_HOME/share/texmf";
-
 
1759
		    }
-
 
1760
		}
1741
		$cmd .= " '\\nonstopmode{}\\input{${pkgname}-manual.tex}'";
1761
		$cmd .= " '\\nonstopmode{}\\input{${pkgname}-manual.tex}'";
1742
		$cmd .= " >/dev/null 2>&1";
1762
		$cmd .= " >/dev/null 2>&1";
1743
		## </NOTE>
1763
		## </NOTE>
1744
		if(R_system($cmd)) {
1764
		if(R_system($cmd)) {
1745
		    $log->error();
1765
		    $log->error();