Skip to content

Commit 5a03368

Browse files
committed
Add a notice for document generation
1 parent f22bb05 commit 5a03368

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,22 @@ extern crate ndarray;
7777
extern crate ndarray_linalg;
7878
extern crate openblas_src; // or another backend of your choice
7979
```
80+
81+
Generate document with KaTeX
82+
------------------------------
83+
84+
You need to set `RUSTDOCFLAGS` explicitly:
85+
86+
```shell
87+
RUSTDOCFLAGS="--html-in-header katex-header.html" cargo doc --no-deps
88+
```
89+
90+
This **only** works for `--no-deps` build because `katex-header.html` does not exists for dependent crates.
91+
If you wish to set `RUSTDOCFLAGS` automatically in this crate, you can put [.cargo/config](https://doc.rust-lang.org/cargo/reference/config.html):
92+
93+
```toml
94+
[build]
95+
rustdocflags = ["--html-in-header", "katex-header.html"]
96+
```
97+
98+
But, be sure that this works only for `--no-deps`. `cargo doc` will fail with this `.cargo/config`.

0 commit comments

Comments
 (0)