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
+22-22Lines changed: 22 additions & 22 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.7/docs/assets/algorithmic-demo.png)
@@ -96,7 +96,7 @@ If you want to customize line numbers, you can pass a function, that takes a num
96
96
}
97
97
)
98
98
```
99
-

99
+

@@ -158,7 +158,7 @@ An example of how to style the algorithm figure:
158
158
)
159
159
```
160
160
which will result in something like
161
-
.
161
+
.
162
162
163
163
#### Control flow
164
164
@@ -188,7 +188,7 @@ If($x < y$, {
188
188
```
189
189
190
190
</td>
191
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/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>
191
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/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>
192
192
</tr>
193
193
<tr>
194
194
<td><code>ElseIf</code></td>
@@ -202,7 +202,7 @@ ElseIf($x > y$, {
202
202
```
203
203
204
204
</td>
205
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/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>
205
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/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>
206
206
</tr>
207
207
<tr>
208
208
<td><code>Else</code></td>
@@ -216,7 +216,7 @@ Else({
216
216
```
217
217
218
218
</td>
219
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/tests/else/ref/1.png"alt="image of an else statement with conditional statement return y"width="500"></td>
219
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/tests/else/ref/1.png"alt="image of an else statement with conditional statement return y"width="500"></td>
220
220
</tr>
221
221
<tr>
222
222
<td><code>While</code></td>
@@ -230,7 +230,7 @@ While($i < 10$, {
230
230
```
231
231
232
232
</td>
233
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/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>
233
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/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>
234
234
</tr>
235
235
<tr>
236
236
<td><code>For</code></td>
@@ -244,7 +244,7 @@ For($i <= 10$, {
244
244
```
245
245
246
246
</td>
247
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/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>
247
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/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>
248
248
</tr>
249
249
<tr>
250
250
<td><code>IfElseChain</code></td>
@@ -266,7 +266,7 @@ IfElseChain( // Alternating content and bits
266
266
```
267
267
268
268
</td>
269
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/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>
269
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/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>
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/tests/ifelseinline/ref/1.png"alt="image of an ifelseinline expression with condition x < y, true expression x, and false expression y being assigned to m"width="500"></td>
281
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/tests/ifelseinline/ref/1.png"alt="image of an ifelseinline expression with condition x < y, true expression x, and false expression y being assigned to m"width="500"></td>
282
282
</tr>
283
283
</tbody>
284
284
</table>
@@ -310,7 +310,7 @@ Assign[$a$][$b$]
310
310
```
311
311
312
312
</td>
313
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/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>
313
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/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>
314
314
</tr>
315
315
<tr>
316
316
<td><code>Procedure</code></td>
@@ -324,7 +324,7 @@ Assign[$a$][$a+b$]
324
324
```
325
325
326
326
</td>
327
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/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>
327
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/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>
328
328
</tr>
329
329
<tr>
330
330
<td><code>Assign</code></td>
@@ -336,7 +336,7 @@ Assign[$x$][$y$]
336
336
```
337
337
338
338
</td>
339
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/tests/assign/ref/1.png"alt="image of an assignment statement assigning y to x"width="500"></td>
339
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/tests/assign/ref/1.png"alt="image of an assignment statement assigning y to x"width="500"></td>
340
340
</tr>
341
341
<tr>
342
342
<td><code>Return</code></td>
@@ -348,7 +348,7 @@ Return[$x$]
348
348
```
349
349
350
350
</td>
351
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/tests/return/ref/1.png"alt="image of a return statement returning x"width="500"></td>
351
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/tests/return/ref/1.png"alt="image of a return statement returning x"width="500"></td>
352
352
</tr>
353
353
<tr>
354
354
<td><code>Terminate</code></td>
@@ -360,7 +360,7 @@ Terminate[$x$]
360
360
```
361
361
362
362
</td>
363
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/tests/terminate/ref/1.png"alt="image of a terminate statement terminating x"width="500"></td>
363
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/tests/terminate/ref/1.png"alt="image of a terminate statement terminating x"width="500"></td>
364
364
</tr>
365
365
<tr>
366
366
<td><code>Break</code></td>
@@ -372,7 +372,7 @@ Break()
372
372
```
373
373
374
374
</td>
375
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/tests/break/ref/1.png"alt="image of a break statement"width="500"></td>
375
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/tests/break/ref/1.png"alt="image of a break statement"width="500"></td>
376
376
</tr>
377
377
</tbody>
378
378
</table>
@@ -392,7 +392,7 @@ Users can also define their own commands using both `Call(..args)` and
392
392
Assign($y$, mean[$x$])
393
393
})
394
394
```
395
-

395
+

396
396
397
397
#### Standalone lines and line breaks
398
398
@@ -405,7 +405,7 @@ You can use `Line` to create a standalone line and `LineBreak` to insert a line
405
405
LineBreak
406
406
})
407
407
```
408
-

408
+

409
409
410
410
411
411
#### Comments
@@ -436,7 +436,7 @@ Comment[This is a comment]
436
436
```
437
437
438
438
</td>
439
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/tests/comment/ref/1.png"alt="image of a block comment with text 'This is a comment'"width="500"></td>
439
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/tests/comment/ref/1.png"alt="image of a block comment with text 'This is a comment'"width="500"></td>
440
440
</tr>
441
441
<tr>
442
442
<td><code>CommentInline</code></td>
@@ -448,7 +448,7 @@ CommentInline[This is a comment]
448
448
```
449
449
450
450
</td>
451
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/tests/commentinline/ref/1.png"alt="image of an inline comment with text 'This is a comment'"width="500"></td>
451
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/tests/commentinline/ref/1.png"alt="image of an inline comment with text 'This is a comment'"width="500"></td>
452
452
</tr>
453
453
<tr>
454
454
<td><code>LineComment</code></td>
@@ -460,7 +460,7 @@ LineComment(Assign[a][1], [Initialize $a$ to 1])
460
460
```
461
461
462
462
</td>
463
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.6/tests/linecomment/ref/1.png"alt="image of a line comment with text 'Initialize a to 1'"width="500"></td>
463
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.7/tests/linecomment/ref/1.png"alt="image of a line comment with text 'Initialize a to 1'"width="500"></td>
0 commit comments