Figure and table caption formatting
Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
-
- Posts: 41
- Joined: Wed Aug 14, 2019 9:16 am
Figure and table caption formatting
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 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.
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.
image.png
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.
image.png
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.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: Figure and table caption formatting
Hello,
Please note that, even if CSS customization falls outside of the technical support that we offer (software functionality issues, feature requests and punctual questions related to specific features of our software), we could also try to see if we could find something for you, withing the time and human resources available.
However, to help us see exactly for which table/figure titles the title is on a separate line (or separate page) in your document, you should send us (on support@oxygenxml.com) a small sample DITA Map hierarchy of files in an as minimal form as possible (with just a few topics), that you can use to reproduce the reported situation, altogether with the entire specific customization .css file.
Regards,
Costin
Please note that, even if CSS customization falls outside of the technical support that we offer (software functionality issues, feature requests and punctual questions related to specific features of our software), we could also try to see if we could find something for you, withing the time and human resources available.
However, to help us see exactly for which table/figure titles the title is on a separate line (or separate page) in your document, you should send us (on support@oxygenxml.com) a small sample DITA Map hierarchy of files in an as minimal form as possible (with just a few topics), that you can use to reproduce the reported situation, altogether with the entire specific customization .css file.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 41
- Joined: Wed Aug 14, 2019 9:16 am
Re: Figure and table caption formatting
Hi Costin,
Thanks.
I have sent the files to the support address.However, to help us see exactly for which table/figure titles the title is on a separate line (or separate page) in your document, you should send us (on support@oxygenxml.com) a small sample DITA Map hierarchy of files in an as minimal form as possible (with just a few topics), that you can use to reproduce the reported situation, altogether with the entire specific customization .css file.
Thanks.
-
- Posts: 41
- Joined: Wed Aug 14, 2019 9:16 am
Re: Figure and table caption formatting
Thanks for the support Julien.
For reference, the following resolved the issue with the captions:
Figure captions
Table captions
All parts of the captions are now in the same font, centred, and on a single line.
For reference, the following resolved the issue with the captions:
Figure captions
Code: Select all
figcaption {
display:block;
text-align: center;
font-family: 'IBM Plex Sans Condensed Text';
font-size: 9pt;
}
Code: Select all
table > caption {
text-align: center;
font-family: 'IBM Plex Sans Condensed Text';
font-size: 9pt;
}
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service