PDF Style Sheet Customization

Hello Rebus Forum,

We created a customized style sheet for the online textbook (https://press.rebus.community/introductiontocommunitypsychology/) we are working on, but all those changes did not show up on the PDF. We realize that this is because there is a separate style sheet in place for PDF files, and it has an entirely different set of rules from what we can tell. We are wondering if anyone has suggestions for customizing the PDF style sheet? Is there an expedient way to do this?

Thank you very much and we look forward to any information.

@jfpo1991 Hi Jack, could you possibly share a bit more about the changes you’re trying to make in the PDF? There are some sections that can be controlled using the Theme Options for PDF, while others may require CSS. I always suggest looking through the different themes to make sure that you’re happy with the major settings like fonts and layout, so there’s almost zero to very little customization to do via the CSS! Let me know what sort of adjustments you wanted to make to the Asimov theme, and I can have a look to see how feasible it might be. :slight_smile:

Thanks for the expedient response! The changes we want to make are not under theme options for PDF. Some of the changes we are looking to make our changing the font itself, centering the text, and other formatting changes that do not appear to be possible with the Theme options. We are currently experimenting with it but we were hoping there was some way to somehow take the styles from the web stylesheet and integrate them into the PDF.

Is this a sufficient amount of information? Thank you again for your support on this.

@jfpo1991 Hi Jack, based on the types of changes you want to make here, I would suggest switching to a different theme. The main reason being that the PDF format can be quite brittle, especially if you have a lot of images and tables in your textbook. As you’ve also seen, changes in the PDF require more extensive customization, as compared to the webbook format. Generally, we suggest making as few CSS customizations as possible in all formats, as this may cause problems down the road, if not done correctly. Pressbooks’ themes are professionally designed with each format in mind, so the output is optimized, and hence the rules and structure of the stylesheets can vary by quite a bit. Transferring the customization you have in the Web stylesheet for PDF will need to be done manually, as you navigate through the different rules for the PDF stylesheet – unfortunately, there’s no easy way around this.

My suggestion to move forward for your book, looking at the changes in the webbook, would be to choose a different theme. I would recommend the McLuhan theme as it has a Serif heading and body font. If you did want the chapter titles to be centered along with a Serif font for headings and body, the Dillard theme might be one to consider (there is a setting in the Theme Options to remove the decorative glyph). Once you select a theme with the font and general layout that you are happy with, hopefully there won’t be too much else you would need to change.

I’m sorry if this wasn’t the answer that you were hoping for, but this will likely be the best path forward.