4

I want to know which one is suited when I try to create a package file or a class file?

Werner
  • 603,163
Jiapan
  • 731

1 Answers1

5

Use the appropriate macro for the appropriate case. That is, use \ProvidesPackage for a package (typically a .sty), \ProvidesClass for a class (a .cls) and \ProvidesFile for anything else.

One example: \ProvidesPackage does additional checking in terms of the name used by the package and that used with \usepackage. However, it also stores a package "version" if is it supplied:

\ProvidesPackage{<package name>}[<version>]

This can be used to make sure loading of packages meet a version criteria, if needed.

Werner
  • 603,163