Skip to content

Commit f26a315

Browse files
committed
Simplify sample
1 parent 16c9340 commit f26a315

File tree

2 files changed

+13
-118
lines changed

2 files changed

+13
-118
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ repos:
308308
pass_filenames: false
309309
additional_dependencies: [uv==0.8.23]
310310

311-
# We don't check spelling because there is a conflict with a bug in ``sphinx-toolbox.rest_example``:
311+
# We don't check spelling because here is a conflict with a bug in ``sphinx-toolbox.rest_example``:
312312
# https://github.com/sphinx-toolbox/sphinx-toolbox/issues/195.
313313
#
314314
# - id: spelling

sample/index.rst

Lines changed: 12 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -58,80 +58,19 @@ Keyboard Shortcuts
5858

5959
The builder supports keyboard shortcuts using the standard ``:kbd:`` role: Press :kbd:`Ctrl+C` to copy, :kbd:`Ctrl+V` to paste, and :kbd:`Ctrl+Z` to undo.
6060

61-
Note Admonition
62-
~~~~~~~~~~~~~~~~
61+
Admonitions
62+
~~~~~~~~~~~
6363

6464
.. rest-example::
6565

6666
.. note::
6767

68-
This is an important note that demonstrates the note admonition support.
69-
70-
Some nested content:
71-
72-
* First level item in note
73-
* Another first level item
74-
* Another first level item
75-
76-
* Second level nested in note
77-
* Another second level item
78-
79-
* Third level nested in note (deep!)
80-
* Another third level item
81-
82-
* Fourth level nested in note (very deep!)
83-
* Another fourth level item
84-
* Another fourth level item
85-
86-
* Fifth level nested in note (extremely deep!)
87-
* Another fifth level item
88-
89-
* Back to fourth level in note
90-
91-
* Back to third level in note
92-
93-
* Back to second level in note
94-
95-
* Back to first level in note
96-
97-
Warning Admonition
98-
~~~~~~~~~~~~~~~~~~
99-
100-
.. rest-example::
68+
This is a note that demonstrates the note admonition support.
10169

10270
.. warning::
10371

10472
This is a warning that demonstrates the warning admonition support.
10573

106-
.. code-block:: python
107-
108-
"""Python code nested in an admonition."""
109-
110-
111-
def hello_world() -> int:
112-
"""Return the answer."""
113-
return 42
114-
115-
116-
hello_world()
117-
118-
.. warning::
119-
120-
This is a warning that demonstrates the warning admonition support.
121-
122-
.. warning::
123-
124-
This is a warning that demonstrates the nested admonition support.
125-
126-
.. warning::
127-
128-
This is a warning that demonstrates the even deeper admonition support.
129-
130-
Various Admonitions
131-
~~~~~~~~~~~~~~~~~~~
132-
133-
.. rest-example::
134-
13574
.. tip::
13675

13776
This is a helpful tip that demonstrates the tip admonition support.
@@ -162,8 +101,8 @@ Various Admonitions
162101

163102
.. admonition:: Custom Admonition Title
164103

165-
This is a generic admonition with a custom title. You can use this for
166-
any type of callout that doesn't fit the standard admonition types.
104+
This is a generic admonition with a custom title.
105+
You can use this for any type of callout that doesn't fit the standard admonition types.
167106

168107
Collapsible Content
169108
~~~~~~~~~~~~~~~~~~~
@@ -176,12 +115,8 @@ Collapsible Content
176115

177116
It supports **all the same formatting** as regular content.
178117

179-
.. note::
180-
181-
You can even nest admonitions inside collapsible sections!
182-
183-
Literal Include Examples
184-
~~~~~~~~~~~~~~~~~~~~~~~~
118+
Including Files
119+
~~~~~~~~~~~~~~~
185120

186121
.. rest-example::
187122

@@ -292,13 +227,11 @@ Task Lists
292227

293228
3. [ ] Task C
294229

295-
Heading with *italic* and ``inline code``
296-
-----------------------------------------
230+
Block Quotes
231+
------------
297232

298233
.. rest-example::
299234

300-
The builder supports block quotes:
301-
302235
Regular paragraph.
303236

304237
This is a multi-line
@@ -413,72 +346,34 @@ Local Video Example
413346
:caption: Local test video file
414347

415348
Audio Examples
416-
--------------
417-
418-
Simple Audio
419-
~~~~~~~~~~~~
349+
~~~~~~~~~~~~~~
420350

421351
.. rest-example::
422352

423353
.. audio:: https://thetestdata.com/assets/audio/wav/thetestdata-sample-wav-2.wav
424354

425-
Local Audio Example
426-
~~~~~~~~~~~~~~~~~~~
427-
428-
.. rest-example::
429-
430355
.. audio:: _static/test-audio.wav
431356

432357
PDF Support
433-
~~~~~~~~~~~~
434-
435-
Simple PDF
436-
~~~~~~~~~~
358+
~~~~~~~~~~~
437359

438360
.. rest-example::
439361

440362
.. pdf-include:: https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
441363

442-
Local PDF Example
443-
~~~~~~~~~~~~~~~~~
444-
445-
.. rest-example::
446-
447364
.. pdf-include:: _static/test.pdf
448365

449366
Mathematical Equations
450367
~~~~~~~~~~~~~~~~~~~~~~
451368

452-
.. rest-example::
453-
454-
The builder supports mathematical equations using the ``sphinx.ext.mathjax`` extension.
455-
456-
Inline Equations
457-
~~~~~~~~~~~~~~~~
369+
The builder supports mathematical equations using the ``sphinx.ext.mathjax`` extension.
458370

459371
.. rest-example::
460372

461373
You can include inline equations like this: :math:`E = mc^2` in your text.
462374

463-
Here are some more examples:
464-
465-
* The quadratic formula: :math:`x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}`
466-
* The integral of x squared: :math:`\int x^2 dx = \frac{x^3}{3} + C`
467-
* Euler's identity: :math:`e^{i\pi} + 1 = 0`
468-
469-
Block Equations
470-
~~~~~~~~~~~~~~~
471-
472-
.. rest-example::
473-
474375
You can also include block-level equations:
475376

476-
.. math::
477-
478-
E = mc^2
479-
480-
The Schrödinger equation:
481-
482377
.. math::
483378
484379
i\hbar\frac{\partial}{\partial t}\Psi(\mathbf{r},t) = \hat{H}\Psi(\mathbf{r},t)

0 commit comments

Comments
 (0)