Skip to content

Commit c412710

Browse files
committed
Merge branch 'main' into bugfix/9832
2 parents 33343d5 + bee87fb commit c412710

13 files changed

Lines changed: 112 additions & 39 deletions

File tree

.github/workflows/test-ff-matrix.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,19 @@
22
name: Feature-Format Tests
33
on:
44
workflow_dispatch:
5-
push:
6-
branches: [main]
7-
paths-ignore:
8-
- "news/**"
9-
- "src/resources/language/**"
10-
pull_request:
11-
branches: [main]
12-
paths-ignore:
13-
- "src/resources/language/**"
5+
schedule:
6+
# run daily at 1am UTC
7+
- cron: "0 1 * * *"
8+
# Deactivating run on commits for now
9+
## push:
10+
## branches: [main]
11+
## paths-ignore:
12+
## - "news/**"
13+
## - "src/resources/language/**"
14+
## pull_request:
15+
## branches: [main]
16+
## paths-ignore:
17+
## - "src/resources/language/**"
1418

1519
concurrency:
1620
# Use github.run_id on main branch

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:

news/changelog-1.5.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ All changes included in 1.5:
7878
- ([#9671](https://github.com/quarto-dev/quarto-cli/issues/9671)): Reimplement `typst` subfloats to fix subfloat counters.
7979
- ([#9694](https://github.com/quarto-dev/quarto-cli/issues/9694)): Fix default callout (`::: callout ... ::: `) in Typst.
8080
- ([#9722](https://github.com/quarto-dev/quarto-cli/issues/9722)): Resolve data URI images in Typst.
81+
- ([#9555](https://github.com/quarto-dev/quarto-cli/issues/9555)): Text elements in Typst are internationalized.
8182
- Upgrade Typst to 0.11
8283
- Upgrade the Typst template to draw tables without grid lines by default, in accordance with latest Pandoc.
8384

@@ -134,6 +135,7 @@ All changes included in 1.5:
134135
- ([#8417](https://github.com/quarto-dev/quarto-cli/issues/8417)): Maintain a single AST element in the output cells when parsing HTML from RawBlock elements.
135136
- ([#8582](https://github.com/quarto-dev/quarto-cli/issues/8582)): Improve the algorithm for extracting table elements from HTML RawBlock elements.
136137
- ([#8770](https://github.com/quarto-dev/quarto-cli/issues/8770)): Handle inconsistently-defined float types and identifier names more robustly in HTML tables.
138+
- ([#9862](https://github.com/quarto-dev/quarto-cli/issues/9862)): Fix crash with labeled tables in cells with `eval: false` and `echo: false`.
137139

138140
## Engines
139141

@@ -160,7 +162,7 @@ All changes included in 1.5:
160162

161163
## `quarto typst`
162164

163-
- ([#9106])(https://github.com/quarto-dev/quarto-cli/issues/9106)): Do not allow `quarto typst update`.
165+
- ([#9106](https://github.com/quarto-dev/quarto-cli/issues/9106)): Do not allow `quarto typst update`.
164166

165167
## Quarto's input format
166168

src/resources/filters/customnodes/floatreftarget.lua

Lines changed: 1 addition & 21 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)
@@ -988,7 +968,7 @@ end, function(float)
988968
-- luacov: enable
989969
end
990970
local kind = "quarto-float-" .. ref
991-
local supplement = info.name
971+
local supplement = titleString('fig', info.name)
992972
-- FIXME: custom numbering doesn't work yet
993973
-- local numbering = ""
994974
-- if float.parent_id then

src/resources/filters/customnodes/theorem.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ local function ensure_typst_theorems(reftype)
100100
letted_typst_theorem[reftype] = true
101101
local theorem_type = theorem_types[reftype]
102102
quarto.doc.include_text("in-header", "#let " .. theorem_type.env .. " = thmbox(\"" ..
103-
theorem_type.env .. "\", \"" .. theorem_type.title .. "\")")
103+
theorem_type.env .. "\", \"" .. titleString(reftype, theorem_type.title) .. "\")")
104104
end
105105
end
106106

src/resources/filters/layout/pandoc3_figure.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ function render_pandoc3_figure()
161161
caption = figure.caption.long[1],
162162
kind = "quarto-float-fig",
163163
caption_location = crossref.categories.by_ref_type["fig"].caption_location,
164-
supplement = "Figure",
164+
supplement = titleString('fig', 'Figure'),
165165
})
166166
end
167167
}

src/resources/filters/layout/typst.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ end, function(layout)
9595
return float.content
9696
-- luacov: enable
9797
end
98-
local supplement = info.name
98+
local supplement = titleString(ref, info.name)
9999

100100
-- typst output currently only supports a single grid
101101
-- as output, so no rows of varying columns, etc.
@@ -133,12 +133,12 @@ end, function(layout)
133133
_quarto.format.typst.as_typst_content(cells)
134134
}, false))
135135
else
136-
result:insert(make_typst_figure {
136+
result:extend(make_typst_figure {
137137
content = cells,
138138
caption_location = caption_location,
139139
caption = layout.float.caption_long,
140140
kind = kind,
141-
supplement = info.prefix,
141+
supplement = titleString(ref, info.prefix),
142142
numbering = info.numbering,
143143
identifier = layout.float.identifier
144144
})

src/resources/filters/quarto-pre/table-classes.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ function table_classes()
6262
if kind ~= "tbl" then
6363
return nil
6464
end
65+
if float.content == nil then
66+
return nil
67+
end
6568

6669
if (float.caption_long == nil or
6770
float.caption_long.content == nil or

src/resources/formats/typst/pandoc/quarto/typst-template.typ

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
if abstract != none {
6363
block(inset: 2em)[
64-
#text(weight: "semibold")[Abstract] #h(1em) #abstract
64+
#text(weight: "semibold")[$labels.abstract$] #h(1em) #abstract
6565
]
6666
}
6767

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:

0 commit comments

Comments
 (0)