Skip to content

Varying subfigure width #1869

@jjallaire

Description

@jjallaire

Discussed in #1817

Originally posted by jpmorr August 11, 2022
When dealing with a single image it's quite simple to vary the image width in the standard markup:

![Nice picture](image.jpg){#fig-img1 width=60%}

I'd like to do something similar when using a subfigure to have a little more fine gained control over some I'll fitting figures generated elsewhere.

::: {#fig-specimen_comp layout-ncol=2}

![Nice picture](image.jpg){#fig-img1 width=60%}

![Nice picture2](image2.jpg){#fig-img2}

Comparison between two samples
:::

However, I've noticed that the width attribute is completely ignored in the subfigure, setting to 10% or 90% does not change the size of the subfigure. I don't want to change the width of the column as the caption text should be equal width in this case. Is it possible to change the width of the figure, much like in latex you can set a figure to be [width=0.75\textwidth]?

Obvious solution is to make a copy of the figure I want to resize and crop it to fit better, but I like the latex solution of just changing the size.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions