How to add IEEEtran to the LyX setup in Ubuntu

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.

  1. 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
  2. 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.

  3. 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 find IEEEtran.cls inside this Zip.
  4. Now add/copy the IEEEtran.cls file directly to your local LaTeX configuration. Usually this is located in: /usr/local/share/texmf
  5. 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.
  6. Restart LyX and go to Tools → Reconfigure to reconfigure LyX.
  7. Verify that reconfiguring things actually had an effect. You can determine this by checking your LyX settings directory ~/.lyx and examining the textclass.lst with any text editor. There should be a line as follows:
    "IEEEtran" "IEEEtran" "article (IEEEtran)" "true"
  8. Once you have done the above, you’re all set.

Leave a Reply