[luatex] this can't happen error with Umiddle (luatex 1.07/texlive 2018)

David Carlisle d.p.carlisle at gmail.com
Thu May 17 16:08:28 CEST 2018


On 17 May 2018 at 10:36, Hans Hagen <j.hagen at xs4all.nl> wrote:
> On 5/16/2018 10:16 AM, David Carlisle wrote:
>>
>> The following plain tex example
>>
>>
>> $\left( A \middle|  \right)$ %OK
>>
>>
>>
>> $\Uleft( A \Umiddle class 2 | B \Uright)$ %OK
>>
>>
>> $\Uleft( A \Umiddle class 2 | \Uright)$ %oops
>>
>> \bye
>>
>> produces
>>
>>
>> ! This can't happen (mathspacing).
>> l.10 $\Uleft( A \Umiddle class 2 | \Uright)$
>>                                             %oops
>> !  ==> Fatal error occurred, no output PDF file produced!
>>
>>
>>
>> I'd actually meant to have the A|B but the error message for my typo
>> seemed a bit harsh!
>>
>> Having an empty math list to the right of a class 2  \Umiddle might be
>> odd but shouldn't be an error I assume?
>
> it's a side effect of checking math spacing for noad pairs ... as we default
> to zero for (traditionally unknown) combinations anyway, we can make that
> check less stringent (so luatex 1.09+ will not abort)
>
> Hans

Thanks. I  guessed as much.

Actually that leads to another question which I don't think is quite
clear from the manual.
If you use class 2 (or 3) with any of \Uleft/right/middle at the start
or end of a math list
do they lose their mathbin/mathrel status and become \mathord, as a
classic \mathbin{} does does?


I'm guessing that the issue is that \Umiddle class 2 _doesn't_ lose
its mathbin status at the end of the list
and so put you (or me:-) in the previously impossible situation of a
class 2 atom at the end of the mathlist?

David




David


More information about the luatex mailing list