Re: [Rd] R CMD build cannot create vignettes on Windows if Makefile is used

2010-09-11 Thread Duncan Murdoch

On 11/09/2010 12:52 AM, Hervé Pagès wrote:

Hi,

I found the following problem with recent R-devel
(2010-08-26 r52817) on Windows (32-bit and 64-bit):
'R CMD build pkg' gets stalled during vignette
creation for packages that have a Makefile in pkg/inst/doc.

It seems that the problem is that the commands used in the
Makefile for converting .tex to .pdf are not able to locate
the Sweave.sty file anymore (if I drop this file to
pkg/inst/doc, then the problem goes away).


This sounds like a problem that only the package maintainer could 
address.  Presumably it will be temporary:  once they adjust to the new 
organization of the share/texmf directory, things will be fine again.


The reorg is described in this NEWS item:

* Directory R_HOME/share/texmf now follows the TDS conventions, so
  can be set as a texmf tree ('root directory' in MiKTeX parlance).

Duncan Murdoch



I noticed that the location of Sweave.sty shipped with
R has changed recently (moved from ${R_HOME}/share/texmf
to ${R_HOME}/share/texmf/tex/latex/). Could that be related
to the problem?

I don't see that problem on platforms other than Windows or
with R  2.12

Thanks,
H.



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Sweave issue; keep.source=TRUE and cacheSweave incompatible?

2010-09-11 Thread Simon Jackman
This could well be a package-specific issue, and so perhaps not for R-devel.  
The author of the relevant package is CC'd in any event.

I'm seeing some odd behavior from Sweave with keep.source=TRUE when using 
driver=cacheSweaveDriver from the cacheSweave package. 

It would seem that code chunks with keep.source=TRUE aren't being parsed 
correctly; the corresponding Schunk starts at the *very top* of the Rnw file, 
snippet shown below.

The error seems specific to R 2.12.0; cacheSweave + keep.source=TRUE seems to 
work ok in R 2.11.

Many thanks

— Simon

Version details: 

R version 2.12.0 Under development (unstable) (2010-09-10 r52888)
cacheSweave package 0.4-4

Sweave invocation and output:

 Sweave(test.Rnw,driver=cacheSweaveDriver)
Writing to file test.tex
Processing code chunks ...
 1 : term hide (label=setCache)
 2 : echo term verbatim (label=rnorm)
 3 : echo keep.source term verbatim (label=runif)
 4 : echo term verbatim (label=summary)

You can now run LaTeX on 'test.tex'


Bad Schunk:

\begin{Schunk}
\begin{Sinput}
 \documentclass{article}
 
 \usepackage[noae]{Sweave}
 
 \begin{document}
 \SweaveOpts{prefix.string=foo,png=FALSE,echo=TRUE,eps=FALSE}
 @ 
 setCache,echo=FALSE,results=hide=
 library(cacheSweave)
 setCacheDir(./cache)
 @ %def 
 
 This is a test.
 
 @
 rnorm,cache=TRUE=
 summary(rnorm(n=100))
 @ %def 
 
 This is another test.
 
 @ 
 runif,cache=TRUE,keep.source=TRUE=
 z - runif(n=100)
\end{Sinput}
\end{Schunk}


Simon Jackman, Depts of Political Science  (by courtesy) Statistics, 
Stanford University, Stanford, CA 94305-6044, USA.
http://jackman.stanford.edu
Co-Principal Investigator, American National Election Studies
cell: +1 (650) 387 3019  fax: +1 (650) 724-9095





[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] R CMD build cannot create vignettes on Windows if Makefile is used

2010-09-11 Thread Hervé Pagès

Hi Duncan,

On 09/11/2010 03:56 AM, Duncan Murdoch wrote:

On 11/09/2010 12:52 AM, Hervé Pagès wrote:

Hi,

I found the following problem with recent R-devel
(2010-08-26 r52817) on Windows (32-bit and 64-bit):
'R CMD build pkg' gets stalled during vignett
creation for packages that have a Makefile in pkg/inst/doc.

It seems that the problem is that the commands used in the
Makefile for converting .tex to .pdf are not able to locate
the Sweave.sty file anymore (if I drop this file to
pkg/inst/doc, then the problem goes away).


This sounds like a problem that only the package maintainer could
address. Presumably it will be temporary: once they adjust to the new
organization of the share/texmf directory, things will be fine again.

The reorg is described in this NEWS item:

* Directory R_HOME/share/texmf now follows the TDS conventions, so
can be set as a texmf tree ('root directory' in MiKTeX parlance).


Before this reorg, the package maintainer didn't have to care about
where to find things in R_HOME/share/texmf. 'R CMD build' would just
find them by setting the TEXINPUTS envir variable appropriately (and
then commands in the inst/doc/Makefile file would find them too).

This reorg was checked in svn as rev 52256. I see the following
adjustments to TEXINPUTS:

  ** On Unix (src/scripts/Rcmd.in file):

-## Append 'share/texmf' to TeX's input search path.
-if test -z $TEXINPUTS}; then
-  TEXINPUTS=.:${R_SHARE_DIR}/texmf:
+## Append 'share/texmf/...' to TeX's input search path.
+if test -z ${TEXINPUTS}; then
+  TEXINPUTS=.:${R_SHARE_DIR}/texmf/tex/latex:
 else
-  TEXINPUTS=.:${TEXINPUTS}:${R_SHARE_DIR}/texmf:
+  TEXINPUTS=.:${TEXINPUTS}:${R_SHARE_DIR}/texmf/tex/latex:
 fi
 export TEXINPUTS

  ** On Windows (src/gnuwin32/fixed/etc/Rcmd_environ file):

-TEXINPUTS=.;${TEXINPUTS};${R_SHARE_DIR}/texmf;
+TEXINPUTS=.;${TEXINPUTS};${R_SHARE_DIR}/texmf/tex/latex;

The path seems to have been adjusted correctly. So my question is:
why isn't this working on Windows for packages that use a Makefile?

Thanks,
H.




Duncan Murdoch



I noticed that the location of Sweave.sty shipped with
R has changed recently (moved from ${R_HOME}/share/texmf
to ${R_HOME}/share/texmf/tex/latex/). Could that be related
to the problem?

I don't see that problem on platforms other than Windows or
with R  2.12

Thanks,
H.






--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fhcrc.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel