[Tex/LaTex] Installing iopart class files on Ubuntu 16.04

document-classesinstallingpackagestexliveUbuntu

I'm using a latex distribution installed on a Ubuntu 16.04.

I'm using a set of files which currently works on another workstation where Ubuntu together with the packages for the document style where installed.

To be specific, I'm trying to compile this set of files for IOP. The prreamble looks like this:

\documentclass[12pt]{iopart}

\usepackage[left, pagewise]{lineno}

\bibliographystyle{iopart-num}

\begin{document}

etc

Upon trying pdflatex myfile.tex I got the usual error:

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
 restricted \write18 enabled.
entering extended mode
(./myfile.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.

! LaTeX Error: File `iopart.cls' not found.

I tried, in different stages, and not in chronological order:

  1. sudo apt install texlive-bibtex-extra,
  2. sudo apt install texlive-full,
  3. uploading the file from Lyx (import from plain latex file), without being able to open the file,
  4. downloading the package ioplatexguidelines.tar.gz then unzipping it in a directory like /usr/share/texlive/texmf-dist/tex/latex
  5. same as above but uncompressing in /usr/share/texmf/tex/latex/
    after last two points I tried also sudo texhash.

Needless to say, I cleaned up everything before passing from one attempt to the other.

  • Still everything works with another workstation.
  • Everything else works fine on my laptop, and I've been able to apt update and apt install many packages before.
  • Even now, it seems I've installed the packages mentioned above, but with no change in the outcome.
  • The file compiles well with the revtex4-1 class (if I change that in the preamble, of course).

Currently I have a directory iopart-num with only the following files:

-rwxrwxr-x 1 root 3.6K Jan 22  2009 iopart-num.bib
-rwxrwxr-x 1 root  36K Jan 23  2009 iopart-num.bst
-rwxrwxr-x 1 root 7.1K Jan 23  2009 iopart-num.tex
-rwxrwxr-x 1 root  66K Jan 23  2009 iopart-num.pdf
-rwxrwxr-x 1 root  849 Jan 23  2009 README

I can't solve this problem and it looks highly frustrating. Can anybody help in finding the right path for the installation of the package?

Thank you in advance!

Best Answer

I moved along the lines of the suggestions given by daleif.

  • I re-deleted the directory in /usr/share/texmf/tex/latex with sudo rm -rf iopart-num (or iopart, or whatever your directory is called)
  • I downloaded the file ioplatexguidelines.tar.gz from http://ioppublishing.org/img/landingPages/guidelines-and-policies/author-guidelines.html (important: use the Unix tar compressed format; before I thought I was downloading the correct one but most probably I wasn't. Make sure you're doing so by using the IOP website.)
  • I moved the tar gzipped file to /usr/share/texmf/tex/latex/iopart-num (you have to 'sudo mkdir' it if it's not there yet). Here I had some doubts on how to chose the path, because the command "locate revtex" is detecting that package in /usr/share/doc/texlive-doc/latex/ instead.
  • sudo tar -zxvf ioplatexguidelines.ter.gz
  • sudo texhash
  • sudo apt update (not sure it's necessary though)
  • sudo texhash (yes, once again, and not sure it's necessary)
  • sudo apt update (and now, it must get it!).

Like that works.