This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sedona-spatialbench.git


The following commit(s) were added to refs/heads/main by this push:
     new 8d42575  add katex math rendering (#44)
8d42575 is described below

commit 8d42575bb506203a8ae8bcbdd1cdf5aeff09f2da
Author: Pranav Toggi <[email protected]>
AuthorDate: Wed Sep 24 12:17:23 2025 -0700

    add katex math rendering (#44)
---
 docs/javascripts/katex.js          | 21 +++++++++++++++++++++
 docs/spatialbench-distributions.md |  4 ++--
 mkdocs.yml                         |  7 ++++++-
 3 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/docs/javascripts/katex.js b/docs/javascripts/katex.js
new file mode 100644
index 0000000..5abd19e
--- /dev/null
+++ b/docs/javascripts/katex.js
@@ -0,0 +1,21 @@
+(function () {
+    function renderAll() {
+        if (typeof renderMathInElement !== "function") return;
+        renderMathInElement(document.body, {
+            delimiters: [
+                { left: "$$", right: "$$", display: true },
+                { left: "$", right: "$", display: false },
+                { left: "\\(", right: "\\)", display: false },
+                { left: "\\[", right: "\\]", display: true }
+            ],
+            throwOnError: false
+        });
+    }
+
+    renderAll();
+
+    // Re-render on SPA page changes (mkdocs-material)
+    if (window.document$) {
+        document$.subscribe(renderAll);
+    }
+})();
\ No newline at end of file
diff --git a/docs/spatialbench-distributions.md 
b/docs/spatialbench-distributions.md
index bc69502..5f6b49f 100644
--- a/docs/spatialbench-distributions.md
+++ b/docs/spatialbench-distributions.md
@@ -25,7 +25,7 @@ SpatialBench offers a set of spatial distributions to 
generate synthetic dataset
 
 ## Uniform
 
-The simplest case: every point is drawn independently from a uniform 
distribution in the unit square [0,1]^2.
+The simplest case: every point is drawn independently from a uniform 
distribution in the unit square $[0,1]^2$.
 
 $$
 X \sim U(0,1), \quad Y \sim U(0,1)
@@ -47,7 +47,7 @@ Here, `mu` determines where the hotspot sits in the square, 
while `sigma` sets t
 
 ## Diagonal
 
-The diagonal distribution forces correlation between x and y. With probability 
percentage, a point is placed exactly on the line y=x. Otherwise, it is 
perturbed by Gaussian noise with width controlled by buffer. The result is a 
band of points hugging the diagonal.
+The diagonal distribution forces correlation between x and y. With probability 
percentage, a point is placed exactly on the line $y=x$. Otherwise, it is 
perturbed by Gaussian noise with width controlled by buffer. The result is a 
band of points hugging the diagonal.
 
 This pattern is not realistic geographically, but it is useful for experiments 
that need a known correlation structure — for example, seeing how indexing or 
filtering behaves when coordinates are not independent.
 
diff --git a/mkdocs.yml b/mkdocs.yml
index ad37550..da7bcb2 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -96,9 +96,13 @@ theme:
 
 extra_css:
   - stylesheets/extra.css
+  - https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css
 
 extra_javascript:
   - assets/javascripts/main.min.js
+  - https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js
+  - https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js
+  - javascripts/katex.js
 
 copyright: Copyright © 2025 The Apache Software Foundation. Apache Sedona, 
Sedona, Apache, the Apache feather logo, and the Apache Sedona project logo are 
either registered trademarks or trademarks of The Apache Software Foundation in 
the United States and other countries. All other marks mentioned may be 
trademarks or registered trademarks of their respective owners. Please visit <a 
href="https://www.apache.org/";>Apache Software Foundation</a> for more 
details.<img referrerpolicy="no-re [...]
 
@@ -110,7 +114,8 @@ markdown_extensions:
    - toc:
         permalink: true
         toc_depth: 3
-   - pymdownx.arithmatex
+   - pymdownx.arithmatex:
+        generic: true
    - pymdownx.betterem:
         smart_enable: all
    - pymdownx.caret

Reply via email to