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: README.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,12 +14,12 @@ for Typst. It's useful for writing pseudocode and typesetting it all nicely.
14
14
[algorithmicx]: https://ctan.org/pkg/algorithmicx
15
15
16
16

17
+
indentation, bolded keywords, and such](https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/docs/assets/algorithmic-demo.png)
@@ -94,7 +94,7 @@ between lines with the `inset` parameter.
94
94
}
95
95
)
96
96
```
97
-

97
+

@@ -156,7 +156,7 @@ An example of how to style the algorithm figure:
156
156
)
157
157
```
158
158
which will result in something like
159
-
.
159
+
.
160
160
161
161
#### Control flow
162
162
@@ -186,7 +186,7 @@ If($x < y$, {
186
186
```
187
187
188
188
</td>
189
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/if/ref/1.png"alt="image of an if statement with condition x < y and conditional statement assign y to x"width="500"></td>
189
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/if/ref/1.png"alt="image of an if statement with condition x < y and conditional statement assign y to x"width="500"></td>
190
190
</tr>
191
191
<tr>
192
192
<td><code>ElseIf</code></td>
@@ -200,7 +200,7 @@ ElseIf($x > y$, {
200
200
```
201
201
202
202
</td>
203
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/elseif/ref/1.png"alt="image of an elseif statement with condition x > y and conditional statement assign x to y"width="500"></td>
203
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/elseif/ref/1.png"alt="image of an elseif statement with condition x > y and conditional statement assign x to y"width="500"></td>
204
204
</tr>
205
205
<tr>
206
206
<td><code>Else</code></td>
@@ -214,7 +214,7 @@ Else({
214
214
```
215
215
216
216
</td>
217
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/else/ref/1.png"alt="image of an else statement with conditional statement return y"width="500"></td>
217
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/else/ref/1.png"alt="image of an else statement with conditional statement return y"width="500"></td>
218
218
</tr>
219
219
<tr>
220
220
<td><code>While</code></td>
@@ -228,7 +228,7 @@ While($i < 10$, {
228
228
```
229
229
230
230
</td>
231
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/while/ref/1.png"alt="image of a while statement with condition i < 10 and conditional statement assign i + 1 to i"width="500"></td>
231
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/while/ref/1.png"alt="image of a while statement with condition i < 10 and conditional statement assign i + 1 to i"width="500"></td>
232
232
</tr>
233
233
<tr>
234
234
<td><code>For</code></td>
@@ -242,7 +242,7 @@ For($i <= 10$, {
242
242
```
243
243
244
244
</td>
245
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/for/ref/1.png"alt="image of a for loop with condition i <= 10 and conditional statement assign i to x_i"width="500"></td>
245
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/for/ref/1.png"alt="image of a for loop with condition i <= 10 and conditional statement assign i to x_i"width="500"></td>
246
246
</tr>
247
247
<tr>
248
248
<td><code>IfElseChain</code></td>
@@ -264,7 +264,7 @@ IfElseChain( // Alternating content and bits
264
264
```
265
265
266
266
</td>
267
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/ifelsechain/ref/1.png"alt="image of an ifelsechain statement with condition x < y and conditional statement assign y to x, then condition x"width="500"></td>
267
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/ifelsechain/ref/1.png"alt="image of an ifelsechain statement with condition x < y and conditional statement assign y to x, then condition x"width="500"></td>
268
268
</tr>
269
269
</tbody>
270
270
</table>
@@ -296,7 +296,7 @@ Assign[$a$][$b$]
296
296
```
297
297
298
298
</td>
299
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/function/ref/1.png"alt="image of a function definition with name 'Add' and arguments 'a' and 'b' with body 'return a+b'"width="500"></td>
299
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/function/ref/1.png"alt="image of a function definition with name 'Add' and arguments 'a' and 'b' with body 'return a+b'"width="500"></td>
300
300
</tr>
301
301
<tr>
302
302
<td><code>Procedure</code></td>
@@ -310,7 +310,7 @@ Assign[$a$][$a+b$]
310
310
```
311
311
312
312
</td>
313
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/procedure/ref/1.png"alt="image of a procedure definition with name 'Add' and arguments 'a' and 'b' with body 'assign a+b to a'"width="500"></td>
313
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/procedure/ref/1.png"alt="image of a procedure definition with name 'Add' and arguments 'a' and 'b' with body 'assign a+b to a'"width="500"></td>
314
314
</tr>
315
315
<tr>
316
316
<td><code>Assign</code></td>
@@ -322,7 +322,7 @@ Assign[$x$][$y$]
322
322
```
323
323
324
324
</td>
325
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/assign/ref/1.png"alt="image of an assignment statement assigning y to x"width="500"></td>
325
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/assign/ref/1.png"alt="image of an assignment statement assigning y to x"width="500"></td>
326
326
</tr>
327
327
<tr>
328
328
<td><code>Return</code></td>
@@ -334,7 +334,7 @@ Return[$x$]
334
334
```
335
335
336
336
</td>
337
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/return/ref/1.png"alt="image of a return statement returning x"width="500"></td>
337
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/return/ref/1.png"alt="image of a return statement returning x"width="500"></td>
338
338
</tr>
339
339
<tr>
340
340
<td><code>Terminate</code></td>
@@ -346,7 +346,7 @@ Terminate[$x$]
346
346
```
347
347
348
348
</td>
349
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/terminate/ref/1.png"alt="image of a terminate statement terminating x"width="500"></td>
349
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/terminate/ref/1.png"alt="image of a terminate statement terminating x"width="500"></td>
350
350
</tr>
351
351
<tr>
352
352
<td><code>Break</code></td>
@@ -358,7 +358,7 @@ Break()
358
358
```
359
359
360
360
</td>
361
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/break/ref/1.png"alt="image of a break statement"width="500"></td>
361
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/break/ref/1.png"alt="image of a break statement"width="500"></td>
362
362
</tr>
363
363
</tbody>
364
364
</table>
@@ -378,7 +378,7 @@ Users can also define their own commands using both `Call(..args)` and
378
378
Assign($y$, mean[$x$])
379
379
})
380
380
```
381
-

381
+

382
382
383
383
#### Standalone lines and line breaks
384
384
@@ -391,7 +391,7 @@ You can use `Line` to create a standalone line and `LineBreak` to insert a line
391
391
LineBreak
392
392
})
393
393
```
394
-

394
+

395
395
396
396
397
397
#### Comments
@@ -422,7 +422,7 @@ Comment[This is a comment]
422
422
```
423
423
424
424
</td>
425
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/comment/ref/1.png"alt="image of a block comment with text 'This is a comment'"width="500"></td>
425
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/comment/ref/1.png"alt="image of a block comment with text 'This is a comment'"width="500"></td>
426
426
</tr>
427
427
<tr>
428
428
<td><code>CommentInline</code></td>
@@ -434,7 +434,7 @@ CommentInline[This is a comment]
434
434
```
435
435
436
436
</td>
437
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/commentinline/ref/1.png"alt="image of an inline comment with text 'This is a comment'"width="500"></td>
437
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/commentinline/ref/1.png"alt="image of an inline comment with text 'This is a comment'"width="500"></td>
438
438
</tr>
439
439
<tr>
440
440
<td><code>LineComment</code></td>
@@ -446,7 +446,7 @@ LineComment(Assign[a][1], [Initialize $a$ to 1])
446
446
```
447
447
448
448
</td>
449
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/linecomment/ref/1.png"alt="image of a line comment with text 'Initialize a to 1'"width="500"></td>
449
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.5/tests/linecomment/ref/1.png"alt="image of a line comment with text 'Initialize a to 1'"width="500"></td>
0 commit comments