Replies: 1 comment 1 reply
-
It's not quite the same thing, unfortunately, but if you wanted to target the first line (not the first sentence) in an HTML-based output, you could add the following CSS block to your document: <style>
figcaption.figure-caption::first-line {
font-weight: bold;
}
</style> I think to target the first sentence, you're going to need to wrap it in a
Otherwise, to automate it (and perhaps to make it work if Quarto can't handle adding spans in some places), you could write a Lua filter that targets figure captions, adds the start of a span, and walks along until it finds a full stop, then ends the span. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am attempting to mimick the "Science" style of figure captions. For this, the first sentence of the figure caption, including the caption title and figure number should be in bold. I can make the figure caption bold by defining
fig-title: "**Figure**"
; similarly, the first sentence of the caption can be made bold directly. However, the number (and the separator) are not shown in bold. Is there any way to achieve what I want in quarto?I tried to define fig-title: '**Figure' to start the bold marking and then end the markdown bold after the first sentence of the caption, but that didn't work either – the stars are not interpreted as markdown and simply show in the HTML directly.
Beta Was this translation helpful? Give feedback.
All reactions