Landscape page formatting in pdf Chemistry
Posted: Fri Dec 13, 2019 6:35 am
I have a couple of issues with the formatting on landscape pages. I have set wide tables with an outputclass = 'wide' and likewise applied the same to some figures. Using the following CSS, the pages are set to landscape:
In cases that the wide table or figure is the only content of the section, the header for the section is at the top of the previous portrait page, with a blank page below it, and then the table or figure is on the next (landscape) page.
Is there a way in these situations to keep the section header with the figure or table on the landscape page? At present there is a lot of blank space showing in the document.
The second issue is with figures showing on landscape pages. For some reason the caption for the figure is showing on the next page, thus the figure is the only content on the landscape page. I have tried a few different approaches including:
Is there any way to force the caption to stay with the figure?
As a side note on the above: when a table has an attribute orient = land, the landscape page headers behave differently to pages where outputclass = 'wide' is used, even though it has the same rule:
The header content is different from the rest of the document and is rotated down the right side of the page vertically - as if a portrait page has just been rotated 90 deg.
Thanks
Code: Select all
*[outputclass = 'wide'] {
page: wide-page;
}
*[orient = 'land'] {
page: wide-page;
}
@page wide-page{
size: A4 landscape;
margin-left: 1.5cm;
margin-right: 1.5cm;
page-break-after: avoid;
page-break-before: avoid;
}
Is there a way in these situations to keep the section header with the figure or table on the landscape page? At present there is a lot of blank space showing in the document.
The second issue is with figures showing on landscape pages. For some reason the caption for the figure is showing on the next page, thus the figure is the only content on the landscape page. I have tried a few different approaches including:
Code: Select all
*[class ~= "topic/fig"] {
page-break-inside:avoid;
page-break-before:avoid;}
As a side note on the above: when a table has an attribute orient = land, the landscape page headers behave differently to pages where outputclass = 'wide' is used, even though it has the same rule:
Code: Select all
*[orient = 'land'] {
page: wide-page;
Thanks