How to use `lq.mark`

This makes the marker a square:

#import "@preview/lilaq:0.6.0" as lq

#show: lq.layout

#lq.diagram(
  grid: none,
  lq.scatter(
    (1, 1),
    (2, 2),
    color: black,
    mark: "s",
  ),
),

But I want the square to not be filled in black. I want only the border and no fill. I tried:

#import "@preview/lilaq:0.6.0" as lq

#show: lq.layout

#lq.diagram(
  grid: none,
  lq.scatter(
    (1, 1),
    (2, 2),
    color: black,
    mark: lq.mark(size: 4pt, fill: none, stroke: 0.7pt, shape: "s"),
  ),
),

But the compiler complains:

error: unexpected argument: size
   ┌─ main.typ:12:18
   │
12 │     mark: lq.mark(size: 4pt, fill: none, stroke: 0.7pt, shape: "s"),
   │

Maybe I misunderstood the mark docs, but there clearly is a size argument.

I have tried to use lq.mark as an argument to do other things, but it seems like it expects stuff different from what I can see in the docs?

Maybe I am doing something silly?

2 Likes

I suggest creating an issue in lilaq’s repo.

In lilaq’s source code, the definition of lq.mark was added on 2025-03-26, but it’s shadowed by let mark = grid added on 2024-12-29.
Therefore, this looks like an oversight.

1 Like

Hi @Katty ,

In order to enable style cycles, and due to custom types not yet being available in Typst, Lilaq uses a temporary hack that abuses the built-in grid type locally. Therefore, you need to change size to inset and shape to align. This is documented in the style cycle tutorial.

However, building marks like this is not yet supported in the scatter function but this might change with the next version soon.

For now I recommend setting alpha to 0% which should have the desired effect.

1 Like