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
  • 2
    Welcome to TeX.SE! If you are using an local texmf you need to update the FNDB (file name data base) for TeX Live. Because I'm a MIkTeX user I can not tell you how to do that ... – Kurt Feb 25 at 4:13
  • Thank you @Kurt for letting me know the FNDB. I only put the sty file, so,..I need one more step. I do not know how to update the FNDB. – Camford Oxbridge Feb 25 at 4:17
  • Perhaps this question tex.stackexchange.com/q/119898/16550 can help you? – Kurt Feb 25 at 4:26
  • Thank you, I use Windows 10, but I try it. – Camford Oxbridge Feb 25 at 4:30
  • 'Rd.sty' file is user defined style files. you can ask you client. or who used it. – Mu30 murugans2katgmail Feb 25 at 5:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.