TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using TexMaker on ubuntu 12.04 to edit my Latex-documents. Lately, I needed to create a chemical structure with 'chemfig'. However, this package is not included in the 'TexLive-all'-package and thus, I had to install it manually. Here's how I did it:

share|improve this question
up vote 1 down vote accepted
  1. Download the required package online (for e.g. on CTAN).
  2. If it's zipped, unzip the archive to a place where it's easily accessible such as your desktop.
  3. Open a terminal (ctrl+alt+t) and type: sudo nautilus
  4. Hit enter and type in your password and confirm with enter.
  5. This will open a window in which you have administrator-rights, meaning you can copy or move files in your system-directory.
  6. In this window, navigate to /usr/share/texmf-texlive/tex/latex and create a folder with the name of your package (for e.g. Chemfig if your package is called chemfig.sty).
  7. Copy the files chemfig.sty, chemfig.tex and t-chemfig.tex to your freshly created folder and assure the files were really copied. If they weren't go back to step 3 and make sure you run the command correctly.
  8. Open another terminal (ctrl+alt+t) and run the following command: texhash

You should now be able to use the package in your Latex-editor. If not, a restart should help.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.