|
14 | 14 | * _Math formula support:_ Inserting math formulas in pseudocode.js is as easy |
15 | 15 | as LaTeX. Just enclose math expression in `$...$` or `\(...\)`. |
16 | 16 |
|
17 | | -It supports all modern browsers, including Chrome, Safari, Firefox, Edge, and |
18 | | -IE 9 - IE 11. |
| 17 | +It supports all modern browsers, including Chrome, Safari, Firefox, Edge, and Edge. |
19 | 18 |
|
20 | 19 | Visit the [project website](https://saswatpadhi.github.io/pseudocode.js) for a demo. |
21 | 20 |
|
@@ -129,7 +128,7 @@ Insert the following Javascript snippet at the end of your document: |
129 | 128 | </script> |
130 | 129 | ``` |
131 | 130 |
|
132 | | -#### Step 4B · Render the class using pseudocode.js |
| 131 | +#### Step 4B · Render all elements of the class using pseudocode.js |
133 | 132 | Insert the following Javascript snippet at the end of your document: |
134 | 133 |
|
135 | 134 | ```html |
@@ -198,38 +197,37 @@ and `<function>`: |
198 | 197 | \COMMENT{<text>} |
199 | 198 | ``` |
200 | 199 |
|
201 | | -A `<text>` (or `<condition>`) can include the following: |
| 200 | +A `<text>`, `<block>`, or `<condition>` may include the following: |
202 | 201 | ```tex |
203 | | -# Normal characters |
| 202 | +% Normal characters |
204 | 203 | Hello world |
205 | | -# Escaped characters |
| 204 | +% Escaped characters |
206 | 205 | \\, \{, \}, \$, \&, \#, \% and \_ |
207 | | -# Math formula |
| 206 | +% Math formula |
208 | 207 | $i \gets i + 1$ |
209 | | -# Function call |
| 208 | +% Function call |
210 | 209 | \CALL{<func>}{<args>} |
211 | | -# Keywords |
212 | | -\AND, \OR, \XOR, \NOT, \TO, \DOWNTO, \TRUE, \FALSE |
213 | | -# LaTeX's sizing commands |
| 210 | +% Keywords |
| 211 | +\AND, \OR, \XOR, \NOT, \TO, \DOWNTO, \TRUE, \FALSE, \BREAK, \CONTINUE |
| 212 | +% LaTeX's sizing commands |
214 | 213 | \tiny, \scriptsize, \footnotesize, \small \normalsize, \large, \Large, \LARGE, |
215 | 214 | \huge, \HUGE |
216 | | -# LaTeX's font declarations |
| 215 | +% LaTeX's font declarations |
217 | 216 | \rmfamily, \sffamily, \ttfamily |
218 | 217 | \upshape, \itshape, \slshape, \scshape |
219 | 218 | \bfseries, \mdseries, \lfseries |
220 | | -# LaTeX's font commands |
| 219 | +% LaTeX's font commands |
221 | 220 | \textnormal{<text>}, \textrm{<text>}, \textsf{<text>}, \texttt{<text>} |
222 | 221 | \textup{<text>}, \textit{<text>}, \textsl{<text>}, \textsc{<text>} |
223 | 222 | \uppercase{<text>}, \lowercase{<text>} |
224 | 223 | \textbf, \textmd, \textlf |
225 | | -# And it's possible to group text with braces |
| 224 | +% And it's possible to group text with braces |
226 | 225 | normal text {\small the size gets smaller} back to normal again |
227 | 226 | ``` |
228 | 227 |
|
229 | | -Note that although pseudocode.js recognizes some LaTeX commands, it is by no |
230 | | -means a full-featured LaTeX implementation in JavaScript. |
231 | | -It only support a subset of LaTeX commands that are most relevant to |
232 | | -typesetting algorithms. |
| 228 | +> **Note** |
| 229 | +> Although pseudocode.js recognizes some LaTeX commands, it is by no means a full-featured LaTeX implementation in JavaScript. |
| 230 | +> It only support a subset of LaTeX commands that are most relevant to typesetting algorithms. |
233 | 231 |
|
234 | 232 |
|
235 | 233 | To display the caption of an algorithm, use `algorithm` environment as a 'float' wrapper : |
|
0 commit comments