katex-doc

Crates.iokatex-doc
lib.rskatex-doc
version0.1.0
sourcesrc
created_at2018-04-21 03:09:21.092263
updated_at2018-04-21 03:40:24.924603
descriptionSee README
homepage
repositoryhttps://github.com/CAD97/katex-doc
max_upload_size
id61644
size5,514
Christopher Durham (CAD97)

documentation

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.

Commit count: 4

cargo fmt