[tex-eplain] Error message by \RequirePackage

Dan Luecking luecking at uark.edu
Tue Oct 3 23:14:09 CEST 2006


I would like to request/suggest a change to the way packages are
handled in recent eplain.

The eplain implementation of \RequirePackage/\usepackage produces
an error message if the given package has already been loaded.
If the user continues past the error, the package is then loaded
anyway.

It would be better if it simply wrote a message and then skipped
the loading. Inputting a macro file twice is almost never a good
idea, so if a second loading of a package is attempted, it should
be detected and avoided, but it need not generate an error.

I am trying to write a package that will work under both LaTeX
and plain TeX (with or without eplain). I also want to use the
graphicx, ifpdf and keyval packages. If I write, for example,
\RequirePackage{ifpdf}, then LaTeX accepts it (even if ifpdf was
previously loaded), but eplain always produces an error because
ifpdf.sty has already been loaded by the eplain kernel. And finally,
if I do it in plain TeX without eplain, then my own simplified
\RequirePackage implementation will not complain.

I would rather not have my package overwrite eplain's macros,
but I need to allow for loading packages that might themself load
other packages (via \RequirePackage) without a user having to check
for a repeated \RequirePackage.

LaTeX's behavior is this: if a second loading is attempted it won't
load it, and it generates an error only if the options the second
time are not a subset of the options on the first loading.

Dan


Daniel H. Luecking
Department of Mathematical Sciences
University of Arkansas
"I reject your reality, and substitute my own." -- Adam Savage




More information about the tex-eplain mailing list