Hi,
I'm afraid I'm quite new to both Lyx and latex in general, but I'm keen to learn and I figured the best way would be to dive right in. So I decided to try and write my thesis in lyx and up to now it's been great. I ran into a problem regarding the use of style-files (.sty)
When I try to view my document I get an error that the subscript.sty file is missing. Fine, no problem. I download the subscript.sty file and I read in several posts that it's as easy as putting the file in the same directory as my lyx file (Master.lyx). I do this, and the problem seems to be solved. I can now view my document.
However, I like nicely organised things. I want to put all my styles into a separate folder and have lyx read them from there. Following some research I read this should be perfectly possible.
First I find out my user directory: Help -> About Lyx. It shows me the directory is ~/.lyx/
As I understand, I can put style files here and Lyx should pick them up, right?
I add the folder and file ~/.lyx/AddedStyles/subscript.sty
I tell Lyx where to look for the new file: Tools -> Reconfigure
The lyx document cannot be viewed, I get the error that the subscript.sty is missing. Am I missing a step? Or forgetting something?
What is strange to me is that there is a file called styFiles.lst in the ~/.lyx/ folder, which I assume is the file telling Lyx where to find all the style files. I can see that Lyx is adding my custom folder to this list [the document contains: ./AddedStyles/subscript.sty on line 1 after reconfiguring]. However the file doesn't seem to be picked up by Lyx.
Any help would be very much appreciated, I don't usually post as I find most problems have been solved before but this one has me at adrift.
I'm using lyx version 2.1.2 on Scientific Linux 6.5
Thanks,
ZB
LyX ⇒ Confusion over adding .sty files
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Confusion over adding .sty files
Hi and welcome,
a usual installation of TeX Live contains all packages that come with TeX Live, on most Linux distros you can achieve that installing
The thing is that not LyX needs to find the package (sty) files, but LaTeX needs to find them.
Btw: LyX is supposed to be a tool for experienced LaTeX users.
a usual installation of TeX Live contains all packages that come with TeX Live, on most Linux distros you can achieve that installing
texlive-full
.The thing is that not LyX needs to find the package (sty) files, but LaTeX needs to find them.
Btw: LyX is supposed to be a tool for experienced LaTeX users.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.