quarto-dev / quarto-dev/quarto-cli

warn when `column: page` and `fig-align` are used together

Open
#10,943 4 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Oct 1, 2024.

article-layout bug layout
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

Figures appear left aligned when setting column: page AND fig-align: center.

Originally posted here. Asked to open an issue.

Steps to reproduce
---
title: "Test"
format:
  html: 
    embed-resources: true
    smooth-scroll: true
    theme: cosmo
    fontcolor: black
    toc: true
    toc-expand: 2
    toc-title: Contents
    toc-location: left
    toc-depth: 3
    number-sections: true
    number-depth: 3
---

## Page

This aligns left to page, despite setting fig-align.

```{r}
#| label: fig-1
#| fig-cap: "A caption." 
#| column: page
#| fig-align: center

plot(mtcars)
```

## Not specified

This aligns center in main

```{r}
#| label: fig-2
#| fig-cap: "A caption." 

plot(mtcars)
```
Expected behavior

Center alignment

Actual behavior

Left alignment

Your environment

R version 4.3.2 (2023-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.1

Quarto check output

Quarto 1.5.56

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.