Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm new to LaTeX, and I can't work out why I'm getting a warning when adding a package I downloaded (from the MATLAB website called mcode.sty).

Here is my code, \usepackage{myFolder/mcode}. I put mcode.sty in the myFolder folder. For some reason, I get the following error:

LaTeX Warning: You have requested package `matlabAssignment1/mcode'

Am I doing something wrong, or is it the program (I'm using Texmaker).

share|improve this question
    
You can try giving the full path of the mcode.sty or put the file mcode.sty in the same folder as your .tex file. –  Harish Kumar Mar 13 '12 at 4:26
    
I believe that mcode.sty needs to specify ProvidesPackage{myFolder/mcode}. –  Peter Grill Mar 13 '12 at 4:29
add comment

1 Answer

up vote 6 down vote accepted

A package is declared by writing:

 \ProvidesPackage{mcode}[\filedate\space\fileversion]

When you load the package you write,

 \usepackage{mcode}

You do not specify any folders either in the \usepackage macro or the \ProvidesPackage. What you need to do is install it in a directory where TeX can find it.

If you read the mcode.sty file, you will notice that it has been written correctly and my guess is that if you drop it in the same folder like your document, it will work with no issues.

Have a look at install package in subfolder to see how you can install it properly in a subfolder.

share|improve this answer
    
If I put it in the same folder as my tex folder, there're no warning thrown. I don't really understand why the code I have works, if you're not allowed to specifiy folders in the \uselackage. –  user968243 Mar 14 '12 at 13:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.