ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* closesymbol on same line as displayed formula
@ 2017-03-14 18:23 Mikael P. Sundqvist
  2017-03-20 13:59 ` Mikael P. Sundqvist
  0 siblings, 1 reply; 10+ messages in thread
From: Mikael P. Sundqvist @ 2017-03-14 18:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

Hi,

I'm bringing up an old question on placing the qedsymbol, or
closesymbol as it is also called. This was previously discussed in
https://mailman.ntg.nl/pipermail/ntg-context/2014/079807.html and the
purpose of this post is to ask if there is any solution to the problem
now. Looking at the file below (output is attached), when the proof
ends with a displayed formula, the closesymbol is located one row
down. I want it to be (flushright) on the same line as the displayed
formula.

If I use \placeclosesymbol the closesymbol is indeed put on the
correct line, but not flushright.

Any ideas? I'm willing to use some command like \placeclosesymbol in
the occations when the proof ends with a displayed formula.

/Mikael

\defineenumeration[proof][
number=no,
text=Proof,
headstyle={\it},
alternative=serried,
width=fit,
closesymbol={$\square$},
]

\starttext

\startproof
This is a short proof.
\stopproof

\startproof
This is another short proof, ending with the formula
\startformula
1+1=2.
\stopformula
\stopproof

\startproof
This is another short proof, ending with the formula
\startformula
1+1=2.\placeclosesymbol
\stopformula
\stopproof



\startproof
This is a rather advanced proof, ending with formulas
\startformula
\startalign
\NC 1+1 \NC = 2,\NR
\NC 2+2 \NC = 4.\NR
\stopalign
\stopformula
\stopproof

\startproof
This is a rather advanced proof, ending with formulas
\startformula
\startalign
\NC 1+1 \NC = 2,\NR
\NC 2+2 \NC = 4.\placeclosesymbol\NR
\stopalign
\stopformula
\stopproof

\stoptext

[-- Attachment #2: ctx-listexample25.pdf --]
[-- Type: application/pdf, Size: 10813 bytes --]

[-- Attachment #3: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: closesymbol on same line as displayed formula
  2017-03-14 18:23 closesymbol on same line as displayed formula Mikael P. Sundqvist
@ 2017-03-20 13:59 ` Mikael P. Sundqvist
  2017-03-20 21:20   ` Otared Kavian
  2017-03-20 22:46   ` Aditya Mahajan
  0 siblings, 2 replies; 10+ messages in thread
From: Mikael P. Sundqvist @ 2017-03-20 13:59 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Mar 14, 2017 at 7:23 PM, Mikael P. Sundqvist <mickep@gmail.com> wrote:
> Hi,
>
> I'm bringing up an old question on placing the qedsymbol, or
> closesymbol as it is also called. This was previously discussed in
> https://mailman.ntg.nl/pipermail/ntg-context/2014/079807.html and the
> purpose of this post is to ask if there is any solution to the problem
> now. Looking at the file below (output is attached), when the proof
> ends with a displayed formula, the closesymbol is located one row
> down. I want it to be (flushright) on the same line as the displayed
> formula.
>
> If I use \placeclosesymbol the closesymbol is indeed put on the
> correct line, but not flushright.
>
> Any ideas? I'm willing to use some command like \placeclosesymbol in
> the occations when the proof ends with a displayed formula.
>
> /Mikael
>
> \defineenumeration[proof][
> number=no,
> text=Proof,
> headstyle={\it},
> alternative=serried,
> width=fit,
> closesymbol={$\square$},
> ]
>
> \starttext
>
> \startproof
> This is a short proof.
> \stopproof
>
> \startproof
> This is another short proof, ending with the formula
> \startformula
> 1+1=2.
> \stopformula
> \stopproof
>
> \startproof
> This is another short proof, ending with the formula
> \startformula
> 1+1=2.\placeclosesymbol
> \stopformula
> \stopproof
>
>
>
> \startproof
> This is a rather advanced proof, ending with formulas
> \startformula
> \startalign
> \NC 1+1 \NC = 2,\NR
> \NC 2+2 \NC = 4.\NR
> \stopalign
> \stopformula
> \stopproof
>
> \startproof
> This is a rather advanced proof, ending with formulas
> \startformula
> \startalign
> \NC 1+1 \NC = 2,\NR
> \NC 2+2 \NC = 4.\placeclosesymbol\NR
> \stopalign
> \stopformula
> \stopproof
>
> \stoptext

