Titles with borders for pdf

User avatar
ighulme
Posts: 75
Joined: Sat Oct 25, 2014 12:55 pm
Platform: Mac + Windows
Contact:

Thu Dec 07, 2017 9:46 am Post

Hi, does anybody know if it's possible to add borders to chapter titles when compiling to pdf?

I have done it when compiling to ebook:
Image

but have only got this far compiling to pdf:
Image

I'm using the 'Chapter Title' section layout:
Image

Many thanks,
Ian
I G HULME
The Heavenfield: http://www.heavenfield.com

User avatar
Bridey
Posts: 197
Joined: Wed Nov 22, 2017 2:24 pm
Platform: Mac

Thu Dec 07, 2017 10:47 am Post

The ebooks appear to get their border from the custom CSS:

Code: Select all

/* Amend title to have lines above and below */
.bordered-title { margin-left: 10%; margin-right: 10%; border-top: 1px solid black; padding-top: 12px; border-bottom: 1px solid black; padding-bottom: 12px;  }


As custom CSS is not available for PDF output, I assume it isn't possible to do what you want to do.

A workaround would be to output to an editable format, such as RTF, and style in another application before creating the PDF.

User avatar
ighulme
Posts: 75
Joined: Sat Oct 25, 2014 12:55 pm
Platform: Mac + Windows
Contact:

Thu Dec 07, 2017 10:51 am Post

Thanks for your suggestion - I had a feeling it wouldn't be possible from Scrivener - just wanted to ask.

Yes, I added the style to the custom.css file for my ebook styling.

Many thanks,
Ian
I G HULME
The Heavenfield: http://www.heavenfield.com

User avatar
KB
Site Admin
Posts: 19198
Joined: Tue Jun 13, 2006 11:23 pm
Platform: Mac
Location: Truro, Cornwall
Contact:

Fri Dec 08, 2017 7:44 pm Post

You could accomplish this using underscores in the title prefix and suffix. You'd need to experiment with the number of underscores required to go all the way across the page, and you'd need to ensure the formatting of the prefix and suffix complement one another (and are centred). But for instance, here's a quick test I did:

Image

Result:

Image
"You can't waltz in here, use my toaster, and start spouting universal truths without qualification."

User avatar
ighulme
Posts: 75
Joined: Sat Oct 25, 2014 12:55 pm
Platform: Mac + Windows
Contact:

Sun Dec 10, 2017 11:38 am Post

Ah, thanks for that! I'll give it a go. :)
I G HULME
The Heavenfield: http://www.heavenfield.com