[Tex/LaTex] Installing packages for linux on texworks

installing

I am fairly new to ubuntu and I just installed TexWorks. Everything works fine but can someone give me step by step to install packages. With Windows I used the MikTex package manager but I am lost on how to install packages for linux.

Please let me know the best and easiet solution.

Thanks

Best Answer

Texworks is a TeX editor, not a TeX distribution (as far as I know). The way to manage packages will depend on which TeX distribution you are using / how you installed TeX. The most common are installing TeX Live either through Ubuntu's package manager (apt-get or a GUI version of it) or manually (tlmgr).

apt-get

If you installed TeX through Ubuntu's package manager, everything will be handled through it too. Look for packages called texlive-..., i.e., to install pstricks, use the command

apt-get install texlive-pstricks

This way of installing teX on Ubuntu is common as it easy, but the drawback is that packages can be (significantly) outdated, as updates are infrequent.

tlmgr

Installing TeXLive directly (called a "vanilla" installation) is a little more hassle, but you get the benefits of an up-to-date installation.
There is already a howto on TeX.sx on how to perform such an installation: How to install "vanilla" TeXLive on Debian or Ubuntu?
As for how to manage packages, you will then be using a tool called tlmgr. The full documentation is available online, and the short answer is that you install packages with

tlmgr install <package name>

and update the whole system with

tlmgr update -all