[texhax] Changing \DeclareOption of some other packages

Mon Jun 13 15:14:01 CEST 2011

On Mon, Jun 13, 2011 at 08:41:59PM +1000, Vafa Khalighi wrote:

> Thanks a lot Heiko. I have got a similar question. Sometimes package X loads
> package Y at the beginning of the document. Now I have a package that makes
> changes to package Y but since package X loads package Y at the beginning of
> the document, my changes to package Y is not applied. Something like the
> following:
>
> \usepackage{X} %which loads package Y at \begin{document}
> \usepackage{mypackage}
>
> If a user manually loads package Y  before mypackage, changes to package Y
> are applied:
>
> \usepackage{X}
> \usepackage{Y}
> \usepackage{mypackage}
>
> However if in my package I add the following, changes to package Y are not
> applied:
>
>
> and the user loads packages as:
>
> \usepackage{X} %which loads package Y at \begin{document}
> \usepackage{mypackage}
>
> Why my changes are not applied? how can I fix it? Is there a better approach
> for applying changes to a package eventhough that package is loaded at the
> beginning of the document?

See the documentation of package hopatch (the package is just a wrapper
for other packages/classes provide features for patching packages).

Yours sincerely
Heiko Oberdiek