Skip to content

Commit 74f8f31

Browse files
Update index.md
1 parent 0c7e54f commit 74f8f31

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/src/index.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,31 @@ prob = ODEProblem(rober, [1.0, 0.0, 0.0], (0.0, 1e5), [0.04, 3e7, 1e4])
4141
sol = solve(prob)
4242
```
4343

44+
### Latex
45+
46+
Latexify directly works on the generated expression. Example:
47+
48+
```julia
49+
using ParameterizedFunctions, Latexify
50+
51+
lotka_volterra = @ode_def begin
52+
dx = a*x -b*x*y
53+
dy = -c*y + d*x*y
54+
end a b c d
55+
56+
latexify(lotka_volterra.sys)
57+
```
58+
59+
Generates:
60+
61+
```julia
62+
L"\begin{align}
63+
\frac{\mathrm{d} x\left( t \right)}{\mathrm{d}t} =& a x\left( t \right) - b x\left( t \right) y\left( t \right) \\
64+
\frac{\mathrm{d} y\left( t \right)}{\mathrm{d}t} =& - c y\left( t \right) + d x\left( t \right) y\left( t \right)
65+
\end{align}
66+
"`
67+
```
68+
4469
## Contributing
4570

4671
- Please refer to the

0 commit comments

Comments
 (0)