On Fri, Jan 14, 2011 at 3:13 AM, Matthieu Stigler < [email protected]> wrote:
> Hi > > Thanks to you Christopher, Paul and Richard for your answer! Sorry if I did > not thank earlier, I had not realised (not e-mail notif) that you had > replied! Below my answer > > > You have a space in the path to the file. Does it work if you escape >> the space? >> >> Or rename the file to eliminate it? Linux sometimes doesn't play well >> with filenames containing whitespace. >> >> Chris Menzel >> > > Unfortunately, it still does not work even when the path contains no > spaces. Also, it does not work neither with relative or absolute paths. Most > surpsisingly, it does not work even when I put the .sty file in the temp > file used by Lyx... > > Do you have any idea how I can use a package that is not in the texmf tree? > I just tried adding this package: > > http://svn.r-project.org/R/trunk/share/texmf/tex/latex/Sweave.sty > > Do you have the same problem on your confugrations (mine is Lyx 1.5.6 on > Ubuntu 10.4)? > Hi Mat, I can offer no specific help, but I can confirm that loading packages outside of the texmf tree works for me when you specify the absolute path. I often use lines such as: \usepackage{/home/stefano/Papers/The-paper-I-am-working-on/Package-file.sty} I am on Ubuntu 10.10 with Texlive 2010 and Lyx 1.5.8. Have you thought about putting your packages in the local branch of the texmf tree, though? In my understanding, ~/texmf is meant to be used for personal packages, customized versions of standard packages, etc. I had the habit of working with customized LaTeX code in the document´s directory, but I then switched to the local branch of the texmf tree and I think it works better. Less clutter, fewer possibilities of version conflicts, etcetera. Cheer, Stefano > > Thanks a lot > > Matthieu > > > > Le 30. 12. 10 13:59, Richard Heck a écrit : > >> On 12/30/2010 07:00 AM, mat wrote: >> >> Hi >>> >>> I wish to use local latex class in my lyx document. Were it pure latex >>> code, I could have written: >>> \usepackage{./newclass} >>> >>> when the .sty is at the same level than the .tex. Now, I have some >>> problems doing so with lyx, I tried adding this in the preamble, either with >>> a relative path or an absolute one, but unfortunately it does unfortunately >>> not work, I get an error message... >>> Latex Error: File newclass.sty not found >>> >>> And below the error message, a quite cryptic: cannot \read from terminal >>> in nonstop mode... >>> >>> Do you see what I do wrong? I checked the doc but did not find mention on >>> how to use local packages, is there something? Do you see how I can solve >>> the problem? >>> >>> Why not just put the package somewhere LaTeX can find it? >> >> It should work with an absolute path. >> >> Richard >> >> >
