From 2ce755bd277c2401cc3c69fe49cc79101efe8a3f Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 5 Aug 2025 14:28:16 -0400 Subject: [PATCH 1/4] Update to current configuration and report current version 4 --- .readthedocs.yaml | 35 +++++++++++++++++++++++++++++ _static/custom.css | 36 +++++++++++++++++++++++++++-- conf.py | 17 +++++++++++--- requirements.in | 1 + requirements.txt | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 140 insertions(+), 5 deletions(-) create mode 100644 .readthedocs.yaml create mode 100644 requirements.in create mode 100644 requirements.txt diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..a4e474fe --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,35 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + # You can also specify other tool versions: + # nodejs: "20" + # rust: "1.70" + # golang: "1.20" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: ./conf.py + # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs + # builder: "dirhtml" + # Fail on all warnings to avoid broken references + # fail_on_warning: true + +# Optionally build your docs in additional formats such as PDF and ePub +formats: + - pdf + - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: requirements.txt diff --git a/_static/custom.css b/_static/custom.css index 813f4327..8e2b363b 100644 --- a/_static/custom.css +++ b/_static/custom.css @@ -2,6 +2,38 @@ color: inherit; font-size: 85%; border: none; - background: #F0F0F0; - padding: 2px 3px 1px; + background: #E8E8E8; + padding: 2px 3px; + border-radius: .33em; +} + +.toctree-l1 > ul { + margin-top: 3px ! important; +} + +.toctree-l2 > ul { + margin-top: 0 ! important; + margin-bottom: 3px ! important; +} + +ul.simple > li { + margin-bottom: 10px; +} + +div.tight > ul.simple > li { + margin-bottom: 0; +} + +kbd { + display: inline-block; + padding: 3px 5px ! important; + font-size: 80% ! important; + line-height: 10px ! important; + color: #444d56 ! important; + vertical-align: middle ! important; + background-color: #fafbfc ! important; + border: solid 1.5px #c6cbd1 ! important; + border-bottom-color: #959da5 ! important; + border-radius: 3px ! important; + box-shadow: inset -.5px -1px 0 #959da5 ! important; } diff --git a/conf.py b/conf.py index f2ddf4cd..b6c757d6 100644 --- a/conf.py +++ b/conf.py @@ -13,6 +13,17 @@ import sys, os +### DPVC -- from https://about.readthedocs.com/blog/2024/07/addons-by-default/ +# Define the canonical URL if you are using a custom domain on Read the Docs +html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "") + +# Tell Jinja2 templates the build is running on Read the Docs +if os.environ.get("READTHEDOCS", "") == "True": + if "html_context" not in globals(): + html_context = {} + html_context["READTHEDOCS"] = True +### /DPVC + # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. @@ -28,7 +39,7 @@ #templates_path = ['_templates'] # The suffix of source filenames. -source_suffix = '.rst' +source_suffix = {'.rst': 'restructuredtext'} # The encoding of source files. #source_encoding = 'utf-8' @@ -38,7 +49,7 @@ # General information about the project. project = u'MathJax' -copyright = u'2019 The MathJax Consortium' +copyright = u'2019-2025 MathJax, Inc.' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -199,7 +210,7 @@ def setup(app): # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'MathJax.tex', u'MathJax Documentation', - u'Davide Cervone, Volker Sorge, Peter Krautzberger, Robert Miner', 'manual'), + u'Davide Cervone, Volker Sorge, 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff --git a/requirements.in b/requirements.in new file mode 100644 index 00000000..483a4e96 --- /dev/null +++ b/requirements.in @@ -0,0 +1 @@ +sphinx_rtd_theme diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..b04a257b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,56 @@ +# +# This file is autogenerated by pip-compile with Python 3.12 +# by the following command: +# +# pip-compile --strip-extras requirements.in +# +alabaster==0.7.16 + # via sphinx +babel==2.14.0 + # via sphinx +certifi==2023.11.17 + # via requests +charset-normalizer==3.3.2 + # via requests +docutils==0.20.1 + # via + # sphinx + # sphinx-rtd-theme +idna==3.6 + # via requests +imagesize==1.4.1 + # via sphinx +jinja2==3.1.3 + # via sphinx +markupsafe==2.1.3 + # via jinja2 +packaging==23.2 + # via sphinx +pygments==2.17.2 + # via sphinx +requests==2.31.0 + # via sphinx +snowballstemmer==2.2.0 + # via sphinx +sphinx==7.2.6 + # via + # sphinx-rtd-theme + # sphinxcontrib-jquery +sphinx-rtd-theme==2.0.0 + # via -r requirements.in +sphinxcontrib-applehelp==1.0.8 + # via sphinx +sphinxcontrib-devhelp==1.0.6 + # via sphinx +sphinxcontrib-htmlhelp==2.0.5 + # via sphinx +sphinxcontrib-jquery==4.1 + # via sphinx-rtd-theme +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.7 + # via sphinx +sphinxcontrib-serializinghtml==1.1.10 + # via sphinx +urllib3==2.1.0 + # via requests From 85e3d4911789382d5c2b9f84dc6b744c3c244f5c Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 5 Aug 2025 14:29:33 -0400 Subject: [PATCH 2/4] Fix typo in conf.py --- conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf.py b/conf.py index b6c757d6..ea8c9ad8 100644 --- a/conf.py +++ b/conf.py @@ -210,7 +210,7 @@ def setup(app): # (source start file, target name, title, author, documentclass [howto/manual]). latex_documents = [ ('index', 'MathJax.tex', u'MathJax Documentation', - u'Davide Cervone, Volker Sorge, 'manual'), + u'Davide Cervone, Volker Sorge', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of From 4b2607fd5aacb84037d34f3e85b1ae21dbae27d2 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 5 Aug 2025 14:31:19 -0400 Subject: [PATCH 3/4] Fix issue in old conf.py --- conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf.py b/conf.py index ea8c9ad8..1f097c83 100644 --- a/conf.py +++ b/conf.py @@ -123,7 +123,7 @@ # DPVC: Add cusotm css overrides # def setup(app): - app.add_stylesheet( "custom.css" ) + app.add_css_file( "custom.css" ) # # /DPVC # From a0a0abb13653ebd7c01d49eb1621806ada218ebd Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Tue, 5 Aug 2025 14:35:08 -0400 Subject: [PATCH 4/4] Add pointer to version 4 --- conf.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/conf.py b/conf.py index 1f097c83..609815cf 100644 --- a/conf.py +++ b/conf.py @@ -112,6 +112,16 @@ # A list of ignored prefixes for module index sorting. #modindex_common_prefix = [] +# +# DPVC: Add warning about new version +# +rst_prolog = """.. attention:: + `Version 4 `_ is now the current version of MathJax. + This document is for version 3.0. +""" +# +# /DPVC +# # -- Options for HTML output ---------------------------------------------------