Partly shameful bump.

Is it even possible? (It is using LaTeX and the \qedhere command)

Could I provide more information?

/Mikael
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: closesymbol on same line as displayed formula
  2017-03-20 13:59 ` Mikael P. Sundqvist
@ 2017-03-20 21:20   ` Otared Kavian
  2017-03-20 22:46   ` Aditya Mahajan
  1 sibling, 0 replies; 10+ messages in thread
From: Otared Kavian @ 2017-03-20 21:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

Hi Mikael,

Some time ago, Wolfgang gave a solution which used to work, but I experimented it again when I read your message, and now it does not work anymore… PLease have a look to the files attached (I recovered them from a TimeMachine backup).

Unfortnately the same file typeset with the latest beta, and even with the current version from TeXLIve 2016 does not give anymore the same result.

Best regards: OK

[-- Attachment #2: closesymbol-1 (original).pdf --]
[-- Type: application/pdf, Size: 22662 bytes --]

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



[-- Attachment #4: closesymbol-1 (original).tex --]
[-- Type: application/octet-stream, Size: 926 bytes --]

%!TEX TS-program = mkiv
%%%%%%%%%%%%%%%%%%%%

\definedescription
[proof]
[text=Proof.]

%\setupdescriptions[proof]
%[width=broad,distance=0.5em,
%location=serried,
%headstyle=it,
%indentnext=yes,
%indenting=yes,
%closesymbol=\square]

\setupdescriptions
 [proof]
 [width=broad,
  distance=0.5em,
  location=serried,
  headstyle=bi,
  indentnext=yes,
  indenting=yes,
  closesymbol=\mathematics{\square},
  closecommand=\ifmmode\eqno\else\wordright\fi]

%Wolfgang
%_________

\definemathcommand[Card][nolop]{\mfunction{Card}}

\starttext

\startproof
... la partizione, da cui
\startformula
{\rm Card } G^n=n!\cdot {\rm Card } \gamma_n(G). \qed 
\stopformula
\stopproof


\startproof
... un'altra prova sarebbe di dire\dots
\startformula
{\rm Card} G^n=n!\cdot {\rm Card} \gamma_n(G),
\stopformula
il quale é equivalente a quello che abbiamo detto prima. 
\stopproof

\stoptext

[-- Attachment #5: Type: text/plain, Size: 2641 bytes --]



> On 20 Mar 2017, at 14:59, Mikael P. Sundqvist <mickep@gmail.com> wrote:
> 
> On Tue, Mar 14, 2017 at 7:23 PM, Mikael P. Sundqvist <mickep@gmail.com> wrote:
>> Hi,
>> 
>> I'm bringing up an old question on placing the qedsymbol, or
>> closesymbol as it is also called. This was previously discussed in
>> https://mailman.ntg.nl/pipermail/ntg-context/2014/079807.html and the
>> purpose of this post is to ask if there is any solution to the problem
>> now. Looking at the file below (output is attached), when the proof
>> ends with a displayed formula, the closesymbol is located one row
>> down. I want it to be (flushright) on the same line as the displayed
>> formula.
>> 
>> If I use \placeclosesymbol the closesymbol is indeed put on the
>> correct line, but not flushright.
>> 
>> Any ideas? I'm willing to use some command like \placeclosesymbol in
>> the occations when the proof ends with a displayed formula.
>> 
>> /Mikael
>> 
>> \defineenumeration[proof][
>> number=no,
>> text=Proof,
>> headstyle={\it},
>> alternative=serried,
>> width=fit,
>> closesymbol={$\square$},
>> ]
>> 
>> \starttext
>> 
>> \startproof
>> This is a short proof.
>> \stopproof
>> 
>> \startproof
>> This is another short proof, ending with the formula
>> \startformula
>> 1+1=2.
>> \stopformula
>> \stopproof
>> 
>> \startproof
>> This is another short proof, ending with the formula
>> \startformula
>> 1+1=2.\placeclosesymbol
>> \stopformula
>> \stopproof
>> 
>> 
>> 
>> \startproof
>> This is a rather advanced proof, ending with formulas
>> \startformula
>> \startalign
>> \NC 1+1 \NC = 2,\NR
>> \NC 2+2 \NC = 4.\NR
>> \stopalign
>> \stopformula
>> \stopproof
>> 
>> \startproof
>> This is a rather advanced proof, ending with formulas
>> \startformula
>> \startalign
>> \NC 1+1 \NC = 2,\NR
>> \NC 2+2 \NC = 4.\placeclosesymbol\NR
>> \stopalign
>> \stopformula
>> \stopproof
>> 
>> \stoptext
> 
> Partly shameful bump.
> 
> Is it even possible? (It is using LaTeX and the \qedhere command)
> 
> Could I provide more information?
> 
> /Mikael
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________


[-- Attachment #6: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: closesymbol on same line as displayed formula
  2017-03-20 13:59 ` Mikael P. Sundqvist
  2017-03-20 21:20   ` Otared Kavian
@ 2017-03-20 22:46   ` Aditya Mahajan
  2017-03-21  6:30     ` Otared Kavian
  2017-03-21  6:51     ` Mikael P. Sundqvist
  1 sibling, 2 replies; 10+ messages in thread
