rust-latex-doc-minimal-example-0.1.0 is not a library.
Visit the last successful build:
rust-latex-doc-minimal-example-0.2.0
Minimal Rust project example for getting Latex in docs
This approach use a HTML
header loading a script in the final HTML
doc pages. You need to set environmental variable RUSTDOCFLAGS
with paramenter html-in-header
to a fragment of HTML
file with the script that load and configure Katex
.
The html
file is something like this
In this minimal example repo is in src/docs-header.html
.
And you put Latex
in your docs like
/// $$E = mc^2 $$
/// $$m = \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}$$
For compiling the docs:
NIX kind
RUSTDOCFLAGS="--html-in-header src/docs-header.html"
Windows
cmd
set RUSTDOCFLAGS=--html-in-header src\docs-header.html
cargo doc --no-deps --open
PowerShell
$env:RUSTDOCFLAGS="--html-in-header .\src\docs-header.html"
cargo doc --no-deps --open