quarto

How to combine Figure Label (cross-reference) and Figure width in Quarto


I would like to include a pdf Figure in my Quarto Document and render everything to docx. This is my general setup:

---
title: "My Title"
author: "A"
format: 
  docx:
    reference-doc: "config/template_word.docx"
---

Please see @fig-over for an interesting overview. 

![Overview.](Figs/Fig.pdf){#fig-over}

Now the this works like charm. However, I also want to change the width of the Figure. And I don't know how to combine the labeling and customizing the figure width. For exmaple, this does not work:

![Overview.](Figs/Fig.pdf){ #fig-over, width=250px}

Any ideas?


Solution

  • You can try

    ![Overview.](Figs/Fig.pdf){#fig-over width='250px'}
    

    or

    ![Overview.](Figs/Fig.pdf){#fig-over width=250px}
    

    Note: Be careful with whitespaces, e.g. {#fig-over width= '250px'} does not work.