From: Aditya Mahajan @ 2017-03-20 22:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 20 Mar 2017, Mikael P. Sundqvist wrote:

> On Tue, Mar 14, 2017 at 7:23 PM, Mikael P. Sundqvist <mickep@gmail.com> wrote:
>> Hi,
>>
>> I'm bringing up an old question on placing the qedsymbol, or
>> closesymbol as it is also called. This was previously discussed in
>> https://mailman.ntg.nl/pipermail/ntg-context/2014/079807.html and the
>> purpose of this post is to ask if there is any solution to the problem
>> now. Looking at the file below (output is attached), when the proof
>> ends with a displayed formula, the closesymbol is located one row
>> down. I want it to be (flushright) on the same line as the displayed
>> formula.
>>
>> If I use \placeclosesymbol the closesymbol is indeed put on the
>> correct line, but not flushright.
>>
>> Any ideas? I'm willing to use some command like \placeclosesymbol in
>> the occations when the proof ends with a displayed formula.
>>
>> /Mikael
>>
>> \defineenumeration[proof][
>> number=no,
>> text=Proof,
>> headstyle={\it},
>> alternative=serried,
>> width=fit,
>> closesymbol={$\square$},
>> ]
>>
>> \starttext
>>
>> \startproof
>> This is a short proof.
>> \stopproof
>>
>> \startproof
>> This is another short proof, ending with the formula
>> \startformula
>> 1+1=2.
>> \stopformula
>> \stopproof
>>
>> \startproof
>> This is another short proof, ending with the formula
>> \startformula
>> 1+1=2.\placeclosesymbol
>> \stopformula
>> \stopproof
>>
>>
>>
>> \startproof
>> This is a rather advanced proof, ending with formulas
>> \startformula
>> \startalign
>> \NC 1+1 \NC = 2,\NR
>> \NC 2+2 \NC = 4.\NR
>> \stopalign
>> \stopformula
>> \stopproof
>>
>> \startproof
>> This is a rather advanced proof, ending with formulas
>> \startformula
>> \startalign
>> \NC 1+1 \NC = 2,\NR
>> \NC 2+2 \NC = 4.\placeclosesymbol\NR
>> \stopalign
>> \stopformula
>> \stopproof
>>
>> \stoptext
>
> Partly shameful bump.
>
> Is it even possible? (It is using LaTeX and the \qedhere command)
>
> Could I provide more information?

