diff --git a/docs/en/_config.yml b/docs/en/_config.yml index 0bd35a4e..f5ef8a33 100644 --- a/docs/en/_config.yml +++ b/docs/en/_config.yml @@ -44,16 +44,19 @@ launch_buttons: colab_url: "https://colab.research.google.com" sphinx: + extra_extensions: + - sphinxcontrib.katex recursive_update: true config: + mathjax_path: "" html_theme_options: show_toc_level: 5 intersphinx_mapping: api_reference: [https://jij-inc-jijmodeling.readthedocs-hosted.com/en/stable/, null] numpy: [https://numpy.org/doc/stable, null] - python: ["https://docs.python.org/3", null] + python: ["https://docs.python.org/ja/3", "https://docs.python.org/ja/3/objects.inv"] ommx_api: ["https://jij-inc.github.io/ommx/python/ommx", null] - ommx_doc: ["https://jij-inc.github.io/ommx/en", null] + ommx_doc: ["https://jij-inc.github.io/ommx/ja", null] parse: myst_enable_extensions: diff --git a/docs/en/_static/custom.css b/docs/en/_static/custom.css new file mode 100644 index 00000000..8c582941 --- /dev/null +++ b/docs/en/_static/custom.css @@ -0,0 +1,4 @@ +div.math { + flex-direction: row; + gap: .5em; +} \ No newline at end of file diff --git a/docs/ja/_config.yml b/docs/ja/_config.yml index 2ca4952d..1c174c83 100644 --- a/docs/ja/_config.yml +++ b/docs/ja/_config.yml @@ -44,8 +44,11 @@ launch_buttons: colab_url: "https://colab.research.google.com" sphinx: + extra_extensions: + - sphinxcontrib.katex recursive_update: true config: + mathjax_path: "" html_theme_options: show_toc_level: 5 intersphinx_mapping: diff --git a/docs/ja/_static/custom.css b/docs/ja/_static/custom.css new file mode 100644 index 00000000..8c582941 --- /dev/null +++ b/docs/ja/_static/custom.css @@ -0,0 +1,4 @@ +div.math { + flex-direction: row; + gap: .5em; +} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 01c3f2d1..a4f7169b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ dev = [ "jupyter-book >= 1.0.0, < 2.0.0", "jupytext >= 1.18.1, < 2.0.0", "nbconvert>=7.16.6, <8.0.0", + "sphinxcontrib-katex >=0.9.11, <1.0.0", ] [build-system] diff --git a/uv.lock b/uv.lock index a1faabbc..3e9fea18 100644 --- a/uv.lock +++ b/uv.lock @@ -529,6 +529,7 @@ dev = [ { name = "jupyter-book" }, { name = "jupytext" }, { name = "nbconvert" }, + { name = "sphinxcontrib-katex" }, ] [package.metadata] @@ -540,6 +541,7 @@ requires-dist = [ { name = "ommx", specifier = ">=2.3.4,<3.0.0" }, { name = "ommx-openjij-adapter", specifier = ">=2.3.4,<3.0.0" }, { name = "ommx-pyscipopt-adapter", specifier = ">=2.3.4,<3.0.0" }, + { name = "sphinxcontrib-katex", marker = "extra == 'dev'", specifier = ">=0.9.11,<1.0.0" }, ] provides-extras = ["dev"] @@ -1867,6 +1869,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071, upload-time = "2019-01-21T16:10:14.333Z" }, ] +[[package]] +name = "sphinxcontrib-katex" +version = "0.9.11" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "sphinx" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/9a/cd/71d3c7fc1a4e40a03048ce68787e4e4b6f612dc6b95acc89f5010d4cda7a/sphinxcontrib_katex-0.9.11.tar.gz", hash = "sha256:2d32b210d20bbee451a51d19645f6fef5f5568b9a54e2813affb96efa661238a", size = 100476, upload-time = "2025-06-27T12:04:12.703Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/33/14/c62d4553dbf27156b6549ceed1a9768f801c979237a2cf0c3d074e16272f/sphinxcontrib_katex-0.9.11-py3-none-any.whl", hash = "sha256:b0a318d86b8f43314ccdd481ce0db90283ac51f51afd9479969f36a0c291f44e", size = 97956, upload-time = "2025-06-27T12:04:11.478Z" }, +] + [[package]] name = "sphinxcontrib-qthelp" version = "2.0.0"