@@ -26,9 +26,8 @@ Playing
2626
2727Example: Let Stockfish play against itself, 100 milliseconds per move.
2828
29- .. code :: python
30-
31- """ Using synchronous engine.SimpleEngine."""
29+ .. code-block :: python
30+ :caption: Using synchronous :class :`~ chess.engine.SimpleEngine`
3231
3332 import chess
3433 import chess.engine
@@ -42,9 +41,8 @@ Example: Let Stockfish play against itself, 100 milliseconds per move.
4241
4342 engine.quit()
4443
45- .. code :: python
46-
47- """ Using async engine."""
44+ .. code-block :: python
45+ :caption: Using asyncio
4846
4947 import asyncio
5048 import chess
@@ -77,9 +75,8 @@ Analysing and evaluating a position
7775
7876Example:
7977
80- .. code :: python
81-
82- """ Using synchronous engine.SimpleEngine."""
78+ .. code-block :: python
79+ :caption: Using synchronous :class :`~ chess.engine.SimpleEngine`
8380
8481 import chess
8582 import chess.engine
@@ -98,9 +95,8 @@ Example:
9895
9996 engine.quit()
10097
101- .. code :: python
102-
103- """ Using async engine."""
98+ .. code-block :: python
99+ :caption: Using asyncio
104100
105101 import asyncio
106102 import chess
@@ -146,9 +142,8 @@ Indefinite or infinite analysis
146142
147143Example: Stream information from the engine and stop on an arbitrary condition.
148144
149- .. code :: python
150-
151- """ Using synchronous engine.SimpleEngine."""
145+ .. code-block :: python
146+ :caption: Using synchronous :class :`~ chess.engine.SimpleEngine`
152147
153148 import chess
154149 import chess.engine
@@ -165,9 +160,8 @@ Example: Stream information from the engine and stop on an arbitrary condition.
165160
166161 engine.quit()
167162
168- .. code :: python
169-
170- """ Using async engine."""
163+ .. code-block :: python
164+ :caption: Using asyncio
171165
172166 import asyncio
173167 import chess
@@ -206,9 +200,8 @@ Options
206200:func: `~chess.Protocol.analyse() ` and
207201:func: `~chess.Protocol.analysis() ` accept a dictionary of options.
208202
209- .. code :: python
210-
211- """ Using synchronous engine.SimpleEngine."""
203+ .. code-block :: python
204+ :caption: Using synchronous :class :`~ chess.engine.SimpleEngine`
212205
213206 import chess.engine
214207
@@ -223,9 +216,8 @@ Options
223216
224217 # [...]
225218
226- .. code :: python
227-
228- """ Using async engine."""
219+ .. code-block :: python
220+ :caption: Using asyncio
229221
230222 import asyncio
231223 import chess.engine
0 commit comments