Open main menu

Changes

that way. Normally a formula will adapt its left indentation to the environment:
<contextsource="yes">\setuppapersize[A5]\setuppapersize[A5]\setuplayout[textwidth=8cm]This is a bit of text for purpose of example.\epar
\startitemize
\item This is some other example text.\epar
\placeformula \startformula c^2 = a^2 + b^2 \stopformula
\item This is yet other example text.\epar
\stopitemize
This is a bit more text for other purpose of example.\epar
</context>
In the next examples we explicitly align formulas to the left ({{cmd|raggedleft}}), center and right ({{cmd|raggedright}}):
In the next examples we explicitly align formulas with {{cmd|setupformulas}}, to the left (<code>raggedleft</code>), center (<code>middle</code>, and right (<code>raggedright</code>): <context source="yes" text="Or in print:">
\setuppapersize[A5]
\setuplayout[textwidth=8cm]
With formula numbers the code is:
<context source="yes" text="And the formulas look like:">\setuppapersize[A5A7,landscape]
\setuplayout[textwidth=8cm]
\starttext\setupformulas[align=leftflushleft]\placeformula startplaceformula\startformula c^2 = a^2 + b^2 \stopformula\stopplaceformula  
\setupformulas[align=middle]
\placeformula startplaceformula \startformula c^2 = a^2 + b^2 \stopformula\stopplaceformula  \setupformulas[align=rightflushright]\placeformula startplaceformula \startformula c^2 = a^2 + b^2 \stopformula\stopplaceformula \stoptext
</context>
\setuplayout[textwidth=8cm]
\tracemathtrue
\setupformulas[align=left]\placeformula \startformula c^2 = a^2 + b^2 \stopformula\setupformulas[align=middle]startplaceformula\placeformula \startformula c^2 = a^2 + b^2 \stopformula\setupformulas[align=right]\placeformula \startformula c^2 = a^2 + b^2 \stopformulastopplaceformula
</context>
1,047

edits