Since you are here, particularly in this page, I believe that you already know what is LyX. And you must also know that when you install LyX, you get a nice template for IEEEtran. Unfortunately, it doesn’t work. Because it does not have the IEEEtrans.cls
class. Well … this article is aimed at helping you overcome this major headache. Put your aspirin away now! Things are about to get better. Thanks to this link for getting me out of this pain.
- I assume that you must have a LyX setup in your Ubuntu. If you do not have one, then install it by executing the following command in the Terminal.
sudo apt-get install lyx
- Now install the TexLive by executing the following command in the Terminal.
sudo apt-get install texlive-full
This will download more than 1GB of data, so have patience.
- Make sure you have the
IEEEtran.cls
LaTeX document class at your disposal. If you do not have it, you can obtain it from IEEE. You will findIEEEtran.cls
inside this Zip.
- Now add/copy the
IEEEtran.cls
file directly to your local LaTeX configuration. Usually this is located in:/usr/local/share/texmf
- Regenerate your LaTeX setup by executing the following command in the Terminal.
sudo texhash
You will get some result similar to the below:
texhash: Updating /usr/local/share/texmf/ls-R... texhash: Updating /var/lib/texmf/ls-R-TEXLIVEDIST... texhash: Updating /var/lib/texmf/ls-R-TEXMFMAIN... texhash: Updating /var/lib/texmf/ls-R... texhash: Done.
- Restart LyX and go to Tools → Reconfigure to reconfigure LyX.
- Verify that reconfiguring things actually had an effect. You can determine this by checking your LyX settings directory
~/.lyx
and examining thetextclass.lst
with any text editor. There should be a line as follows:"IEEEtran" "IEEEtran" "article (IEEEtran)" "true"
- Once you have done the above, you’re all set.