Skip to content

List has where filter function? #3877

Answered by EpicEricEE
xietuhuo asked this question in Q&A
Discussion options

You must be logged in to vote

The filter is a bit weird, as you have to wrap the marker in a content block. This works:

#show list.where(marker: [#sym.triangle.filled]): set text(red)

#list(marker: sym.triangle.filled,
  [This is red],
  [and so is this]
)

- But this is not

However, if you set the marker to an array, you can't filter out list items that use a specific marker.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xietuhuo
Comment options

Answer selected by xietuhuo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants