On 8/3/2020 10:10 PM, Otared Kavian wrote:
Hi Hans,

A file which used to be typeset correctly with the previous versions of lmtx, 
now produces an error. Despite the error message being extremely cryptic:

Error      ! Missing number, treated as zero

I could guess the origin of the bug, which seems to be \wordright,  but 
although the following minimal example shows a bug it does not produce the same 
ERROR output page:

%%%% the square ''end of proof''
\definesymbol[Fin][\mathematics{\square}]
\def\qed{\wordright{\symbol[Fin]}}

\starttext
\startformula
a^2 + b^2 = c^2
\stopformula
\qed % the problem is here
\stoptext

In the above example if one adds something before \qed, then the square 
end-of-proof appears.
However in my real file ConTeXt ouputs an error page and says: Error       ! 
Missing number, treated as zero.
One can debate if the old behavior was ok ... wordright is meant for adding something at the end of a paragraph and you have none here. You can add a \strut in your definition to force a line.

The lmtx implementation actually permit this:

\definesymbol[Fin][\mathematics{\square}]
\def\qed{\strut\wordright{\symbol[Fin1]}\wordright{\symbol[Fin2]}\wordright{\symbol[Fin3]}}

\starttext
\startformula
a^2 + b^2 = c^2
\stopformula
\qed % the problem is here
\stoptext

i'm still exploring this but it has to do with collecting stuff, as in:

\wordright{before} test \par

test \wordright{before} \par

(i'll look at the number issue which indeed looks a like a bug)

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

Reply via email to