ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Bug in placeformula with framed text
@ 2016-07-04  9:11 Otared Kavian
  2016-07-05 11:08 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Otared Kavian @ 2016-07-04  9:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 2576 bytes --]

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


[-- Attachment #2: bug-framed.pdf --]
[-- Type: application/pdf, Size: 17956 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug in placeformula with framed text
  2016-07-04  9:11 Bug in placeformula with framed text Otared Kavian
@ 2016-07-05 11:08 ` Hans Hagen
  2016-07-05 22:05   ` Otared Kavian
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2016-07-05 11:08 UTC (permalink / raw)
  To: ntg-context

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Bug in placeformula with framed text
  2016-07-05 11:08 ` Hans Hagen
@ 2016-07-05 22:05   ` Otared Kavian
  0 siblings, 0 replies; 3+ messages in thread
From: Otared Kavian @ 2016-07-05 22:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 2071 bytes --]

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

[-- Attachment #2: bug-placeformula-align.pdf --]
[-- Type: application/pdf, Size: 12828 bytes --]

[-- Attachment #3: Type: text/plain, Size: 1300 bytes --]



> On 05 Jul 2016, at 13:08, Hans Hagen <pragma@wxs.nl> 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
> ___________________________________________________________________________________


[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-05 22:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-04  9:11 Bug in placeformula with framed text Otared Kavian
2016-07-05 11:08 ` Hans Hagen
2016-07-05 22:05   ` Otared Kavian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).