Closed IULibScholComm closed 11 months ago
I do not think what you used what the suggested code. The following should work as it makes the "figure" a single element.
::: {#fig-4.1}
:::: {layout-ncol=2}
![The life cycle of the trematode *Microphallus*](images/fig4-2.jpeg){fig-alt=""}
![Infected female (top) and uninfected female (bottom) of *P. antipodarum*](images/fig4-3.jpg){fig-alt=""}
::::
**Left panel:** the life cycle of the trematode *Microphallus*. The adult worms live in the intestines of waterfowl and wading birds (black stilts). They produce cross-fertilized eggs, which are released into lakes and streams with the bird’s feces. The eggs hatch following ingestion by snails. Infection results in the asexual production of hundreds of cysts (called metacercaria). These cysts "hatch" and mature following ingestion by ducks, thus completing the life cycle. Drawing by Zoe M Dinges. **Right panel:** Infected female (top) and uninfected female (bottom) of *P. antipodarum* (Photo Credit: Gabe Harp). The snails had been removed from their shells. The golden cysts in the infected female (top) are *Microphallus* metacercaria. The white tissue of the uninfected female (bottom) is ovary.
:::
Also why creating a new issue instead of continuing and eventually reopening the previous issue? Opening a new issue is not the same as reopening an issue. Now there is two issue to follow up.
I apologize! I did not know how to reopen an issue, so I created a new one and referenced the closed one. Thank you for helping me.
I do not think what you used what the suggested code. The following should work as it makes the "figure" a single element.
::: {#fig-4.1} :::: {layout-ncol=2} ![The life cycle of the trematode *Microphallus*](images/fig4-2.jpeg){fig-alt=""} ![Infected female (top) and uninfected female (bottom) of *P. antipodarum*](images/fig4-3.jpg){fig-alt=""} :::: **Left panel:** the life cycle of the trematode *Microphallus*. The adult worms live in the intestines of waterfowl and wading birds (black stilts). They produce cross-fertilized eggs, which are released into lakes and streams with the bird’s feces. The eggs hatch following ingestion by snails. Infection results in the asexual production of hundreds of cysts (called metacercaria). These cysts "hatch" and mature following ingestion by ducks, thus completing the life cycle. Drawing by Zoe M Dinges. **Right panel:** Infected female (top) and uninfected female (bottom) of *P. antipodarum* (Photo Credit: Gabe Harp). The snails had been removed from their shells. The golden cysts in the infected female (top) are *Microphallus* metacercaria. The white tissue of the uninfected female (bottom) is ovary. :::
Thank you again! This is helpful, but it does not fully solve the issue. In the PDF, the main caption text appears as regular text rather than as a caption, and in the HTML, the images are stacked rather than side by side.
Because you did not fill the issue template properly, I have to assume the Quarto version you are using and my guess is you don't use 1.4 pre-release.
Also note that your example is not a reproducible one.
Yes, my quarto version is 1.3.361, which is stated in the template (Quarto check output)
you are not even using the latest stable. And Carlos told you to use the syntax highlighted in the documentation and to use 1.4 pre-release.
It works just fine with 1.4:
HTML | |
---|---|
#4142 & #7017 |
---
title: "Quarto Playground"
format: html
---
::: {#fig-demo}
:::: {layout-ncol=2}
![A sub caption for A](https://placehold.co/600x400.png)
![A Sub caption for B](https://placehold.co/600x400.png)
::::
A caption
:::
I am closing this as there no unknown issue and the syntax was shown.
@IULibScholComm hi, let me revisit this - does the following syntax not actually solve your issue? We do have to ask you to update to 1.4, because that's where we do the development, but the following should do the trick for you:
---
title: "Quarto Playground"
format: pdf
---
::: {#fig-demo layout-ncol=2}
![A sub caption for A](https://placehold.co/600x400.png)
![A Sub caption for B](https://placehold.co/600x400.png)
A caption
:::
(@mcanouil FYI your suggested syntax with nested divs doesn't actually work in PDF format.)
@cscheid the issue is the minipage/figure environment in LaTeX which produces "LaTeX Error: Not in outer par mode.". There is at least the issue I linked and I think this was discussed in another one already. As far as I can tell the HTML version works exactly as it should.
As far as I can tell the HTML version works exactly as it should.
Do look at the title of this issue. The report is about PDF...
Indeed thus the two formats and link to the other issue.
In addition to the title:
(Worse, it creates a problem in the HTML version, as the figures are no longer side by side (as intended) but stacked).
@IULibScholComm hi, let me revisit this - does the following syntax not actually solve your issue? We do have to ask you to update to 1.4, because that's where we do the development, but the following should do the trick for you:
--- title: "Quarto Playground" format: pdf --- ::: {#fig-demo layout-ncol=2} ![A sub caption for A](https://placehold.co/600x400.png) ![A Sub caption for B](https://placehold.co/600x400.png) A caption :::
(@mcanouil FYI your suggested syntax with nested divs doesn't actually work in PDF format.)
Thank you! Yes, the above fixes my issue. I really appreciate it! (And yes, mcanouil's proposed solution, as you mentioned, caused the pdf to break, unfortunately--I think #4142 is the issue mcanouil mentions. I do need both the HTML and PDF versions to work.)
Bug description
Updated description
I made the change that you recommended, but it does not fix the problem, as the main caption and cross reference are still not present in the PDF version (see attached). (Worse, it creates a problem in the HTML version, as the figures are no longer side by side (as intended) but stacked). Through-the-Looking-Glass--I.-Why-Cross-Fertilize-problem2.pdf
Steps to reproduce
Expected behavior
The PDF subfigures should have a caption and cross reference number (4.1), as they do in the HTML, EPUB, and DOCX versions. The HTML subfigures should be side by side.
Actual behavior
The PDF subfigures do not have a caption and cross reference number (4.1), despite having them in the HTML, EPUB, and DOCX versions. The HTML subfigures are stacked.
Your environment
Quarto check output