-
Notifications
You must be signed in to change notification settings - Fork 414
Closed
Description
The following document can result in the code listing floating away from its annotations:
---
title: Hello World
format: html
---
## Hello
{{< lipsum 1-2 >}}
```{#lst-customers .r lst-cap="Customers Query"}
# this is a comment that adds length to the code block
# this is a comment that adds length to the code block
# this is a comment that adds length to the code block
library(tidyverse)
# this is a comment that adds length to the code block
# this is a comment that adds length to the code block
# this is a comment that adds length to the code block
library(palmerpenguins)
penguins |> # <1>
mutate( # <2>
bill_ratio = bill_depth_mm / bill_length_mm, # <2>
bill_area = bill_depth_mm * bill_length_mm # <2>
) # <2>
```
1. Take `penguins`, and then,
2. add new columns for the bill ratio and bill area.
{{< lipsum 3-4 >}}note that we define the code listing environment as:
\\@ifundefined{c@chapter}{\\newfloat{codelisting}{h}{lop}}{\\newfloat{codelisting}{h}{lop}[chapter]}We should create an option for float hold, always float hold, or do something smarter here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working