Skip to content
Discussion options

You must be logged in to vote

As suggested (I had some time to play a bit):

---
title: "Quarto Playground"
format: typst
filters:
  - rotate.lua
---

{{< lipsum 1 >}}

```{r}
#| classes: rotate
knitr::kable(head(mtcars[, 1:5]), format = "pipe")
```

{{< lipsum 1 >}}

```{r}
knitr::kable(head(mtcars[, 1:5]), format = "pipe")
```
function Div(div)
  if not div.classes:includes("rotate") then 
    return
  end
  local cell_output = nil
  quarto._quarto.ast.walk(div.content, {
    Div = function(div)
      if div.classes:includes("cell-output-display") then
        cell_output = div
        table.insert(cell_output.content, 1, pandoc.RawInline('typst', "#rotate(-90deg, reflow: true, ["))
        table.insert(cell_output.c…

Replies: 1 comment 16 replies

Comment options

You must be logged in to vote
16 replies
@aghaynes
Comment options

@mcanouil
Comment options

Answer selected by aghaynes
@aghaynes
Comment options

@cscheid
Comment options

@mcanouil
Comment options

@mcanouil
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typst lua Issues related to the lua codebase, filter chain, etc
4 participants