title: knitr/Rmd: page break after n lines/n distance
body: <p><strong><em>Let me caveat by saying that this may be better suited as an html/css question but (a) I'm not too familiar with those techniques and (b) I wanted to keep it all in the family (R family) if possible.</em></strong></p>
  
  <p>I would like to use <code>knitr</code> to write academic style reports (<strong>APA 6 type guidelines</strong>) using Rmarkdown.  I've got most aspects worked out but not page breaking.  I can manually set page breaks with something like:</p>
  
  <pre><code># report
  
  ```{r setup, include=FALSE}
  # set global chunk options
  opts_chunk$set(cache=TRUE)
  ```
  ------
  ## Page 1
  
  ```{r plot1}
  plot(1:10, 1:10)
  ```
  ------
  ## Page 2
  </code></pre>
  
  <p>In the following .Rmd I'd like to programatically set those breaks after n lines/n distance.  So let's say after 8 inches or 140 lines. </p>
  
  <pre><code># report
  
  ```{r setup, include=FALSE}
  # set global chunk options
  opts_chunk$set(cache=TRUE)
  ```
  Initial Text. Yay!
  
  ```{r plot1}
  plot(1:10, 1:10)
  ```
  
  More Text.  Outstanding.  What Hadley's not calling it plyr2?
  
  ```{r plot2, fig.width=4, fig.height=4}
  plot(1:10, 1:10)
  ```
  
  `r paste(rep("So much text so little time!", 10000))`
  </code></pre>
  
  <p>How can I programatically set page breaks after n distance.  This is similar to how <code>LaTeX</code> would break a file into pages so if a figure takes too much space it would be forced to the next page.</p>
  
  <p><strong>EDIT</strong> Found this from a friend: <a href="http://www.w3.org/TR/css3-page/" rel="nofollow noreferrer">http://www.w3.org/TR/css3-page/</a>  may be helpful.</p>