Bug in placeformula with framed text
Hi Hans, It seems that there is a bug in the latest beta (ConTeXt vesion: 2016.07.01 16:28) when using \placeformula with a framed text environment. The numbers for the formulas are placed incorrectly, on the left as well as on the right. Also, as one may see in the example below the numbering of the formulas begins at 2 instead of 1 at the first instance, and at it continues at 6 instead of 4 in the second instance. Below is an example (sorry if it is not absolutely minimal: I ran into this bug when updating a lecture notes which uses a left frame around \proclaim stuff). I attach the PDF showing the problem. I wonder whether this is related to the new features introduced recently for math frames. The code gives correct result with ConTeXt version 2015.05.18 12:26 from TeXLive 2015). Best regards: OK %%% begin bug-framed.tex \defineframedtext[ProclaimFramed] [width=\textwidth, frame=off, leftframe=on, framecolor=darkred, rulethickness=2pt, offset=0pt, loffset=4pt, roffset=4pt, ] \defineenumeration[proclaim] [text=, before={\startProclaimFramed}, after={\stopProclaimFramed}, style=slanted, title=yes, titleleft=, titleright={.}, alternative=hanging, number=no, width=fit, right={~}, ] \definemathalignment[Lgather][n=1,align=left] \starttext \setupformulas[location=left] \startproclaim{Some elementary properties of Landau notations} Let $(a_{n})_{n}$ and $(b_{n})_{n}$, as well as $(u_{n})_{n}$ and $(v_{n})_{n}$, be sequences of complex numbers. Then: \placeformula \startformula \startLgather \NC a_{n} = O(1)\; \mbox{ and }\; u_{n} = O(1) \imply a_{n} + \lambda u_{n} = O(1) \NR[eq:O-ev-1] \NC a_{n} = O(1)\; \mbox{ and }\; u_{n} = O(1) \imply a_{n}u_{n} = O(1) \NR[eq:O-ev-2] \NC a_{n} = o(u_{n})\; \mbox{ et }\; b_{n} = O(v_{n}) \imply a_{n}b_{n} = o(u_{n}v_{n}) \NR[+] \stopLgather \stopformula \stopproclaim \blank \hairline \blank \setupformulas[location=right] \startproclaim{Some elementary properties of Landau notations} Let $(a_{n})_{n}$ and $(b_{n})_{n}$, as well as $(u_{n})_{n}$ and $(v_{n})_{n}$, be sequences of complex numbers. Then: \placeformula \startformula \startLgather \NC a_{n} = O(1)\; \mbox{ and }\; u_{n} = O(1) \imply a_{n} + \lambda u_{n} = O(1) \NR[eq:O-ev-1] \NC a_{n} = O(1)\; \mbox{ and }\; u_{n} = O(1) \imply a_{n}u_{n} = O(1) \NR[eq:O-ev-2] \NC a_{n} = o(u_{n})\; \mbox{ et }\; b_{n} = O(v_{n}) \imply a_{n}b_{n} = o(u_{n}v_{n}) \NR[+] \stopLgather \stopformula \stopproclaim \stoptext %%% end bug-framed.tex
On 7/4/2016 11:11 AM, Otared Kavian wrote:
Below is an example (sorry if it is not absolutely minimal: I ran into this bug when updating a lecture notes which uses a left frame around \proclaim stuff). I attach the PDF showing the problem. I wonder whether this is related to the new features introduced recently for math frames.
fixed in next beta ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans, Thanks a lot for having fixed the issue I was reporting. Unfortunately I found another issue related to placeformula and alignment in math mode. In the following example the use of \startalign in a \placeformula triggers a weird behavior in the sense that the following instance of \startformula gets also a number, even though one does not issue a \placeformula command. Moreover the number is placed incorrectly. In the resulting PDF I am attaching, please look at the numbers (4) and (8) placed incorrectly (and they are not wanted neither…). When one removes the \placeformula command, the result is correct. Best regards: OK %%% begin bug-placeformula-align.tex \definemathalignment[Lgather][n=1,align=left] \starttext \setupformulas[location=left] \placeformula \startformula \startLgather \NC a_{n} = O(1)\; \mbox{ and }\; u_{n} = O(1) \imply a_{n} + \lambda u_{n} = O(1) \NR[eq:O-ev-1] \NC a_{n} = O(1)\; \mbox{ and }\; u_{n} = O(1) \imply a_{n}u_{n} = O(1) \NR[eq:O-ev-2] \NC a_{n} = o(u_{n})\; \mbox{ et }\; b_{n} = O(v_{n}) \imply a_{n}b_{n} = o(u_{n}v_{n}) \NR[+] \stopLgather \stopformula \blank \hairline \blank \startformula \startalign[n=2,align=left] \NC a_{n} := {n - 1 \over n},\qquad\qquad \NC x_{n} := {n^2 + 1 \over n^2}, \NR \NC b_{n} := -1 , \NC y_{n} := -1. \NR \stopalign \stopformula \blank \hairline \blank \setupformulas[location=right] \placeformula \startformula \startLgather \NC a_{n} = O(1)\; \mbox{ and }\; u_{n} = O(1) \imply a_{n} + \lambda u_{n} = O(1) \NR[eq:O-ev-1] \NC a_{n} = O(1)\; \mbox{ and }\; u_{n} = O(1) \imply a_{n}u_{n} = O(1) \NR[eq:O-ev-2] \NC a_{n} = o(u_{n})\; \mbox{ et }\; b_{n} = O(v_{n}) \imply a_{n}b_{n} = o(u_{n}v_{n}) \NR[+] \stopLgather \stopformula \blank \hairline \blank \startformula \startalign[n=2,align=left] \NC a_{n} := {n - 1 \over n},\qquad\qquad \NC x_{n} := {n^2 + 1 \over n^2}, \NR \NC b_{n} := -1 , \NC y_{n} := -1. \NR \stopalign \stopformula \stoptext %%% end bug-placeformula-align.tex
On 05 Jul 2016, at 13:08, Hans Hagen
wrote: On 7/4/2016 11:11 AM, Otared Kavian wrote:
Below is an example (sorry if it is not absolutely minimal: I ran into this bug when updating a lecture notes which uses a left frame around \proclaim stuff). I attach the PDF showing the problem. I wonder whether this is related to the new features introduced recently for math frames.
fixed in next beta
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | 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 ___________________________________________________________________________________
participants (2)
-
Hans Hagen
-
Otared Kavian