Skip to content
Discussion options

You must be logged in to vote

It is possible like this:

#set heading(numbering: "1.")
#show: rest => {
  for i in (2, 3) {
    rest = {
      show heading.where(level: i): it => strong(it.body)
      rest
    }
  }
  rest
}

= head 1
== head 2
=== head 3
There are plans to make programmatic manipulation of show rules like this simpler, along these lines (but it's not yet implemented):
#apply for i in (2, 3) {
  show heading.where(level: i): it => strong(it.body)
}

Here the show rules would join together like content does, but an explicit apply would be necessary to ensure that the show rules "leak" intentionally.

What would also help (but is also unimplemented) is support for "or"-selectors in show rules (these cur…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@psads-git
Comment options

@laurmaedje
Comment options

Answer selected by psads-git
@Julian-Wassmann
Comment options

@psads-git
Comment options

@psads-git
Comment options

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