LyXTrouble accessing classes after new LyX installation

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
johns
Posts: 3
Joined: Mon Jul 21, 2014 9:31 pm

Trouble accessing classes after new LyX installation

Post by johns »

Hi, I've been using LyX for a while on my Windows PC, and have become a huge advocate.

But after recently having to reinstall Windows and then LyX/MikTeX due to various problems, something seems to be wrong with my settings:

- At first, whenever I would open a document, I'd get a message saying that the document class (usually article) couldn't be located. I then found the *.layout files -- they were in /Program Files (x86)/LyX 2.1/Resources/layouts -- and tried to pick the right one out via Document Settings, where the relevant class is still listed as "Unavailable".

- Now, when I open such a file I get a message saying that there's a further prerequisite that I'm missing, here natbib.sty.

What do I need to do here? It seems like something is wrong with the settings in the new install, though I am too stupid with computers to figure out what it is. Help!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

StarValkyrie
Posts: 89
Joined: Fri Jan 24, 2014 12:42 am

Re: Trouble accessing classes after new LyX installation

Post by StarValkyrie »

Normally, LyX will correctly pass the request to download a missing common sty or cls file for you to MikTeX's package manager and then go on to compile so I suspect this is the old All Classes Unavailable/MikTeX Settings problem again. Go to the Windows Start Menu> All Programs> MikTeX> Maintenence (Admin)> Settings (Admin) and under Package Installation, change the pulldown to "Ask Me First". Then click Refresh FNDB, then close Settings and open LyX. Under Tools, select Reconfigure and wait. Allow all the packages it says are missing to be installed (choose one of the CTAN archives if you can't reach the default one). This may take 10-20 minutes and you'll have to babysit it to click all those messages but you only have to do it once.
johns
Posts: 3
Joined: Mon Jul 21, 2014 9:31 pm

Trouble accessing classes after new LyX installation

Post by johns »

Thanks for your reply. I did what you described, and it was going fine for a while, but then I got a window with the following message:
The system reconfiguration has failed. Default textclass is used but LyX may not be able to work properly. Please reconfigure again if needed.
Reconfiguring again just brings up the same message, though.
johns
Posts: 3
Joined: Mon Jul 21, 2014 9:31 pm

Re: Trouble accessing classes after new LyX installation

Post by johns »

PS. Never mind, now it works. Thank you again!
Tom-85
Posts: 2
Joined: Tue Aug 26, 2014 3:33 pm

Re: Trouble accessing classes after new LyX installation

Post by Tom-85 »

I have a similar problem. I wanted to install an additional class (Mac, MacTex), and put it in the user folder (~/texmf/ ...). Afterwards LyX couldn't find any classes any more. Even after completely deleting the user texmf folder and performing a texhash or reinstalling LyX, none of the classes (like article.cls) are available any more.
It would be great if you could help me with this as well. Thanks in advance!

Thomas
StarValkyrie
Posts: 89
Joined: Fri Jan 24, 2014 12:42 am

Re: Trouble accessing classes after new LyX installation

Post by StarValkyrie »

If you've already tried the solution above and that didn't work, check your LyX Preferences and make sure your paths are correct. Then go to MiKTeX Maintenance (Admin)>Options and click Refresh FNDB, then when it finishes, open LyX and Reconfigure.
Tom-85
Posts: 2
Joined: Tue Aug 26, 2014 3:33 pm

Re: Trouble accessing classes after new LyX installation

Post by Tom-85 »

Thanks for your reply but I'm on a Mac with MacTex... Do you have any idea how to restore the setting there, too?
Post Reply