Closed u-fischer closed 3 months ago
That final message is very strangely worded!
But something like that should be the principal message.
@car222222 It is not strangely worded, it is just not the message you expect seeing. The above LaTeX error says that some L3 layer message is not found (probably misnamed), it is not saying anything about \item in the wrong place.
Yes, OK. I see now why it looks strange. Maybe it is OK for what it is.
@FrankMittelbach I would suggest to change the test and message to
\cs_if_free:NTF \@@_item_instance:n %%FMi?
%{ \msg_error:nnn { @@ } { item-in-nonlist } { \item[{#1}] } }
{
\@latex@error{Lonely~\string\item--perhaps~a~missing~
list~environment}\@ehc
}
This would give the standard error:
! LaTeX Error: Lonely \item--perhaps a missing list environment.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.181 \item x
xx
OK?
That suggested message, whilst very amusing, is somewhat too vague . . . or not?
That is the standard message you get since 30 years or so. I simply copied it from latex.ltx.
OK with me!
That suggested message, whilst very amusing, is somewhat too vague . . . or not?
actually you might be the one who invented it :-) or I or David at the time matching perhaps a missing \item
with a smile
That suggested message, whilst very amusing, is somewhat too vague . . . or not?
actually you might be the one who invented it :-) or I or David at the time matching
perhaps a missing \item
with a smile
or Rainer:-)
% \changes{LaTeX2.09}{1991/11/04}
% {(RmS) added default definition for \cs{makelabel},
% to produce an error message.}
or Rainer ... but we have all been guilty of agreeing to this message (and I still think it is a nice and matching one).
No guilt needed!
If one use an \item outside a list one get the error message
If one define the command
the message changes to