1% Generated by roxygen2: do not edit by hand
2% Please edit documentation in R/rocco.R
3\name{rocco}
4\alias{rocco}
5\title{Knit R Markdown using the classic Docco style}
6\usage{
7rocco(input, ...)
8}
9\arguments{
10\item{input}{Path of the input R Markdown file.}
11
12\item{...}{Arguments to be passed to \code{\link{knit2html}}}
13}
14\value{
15An HTML file is written, and its name is returned.
16}
17\description{
18The classic Docco style is a two-column layout, with text in the left and
19code in the right column.
20}
21\details{
22The output HTML page supports resizing and hiding/showing the two columns.
23Move the cursor to the center of the page, and it will change to a
24bidirectional resize cursor; drag the cursor to resize the two columns. Press
25the key \code{t} to hide the code column (show the text column only), and
26press again to hide the text column (show code).
27}
28\examples{
29rocco_view = function(input) {
30    owd = setwd(tempdir())
31    on.exit(setwd(owd))
32    if (!file.exists(input))
33        return()
34    o = rocco(input, header = "", quiet = TRUE)
35    if (interactive())
36        browseURL(o)
37}
38# knit these two vignettes using the docco style
39rocco_view(system.file("doc", "docco-classic.Rmd", package = "knitr"))
40rocco_view(system.file("doc", "knit_expand.Rmd", package = "knitr"))
41}
42\references{
43The Docco package by Jeremy Ashkenas:
44  \url{https://github.com/jashkenas/docco}
45}
46\author{
47Weicheng Zhu and Yihui Xie
48}
49