Grid doesn't seem to work?
jlearnscode opened this issue · comments
jlearnscode commented
None of the examples from Typst documentation work.
A simple example generates nothing and produces no error messages:
#grid(
columns: 5,
gutter: 5pt,
..range(25).map(str)
)
The tiger example and the chessboard example give an error message of 'expected semicolon or line break':
// We use `rect` to emphasize the
// area of cells.
#set rect(
inset: 8pt,
fill: rgb("e4e5ea"),
width: 100%,
)
#grid(
columns: (60pt, 1fr, 2fr),
rows: (auto, 60pt),
gutter: 3pt,
rect[Fixed width, auto height],
rect[1/3 of the remains],
rect[2/3 of the remains],
rect(height: 100%)[Fixed height],
grid.cell(
colspan: 2,
image("tiger.jpg", width: 100%),
),
)
#set text(15pt, font: "Noto Sans Symbols 2")
#show regex("[♚-♟︎]"): set text(fill: rgb("21212A"))
#show regex("[♔-♙]"): set text(fill: rgb("111015"))
#grid(
fill: (x, y) => rgb(
if calc.odd(x + y) { "EFF0F3" }
else { "7F8396" }
),
columns: (1em,) * 8,
rows: 1em,
align: center + horizon,
[♜], [♞], [♝], [♛], [♚], [♝], [♞], [♜],
[♟], [♟], [♟], [♟], [], [♟], [♟], [♟],
grid.cell(
x: 4, y: 3,
stroke: blue.transparentize(60%)
)[♟],
..(grid.cell(y: 6)[♙],) * 8,
..([♖], [♘], [♗], [♕], [♔], [♗], [♘], [♖])
.map(grid.cell.with(y: 7)),
)
removing the first three lines (#set... #show...) gives an error of 'type color has no method transparentize
'.
Removing .transparentize(60%)
then gives an error of 'function grid does not contain field
cell`'.
Perhaps a separate ticket but none of the table examples in table documentation seem to work, either.
Thank you!