You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/The-ROS2-Project/Contributing/Contributing-To-ROS-2-Documentation.rst
+8-19Lines changed: 8 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -482,7 +482,6 @@ Compare the above with a ``bash`` ``code-block``:
482
482
[INFO] [1742150439.026043867] [my_turtle]: Spawning turtle [turtle1] at x=[5.544445], y=[5.544445], theta=[0.000000]
483
483
484
484
To simplify code blocks, ``bash`` can still be used without ``$`` for commands meant to be run in a terminal if the code block does not include any output lines.
485
-
486
485
To help choose between ``bash`` and ``console``, see the following list of use-cases and corresponding examples:
487
486
488
487
#. Commands meant to be copied into a script file
@@ -494,25 +493,10 @@ To help choose between ``bash`` and ``console``, see the following list of use-c
494
493
export ROS_DOMAIN_ID=42
495
494
ros2 run turtlesim turtlesim_node
496
495
497
-
#. Commands meant to be run in a terminal *without* any output lines
498
-
499
-
* Use ``.. code-block:: bash`` without ``$``:
500
-
501
-
.. code-block:: bash
502
-
503
-
source /opt/ros/{DISTRO}/setup.bash
504
-
ros2 run turtlesim turtlesim_node
505
-
506
-
* Or use ``.. code-block:: console`` with ``$`` on all command lines, i.e., all lines:
496
+
#. Commands meant to be run in a terminal:
507
497
508
-
.. code-block:: console
509
-
510
-
$ source /opt/ros/{DISTRO}/setup.bash
511
-
$ ros2 run turtlesim turtlesim_node
512
-
513
-
#. Commands meant to be run in a terminal *with* output lines
514
-
515
-
* Use ``.. code-block:: console`` with ``$`` on all command lines:
498
+
* It is highly recommended to use ``.. code-block:: console`` with ``$`` on all command lines for consistency and clarity.
499
+
If there is output that needs to be displayed, include it in the same block:
516
500
517
501
.. code-block:: console
518
502
@@ -521,6 +505,11 @@ To help choose between ``bash`` and ``console``, see the following list of use-c
521
505
[INFO] [1743878028.269334696] [turtlesim]: Starting turtlesim with node name /turtlesim
522
506
[INFO] [1743878028.275096618] [turtlesim]: Spawning turtle [turtle1] at x=[5.544445], y=[5.544445], theta=[0.000000]
523
507
508
+
.. note::
509
+
510
+
If some output lines start with ``#``, it is crucial to separate commands from their output because the ``#`` symbol is used to denote a command.
511
+
Therefore, place the output in a separate ``.. code-block:: text``.
0 commit comments