From 64add36adb696fec14cd6182c0d8f2cea5cdf737 Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Tue, 21 Oct 2025 06:01:43 -0700 Subject: [PATCH] Update documentation to be compatible with PDF generation PiperOrigin-RevId: 822081040 Change-Id: I935b08751109e973398bc61c21f7217408983494 --- doc/XMLreference.rst | 30 +++++++++++++++++++----------- doc/changelog.rst | 10 +++++----- doc/mjx.rst | 2 +- doc/python.rst | 6 +++--- 4 files changed, 28 insertions(+), 20 deletions(-) diff --git a/doc/XMLreference.rst b/doc/XMLreference.rst index 6dd317e6..37f46e92 100644 --- a/doc/XMLreference.rst +++ b/doc/XMLreference.rst @@ -16,21 +16,29 @@ XML schema The table below summarizes the XML elements and their attributes in MJCF. Note that all information in MJCF is entered through elements and attributes. Text content in elements is not used; if present, the parser ignores it. -.. collapse:: Collapse schema table - :open: - The symbols in the second column of the table have the following meaning: +.. only:: html - ====== =================================================== - **!** required element, can appear only once - **?** optional element, can appear only once - **\*** optional element, can appear many times - **R** optional element, can appear many times recursively - ====== =================================================== + .. collapse:: Collapse schema table + :open: - .. cssclass:: schema-small + The symbols in the second column of the table have the following meaning: - .. include:: XMLschema.rst + ====== =================================================== + **!** required element, can appear only once + **?** optional element, can appear only once + **\*** optional element, can appear many times + **R** optional element, can appear many times recursively + ====== =================================================== + + .. cssclass:: schema-small + + .. include:: XMLschema.rst + +.. only:: latex + + .. note:: + The XML schema table is only available in the HTML version of this documentation. .. _CType: diff --git a/doc/changelog.rst b/doc/changelog.rst index bab8cc13..27c4c12b 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -319,7 +319,7 @@ Python bindings 12. Added support for nameless :ref:`mjSpec` objects in the ``bind`` method, see the corresponding :ref:`section` in the documentation. -.. |mjspec_colab| image:: https://colab.research.google.com/assets/colab-badge.svg +.. |mjspec_colab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/mjspec.ipynb Version 3.3.0 (Feb 26, 2025) @@ -403,7 +403,7 @@ Python bindings It is available here |rollout_colab|. |br| Contribution by :github:user:`aftersomemath`. -.. |rollout_colab| image:: https://colab.research.google.com/assets/colab-badge.svg +.. |rollout_colab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/rollout.ipynb Version 3.2.7 (Jan 14, 2025) @@ -924,7 +924,7 @@ Python bindings Kinematics, is available here: |ls_colab| |br| The video on the right shows example clips from the tutorial. -.. |ls_colab| image:: https://colab.research.google.com/assets/colab-badge.svg +.. |ls_colab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/least_squares.ipynb @@ -1172,7 +1172,7 @@ New features - The MJX API is compatible with MuJoCo but is missing some features in this release. See the outline of :ref:`MJX feature parity ` for more details. -.. |colab| image:: https://colab.research.google.com/assets/colab-badge.svg +.. |colab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/mjx/tutorial.ipynb .. youtube:: QewlEqIZi1o @@ -1833,7 +1833,7 @@ General notebook uses MuJoCo's native Python bindings, and includes a draft ``Renderer`` class, for easy rendering in Python. |br| Try it yourself: |LQRopenincolab| - .. |LQRopenincolab| image:: https://colab.research.google.com/assets/colab-badge.svg + .. |LQRopenincolab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/deepmind/mujoco/blob/main/python/LQR.ipynb #. Updates to humanoid model: diff --git a/doc/mjx.rst b/doc/mjx.rst index 499f9056..d998f852 100644 --- a/doc/mjx.rst +++ b/doc/mjx.rst @@ -36,7 +36,7 @@ Tutorial notebook The following IPython notebook demonstrates the use of MJX along with reinforcement learning to train humanoid and quadruped robots to locomote: |colab|. -.. |colab| image:: https://colab.research.google.com/assets/colab-badge.svg +.. |colab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/mjx/tutorial.ipynb .. _MjxInstallation: diff --git a/doc/python.rst b/doc/python.rst index 16a39431..7f2beba7 100644 --- a/doc/python.rst +++ b/doc/python.rst @@ -26,7 +26,7 @@ Tutorial notebook A MuJoCo tutorial using the Python bindings is available here: |mjcolab| -.. |mjcolab| image:: https://colab.research.google.com/assets/colab-badge.svg +.. |mjcolab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/tutorial.ipynb .. _PyInstallation: @@ -796,7 +796,7 @@ values. The rollouts are run in parallel with an internally managed thread pool thread) are passed as an argument. This notebook shows how to use ``rollout`` |rollout_colab|, along with some benchmarks e.g., the figure below. -.. |rollout_colab| image:: https://colab.research.google.com/assets/colab-badge.svg +.. |rollout_colab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/rollout.ipynb .. image:: images/python/rollout.png @@ -868,7 +868,7 @@ This module contains optimization-related utilities. The ``minimize.least_squares()`` function implements a nonlinear Least Squares optimizer solving sequential Quadratic Programs with :ref:`mju_boxQP`. It is documented in the associated notebook: |lscolab| -.. |lscolab| image:: https://colab.research.google.com/assets/colab-badge.svg +.. |lscolab| image:: https://colab.research.google.com/assets/colab-badge.png :target: https://colab.research.google.com/github/google-deepmind/mujoco/blob/main/python/least_squares.ipynb .. _PyUSDexport: