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

Jeong Dal haksan at me.com
Tue Aug 28 17:58:08 CEST 2018


Dear Aditya,

Thank you for the reply.

>> \startproof
>> \startitemize[n]
>> \item first line.
>> \item second line
> 
> Add: \placeclosesymbol here
> 
>> \stopitemize
>> \stopproof
>> 
>> \stoptext
> 

It works in many cases that item content ends with words. But it is not working if the item contents end with \stopformula. If I put \placeclosesymbol before \stopformula, then it is shown just after the last word.
Anyway, it works in most cases.

Thank you again.

Best regards,

Dalyoung

%%%%%
\defineenumeration[proof][text=Proof.]

\setupenumeration[proof]
	[number=no,
	closesymbol=\mathematics{\square},
	closecommand=\ifmmode\eqno\else\wordright\fi]


\starttext
\startproof
This is a simple proof.
\startformula
1+1=2.
\stopformula
\placeclosesymbol
\stopproof

\startproof
This is another simple proof that ends with a formula
\startformula
1+1=2.
\placeclosesymbol
\stopformula
\stopproof

\startproof
\startitemize[n]
\item first line.
\item Here is an example.
        \startformula \cosh x + \sinh x = e^x,~~\cosh x - \sinh x = e^{-x}	\stopformula
The next formula is following: 
        \startformula\startalign
\NC\sinh (x + y) \NC= \frac{e^{x+y} - e^{-(x+y)}}{2} \NR
\NC 		\NC = \frac{e^x e^y - e^{-x}e^{-y}}{2}	\NR%$
\NC 	\NC = \frac{(\cosh x + \sinh x)(\cosh y + \sinh y) - (\cosh x - \sinh x)(\cosh y - \sinh y)}{2} \NR
\NC 	\NC = \sinh x \cosh y + \cosh x \sinh y         \NR
        \stopalign \stopformula
        \placeclosesymbol        
\stopitemize
\stopproof

\stoptext
%%%%%%%
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180829/35784208/attachment-0001.html>


More information about the ntg-context mailing list