Hi Wolfgang, Thanks for your explanations and the correct definition of the close symbol in an enumeration. Following up the discussions with Hans, in order to put a close sympbol at the end of a formula, I have the following for the definition of \qed: %% begin example-qed.tex \showframe \definesymbol[Fin][\mathematics{\square}] \def\qed{% \ifmmode \inrightmargin{\hskip-7.5mm\symbol[Fin]} % --> attention here \else \dontleavehmode\wordright{\symbol[Fin]} \fi} \setupformulas[location=left] \starttext One sees that \placeformula \startformula a^2 + b^2 = c^2 \stopformula which is the Pythagoras theorem. \qed Another proof of Pythagors theorem is based on the figure below in which one sees that: \placeformula \startformula (a+b)^2 = c^2 + 2ab \quad \imply \quad a^2 + b^2 = c^2. \qed \stopformula \stoptext %% end example-qed.tex Now how can I replace « \hskip-7.5mm » (which was found by trial and error…) in a robust manner so that the close symbols in the formulas are vertically aligned with the close symbols in the text? In other terms can one compute automatically the amount of negative \hskip so that the definition is correct when one changes the font size and the layout? Thanks in advance: Otared
On 5 Aug 2020, at 21:15, Wolfgang Schuster
wrote: […] Below is a cleaner version to put a symbol at the end of each proof. The \blank setting in the \PlaceProofSymbol definition moves the symbol back in the math formula to avoid the vertical space between them, you can remove it but I would at leas use \blank[back] to get rid of the empty line between the formula and the symbol.
\define[1]\PlaceProofSymbol {\blank[back,overlay]% \dontleavehmode\wordright{#1}}
\defineenumeration [proof] [ closesymbol={\symbol[square]}, closecommand=\PlaceProofSymbol]
\starttext
\startproof \startformula a^2 + b^2 = c^2 \stopformula \stopproof
\stoptext
Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________