What is the expected output when the last formula has an equation number?

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: closesymbol on same line as displayed formula
  2017-03-20 22:46   ` Aditya Mahajan
@ 2017-03-21  6:30     ` Otared Kavian
  2017-03-21  6:51     ` Mikael P. Sundqvist
  1 sibling, 0 replies; 10+ messages in thread
From: Otared Kavian @ 2017-03-21  6:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> On 20 Mar 2017, at 23:46, Aditya Mahajan <adityam@umich.edu> wrote:
> 
>> […]
> 
> What is the expected output when the last formula has an equation number?
> 
> Aditya

Hi Aditya,

That is a good point: if the equation numbers are on the right, there would be an ugly effect with the closesympbol near the number, but not if the equation numbers are on the left.

Personnaly I avoid finishing a displayed formula with a closymbol (since one uses sometimes the square for the D’Alembertien operator), but sometimes it it comes handy to have the possibility to add such a closesymbol.

I don’t know what has changed in recent ConTeXt mkiv which makes the solution cooked up by Wolfgang to not work anymore.

Best regards: OK
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: closesymbol on same line as displayed formula
  2017-03-20 22:46   ` Aditya Mahajan
  2017-03-21  6:30     ` Otared Kavian
@ 2017-03-21  6:51     ` Mikael P. Sundqvist
  2017-03-21 10:25       ` Mohammad Hossein Bateni
  1 sibling, 1 reply; 10+ messages in thread
From: Mikael P. Sundqvist @ 2017-03-21  6:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, Mar 20, 2017 at 11:46 PM, Aditya Mahajan <adityam@umich.edu> wrote:
> On Mon, 20 Mar 2017, Mikael P. Sundqvist wrote:
>
>> On Tue, Mar 14, 2017 at 7:23 PM, Mikael P. Sundqvist <mickep@gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> I'm bringing up an old question on placing the qedsymbol, or
>>> closesymbol as it is also called. This was previously discussed in
>>> https://mailman.ntg.nl/pipermail/ntg-context/2014/079807.html and the
>>> purpose of this post is to ask if there is any solution to the problem
>>> now. Looking at the file below (output is attached), when the proof
>>> ends with a displayed formula, the closesymbol is located one row
>>> down. I want it to be (flushright) on the same line as the displayed
>>> formula.
>>>
>>> If I use \placeclosesymbol the closesymbol is indeed put on the
>>> correct line, but not flushright.
>>>
>>> Any ideas? I'm willing to use some command like \placeclosesymbol in
>>> the occations when the proof ends with a displayed formula.
>>>
>>> /Mikael
>>>
>>> \defineenumeration[proof][
>>> number=no,
>>> text=Proof,
>>> headstyle={\it},
>>> alternative=serried,
>>> width=fit,
>>> closesymbol={$\square$},
>>> ]
>>>
>>> \starttext
>>>
>>> \startproof
>>> This is a short proof.
>>> \stopproof
>>>
>>> \startproof
>>> This is another short proof, ending with the formula
>>> \startformula
>>> 1+1=2.
>>> \stopformula
>>> \stopproof
>>>
>>> \startproof
>>> This is another short proof, ending with the formula
>>> \startformula
>>> 1+1=2.\placeclosesymbol
>>> \stopformula
>>> \stopproof
>>>
>>>
>>>
>>> \startproof
>>> This is a rather advanced proof, ending with formulas
>>> \startformula
>>> \startalign
>>> \NC 1+1 \NC = 2,\NR
>>> \NC 2+2 \NC = 4.\NR
>>> \stopalign
>>> \stopformula
>>> \stopproof
>>>
>>> \startproof
>>> This is a rather advanced proof, ending with formulas
>>> \startformula
>>> \startalign
>>> \NC 1+1 \NC = 2,\NR
>>> \NC 2+2 \NC = 4.\placeclosesymbol\NR
>>> \stopalign
>>> \stopformula
>>> \stopproof
>>>
>>> \stoptext
>>
>>
>> Partly shameful bump.
>>
>> Is it even possible? (It is using LaTeX and the \qedhere command)
>>
>> Could I provide more information?
>
>
> What is the expected output when the last formula has an equation number?
>
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

Thank you Aditya and Otared for showing some interest in this question.

I agree with you Aditya that a closesymbol could interfere with an
equation number, and I think that one should try hard to reword the
proof (or what it could be) to avoid that problem. In my current case
it is calculus examples, and some of them naturally ends with a simple
calculation, and none has an equation number.

As Otared points out, there was a working solution for a while (even
though it may have been an ugly hack with eqno), so I guess it is
somehow doable. And the closesymbol and closecommand keys are there...
I just don't know how to code a working solution (say, not taking care
of the problem with equation numbers)...

/Mikael
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: closesymbol on same line as displayed formula
  2017-03-21  6:51     ` Mikael P. Sundqvist
