Skip to content

Commit aae1bf6

Browse files
authored
Merge pull request #9853 from quarto-dev/bugfix/9850
Bugfix/9850
2 parents d40b8ec + 3a48b18 commit aae1bf6

4 files changed

Lines changed: 17 additions & 22 deletions

File tree

dev-docs/feature-format-matrix/qmd-files/layout/fig-align/toplevel-id-nocaption.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _quarto:
1818
latex:
1919
ensureFileRegexMatches:
2020
-
21-
- '\\hfill\\captionsetup\{labelsep=none\}\\includegraphics\{100.png\}'
21+
- '\\hfill\\includegraphics\{100.png\}'
2222
- []
2323
typst:
2424
ensureTypstFileRegexMatches:

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)

tests/docs/smoke-all/2023/09/19/issue-2546.qmd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ _quarto:
55
latex:
66
ensureFileRegexMatches:
77
-
8-
- "\\\\captionsetup\\{labelsep=none\\}"
98
- "\\\\caption\\{\\\\label\\{fig-chapter-2\\}One with a caption\\}"
109
- []
1110
html:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: "Untitled"
3+
format: latex
4+
_quarto:
5+
tests:
6+
latex:
7+
ensureFileRegexMatches:
8+
- []
9+
- ["labelsep=none"]
10+
---
11+
12+
```{r}
13+
#| label: tbl-problem
14+
gt::gtcars[1:5, 1:5] |>
15+
gt::gt()
16+
```

0 commit comments

Comments
 (0)