Re: [NTG-context] Weird position of equation numbers for long equations
On Fri, May 15, 2015 at 7:07 PM, luigi scarso wrote: a patch is available in trunk, rev. 5244 (not in TeXLive 2015) . Thank you, but something seems wrong. \starttext \hsize=2cm \dorecurse{10}{hi } $$a\eqno(a)$$ \placeformula \startformula a \stopformula $$a^2+b^2=c^2\eqno(b)$$ \placeformula \startformula a^2+b^2=c^2 \stopformula \placeformula \startformula a\dorecurse{24}{+a} \stopformula \stoptext Mojca eqno.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
On 5/16/2015 6:58 PM, Mojca Miklavec wrote: \hsize=2cm $$a^2+b^2=c^2\eqno(b)$$ It's what happens with a too wide formula + number (in context you see an extra shift as we also have some distance between the formula and number). It's sort of a side effect of lack of control over what tex does (i can imagine a solution i.e. lap left or right depending on the location but that would then have to be under control of (say) \matheqoverflowmode or so (0 = normal, 1 = lap back into the text, 2 ...). I will have a look at it but it's not a short term solution for your problem the too wide formula, unless you do a local \setupformulas [distance=-2cm] or so). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
On Fri, May 15, 2015 at 12:06 AM, Hans Hagen pra...@wxs.nl wrote: On 5/14/2015 7:56 PM, luigi scarso wrote: 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 it will take a bit more work so no quick patch as we also need to check what happens in r2l mode (the code is similar to pdftex but luatex has a whole bunch of extra code related to directions) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ a patch is available in trunk, rev. 5244 (not in TeXLive 2015) . -- luigi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Weird position of equation numbers for long equations
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? In any case I suspect that the equation in question could somehow be squeezed into the available space in one line. What's the best trick to squeeze the equation into a single line? Some kind of \hbox to 0pt{\hss [content] \hss} trickery or does there exist something better? Minimum problematic example: \starttext \placeformula \startformula \dorecurse{28}{a+} \stopformula \stoptext Thank you, Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
On Thu, 14 May 2015, luigi scarso wrote: On Thu, May 14, 2015 at 5:45 PM, Aditya Mahajan adit...@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. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
On Thu, May 14, 2015 at 5:45 PM, Aditya Mahajan adit...@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 ? \starttext \placeformula \startformula 0\dorecurse{24}{+a} \stopformula \placeformula \startformula 0\dorecurse{25}{+a} \stopformula \placeformula \startformula 0\dorecurse{35}{+a} \stopformula -- luigi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
On Thu, May 14, 2015 at 7:28 PM, Aditya Mahajan adit...@umich.edu wrote: On Thu, 14 May 2015, luigi scarso wrote: On Thu, May 14, 2015 at 5:45 PM, Aditya Mahajan adit...@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 test.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
On Thu, 14 May 2015 18:44:53 +0200 Mojca Miklavec mojca.miklavec.li...@gmail.com wrote: On Thu, May 14, 2015 at 5:45 PM, Aditya Mahajan 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 Thanks. I'll just put \cite[luatex_807] next to the equation then to make my supervisor happy ;) @BUGREPORT{luatex_807, title = Bad position equation number Lualatex, journal = LuaTeX bug tracker, number = 807, year = 2013, month = feb, url = http://tracker.luatex.org/view.php?id=807;, } Mojca \setupbtx [default:list:bugreport] [style=bold,color=red -- Alan Braslau CEA DSM-IRAMIS-SPEC CNRS URA 2464 Orme des Merisiers 91191 Gif-sur-Yvette cedex FRANCE tel: +33 1 69 08 73 15 fax: +33 1 69 08 87 86 mailto:alan.bras...@cea.fr Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
On Thu, May 14, 2015 at 5:45 PM, Aditya Mahajan 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 Thanks. I'll just put \cite[luatex_807] next to the equation then to make my supervisor happy ;) @BUGREPORT{luatex_807, title = Bad position equation number Lualatex, journal = LuaTeX bug tracker, number = 807, year = 2013, month = feb, url = http://tracker.luatex.org/view.php?id=807;, } Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
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 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
On Thu, 14 May 2015 15:54:16 +0200 Mojca Miklavec mojca.miklavec.li...@gmail.com 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? In any case I suspect that the equation in question could somehow be squeezed into the available space in one line. What's the best trick to squeeze the equation into a single line? Some kind of \hbox to 0pt{\hss [content] \hss} trickery or does there exist something better? Make a small angle approximation and express your angles in radians. This simplifies the equation significantly... ;-) (I know that this does not help much, but I couldn't resist!) Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Weird position of equation numbers for long equations
On 5/14/2015 7:56 PM, luigi scarso wrote: 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 it will take a bit more work so no quick patch as we also need to check what happens in r2l mode (the code is similar to pdftex but luatex has a whole bunch of extra code related to directions) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___