#putting two characters at the same place.
16 messages · Page 1 of 1 (latest)
?render
I would like to archive something like this:
#{ show "ّ": t => text(red)[#t];
[ يّ ]
}
ي + #text(red)[يّ] =
?render ```ts
#let overlay(base, ..layers) = box(
base + layers.pos().map(place.with(start+top)).join()
)
#overlay(text(red)[يّ], [ي])
you will probably get a bit of the red base bleeding through the edges though
if you don't put that there, the content will be placed after the base, but it should be aligned with the start and top of the surrounding box
so pos of layers is mutable and will be changed with the map call? I don't know the underlying model sry.
I assumed the content? has a position attribute that gets changed.
map will create new content out of this, it is equivalent to
layers.pos().map(layer => place(start+top, layer))
and .pos() is just to get the positional-only arguments of ..layers
What is the meaning of ..somevar anyways? I have seen it a couple of times now when accesing? a variable.
or creating an iterator.