Skip to content

Commit fcc9ead

Browse files
committed
update README.md and docs
1 parent 1938195 commit fcc9ead

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,13 @@ Configuration priority (higher priority overrides lower): Directive option (e.g.
100100
```text
101101
\STATE $\hspace{2em}$ This line is indented by 2em
102102
```
103+
- Enhance comment layout with CSS: You can customize the comment style (e.g., color, spacing) by adding CSS rules
104+
in your Sphinx theme's custom CSS file (e.g., ``_static/css/custom.css``):
105+
106+
```css
107+
.ps-root .ps-comment {
108+
white-space: pre-wrap; /* Preserve whitespace in "commentDelimiter" in `pseudocode2_options` */
109+
margin-left: 1.3em; /* Spacing between code and comment */
110+
color: blue; /* Change comment color */
111+
}
112+
```

docs/source/index.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,17 @@ Tips
8787

8888
\STATE $\hspace{2em}$ This line is indented by 2em
8989

90-
See also :ref:`this example <test-atoms-algo>`
90+
See also :ref:`this example <test-atoms-algo>`.
91+
- Enhance comment layout with CSS: You can customize the comment style (e.g., color, spacing) by adding CSS rules
92+
in your Sphinx theme's custom CSS file (e.g., ``_static/css/custom.css``):
93+
94+
.. code-block:: css
95+
96+
.ps-root .ps-comment {
97+
white-space: pre-wrap; /* Preserve whitespace in "commentDelimiter" in `pseudocode2_options` */
98+
margin-left: 1.3em; /* Spacing between code and comment */
99+
color: blue; /* Change comment color */
100+
}
91101
92102
########
93103
Examples

0 commit comments

Comments
 (0)