Sometimes, from a \PackageError{} command, LaTeX stops saying
something like "runaway argument? Paragraph ended before PackageError was
complete".
In some package, I've found a mysterious (to me ;-) \@ehc immediately
after the \PackageError command, which seems to solve the problem.
Can somebody enlighten me? Is this \@ehc the standard way to avoid the
problem ?
Thanks.
--
/ / _ _ Didier Verna http://www.inf.enst.fr/~verna/
- / / - / / /_/ / E.N.S.T. INF C201.1 mailto:ve...@inf.enst.fr
/_/ / /_/ / /__ / 46 rue Barrault Tel. (33) 01 45 81 73 46
75634 Paris cedex 13 Fax. (33) 01 45 81 31 19
> Sometimes, from a \PackageError{} command, LaTeX stops saying
>something like "runaway argument? Paragraph ended before PackageError was
>complete".
>
> In some package, I've found a mysterious (to me ;-) \@ehc immediately
>after the \PackageError command, which seems to solve the problem.
>
> Can somebody enlighten me? Is this \@ehc the standard way to avoid the
>problem ?
In opposite of \PackageWarning and \PackageInfo \PackageError requires
an additional argument. It contains the help text, if the user presses
'h' as response to the error message. \@ehc is defined in latex.ltx
(lterror.dtx) and contains a default text, if the author of a package
don't want to provide an individual help text for his error message.
It is possible that an author can forget this additional argument.
This produces then the "runaway argument" error. If you detect this,
you should inform the author with a bug report, so he can correct the
error.
Yours sincerely
Heiko <ober...@ruf.uni-freiburg.de>
> In opposite of \PackageWarning and \PackageInfo \PackageError requires
> an additional argument. It contains the help text, if the user presses
> 'h' as response to the error message. \@ehc is defined in latex.ltx
> (lterror.dtx) and contains a default text, if the author of a package
> don't want to provide an individual help text for his error message.
A very clear answer. Thanks!
> It is possible that an author can forget this additional argument.
> This produces then the "runaway argument" error. If you detect this,
> you should inform the author with a bug report, so he can correct the
> error.
In that particular case, it's easy because I'm the author in question :-)
> Hi!
>
> Sometimes, from a \PackageError{} command, LaTeX stops saying
> something like "runaway argument? Paragraph ended before PackageError was
> complete".
>
> In some package, I've found a mysterious (to me ;-) \@ehc immediately
> after the \PackageError command, which seems to solve the problem.
>
> Can somebody enlighten me? Is this \@ehc the standard way to avoid the
> problem ?
>
You are not giving \PackageError enough arguments.
it takes three
1. the package name
2. the error message
3. the help text. (ie what the user sees if she types `h' to the error
prompt)
You can put any text string in the third argument, but there are a few
off the shelf and not very helpful messages you may use, \@ehc is one
of them, it says
Try typing <return> to proceed.
If that doesn't work, type \space X <return> to quit.
David