how to Disable fig-caption and extra line breaks between multiple images

Open
#12,216 5 comments 0 reactions 1 assignee View on GitHub

@cscheid is already working on this.

Since Mar 6, 2025.

Assessment

This issue has not been assessed yet.

Description

bug crossref engines-jupyter
Bug description

When using multiple images in Quarto, the following issues occur:

The default fig-caption appears, even if it's set to false in the YAML metadata.
Extra blank lines are generated between images.

default fig-caption appears when fig more than 1
Image

Steps to reproduce
---
title: "title"
format:
  docx:
    default-image-extension: svg
    fig-caption: false
params:
  datapath: null
execute:
  enable: true
  echo: false
  warning: false
  eval: true
  keep-ipynb: false
  keep-md: false
  cache: false
jupyter: python3
fig-format: svg
---

```{python}
#| label: fig 
#| warning: false
#| error: false
#| echo: false
#| output: true
#| fig-cap: ""
#| 
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
import pandas as pd

# Example data
data = pd.DataFrame({
    "x": np.arange(10),
    "y": np.random.rand(10)
})

# Plot
sns.lineplot(data=data, x="x", y="y")
plt.title("Example Plot")
plt.show()

sns.lineplot(data=data, x="x", y="y")
plt.title("Example Plot")
plt.show()
```

Actual behavior

only picture

Expected behavior

some picture cap

Your environment

ubuntu22.04
python IDE pycharm 2024.1.1 (Community Edition)

Quarto check output
quarto check
Quarto 1.6.42
[✓] Checking environment information...
      Quarto cache location: /home/jade/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.6.42
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: v2024.06
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: TinyTex
      Path: /home/jade/.TinyTeX/bin/x86_64-linux
      Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.11.5 (Conda)
      Path: /home/jade/anaconda3/bin/python
      Jupyter: 5.3.0
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.4.1
      Path: /usr/lib/R
      LibPaths:
        - /home/jade/R/x86_64-pc-linux-gnu-library/4.4
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      knitr: 1.49
      rmarkdown: 2.29

[✓] Checking Knitr engine render......OK

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

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.

More from quarto-dev/quarto-cli

All issues in quarto-dev/quarto-cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.