diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs
index 80c03bf7..93285385 100644
--- a/src/renderer/html_handlebars/hbs_renderer.rs
+++ b/src/renderer/html_handlebars/hbs_renderer.rs
@@ -137,6 +137,7 @@ impl Renderer for HtmlHandlebars {
let rendered = try!(handlebars.render("index", &data));
let mut file = try!(utils::create_file(&book.get_dest().join("print").with_extension("html")));
try!(file.write_all(&rendered.into_bytes()));
+ output!("[*] Creating print.html ✓");
// Copy static files (js, css, images, ...)
diff --git a/src/theme/book.css b/src/theme/book.css
index 7e35439c..d2f6a7cf 100644
--- a/src/theme/book.css
+++ b/src/theme/book.css
@@ -296,4 +296,13 @@ html, body {
page-break-after: avoid;
/*break-after: avoid;*/
}
+
+ pre, code {
+ page-break-inside: avoid;
+ white-space: pre-wrap; /* CSS 3 */
+ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ word-wrap: break-word; /* Internet Explorer 5.5+ */
+ }
}