Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

usepackage vs. RequirePackage

1,414 views
Skip to first unread message

Igor Akkerman

unread,
Mar 1, 2001, 11:17:20 PM3/1/01
to
Hi,

what exactly is the difference between \usepackage and \RequirePackage in LaTeX? Which one is
to be used in which case ?

Igor

Sven Bovin

unread,
Mar 2, 2001, 2:49:07 AM3/2/01
to

AFAIK \usepackage is a user command to make the TeX
compile use a certain LaTeX package while compiling your
document. \RequirePackage on the other hand is used by
package writers to have their LaTeX package load other
packages they need to implement certain features.

HTH

Sven

--
-----------------------------------------------------------
sven dot bovin at chem dot kuleuven dot ac dot be
-----------------------------------------------------------

Scott Pakin

unread,
Mar 2, 2001, 3:21:21 AM3/2/01
to
Sven Bovin wrote:
>
> Igor Akkerman wrote:
> >
> > Hi,
> >
> > what exactly is the difference between \usepackage and
> > \RequirePackage in LaTeX? Which one is
> > to be used in which case ?
>
> AFAIK \usepackage is a user command to make the TeX
> compile use a certain LaTeX package while compiling your
> document. \RequirePackage on the other hand is used by
> package writers to have their LaTeX package load other
> packages they need to implement certain features.

To elaborate a bit, \usepackage contains extra error checking.
If \usepackage is used before the \documentclass or after the
\begin{document}, LaTeX will output an error message. Between
\documentclass and \begin{document}, \usepackage is let-bound
to \RequirePackage (i.e., the two are equivalent).

As Sven said, \usepackage is intended for users to use in
their documents, and \RequirePackage is intended for package
authors.

-- Scott

0 new messages