Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is some information that may be helpful to people who are new to brew.</p> <p>(I learned about brew today and used it to create a book document, with a chapter for each "specialty".)</p> <p>Shane's link is helpful. Another link is <a href="http://cran.r-project.org/web/packages/brew/index.html" rel="noreferrer">Brew</a>. This has downloads and a short reference manual (seven pages).</p> <p>In at least one way, brew is nicer than Sweave:</p> <ul> <li>In brew, the tags are simpler, being variations of &lt;%...%>.</li> <li>In Sweave, the tags are &lt;&lt;...>>=...@ and \Sexpr{...}.</li> </ul> <p>If you want to try brew, do the following in R:</p> <pre><code>install.packages("brew") library(brew) </code></pre> <p>Save the following brew code in a file called <code>book.brew</code>. The code prints some digits of pi, with one digit per chapter. Note that there is one loop, and that parts of it are in Latex, and parts of it are in brew tags.</p> <pre><code> \documentclass{book} \title{A book} \begin{document} \maketitle &lt;%# This comment will not appear in the Latex file. %&gt; &lt;% digits = c(3, 1, 4, 1, 5, 9) for (i in 1:length(digits)) { %&gt; \chapter{Digit $&lt;%= i %&gt;$} Digit $&lt;%= i %&gt;$ of $\pi$ is $&lt;%= digits[i] %&gt;$. &lt;% } %&gt; \end{document} </code></pre> <p>Note: when you save the file, make the last line be a blank line, or brew will give you a warning about an unfinished line.</p> <p>In R, type</p> <pre><code>brew("/your/path/to/book.brew", "/where/you/want/brew/to/create/book.tex") </code></pre> <p>Compile the Latex file book.tex.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload