kd
katex-doc
cargo install katex-doc
kd

katex-doc

XaaS for KaTeX on docs.rs

by Christopher Durham

0.1.0 (see all)License:Unlicense OR MIT
cargo install katex-doc
Readme

XaaS: Use KaTeX on docs.rs!

Thanks to pwnies for bringing this method to where I noticed it. Technically relies on this bug in docs.rs. See the result on docs.rs!

Add the following to your Cargo.toml:

[package.metadata.docs.rs]
rustdoc-args = [
    "--html-in-header",
    ".cargo/registry/src/github.com-1ecc6299db9ec823/katex-doc-0.1.0/katex.html",
]

And use $`inline\ math`$ or

```math
display-style\ math
```

If it so happens that that path does not always work (because this crate's build isn't in docs.rs cache), download katex.html from this repository, then put it at the root of your repository, include it in your publish, and replace the reference to katex-doc-ver.si.on with your crate.

For local documentation builds, acquire katex.html and use cargo rustdoc --open -- --html-in-header katex.html. If you know how to get cargo doc to set flags for rustdoc for just one crate when it's in the dependency graph, so that KaTeX-enabled docs can render properly when building docs as a dependency, please open an issue so we can document it.

GitHub Stars

11

LAST COMMIT

4yrs ago

MAINTAINERS

1

CONTRIBUTORS

1

OPEN ISSUES

2

OPEN PRs

0
VersionTagPublished
0.1.0
4yrs ago
0.0.2
4yrs ago
0.0.1
4yrs ago
No alternatives found
No tutorials found
Add a tutorial