I have the following files:


The package's name is 'mypackage'. Now, in main.tex I do


using the file path rather than the package name. This works, but warns me:

You have requested package `include/foo' but the package provides `foo'

How do I avoid this without placing the document class file elsewhere?

  • 11
    The warning is there specifically so you don't do \usepackage{include/mypackage} do \usepackage{mypackage} instead. The argument is a package name not a file path, just as you don't do \documentclass{tex/macros/latex/base/article} Commented Jun 27, 2014 at 16:37
  • 1
    Related: where to put .sty and .cls file for project
    – mvkorpel
    Commented Jun 27, 2014 at 17:17
  • If you're using MiKTeX, see How do I set the search path for MikTeX?
    – Werner
    Commented Jun 27, 2014 at 17:25
  • @Werner: Can I include something like CWD in the search path?
    – einpoklum
    Commented Jun 27, 2014 at 18:41
  • 2
    Something like CWD is already in the search path. If you put the packages in the same directory as the document, it will work fine.
    – cfr
    Commented Jun 27, 2014 at 22:21

2 Answers 2


You can disable the warning using silence package:


%Disable all warnings issued by latex starting with "You have..."
\WarningFilter{latex}{You have requested package}


Another solution was proposed here: https://tex.stackexchange.com/a/31950/65072

  • 4
    Well, I guess that'd work, but it's a workaround rather than a solution...
    – einpoklum
    Commented Mar 18, 2015 at 3:54
  • Based on other answers: tex.stackexchange.com/questions/31925/…, you can add "include" directory to your TEXINPUTS environment variable, that's the only other solution to my knowledge. But in this case you'll have a problem -- all your documents will be compiled with this new TEXINPUTS value. I use the solution with silence myself, it seems more modular.
    – Desik
    Commented Mar 18, 2015 at 8:17
  • ... but the document can't really make assumptions about the environment variables.
    – einpoklum
    Commented Apr 18, 2015 at 15:56
  • do you have any idea how I can file this as a bug report / feature request with the LaTeX project, officially?
    – einpoklum
    Commented Jan 16, 2016 at 17:12
  • 2
    I was searching for bug reporting many times - Latex community doesn't seem to use public bug trackers. You should probably contact the authors of latex/miktex/whatever by email.
    – Desik
    Commented Jan 16, 2016 at 20:57

I encountered a similar problem recently. The issue was that I'd copied original.sty in order to have a modified version modified.sty, but I'd forgotten to change \ProvidesPackage{original}[...] to \ProvidesPackage{modified}[...] in modified.sty. As such, I got the error You have requested package 'original', but the package provides 'modified'. Making the above change resolved the error.

  • Welcome to TeX.SE!
    – Mensch
    Commented Jan 7, 2023 at 14:58
  • Thanks! Happy to help where I can!
    – Matt
    Commented Jan 17, 2023 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .