From 32912a5e80b965d8a6fcbc2004d12e035f7ef271 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 30 Sep 2026 09:53:33 +0200 Subject: [PATCH] Fix math formulas rendering as raw TeX in the published docs The privacy plugin self-hosts MathJax 2.7.0 but drops its ?config=TeX-MML-AM_CHTML query string, so the rehosted script loads no input jax and the 10 formulas across 6 pages render as raw TeX to readers. Remove pymdownx.arithmatex and the MathJax extra_javascript entry, and rewrite the formulas in plain HTML (, ) instead. This also drops a nine-year-old third-party script from every page. Part of #5718 Signed-off-by: Niels Lohmann --- docs/mkdocs/docs/api/basic_json/number_integer_t.md | 2 +- docs/mkdocs/docs/api/basic_json/number_unsigned_t.md | 2 +- docs/mkdocs/docs/api/basic_json/parse_error.md | 2 +- docs/mkdocs/docs/features/binary_formats/bjdata.md | 2 +- docs/mkdocs/docs/features/types/index.md | 2 +- docs/mkdocs/docs/features/types/number_handling.md | 8 ++++---- docs/mkdocs/mkdocs.yml | 4 ---- 7 files changed, 9 insertions(+), 13 deletions(-) diff --git a/docs/mkdocs/docs/api/basic_json/number_integer_t.md b/docs/mkdocs/docs/api/basic_json/number_integer_t.md index 9a2ffab7f..9b1d7ae74 100644 --- a/docs/mkdocs/docs/api/basic_json/number_integer_t.md +++ b/docs/mkdocs/docs/api/basic_json/number_integer_t.md @@ -51,7 +51,7 @@ range will yield over/underflow when used in a constructor. During deserializati will automatically be stored as [`number_unsigned_t`](number_unsigned_t.md) or [`number_float_t`](number_float_t.md). [RFC 8259](https://tools.ietf.org/html/rfc8259) further states: -> Note that when such software is used, numbers that are integers and are in the range $[-2^{53}+1, 2^{53}-1]$ are +> Note that when such software is used, numbers that are integers and are in the range [-253+1, 253-1] are > interoperable in the sense that implementations will agree exactly on their numeric values. As this range is a subrange of the exactly supported range [INT64_MIN, INT64_MAX], this class's integer type is diff --git a/docs/mkdocs/docs/api/basic_json/number_unsigned_t.md b/docs/mkdocs/docs/api/basic_json/number_unsigned_t.md index 674f7711d..f4799b2e9 100644 --- a/docs/mkdocs/docs/api/basic_json/number_unsigned_t.md +++ b/docs/mkdocs/docs/api/basic_json/number_unsigned_t.md @@ -52,7 +52,7 @@ when used in a constructor. During deserialization, too large or small integer n as [`number_integer_t`](number_integer_t.md) or [`number_float_t`](number_float_t.md). [RFC 8259](https://tools.ietf.org/html/rfc8259) further states: -> Note that when such software is used, numbers that are integers and are in the range $[-2^{53}+1, 2^{53}-1]$ are +> Note that when such software is used, numbers that are integers and are in the range [-253+1, 253-1] are > interoperable in the sense that implementations will agree exactly on their numeric values. As this range is a subrange (when considered in conjunction with the `number_integer_t` type) of the exactly supported diff --git a/docs/mkdocs/docs/api/basic_json/parse_error.md b/docs/mkdocs/docs/api/basic_json/parse_error.md index 74e16f41a..c3f49ef13 100644 --- a/docs/mkdocs/docs/api/basic_json/parse_error.md +++ b/docs/mkdocs/docs/api/basic_json/parse_error.md @@ -54,7 +54,7 @@ classDiagram ## Notes -For an input with $n$ bytes, 1 is the index of the first character and $n+1$ is the index of the terminating null byte +For an input with n bytes, 1 is the index of the first character and n+1 is the index of the terminating null byte or the end of file. This also holds true when reading a byte vector for binary formats. ## Examples diff --git a/docs/mkdocs/docs/features/binary_formats/bjdata.md b/docs/mkdocs/docs/features/binary_formats/bjdata.md index a0c84edaf..cd73b07e2 100644 --- a/docs/mkdocs/docs/features/binary_formats/bjdata.md +++ b/docs/mkdocs/docs/features/binary_formats/bjdata.md @@ -61,7 +61,7 @@ The library uses the following mapping from JSON values types to BJData types ac The following values can **not** be converted to a BJData value: - - strings with more than 18446744073709551615 bytes, i.e., $2^{64}-1$ bytes (theoretical) + - strings with more than 18446744073709551615 bytes, i.e., 264-1 bytes (theoretical) !!! info "Unused BJData markers" diff --git a/docs/mkdocs/docs/features/types/index.md b/docs/mkdocs/docs/features/types/index.md index e6078b825..354acd5ac 100644 --- a/docs/mkdocs/docs/features/types/index.md +++ b/docs/mkdocs/docs/features/types/index.md @@ -273,7 +273,7 @@ When the default type is used, the maximal unsigned integer number that can be s [RFC 8259](https://tools.ietf.org/html/rfc8259) further states: -> Note that when such software is used, numbers that are integers and are in the range $[-2^{53}+1, 2^{53}-1]$ are interoperable in the sense that implementations will agree exactly on their numeric values. +> Note that when such software is used, numbers that are integers and are in the range [-253+1, 253-1] are interoperable in the sense that implementations will agree exactly on their numeric values. As this range is a subrange of the exactly supported range [`INT64_MIN`, `INT64_MAX`], this class's integer type is interoperable. diff --git a/docs/mkdocs/docs/features/types/number_handling.md b/docs/mkdocs/docs/features/types/number_handling.md index cf37b044a..ef43054e5 100644 --- a/docs/mkdocs/docs/features/types/number_handling.md +++ b/docs/mkdocs/docs/features/types/number_handling.md @@ -48,7 +48,7 @@ On number interoperability, the following remarks are made: for numeric magnitude and precision than is widely available. Note that when such software is used, numbers that are integers and - are in the range $[-2^{53}+1, 2^{53}-1]$ are interoperable in the + are in the range [-253+1, 253-1] are interoperable in the sense that implementations will agree exactly on their numeric values. @@ -95,9 +95,9 @@ This is the same behavior as the code `#!c double x = 3.141592653589793238462643 !!! success "Interoperability" - - The library is interoperable with respect to the specification, because its supported range $[-2^{63}, 2^{64}-1]$ is - larger than the described range $[-2^{53}+1, 2^{53}-1]$. - - All integers outside the range $[-2^{63}, 2^{64}-1]$, as well as floating-point numbers are stored as `double`. + - The library is interoperable with respect to the specification, because its supported range [-263, 264-1] is + larger than the described range [-253+1, 253-1]. + - All integers outside the range [-263, 264-1], as well as floating-point numbers are stored as `double`. This also concurs with the specification above. ### Zeros diff --git a/docs/mkdocs/mkdocs.yml b/docs/mkdocs/mkdocs.yml index 70537bd27..39839fb02 100644 --- a/docs/mkdocs/mkdocs.yml +++ b/docs/mkdocs/mkdocs.yml @@ -349,7 +349,6 @@ markdown_extensions: - toc: permalink: true - md_in_html - - pymdownx.arithmatex - pymdownx.betterem: smart_enable: all - pymdownx.caret @@ -441,6 +440,3 @@ plugins: extra_css: - css/custom.css - -extra_javascript: - - https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML