4 releases
0.1.3 | Apr 4, 2019 |
---|---|
0.1.2 | Apr 4, 2019 |
0.1.1 | Apr 4, 2019 |
0.1.0 | Apr 4, 2019 |
#14 in #katex
4KB
This crate is an example of using $\LaTeX
$ math with rustdoc.
This demo abuses the #[doc(html_favicon_url = ..)]
attribute to inject
a KaTeX script into the generated documentation.
This way, it works both on docs.rs and with cargo doc
without extra settings.
Usage
Look at the source of lib.rs
of this crate, and copy the doc attribute
containing the <link>
and <script>
tags.
Then, write $`\frac 1 2 + 3`$
for inline math, which renders as $\frac 1 2 + 3
$.
Or, write
```math
\int_{-\infty}^\infty f(x)\,dx
```
for display math, which renders as:
\int_{-\infty}^\infty f(x)\,dx