# [NTG-context] closesymbol on same line as displayed formula

Mon Aug 27 16:41:04 CEST 2018

On Mon, 27 Aug 2018, Jeong Dal wrote:

>
> Hi,
>
> The same thing happens after the itemization as in the following MWE.
>
> \defineenumeration[proof][text=Proof.]
>
> \setupenumeration[proof]
> 	[number=no,
> 	closesymbol=\mathematics{\square},
> 	closecommand=\ifmmode\eqno\else\wordright\fi]
>
>
> \starttext
> \startproof
> This is a simple proof.
> \stopproof
>
> \startproof
> This is another simple proof that ends with a formula
> \startformula
> 1+1=2.
> \stopformula
> \stopproof
> \startproof
> \startitemize[n]
> \item first line.
> \item second line

> \stopitemize
> \stopproof
>
> \stoptext

For display equations, there is not easy solution. (What should happen if
there is an equation number; what should happen if the display equation
overflows hsize, etc.). The latex package ntheorem implements a two pass
solution (measures where the equation number box gets placed, and then add
the close symbol below it). I am not sure how easy it is to implement such
an approach in ConTeXt.