[NTG-context] Bug with \wordright in LMTX version 2020-08-03 14:25

Otared Kavian otared at gmail.com
Tue Aug 4 14:02:46 CEST 2020

Hi Hans,

Thanks for the hint which consists in adding an \ifmmode to the definition of \qed.
However, as you suggest, one needs some other mechanism in math mode, since with your new definition of \qed the alignment of the formula changes when one adds this close symbol:

%%%% begin-example-qed.tex
a^2 + b^2 = c^2.
a^2 + b^2 = c^2. \qed
One sees that\type{\qed} in the formula changes the alignment of the formula. \qed 
%%%% end-example-qed.tex

Thanks a lot for everything: Otared

> On 4 Aug 2020, at 13:24, Hans Hagen <j.hagen at xs4all.nl> wrote:
> On 8/4/2020 11:17 AM, Otared Kavian wrote:
>> Thanks Hans for your explanations.
>> The problem I encountered is that, the command \qed is used dozens of time in my text without any issue because it was preceded by something on th eline, but the only place where it was alone after a formula resulted in the error and it was not easy for me to isolate the issue…
>> By the way, in mkii it was possible to add \qed on the last line of a math formula, but that does not work anymore:
>> \definesymbol[Fin][\mathematics{\square}]
>> \def\qed{\strut\wordright{\symbol[Fin]}}
>> \starttext
>> \startformula
>> a^2 + b^2 = c^2. \qed
>> \stopformula
>> The above formula does not show the close symbol.\qed
>> \stoptext
>> Is there a way to have something like \qed work in math formulas?
> because that's now hwpo wordright works ...
> \def\qed{\ifmmode\quad\symbol[Fin]\else\strut\wordright{\symbol[Fin]}\fi}
> but we probably need something different, something that hooks into display math
> Hans
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>       tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------

More information about the ntg-context mailing list