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

Hans Hagen j.hagen at xs4all.nl
Thu May 17 16:59:56 CEST 2018


On 5/17/2018 4:08 PM, David Carlisle wrote:
> 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?

that was indeed the assumption (that these combinations could not happen)

> 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?
although we tag middle fences in luatex we follow the old approach which 
treats it as a left one which then assumes that there is something at 
the right of it (which makes sense as why use a middle and not a right 
then) and because in luatex we have more spacing combinations we ran 
into this special spacing case

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the luatex mailing list