arcaldwell49 / cik-quarto

Communications in Kinesiology Quarto templates for typesetting
MIT License
0 stars 0 forks source link

Different formatting of main caption and figure caption in html #7

Open smnnlt opened 7 months ago

smnnlt commented 7 months ago

Quarto html rendering treats figure captions and main (figure) captions differently. For example:

::: {#fig-1,layout-ncol="1"}

![](fig1)

**Figure 1:** Caption
:::

::: {#fig-2,layout-ncol="1"}

![**Figure 2:** Caption](fig2)

:::

looks like this in the html:

<div class="{#fig-1,layout-ncol=&quot;1&quot;}">
<p><img src="figsource1" class="img-fluid"></p>
<p><strong>Figure 1:</strong> Caption</p>
</div>
<div class="{#fig-2,layout-ncol=&quot;1&quot;}">
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="figsource2" class="img-fluid figure-img"></p>
<figcaption class="figure-caption"><strong>Figure 2:</strong> Caption</figcaption>
</figure>
</div>
</div>

This creates problems because the template assigns a different formatting to the figure-caption class. My current workaround is to use:

::: {#fig-1,layout-ncol="1"}

![](fig1)

::: {.figure-caption}
**Figure 1:** Caption
:::
:::
arcaldwell49 commented 7 months ago

A few things:

  1. I'm not sure why Quarto is handling it that way. If you have an idea, I'm happy to accept a pull request. I don't have the time to investigate further at the moment.

  2. For the current paper, Ziv, a few things need to happen. The quality of the figure simply isn't good enough for a few reasons. I sent a new message and we should receive a new version shortly. This should avoid the issue.