Switch documentation to custom furo theme with dark mode option.
Co-authored-by: Saran Tunyasuvunakool <stunya@google.com> Co-authored-by: Yuval Tassa <tassa@google.com> PiperOrigin-RevId: 488975449 Change-Id: Ia2db8ac7ecd27a00ca2c4c9ca5e85b9167813473
This commit is contained in:
committed by
Copybara-Service
parent
7b0fbc63f8
commit
571b703f1c
+17
-12
@@ -13,17 +13,20 @@ 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. The symbols
|
||||
in the second column of the table have the following meaning:
|
||||
through elements and attributes. Text content in elements is not used; if present, the parser ignores it.
|
||||
|
||||
====== ===================================================
|
||||
**!** 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:: Expand schema table
|
||||
|
||||
.. include:: XMLschema.rst
|
||||
The symbols in the second column of the table have the following meaning:
|
||||
|
||||
====== ===================================================
|
||||
**!** 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
|
||||
====== ===================================================
|
||||
|
||||
.. include:: XMLschema.rst
|
||||
|
||||
.. _CType:
|
||||
|
||||
@@ -33,7 +36,7 @@ Attribute types
|
||||
| Each attribute has a data type enforced by the parser. The available data types are:
|
||||
|
||||
========= ==============================================================================================
|
||||
string An arbitrary string, usually specifying a file name or a user-defined name of a model element.
|
||||
string An arbitrary string, usually specifying a file name or a user-defined name of a model element.
|
||||
int(N) An array of N integers. If N is omitted it equals 1.
|
||||
real(N) An array of N real-valued numbers. If N is omitted it equals 1.
|
||||
[...] Keyword attribute. The list of valid keywords is given in brackets.
|
||||
@@ -50,7 +53,7 @@ real(N) An array of N real-valued numbers. If N is omitted it equals 1.
|
||||
compiler. When such attributes become relevant in a given context, they must be set to allowed values.
|
||||
|
||||
+-------------+--------------------------------------------------------------------------------------------------+
|
||||
| required | The attribute is required by the parser. If it is not present the parser will generate an error. |
|
||||
| required | The attribute is required by the parser. If it is not present the parser will generate an error. |
|
||||
+-------------+--------------------------------------------------------------------------------------------------+
|
||||
| optional | The attribute is optional. There is no internal default. The attribute is initialized in the |
|
||||
| | undefined state. |
|
||||
@@ -65,7 +68,9 @@ whose value can be "radian" or "degree". It is an optional attribute and has int
|
||||
will appear in the reference documentation as
|
||||
|
||||
:at:`angle`: :at-val:`[radian, degree], "degree"`
|
||||
|br|
|
||||
.. raw:: html
|
||||
|
||||
<p style="display: none"></p>
|
||||
|
||||
.. _Reference:
|
||||
|
||||
|
||||
+5
-11
@@ -127,17 +127,11 @@ General
|
||||
between twist and anisotropy.
|
||||
- Added test using cantilever exact solution.
|
||||
|
||||
.. youtube:: 25kQP671fJE
|
||||
:align: right
|
||||
:height: 115px
|
||||
|
||||
.. youtube:: 4DvGe-BodFU
|
||||
:align: right
|
||||
:height: 115px
|
||||
|
||||
.. youtube:: QcGdpUd5H0c
|
||||
:align: right
|
||||
:height: 115px
|
||||
+--------------------------+--------------------------+--------------------------+
|
||||
| .. youtube:: 25kQP671fJE | .. youtube:: 4DvGe-BodFU | .. youtube:: QcGdpUd5H0c |
|
||||
| :align: center | :align: center | :align: center |
|
||||
| :height: 140px | :height: 140px | :height: 140px |
|
||||
+--------------------------+--------------------------+--------------------------+
|
||||
|
||||
Python bindings
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
+46
-1
@@ -45,6 +45,7 @@ extensions = [
|
||||
'sphinxcontrib.katex',
|
||||
'sphinxcontrib.youtube',
|
||||
'sphinx_reredirects',
|
||||
'sphinx_toolbox.collapse',
|
||||
]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
@@ -79,7 +80,51 @@ autodoc_default_options = {
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme = 'furo'
|
||||
html_title = 'MuJoCo Documentation'
|
||||
html_logo = 'images/banner.svg'
|
||||
|
||||
SHARED_CSS_VARIABLES = {
|
||||
"admonition-font-size": "1rem",
|
||||
"admonition-title-font-size": "1rem",
|
||||
"sidebar-item-font-size": "115%",
|
||||
}
|
||||
|
||||
html_theme_options = {
|
||||
"light_css_variables": {
|
||||
"at-color": "#bc103e",
|
||||
"at-val-color": "#bc103e",
|
||||
"body-color": "#14234b",
|
||||
"color-highlight-on-target": "#e5e8ed",
|
||||
"primary-header-color": "#0053d6",
|
||||
"row-odd-background-color": "#f0f3f7",
|
||||
"rst-content-a-color": "#2980b9",
|
||||
"secondary-header-color": "#123693",
|
||||
"wy-menu-vertical-background-color": "#0053d6",
|
||||
"wy-menu-vertical-color": "white",
|
||||
"wy-nav-side-background-color": "#0053d6",
|
||||
},
|
||||
"dark_css_variables": {
|
||||
"at-color": "#ff95a6",
|
||||
"at-val-color": "#ff95a6",
|
||||
"body-color": "#14234b",
|
||||
"color-admonition-background": "#1e1e21",
|
||||
"color-highlight-on-target": "#3d4045",
|
||||
"primary-header-color": "#a8caff",
|
||||
"row-odd-background-color": "#222326",
|
||||
"rst-content-a-color": "#2980b9",
|
||||
"secondary-header-color": "#458dff",
|
||||
"wy-menu-vertical-background-color": "#0053d6",
|
||||
"wy-menu-vertical-color": "white",
|
||||
"wy-nav-side-background-color": "#0053d6",
|
||||
},
|
||||
}
|
||||
|
||||
for v in html_theme_options.values():
|
||||
v.update(SHARED_CSS_VARIABLES)
|
||||
|
||||
pygments_style = "default"
|
||||
pygments_dark_style = "monokai"
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
|
||||
+79
-30
@@ -1,37 +1,48 @@
|
||||
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Text:ital,wght@0,400;1,400&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital,wght@0,400;1,400&display=swap');
|
||||
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,400;0,500;1,400;1,500&display=swap');
|
||||
|
||||
/* Disable scroll on anchor. */
|
||||
html {
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'DM Sans', 'Helvetica Neue', 'Arial', sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
color: rgb(20, 35, 75);
|
||||
color: var(--body-color);
|
||||
}
|
||||
|
||||
.rst-content .toctree-wrapper>p.caption,h1 {
|
||||
font-size: 250%;
|
||||
font-family: 'DM Serif Display', 'Times New Roman', serif;
|
||||
font-weight: 400;
|
||||
color: rgb(0, 83, 214);
|
||||
.sidebar-brand-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.rst-content .toctree-wrapper>p.caption,h2,h3,h4,h5,h6,legend {
|
||||
h1 {
|
||||
font-size: 300%;
|
||||
font-family: 'DM Sans', 'Helvetica Neue', 'Arial', sans-serif;
|
||||
font-weight: 600;
|
||||
color: var(--primary-header-color);
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
h2,h3,h4,h5,h6,legend {
|
||||
font-family: 'DM Sans', 'Helvetica Neue', 'Arial', sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
font-weight: 700;
|
||||
color: rgb(18, 54, 147);
|
||||
color: var(--secondary-header-color);
|
||||
}
|
||||
|
||||
/* Decrease bottom margin of some headings for tighter vertical spacing. */
|
||||
.rst-content h2 {
|
||||
margin-bottom: 20px;
|
||||
h2 {
|
||||
margin-top: 1.2em;
|
||||
margin-bottom: 0.75em;
|
||||
}
|
||||
.rst-content h3 {
|
||||
margin-bottom: 10px;
|
||||
|
||||
h3 {
|
||||
margin-top: 0.75em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
.rst-content h4 {
|
||||
margin-bottom: 5px;
|
||||
|
||||
h4 {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.25em;
|
||||
}
|
||||
|
||||
/* Paragraph margins don't apply to table cell contents. */
|
||||
@@ -44,10 +55,10 @@ body {
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
/* Don't change color of visited links. */
|
||||
/* Don't change color of visited links.
|
||||
.rst-content a.reference:visited {
|
||||
color: #2980b9;
|
||||
}
|
||||
color: var(--rst-content-a-color);
|
||||
} */
|
||||
|
||||
.rst-content code, .rst-content tt {
|
||||
font-size: 90%;
|
||||
@@ -63,17 +74,24 @@ body {
|
||||
ul.simple {
|
||||
list-style: disc;
|
||||
margin-left: 24px;
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
ul.simple li {
|
||||
list-style: disc;
|
||||
}
|
||||
|
||||
ol {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
/* Change background color of the nav bars. */
|
||||
.wy-side-nav-search,
|
||||
.wy-nav-top,
|
||||
.wy-nav-side {
|
||||
background-color: rgb(0, 83, 214);
|
||||
background-color: var(--wy-nav-side-background-color);
|
||||
}
|
||||
|
||||
/* Make text wrap in table cells. */
|
||||
@@ -121,7 +139,7 @@ html.writer-html5 .rst-content table.docutils th>p {
|
||||
.wy-menu-vertical li.toctree-l8 a:hover span.toctree-expand,
|
||||
.wy-menu-vertical li.toctree-l9 a:hover span.toctree-expand,
|
||||
.wy-menu-vertical li.toctree-l10 a:hover span.toctree-expand {
|
||||
color: white;
|
||||
color: var(--wy-menu-vertical-color);
|
||||
}
|
||||
|
||||
/* Change color of TOC background. */
|
||||
@@ -139,30 +157,49 @@ html.writer-html5 .rst-content table.docutils th>p {
|
||||
.wy-menu-vertical li.toctree-l7.current li.toctree-l8>a,
|
||||
.wy-menu-vertical li.toctree-l8.current li.toctree-l9>a,
|
||||
.wy-menu-vertical li.toctree-l9.current li.toctree-l10>a {
|
||||
background-color: rgb(0, 83, 214);
|
||||
background-color: var(--wy-menu-vertical-background-color);
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Alternate row colors. */
|
||||
table.docutils:not(.mjcf-attributes) > tbody > tr.row-odd {
|
||||
background-color: var(--row-odd-background-color);
|
||||
}
|
||||
|
||||
/* MJCF attributes table. */
|
||||
.rst-content table.mjcf-attributes {
|
||||
table.mjcf-attributes {
|
||||
border-style: none;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
width: 100%;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.rst-content table.mjcf-attributes:not(.field-list) tr td,
|
||||
.rst-content table.mjcf-attributes:not(.field-list) tr:nth-child(2n-1) td {
|
||||
table.mjcf-attributes tbody tr td,
|
||||
table.mjcf-attributes tbody tr:nth-child(2n-1) td {
|
||||
border-style: none;
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
padding: 0px 0px 0px 0px;
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
table.mjcf-attributes tbody tr td p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.table-wrapper.mjcf-attributes {
|
||||
margin: 0.5em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table td > div.wy-table-responsive {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* Remove vertical spacing before/after code blocks. */
|
||||
div[class*=" highlight-"], div[class^=highlight-] {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* MJCF element names. */
|
||||
.el {
|
||||
font-weight: bold;
|
||||
@@ -170,12 +207,16 @@ table td > div.wy-table-responsive {
|
||||
|
||||
/* MJCF attribute names. */
|
||||
.at {
|
||||
color: darkred;
|
||||
color: var(--at-color);
|
||||
}
|
||||
|
||||
dt .at {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* MJCF attribute value specs. */
|
||||
.at-val {
|
||||
color: darkred;
|
||||
color: var(--at-val-color);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@@ -183,3 +224,11 @@ table td > div.wy-table-responsive {
|
||||
.toctree-l1 .el-prefix {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.admonition p:not(.admonition-title) {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
details summary {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 27.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 600.9 150.2" style="enable-background:new 0 0 600.9 150.2;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:url(#SVGID_1_);}
|
||||
.st1{fill:#FFFFFF;}
|
||||
</style>
|
||||
<g id="a">
|
||||
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="33.3255" y1="10.9703" x2="580.0255" y2="139.1103" gradientTransform="matrix(1.07 0 0 -1.23 -34.53 169.2672)">
|
||||
<stop offset="0" style="stop-color:#0F3693"/>
|
||||
<stop offset="4.000000e-02" style="stop-color:#0F348D"/>
|
||||
<stop offset="0.31" style="stop-color:#0F296B"/>
|
||||
<stop offset="0.56" style="stop-color:#0F2253"/>
|
||||
<stop offset="0.79" style="stop-color:#0F1D45"/>
|
||||
<stop offset="0.99" style="stop-color:#101C40"/>
|
||||
</linearGradient>
|
||||
<rect y="0" class="st0" width="600.9" height="150.2"/>
|
||||
</g>
|
||||
<g id="c">
|
||||
<g>
|
||||
<path class="st1" d="M136.1,118.4l-19.7-47.3l-7.1,41.6H96.5l15.4-80.9l0,0L136.4,90l25.5-58.1l0,0l13.9,80.9H163l-6.3-41.6
|
||||
L136.1,118.4L136.1,118.4L136.1,118.4z"/>
|
||||
<path class="st1" d="M211.9,113.2c-4.5,0-8.6-0.9-12.1-2.6c-3.5-1.7-6.3-4.3-8.3-7.6c-2-3.4-3-7.5-3-12.3V55.2h13.6v34.1
|
||||
c0,2.8,0.4,5,1.1,6.7c0.7,1.7,1.8,3,3.3,3.9s3.2,1.3,5.3,1.3s3.9-0.4,5.3-1.3s2.5-2.2,3.3-3.9c0.7-1.7,1.1-4,1.1-6.8V55.2h13.6
|
||||
v35.5c0,4.8-1,9-3,12.3c-2,3.4-4.7,5.9-8.3,7.6C220.4,112.4,216.4,113.2,211.9,113.2L211.9,113.2z"/>
|
||||
<path class="st1" d="M260.1,113.6c-3,0-5.9-0.5-8.7-1.4c-2.8-0.9-5.3-2.4-7.6-4.2l6.1-10.8c1.6,1.3,3.1,2.3,4.5,2.9s2.9,1,4.2,1
|
||||
c1.9,0,3.5-0.4,4.6-1.2s1.9-2,2.4-3.7c0.5-1.7,0.8-4,0.8-6.9V36.1h13.3V90c0,5.3-0.7,9.7-2.2,13.2c-1.5,3.5-3.6,6.1-6.5,7.8
|
||||
C268.2,112.8,264.5,113.6,260.1,113.6L260.1,113.6z"/>
|
||||
<path class="st1" d="M325.8,113.2c-5.4,0-10.5-1.3-15.1-3.7c-4.6-2.5-8.4-6-11.1-10.5c-2.8-4.5-4.2-9.6-4.2-15.3s1.4-10.4,4.2-15
|
||||
c2.8-4.5,6.5-8.1,11.2-10.6c4.7-2.6,9.8-3.9,15.3-3.9c5.5,0,10.6,1.3,15.2,3.9c4.6,2.6,8.4,6.1,11.1,10.6
|
||||
c2.8,4.5,4.2,9.6,4.2,15.1s-1.4,10.6-4.2,15.1c-2.8,4.5-6.5,8-11.2,10.5C336.5,111.9,331.3,113.2,325.8,113.2L325.8,113.2z
|
||||
M325.8,100.9c3.2,0,6.1-0.7,8.6-2.2c2.6-1.5,4.6-3.5,6.1-6.1c1.5-2.6,2.2-5.5,2.2-8.7c0-3.2-0.7-6.1-2.2-8.7
|
||||
c-1.5-2.7-3.5-4.7-6-6.2s-5.4-2.3-8.6-2.3s-5.9,0.8-8.5,2.3c-2.6,1.5-4.6,3.6-6.1,6.2c-1.5,2.6-2.2,5.5-2.2,8.7s0.8,6.2,2.3,8.9
|
||||
c1.5,2.6,3.5,4.7,6.1,6.1C320.1,100.1,322.8,100.9,325.8,100.9L325.8,100.9z"/>
|
||||
<path class="st1" d="M408.1,113.6c-7.3,0-13.9-1.7-19.9-5.2c-6-3.5-10.7-8.2-14.2-14.2c-3.5-6-5.2-12.5-5.2-19.7
|
||||
s1.7-13.8,5.2-19.9c3.5-6.1,8.3-10.9,14.4-14.5c6.1-3.6,13-5.4,20.5-5.4c3.4,0,6.7,0.5,9.9,1.4c3.3,0.9,6.5,2.2,9.6,4l0.1,15.4
|
||||
c-3.2-2.8-6.5-4.8-9.8-6.2c-3.3-1.4-6.7-2.1-10.2-2.1c-4.8,0-9.2,1.2-13.2,3.6c-4,2.4-7.2,5.7-9.6,9.9c-2.4,4.2-3.5,8.8-3.5,13.8
|
||||
s1.2,9.4,3.5,13.5c2.4,4.1,5.5,7.3,9.6,9.7c4,2.4,8.5,3.6,13.4,3.6c2.6,0,5-0.3,7.1-0.8c2.1-0.5,4.1-1.4,6.2-2.7
|
||||
c2-1.2,4.2-2.9,6.7-5l-0.1,15.5c-3.1,1.7-6.4,3.1-9.9,4C415.1,113.2,411.6,113.6,408.1,113.6L408.1,113.6z"/>
|
||||
<path class="st1" d="M473.7,113.2c-5.4,0-10.5-1.3-15.1-3.7c-4.6-2.5-8.4-6-11.1-10.5c-2.8-4.5-4.2-9.6-4.2-15.3s1.4-10.4,4.2-15
|
||||
c2.8-4.5,6.5-8.1,11.2-10.6s9.8-3.9,15.3-3.9c5.5,0,10.6,1.3,15.2,3.9c4.6,2.6,8.4,6.1,11.1,10.6c2.8,4.5,4.2,9.6,4.2,15.1
|
||||
s-1.4,10.6-4.2,15.1c-2.8,4.5-6.5,8-11.2,10.5C484.4,111.9,479.3,113.2,473.7,113.2L473.7,113.2z M473.7,100.9
|
||||
c3.2,0,6.1-0.7,8.6-2.2c2.6-1.5,4.6-3.5,6.1-6.1c1.5-2.6,2.2-5.5,2.2-8.7c0-3.2-0.7-6.1-2.2-8.7c-1.5-2.7-3.5-4.7-6-6.2
|
||||
s-5.4-2.3-8.6-2.3c-3.2,0-5.9,0.8-8.5,2.3c-2.6,1.5-4.6,3.6-6.1,6.2c-1.5,2.6-2.2,5.5-2.2,8.7s0.8,6.2,2.3,8.9s3.5,4.7,6.1,6.1
|
||||
C468,100.1,470.7,100.9,473.7,100.9L473.7,100.9z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.7 KiB |
@@ -1,8 +1,9 @@
|
||||
Sphinx==4.5.0
|
||||
sphinx-rtd-theme==1.0.0
|
||||
furo==2022.9.29
|
||||
sphinxcontrib-katex==0.8.6
|
||||
sphinxcontrib-youtube==1.1.0
|
||||
sphinx-reredirects==0.0.1
|
||||
sphinx-toolbox==3.2.0
|
||||
nbsphinx==0.8.0
|
||||
pandoc==1.0.2
|
||||
pygments==2.7.4
|
||||
|
||||
Reference in New Issue
Block a user