Skip to content

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

@hasibagen

Description

@hasibagen

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions