I got this warning:

You have requested document class `Classes/PhDThesisPSnPDF',
           but the document class provides `PhDThesisPSnPDF'.

How can I silence it? It looks like a multiline warning and I don't know how to copy it in \WarningFilter command. Here is my attempt that failed:

 \WarningFilter{latex}{ `Classes/PhDThesisPSnPDF',but the document class provides `PhDThesisPSnPDF'}
  • 2
    It is warning you about an error in your document so the best way is to fix the error. use \documentclass{PhDThesisPSnPDF} not \documentclass{Classes/PhDThesisPSnPDF} – David Carlisle Feb 15 '17 at 22:40
  • thanks, that solved the problem, I also copied the class file beside the main tex file – Woeitg Feb 15 '17 at 22:44

This stems from the fact that you have PhDThesisPSnPDF.cls inside a Classes subfolder. So, the way you normally include it is to use


right? Well, there should be similarity between what is supplied within \documentclass's mandatory argument - the class - and what is written inside the mandatory argument of \ProvidesClass inside PhDThesisPSnPDF.cls. If they don't match, LaTeX throws the warning you see.

You can't use the silence package for this unless you load it before calling \documentclass. Moreover, you don't have to supply the full warning message in order to filter it; just a matching start would do.

How can you rectify this warning? One of a number of ways:

  1. Edit the PhDThesisPSnPDF.cls file inside the Classes subfolder and change




    and then directly use


    inside your document.

  2. Move PhDThesisPSnPDF.cls from the Classes folder to where you have your .tex source.

  3. Move PhDThesisPSnPDF.cls to your local TeXMF folder and rerun texhash (making it available for all documents).

  • 3
    While compartmentalisation might be important, consider option 2. – Werner Feb 15 '17 at 22:45
  • I copied the cls file to the same path ot tex file and changed \documentclass{Classes/PhDThesisPSnPDF} to \documentclass{PhDThesisPSnPDF} that solved the problem. I suppose your answer solve it as well so I accept it. – Woeitg Feb 15 '17 at 22:48
  • can you please edit the title of question so it can be more useful for others? – Woeitg Feb 15 '17 at 22:49
  • @DavidCarlisle: Sorry, I reconfigured the layout. (2) was already in use. – Werner Feb 15 '17 at 22:49

The following is directly from the templates README file:

Troubleshooting warnings

W1: I get the LaTeX Warning: You have requested document class Classes/PhDThesisPSnPDF, but the document class provides PhDThesisPSnPDF, should I be concerned?

No! Do nothing, or if you don't want any warning messages change the line near the top of the class file to \ProvidesClass{Classes/PhDthesisPSnPDF} if you're not going to install the class file in a more standard location. You can install it in a standard location like /usr/share/texmf/tex/latex/ and run texhash to reconfigure.

Please see also issue 112

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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