How to install the IOP (Institute of Physics) Latex document class for Texlive and the Lyx Document Processor (Answer Provided)

FreelanceConsultant picture FreelanceConsultant · Mar 15, 2015 · Viewed 7.2k times · Source

Background

I originally asked a question on Stackoverflow, asking how I add the IOP document class to the list of available document classes in Lyx. (I will try to remove or merge that out dated quesiton.)

I now understand that this is a 2-stage process. Stage 1 is to install IOP styles and cls files etc for Texlive, and Stage 2 is to update Lyx to be able to use these.

I have now successfully done this on a Linux Mint distro. The method is described below. I will try to keep this updated if anything changes. Hopefully I have provided enough info for anyone to be able to do this regardless of distribution or OS. If not, add a comment so I can add required info.

Useful References:

The following items helped me complete this process:

Answer

FreelanceConsultant picture FreelanceConsultant · Mar 15, 2015

Stage 1 - Installing IOP Document Files for Texlive (Or Miktex)

Windows Users: Check this link for directory location info: http://wiki.lyx.org/Layouts/Iopart

  • The first step is to download the relevant files for IOP documents from here: ftp://ftp.iop.org/pub/journals/ioplatexguidelines.tar.gz

    If this link has expired, then do a duckduckgo search for "iop latex guidelines". The IOP have a .tar.gz file with all required files for Latex publishing included.

    • The next step is to find the correct Texlive directory. For me this was: /usr/share/texlive/texmf-dist/tex/latex If you are using miktex this will be different.

    • Using root privileges, create a directory in this folder: sudo mkdir iopart

    • Again using root privilages, extract the .tar.gz archive you downloaded to the directory iopart. After doing this and running the command ls, you should see the following files:

    iopams.sty iopart12.clo IOPGraphicsGuidelines.pdf IOPLaTeXGuidelines.tex iopart10.clo iopart.cls IOPLaTeXGuidelines.pdf setstack.sty

    Not all of these are important. You may wish to read through the PDF files which contain info on how to write an IOP accepted publication. I believe the .tex file contains an example template which may help you.

    • Finally, reconfigure Texlive by running the command sudo texhash.

    • You should now have the IOP Document Latex files installed and be able to use them with texlive.

Stage 2 - Reconfigure Lyx

  • This step is trivial, open Lyx and goto: [Menu Bar] -> Tools -> Reconfigure

Stage 3 - Open a new Lyx Document and Test

  • Goto: File -> New from Template -> Select iop-article.lyx
  • Goto: Document -> Settings : Check that the document type is "iop article"
  • Click the "View" button in Lyx which compiles and opens your document.
  • You should see a example pdf file with some mock contents.