3

I've installed texlive-publishers; but, still I'm getting the error in kile: file revtex4-2.cls not found on Ubuntu 18.04.1 LTS system.

How to use revtex4-2 with Ubuntu?

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
  • 3
    The texlive-publishers package for 18.04 appears to contain revtex4.cls and revtex4-1.cls - if you need revtex4-2.cls you will need to install it manually from the APS website I think – steeldriver Jan 31 '19 at 13:39
  • thank you for your response sir..I followed the APS instruction: "To install REVTeX 4.2, unzip the revtex4-2-tds.zip file. This zip file contains all of the files in the REVTeX 4.2 distribution in the standard “TeX Directory Structure” (TDS) layout. The files can be copied directly in the local tree of your TeX distribution (for TeX Live, this would be in the texmf-local directory).".. I copied the extracted folder in the directory: usr/share/texmf..& also in usr/local/share/texmf..but still getting the same error..am I doing something wrong? – Mahendra Baingne Feb 02 '19 at 05:20
  • Try copying the .cls file directly into the directory containing your .tex document – steeldriver Feb 02 '19 at 17:45
  • that didn't work but then I copied all the remaining files from the same folder (which contains .cls file) into the current directory and it worked...thanks a lot.. – Mahendra Baingne Feb 04 '19 at 10:30

1 Answers1

1

From the CTAN website, the procedure for installing revtex4-1 in TeXLive 2018 (also works for 4.2) is as follows:

The following method works if you have installed TexLive distributions from the installer, and not from official Ubuntu repositories.

  1. Download the revtex4-2 archive anywhere.

  2. Run this command to unzip the archive in the appropriate place:

    sudo unzip revtex4-1-tds.zip -d /usr/local/texlive/texmf-local/

  3. Update the TexLive distribution with:

    sudo mktexlsr /usr/local/texlive/texmf-local

The following method works if you have installed TexLive distributions from the official Ubuntu repositories.

  1. Download the revtex4-2 archive anywhere.

  2. Run this command to unzip the archive in the appropriate place:

    sudo unzip revtex4-1-tds.zip -d /usr/local/share/texmf

  3. Update the TexLive distribution with:

    sudo mktexlsr /usr/local/share/texmf

Now, if you open a revtex template in an appropriate editor (kile, texstudio etc.) it should work without a problem.

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
lucian
  • 129
  • 3
    If TeXLive was installed from the repositories, the correct directory appears to be /usr/local/share/texmf, as found from this answer on stackexchange. This works on my Ubuntu 18.04 installation at least, while the directory you suggested does not. – poomerang Dec 17 '19 at 13:18
  • ok that is interesting. I have installed my texlive distribution using the installer and not from the repositories so my path is the one in my answer. Nice catch! – lucian Dec 17 '19 at 17:51
  • Thanks. Should I extract the whole folder to /usr/local/share/texmf ? It contains pdf files so I feel indecisive. – lan1967 Oct 31 '22 at 14:52
  • This answer does not work on Ubuntu 22.04 for installed texlive-latex-base and texlive-latex-extra! Still cannot find revtex... – levitopher Jan 06 '23 at 14:52