[Tex/LaTex] Trying to Install qtree

lyxqtree

I copied the qtree.sty file to my /usr/share/texmf-texlive/tex/latex directory (pretty much everywhere there, in graphics/ , base/ even in qtree/) but when I run Lyx and insert the following command LaTeX Preamble:

\usepackage{qtree}

I keep getting

File qtree.sty not found

Best Answer

You should not put it in the main tree, but rather in the local tree:

sudo mkdir -p $(kpsewhich -var-value TEXMFLOCAL)/tex/latex/qtree
sudo cp qtree.sty $(kpsewhich -var-value TEXMFLOCAL)/tex/latex/qtree/
sudo mktexlsr

The first command tells the system to create the required structure; the second one copies the file, the third finally tells the TeX system where to find it.

If sudo is not the way you act as a superuser, then use the proper method for your operating system.