Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ _quarto:
latex:
ensureFileRegexMatches:
-
- '\\hfill\\captionsetup\{labelsep=none\}\\includegraphics\{100.png\}'
- '\\hfill\\includegraphics\{100.png\}'
- []
typst:
ensureTypstFileRegexMatches:
Expand Down
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
1 change: 0 additions & 1 deletion tests/docs/smoke-all/2023/09/19/issue-2546.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ _quarto:
latex:
ensureFileRegexMatches:
-
- "\\\\captionsetup\\{labelsep=none\\}"
- "\\\\caption\\{\\\\label\\{fig-chapter-2\\}One with a caption\\}"
- []
html:
Expand Down
16 changes: 16 additions & 0 deletions tests/docs/smoke-all/2024/06/03/9850.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: "Untitled"
format: latex
_quarto:
tests:
latex:
ensureFileRegexMatches:
- []
- ["labelsep=none"]
---

```{r}
#| label: tbl-problem
gt::gtcars[1:5, 1:5] |>
gt::gt()
```