Skip to content

Latest commit

 

History

History
106 lines (88 loc) · 3.49 KB

File metadata and controls

106 lines (88 loc) · 3.49 KB

Algorithmic NEWS

v1.0.7

Note

@JL170 added an option to customize line number formatting (#32).

#algorithm(
line-numbers-format: x => [#x:],
{ ... }
)

Note

@avlouis added inline command IfElseInline for ternary if-then-else statements (#31).

#{
  Assign($m$, IfElseInline($x < y$, $x$, $y$))
}

Note

@wamserma fixed an issue with the width of the column offset not scaling with the font size (#26). Now, the column is specified relative to the font size in em. This is not a breaking change.

Note

@nonl4331 fixed an issue with LineComment not working with certain input types (#27, #28).

LineComment statements similar to the instances below will now render correctly.

#{
  LineComment([Initialize hashmap], [Count instances])
  LineComment([$c += a-b$], [Sum of differences])
}

v1.0.6

Note

@TimeTravelPenguin fixed an issue with Assign not working with nested blocks (#23, #24).

Algorithms similar to the one below will now render correctly.

#{
  let Solve = Call.with("Solve")
  Assign($x$, Solve[$A$, $b$])
}

v1.0.5

Note

Added an option line-numbers to toggle line numbers on/off (#22).

#algorithm(line-numbers: false, ...)
#algorithm-figure(line-numbers: false, ...)

If you would like to remove line numbers globally, you can define

#let algorithm = algorithm.with(line-numbers: false)
#let algorithm-figure = algorithm-figure.with(line-numbers: false)

Note

Fix an issue with algorithm-figure float placement (#21). style-algorithm now has options placement and scope mimicking figure. By default, options set on figure(kind: "algorithm") supersede those of style-algorithm.

#show: style-algorithm.with(placement: top, scope: "column")
#show figure.where(kind: "algorithm").with(placement: bottom, scope: "parent")

The above example will place algorithm figures at the bottom of the parent scope.

v1.0.4

Note

@drecouse fixed an issue with LineComment preventing loops' body from displaying (#20). Now, you can use LineComment on loops without issues.

LineComment(
  While($j <= 10$, {
    Assign[$x$][1]
  }),
  "This is inside a nested block",
)

!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".

Note

algorithm-figure does not set placement: none anymore (#21).

v1.0.3

Warning

algorithmic now use grids instead of tables for accessibility purposes, see layout/grid. Any table.hlines in style-algorithm will error and grid.hlines must be used instead.

Note

This version fixes an issue with the indentation offset where the last column corresponding to comments goes in the margin.

Note

State is renamed to Line and will now work with other commands such as LineComment. Documentation is added in the README.