Controlling custom crossref caption location with LaTeX #7625
Labels
bug
Something isn't working
crossref
triaged-to
Issues that were not self-assigned, signals that an issue was assigned to someone.
Milestone
In 1.4.504, with the new custom crossref types, it's possible to control the location of the caption for custom types using a
{ref-type_name}-cap-location
YAML key (and maybe someday within that custom YAML key #7484 (comment)).This works fine with HTML:
But this custom caption location does not work with LaTeX output—all custom crossref floats will have their captions appear at the bottom.
That's because Quarto uses the
float
LaTeX package to create a new custom float environment:which then gets used later in the document:
Caption location for that new float is controlled by
\floatstyle{}
, which is currently hardcoded to be\floatstyle{plain}
, so allsupptbl
captions appear at the bottom.Fortunately this is fixable by setting a new floatstyle for the custom float like this:
That can go either in the preamble or in the body of the document. For instance, this fixes it:
idk how the allowed
cap-location
YAML keys (top, bottom, margin) get translated to LaTeX normally for tables and figures, but it might be nice someday to also translate them to\floatstyle{plaintop}
(for "top"),\floatstyle{plain}
for "bottom", and whatever magic is used to get floats in the margin for "margin" instead of hardcoding\floatstyle{plaintop}
into the preamble.In the meantime, including this somewhere in the document is a fine workaround:
The text was updated successfully, but these errors were encountered: