You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The repeat function currently always justifies its content, and does not allow setting a gap between the repeated items. Instead, to add a gap it is necessary to include horizontal spacing inside the repeated item (as in #repeat[.#h(4mm)]), which however also includes that spacing in the last element.
I propose the following arguments:
This would also allow integration with align. Alternatively, it might be better to get the justify property from the current style set for par:
I would mention that I am currently working on pattern fills to get closer to closing #2282 and it may provide the feature you're looking for in a very efficient way (file size wise) without changing any syntax. I am not saying that I am against this idea, I think it's a good one, but since there's overlap and I feel compelled to mention it.
(the orange outline is just for visualizing where the box is)
It's not quite as nice as what you suggested but it will now be possible without requiring any call to layout or style which can slow down document compilation.
I find patterns pretty tricky to get right along both axes; especially because sym.dot apparently has an opaque white background. In particular, it would also cut off the repeated element mid-pattern wherever space runs out, so I think it might be worthwile to implement the par-dependent justify for repeat and possibly also gap. If this were part of the compiler, would the layout/style disadvantage still persist?
Also: sorry for not searching for this issue before opening #2816 😬 !
Description
The
repeat
function currently always justifies its content, and does not allow setting a gap between the repeated items. Instead, to add a gap it is necessary to include horizontal spacing inside the repeated item (as in#repeat[.#h(4mm)]
), which however also includes that spacing in the last element.I propose the following arguments:
This would also allow integration with
align
. Alternatively, it might be better to get thejustify
property from the current style set forpar
:As a workaround, it is relatively easy to write this function in pure typst as I've done here.
Use Case
Prevent misaligned dots in outline filler:
The text was updated successfully, but these errors were encountered: