You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by pr...@apache.org on 2025/09/24 18:56:03 UTC

(sedona-spatialbench) branch make-math-render created (now 1733f90)

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

prantogg pushed a change to branch make-math-render
in repository https://gitbox.apache.org/repos/asf/sedona-spatialbench.git


      at 1733f90  add katex math rendering

This branch includes the following new commits:

     new 1733f90  add katex math rendering

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(sedona-spatialbench) 01/01: add katex math rendering

Posted by pr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

prantogg pushed a commit to branch make-math-render
in repository https://gitbox.apache.org/repos/asf/sedona-spatialbench.git

commit 1733f90812ddf1e54107ed99fa01134da270f445
Author: Pranav Toggi <pr...@gmail.com>
AuthorDate: Wed Sep 24 11:54:57 2025 -0700

    add katex math rendering
---
 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/katex@0.16.11/dist/katex.min.css
 
 extra_javascript:
   - assets/javascripts/main.min.js
+  - https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.js
+  - https://cdn.jsdelivr.net/npm/katex@0.16.11/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