[Tex/LaTex] Warning when loading a LaTeX package

packageswarnings

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).

Best Answer

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.