0

When I run a tikz code on my PC, the following error always stop me from producing the figure.

! LaTex Error: File forest.sty not found

But my code is okay in Overleaf. My LaTex on PC(win7) is WinEdt 6.0.

Does it mean my codes need a separate file: forest.sty. I googled it but ending without finding any forest.sty file, can anyone give me the one?

wayne
  • 1,331
  • 1
    This means that you don't have forest package installed on your PC, or you installed it in a folder where latex is not looking at. – Ignasi Jul 14 '15 at 13:47
  • It looks like you're using windows. If you use MikTeX, start miktex package manager and install forest. – Ignasi Jul 14 '15 at 13:48
  • Then how do I fix this problem – wayne Jul 14 '15 at 13:48
  • Yes I use Windows 7 – wayne Jul 14 '15 at 13:49
  • 1
    An alternative is to copy the forest.sty file from http://chocolatshalba.ch/files/texlive/texmf-dist/tex/latex/forest/forest.sty and paste it in your editor. Save the file as forest.sty in the folder where the latex file that is being worked on is located. – Leucippus Jul 14 '15 at 14:15
  • 1
    The information about Windows/WinEdt is almost irrelevant here. Do you use MikTeX or TeX Live? Both of these have package managers that you use to install packages, as Ignasi already mentioned. @Leucippus While that would work, it is better to install the package with a package manager. forest is available in both TeX Live and MikTeX. – Torbjørn T. Jul 14 '15 at 14:20
  • I don't know if my Latex is MikTeX or TeX Live, but I find my WinEdt have a folder named MikTeX, does it mean I used MikTeX? – wayne Jul 14 '15 at 14:23
  • @Leucippus I tried with your method, it has other wrong messages. – wayne Jul 14 '15 at 14:29
  • @WangyanLi If the errors are similar then Google those style files and do the same thing. If it is another type of error then you will have to state what the error is. What often happens is that when using someone else's code packages/style files are often missing, or set ups are different and it can be a lengthy task to find all the files and clear out errors. Once completed latex becomes fun again. – Leucippus Jul 14 '15 at 14:34
  • 1
    As @TorbjørnT. explained, *that is not a good method*. You should install packages using your installation's package manager. Apart from anything else, that method will work only for your current document. Moreover, even for that document it may well break later in weird, wonderful and deeply mysterious ways. – cfr Jul 14 '15 at 16:33
  • 1
    Search in the start menu for Package manager. If you find a program called that, or Package manager (Admin) (I think that's what it's called) that looks like what you see in http://docs.miktex.org/2.9/manual/pkgmgt.html, then you have MikTeX. Use that to install new packages. – Torbjørn T. Jul 14 '15 at 17:04

0 Answers0