7

After installing Lyx on my new laptop running Windows 10, there are no document classes available to use. Do I have to download a document class collection maybe or how would I fix this issue? enter image description here

Vas
  • 71
  • Welcome to TeX.SE. See at the link http://tex.stackexchange.com/questions/84918/how-to-install-an-unavailable-document-class-for-lyx-on-mac or http://tex.stackexchange.com/questions/150887/using-a-new-document-class-template-with-lyx. – Sebastiano Jan 23 '17 at 11:30
  • Do you have a distribution of LaTeX installed, like MiKTeX or TeX Live? – Werner May 20 '17 at 03:23

4 Answers4

5

I had the same problem. I tried various things and the following helped although I didn't know if any steps were unneeded.

  1. Did these steps from https://wiki.lyx.org/Layouts/Layouts#toc1

    If all or most layouts are missing from LyX in Windows 8 (and possibly Windows 7) files need to be copied from the application directory to the users directory. This was used with LyX 2.1.1.

    • Copy the files in C:/Program Files (x86)//Resources/layouts/
    • Paste the files into C:/Users//AppData/Roaming//layouts/
    • You will have to view hidden files in order to see the AppData folder.
    • In command prompt, run texhash or C:/Program Files (x86)//miktex/bin/texhash.exe
    • Then, in LyX click Tools > Reconfigure; when finished restart LyX. The layouts should become available.
  2. Started MiKTex Package Manager (Admin) At one point it complained about an invalid repository so change repository source

  3. Started the MiKTeX Package Manager and installed some packages of the thousands available.

  4. In DOS window, ran “texhash”

  5. In Lyx, do Tools -> Reconfigure

Repeat steps 3., 4., and 5. as needed.

Hope that helps.

Mensch
  • 65,388
Art D
  • 51
  • For me texhash complains that initexmf: warning: Option --admin should be specified when running this program with administrative privileges. But when I add this argument it complains also. I did get the layouts back though, so thanks! – John Alexiou Aug 16 '18 at 17:36
  • Typo: C:/Program Files (x86)//Resources/layouts/ should be C:/Program Files (x86)/LyX 2.x/Resources/layouts/ – John Alexiou Oct 14 '18 at 15:11
  • As at 13 May 2020 these instructions still work going from LyX 2.2.1 to 2.3.4 with an underlying MikTex 2.9 distribution. Link to https://wiki.lyx.org/Layouts/Layouts has details, takes 3mins to fix. – Mark Kortink May 13 '20 at 01:07
1

For MacOS users:

  1. Install the full version of MacTeX.
  2. Run sudo texhash in terminal.
  3. Run LyX->Tools->Reconfigure

This will enable most cls articles already contained in MacTeX but not all.

Vicky
  • 21
1
  1. In LyX >> Tools >> Preferences >> Path >> PATH prefix, add the line: C:\Program Files\MiKTeX 2.x\tex\latex
  2. Run LyX >> Tools >> Reconfigure Done
1

For me (Windows 10, x64 miktex)

  1. opening the miketex console >> overview >> check for updates, then following the directions to restart miketex
  2. opening LyX >> tools >> reconfigure and again restarting as requested solved the problem.