Equation alignment

i know that to align text you need to use HTML syntax:
<p style="text-align:center;">text</p>
But if I want to align an equation($\varSigma=\lbrace a\rbrace$), how can i do it?
Because with that expression i can't:
<p style="text-align:center;">$\varSigma=\lbrace\epsilon\rbrace$</p>

Multi-line equation alignment

It's a bit verbose, but you can try something like

	D F(x, y) &= \text{rotate and scale}(x, y)\\
		&= r \begin{pmatrix}
			\cos Ο‘ & -\sin Ο‘\\
			\sin Ο‘ & \cos Ο‘

The &s aren't visible when rendered and are the point that will be aligned.

Single-line equation alignment

Try block math (two $ symbols)

    \text{This should be centered}
1 Like

ok, ty that worked.

and if i want to align it to the right?

Any of these should work,

<div style="width: min-content; margin-left:auto;">




<span style="float: right;">




<div style="text-align: right;">



There might also be a KaTeX operator for it: See Supported Functions Β· KaTeX for a general list of supported functions.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.