placement of Supplemental Figures when rendering to PDF

I am creating a long document using Quarto, which includes Tables, Figures, and Supplementary Figures, and as well as the cross references to them. For Supplemental Figures, I created a custom float type as instructed at Custom Float Cross-Reference Types – Quarto. Everything works great except the placement of Supplementary Figures. I have 12 Supplementary Figures so far, when rendering the Quarto file to a PDF file, almost each page got two Supplementary Figures to be placed at the top. Actually, I want them to appear together, one after another as a list.

I tried to put the following lines to the YAML header. The option, 'fig-pos: H', works, and put all the Figures together. But the option, 'suppfig-pos: H', has no any effects.

  pdf:
    number-sections: false
    fig-pos: H
    suppfig-pos: H
    colorlinks: true
    lof: false
    lot: false
    execute:
      echo: false

Could you please show me how to put the Supplementary Figures together? Really appreciate it!

This would be better to share a reproducible example as a Github repo for example, so that anyone can jump in here, and try to help with this.

I believe this is LaTeX issue. If you find how to do that in LaTeX then maybe we can see how this can be done using Quarto options and document it.

Anyhow, this is just a guess. Having an example to play with will probably make this question to have better change to be answered.

Hint to try understand the problem:

  • Look at .md file produced by keep-md: true
  • Look at .tex file produced by keep-tex: true

See from both why LaTeX does not place the figure like you want to.

Hope it helps

I kept the .tex file using keep-tex: true, and manually replaced the line \begin{suppfig} with \begin{suppfig}[H] in the .tex file. Then, the supplementary figures would stay together at the right place in the PDF document.

Thanks for sharing that is really interesting !

Maybe we have a missing part in Quarto custom cross ref block.

I would have expected this to work. Did you try to set it at a cell level (for computation content) or on the div syntax ?

If you have a reproducible example to share, can you open an issue on Quarto cli repo ?

Thank you

I will try my best to create a reproducible example. I also encountered some other problems during rendering my qmd -- pretty long document -- file to PDF. This could be pretty challenging since I have never created reproducible examples and never opened an issue on a github repo.

davidli,
I will try my best to create a reproducible example.

Did you manage to create an example?

Not yet. Will try this weekend.

@OllyBe @cderv, I've created a GitHub repository to reproduce the issues when rendering index.qmd to HTML or Typst documents:

Repository: davidzgli/manuscript-example

The specific issues are detailed in the issue.qmd file within the repository.

As suggested, instead of opening an issue on quarto-dev, I've started a discussion:

Quarto manuscript cannot properly render tables, supplementary tables, figures, supplementary figures

I'd greatly appreciate if you could review these issues when you have the time. Thank you for your assistance.