Skip to content

Commit

Permalink
lua,latex - remove unnecessary captionsetup call
Browse files Browse the repository at this point in the history
  • Loading branch information
cscheid committed Jun 3, 2024
1 parent e156acb commit e708a35
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions src/resources/filters/customnodes/floatreftarget.lua
Original file line number Diff line number Diff line change
Expand Up @@ -342,26 +342,6 @@ end, function(float)
end
latex_caption = latex_caption or pandoc.Inlines({})

if #latex_caption == 0 then
local caption_setup = quarto.LatexInlineCommand({
name = "captionsetup",
arg = "labelsep=none"
})
local pt = pandoc.utils.type(float.content)
if pt == "Block" then
if float.content.content == nil then
-- it's a block that doesn't support inner content
-- attempt a best-effort fix by replacing it with a wrapping div
float.content = pandoc.Div({float.content})
end
float.content.content:insert(1, caption_setup)
elseif pt == "Blocks" then
float.content:insert(1, caption_setup)
else
internal_error()
end
end

local label_cmd = quarto.LatexInlineCommand({
name = "label",
arg = pandoc.RawInline("latex", float.identifier)
Expand Down

0 comments on commit e708a35

Please sign in to comment.