diff --git a/Cargo.lock b/Cargo.lock index 496c4b9..d1c34a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -411,7 +411,7 @@ dependencies = [ [[package]] name = "mkbook" -version = "0.2.0" +version = "0.3.0" dependencies = [ "askama 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index b90019d..7cab0db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mkbook" -version = "0.2.0" +version = "0.3.0" authors = ["Kenton Hamaluik "] edition = "2018" build = "build.rs" diff --git a/docs-src/02-markdown/04-katex-formulas.md b/docs-src/02-markdown/04-katex-formulas.md new file mode 100644 index 0000000..833ec5e --- /dev/null +++ b/docs-src/02-markdown/04-katex-formulas.md @@ -0,0 +1,21 @@ +--- +title = "KaTeX (Math) Formulas" +--- + +If you have [KaTeX](https://github.com/KaTeX/KaTeX) installed and available on your path, _mkbook_ will try to render any code blocks with a language tag of `katex` as inline math blocks. + +For example: + +~~~ +```katex +x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} +``` +~~~ + +is rendered as: + +```katex +x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} +``` + +This feature is still experimental, but I find it handy for my books. diff --git a/docs/01-introduction/index.html b/docs/01-introduction/index.html index 6f2dcf5..8b7a325 100644 --- a/docs/01-introduction/index.html +++ b/docs/01-introduction/index.html @@ -12,7 +12,8 @@ - + +