defineformula

From ConTeXt wiki

\defineformula[][...=...]

\defineformula[MY][
	align=left,
	strut=no,
 	spacebefore=, 
 	spaceafter=,  
]


% so you can modify the settings of defineformula[MY]
\setupformulae[MY][align=right,strut=yes,spacebefore=medium,spaceafter=big]

% so we can create new start-stopsmallformula
\definestartstop[smallformula]
  [before={\startformula[small]},
   after=\stopformula,
	]

% and we can so create new start-stopmysmallformula:
\definestartstop[mysmallformula]
  [before={\startMYformula[small]},
   after=\stopMYformula,
	]

% and here is my shortcuts:
\let\bmyformula\startmysmallformula
\let\emyformula\stopmysmallformula



\starttext

\title{Example of use and behavior}

startformula:

\startformula
	c^2 = a^2 + b^2
\stopformula

startformula$[$small$]$:

\startformula[small]
	c^2 = a^2 + b^2
\stopformula

startformula[8pt]:

\startformula[8pt]
	c^2 = a^2 + b^2
\stopformula

startsmallformula:

\startsmallformula
	c^2 = a^2 + b^2
\stopsmallformula


startmysmallformula:

\startmysmallformula
	c^2 = a^2 + b^2
\stopmysmallformula

startMYformula:

\startMYformula
	c^2 = a^2 + b^2
\stopMYformula

startMYformula[5pt]:

\startMYformula[5pt]
	c^2 = a^2 + b^2
\stopMYformula


bmyformula:

\bmyformula
	c^2 = a^2 + b^2
\emyformula



\stoptext

This produces: