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.3/docs/assets/algorithmic-demo.png)
@@ -92,7 +92,7 @@ between lines with the `inset` parameter.
92
92
}
93
93
)
94
94
```
95
-

95
+

@@ -142,7 +142,7 @@ An example of how to style the algorithm figure:
142
142
)
143
143
```
144
144
which will result in something like
145
-
.
145
+
.
146
146
147
147
#### Control flow
148
148
@@ -172,7 +172,7 @@ If($x < y$, {
172
172
```
173
173
174
174
</td>
175
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/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>
175
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/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>
176
176
</tr>
177
177
<tr>
178
178
<td><code>ElseIf</code></td>
@@ -186,7 +186,7 @@ ElseIf($x > y$, {
186
186
```
187
187
188
188
</td>
189
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/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>
189
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/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>
190
190
</tr>
191
191
<tr>
192
192
<td><code>Else</code></td>
@@ -200,7 +200,7 @@ Else({
200
200
```
201
201
202
202
</td>
203
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/tests/else/ref/1.png"alt="image of an else statement with conditional statement return y"width="500"></td>
203
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/tests/else/ref/1.png"alt="image of an else statement with conditional statement return y"width="500"></td>
204
204
</tr>
205
205
<tr>
206
206
<td><code>While</code></td>
@@ -214,7 +214,7 @@ While($i < 10$, {
214
214
```
215
215
216
216
</td>
217
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/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>
217
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/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>
218
218
</tr>
219
219
<tr>
220
220
<td><code>For</code></td>
@@ -228,7 +228,7 @@ For($i <= 10$, {
228
228
```
229
229
230
230
</td>
231
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/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>
231
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/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>
232
232
</tr>
233
233
<tr>
234
234
<td><code>IfElseChain</code></td>
@@ -250,7 +250,7 @@ IfElseChain( // Alternating content and bits
250
250
```
251
251
252
252
</td>
253
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/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>
253
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/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>
254
254
</tr>
255
255
</tbody>
256
256
</grid>
@@ -282,7 +282,7 @@ Assign[$a$][$b$]
282
282
```
283
283
284
284
</td>
285
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/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>
285
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/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>
286
286
</tr>
287
287
<tr>
288
288
<td><code>Procedure</code></td>
@@ -296,7 +296,7 @@ Assign[$a$][$a+b$]
296
296
```
297
297
298
298
</td>
299
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/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>
299
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/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>
300
300
</tr>
301
301
<tr>
302
302
<td><code>Assign</code></td>
@@ -308,7 +308,7 @@ Assign[$x$][$y$]
308
308
```
309
309
310
310
</td>
311
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/tests/assign/ref/1.png"alt="image of an assignment statement assigning y to x"width="500"></td>
311
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/tests/assign/ref/1.png"alt="image of an assignment statement assigning y to x"width="500"></td>
312
312
</tr>
313
313
<tr>
314
314
<td><code>Return</code></td>
@@ -320,7 +320,7 @@ Return[$x$]
320
320
```
321
321
322
322
</td>
323
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/tests/return/ref/1.png"alt="image of a return statement returning x"width="500"></td>
323
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/tests/return/ref/1.png"alt="image of a return statement returning x"width="500"></td>
324
324
</tr>
325
325
<tr>
326
326
<td><code>Terminate</code></td>
@@ -332,7 +332,7 @@ Terminate[$x$]
332
332
```
333
333
334
334
</td>
335
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/tests/terminate/ref/1.png"alt="image of a terminate statement terminating x"width="500"></td>
335
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/tests/terminate/ref/1.png"alt="image of a terminate statement terminating x"width="500"></td>
336
336
</tr>
337
337
<tr>
338
338
<td><code>Break</code></td>
@@ -344,7 +344,7 @@ Break()
344
344
```
345
345
346
346
</td>
347
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/tests/break/ref/1.png"alt="image of a break statement"width="500"></td>
347
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/tests/break/ref/1.png"alt="image of a break statement"width="500"></td>
348
348
</tr>
349
349
</tbody>
350
350
</grid>
@@ -364,7 +364,7 @@ Users can also define their own commands using both `Call(..args)` and
364
364
Assign($y$, mean[$x$])
365
365
})
366
366
```
367
-

367
+

368
368
369
369
#### Standalone lines and line breaks
370
370
@@ -377,7 +377,7 @@ You can use `Line` to create a standalone line and `LineBreak` to insert a line
377
377
LineBreak
378
378
})
379
379
```
380
-

380
+

381
381
382
382
383
383
#### Comments
@@ -408,7 +408,7 @@ Comment[This is a comment]
408
408
```
409
409
410
410
</td>
411
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/tests/comment/ref/1.png"alt="image of a block comment with text 'This is a comment'"width="500"></td>
411
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/tests/comment/ref/1.png"alt="image of a block comment with text 'This is a comment'"width="500"></td>
412
412
</tr>
413
413
<tr>
414
414
<td><code>CommentInline</code></td>
@@ -420,7 +420,7 @@ CommentInline[This is a comment]
420
420
```
421
421
422
422
</td>
423
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/tests/commentinline/ref/1.png"alt="image of an inline comment with text 'This is a comment'"width="500"></td>
423
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/tests/commentinline/ref/1.png"alt="image of an inline comment with text 'This is a comment'"width="500"></td>
424
424
</tr>
425
425
<tr>
426
426
<td><code>LineComment</code></td>
@@ -432,7 +432,7 @@ LineComment(Assign[a][1], [Initialize $a$ to 1])
432
432
```
433
433
434
434
</td>
435
-
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.2/tests/linecomment/ref/1.png"alt="image of a line comment with text 'Initialize a to 1'"width="500"></td>
435
+
<td><imgsrc="https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.3/tests/linecomment/ref/1.png"alt="image of a line comment with text 'Initialize a to 1'"width="500"></td>
0 commit comments