I put Rd.sty in C:\texlive\texmf-local\tex\latex\Rd.sty. But when I try to execute a file, say aaa.tex then the error ! LaTeX Error: File "Rd.sty" not found. occur. But, if I put the Rd.sty and aaa.tex in the same directory, then it goes well. Why??

Answer of my questions by Ulrike Fisher, I reprint here.

  1. Put the .sty file, e.g., Rd.sty at C:\texlive\texmf-local\tex\latex\Rd.sty

  2. Execute the code mktexlsr from the command prompt to reflect the change as follows:


Then, we no longer need to put the Rd.sty and some tex file in the same directory.

We confirm whether LaTeX can detect the .sty file or not via the code kpsewhich style_file_name in the command prompt,

C:\Users\User>  kpsewhich Rd.sty
            <--- Here nothing since LaTeX cannot detect the Rd.sty
C:\Users\User>mktexlsr      <--- Up date
mktexlsr: Updating C:/texlive/2013/texmf-config/ls-R...
mktexlsr: Updated C:/texlive/2013/texmf-config/ls-R.
mktexlsr: Updating C:/texlive/2013/texmf-var/ls-R...
mktexlsr: Updated C:/texlive/2013/texmf-var/ls-R.
mktexlsr: Updating C:/texlive/texmf-local/ls-R...
mktexlsr: Updated C:/texlive/texmf-local/ls-R.
mktexlsr: Updating C:/texlive/2013/texmf-dist/ls-R...
mktexlsr: Updated C:/texlive/2013/texmf-dist/ls-R.
mktexlsr: Done.

>  kpsewhich Rd.sty
c:/texlive/texmf-local/tex/Rd.sty <--- Here LaTeX can detect the Rd.sty
  • Thank you, I use Windows 10, but I try it. Feb 25, 2019 at 4:30
  • 'Rd.sty' file is user defined style files. you can ask you client. or who used it. Feb 25, 2019 at 5:22
  • Rd.sty is required when I make a manual for my statistical package. This package can find at https://svn.r-project.org/R/trunk/share/texmf/tex/latex/Rd.sty So, I copy and paste with extension .sty. I am not sure but R users are familiar with Rd.sty ? Feb 25, 2019 at 5:43
  • On texlive you need to run mktexlsr to update the fndb. Feb 25, 2019 at 7:28
  • Thank you @UlrikeFischer !! I can do !! You are greate !! I appreciate you very much. I bothered this issues for very long time !! I reprint you answer as above. Feb 25, 2019 at 7:57


You must log in to answer this question.

Browse other questions tagged .