How to generate \cite{}
from Quarto citations?
#6233
-
DescriptionI need to find a way of quarto citations always generating The two modes are meant to be changed only at the document class level. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
It looks like Pandoc doesn't support bibtex style cites at all (only biblatex). The suggestion I found was to redefine I'm not sure that this would work for your case, though. If not, an alternative would be to write a filter to actually render the return {
Cite = function(el)
-- If quarto is going to be processing the cites, go ahead and convert
-- them to a native cite
if param(kAsciidocNativeCites) then
local citesStr = table.concat(el.citations:map(function (cite)
return '<<' .. cite.id .. '>>'
end))
return pandoc.RawInline("asciidoc", citesStr);
end
end
} |
Beta Was this translation helpful? Give feedback.
-
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
} |
Beta Was this translation helpful? Give feedback.
For others that might be looking for the solution, this is what I came up with (use at your own discretion):