Skip to content
Discussion options

You must be logged in to vote

This will need to be done in a Lua filter. You'd need to write a filter that catches divs, detects the class "notebook-link", and then emit a callout programmatically. That filter would look something like this:

function Div(div)
  if div.classes:includes("notebook-link") then
    -- create callout here, something like the following.
    -- You'll need to inspect the contents of the 
    return quarto.Callout({
      type = "note",
      content = div.content
      title = "Notebook link"
    })
  end
end

Then you can create an extension that exposes the filter.

Documentation on filter extensions, and Lua development for Quarto.

Replies: 3 comments 5 replies

Comment options

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

@jreades
Comment options

@jreades
Comment options

@cscheid
Comment options

Answer selected by jreades
Comment options

You must be logged in to vote
0 replies
Comment options

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

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.
3 participants