I'm trying to install a new style file that doesn't come by default with LaTeX. I'm on a Linux Mint computer, and installed LaTeX with a simple
sudo apt install texlive
or something like that, if I recall correctly. Now as I search for my texmf directory, I've found two (which I found by following some instructions at various pages on the internet). One is at /var/lib/texmf and the other is at /usr/local/share/texmf/. The former has the folders:
dvipdfmx/
dvips/
fonts/
luatex-cache/
tex/
web2c/
xdvi/
...
as well as seven files, one of them for instance is fmtutil.cnf-DEBIAN.
With some blind exploration, I don't find any .sty files in any of the sub-folders. In the other directory, /usr/local/share/texmf/ the directory is entirely empty.
So unless I just haven't explored the sub-folders of the first directory enough, I don't think either of these are where LaTeX is looking for its .sty files. So how do I find the correct directory? When I type which tex it gives me usr/bin/tex but in that directory, I don't see any other file that seems related to LaTeX.
When I run texhash it returns
texhash: /usr/local/share/texmf: directory not writable. Skipping...
texhash: /var/lib/texmf: directory not writable. Skipping...
texhash: /var/lib/texmf: directory not writable. Skipping...
texhash: /var/lib/texmf: directory not writable. Skipping...
texhash: Done.
Since I don't really know what I'm doing I didn't want to run texhash as root, but this sort of makes me think that the texmf tree has to be in one of these directories ... so I'm just confused at this point.
[Edit: I've seen some people suggest that there might be a texmf tree at the home directory, but there isn't one for me. That is to say there is no texmf directory located in my ~/ directory.]
[Further edit: Also when I type echo $TEXMFHOME it returns a blank line.]
[Further edit: Per egreg's comment I entered kpsewhich -var-value TEXMFHOME which returns /home/myname/texmf but this directory doesn't exist.]
kpsewhich -var-value TEXMFHOMEis the right command line. – egreg Sep 06 '18 at 21:45/home/myname/texmf. However, no such directory exists. – Addem Sep 06 '18 at 21:46mkdircommands? And just by making the directories, tex will automatically find them? Do I need to find whatever "executable" file tex is using and move it too? And it won't "forget" the old location of the default.styfiles, likeamsmathwhich I've been using up until now without issue? – Addem Sep 06 '18 at 22:01texmf/tex/latexfor latex packages and if you want documentation for a package to be found bytexdocit should be intexmf/doc. – Alan Munn Sep 06 '18 at 22:05~/texmffirst and find any updated files there – David Carlisle Sep 06 '18 at 22:05.styfiles are located? If you don't know off the top of your head, no worries, it really is just gnawing curiosity for me at this point. – Addem Sep 06 '18 at 22:10kpsewhich. E.g.kpsewhich article.clswill tell you the exact path TeX uses to find thearticle.clsthat is loaded when you say\documentclass{article}. But basically most of your stuff is in the/usr/local/share/texmf. – Alan Munn Sep 06 '18 at 22:15