@ 2017-03-21 10:25       ` Mohammad Hossein Bateni
  0 siblings, 0 replies; 10+ messages in thread
From: Mohammad Hossein Bateni @ 2017-03-21 10:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 4682 bytes --]

What has changed, Otared, is that Hans reimplemented inner workings of
displayed formulas and in particular its alignment mechanisms, I suppose.
A few months back he had issued warnings that certain things may break
there.
—Hossein

On Tue, Mar 21, 2017 at 2:51 AM, Mikael P. Sundqvist <mickep@gmail.com>
wrote:

> On Mon, Mar 20, 2017 at 11:46 PM, Aditya Mahajan <adityam@umich.edu>
> wrote:
> > On Mon, 20 Mar 2017, Mikael P. Sundqvist wrote:
> >
> >> On Tue, Mar 14, 2017 at 7:23 PM, Mikael P. Sundqvist <mickep@gmail.com>
> >> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I'm bringing up an old question on placing the qedsymbol, or
> >>> closesymbol as it is also called. This was previously discussed in
> >>> https://mailman.ntg.nl/pipermail/ntg-context/2014/079807.html and the
> >>> purpose of this post is to ask if there is any solution to the problem
> >>> now. Looking at the file below (output is attached), when the proof
> >>> ends with a displayed formula, the closesymbol is located one row
> >>> down. I want it to be (flushright) on the same line as the displayed
> >>> formula.
> >>>
> >>> If I use \placeclosesymbol the closesymbol is indeed put on the
> >>> correct line, but not flushright.
> >>>
> >>> Any ideas? I'm willing to use some command like \placeclosesymbol in
> >>> the occations when the proof ends with a displayed formula.
> >>>
> >>> /Mikael
> >>>
> >>> \defineenumeration[proof][
> >>> number=no,
> >>> text=Proof,
> >>> headstyle={\it},
> >>> alternative=serried,
> >>> width=fit,
> >>> closesymbol={$\square$},
> >>> ]
> >>>
> >>> \starttext
> >>>
> >>> \startproof
> >>> This is a short proof.
> >>> \stopproof
> >>>
> >>> \startproof
> >>> This is another short proof, ending with the formula
> >>> \startformula
> >>> 1+1=2.
> >>> \stopformula
> >>> \stopproof
> >>>
> >>> \startproof
> >>> This is another short proof, ending with the formula
> >>> \startformula
> >>> 1+1=2.\placeclosesymbol
> >>> \stopformula
> >>> \stopproof
> >>>
> >>>
> >>>
> >>> \startproof
> >>> This is a rather advanced proof, ending with formulas
> >>> \startformula
> >>> \startalign
> >>> \NC 1+1 \NC = 2,\NR
> >>> \NC 2+2 \NC = 4.\NR
> >>> \stopalign
> >>> \stopformula
> >>> \stopproof
> >>>
> >>> \startproof
> >>> This is a rather advanced proof, ending with formulas
> >>> \startformula
> >>> \startalign
> >>> \NC 1+1 \NC = 2,\NR
> >>> \NC 2+2 \NC = 4.\placeclosesymbol\NR
> >>> \stopalign
> >>> \stopformula
> >>> \stopproof
> >>>
> >>> \stoptext
> >>
> >>
> >> Partly shameful bump.
> >>
> >> Is it even possible? (It is using LaTeX and the \qedhere command)
> >>
> >> Could I provide more information?
> >
> >
> > What is the expected output when the last formula has an equation number?
> >
> > 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://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki     : http://contextgarden.net
> > ____________________________________________________________
> _______________________
>
> Thank you Aditya and Otared for showing some interest in this question.
>
> I agree with you Aditya that a closesymbol could interfere with an
> equation number, and I think that one should try hard to reword the
> proof (or what it could be) to avoid that problem. In my current case
> it is calculus examples, and some of them naturally ends with a simple
> calculation, and none has an equation number.
>
> As Otared points out, there was a working solution for a while (even
> though it may have been an ugly hack with eqno), so I guess it is
> somehow doable. And the closesymbol and closecommand keys are there...
> I just don't know how to code a working solution (say, not taking care
> of the problem with equation numbers)...
>
> /Mikael
> ____________________________________________________________
> _______________________
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki     : http://contextgarden.net
> ____________________________________________________________
> _______________________
>

[-- Attachment #1.2: Type: text/html, Size: 7284 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: closesymbol on same line as displayed formula
       [not found] <mailman.2600.1535395627.2042.ntg-context@ntg.nl>
@ 2018-08-28 15:58 ` Jeong Dal
  0 siblings, 0 replies; 10+ messages in thread
