quarto-dev / quarto-dev/quarto-cli

fig-cap-location conflict with code annotation

Open
#9,155 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug code-annotation figures lua
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

---
title: 'Title'
format: html
---

::: {#fig-learnxmp fig-cap-location="top"}
```xml
<context-info>
  <url>file:/Volumes/.../1051-Learn.mp4</url>           # <1>
```
1. Testing annotations.

Caption

:::

image

while without annotation

---
title: 'Title'
format: html
---

::: {#fig-learnxmp fig-cap-location="top"}
```xml
<context-info>
  <url>file:/Volumes/.../1051-Learn.mp4</url>           
```

Caption

:::

image

Same with Margin
image

image

Found while looking at https://forum.posit.co/t/code-annotations-after-caption-in-labeled-container-divs/183061

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by rendering the two minimal Markdown examples in the issue with Quarto, comparing the annotated and unannotated code blocks and the margin variant. Trace the rendering path for labeled container divs, figure caption placement, and code annotations; done means annotations no longer alter the requested caption location and the examples render consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
markdown
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.