f

#### incalc.sty, kvsetkeys.sty and packages for use with (e)TeX

Hello Mr Oberdiek,

1) I noticed that you leave the command ...@AtEnd
defined after the end of the input.

\TMP@EnsureCode...
\edef\...@AtEnd{\...@AtEnd \noexpand \endinput }

May be you could add \let\noexpand\...@AtEnd =\relax
(or \noexpand\@undefined).

2) I don't know it this is wanted or even possible
to know if a package is loaded by \RequirePackage
or via \input or \InputIfFileExits (may be the
file stack contain some information) but if you:

\input intcalc.sty\relax

in a LaTeX document you get either:

LaTeX Warning: You have requested package `',
but the package provides `intcalc'.

Or:

! LaTeX Error: Can be used only in preamble.

The fact that each line conciensciously end with %
makes me think that that file could be loaded anywhere...
But i admit this 2) point is also a question of design.

Best regards.
 0
gouailles (1755)
11/23/2012 10:13:10 PM
comp.text.tex 39027 articles. 3 followers.

2 Replies
1131 Views

Similar Articles

[PageSpeed] 5

GL <gouailles@gmail.com> wrote:

> 1) I noticed that you leave the command ...@AtEnd
> defined after the end of the input.
>
> Your packages generally starts with:
> \TMP@EnsureCode...
> \edef\...@AtEnd{\...@AtEnd \noexpand \endinput }
>
> May be you could add \let\noexpand\...@AtEnd =\relax
> (or \noexpand\@undefined).

I have added it (\@undefined) for the packages that define
`\...@AtEnd' with a final `\endinput' at least.

> 2) I don't know it this is wanted or even possible
> to know if a package is loaded by \RequirePackage
> or via \input or \InputIfFileExits (may be the
> file stack contain some information) but if you:
>
> \input intcalc.sty\relax

LaTeX performs additional work in \usepackage/\RequirePackage.

> in a LaTeX document you get either:
>
> LaTeX Warning: You have requested package `',
>                 but the package provides `intcalc'.

The requested package is not set by \input.

> Or:
>
> ! LaTeX Error: Can be used only in preamble.

Many commands are restricted to the preamble in LaTeX. An example is

> The fact that each line conciensciously end with %

Not each line.

> makes me think that that file could be loaded anywhere...

It is just a measure to prevent unwanted spaces.
(An alternative would be using `\endlinechar=-1 '.

> But i admit this 2) point is also a question of design.

other design questions:
* local/global scope,
* options,
* ...
And since nobody (except you of course :-)) would know or even expect
this "feature", there is no point in implementing it except wasting
time.

--
Heiko Oberdiek
 0
11/24/2012 7:50:17 AM
Le 24/11/2012 08:50, Heiko Oberdiek a �crit :
> GL <gouailles@gmail.com> wrote:
>
> I have added it (\@undefined) for the packages that define
> `\...@AtEnd' with a final `\endinput' at least.

Well. You told me you had a script to prepare the .dtx so
i thought you wouldn't mind of the "request".

> And the support for arbitrary package loading would arise lots of
> other design questions:
> * local/global scope,
> * options,
> * ...
> And since nobody (except you of course :-)) would know or even expect
> this "feature", there is no point in implementing it except wasting
> time.
>

I don't expect it ! Departing from the LaTeX rules for package loading
may be seen as a faulty feature.

Thanks. Have a nice day.
 0
gouailles (1755)
11/24/2012 12:16:57 PM