Skip to content

Commit

Permalink
Regression in Lua column layouts: forward classes correctly. (#6865)
Browse files Browse the repository at this point in the history
* regression: forward classes correctly. Closes #6863
* add test
  • Loading branch information
cscheid authored Sep 17, 2023
1 parent d407250 commit d6fb58d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/resources/filters/layout/columns-preprocess.lua
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ function resolveColumnClassesForCodeCell(el)
local ref_type = crossref.categories.by_name[custom.type].ref_type
local custom_classes = float_classes[ref_type]
local custom_caption_classes = float_caption_classes[ref_type]
applyClasses(custom_classes, custom_caption_classes, el, childEl, custom, ref_type)
-- applyClasses(colClasses, captionClasses, containerEl, colEl, captionEl, scope)
applyClasses(custom_classes, custom_caption_classes, el, custom, custom, ref_type)
else
local figure = discoverFigure(figOrTableEl, false)
if figure ~= nil then
Expand Down
29 changes: 29 additions & 0 deletions tests/docs/smoke-all/crossrefs/float/latex/latex-margin-figure.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: "matplotlib demo"
format: latex
_quarto:
tests:
latex:
ensureFileRegexMatches:
- ["marginfigure"]
- []
---

Demo

```{python}
#| echo: false
#| column: margin
import matplotlib.pyplot as plt
plot = plt.figure()
plot.set_figwidth(2)
plot.set_figheight(3)
x = [1, 2]
y = [2, 3]
plt.plot(x,y)
```

0 comments on commit d6fb58d

Please sign in to comment.