Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to make Sweave.sty and Rd.sty globally available on my system. After reading related posts on StackExchange, I changed texmf.cnf, so that

kpsewhich --expand-var='$TEXMF'

results in

{/home/philipp/texmf,!!/etc/texmf,!!/var/lib/texmf,!!/usr/lib/texmf,!!/usr/local/share/texmf,!!/usr/share/texmf,/usr/lib64/R/share/texmf/tex/latex}

The last directory is where R puts Sweave.sty and Rd.sty, and I also tried the variant with

!!

before this path. After

sudo texhash

and (just to be certain)

sudo mktexlsr

appropriate ls-R files are created. Nevertheless

kpsewhich Sweave.sty

still does not find the file, even with the

--must-exist 

option. After trying all this I am stuck. I suspect there is some trouble because texlive and OpenSUSE are said not to mix well (especially when it comes to adding packages), but do not have the faintest clue.

share|improve this question
    
you can make a symbolic link from R's directory to ~/texmf, then you do not need complicated configurations like you did –  Yihui May 18 '12 at 23:35
    
@Yihui I know that there are all sorts of workarounds. Your suggestion works in my case, since I am the only user. But nevertheless it does not explain why kpsewhich fails. –  Philipp May 19 '12 at 5:45
1  
I meanwhile figured it out: you must not add the full path to Sweave.sty to texmf.cnf. You must only add the path up to the texmf folder. So in my case it should have been: /usr/lib64/R/share/texmf/ instead of /usr/lib64/R/share/texmf/tex/latex. –  Philipp May 19 '12 at 7:13
    
I suggest you add your comment as an answer and accept it, since it is actually the right way to do. By the way, you shouldn't leave a trailing slash: .../texmf rather than .../texmf/ since kpathsea will add /tex/latex which would result in a double slash texmf//tex/latex and double slashes happen to have a special meaning (search recursively) for kpathsea. –  mpg May 20 '12 at 20:21
add comment

1 Answer

up vote 2 down vote accepted

I meanwhile figured it out: you must not add the full path to Sweave.sty to texmf.cnf. You must only add the path up to the texmf folder. So in my case it should have been: /usr/lib64/R/share/texmf instead of /usr/lib64/R/share/texmf/tex/latex

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.