Skip to content

How can I number all callouts by default #10240

Answered by cscheid
normansimonr asked this question in Q&A
Discussion options

You must be logged in to vote

Oh, I'm sorry, it's not a Quarto bug (whew!), it's a simple copy-paste mistake I made. The correct filter is this, it just needs to increment that counter:

local id = 1
function Callout(callout)
  if callout.attr.identifier ~= "" then
    -- callout already has an id
    return nil
  end
  callout.attr.identifier = "nte-unique" .. tostring(id)
  id = id + 1
  return quarto.Callout(callout)
end

Replies: 4 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@coatless
Comment options

@cscheid
Comment options

@coatless
Comment options

@cscheid
Comment options

@coatless
Comment options

Comment options

You must be logged in to vote
4 replies
@cscheid
Comment options

@cscheid
Comment options

@cscheid
Comment options

Answer selected by normansimonr
@cscheid
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
callouts Issues with Callout Blocks. lua Issues related to the lua codebase, filter chain, etc
4 participants