[NTG-context] Weird position of equation numbers for long equations

luigi scarso luigi.scarso at gmail.com
Thu May 14 19:56:43 CEST 2015


On Thu, May 14, 2015 at 7:28 PM, Aditya Mahajan <adityam at umich.edu> wrote:

> On Thu, 14 May 2015, luigi scarso wrote:
>
>  On Thu, May 14, 2015 at 5:45 PM, Aditya Mahajan <adityam at umich.edu>
>> wrote:
>>
>>  On Thu, 14 May 2015, Mojca Miklavec wrote:
>>>
>>>  Hi,
>>>
>>>>
>>>> I suspect that the equation numbering in attachment
>>>> (eq-with-chapter.png) is wrong. Shouldnt't the number be positioned on
>>>> the right (not on the left)? And in case that this positioning on the
>>>> left is intentional: is there any way or setting to force the equation
>>>> number to be moved to the right?
>>>>
>>>>
>>> This is a bug in luatex:
>>>
>>> http://tracker.luatex.org/view.php?id=807
>>>
>>> Aditya
>>>
>>>
>>>  isn't the the formula  simply too long ?
>>
>
> Yes. In tex and pdftex, when the formula is too long \eqno is placed on
> the next line, shifted to the right. In luatex, the equation number is not
> shifted.
>
> Compare the output of
>
> \hsize=2cm
> $$a^2+b^2=c^2\eqno(1)$$
> \bye
>
> for pdftex and luatex.
>
>
> Ah ok
Following the link above for the tracker 807, I have made the patch

if ((eqno_box != null) && (eqno_w == 0) && !l) {
        tail_append(new_penalty(inf_penalty));
        shift_amount(eqno_box) = line_s + line_w - eqno_w;
        append_to_vlist(eqno_box);
        g2 = 0;

and now I have the pdf in attachment
-- 
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150514/d79b57cf/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.pdf
Type: application/pdf
Size: 6636 bytes
Desc: not available
URL: <http://www.ntg.nl/pipermail/ntg-context/attachments/20150514/d79b57cf/attachment-0001.pdf>


More information about the ntg-context mailing list