Skip to content

Commit

Permalink
fixed page breaking
Browse files Browse the repository at this point in the history
  • Loading branch information
runemadsen committed Jul 30, 2012
1 parent 888f167 commit 63be86a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 10 deletions.
8 changes: 5 additions & 3 deletions public/book.asc
@@ -1,11 +1,11 @@
The Nature of Code
==================

toc::[]
//toc::[]

//include::chapters/math.asc[]

include::testing.asc[]
//include::testing.asc[]

//include::dave_styles.asc[]

Expand Down Expand Up @@ -33,4 +33,6 @@ include::testing.asc[]

//include::chapters/10_nn.asc[]

//include::test_code.asc[]
//include::test_code.asc[]

include::break_test.asc[]
16 changes: 16 additions & 0 deletions public/break_test.asc
@@ -0,0 +1,16 @@
But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?

But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?

But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and

[example]*Example I.1: Traditional Random Walk*
[source,java]
----
void setup() {
size(640,360);
// Create the Walker.
w = new Walker(); // [bold]
background(0);
}
----
20 changes: 13 additions & 7 deletions public/noc_pdf/stylesheets/print.css
Expand Up @@ -13,6 +13,17 @@ body {
padding: 0;
}

/* Page Breaks
_____________________________________________________________________________ */

img, .note, .example, .tip, .breakout_box, .half-width, .half-width-right, table, .code-comment-pair {
page-break-inside: avoid;
}

span.example {
page-break-after: avoid;
}

/* Fonts
_____________________________________________________________________________ */

Expand Down Expand Up @@ -115,13 +126,15 @@ h2 {

h3 {
font-family: "Proxima-Nova-Semibold";
page-break-after: avoid;
color: #404040;
font-size: 17pt;
margin-top: 2em;
}

h4 {
font-family: "Proxima-Nova-Semibold";
page-break-after: avoid;
font-size: 12pt;
color: #191919;
}
Expand Down Expand Up @@ -496,13 +509,6 @@ dd p {
padding: 0;
}

/* Page Breaks
_____________________________________________________________________________ */

img, .note, .example, .tip, .breakout_box, .half-width, .half-width-right {
page-break-inside: avoid;
}

/* Code Formatting
_____________________________________________________________________________ */

Expand Down

0 comments on commit 63be86a

Please sign in to comment.