Missing a Latex package in Fedora?

Trying to compile a Latex document on a Linux system for the first time and already running into troubles? No worries, if all you're missing are a few packages we can sort it out. But let's start from the beginning.

In just a couple of steps you'll get all you need: an IDE and texlive packages. Don't know what I'm talking about?! Just scroll down an run the commands to set up a fresh Latex installation on your Fedora :-)

Set up Texstudio — my favorite IDE

First you'll need to download Texstudio from here.

Even though many Linux distributions come with Latex already installed, do type the following commands. First get root permissions:

 su - 

Type in your password and copy the following commands in the prompt:

yum -y install texlive texlive-latex texlive-xetex
yum -y install texlive-collection-latex 
yum -y install texlive-collection-latexrecommended 
yum -y install texlive-xetex-def 

All you need to do next is to open Texstudio, enter the configuration setting and, in the build window, select PdfLaTex as default compiler. Too quick? Pay a look at the screen shot below.

tex screen shot

Well done!
Now you can compile your essay, journal article, CV, thesis., etc.. but if you're still facing problems keep on reading!

"Package not found"? Don't panic

If Texstudio says that it couldn't find a certain package used in your tex file to get an extremely fancy graph, don't panic. All you need to do now — surprise surprise — is to install that missing package!

To install a package is a real burden, but you have to do it only once and you'll see with an example how easy that is. To make things slightly more interesting let's install xypic.

Did you notice that actually the package's name is different from what is called in the LaTex file? What I means is that you want to use xypic, right. But you're using \usepackage{xy}! And guess what, the name of the package to install has another name! So, how do we actually install that package?

A small note before continuing (fluent programmers will laugh now..). If you press twice the TAB button you'll get a priceless help from you computer, something called auto completion. That's all you have to know but keep in mind that this works in many IDE's, command prompts, Matlab, etc..

So, as before login as root. Start typing:

sudo yum install texlive-xy

Then press TAB twice. You'll be given a certain number of choices, choose the following:

sudo yum install texlive-xypic.noarch

That's it! If you've installed the right package you can now compile successfully your LaTex file — don't even need to restart Texstudio.