[Tex/LaTex] error: file stata.sty not found

installingpackages

I'm trying to manually install the package sjlatex. It's a package to write documents in the Stata Journal style and it's not part of any repository so I cannot install it via the MiKTeX package manager. I have put all the files that come with the package in

C:\Program Files\MiKTeX 2.9\texmf\tex\latex\sjlatex

refreshed FNDB and updated format files. But when I run a simple document that calls up the stata package, I get the error message that stata.sty cannot be found, even though I can see stata.sty in

C:\Program Files\MiKTeX 2.9\texmf\tex\latex\sjlatex

Here's a MWE:

\documentclass{article}
\usepackage{stata}
\begin{document}

An example:

\begin{stlog}
\input{example2_1.log.tex}
\end{stlog}

\end{document}

stlog is an environment specified by the stata package, but I don't even get that far before the error message hits. I'm on Windows Vista and running MiKTeX 2.9 in WinEdt.

Also, I checked the file dependencies listed here and, as far as I can tell, I have correctly installed all the required files (using the MiKTeX package manager).

I was hoping someone would have an idea of things I could try? Sorry if there is something obvious that I have missed …

Best Answer

Since the packages (*.sty) and class (*.cls) do not form part of a traditional LaTeX distribution, you could leave all the files (statapress.cls, pagedims.sty, sj.sty and stata.sty) in your working folder without updating your FNDB; LaTeX will search in the working folder first before moving on to the FNDB.

There should be no concern with doing things this way, since the sjlatex bundle does not form part of any distribution. Consequently, you'll have to manually update the bundle if there is ever a newer version, and just overwrite the existing files in your working folder.

Related Question