Skip to content

Commit 6e48b88

Browse files
authored
Merge branch 'typst:main' into business-report
2 parents 1235474 + 2e0e35d commit 6e48b88

File tree

214 files changed

+51079
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+51079
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Jade Lovelace
4+
Copyright (c) 2025 Pascal Quach
5+
Copyright (c) 2025 Typst Community
6+
Copyright (c) 2025 Contributors to the typst-algorithmic project
7+
8+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11+
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Algorithmic NEWS
2+
3+
## v1.0.7
4+
5+
> [!NOTE]
6+
> @JL170 added an option to customize line number formatting (#32).
7+
> ```typ
8+
> #algorithm(
9+
> line-numbers-format: x => [#x:],
10+
> { ... }
11+
> )
12+
> ```
13+
14+
> [!NOTE]
15+
> @avlouis added inline command `IfElseInline` for ternary if-then-else statements (#31).
16+
> ```typ
17+
> #{
18+
> Assign($m$, IfElseInline($x < y$, $x$, $y$))
19+
> }
20+
> ```
21+
22+
> [!NOTE]
23+
> @wamserma fixed an issue with the width of the column offset not scaling with
24+
> the font size (#26).
25+
> Now, the column is specified relative to the font size in [`em`](https://typst.app/docs/reference/layout/length/).
26+
> This is not a breaking change.
27+
28+
> [!NOTE]
29+
> @nonl4331 fixed an issue with `LineComment` not working with certain input types (#27, #28).
30+
>
31+
> LineComment statements similar to the instances below will now render correctly.
32+
> ```typ
33+
> #{
34+
> LineComment([Initialize hashmap], [Count instances])
35+
> LineComment([$c += a-b$], [Sum of differences])
36+
> }
37+
> ```
38+
39+
## v1.0.6
40+
41+
> [!NOTE]
42+
> @TimeTravelPenguin fixed an issue with `Assign` not working with nested blocks (#23, #24).
43+
>
44+
> Algorithms similar to the one below will now render correctly.
45+
> ```typ
46+
> #{
47+
> let Solve = Call.with("Solve")
48+
> Assign($x$, Solve[$A$, $b$])
49+
> }
50+
> ```
51+
52+
## v1.0.5
53+
54+
> [!NOTE]
55+
> Added an option `line-numbers` to toggle line numbers on/off (#22).
56+
> ```typ
57+
> #algorithm(line-numbers: false, ...)
58+
> #algorithm-figure(line-numbers: false, ...)
59+
> ```
60+
> If you would like to remove line numbers globally, you can define
61+
> ```typ
62+
> #let algorithm = algorithm.with(line-numbers: false)
63+
> #let algorithm-figure = algorithm-figure.with(line-numbers: false)
64+
> ```
65+
66+
> [!NOTE]
67+
> Fix an issue with `algorithm-figure` float placement (#21).
68+
> `style-algorithm` now has options `placement` and `scope` mimicking `figure`.
69+
> By default, options set on `figure(kind: "algorithm")` supersede those of
70+
> `style-algorithm`.
71+
> ```typ
72+
> #show: style-algorithm.with(placement: top, scope: "column")
73+
> #show figure.where(kind: "algorithm").with(placement: bottom, scope: "parent")
74+
> ```
75+
> The above example will place algorithm figures at the bottom of the parent scope.
76+
77+
## v1.0.4
78+
79+
> [!NOTE]
80+
> @drecouse fixed an issue with `LineComment` preventing loops' body from displaying (#20).
81+
> Now, you can use `LineComment` on loops without issues.
82+
> ```typ
83+
> LineComment(
84+
> While($j <= 10$, {
85+
> Assign[$x$][1]
86+
> }),
87+
> "This is inside a nested block",
88+
> )
89+
> ```
90+
> [!Screenshot of an algorithm showing a for-loop from i = 1 to 10, with each iteration containing a line calculation (1+1) and a nested while-loop from j = 1 to 10 assigning x = 1, with line comments describing "This is inside a nested block" and "This is a line comment after a block".](https://raw.githubusercontent.com/typst-community/typst-algorithmic/refs/tags/v1.0.4/tests/linecommentfor/ref/1.png)
91+
92+
> [!NOTE]
93+
> `algorithm-figure` does not set `placement: none` anymore (#21).
94+
95+
96+
## v1.0.3
97+
98+
> [!WARNING]
99+
> algorithmic now use grids instead of tables for accessibility purposes, see [layout/grid](https://typst.app/docs/reference/layout/grid/#:~:text=Typst%20will%20annotate%20its%20output%20such%20that%20screenreaders%20will%20announce%20content%20in%20table%20as%20tabular).
100+
> Any `table.hlines` in `style-algorithm` will error and `grid.hlines` must be used instead.
101+
102+
> [!NOTE]
103+
> This version fixes an issue with the indentation offset where the last column corresponding to comments goes in the margin.
104+
105+
> [!NOTE]
106+
> `State` is renamed to `Line` and will now work with other commands such as `LineComment`. Documentation is added in the [README](README.md).

0 commit comments

Comments
 (0)