Created
July 2, 2013 12:36
-
-
Save mchogan/5908910 to your computer and use it in GitHub Desktop.
Manually control line breaks inside of PressBooks headings when exporting to PDF.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
The following CSS works with PressBooks | |
PDF Export | |
http://www.pressbooks.com | |
Let's say that the Chapter 1 heading is | |
"The Need for Creative Solutions That Work" | |
By default, PressBooks outputs this to PDF as... | |
"The Need for Creative Solutions" | |
"That Work" | |
Here is how to manually control the line breaks | |
so that it becomes... | |
"The Need for" | |
"Creative Solutions That Work" | |
*/ | |
div#chapter-1 h2.chapter-title { | |
display:block; | |
prince-text-replace: " Creative Solutions that Work" ""; | |
} | |
div#chapter-1 h2.chapter-title:after { | |
display:block; | |
content: 'Creative Solutions That Work'; | |
white-space: pre; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment