#How to include decorator in link body
17 messages · Page 1 of 1 (latest)
?r theme=light
[0m[35m#set[0m [0m[3m[34mtext[0m(size: [0m[33m18pt[0m)
[0m[35m#show[0m [0m[3m[34mlink[0m: it [0m[36m=>[0m {
it
[0m[3m[34mh[0m([0m[33m0.06em[0m)
[0m[3m[34msuper[0m([0m[3m[34mbox[0m(height: [0m[33m5pt[0m, [0m[3m[34mcircle[0m(radius: [0m[33m2pt[0m, stroke: [0m[33m1.2pt[0m [0m[36m+[0m red)))
}
[0m[3m[34m#link[0m([0m[32m"https://typeof.net/Iosevka/"[0m)[[0m[3m[33m_[0mIosevka_]
Which version of typst are you using?
$ typst --version
typst 0.11.0
Is this the code, which doesn't work?
clickable circle
But it works here, in bot. Probably you doing something very nested
I'm talking about "max nesting allowed"
?r theme=light
[0m[35m#set[0m [0m[3m[34mtext[0m(size: [0m[33m18pt[0m)
[0m[35m#show[0m [0m[3m[34mlink[0m: it [0m[36m=>[0m {
it
[0m[3m[34mlink[0m(it.dest)[[0m[3m[34m#super[0m([0m[3m[34mbox[0m(height: [0m[33m5pt[0m, [0m[3m[34mcircle[0m(radius: [0m[33m2pt[0m, stroke: [0m[33m1.2pt[0m [0m[36m+[0m red)))]
}
[0m[3m[34m#link[0m([0m[32m"https://typeof.net/Iosevka/"[0m)[[0m[3m[33m_[0mIosevka_]
An error occurred:
Error: maximum show rule depth exceeded
╭─[/main.typ:11:18]
│
11 │ link(it.dest)[#super(box(height: 5pt, circle(radius: 2pt, stroke: 1.2pt + red)))]
│
│ Help: check whether the show rule matches its own output
────╯
bump
I think that's because you make a new link, and it matches the same show rule, and so on, and so on, until it reaches the limit
Why do you want to make a circle clickable?
It's pretty small
You can try to use state for this too