Skip to content
Discussion options

You must be logged in to vote

@etiennebacher as often with this attributes related question, you can write a simple Lua filter to help you with this

---
format: 
  revealjs:
    slide-number: true
    filters: [custom.lua]
---

Slide with main content

# Appendix {.appendix}

##

Slide with appendix content

##

Another slide with appendix content

custom.lua

local in_appendix = false

Header = function(h)
  if h.level == 1 then
    if h.classes:includes("appendix") then
      in_appendix = true
      h.attributes["visibility"] = "uncounted"
    else
      in_appendix = false
    end
  end
  if h.level == 2 and in_appendix then
    h.attributes["visibility"] = "uncounted"
  end
  return h
end

Though maybe when set to a…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by etiennebacher
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