How to install a .sty package that is missing when a tex file is being built by Texstudio for Ubuntu 20.04? Any method would work for me, but preferably a method via terminal or preamble of the tex file would be the most useful.
[Tex/LaTex] Installing .sty package for Texstudio on Ubuntu 20.04
mathcompseems to just provide some symbols to write units. Nowadays the latex standard is to use the
texlive-latex-recommendedfrom Ubuntu. Ubuntu splits TeXLive into several Ubuntu packages (not to be confused with LaTeX packages, they often contain many latex packages). Given that
mathcompis not a widely used package it is unlikely that it is listed in
texlive-latex-recommended, might be easier to just install it all
texlive-allI think it is called(?)
Personally I don't use TeXLive from Ubuntu as I'd like to get the latest updates so I use the upstream one (see http://tug.org/texlive).
If you use Ubuntu and the TeXLive that Ubuntu provides the way you figure out which Ubuntu package a given latex package belongs to is to make sure you have
Run the latter command from time to time.
Then search a latex package via for example
and here it tells me
so I would need to install