Can you hide ticks in Lilaq, but preserve their labels?

In How to reproduce a stress diagram image in Typst? - #7 by Andrew I used

#show: lq.set-tick(stroke: 0pt)

in addition to

  xaxis: (ticks: range(x-max + 1, step: 80), subticks: 1),

I extensively searched and believed that I can just do tick-stroke: none in xaxis, but the only option I found is to use a “show-set” rule outside the diagram definition. Is there an easier way to do this? I want it to be contained in the lq.diagram() like the rest of the things.

Seems related: Add ticking tutorial · Issue #25 · lilaq-project/lilaq · GitHub.

Indeed, writing

#show: lq.set-tick(inset: 0pt)

would be the preferred way. I recommend separating content from styling wherever possible in order to avoid polluting the plotting code and to easily switch out styles.

Within diagram code, this is actually not possible. This is part of the design of Lilaq: we avoid repetitive arguments that are passed on and on to nested elements; instead the user can directly speak to an element through set and show rules.

1 Like

Where does the indeed part come from? I wrote stroke, not inset. But I did see that you can also change inset. But this way the stroke will be so short, that it doesn’t exist, instead of so thin.

Stroke would not work here because it cannot be none. Except if you set it to a transparent color.

Uhhh, so is inset. By short and thin, I was talking about 0pt.

Sorry, you wrote stroke: 0pt (I had in mind stroke: none). Nevermind.