Skip to content
Discussion options

You must be logged in to vote

For others that might be looking for the solution, this is what I came up with (use at your own discretion):

return {
  Cite = function(el)
    if quarto.doc.is_format("pdf") then
      local cites = el.citations:map(function(cite)
        return cite.id
      end)
      local citesStr = "\\cite{" .. table.concat(cites, ", ") .. "}"
      return pandoc.RawInline("latex", citesStr)
    end
  end
}

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@ramiromagno
Comment options

@dragonstyle
Comment options

@ramiromagno
Comment options

@cscheid
Comment options

@ramiromagno
Comment options

Comment options

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

Answer selected by ramiromagno
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
latex LaTeX engines related libraries and technologies lua Issues related to the lua codebase, filter chain, etc
4 participants