mirror of
https://codeberg.org/forgejo/docs.git
synced 2025-04-26 21:50:47 +03:00
Add multiline LaTeX equation example to wiki
- Ref: https://codeberg.org/forgejo/forgejo/issues/6902
This commit is contained in:
parent
244da92224
commit
758b1825a4
1 changed files with 16 additions and 0 deletions
|
@ -126,3 +126,19 @@ $ \frac{1}{2} = 0.5 $
|
||||||
This will then result in the following properly rendered equation:
|
This will then result in the following properly rendered equation:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
It is also possible to have LaTeX render in display mode, using, `$$` or `\[` with `\]`:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
\[ \mathbf{R} = \frac 1M \iiint_Q \rho(\mathbf{r}) \mathbf{r} \mathrm dV \]
|
||||||
|
$$ (p \implies q) \iff (\neg q \implies \neg p) $$
|
||||||
|
```
|
||||||
|
|
||||||
|
It is however not possible to use this when the equation spans multiple lines, in that case codeblock with the language `math` should be used, for example:
|
||||||
|
|
||||||
|
````markdown
|
||||||
|
```math
|
||||||
|
\int_0^\pi\ln(1-2\alpha\cos x+\alpha^2) \mathrm dx =
|
||||||
|
2\pi\ln|\alpha|
|
||||||
|
```
|
||||||
|
````
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue