Skip to content

Commit e708a35

Browse files
committed
lua,latex - remove unnecessary captionsetup call
1 parent e156acb commit e708a35

1 file changed

Lines changed: 0 additions & 20 deletions

File tree

src/resources/filters/customnodes/floatreftarget.lua

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -342,26 +342,6 @@ end, function(float)
342342
end
343343
latex_caption = latex_caption or pandoc.Inlines({})
344344

345-
if #latex_caption == 0 then
346-
local caption_setup = quarto.LatexInlineCommand({
347-
name = "captionsetup",
348-
arg = "labelsep=none"
349-
})
350-
local pt = pandoc.utils.type(float.content)
351-
if pt == "Block" then
352-
if float.content.content == nil then
353-
-- it's a block that doesn't support inner content
354-
-- attempt a best-effort fix by replacing it with a wrapping div
355-
float.content = pandoc.Div({float.content})
356-
end
357-
float.content.content:insert(1, caption_setup)
358-
elseif pt == "Blocks" then
359-
float.content:insert(1, caption_setup)
360-
else
361-
internal_error()
362-
end
363-
end
364-
365345
local label_cmd = quarto.LatexInlineCommand({
366346
name = "label",
367347
arg = pandoc.RawInline("latex", float.identifier)

0 commit comments

Comments
 (0)