Figure and table caption formatting
Posted: Thu Jan 30, 2020 7:24 am
I am having some issues getting the captions for tables and figures to behave as I would like in the PDF output.
I have tried a few different approaches but have now adopted the 'deep-chapter-scope-no-page-reset' parameter for numbering tables and figures (which is a welcome recent update).
At present, my table captions are styled as I would like but are separated over two lines, i.e. the figure number is sitting above (or in some cases on a different page) to the caption. My CSS for this is:
My figure captions are behaving slightly differently: the figure number is centred and in the correct style; however, the caption is using the default style and is left aligned. They are also on separate lines. My CSS is:
I have also tried a similar approaches using .figcapcenter and .figtitleprefix
Any suggestions as to how I can style the whole caption consistently, and on the same line for both tables and figures?
Thanks.
I have tried a few different approaches but have now adopted the 'deep-chapter-scope-no-page-reset' parameter for numbering tables and figures (which is a welcome recent update).
At present, my table captions are styled as I would like but are separated over two lines, i.e. the figure number is sitting above (or in some cases on a different page) to the caption. My CSS for this is:
Code: Select all
*[class ~= "table"] span[class ~= "title"] {
font-family: 'IBM Plex Sans Condensed Text';
font-size: 9pt;
display: block;
text-align: center;
}
.table--title-label {
display:block;
text-align: center;
font-family: 'IBM Plex Sans Condensed Text';
font-size: 9pt;
break-after: avoid;
break-before: avoid;
}
My figure captions are behaving slightly differently: the figure number is centred and in the correct style; however, the caption is using the default style and is left aligned. They are also on separate lines. My CSS is:
Code: Select all
*[class~= "topic/fig"] > *['topic/title'] {
font-family: 'IBM Plex Sans Condensed Text';
font-size: 9pt;
display: block;
text-align: center;
}
.fig--title-label {
display:block;
text-align: center;
font-family: 'IBM Plex Sans Condensed Text';
font-size: 9pt;
}
Any suggestions as to how I can style the whole caption consistently, and on the same line for both tables and figures?
Thanks.