[tex-eplain] Incorporating url.sty
geolsoft at mail.ru
geolsoft at mail.ru
Tue Aug 23 11:31:17 CEST 2005
On Mon, Aug 22, 2005 at 10:47:55PM +0200, Karl Berry wrote:
> How about if we just make it inner before including url.sty?
> Just \let\+=\tabalign ?
Sorry, Dan Luecking informed me that a new version, 3.2
(27-Jun-2005), is available. It does not have the problem
with \+, and it provides \Url at HyperHook which we can use to
turn the URL into a hyperlink.
> \pkgoptions[...]{url}
[..]
> That seems like too much infrastructure, though.
Can there be too much infrastructure :)? Actually, this
gives me another idea. This might not be important for the
packages we incorporate, like url.sty, because for them, we
can write our own macro to set the options since we know
what the options are and how to set them (the package is
"frozen" into Eplain).
But for the packages we \input, like color.sty, we don't
know what options the local user's version supports, and
what is the correct way to set them.
To cover such cases, my suggestion is the following.
miniltx.tex defines \DeclareOption to be \@gobbletwo. Why
don't we redefine it as something like this:
\def\DeclareOption#1#2{%
\expandafter\def\csname pkgoption at PKGNAME@#1\endcsname{#2}%
}%
where PKGNAME will be set to the name of the package we are
loading. And now we could define \pkgoptions as something
like this:
\pkgoptions#1#2{%
\csname pkgoptions@#2@#1\endcsname
}%
(of course, we would check for undefined options and report
them). This way, we are independent of the local
implementation of the options. Of course, this might fail
for options which require too much LaTeX not covered by
miniltx.tex, but it is better than no options at all, I
think.
BTW, why the first parameter to \pkgoptions is optional?
Does this call make any sense: \pkgoptions{url}?
Thanks for the comments to everybody.
--
Best regards,
Oleg Katsitadze
More information about the tex-eplain
mailing list