From: Jeong Dal @ 2018-08-28 15:58 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1578 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 6035 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: closesymbol on same line as displayed formula
  2018-08-26 23:25 ` Jeong Dal
@ 2018-08-27 14:41   ` Aditya Mahajan
  0 siblings, 0 replies; 10+ messages in thread
From: Aditya Mahajan @ 2018-08-27 14:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

Add: \placeclosesymbol here

> \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.

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: closesymbol on same line as displayed formula
       [not found] <mailman.500.1490091956.2050.ntg-context@ntg.nl>
@ 2018-08-26 23:25 ` Jeong Dal
  2018-08-27 14:41   ` Aditya Mahajan
  0 siblings, 1 reply; 10+ messages in thread
From: Jeong Dal @ 2018-08-26 23:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 839 bytes --]


Hi, 

I am sorry to bring up old topic “Re: closesymbol on same line as displayed formula” again.
(ntg-context Digest, Vol 153, Issue 40)
Is there any progress after that?
It seems to me that there is no more discussions about it.

The same thing happens after the itemization as in the following MWE.

Thank you for reading.

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.
\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


[-- Attachment #1.2: Type: text/html, Size: 2330 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2018-08-28 15:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 18:23 closesymbol on same line as displayed formula Mikael P. Sundqvist
2017-03-20 13:59 ` Mikael P. Sundqvist
2017-03-20 21:20   ` Otared Kavian
2017-03-20 22:46   ` Aditya Mahajan
2017-03-21  6:30     ` Otared Kavian
2017-03-21  6:51     ` Mikael P. Sundqvist
2017-03-21 10:25       ` Mohammad Hossein Bateni
     [not found] <mailman.500.1490091956.2050.ntg-context@ntg.nl>
2018-08-26 23:25 ` Jeong Dal
2018-08-27 14:41   ` Aditya Mahajan
     [not found] <mailman.2600.1535395627.2042.ntg-context@ntg.nl>
2018-08-28 15:58 ` Jeong Dal

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).