# Equation alignment

**URL:** https://discourse.joplinapp.org/t/equation-alignment/33161
**Category:** Support
**Created:** [15 October 2023 19:52 UTC](https://discourse.joplinapp.org/t/equation-alignment/33161 "2023-10-15T19:52:12Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![AngelLCC](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/angellcc/32/18509_2.png) [@AngelLCC](https://discourse.joplinapp.org/u/AngelLCC)
#### Post date: [15 October 2023 19:52 UTC](https://discourse.joplinapp.org/t/equation-alignment/33161/1 "2023-10-15T19:52:12Z")

</div>

Hello,  
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>`

---

<div class="post-metadata">

### Author: ![personalizedrefriger](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/personalizedrefriger/32/13210_2.png) [@personalizedrefriger](https://discourse.joplinapp.org/u/personalizedrefriger)
#### Post date: [15 October 2023 19:55 UTC](https://discourse.joplinapp.org/t/equation-alignment/33161/2 "2023-10-15T19:55:06Z")

</div>

## Multi-line equation alignment

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

```tex
$$
\begin{aligned}
	D F(x, y) &= \text{rotate and scale}(x, y)\\
		&= r \begin{pmatrix}
			\cos ϑ & -\sin ϑ\\
			\sin ϑ & \cos ϑ
		\end{pmatrix}
\end{aligned}
$$

```

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

## Single-line equation alignment

Try block math (two `$` symbols)

```auto
$$
    \text{This should be centered}
$$

```

---

<div class="post-metadata">

### Author: ![AngelLCC](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/angellcc/32/18509_2.png) [@AngelLCC](https://discourse.joplinapp.org/u/AngelLCC)
#### Post date: [15 October 2023 19:57 UTC](https://discourse.joplinapp.org/t/equation-alignment/33161/3 "2023-10-15T19:57:39Z")

</div>

ok, ty that worked.

---

<div class="post-metadata">

### Author: ![AngelLCC](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/angellcc/32/18509_2.png) [@AngelLCC](https://discourse.joplinapp.org/u/AngelLCC)
#### Post date: [15 October 2023 19:58 UTC](https://discourse.joplinapp.org/t/equation-alignment/33161/4 "2023-10-15T19:58:15Z")

</div>

and if i want to align it to the right?

---

<div class="post-metadata">

### Author: ![personalizedrefriger](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/personalizedrefriger/32/13210_2.png) [@personalizedrefriger](https://discourse.joplinapp.org/u/personalizedrefriger)
#### Post date: [15 October 2023 20:07 UTC](https://discourse.joplinapp.org/t/equation-alignment/33161/5 "2023-10-15T20:07:20Z")

</div>

Any of these should work,

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

$\TeX$

</div>

or

<span style="float: right;">

$\TeX$

</span>

or

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

$\TeX$

</div>

```

There might also be a KaTeX operator for it: See [Supported Functions · KaTeX](https://katex.org/docs/supported.html) for a general list of supported functions.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex028/uploads/cozic/original/3X/1/c/1c948e33314e232a0927789508474d8624f4270b.png) [@system](https://discourse.joplinapp.org/u/system)
#### Post date: [14 November 2023 20:19 UTC](https://discourse.joplinapp.org/t/equation-alignment/33161/7 "2023-11-14T20:19:35Z")

</div>

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