├── .Rbuildignore ├── .gitignore ├── DESCRIPTION ├── NAMESPACE ├── NEWS ├── R ├── Rgitbook-package.R ├── buildGitbook.R ├── buildRmd.R ├── checkForGitbook.R ├── gitbookInfo.R ├── initGitbook.R ├── installGitbook.R ├── newGitbook.R ├── openGitbook.R └── publishGitbook.R ├── README.md ├── Rgitbook.dev.R ├── demo ├── 00Index └── gitbook.R ├── inst └── themes │ ├── .DS_Store │ └── mathjax │ ├── .DS_Store │ ├── assets │ ├── .DS_Store │ ├── app.js │ ├── fonts │ │ ├── .DS_Store │ │ ├── anonymouspro │ │ │ ├── 400.woff │ │ │ ├── 400i.woff │ │ │ ├── 700.woff │ │ │ └── 700i.woff │ │ ├── ebgaramond │ │ │ ├── 400.woff │ │ │ └── 400i.woff │ │ ├── fontawesome │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ └── fontawesome-webfont.woff │ │ ├── merriweather │ │ │ ├── 250.woff │ │ │ ├── 250i.woff │ │ │ ├── 400.woff │ │ │ ├── 400i.woff │ │ │ ├── 700.woff │ │ │ ├── 700i.woff │ │ │ ├── 900.woff │ │ │ └── 900i.woff │ │ └── opensans │ │ │ ├── 300.woff │ │ │ ├── 300i.woff │ │ │ ├── 400.woff │ │ │ ├── 400i.woff │ │ │ ├── 600.woff │ │ │ ├── 600i.woff │ │ │ ├── 700.woff │ │ │ └── 700i.woff │ ├── images │ │ └── favicon.ico │ ├── jsrepl │ │ ├── .DS_Store │ │ ├── engines │ │ │ └── javascript-default.js │ │ ├── jsrepl.js │ │ ├── langs │ │ │ ├── .DS_Store │ │ │ └── javascript │ │ │ │ └── jsrepl_js.js │ │ ├── sandbox.html │ │ └── sandbox.js │ ├── print.css │ └── style.css │ ├── javascript │ ├── .DS_Store │ ├── app.js │ ├── core │ │ ├── exercise.js │ │ ├── keyboard.js │ │ ├── navigation.js │ │ ├── progress.js │ │ ├── quiz.js │ │ ├── search.js │ │ ├── sidebar.js │ │ └── state.js │ ├── execute │ │ └── javascript.js │ ├── utils │ │ ├── analytic.js │ │ ├── execute.js │ │ ├── platform.js │ │ ├── sharing.js │ │ └── storage.js │ └── vendors │ │ ├── jquery.js │ │ ├── lodash.js │ │ ├── mixpanel.js │ │ ├── mousetrap.js │ │ └── require.js │ ├── stylesheets │ ├── .DS_Store │ ├── book │ │ ├── body.less │ │ ├── exercise.less │ │ ├── header.less │ │ ├── languages.less │ │ ├── markdown.less │ │ ├── navigation.less │ │ ├── progress.less │ │ ├── quiz.less │ │ └── summary.less │ ├── fonts.less │ ├── highlight.less │ ├── main.less │ ├── mixins.less │ ├── print.less │ ├── variables.less │ └── vendors │ │ ├── .DS_Store │ │ ├── bootstrap │ │ ├── alerts.less │ │ ├── badges.less │ │ ├── bootstrap.less │ │ ├── breadcrumbs.less │ │ ├── button-groups.less │ │ ├── buttons.less │ │ ├── carousel.less │ │ ├── close.less │ │ ├── code.less │ │ ├── component-animations.less │ │ ├── dropdowns.less │ │ ├── forms.less │ │ ├── glyphicons.less │ │ ├── grid.less │ │ ├── input-groups.less │ │ ├── jumbotron.less │ │ ├── labels.less │ │ ├── list-group.less │ │ ├── media.less │ │ ├── mixins.less │ │ ├── modals.less │ │ ├── navbar.less │ │ ├── navs.less │ │ ├── normalize.less │ │ ├── pager.less │ │ ├── pagination.less │ │ ├── panels.less │ │ ├── popovers.less │ │ ├── print.less │ │ ├── progress-bars.less │ │ ├── responsive-utilities.less │ │ ├── scaffolding.less │ │ ├── tables.less │ │ ├── theme.less │ │ ├── thumbnails.less │ │ ├── tooltip.less │ │ ├── type.less │ │ ├── utilities.less │ │ ├── variables.less │ │ └── wells.less │ │ └── fontawesome │ │ ├── bordered-pulled.less │ │ ├── core.less │ │ ├── fixed-width.less │ │ ├── font-awesome.less │ │ ├── icons.less │ │ ├── larger.less │ │ ├── list.less │ │ ├── mixins.less │ │ ├── path.less │ │ ├── rotated-flipped.less │ │ ├── spinning.less │ │ ├── stacked.less │ │ └── variables.less │ └── templates │ ├── .DS_Store │ ├── includes │ ├── .DS_Store │ ├── book │ │ ├── exercise.html │ │ ├── header.html │ │ ├── progress.html │ │ ├── quiz.html │ │ └── summary.html │ └── mathjax.html │ ├── langs.html │ ├── layout.html │ ├── page.html │ └── site.html ├── man ├── Rgitbook-package.Rd ├── buildGitbook.Rd ├── buildRmd.Rd ├── checkForGitbook.Rd ├── gitbookInfo.Rd ├── initGitbook.Rd ├── installGitbook.Rd ├── newGitbook.Rd ├── openGitbook.Rd └── publishGitbook.Rd └── website ├── .bookignore ├── .gitignore ├── README.Rmd ├── README.md ├── SUMMARY.md ├── building ├── buildGitbook.Rmd ├── buildGitbook.md ├── buildRmd.Rmd ├── buildRmd.md ├── building.md ├── openGitbook.Rmd └── openGitbook.md ├── cover.jpg ├── cover.pxm ├── creating ├── citations.Rmd ├── citations.md ├── figures │ └── gitbookfiles.png ├── newGitbook.Rmd └── newGitbook.md ├── installation ├── gitbookInfo.Rmd ├── gitbookInfo.md ├── installation.Rmd └── installation.md ├── publishing ├── publishGitbook.Rmd └── publishGitbook.md ├── references.Rmd ├── references.md └── rgitbook.bib /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | _book 4 | website 5 | Rgitbook.dev.R 6 | README.md 7 | node_modules 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | 5 | /_book/ 6 | 7 | /Rgitbook.Rproj 8 | 9 | /website/.rmdbuild 10 | 11 | /.DS_Store 12 | 13 | /node_modules/ 14 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: Rgitbook 2 | Type: Package 3 | Title: Gitbook Projects with R Markdown 4 | Version: 0.9 5 | Date: 2014-04-20 6 | Author: Jason Bryer 7 | Maintainer: Jason Bryer 8 | URL: http://jason.bryer.org/Rgitbook, http://github.com/jbryer/Rgitbook 9 | BugReports: https://github.com/jbryer/Rgitbook/issues 10 | Description: R package to manage Gitbook.io projects with R Markdown and 11 | MathJax support. 12 | License: GPL 13 | LazyLoad: yes 14 | VignetteBuilder: knitr 15 | Depends: 16 | R (>= 3.0) 17 | Imports: 18 | utils,knitr,knitcitations 19 | Suggests: 20 | devtools 21 | Roxygen: list(wrap=FALSE) 22 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2 (4.0.0): do not edit by hand 2 | 3 | export(buildGitbook) 4 | export(buildRmd) 5 | export(checkForGitbook) 6 | export(gitbookInfo) 7 | export(initGitbook) 8 | export(installGitbook) 9 | export(newGitbook) 10 | export(openGitbook) 11 | export(publishGitbook) 12 | import(knitcitations) 13 | import(knitr) 14 | import(utils) 15 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- 1 | Version 0.9 2 | 3 | * Initial version of gitbook package for working with Gitbook.io projects using R markdown. 4 | -------------------------------------------------------------------------------- /R/Rgitbook-package.R: -------------------------------------------------------------------------------- 1 | #' Gitbook Projects with R Markdown 2 | #' 3 | #' This package provides functions for working with \url{Gitbook.io} projects 4 | #' from within R. Moreover, it provides support for working with R markdown 5 | #' files using the \code{knitr} package. Support for MathJax is also included. 6 | #' 7 | #' @name Rgitbook-package 8 | #' @docType package 9 | #' @title Gitbook Projects with R Markdown 10 | #' @author \email{jason@@bryer.org} 11 | #' @keywords R Markdown Gitbook Github 12 | #' @import utils 13 | #' @import knitr 14 | #' @import knitcitations 15 | NULL 16 | 17 | -------------------------------------------------------------------------------- /R/buildGitbook.R: -------------------------------------------------------------------------------- 1 | #' This will build a gitbook from the source markdown files. 2 | #' 3 | #' This function is simply a wrapper to a system call to \code{gitbook}. 4 | #' 5 | #' \url{https://github.com/GitbookIO/gitbook} 6 | #' 7 | #' @param source.dir location containing the source files. 8 | #' @param out.dir location of the built book. 9 | #' @param format the format of book. Options are pdf or ebook. If omitted, 10 | #' this will build a website. 11 | #' @param buildRmd should \code{\link{buildRmd}} be called first. 12 | #' @param gitbook.params other parameters passed to the gitbook command. 13 | #' @param ... other parameters passed to \code{\link{buildRmd}}. 14 | #' @export 15 | buildGitbook <- function(source.dir=getwd(), 16 | out.dir=paste0(getwd(), '/_book'), 17 | buildRmd = TRUE, 18 | format, 19 | gitbook.params, ...) { 20 | if(buildRmd) { 21 | message('Building R markdown files...') 22 | buildRmd(source.dir, ...) 23 | message('R Markdown files successfully built!') 24 | } 25 | 26 | checkForGitbook(quiet=TRUE) 27 | 28 | buildCmd <- 'build' 29 | if(!missing(format)) { buildCmd <- format } 30 | cmd <- paste0("gitbook ", buildCmd, " ", source.dir, " --output=", out.dir) 31 | #if(!missing(title)) { cmd <- paste0(cmd, ' --title="', title, '"') } 32 | #if(!missing(intro)) { cmd <- paste0(cmd, ' --intro="', intro, '"') } 33 | #if(!missing(github)) { cmd <- paste0(cmd, ' --github=', github) } 34 | #if(mathjax) { cmd <- paste0(cmd, " --plugins plugin-mathjax") } 35 | if(!missing(gitbook.params)) { cmd <- paste0(cmd, " ", gitbook.params)} 36 | system(cmd) 37 | 38 | # Post-process hack to fix broken img urls. 39 | # https://github.com/GitbookIO/gitbook/issues/99 40 | # Will also fix links to the Introduction 41 | # https://github.com/GitbookIO/gitbook/issues/113 42 | #dirs <- list.dirs(out.dir, recursive=FALSE, full.names=FALSE) 43 | #for(i in seq_along(dirs)) { 44 | files <- list.files(out.dir, '*.html', recursive=TRUE) 45 | for(j in seq_along(files)) { 46 | fconn <- file(paste0(out.dir, '/', files[j])) 47 | file <- readLines(fconn) 48 | close(fconn) 49 | #file <- gsub(paste0(dirs[i], '/', dirs[i], '/'), '', file) 50 | file <- gsub('./">', './index.html">', file) 51 | fconn <- file(paste0(out.dir, '/', files[j])) 52 | writeLines(file, fconn) 53 | close(fconn) 54 | } 55 | #} 56 | } 57 | -------------------------------------------------------------------------------- /R/buildRmd.R: -------------------------------------------------------------------------------- 1 | #' Builds markdown files from all Rmarkdown files in the given directories. 2 | #' 3 | #' This function will build Rmarkdown files in the given directory to markdown. 4 | #' The default is to traverse all subdirectories of the working directory 5 | #' looking for .Rmd files to process. This function will save a file in the 6 | #' working directory called \code{.rmdbuild} that contain the status of the 7 | #' last successful build. This allows the function to only process changed files. 8 | #' 9 | #' @param dir root directory of the gitbook project. 10 | #' @param clean if TRUE, all Rmd files will be built regardless of their 11 | #' modification date. 12 | #' @param log.dir if specified, the output from \code{\link{knitr}} will be saved 13 | #' to a log file in the given directory. 14 | #' @param log.ext if log files are saved, the file extension to use. 15 | #' @param ... other parameters passed to \code{\link{knit}}. 16 | #' @export 17 | buildRmd <- function(dir = getwd(), clean=FALSE, log.dir, log.ext='.txt', ...) { 18 | dir <- normalizePath(dir) 19 | bib <- NULL 20 | 21 | if(!exists('statusfile')) { 22 | statusfile <- '.rmdbuild' 23 | statusfile <- paste0(dir, '/', statusfile) 24 | } 25 | 26 | rmds <- list.files(dir[1], '.rmd$', ignore.case=TRUE, recursive=TRUE, full.names=TRUE) 27 | finfo <- file.info(rmds) 28 | 29 | referenceFiles <- c() 30 | 31 | # Handle reference files separately. They will be built everytime to ensure 32 | # the list is up-to-date 33 | referenceFilesPos <- grep('references.Rmd$', rmds, ignore.case=TRUE) 34 | if(length(referenceFilesPos) > 0) { 35 | referenceFiles <- rmds[referenceFilesPos] 36 | rmds <- rmds[-referenceFilesPos] 37 | } 38 | 39 | if(!clean & file.exists(statusfile)) { 40 | load(statusfile) 41 | newfiles <- row.names(finfo)[!row.names(finfo) %in% row.names(rmdinfo)] 42 | existing <- row.names(finfo)[row.names(finfo) %in% row.names(rmdinfo)] 43 | existing <- existing[finfo[existing,]$mtime > rmdinfo[existing,]$mtime] 44 | rmds <- c(newfiles, existing) 45 | } 46 | 47 | if(length(referenceFiles) > 0) { 48 | # This will ensure the reference files are built last. 49 | rmds <- c(rmds, referenceFiles) 50 | } 51 | 52 | knitenv <- new.env() 53 | bibs <- list.files(dir[1], '.bib$', ignore.case=TRUE) 54 | if(length(bibs) > 0) { 55 | newbib <- read.bibtex(paste0(dir, '/', bibs[1])) 56 | if(clean | is.null(bib)) { 57 | if(length(bibs) > 1) { #TODO: support more than one bib file 58 | warning(paste0('More than one BibTex file found. Using ', bibs[1])) 59 | } 60 | cleanbib() 61 | bib <- newbib 62 | } else { 63 | # This will any new references to the bib object 64 | newbibs <- names(newbib)[!names(newbib) %in% names(bib)] 65 | for(i in newbibs) { 66 | bib[i] <- newbib[i] 67 | } 68 | } 69 | assign('bib', bib, envir=knitenv) 70 | } 71 | 72 | for(j in rmds) { 73 | if(!missing(log.dir)) { 74 | dir.create(log.dir, showWarnings=FALSE, recursive=TRUE) 75 | log.dir <- normalizePath(log.dir) 76 | logfile <- paste0(log.dir, '/', sub('.Rmd$', log.ext, j, ignore.case=TRUE)) 77 | dir.create(dirname(logfile), recursive=TRUE, showWarnings=FALSE) 78 | sink(logfile) 79 | } 80 | oldwd <- setwd(dirname(j)) 81 | tryCatch({ 82 | knit(basename(j), sub('.Rmd$', '.md', basename(j), ignore.case=TRUE), 83 | envir=knitenv, ...) 84 | }, finally={ setwd(oldwd) }) 85 | if(!missing(log.dir)) { sink() } 86 | } 87 | 88 | rmdinfo <- finfo 89 | last.run <- Sys.time() 90 | last.R.version <- R.version 91 | save(rmdinfo, last.run, last.R.version, bib, file=statusfile) 92 | invisible(TRUE) 93 | } 94 | -------------------------------------------------------------------------------- /R/checkForGitbook.R: -------------------------------------------------------------------------------- 1 | #' Check if Gitbook is installed. 2 | #' 3 | #' If Gitbook is not installed it will try to do so. If the installion fails or 4 | #' Node.js is not installed, an error will be thrown. 5 | #' 6 | #' @param quiet logical indicating whether messages should be printed. 7 | #' @export 8 | checkForGitbook <- function(quiet=FALSE) { 9 | if(system('npm', ignore.stdout=TRUE) != 0) { 10 | stop("Cannot find node.js. You can install it from http://nodejs.org/download/") 11 | } 12 | if(system('gitbook', ignore.stdout=TRUE) != 0) { 13 | if(!quiet) { message("Installing gitbook...") } 14 | installGitbook() 15 | } 16 | if(!quiet) { message('gitbook is installed and available')} 17 | invisible(TRUE) 18 | } 19 | -------------------------------------------------------------------------------- /R/gitbookInfo.R: -------------------------------------------------------------------------------- 1 | #' Returns the version information about the currently installed gitbook and 2 | #' what is avaialble from \url{https://www.npmjs.org/}. 3 | #' 4 | #' @return a character vector with two elements, \code{installed.version} and 5 | #' \code{available.version}. 6 | #' 7 | #' @export 8 | gitbookInfo <- function() { 9 | checkForGitbook(quiet=TRUE) 10 | installed <- system('gitbook --version', intern=TRUE) 11 | current <- system('npm view gitbook version', intern=TRUE) 12 | if(length(current) > 0) { 13 | current <- current[1] 14 | if(current == installed) { 15 | message(paste0('gitbook is up-to-date with version ', current)) 16 | } else { 17 | message(paste0('A new version of gitbook is available. Version ', 18 | installed, ' installed, ', current, ' available.')) 19 | } 20 | } else { 21 | warning(paste0('Could not get the current available version of gitbook.', 22 | 'Are you connected to the interent?')) 23 | } 24 | invisible(c(installed.version=installed, 25 | available.version=current)) 26 | } 27 | -------------------------------------------------------------------------------- /R/initGitbook.R: -------------------------------------------------------------------------------- 1 | #' Create files and folders based on contents of SUMMARY.md. 2 | #' 3 | #' This first calls system command \code{gitbook init} but then will change 4 | #' the all the file extensions from \code{.md} to \code{.Rmd} excluding 5 | #' \code{SUMMARY.md} and \code{README.md}. 6 | #' 7 | #' @param dir source directory for the Gitbook. 8 | #' 9 | #' @export 10 | initGitbook <- function(dir=getwd()) { 11 | dir <- normalizePath(dir) 12 | checkForGitbook(quiet=TRUE) 13 | oldwd <- setwd(dir) 14 | test <- system(paste0('gitbook init ', dir)) 15 | if(test != 0) { stop("gitbook initalization failed") } 16 | mdfiles <- list.files(dir, '*.md', recursive=TRUE, full.names=TRUE) 17 | mdfiles <- mdfiles[-c(grep('README.md$', mdfiles), 18 | grep('SUMMARY.md$', mdfiles))] 19 | mdfiles2 <- gsub('/.md$', '.Rmd', mdfiles) 20 | file.rename(mdfiles, mdfiles2) 21 | 22 | knitr.header <- c( # TODO: make a package option? 23 | "```{r knitsetup, echo=FALSE, results='hide', warning=FALSE, message=FALSE, cache=FALSE}", 24 | "opts_knit$set(base.dir='./', fig.path='', out.format='md')", 25 | "opts_chunk$set(prompt=TRUE, comment='', results='markup')", 26 | "# See yihui.name/knitr/options for more Knitr options.", 27 | "##### Put other setup R code here", 28 | "", 29 | "```", 30 | "" 31 | ) 32 | for(rmd in mdfiles2) { 33 | file <- file(rmd) 34 | lines <- readLines(file) 35 | close(file) 36 | 37 | #if the knitsetup block isn't already in the file, then add it 38 | suppressWarnings( 39 | if(grepl("r knitsetup.+\n", lines)) { 40 | lines <- c(knitr.header, lines) 41 | } 42 | ) 43 | 44 | file <- file(rmd) 45 | writeLines(lines, file(rmd)) 46 | close(file) 47 | } 48 | 49 | setwd(oldwd) 50 | invisible() 51 | } 52 | -------------------------------------------------------------------------------- /R/installGitbook.R: -------------------------------------------------------------------------------- 1 | #' This will install Gitbook.io. 2 | #' 3 | #' This function will install Gitbook from \url{http://nodejs.org/download/} 4 | #' regardless if the current version. That is, this function will either update 5 | #' or install a new version of Gitbook.io. 6 | #' 7 | #' On many systems this function will not work as installing requires root 8 | #' access. The function will print the required commands for you to copy-and-paste 9 | #' to the terminal. 10 | #' 11 | #' @export 12 | installGitbook <- function() { 13 | cmds <- c('npm install gitbook -g', 14 | 'npm install gitbook-pdf -g', 15 | 'npm install gitbook-plugin') 16 | for(i in cmds) { 17 | if(Sys.info()['sysname'] == 'Windows') { 18 | cmd <- i 19 | } else { 20 | cmd <- paste0('sudo -A ', i) 21 | #test <- system(cmd, input=readline("Enter your password: ")) 22 | } 23 | test <- system(cmd) 24 | if(test != 0) { stop(paste0("gitbook installation failed. Typically ", 25 | "installing as root/Administrator ", 26 | "from the terminal/console works:\n", 27 | paste0(' ', cmds , collapse='\n'))) } 28 | } 29 | invisible() 30 | } 31 | -------------------------------------------------------------------------------- /R/newGitbook.R: -------------------------------------------------------------------------------- 1 | #' Initializes a new Gitbook. 2 | #' 3 | #' This will initalize a new Gitbook in the given directory. When done, it will 4 | #' also change the working directory. 5 | #' 6 | #' @param dir location of the built gitbook. 7 | #' 8 | #' @export 9 | newGitbook <- function(dir) { 10 | # TODO: May want to make these parameters or options 11 | bookignore <- c('*.RMD','*.rmd','*.Rmd','log/','*.R','*.Rproj','.rmdbuild') 12 | gitignore <- c('.Rproj.user','_book/','.rmdbuild','*.DS_Store','log/','.Rhistory') 13 | summary.md <- c("# Summary","This is the summary of my book.", 14 | "", 15 | "* [section 1](section1/README.md)", 16 | " * [example 1](section1/example1.md)", 17 | " * [example 2](section1/example2.md)", 18 | "* [section 2](section2/README.md)", 19 | " * [example 1](section2/example1.md)") 20 | readme.md <- c("# Book Title", 21 | "#### by Your Name", 22 | "", 23 | "Replace with an introduction of your book.") 24 | references.rmd <- c("# References", 25 | "", 26 | "```{r setup, echo=FALSE, results='hide', message=FALSE, warning=FALSE}", 27 | "# Uncomment to list all items in the BibTeX file.", 28 | "#for(i in names(bib)) { print(i); citep(bib[i]) }", 29 | "```", 30 | "```{r bibliography, echo=FALSE, results='asis'}", 31 | "bibliography()", 32 | "```") 33 | 34 | if(missing(dir)) { stop('dir parameter is required.') } 35 | checkForGitbook(quiet=TRUE) 36 | 37 | dir <- path.expand(dir) 38 | message(paste0('Creating ', dir)) 39 | dir.create(dir, recursive=TRUE, showWarnings=FALSE) 40 | olddir <- setwd(dir) 41 | 42 | message('Writing .bookignore...') 43 | f <- file('.bookignore') 44 | writeLines(bookignore, f) 45 | close(f) 46 | 47 | message('Writing .gitignore...') 48 | f <- file('.gitignore') 49 | writeLines(gitignore, f) 50 | close(f) 51 | 52 | message('Writing README.md...') 53 | f <- file('README.md') 54 | writeLines(readme.md, f) 55 | close(f) 56 | 57 | message('Writing SUMMARY.md...') 58 | f <- file('SUMMARY.md') 59 | writeLines(summary.md, f) 60 | close(f) 61 | 62 | message('Writing references.rmd...') 63 | f <- file('references.Rmd') 64 | writeLines(references.rmd, f) 65 | close(f) 66 | 67 | message('Writing references.bib...') 68 | gitbook.ref <- bibentry( 69 | bibtype = "Manual", 70 | title = "Gitbook: Build beautiful interactive books using GitHub/Git and Markdown", 71 | author = person("Samy Pessé and Aaron O'Mullan"), 72 | year = 2014, 73 | url = "http://www.gitbook.io/") 74 | write.bibtex(c(knitr = citation("knitr")[1], 75 | knitcitations = citation("knitcitations"), 76 | devtools = citation("devtools"), 77 | gitbook = gitbook.ref), 78 | file='references.bib') 79 | 80 | message( 81 | 'You can now open README.md and SUMMARY.md. Once you are done 82 | editting SUMMARY.md, initGitbook() will create the file and folder 83 | structure for your new Gitbook.') 84 | message(paste0('Current working directory: ', getwd())) 85 | invisible() 86 | } 87 | -------------------------------------------------------------------------------- /R/openGitbook.R: -------------------------------------------------------------------------------- 1 | #' Open a built gitbook. 2 | #' 3 | #' This function is a wrapper to the system call of \code{open} which should 4 | #' open the book in the system's default web browser. 5 | #' 6 | #' @param out.dir location of the built gitbook. 7 | #' 8 | #' @export 9 | openGitbook <- function(out.dir=paste0(getwd(), '/_book')) { 10 | browseURL(paste0(out.dir, '/index.html')) 11 | } 12 | -------------------------------------------------------------------------------- /R/publishGitbook.R: -------------------------------------------------------------------------------- 1 | #' Publish the built gitbook to Github. 2 | #' 3 | #' Note that this is a wrapper to system \code{git} call. 4 | #' 5 | #' This function assumes that the repository has already exists on Github. 6 | #' 7 | #' Thanks to ramnathv for the shell script. 8 | #' https://github.com/GitbookIO/gitbook/issues/106#issuecomment-40747887 9 | #' 10 | #' @param repo the github repository. Should be of form username/repository 11 | #' @param out.dir location of the built gitbook. 12 | #' @param message commit message. 13 | #' 14 | #' @export 15 | publishGitbook <- function(repo, 16 | out.dir=paste0(getwd(), '/_book'), 17 | message='Update built gitbook') { 18 | test <- system('git --version', ignore.stderr=TRUE, ignore.stdout=TRUE, show.output.on.console=FALSE) 19 | if(test != 0) { stop('Git does not appear to be installed.')} 20 | cmd <- paste0( 21 | "cd ", out.dir, " \n", 22 | "git init \n", 23 | "git commit --allow-empty -m '", message,"' \n", 24 | "git checkout -b gh-pages \n", 25 | "git add . \n", 26 | "git commit -am '", message, "' \n", 27 | "git push git@github.com:", repo, " gh-pages --force ") 28 | system(cmd) 29 | } 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Gitbook Projects with R Markdown 2 | 3 | #### Author: Jason Bryer ([jason@bryer.org](mailto:jason@bryer.org)) 4 | #### Website: [jason.bryer.org/Rgitbook](http://jason.bryer.org/Rgitbook) 5 | 6 | This page is for an R package used to interface with the [Gitbook.io](http://gitbook.io) framework for developing books using [Markdown](https://daringfireball.net/projects/markdown/). It provides complete access to the Gitbook commands while adding support for [R Markdown](https://www.rstudio.com/ide/docs/r_markdown) and [MathJax](http://www.mathjax.org/). See the [R Gitbook](http://jason.bryer.org/Rgitbook) for a tutorial on how to use this R package. 7 | 8 | This R package can be downloaded directly from Github using the `devtools` package: 9 | 10 | ``` 11 | devtools::install_github('jbryer/Rgitbook') 12 | ``` 13 | 14 | #### Updates 15 | 16 | * 2014-04-23 - Added support for citations using the `knitcitations` package. The `newGitbook` will create a `references.Rmd` and `references.bib` file. 17 | * 2014-04-23 - Update to support new plugin architecture for using themes in Gitbook. 18 | 19 | -------------------------------------------------------------------------------- /Rgitbook.dev.R: -------------------------------------------------------------------------------- 1 | require(devtools) 2 | getwd() 3 | 4 | document() 5 | check_doc() 6 | install() 7 | check() 8 | build() 9 | 10 | require(Rgitbook) 11 | ls('package:Rgitbook') # List the public functions 12 | gitbookInfo() 13 | installGitbook() 14 | demo('gitbook') # This will create a test project 15 | 16 | # Build the Gitbook website 17 | buildGitbook('website', clean=FALSE) 18 | openGitbook() 19 | publishGitbook('jbryer/Rgitbook') 20 | 21 | # Other formats 22 | buildGitbook('website', format='pdf') 23 | buildGitbook('website', format='ebook') 24 | 25 | # Send the package to CRAN 26 | release() 27 | -------------------------------------------------------------------------------- /demo/00Index: -------------------------------------------------------------------------------- 1 | gitbook This demo creates test gitbook.io project. 2 | -------------------------------------------------------------------------------- /demo/gitbook.R: -------------------------------------------------------------------------------- 1 | require(Rgitbook) 2 | 3 | pause <- function () { 4 | cat("Hit to continue...") 5 | readline() 6 | invisible() 7 | } 8 | 9 | oldwd <- getwd() # Save to reset the working directory later 10 | checkForGitbook() # Verify gitbook in installed, will try to install if not 11 | gitbookInfo() # What version is installed and available 12 | dir <- tempdir() # Where we'll put the test project 13 | newGitbook(paste0(dir, '/testbook')) 14 | list.files(all.files=TRUE, recursive=TRUE) 15 | pause() 16 | 17 | initGitbook() 18 | list.files(all.files=TRUE, recursive=TRUE) # initGitbook creates .Rmd files 19 | pause() 20 | 21 | buildRmd() 22 | list.files(all.files=TRUE, recursive=TRUE) # Should now be .md files 23 | pause() 24 | 25 | buildGitbook() 26 | openGitbook() 27 | pause() 28 | 29 | setwd(oldwd) 30 | unlink(dir, recursive=TRUE, force=TRUE) # Delete the test project 31 | -------------------------------------------------------------------------------- /inst/themes/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/.DS_Store -------------------------------------------------------------------------------- /inst/themes/mathjax/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/.DS_Store -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/.DS_Store -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/.DS_Store -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/anonymouspro/400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/anonymouspro/400.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/anonymouspro/400i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/anonymouspro/400i.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/anonymouspro/700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/anonymouspro/700.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/anonymouspro/700i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/anonymouspro/700i.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/ebgaramond/400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/ebgaramond/400.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/ebgaramond/400i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/ebgaramond/400i.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/fontawesome/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/fontawesome/FontAwesome.otf -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/fontawesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/fontawesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/fontawesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/fontawesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/fontawesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/fontawesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/merriweather/250.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/merriweather/250.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/merriweather/250i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/merriweather/250i.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/merriweather/400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/merriweather/400.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/merriweather/400i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/merriweather/400i.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/merriweather/700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/merriweather/700.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/merriweather/700i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/merriweather/700i.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/merriweather/900.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/merriweather/900.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/merriweather/900i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/merriweather/900i.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/opensans/300.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/opensans/300.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/opensans/300i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/opensans/300i.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/opensans/400.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/opensans/400.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/opensans/400i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/opensans/400i.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/opensans/600.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/opensans/600.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/opensans/600i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/opensans/600i.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/opensans/700.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/opensans/700.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/fonts/opensans/700i.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/fonts/opensans/700i.woff -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/images/favicon.ico -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/jsrepl/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/assets/jsrepl/.DS_Store -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/jsrepl/engines/javascript-default.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Copyright Joyent, Inc. and other Node contributors. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a 6 | copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to permit 10 | persons to whom the Software is furnished to do so, subject to the 11 | following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included 14 | in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 19 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 20 | DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 21 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 22 | USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | Original at: https://github.com/joyent/node/blob/master/lib/util.js 25 | */ 26 | (function(){function o(c){return c instanceof Array||Array.isArray(c)||c&&c!==Object.prototype&&o(c.__proto__)}function p(c){return c instanceof RegExp||typeof c==="function"&&c.constructor.name==="RegExp"&&c.compile&&c.test&&c.exec&&(""+c).match(/^\/.*\/[gim]{0,3}$/)}var q=80,l=function(c,h,b,f){function m(a,c){switch(typeof a){case "undefined":return d("undefined","undefined");case "string":var b="'"+JSON.stringify(a).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return d(b,"string"); 27 | case "number":return d(""+a,"number");case "boolean":return d(""+a,"boolean")}if(a===null)return d("null","null");var f=Object.keys(a),i=h?Object.getOwnPropertyNames(a):f;if(typeof a==="function"&&i.length===0)return p(a)?d(""+a,"regexp"):d("[Function"+(a.name?": "+a.name:"")+"]","special");if(a instanceof Date&&i.length===0)return d(a.toUTCString(),"date");var j,l;o(a)?(l="Array",b=["[","]"]):(l="Object",b=["{","}"]);typeof a==="function"?(j=a.name?": "+a.name:"",j=p(a)?" "+a:" [Function"+j+"]"): 28 | j="";a instanceof Date&&(j=" "+a.toUTCString());if(i.length===0)return b[0]+j+b[1];if(c<0)return p(a)?d(""+a,"regexp"):d("[Object]","special");k.push(a);i=i.map(function(b){var e,g;a.__lookupGetter__&&(a.__lookupGetter__(b)?g=a.__lookupSetter__(b)?d("[Getter/Setter]","special"):d("[Getter]","special"):a.__lookupSetter__(b)&&(g=d("[Setter]","special")));f.indexOf(b)<0&&(e="["+b+"]");g||(k.indexOf(a[b])<0?(g=c===null?m(a[b]):m(a[b],c-1),g.indexOf("\n")>-1&&(g=o(a)?g.split("\n").map(function(a){return" "+ 29 | a}).join("\n").substr(2):"\n"+g.split("\n").map(function(a){return" "+a}).join("\n"))):g=d("[Circular]","special"));if(typeof e==="undefined"){if(l==="Array"&&b.match(/^\d+$/))return g;e=JSON.stringify(""+b);e.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(e=e.substr(1,e.length-2),e=d(e,"name")):(e=e.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),e=d(e,"string"))}return e+": "+g});k.pop();var n=0;return i=i.reduce(function(a,b){n++;b.indexOf("\n")>=0&&n++;return a+b.length+1},0)>q?b[0]+ 30 | (j===""?"":j+"\n ")+" "+i.join(",\n ")+" "+b[1]:b[0]+j+" "+i.join(", ")+" "+b[1]}var k=[],d=function(a,b){var c={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d={special:"cyan",number:"blue","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"}[b];return d?"\u001b["+c[d][0]+"m"+a+"\u001b["+c[d][1]+"m":a};f||(d=function(a){return a}); 31 | return m(c,typeof b==="undefined"?2:b)},r=/%[sdj%]/g,s=function(c){if(typeof c!=="string"){for(var h=[],b=0;b=m)return c;switch(c){case "%s":return String(f[b++]);case "%d":return Number(f[b++]);case "%j":return JSON.stringify(f[b++]);case "%%":return"%";default:return c}}),k=f[b];b 2 | 3 | 4 | jsREPL Sandbox 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /inst/themes/mathjax/assets/print.css: -------------------------------------------------------------------------------- 1 | h1,h2{page-break-after:avoid;page-break-before:auto}pre,blockquote{border:1px solid #999;page-break-inside:avoid}img{max-width:100%!important;page-break-inside:avoid}section{page-break-after:always}section#cover{padding:3cm 0;text-align:center}section#cover h1{font-size:1.5cm}section#summary{text-align:center}section#summary ul{font-size:.5cm;line-height:1.8em;padding:0;margin:0;list-style:none}section#summary>ul>li{margin-bottom:1cm}section#summary>ul>li>a{font-size:.6cm}section article{margin:1.5cm}section article.new-chapter{page-break-after:always;font-size:.6cm;text-align:center;padding:3cm 0;border-top:1px solid #ccc}@media print{section article.new-chapter{border:0}}section article .exercise{margin:1cm 0;padding:.4cm;page-break-inside:avoid;border:3px solid #ddd}section article .exercise .exercise-header{margin-bottom:.4cm;padding-bottom:.2cm;border-bottom:1px solid #ddd} -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/javascript/.DS_Store -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/app.js: -------------------------------------------------------------------------------- 1 | require([ 2 | "jQuery", 3 | "utils/storage", 4 | "utils/analytic", 5 | "utils/sharing", 6 | 7 | "core/state", 8 | "core/keyboard", 9 | "core/navigation", 10 | "core/progress", 11 | "core/sidebar", 12 | "core/search" 13 | ], function($, storage, analytic, sharing, state, keyboard, navigation, progress, sidebar, search){ 14 | $(document).ready(function() { 15 | var $book; 16 | $book = state.$book; 17 | 18 | if (state.githubId) { 19 | // Initialize storage 20 | storage.setBaseKey(state.githubId); 21 | } 22 | 23 | // Init sidebar 24 | sidebar.init(); 25 | 26 | // Load search 27 | search.init(); 28 | 29 | // Init keyboard 30 | keyboard.init(); 31 | 32 | // Bind sharing button 33 | sharing.init(); 34 | 35 | // Init navigation 36 | navigation.init(); 37 | }); 38 | }); 39 | -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/core/exercise.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "jQuery", 3 | "utils/execute", 4 | "utils/analytic", 5 | "core/state" 6 | ], function($, execute, analytic, state){ 7 | // Bind an exercise 8 | var prepareExercise = function($exercise) { 9 | var codeSolution = $exercise.find(".code-solution").text(); 10 | var codeValidation = $exercise.find(".code-validation").text(); 11 | var codeContext = $exercise.find(".code-context").text(); 12 | 13 | var editor = ace.edit($exercise.find(".editor").get(0)); 14 | editor.setTheme("ace/theme/tomorrow"); 15 | editor.getSession().setUseWorker(false); 16 | editor.getSession().setMode("ace/mode/javascript"); 17 | 18 | // Submit: test code 19 | $exercise.find(".action-submit").click(function(e) { 20 | e.preventDefault(); 21 | 22 | analytic.track("exercise.submit", {type: "code"}); 23 | 24 | execute("javascript", editor.getValue(), codeValidation, codeContext, function(err, result) { 25 | $exercise.toggleClass("return-error", err != null); 26 | $exercise.toggleClass("return-success", err == null); 27 | if (err) $exercise.find(".alert-danger").text(err.message || err); 28 | }); 29 | }); 30 | 31 | // Set solution 32 | $exercise.find(".action-solution").click(function(e) { 33 | e.preventDefault(); 34 | 35 | editor.setValue(codeSolution); 36 | editor.gotoLine(0); 37 | }); 38 | }; 39 | 40 | // Prepare all exercise 41 | var init = function() { 42 | state.$book.find("section.exercise").each(function() { 43 | prepareExercise($(this)); 44 | }); 45 | }; 46 | 47 | return { 48 | init: init, 49 | prepare: prepareExercise 50 | }; 51 | }); -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/core/keyboard.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "jQuery", 3 | "Mousetrap", 4 | "core/navigation", 5 | "core/sidebar", 6 | "core/search" 7 | ], function($, Mousetrap, navigation, sidebar, search){ 8 | // Bind keyboard shortcuts 9 | var init = function() { 10 | // Next 11 | Mousetrap.bind(['right'], function(e) { 12 | navigation.goNext(); 13 | return false; 14 | }); 15 | 16 | // Prev 17 | Mousetrap.bind(['left'], function(e) { 18 | navigation.goPrev(); 19 | return false; 20 | }); 21 | 22 | // Toggle Summary 23 | Mousetrap.bind(['s'], function(e) { 24 | sidebar.toggle(); 25 | return false; 26 | }); 27 | 28 | // Toggle Search 29 | Mousetrap.bind(['f'], function(e) { 30 | search.toggle(); 31 | return false; 32 | }); 33 | }; 34 | 35 | return { 36 | init: init, 37 | search: search 38 | }; 39 | }); -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/core/progress.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "lodash", 3 | "jQuery", 4 | "utils/storage", 5 | "core/state" 6 | ], function(_, $, storage, state) { 7 | // Get current level 8 | var getCurrentLevel = function() { 9 | return state.level; 10 | }; 11 | 12 | // Return all levels 13 | var getLevels = function () { 14 | var levels = $(".book-summary li[data-level]"); 15 | 16 | return _.map(levels, function(level) { 17 | return $(level).data("level").toString(); 18 | }); 19 | }; 20 | 21 | // Return a map chapter -> number (timestamp) 22 | var getProgress = function () { 23 | // Current level 24 | var progress = storage.get("progress", {}); 25 | 26 | // Levels 27 | var levels = getLevels(); 28 | 29 | _.each(levels, function(level) { 30 | progress[level] = progress[level] || 0; 31 | }); 32 | 33 | return progress; 34 | }; 35 | 36 | // Change value of progress for a level 37 | var markProgress = function (level, state) { 38 | var progress = getProgress(); 39 | 40 | if (state == null) { 41 | state = true; 42 | } 43 | 44 | progress[level] = state 45 | ? Date.now() 46 | : 0; 47 | 48 | storage.set("progress", progress); 49 | }; 50 | 51 | // Show progress 52 | var showProgress = function () { 53 | var progress = getProgress(); 54 | var $summary = $(".book-summary"); 55 | 56 | _.each(progress, function (value, level) { 57 | $summary.find("li[data-level='"+level+"']").toggleClass("done", value > 0); 58 | }); 59 | 60 | // Mark current progress if we have not already 61 | if (!progress[getCurrentLevel()]) { 62 | markProgress(getCurrentLevel(), true); 63 | } 64 | }; 65 | 66 | return { 67 | 'current': getCurrentLevel, 68 | 'levels': getLevels, 69 | 'get': getProgress, 70 | 'mark': markProgress, 71 | 'show': showProgress 72 | }; 73 | }); -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/core/quiz.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "jQuery", 3 | "utils/execute", 4 | "utils/analytic", 5 | "core/state" 6 | ], function($, execute, analytic, state){ 7 | // Bind an exercise 8 | var prepareQuiz = function($quiz) { 9 | 10 | $quiz.find(".quiz-answers input").click(function(e) { 11 | e.preventDefault(); 12 | }); 13 | 14 | // Submit: test code 15 | $quiz.find(".action-submit").click(function(e) { 16 | e.preventDefault(); 17 | analytic.track("exercise.submit", {type: "quiz"}); 18 | $quiz.find("tr.alert-danger,li.alert-danger").removeClass("alert-danger"); 19 | $quiz.find(".alert-success,.alert-danger").addClass("hidden"); 20 | 21 | $quiz.find(".question").each(function(q) { 22 | var result = true; 23 | var $answers = $quiz.find(".question-answers").slice(q).find("input[type=radio], input[type=checkbox]"); 24 | $(this).find("input[type=radio],input[type=checkbox]").each(function(i) { 25 | var correct = $(this).is(":checked") === $answers.slice(i).first().is(":checked"); 26 | result = result && correct; 27 | if (!correct) { 28 | $(this).closest("tr, li").addClass("alert-danger"); 29 | } 30 | }); 31 | $(this).find(result ? "div.alert-success" : "div.alert-danger").toggleClass("hidden"); 32 | }); 33 | 34 | }); 35 | 36 | $quiz.find(".action-solution").click(function(e) { 37 | e.preventDefault(); 38 | $quiz.find(".question-content, .question-answers").toggleClass("hidden"); 39 | }); 40 | }; 41 | 42 | // Prepare all exercise 43 | var init = function() { 44 | state.$book.find("section.quiz").each(function() { 45 | prepareQuiz($(this)); 46 | }); 47 | }; 48 | 49 | return { 50 | init: init, 51 | prepare: prepareQuiz 52 | }; 53 | }); -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/core/search.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "jQuery", 3 | "lodash", 4 | "lunr", 5 | "utils/storage", 6 | "core/state", 7 | "core/sidebar" 8 | ], function($, _, lunr, storage, state, sidebar) { 9 | var index = null; 10 | 11 | // Use a specific idnex 12 | var useIndex = function(data) { 13 | index = lunr.Index.load(data); 14 | }; 15 | 16 | // Load complete index 17 | var loadIndex = function() { 18 | $.getJSON(state.basePath+"/search_index.json") 19 | .then(useIndex); 20 | }; 21 | 22 | // Search for a term 23 | var search = function(q) { 24 | if (!index) return; 25 | var results = _.chain(index.search(q)) 26 | .map(function(result) { 27 | var parts = result.ref.split("#") 28 | return { 29 | path: parts[0], 30 | hash: parts[1] 31 | } 32 | }) 33 | .value(); 34 | 35 | return results; 36 | }; 37 | 38 | // Toggle search bar 39 | var toggleSearch = function(_state) { 40 | if (state != null && isSearchOpen() == _state) return; 41 | 42 | var $searchInput = $(".book-search input"); 43 | state.$book.toggleClass("with-search", _state); 44 | 45 | // If search bar is open: focus input 46 | if (isSearchOpen()) { 47 | sidebar.toggle(true); 48 | $searchInput.focus(); 49 | } else { 50 | $searchInput.blur(); 51 | $searchInput.val(""); 52 | sidebar.filter(null); 53 | } 54 | }; 55 | 56 | // Return true if search bar is open 57 | var isSearchOpen = function() { 58 | return state.$book.hasClass("with-search"); 59 | }; 60 | 61 | 62 | var init = function() { 63 | loadIndex(); 64 | 65 | // Toggle search 66 | $(document).on("click", ".book-header .toggle-search", function(e) { 67 | e.preventDefault(); 68 | toggleSearch(); 69 | }); 70 | }; 71 | 72 | var prepare = function() { 73 | var $searchInput = $(".book-search input"); 74 | 75 | $searchInput.keyup(function(e) { 76 | var key = (e.keyCode ? e.keyCode : e.which); 77 | var q = $(this).val(); 78 | 79 | if (key == 27) { 80 | e.preventDefault(); 81 | toggleSearch(false); 82 | return; 83 | } 84 | if (q.length == 0) { 85 | sidebar.filter(null); 86 | } else { 87 | var results = search(q); 88 | sidebar.filter( 89 | _.pluck(results, "path") 90 | ); 91 | } 92 | }); 93 | } 94 | 95 | return { 96 | init: init, 97 | search: search, 98 | toggle: toggleSearch, 99 | prepare: prepare 100 | }; 101 | }); -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/core/sidebar.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "lodash", 3 | "utils/storage", 4 | "utils/platform", 5 | "core/state" 6 | ], function(_, storage, platform, state) { 7 | var $summary = state.$book.find(".book-summary"); 8 | 9 | // Toggle sidebar with or withour animation 10 | var toggleSidebar = function(_state, animation) { 11 | if (state != null && isOpen() == _state) return; 12 | if (animation == null) animation = true; 13 | 14 | state.$book.toggleClass("without-animation", !animation); 15 | state.$book.toggleClass("with-summary", _state); 16 | 17 | storage.set("sidebar", isOpen()); 18 | }; 19 | 20 | // Return true if sidebar is open 21 | var isOpen = function() { 22 | return state.$book.hasClass("with-summary"); 23 | }; 24 | 25 | // Prepare sidebar: state and toggle button 26 | var init = function() { 27 | // Toggle summary 28 | $(document).on("click", ".book-header .toggle-summary", function(e) { 29 | e.preventDefault(); 30 | toggleSidebar(); 31 | }); 32 | 33 | // Init last state if not mobile 34 | if (!platform.isMobile) { 35 | toggleSidebar(storage.get("sidebar", true), false); 36 | } 37 | }; 38 | 39 | // Filter summary with a list of path 40 | var filterSummary = function(paths) { 41 | $summary.find("li").each(function() { 42 | var path = $(this).data("path"); 43 | var st = paths == null || _.contains(paths, path); 44 | 45 | $(this).toggle(st); 46 | if (st) $(this).parents("li").show(); 47 | }); 48 | }; 49 | 50 | return { 51 | $el: $summary, 52 | init: init, 53 | toggle: toggleSidebar, 54 | filter: filterSummary 55 | } 56 | }); -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/core/state.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "jQuery" 3 | ], function() { 4 | var state = {}; 5 | 6 | state.update = function(dom) { 7 | var $book = $(dom.find(".book")); 8 | 9 | state.$book = $book; 10 | state.githubId = $book.data("github"); 11 | state.level = $book.data("level"); 12 | state.basePath = $book.data("basepath"); 13 | state.revision = $book.data("revision"); 14 | }; 15 | 16 | state.update($); 17 | 18 | return state; 19 | }); -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/execute/javascript.js: -------------------------------------------------------------------------------- 1 | define(function() { 2 | return { 3 | id: "javascript", 4 | assertCode: "function assert(condition, message) { \nif (!condition) { \n throw message || \"Assertion failed\"; \n } \n }\n", 5 | REPL: JSREPL, 6 | sep: ";\n", 7 | }; 8 | }); 9 | -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/utils/analytic.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "lodash", 3 | "mixpanel" 4 | ], function(_, mixpanel) { 5 | mixpanel.init("01eb2b950ae09a5fdb15a98dcc5ff20e", { 6 | loaded: function() { 7 | track("page.start"); 8 | } 9 | }); 10 | 11 | var isAvailable = function() { 12 | return ( 13 | typeof mixpanel !== "undefined" && 14 | typeof mixpanel.track === "function" 15 | ); 16 | }; 17 | 18 | var track = function(e, data) { 19 | if (!isAvailable()) { 20 | console.warn("tracking not available!"); 21 | return; 22 | } 23 | console.log("track", e); 24 | mixpanel.track(e, _.extend(data || {}, { 25 | 'domain': window.location.host 26 | })); 27 | }; 28 | 29 | return { 30 | isAvailable: isAvailable, 31 | track: track 32 | }; 33 | }); -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/utils/execute.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "execute/javascript" 3 | ], function(javascript) { 4 | var LANGUAGES = { 5 | "javascript": javascript 6 | }; 7 | 8 | 9 | var evalJS = function(lang, code, callback) { 10 | var ready = false; 11 | var finished = false; 12 | 13 | var finish = function() { 14 | if(finished) { 15 | return console.error('Already finished'); 16 | } 17 | finished = true; 18 | return callback.apply(null, arguments); 19 | }; 20 | 21 | var repl; 22 | 23 | // Handles all our events 24 | var eventHandler = function(data, eventType) { 25 | console.log([eventType, data]); 26 | switch(eventType) { 27 | case 'progress': 28 | // Update UI loading bar 29 | break; 30 | case 'timeout': 31 | finish(new Error(data)); 32 | break; 33 | case 'result': 34 | finish(null, { 35 | value: data, 36 | type: 'result' 37 | }); 38 | break; 39 | case 'error': 40 | if(ready) { 41 | return finish(null, { 42 | value: data, 43 | type: 'error' 44 | }); 45 | } 46 | return finish(new Error(data)); 47 | break 48 | case 'ready': 49 | // We're good to get results and stuff back now 50 | ready = true; 51 | // Eval our code now that the runtime is ready 52 | repl.eval(code); 53 | break; 54 | default: 55 | console.log('Unhandled event =', eventType, 'data =', data); 56 | } 57 | }; 58 | 59 | repl = new lang.REPL({ 60 | input: eventHandler, 61 | output: eventHandler, 62 | result: eventHandler, 63 | error: eventHandler, 64 | progress: eventHandler, 65 | timeout: { 66 | time: 30000, 67 | callback: eventHandler 68 | } 69 | }); 70 | 71 | repl.loadLanguage(lang.id, eventHandler); 72 | }; 73 | 74 | var execute = function(lang, solution, validation, context, callback) { 75 | // Language data 76 | var langd = LANGUAGES[lang]; 77 | 78 | // Check language is supported 79 | if (!langd) return callback(new Error("Language '"+lang+"' not available for execution")); 80 | 81 | // Validate with validation code 82 | var code = [ 83 | context, 84 | solution, 85 | langd.assertCode, 86 | validation, 87 | ].join(langd.sep); 88 | evalJS(langd, code, function(err, res) { 89 | if(err) return callback(err); 90 | 91 | if (res.type == "error") callback(new Error(res.value)); 92 | else callback(null, res.value); 93 | }); 94 | }; 95 | 96 | return execute; 97 | }); 98 | -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/utils/platform.js: -------------------------------------------------------------------------------- 1 | define([], function() { 2 | return { 3 | isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) 4 | }; 5 | }); -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/utils/sharing.js: -------------------------------------------------------------------------------- 1 | define([ 2 | "jQuery" 3 | ], function($) { 4 | var url = location.href; 5 | var title = $("title").text(); 6 | 7 | var types = { 8 | "twitter": function($el) { 9 | window.open("http://twitter.com/home?status="+encodeURIComponent(title+" "+url)) 10 | }, 11 | "facebook": function($el) { 12 | window.open("http://www.facebook.com/sharer/sharer.php?s=100&p[url]="+encodeURIComponent(url)) 13 | }, 14 | "google-plus": function($el) { 15 | window.open("https://plus.google.com/share?url="+encodeURIComponent(url)) 16 | } 17 | }; 18 | 19 | 20 | // Bind all sharing button 21 | var init = function() { 22 | $(document).on("click", "a[data-sharing]", function(e) { 23 | if (e) e.preventDefault(); 24 | var type = $(this).data("sharing"); 25 | 26 | types[type]($(this)); 27 | }) 28 | }; 29 | 30 | return { 31 | init: init 32 | }; 33 | }); -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/utils/storage.js: -------------------------------------------------------------------------------- 1 | define(function(){ 2 | var baseKey = ""; 3 | 4 | /* 5 | * Simple module for storing data in the browser's local storage 6 | */ 7 | return { 8 | setBaseKey: function(key) { 9 | baseKey = key; 10 | }, 11 | set: function(key, value) { 12 | key = baseKey+":"+key; 13 | localStorage[key] = JSON.stringify(value); 14 | }, 15 | get: function(key, def) { 16 | key = baseKey+":"+key; 17 | if (localStorage[key] === undefined) return def; 18 | try { 19 | var v = JSON.parse(localStorage[key]); 20 | return v == null ? def : v;; 21 | } catch(err) { 22 | console.error(err); 23 | return localStorage[key] || def; 24 | } 25 | }, 26 | remove: function(key) { 27 | key = baseKey+":"+key; 28 | localStorage.removeItem(key); 29 | } 30 | }; 31 | }); -------------------------------------------------------------------------------- /inst/themes/mathjax/javascript/vendors/mixpanel.js: -------------------------------------------------------------------------------- 1 | (function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" "); 2 | for(g=0;g a { 74 | color: @sidebar-link-completed; 75 | font-weight: @sidebar-link-completed-weight; 76 | 77 | i { 78 | display: inline; 79 | } 80 | } 81 | } 82 | 83 | a, span { 84 | display: block; 85 | padding: 10px 15px; 86 | border-bottom: none; 87 | color: @sidebar-link-color; 88 | background: @sidebar-link-background; 89 | text-overflow: ellipsis; 90 | overflow: hidden; 91 | white-space: nowrap; 92 | position: relative; 93 | padding-left: 25px; 94 | } 95 | 96 | span { 97 | cursor: not-allowed; 98 | .opacity(0.3); 99 | } 100 | 101 | &.active > a, a:hover { 102 | color: @sidebar-link-hover-color; 103 | background: @sidebar-link-hover-background; 104 | text-decoration: none; 105 | } 106 | 107 | ul { 108 | padding-left: @sidebar-nested-padding; 109 | } 110 | } 111 | } 112 | 113 | @media (max-width: 600px) { 114 | width: 100%; 115 | bottom: 0px; 116 | left: -100%; 117 | } 118 | } 119 | 120 | &.with-summary { 121 | .book-summary { 122 | left: 0px; 123 | } 124 | } 125 | 126 | &.without-animation { 127 | .book-summary { 128 | .transition(none) !important; 129 | } 130 | } 131 | 132 | &.with-search { 133 | .book-summary { 134 | .book-search { 135 | top: 0px; 136 | } 137 | 138 | ul.summary { 139 | top: @header-height; 140 | } 141 | } 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/fonts.less: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'EB Garamond'; 3 | font-style: normal; 4 | font-weight: 400; 5 | src: local('EB Garamond 12 Regular'),url('@{FontPath}/ebgaramond/400.woff') format('woff'); 6 | } 7 | @font-face { 8 | font-family: 'EB Garamond'; 9 | font-style: italic; 10 | font-weight: 400i; 11 | src: local('EB Garamond 12 Italic'),url('@{FontPath}/ebgaramond/400i.woff') format('woff'); 12 | } 13 | @font-face { 14 | font-family: 'Merriweather'; 15 | font-style: normal; 16 | font-weight: 250; 17 | src: local('Merriweather Light'),url('@{FontPath}/merriweather/250.woff') format('woff'); 18 | } 19 | @font-face { 20 | font-family: 'Merriweather'; 21 | font-style: italic; 22 | font-weight: 250i; 23 | src: local('Merriweather Light Italic'),url('@{FontPath}/merriweather/250i.woff') format('woff'); 24 | } 25 | @font-face { 26 | font-family: 'Merriweather'; 27 | font-style: normal; 28 | font-weight: 400; 29 | src: local('Merriweather'),url('@{FontPath}/merriweather/400.woff') format('woff'); 30 | } 31 | @font-face { 32 | font-family: 'Merriweather'; 33 | font-style: italic; 34 | font-weight: 400i; 35 | src: local('Merriweather Italic'),url('@{FontPath}/merriweather/400i.woff') format('woff'); 36 | } 37 | @font-face { 38 | font-family: 'Merriweather'; 39 | font-style: normal; 40 | font-weight: 600; 41 | src: local(''),url('@{FontPath}/merriweather/600.woff') format('woff'); 42 | } 43 | /*@font-face { 44 | font-family: 'Merriweather'; 45 | font-style: italic; 46 | font-weight: 600i; 47 | src: local(''),url('@{FontPath}/merriweather/600i.woff') format('woff'); 48 | }*/ 49 | @font-face { 50 | font-family: 'Merriweather'; 51 | font-style: normal; 52 | font-weight: 700; 53 | src: local('Merriweather Bold'),url('@{FontPath}/merriweather/700.woff') format('woff'); 54 | } 55 | @font-face { 56 | font-family: 'Merriweather'; 57 | font-style: italic; 58 | font-weight: 700i; 59 | src: local('Merriweather Bold Italic'),url('@{FontPath}/merriweather/700i.woff') format('woff'); 60 | } 61 | @font-face { 62 | font-family: 'Merriweather'; 63 | font-style: normal; 64 | font-weight: 900; 65 | src: local('Merriweather Heavy'),url('@{FontPath}/merriweather/900.woff') format('woff'); 66 | } 67 | @font-face { 68 | font-family: 'Merriweather'; 69 | font-style: italic; 70 | font-weight: 900i; 71 | src: local('Merriweather Heavy Italic'),url('@{FontPath}/merriweather/900i.woff') format('woff'); 72 | } 73 | @font-face { 74 | font-family: 'Anonymous Pro'; 75 | font-style: normal; 76 | font-weight: 400; 77 | src: local('Anonymous Pro'),url('@{FontPath}/anonymouspro/400.woff') format('woff'); 78 | } 79 | @font-face { 80 | font-family: 'Anonymous Pro'; 81 | font-style: italic; 82 | font-weight: 400i; 83 | src: local('Anonymous Pro Italic'),url('@{FontPath}/anonymouspro/400i.woff') format('woff'); 84 | } 85 | @font-face { 86 | font-family: 'Anonymous Pro'; 87 | font-style: normal; 88 | font-weight: 700; 89 | src: local('Anonymous Pro Bold'),url('@{FontPath}/anonymouspro/700.woff') format('woff'); 90 | } 91 | @font-face { 92 | font-family: 'Anonymous Pro'; 93 | font-style: italic; 94 | font-weight: 700i; 95 | src: local('Anonymous Pro Bold Italic'),url('@{FontPath}/anonymouspro/700i.woff') format('woff'); 96 | } 97 | @font-face { 98 | font-family: 'Open Sans'; 99 | font-style: normal; 100 | font-weight: 300; 101 | src: local('Open Sans Light'),url('@{FontPath}/opensans/300.woff') format('woff'); 102 | } 103 | @font-face { 104 | font-family: 'Open Sans'; 105 | font-style: italic; 106 | font-weight: 300i; 107 | src: local('Open Sans Light Italic'),url('@{FontPath}/opensans/300i.woff') format('woff'); 108 | } 109 | @font-face { 110 | font-family: 'Open Sans'; 111 | font-style: normal; 112 | font-weight: 400; 113 | src: local('Open Sans Regular'),url('@{FontPath}/opensans/400.woff') format('woff'); 114 | } 115 | @font-face { 116 | font-family: 'Open Sans'; 117 | font-style: italic; 118 | font-weight: 400i; 119 | src: local('Open Sans Italic'),url('@{FontPath}/opensans/400i.woff') format('woff'); 120 | } 121 | @font-face { 122 | font-family: 'Open Sans'; 123 | font-style: normal; 124 | font-weight: 600; 125 | src: local('Open Sans Semibold'),url('@{FontPath}/opensans/600.woff') format('woff'); 126 | } 127 | @font-face { 128 | font-family: 'Open Sans'; 129 | font-style: italic; 130 | font-weight: 600i; 131 | src: local('Open Sans Semibold Italic'),url('@{FontPath}/opensans/600i.woff') format('woff'); 132 | } 133 | @font-face { 134 | font-family: 'Open Sans'; 135 | font-style: normal; 136 | font-weight: 700; 137 | src: local('Open Sans Bold'),url('@{FontPath}/opensans/700.woff') format('woff'); 138 | } 139 | @font-face { 140 | font-family: 'Open Sans'; 141 | font-style: italic; 142 | font-weight: 700i; 143 | src: local('Open Sans Bold Italic'),url('@{FontPath}/opensans/700i.woff') format('woff'); 144 | } -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/highlight.less: -------------------------------------------------------------------------------- 1 | /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ 2 | 3 | /* Tomorrow Comment */ 4 | .hljs-comment { 5 | color: hsl(207, 35%, 35%); 6 | } 7 | 8 | /* Tomorrow Red */ 9 | .hljs-variable, 10 | .hljs-attribute, 11 | .hljs-tag, 12 | .hljs-regexp, 13 | .ruby .hljs-constant, 14 | .xml .hljs-tag .hljs-title, 15 | .xml .hljs-pi, 16 | .xml .hljs-doctype, 17 | .html .hljs-doctype, 18 | .css .hljs-id, 19 | .css .hljs-class, 20 | .css .hljs-pseudo { 21 | color: #c82829; 22 | } 23 | 24 | /* Tomorrow Orange */ 25 | .hljs-number, 26 | .hljs-preprocessor, 27 | .hljs-pragma, 28 | .hljs-built_in, 29 | .hljs-literal, 30 | .hljs-constant, 31 | .hljs-function .hljs-title { 32 | color: hsl(50, 100%, 60%); 33 | } 34 | 35 | /* Tomorrow Yellow */ 36 | .ruby .hljs-class .hljs-title, 37 | .css .hljs-rules .hljs-attribute { 38 | color: #eab700; 39 | } 40 | 41 | /* Tomorrow Green */ 42 | .hljs-string, 43 | .hljs-value, 44 | .hljs-inheritance, 45 | .hljs-header, 46 | .ruby .hljs-symbol, 47 | .xml .hljs-cdata { 48 | color: hsl(0, 100%, 70%); 49 | } 50 | 51 | /* Tomorrow Aqua */ 52 | .css .hljs-hexcolor { 53 | color: #3e999f; 54 | } 55 | 56 | /* Tomorrow Blue */ 57 | .hljs-function .keyword, 58 | .python .hljs-decorator, 59 | .python .hljs-title, 60 | .ruby .hljs-function .hljs-title, 61 | .ruby .hljs-title .hljs-keyword, 62 | .perl .hljs-sub, 63 | .javascript .hljs-title, 64 | .coffeescript .hljs-title { 65 | color: hsl(207, 70%, 60%); 66 | } 67 | 68 | /* Tomorrow Purple */ 69 | .hljs-keyword, 70 | .javascript .hljs-function { 71 | color: hsl(207, 95%, 70%); 72 | } 73 | 74 | .hljs { 75 | display: block; 76 | background: white; 77 | color: #4d4d4c; 78 | padding: 0.5em; 79 | font-family: "Anonymous Pro", "Inconsolata", "Monaco", monospace; 80 | } 81 | 82 | .coffeescript .javascript, 83 | .javascript .xml, 84 | .tex .hljs-formula, 85 | .xml .javascript, 86 | .xml .vbscript, 87 | .xml .css, 88 | .xml .hljs-cdata { 89 | opacity: 0.5; 90 | } -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/main.less: -------------------------------------------------------------------------------- 1 | @import "vendors/bootstrap/bootstrap.less"; 2 | @import "vendors/fontawesome/font-awesome.less"; 3 | 4 | @import "mixins.less"; 5 | @import "variables.less"; 6 | @import "fonts.less"; 7 | 8 | @import "highlight.less"; 9 | 10 | @import "book/languages.less"; 11 | @import "book/header.less"; 12 | @import "book/summary.less"; 13 | @import "book/body.less"; 14 | @import "book/exercise.less"; 15 | @import "book/quiz.less"; 16 | @import "book/markdown.less"; 17 | @import "book/progress.less"; 18 | @import "book/navigation.less"; 19 | 20 | * { 21 | -webkit-overflow-scrolling: touch; 22 | -webkit-tap-highlight-color: transparent; 23 | -webkit-text-size-adjust: none; 24 | -webkit-touch-callout: none; 25 | -webkit-font-smoothing: antialiased; 26 | } 27 | 28 | .form-control { 29 | .box-shadow(none); 30 | } 31 | 32 | html, body { 33 | height: 100%; 34 | } 35 | 36 | body { 37 | text-rendering: optimizeLegibility; 38 | font-smoothing: antialiased; 39 | font-family: @font-family-base; 40 | } 41 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/mixins.less: -------------------------------------------------------------------------------- 1 | .link-inherit { 2 | color: inherit; 3 | 4 | &:hover, &:focus { 5 | color: inherit; 6 | } 7 | } -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/print.less: -------------------------------------------------------------------------------- 1 | h1, h2 { 2 | page-break-after: avoid; 3 | page-break-before: auto; 4 | } 5 | 6 | pre, blockquote { 7 | border: 1px solid #999; 8 | page-break-inside: avoid; 9 | } 10 | 11 | img { 12 | max-width: 100% !important; 13 | page-break-inside: avoid; 14 | } 15 | 16 | section { 17 | page-break-after: always; 18 | 19 | &#cover { 20 | padding: 3cm 0cm; 21 | text-align: center; 22 | 23 | h1 { 24 | font-size: 1.5cm; 25 | } 26 | } 27 | 28 | &#summary { 29 | text-align: center; 30 | 31 | ul { 32 | font-size: 0.5cm; 33 | line-height: 1.8em; 34 | padding: 0px; 35 | margin: 0px; 36 | list-style: none; 37 | } 38 | 39 | > ul { 40 | > li { 41 | margin-bottom: 1cm; 42 | 43 | > a { 44 | font-size: 0.6cm; 45 | } 46 | } 47 | } 48 | } 49 | 50 | article { 51 | margin: 1.5cm; 52 | 53 | /* Big centered title */ 54 | &.new-chapter { 55 | page-break-after: always; 56 | font-size: 0.6cm; 57 | text-align: center; 58 | padding: 3cm 0cm; 59 | 60 | border-top: 1px solid #ccc; 61 | 62 | @media print { 63 | border: none; 64 | } 65 | } 66 | 67 | .exercise { 68 | margin: 1cm 0cm; 69 | padding: 0.4cm; 70 | page-break-inside: avoid; 71 | 72 | border: 3px solid #ddd; 73 | 74 | .exercise-header { 75 | margin-bottom: 0.4cm; 76 | padding-bottom: 0.2cm; 77 | border-bottom: 1px solid #ddd; 78 | } 79 | } 80 | } 81 | } -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/variables.less: -------------------------------------------------------------------------------- 1 | @staticPath: "./"; 2 | 3 | // Sizes 4 | @mobileMaxWidth: 1240px; 5 | 6 | // Header 7 | @header-height: 50px; 8 | @header-color: hsl(194, 5%, 52%); 9 | @header-background: white; 10 | @header-button-color: hsl(194, 5%, 52%); 11 | @header-button-hover-color: #151515; 12 | @header-button-hover-background: hsl(207, 15%, 95%); 13 | 14 | // Body 15 | @body-background: white; 16 | @body-pagination-background: hsl(207, 15%, 95%); 17 | 18 | // Sidebar 19 | @sidebar-width: 250px; 20 | @sidebar-color: hsl(207, 15%, 80%); 21 | @sidebar-background: hsl(207, 15%, 95%); 22 | 23 | @sidebar-nested-padding: 10px; 24 | 25 | @sidebar-search-padding: 6px; 26 | @sidebar-search-background: transparent; 27 | @sidebar-search-input-border-color: hsl(207, 15%, 80%); 28 | 29 | @sidebar-divider-color: hsl(207, 15%, 85%); 30 | 31 | @sidebar-link-color: hsl(207, 15%, 50%); 32 | @sidebar-link-background: transparent; 33 | @sidebar-link-hover-color: hsl(207, 100%, 50%); 34 | @sidebar-link-hover-background: transparent; 35 | 36 | @sidebar-icon-color: @bar-progress-background; 37 | @sidebar-link-completed: hsl(207, 15%, 25%); 38 | @sidebar-link-completed-weight: normal; 39 | 40 | // Page 41 | @page-background: white; 42 | 43 | // Progress Bar 44 | @chapter-display: none; 45 | @chapter-size: 16px; 46 | 47 | @progress-height: 0px; 48 | 49 | @bar-height: 2px; 50 | @bar-left: @sidebar-width; 51 | @bar-right: 0; 52 | @bar-top: 50px; 53 | @bar-position: static; 54 | @bar-background: white; 55 | @bar-progress-background: hsl(120, 60%, 50%); 56 | 57 | // Basics of a navbar 58 | @navbar-height: 50px; 59 | @navbar-margin-bottom: @line-height-computed; 60 | @navbar-default-border: #d5d5d5; 61 | @navbar-border-radius: 0px; 62 | @navbar-padding-horizontal: floor(@grid-gutter-width / 2); 63 | @navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2); 64 | 65 | // Navbar brand label 66 | @navbar-default-color: #333; 67 | @navbar-default-link-color: #333; 68 | @navbar-default-brand-color: @navbar-default-link-color; 69 | @navbar-default-brand-hover-color: @navbar-default-link-color; 70 | @navbar-default-brand-hover-bg: transparent; 71 | 72 | // Border Radius 73 | @border-radius-base: 1px; 74 | @border-radius-large: 3px; 75 | @border-radius-small: 1px; 76 | 77 | // Fonts 78 | @font-family-serif: Merriweather, "EB Garamond", Georgia, serif; 79 | @font-family-sans: "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, sans-serif; 80 | @font-family-base: @font-family-serif; 81 | 82 | @FontPath: '@{staticPath}/fonts'; 83 | @fa-font-path: "@{FontPath}/fontawesome"; 84 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/stylesheets/vendors/.DS_Store -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headingsColor 19 | color: inherit; 20 | } 21 | // Provide class for links that match alerts 22 | .alert-link { 23 | font-weight: @alert-link-font-weight; 24 | } 25 | 26 | // Improve alignment and spacing of inner content 27 | > p, 28 | > ul { 29 | margin-bottom: 0; 30 | } 31 | > p + p { 32 | margin-top: 5px; 33 | } 34 | } 35 | 36 | // Dismissable alerts 37 | // 38 | // Expand the right padding and account for the close button's positioning. 39 | 40 | .alert-dismissable { 41 | padding-right: (@alert-padding + 20); 42 | 43 | // Adjust close link position 44 | .close { 45 | position: relative; 46 | top: -2px; 47 | right: -21px; 48 | color: inherit; 49 | } 50 | } 51 | 52 | // Alternate styles 53 | // 54 | // Generate contextual modifier classes for colorizing the alert. 55 | 56 | .alert-success { 57 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 58 | } 59 | .alert-info { 60 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 61 | } 62 | .alert-warning { 63 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 64 | } 65 | .alert-danger { 66 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 67 | } 68 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base classes 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | } 26 | 27 | // Hover state, but only for links 28 | a.badge { 29 | &:hover, 30 | &:focus { 31 | color: @badge-link-hover-color; 32 | text-decoration: none; 33 | cursor: pointer; 34 | } 35 | } 36 | 37 | // Quick fix for labels/badges in buttons 38 | .btn .badge { 39 | position: relative; 40 | top: -1px; 41 | } 42 | 43 | // Account for counters in navs 44 | a.list-group-item.active > .badge, 45 | .nav-pills > .active > a > .badge { 46 | color: @badge-active-color; 47 | background-color: @badge-active-bg; 48 | } 49 | .nav-pills > li > a > .badge { 50 | margin-left: 3px; 51 | } 52 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/bootstrap.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.0.0 3 | * 4 | * Copyright 2013 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world by @mdo and @fat. 9 | */ 10 | 11 | // Core variables and mixins 12 | @import "variables.less"; 13 | @import "mixins.less"; 14 | 15 | // Reset 16 | @import "normalize.less"; 17 | //@import "print.less"; 18 | 19 | // Core CSS 20 | @import "scaffolding.less"; 21 | @import "type.less"; 22 | @import "code.less"; 23 | @import "grid.less"; 24 | @import "tables.less"; 25 | @import "forms.less"; 26 | @import "buttons.less"; 27 | 28 | // Components 29 | @import "component-animations.less"; 30 | @import "glyphicons.less"; 31 | @import "dropdowns.less"; 32 | @import "button-groups.less"; 33 | @import "input-groups.less"; 34 | @import "navs.less"; 35 | @import "navbar.less"; 36 | @import "breadcrumbs.less"; 37 | @import "pagination.less"; 38 | @import "pager.less"; 39 | @import "labels.less"; 40 | @import "badges.less"; 41 | @import "jumbotron.less"; 42 | @import "thumbnails.less"; 43 | @import "alerts.less"; 44 | @import "progress-bars.less"; 45 | @import "media.less"; 46 | @import "list-group.less"; 47 | @import "panels.less"; 48 | @import "wells.less"; 49 | @import "close.less"; 50 | 51 | // Components w/ JavaScript 52 | @import "modals.less"; 53 | @import "tooltip.less"; 54 | @import "popovers.less"; 55 | @import "carousel.less"; 56 | 57 | // Utility classes 58 | @import "utilities.less"; 59 | @import "responsive-utilities.less"; 60 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: 8px 15px; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | > li { 13 | display: inline-block; 14 | &+li:before { 15 | content: "/\00a0"; // Unicode space added since inline-block means non-collapsing white-space 16 | padding: 0 5px; 17 | color: @breadcrumb-color; 18 | } 19 | } 20 | > .active { 21 | color: @breadcrumb-active-color; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/buttons.less: -------------------------------------------------------------------------------- 1 | // 2 | // Buttons 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // -------------------------------------------------- 8 | 9 | // Core styles 10 | .btn { 11 | display: inline-block; 12 | padding: @padding-base-vertical @padding-base-horizontal; 13 | margin-bottom: 0; // For input.btn 14 | font-size: @font-size-base; 15 | font-weight: @btn-font-weight; 16 | line-height: @line-height-base; 17 | text-align: center; 18 | vertical-align: middle; 19 | cursor: pointer; 20 | border: 1px solid transparent; 21 | border-radius: @border-radius-base; 22 | white-space: nowrap; 23 | .user-select(none); 24 | 25 | &:focus { 26 | .tab-focus(); 27 | } 28 | 29 | &:hover, 30 | &:focus { 31 | color: @btn-default-color; 32 | text-decoration: none; 33 | } 34 | 35 | &:active, 36 | &.active { 37 | outline: 0; 38 | background-image: none; 39 | .box-shadow(inset 0 3px 5px rgba(0,0,0,.125)); 40 | } 41 | 42 | &.disabled, 43 | &[disabled], 44 | fieldset[disabled] & { 45 | cursor: not-allowed; 46 | pointer-events: none; // Future-proof disabling of clicks 47 | .opacity(.65); 48 | .box-shadow(none); 49 | } 50 | 51 | } 52 | 53 | 54 | // Alternate buttons 55 | // -------------------------------------------------- 56 | 57 | .btn-default { 58 | .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border); 59 | } 60 | .btn-primary { 61 | .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border); 62 | } 63 | // Warning appears as orange 64 | .btn-warning { 65 | .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border); 66 | } 67 | // Danger and error appear as red 68 | .btn-danger { 69 | .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border); 70 | } 71 | // Success appears as green 72 | .btn-success { 73 | .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border); 74 | } 75 | // Info appears as blue-green 76 | .btn-info { 77 | .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border); 78 | } 79 | 80 | 81 | // Link buttons 82 | // ------------------------- 83 | 84 | // Make a button look and behave like a link 85 | .btn-link { 86 | color: @link-color; 87 | font-weight: normal; 88 | cursor: pointer; 89 | border-radius: 0; 90 | 91 | &, 92 | &:active, 93 | &[disabled], 94 | fieldset[disabled] & { 95 | background-color: transparent; 96 | .box-shadow(none); 97 | } 98 | &, 99 | &:hover, 100 | &:focus, 101 | &:active { 102 | border-color: transparent; 103 | } 104 | &:hover, 105 | &:focus { 106 | color: @link-hover-color; 107 | text-decoration: underline; 108 | background-color: transparent; 109 | } 110 | &[disabled], 111 | fieldset[disabled] & { 112 | &:hover, 113 | &:focus { 114 | color: @btn-link-disabled-color; 115 | text-decoration: none; 116 | } 117 | } 118 | } 119 | 120 | 121 | // Button Sizes 122 | // -------------------------------------------------- 123 | 124 | .btn-lg { 125 | // line-height: ensure even-numbered height of button next to large input 126 | .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large); 127 | } 128 | .btn-sm, 129 | .btn-xs { 130 | // line-height: ensure proper height of button next to small input 131 | .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small); 132 | } 133 | .btn-xs { 134 | padding: 1px 5px; 135 | } 136 | 137 | 138 | // Block button 139 | // -------------------------------------------------- 140 | 141 | .btn-block { 142 | display: block; 143 | width: 100%; 144 | padding-left: 0; 145 | padding-right: 0; 146 | } 147 | 148 | // Vertically space out multiple block buttons 149 | .btn-block + .btn-block { 150 | margin-top: 5px; 151 | } 152 | 153 | // Specificity overrides 154 | input[type="submit"], 155 | input[type="reset"], 156 | input[type="button"] { 157 | &.btn-block { 158 | width: 100%; 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/carousel.less: -------------------------------------------------------------------------------- 1 | // 2 | // Carousel 3 | // -------------------------------------------------- 4 | 5 | 6 | // Wrapper for the slide container and indicators 7 | .carousel { 8 | position: relative; 9 | } 10 | 11 | .carousel-inner { 12 | position: relative; 13 | overflow: hidden; 14 | width: 100%; 15 | 16 | > .item { 17 | display: none; 18 | position: relative; 19 | .transition(.6s ease-in-out left); 20 | 21 | // Account for jankitude on images 22 | > img, 23 | > a > img { 24 | .img-responsive(); 25 | line-height: 1; 26 | } 27 | } 28 | 29 | > .active, 30 | > .next, 31 | > .prev { display: block; } 32 | 33 | > .active { 34 | left: 0; 35 | } 36 | 37 | > .next, 38 | > .prev { 39 | position: absolute; 40 | top: 0; 41 | width: 100%; 42 | } 43 | 44 | > .next { 45 | left: 100%; 46 | } 47 | > .prev { 48 | left: -100%; 49 | } 50 | > .next.left, 51 | > .prev.right { 52 | left: 0; 53 | } 54 | 55 | > .active.left { 56 | left: -100%; 57 | } 58 | > .active.right { 59 | left: 100%; 60 | } 61 | 62 | } 63 | 64 | // Left/right controls for nav 65 | // --------------------------- 66 | 67 | .carousel-control { 68 | position: absolute; 69 | top: 0; 70 | left: 0; 71 | bottom: 0; 72 | width: @carousel-control-width; 73 | .opacity(@carousel-control-opacity); 74 | font-size: @carousel-control-font-size; 75 | color: @carousel-control-color; 76 | text-align: center; 77 | text-shadow: @carousel-text-shadow; 78 | // We can't have this transition here because webkit cancels the carousel 79 | // animation if you trip this while in the middle of another animation. 80 | 81 | // Set gradients for backgrounds 82 | &.left { 83 | #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001)); 84 | } 85 | &.right { 86 | left: auto; 87 | right: 0; 88 | #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5)); 89 | } 90 | 91 | // Hover/focus state 92 | &:hover, 93 | &:focus { 94 | color: @carousel-control-color; 95 | text-decoration: none; 96 | .opacity(.9); 97 | } 98 | 99 | // Toggles 100 | .icon-prev, 101 | .icon-next, 102 | .glyphicon-chevron-left, 103 | .glyphicon-chevron-right { 104 | position: absolute; 105 | top: 50%; 106 | left: 50%; 107 | z-index: 5; 108 | display: inline-block; 109 | } 110 | .icon-prev, 111 | .icon-next { 112 | width: 20px; 113 | height: 20px; 114 | margin-top: -10px; 115 | margin-left: -10px; 116 | font-family: serif; 117 | } 118 | 119 | .icon-prev { 120 | &:before { 121 | content: '\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039) 122 | } 123 | } 124 | .icon-next { 125 | &:before { 126 | content: '\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A) 127 | } 128 | } 129 | } 130 | 131 | // Optional indicator pips 132 | // 133 | // Add an unordered list with the following class and add a list item for each 134 | // slide your carousel holds. 135 | 136 | .carousel-indicators { 137 | position: absolute; 138 | bottom: 10px; 139 | left: 50%; 140 | z-index: 15; 141 | width: 60%; 142 | margin-left: -30%; 143 | padding-left: 0; 144 | list-style: none; 145 | text-align: center; 146 | 147 | li { 148 | display: inline-block; 149 | width: 10px; 150 | height: 10px; 151 | margin: 1px; 152 | text-indent: -999px; 153 | border: 1px solid @carousel-indicator-border-color; 154 | border-radius: 10px; 155 | cursor: pointer; 156 | } 157 | .active { 158 | margin: 0; 159 | width: 12px; 160 | height: 12px; 161 | background-color: @carousel-indicator-active-bg; 162 | } 163 | } 164 | 165 | // Optional captions 166 | // ----------------------------- 167 | // Hidden by default for smaller viewports 168 | .carousel-caption { 169 | position: absolute; 170 | left: 15%; 171 | right: 15%; 172 | bottom: 20px; 173 | z-index: 10; 174 | padding-top: 20px; 175 | padding-bottom: 20px; 176 | color: @carousel-caption-color; 177 | text-align: center; 178 | text-shadow: @carousel-text-shadow; 179 | & .btn { 180 | text-shadow: none; // No shadow for button elements in carousel-caption 181 | } 182 | } 183 | 184 | 185 | // Scale up controls for tablets and up 186 | @media screen and (min-width: @screen-tablet) { 187 | 188 | // Scale up the controls a smidge 189 | .carousel-control .icon-prev, 190 | .carousel-control .icon-next { 191 | width: 30px; 192 | height: 30px; 193 | margin-top: -15px; 194 | margin-left: -15px; 195 | font-size: 30px; 196 | } 197 | 198 | // Show and left align the captions 199 | .carousel-caption { 200 | left: 20%; 201 | right: 20%; 202 | padding-bottom: 30px; 203 | } 204 | 205 | // Move up the indicators 206 | .carousel-indicators { 207 | bottom: 20px; 208 | } 209 | } 210 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | button& { 27 | padding: 0; 28 | cursor: pointer; 29 | background: transparent; 30 | border: 0; 31 | -webkit-appearance: none; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and blocK) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | pre { 9 | font-family: @font-family-monospace; 10 | } 11 | 12 | // Inline code 13 | code { 14 | padding: 2px 4px; 15 | font-size: 90%; 16 | color: @code-color; 17 | background-color: @code-bg; 18 | white-space: nowrap; 19 | border-radius: @border-radius-base; 20 | } 21 | 22 | // Blocks of code 23 | pre { 24 | display: block; 25 | padding: ((@line-height-computed - 1) / 2); 26 | margin: 0 0 (@line-height-computed / 2); 27 | font-size: (@font-size-base - 1); // 14px to 13px 28 | line-height: @line-height-base; 29 | word-break: break-all; 30 | word-wrap: break-word; 31 | color: @pre-color; 32 | background-color: @pre-bg; 33 | border: 1px solid @pre-border-color; 34 | border-radius: @border-radius-base; 35 | 36 | // Make prettyprint styles more spaced out for readability 37 | &.prettyprint { 38 | margin-bottom: @line-height-computed; 39 | } 40 | 41 | // Account for some code outputs that place code tags in pre tags 42 | code { 43 | padding: 0; 44 | font-size: inherit; 45 | color: inherit; 46 | white-space: pre-wrap; 47 | background-color: transparent; 48 | border: 0; 49 | } 50 | } 51 | 52 | // Enable scrollable blocks of code 53 | .pre-scrollable { 54 | max-height: @pre-scrollable-max-height; 55 | overflow-y: scroll; 56 | } 57 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twitter/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | &.in { 21 | display: block; 22 | } 23 | } 24 | .collapsing { 25 | position: relative; 26 | height: 0; 27 | overflow: hidden; 28 | .transition(height .35s ease); 29 | } 30 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/dropdowns.less: -------------------------------------------------------------------------------- 1 | // 2 | // Dropdown menus 3 | // -------------------------------------------------- 4 | 5 | 6 | // Dropdown arrow/caret 7 | .caret { 8 | display: inline-block; 9 | width: 0; 10 | height: 0; 11 | margin-left: 2px; 12 | vertical-align: middle; 13 | border-top: @caret-width-base solid @dropdown-caret-color; 14 | border-right: @caret-width-base solid transparent; 15 | border-left: @caret-width-base solid transparent; 16 | // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once fixed, 17 | // we can just straight up remove this. 18 | border-bottom: 0 dotted; 19 | content: ""; 20 | } 21 | 22 | // The dropdown wrapper (div) 23 | .dropdown { 24 | position: relative; 25 | } 26 | 27 | // Prevent the focus on the dropdown toggle when closing dropdowns 28 | .dropdown-toggle:focus { 29 | outline: 0; 30 | } 31 | 32 | // The dropdown menu (ul) 33 | .dropdown-menu { 34 | position: absolute; 35 | top: 100%; 36 | left: 0; 37 | z-index: @zindex-dropdown; 38 | display: none; // none by default, but block on "open" of the menu 39 | float: left; 40 | min-width: 160px; 41 | padding: 5px 0; 42 | margin: 2px 0 0; // override default ul 43 | list-style: none; 44 | font-size: @font-size-base; 45 | background-color: @dropdown-bg; 46 | border: 1px solid @dropdown-fallback-border; // IE8 fallback 47 | border: 1px solid @dropdown-border; 48 | border-radius: @border-radius-base; 49 | .box-shadow(0 6px 12px rgba(0,0,0,.175)); 50 | background-clip: padding-box; 51 | 52 | // Aligns the dropdown menu to right 53 | &.pull-right { 54 | right: 0; 55 | left: auto; 56 | } 57 | 58 | // Dividers (basically an hr) within the dropdown 59 | .divider { 60 | .nav-divider(@dropdown-divider-bg); 61 | } 62 | 63 | // Links within the dropdown menu 64 | > li > a { 65 | display: block; 66 | padding: 3px 20px; 67 | clear: both; 68 | font-weight: normal; 69 | line-height: @line-height-base; 70 | color: @dropdown-link-color; 71 | white-space: nowrap; // prevent links from randomly breaking onto new lines 72 | } 73 | } 74 | 75 | // Hover/Focus state 76 | .dropdown-menu > li > a { 77 | &:hover, 78 | &:focus { 79 | text-decoration: none; 80 | color: @dropdown-link-hover-color; 81 | background-color: @dropdown-link-hover-bg; 82 | } 83 | } 84 | 85 | // Active state 86 | .dropdown-menu > .active > a { 87 | &, 88 | &:hover, 89 | &:focus { 90 | color: @dropdown-link-active-color; 91 | text-decoration: none; 92 | outline: 0; 93 | background-color: @dropdown-link-active-bg; 94 | } 95 | } 96 | 97 | // Disabled state 98 | // 99 | // Gray out text and ensure the hover/focus state remains gray 100 | 101 | .dropdown-menu > .disabled > a { 102 | &, 103 | &:hover, 104 | &:focus { 105 | color: @dropdown-link-disabled-color; 106 | } 107 | } 108 | // Nuke hover/focus effects 109 | .dropdown-menu > .disabled > a { 110 | &:hover, 111 | &:focus { 112 | text-decoration: none; 113 | background-color: transparent; 114 | background-image: none; // Remove CSS gradient 115 | .reset-filter(); 116 | cursor: not-allowed; 117 | } 118 | } 119 | 120 | // Open state for the dropdown 121 | .open { 122 | // Show the menu 123 | > .dropdown-menu { 124 | display: block; 125 | } 126 | 127 | // Remove the outline when :focus is triggered 128 | > a { 129 | outline: 0; 130 | } 131 | } 132 | 133 | // Dropdown section headers 134 | .dropdown-header { 135 | display: block; 136 | padding: 3px 20px; 137 | font-size: @font-size-small; 138 | line-height: @line-height-base; 139 | color: @dropdown-header-color; 140 | } 141 | 142 | // Backdrop to catch body clicks on mobile, etc. 143 | .dropdown-backdrop { 144 | position: fixed; 145 | left: 0; 146 | right: 0; 147 | bottom: 0; 148 | top: 0; 149 | z-index: @zindex-dropdown - 10; 150 | } 151 | 152 | // Right aligned dropdowns 153 | .pull-right > .dropdown-menu { 154 | right: 0; 155 | left: auto; 156 | } 157 | 158 | // Allow for dropdowns to go bottom up (aka, dropup-menu) 159 | // 160 | // Just add .dropup after the standard .dropdown class and you're set, bro. 161 | // TODO: abstract this so that the navbar fixed styles are not placed here? 162 | 163 | .dropup, 164 | .navbar-fixed-bottom .dropdown { 165 | // Reverse the caret 166 | .caret { 167 | // Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once this 168 | // gets fixed, restore `border-top: 0;`. 169 | border-top: 0 dotted; 170 | border-bottom: 4px solid @dropdown-caret-color; 171 | content: ""; 172 | } 173 | // Different positioning for bottom up menu 174 | .dropdown-menu { 175 | top: auto; 176 | bottom: 100%; 177 | margin-bottom: 1px; 178 | } 179 | } 180 | 181 | 182 | // Component alignment 183 | // 184 | // Reiterate per navbar.less and the modified component alignment there. 185 | 186 | @media (min-width: @grid-float-breakpoint) { 187 | .navbar-right { 188 | .dropdown-menu { 189 | .pull-right > .dropdown-menu(); 190 | } 191 | } 192 | } 193 | 194 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/input-groups.less: -------------------------------------------------------------------------------- 1 | // 2 | // Input groups 3 | // -------------------------------------------------- 4 | 5 | // Base styles 6 | // ------------------------- 7 | .input-group { 8 | position: relative; // For dropdowns 9 | display: table; 10 | border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table 11 | 12 | // Undo padding and float of grid classes 13 | &.col { 14 | float: none; 15 | padding-left: 0; 16 | padding-right: 0; 17 | } 18 | 19 | .form-control { 20 | width: 100%; 21 | margin-bottom: 0; 22 | } 23 | } 24 | 25 | // Sizing options 26 | // 27 | // Remix the default form control sizing classes into new ones for easier 28 | // manipulation. 29 | 30 | .input-group-lg > .form-control, 31 | .input-group-lg > .input-group-addon, 32 | .input-group-lg > .input-group-btn > .btn { .input-lg(); } 33 | .input-group-sm > .form-control, 34 | .input-group-sm > .input-group-addon, 35 | .input-group-sm > .input-group-btn > .btn { .input-sm(); } 36 | 37 | 38 | // Display as table-cell 39 | // ------------------------- 40 | .input-group-addon, 41 | .input-group-btn, 42 | .input-group .form-control { 43 | display: table-cell; 44 | 45 | &:not(:first-child):not(:last-child) { 46 | border-radius: 0; 47 | } 48 | } 49 | // Addon and addon wrapper for buttons 50 | .input-group-addon, 51 | .input-group-btn { 52 | width: 1%; 53 | white-space: nowrap; 54 | vertical-align: middle; // Match the inputs 55 | } 56 | 57 | // Text input groups 58 | // ------------------------- 59 | .input-group-addon { 60 | padding: @padding-base-vertical @padding-base-horizontal; 61 | font-size: @font-size-base; 62 | font-weight: normal; 63 | line-height: 1; 64 | text-align: center; 65 | background-color: @input-group-addon-bg; 66 | border: 1px solid @input-group-addon-border-color; 67 | border-radius: @border-radius-base; 68 | 69 | // Sizing 70 | &.input-sm { 71 | padding: @padding-small-vertical @padding-small-horizontal; 72 | font-size: @font-size-small; 73 | border-radius: @border-radius-small; 74 | } 75 | &.input-lg { 76 | padding: @padding-large-vertical @padding-large-horizontal; 77 | font-size: @font-size-large; 78 | border-radius: @border-radius-large; 79 | } 80 | 81 | // Nuke default margins from checkboxes and radios to vertically center within. 82 | input[type="radio"], 83 | input[type="checkbox"] { 84 | margin-top: 0; 85 | } 86 | } 87 | 88 | // Reset rounded corners 89 | .input-group .form-control:first-child, 90 | .input-group-addon:first-child, 91 | .input-group-btn:first-child > .btn, 92 | .input-group-btn:first-child > .dropdown-toggle, 93 | .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { 94 | .border-right-radius(0); 95 | } 96 | .input-group-addon:first-child { 97 | border-right: 0; 98 | } 99 | .input-group .form-control:last-child, 100 | .input-group-addon:last-child, 101 | .input-group-btn:last-child > .btn, 102 | .input-group-btn:last-child > .dropdown-toggle, 103 | .input-group-btn:first-child > .btn:not(:first-child) { 104 | .border-left-radius(0); 105 | } 106 | .input-group-addon:last-child { 107 | border-left: 0; 108 | } 109 | 110 | // Button input groups 111 | // ------------------------- 112 | .input-group-btn { 113 | position: relative; 114 | white-space: nowrap; 115 | } 116 | .input-group-btn > .btn { 117 | position: relative; 118 | // Jankily prevent input button groups from wrapping 119 | + .btn { 120 | margin-left: -4px; 121 | } 122 | // Bring the "active" button to the front 123 | &:hover, 124 | &:active { 125 | z-index: 2; 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: @jumbotron-padding; 8 | margin-bottom: @jumbotron-padding; 9 | font-size: (@font-size-base * 1.5); 10 | font-weight: 200; 11 | line-height: (@line-height-base * 1.5); 12 | color: @jumbotron-color; 13 | background-color: @jumbotron-bg; 14 | 15 | h1 { 16 | line-height: 1; 17 | color: @jumbotron-heading-color; 18 | } 19 | p { 20 | line-height: 1.4; 21 | } 22 | 23 | .container & { 24 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 25 | } 26 | 27 | @media screen and (min-width: @screen-tablet) { 28 | padding-top: (@jumbotron-padding * 1.6); 29 | padding-bottom: (@jumbotron-padding * 1.6); 30 | 31 | .container & { 32 | padding-left: (@jumbotron-padding * 2); 33 | padding-right: (@jumbotron-padding * 2); 34 | } 35 | 36 | h1 { 37 | font-size: (@font-size-base * 4.5); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | &[href] { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | } 32 | 33 | // Colors 34 | // Contextual variations (linked labels get darker on :hover) 35 | 36 | .label-default { 37 | .label-variant(@label-default-bg); 38 | } 39 | 40 | .label-primary { 41 | .label-variant(@label-primary-bg); 42 | } 43 | 44 | .label-success { 45 | .label-variant(@label-success-bg); 46 | } 47 | 48 | .label-info { 49 | .label-variant(@label-info-bg); 50 | } 51 | 52 | .label-warning { 53 | .label-variant(@label-warning-bg); 54 | } 55 | 56 | .label-danger { 57 | .label-variant(@label-danger-bg); 58 | } 59 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/list-group.less: -------------------------------------------------------------------------------- 1 | // 2 | // List groups 3 | // -------------------------------------------------- 4 | 5 | // Base class 6 | // 7 | // Easily usable on
    ,
      , or
      . 8 | .list-group { 9 | // No need to set list-style: none; since .list-group-item is block level 10 | margin-bottom: 20px; 11 | padding-left: 0; // reset padding because ul and ol 12 | } 13 | 14 | // Individual list items 15 | // ------------------------- 16 | 17 | .list-group-item { 18 | position: relative; 19 | display: block; 20 | padding: 10px 15px; 21 | // Place the border on the list items and negative margin up for better styling 22 | margin-bottom: -1px; 23 | background-color: @list-group-bg; 24 | border: 1px solid @list-group-border; 25 | 26 | // Round the first and last items 27 | &:first-child { 28 | .border-top-radius(@list-group-border-radius); 29 | } 30 | &:last-child { 31 | margin-bottom: 0; 32 | .border-bottom-radius(@list-group-border-radius); 33 | } 34 | 35 | // Align badges within list items 36 | > .badge { 37 | float: right; 38 | } 39 | > .badge + .badge { 40 | margin-right: 5px; 41 | } 42 | 43 | // Linked list items 44 | a& { 45 | color: @list-group-link-color; 46 | 47 | .list-group-item-heading { 48 | color: @list-group-link-heading-color; 49 | } 50 | 51 | // Hover state 52 | &:hover, 53 | &:focus { 54 | text-decoration: none; 55 | background-color: @list-group-hover-bg; 56 | } 57 | } 58 | 59 | // Active class on item itself, not parent 60 | &.active, 61 | &.active:hover, 62 | &.active:focus { 63 | z-index: 2; // Place active items above their siblings for proper border styling 64 | color: @list-group-active-color; 65 | background-color: @list-group-active-bg; 66 | border-color: @list-group-active-border; 67 | 68 | // Force color to inherit for custom content 69 | .list-group-item-heading { 70 | color: inherit; 71 | } 72 | .list-group-item-text { 73 | color: lighten(@list-group-active-bg, 40%); 74 | } 75 | } 76 | } 77 | 78 | // Custom content options 79 | // ------------------------- 80 | 81 | .list-group-item-heading { 82 | margin-top: 0; 83 | margin-bottom: 5px; 84 | } 85 | .list-group-item-text { 86 | margin-bottom: 0; 87 | line-height: 1.3; 88 | } 89 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/media.less: -------------------------------------------------------------------------------- 1 | // Media objects 2 | // Source: http://stubbornella.org/content/?p=497 3 | // -------------------------------------------------- 4 | 5 | 6 | // Common styles 7 | // ------------------------- 8 | 9 | // Clear the floats 10 | .media, 11 | .media-body { 12 | overflow: hidden; 13 | zoom: 1; 14 | } 15 | 16 | // Proper spacing between instances of .media 17 | .media, 18 | .media .media { 19 | margin-top: 15px; 20 | } 21 | .media:first-child { 22 | margin-top: 0; 23 | } 24 | 25 | // For images and videos, set to block 26 | .media-object { 27 | display: block; 28 | } 29 | 30 | // Reset margins on headings for tighter default spacing 31 | .media-heading { 32 | margin: 0 0 5px; 33 | } 34 | 35 | 36 | // Media image alignment 37 | // ------------------------- 38 | 39 | .media { 40 | > .pull-left { 41 | margin-right: 10px; 42 | } 43 | > .pull-right { 44 | margin-left: 10px; 45 | } 46 | } 47 | 48 | 49 | // Media list variation 50 | // ------------------------- 51 | 52 | // Undo default ul/ol styles 53 | .media-list { 54 | padding-left: 0; 55 | list-style: none; 56 | } 57 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/modals.less: -------------------------------------------------------------------------------- 1 | // 2 | // Modals 3 | // -------------------------------------------------- 4 | 5 | // .modal-open - body class for killing the scroll 6 | // .modal - container to scroll within 7 | // .modal-dialog - positioning shell for the actual modal 8 | // .modal-content - actual modal w/ bg and corners and shit 9 | 10 | // Kill the scroll on the body 11 | .modal-open { 12 | overflow: hidden; 13 | 14 | 15 | // Account for hiding of scrollbar 16 | body&, 17 | .navbar-fixed-top, 18 | .navbar-fixed-bottom { 19 | margin-right: 15px 20 | } 21 | } 22 | 23 | // Container that the modal scrolls within 24 | .modal { 25 | display: none; 26 | overflow: auto; 27 | overflow-y: scroll; 28 | position: fixed; 29 | top: 0; 30 | right: 0; 31 | bottom: 0; 32 | left: 0; 33 | z-index: @zindex-modal-background; 34 | 35 | // When fading in the modal, animate it to slide down 36 | &.fade .modal-dialog { 37 | .translate(0, -25%); 38 | .transition-transform(~"0.3s ease-out"); 39 | } 40 | &.in .modal-dialog { .translate(0, 0)} 41 | } 42 | 43 | // Shell div to position the modal with bottom padding 44 | .modal-dialog { 45 | margin-left: auto; 46 | margin-right: auto; 47 | width: auto; 48 | padding: 10px; 49 | z-index: (@zindex-modal-background + 10); 50 | } 51 | 52 | // Actual modal 53 | .modal-content { 54 | position: relative; 55 | background-color: @modal-content-bg; 56 | border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc) 57 | border: 1px solid @modal-content-border-color; 58 | border-radius: @border-radius-large; 59 | .box-shadow(0 3px 9px rgba(0,0,0,.5)); 60 | background-clip: padding-box; 61 | // Remove focus outline from opened modal 62 | outline: none; 63 | } 64 | 65 | // Modal background 66 | .modal-backdrop { 67 | position: fixed; 68 | top: 0; 69 | right: 0; 70 | bottom: 0; 71 | left: 0; 72 | z-index: (@zindex-modal-background - 10); 73 | background-color: @modal-backdrop-bg; 74 | // Fade for backdrop 75 | &.fade { .opacity(0); } 76 | &.in { .opacity(.5); } 77 | } 78 | 79 | // Modal header 80 | // Top section of the modal w/ title and dismiss 81 | .modal-header { 82 | padding: @modal-title-padding; 83 | border-bottom: 1px solid @modal-header-border-color; 84 | min-height: (@modal-title-padding + @modal-title-line-height); 85 | } 86 | // Close icon 87 | .modal-header .close { 88 | margin-top: -2px; 89 | } 90 | 91 | // Title text within header 92 | .modal-title { 93 | margin: 0; 94 | line-height: @modal-title-line-height; 95 | } 96 | 97 | // Modal body 98 | // Where all modal content resides (sibling of .modal-header and .modal-footer) 99 | .modal-body { 100 | position: relative; 101 | padding: @modal-inner-padding; 102 | } 103 | 104 | // Footer (for actions) 105 | .modal-footer { 106 | margin-top: 15px; 107 | padding: (@modal-inner-padding - 1) @modal-inner-padding @modal-inner-padding; 108 | text-align: right; // right align buttons 109 | border-top: 1px solid @modal-footer-border-color; 110 | .clearfix(); // clear it in case folks use .pull-* classes on buttons 111 | 112 | // Properly space out buttons 113 | .btn + .btn { 114 | margin-left: 5px; 115 | margin-bottom: 0; // account for input[type="submit"] which gets the bottom margin like all other inputs 116 | } 117 | // but override that for button groups 118 | .btn-group .btn + .btn { 119 | margin-left: -1px; 120 | } 121 | // and override it for block buttons as well 122 | .btn-block + .btn-block { 123 | margin-left: 0; 124 | } 125 | } 126 | 127 | // Scale up the modal 128 | @media screen and (min-width: @screen-tablet) { 129 | 130 | .modal-dialog { 131 | left: 50%; 132 | right: auto; 133 | width: 600px; 134 | padding-top: 30px; 135 | padding-bottom: 30px; 136 | } 137 | .modal-content { 138 | .box-shadow(0 5px 15px rgba(0,0,0,.5)); 139 | } 140 | 141 | } 142 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/navs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Navs 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | // -------------------------------------------------- 8 | 9 | .nav { 10 | margin-bottom: 0; 11 | padding-left: 0; // Override default ul/ol 12 | list-style: none; 13 | .clearfix(); 14 | 15 | > li { 16 | position: relative; 17 | display: block; 18 | 19 | > a { 20 | position: relative; 21 | display: block; 22 | padding: @nav-link-padding; 23 | &:hover, 24 | &:focus { 25 | text-decoration: none; 26 | background-color: @nav-link-hover-bg; 27 | } 28 | } 29 | 30 | // Disabled state sets text to gray and nukes hover/tab effects 31 | &.disabled > a { 32 | color: @nav-disabled-link-color; 33 | 34 | &:hover, 35 | &:focus { 36 | color: @nav-disabled-link-hover-color; 37 | text-decoration: none; 38 | background-color: transparent; 39 | cursor: not-allowed; 40 | } 41 | } 42 | } 43 | 44 | // Open dropdowns 45 | .open > a { 46 | &, 47 | &:hover, 48 | &:focus { 49 | background-color: @nav-link-hover-bg; 50 | border-color: @link-color; 51 | } 52 | } 53 | 54 | // Dividers (basically an hr) within the dropdown 55 | .nav-divider { 56 | .nav-divider(); 57 | } 58 | 59 | // Prevent IE8 from misplacing imgs 60 | // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989 61 | > li > a > img { 62 | max-width: none; 63 | } 64 | } 65 | 66 | 67 | // Tabs 68 | // ------------------------- 69 | 70 | // Give the tabs something to sit on 71 | .nav-tabs { 72 | border-bottom: 1px solid @nav-tabs-border-color; 73 | > li { 74 | float: left; 75 | // Make the list-items overlay the bottom border 76 | margin-bottom: -1px; 77 | 78 | // Actual tabs (as links) 79 | > a { 80 | margin-right: 2px; 81 | line-height: @line-height-base; 82 | border: 1px solid transparent; 83 | border-radius: @border-radius-base @border-radius-base 0 0; 84 | &:hover { 85 | border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color; 86 | } 87 | } 88 | 89 | // Active state, and it's :hover to override normal :hover 90 | &.active > a { 91 | &, 92 | &:hover, 93 | &:focus { 94 | color: @nav-tabs-active-link-hover-color; 95 | background-color: @nav-tabs-active-link-hover-bg; 96 | border: 1px solid @nav-tabs-active-link-hover-border-color; 97 | border-bottom-color: transparent; 98 | cursor: default; 99 | } 100 | } 101 | } 102 | // pulling this in mainly for less shorthand 103 | &.nav-justified { 104 | .nav-justified(); 105 | .nav-tabs-justified(); 106 | } 107 | } 108 | 109 | 110 | // Pills 111 | // ------------------------- 112 | .nav-pills { 113 | > li { 114 | float: left; 115 | 116 | // Links rendered as pills 117 | > a { 118 | border-radius: 5px; 119 | } 120 | + li { 121 | margin-left: 2px; 122 | } 123 | 124 | // Active state 125 | &.active > a { 126 | &, 127 | &:hover, 128 | &:focus { 129 | color: @nav-pills-active-link-hover-color; 130 | background-color: @nav-pills-active-link-hover-bg; 131 | } 132 | } 133 | } 134 | } 135 | 136 | 137 | // Stacked pills 138 | .nav-stacked { 139 | > li { 140 | float: none; 141 | + li { 142 | margin-top: 2px; 143 | margin-left: 0; // no need for this gap between nav items 144 | } 145 | } 146 | } 147 | 148 | 149 | // Nav variations 150 | // -------------------------------------------------- 151 | 152 | // Justified nav links 153 | // ------------------------- 154 | 155 | .nav-justified { 156 | width: 100%; 157 | 158 | > li { 159 | float: none; 160 | > a { 161 | text-align: center; 162 | } 163 | } 164 | 165 | @media (min-width: @screen-sm) { 166 | > li { 167 | display: table-cell; 168 | width: 1%; 169 | } 170 | } 171 | } 172 | 173 | // Move borders to anchors instead of bottom of list 174 | .nav-tabs-justified { 175 | border-bottom: 0; 176 | > li > a { 177 | border-bottom: 1px solid @nav-tabs-justified-link-border-color; 178 | 179 | // Override margin from .nav-tabs 180 | margin-right: 0; 181 | } 182 | > .active > a { 183 | border-bottom-color: @nav-tabs-justified-active-link-border-color; 184 | } 185 | } 186 | 187 | 188 | // Tabbable tabs 189 | // ------------------------- 190 | 191 | // Clear any floats 192 | .tabbable { 193 | .clearfix(); 194 | } 195 | 196 | // Show/hide tabbable areas 197 | .tab-content > .tab-pane, 198 | .pill-content > .pill-pane { 199 | display: none; 200 | } 201 | .tab-content, 202 | .pill-content { 203 | > .active { 204 | display: block; 205 | } 206 | } 207 | 208 | 209 | 210 | // Dropdowns 211 | // ------------------------- 212 | 213 | // Make dropdown carets use link color in navs 214 | .nav .caret { 215 | border-top-color: @link-color; 216 | border-bottom-color: @link-color; 217 | } 218 | .nav a:hover .caret { 219 | border-top-color: @link-hover-color; 220 | border-bottom-color: @link-hover-color; 221 | } 222 | 223 | // Specific dropdowns 224 | .nav-tabs .dropdown-menu { 225 | // make dropdown border overlap tab border 226 | margin-top: -1px; 227 | // Remove the top rounded corners here since there is a hard edge above the menu 228 | .border-top-radius(0); 229 | } 230 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: @line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | .clearfix(); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: @pagination-bg; 19 | border: 1px solid @pagination-border; 20 | border-radius: @pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: @pagination-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: @pager-disabled-color; 50 | background-color: @pagination-bg; 51 | cursor: not-allowed; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/pagination.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pagination (multiple pages) 3 | // -------------------------------------------------- 4 | .pagination { 5 | display: inline-block; 6 | padding-left: 0; 7 | margin: @line-height-computed 0; 8 | border-radius: @border-radius-base; 9 | 10 | > li { 11 | display: inline; // Remove list-style and block-level defaults 12 | > a, 13 | > span { 14 | position: relative; 15 | float: left; // Collapse white-space 16 | padding: @padding-base-vertical @padding-base-horizontal; 17 | line-height: @line-height-base; 18 | text-decoration: none; 19 | background-color: @pagination-bg; 20 | border: 1px solid @pagination-border; 21 | margin-left: -1px; 22 | } 23 | &:first-child { 24 | > a, 25 | > span { 26 | margin-left: 0; 27 | .border-left-radius(@border-radius-base); 28 | } 29 | } 30 | &:last-child { 31 | > a, 32 | > span { 33 | .border-right-radius(@border-radius-base); 34 | } 35 | } 36 | } 37 | 38 | > li > a, 39 | > li > span { 40 | &:hover, 41 | &:focus { 42 | background-color: @pagination-hover-bg; 43 | } 44 | } 45 | 46 | > .active > a, 47 | > .active > span { 48 | &, 49 | &:hover, 50 | &:focus { 51 | z-index: 2; 52 | color: @pagination-active-color; 53 | background-color: @pagination-active-bg; 54 | border-color: @pagination-active-bg; 55 | cursor: default; 56 | } 57 | } 58 | 59 | > .disabled { 60 | > span, 61 | > a, 62 | > a:hover, 63 | > a:focus { 64 | color: @pagination-disabled-color; 65 | background-color: @pagination-bg; 66 | border-color: @pagination-border; 67 | cursor: not-allowed; 68 | } 69 | } 70 | } 71 | 72 | // Sizing 73 | // -------------------------------------------------- 74 | 75 | // Large 76 | .pagination-lg { 77 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large); 78 | } 79 | 80 | // Small 81 | .pagination-sm { 82 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small); 83 | } 84 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/panels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Panels 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .panel { 8 | margin-bottom: @line-height-computed; 9 | background-color: @panel-bg; 10 | border: 1px solid transparent; 11 | border-radius: @panel-border-radius; 12 | .box-shadow(0 1px 1px rgba(0,0,0,.05)); 13 | } 14 | 15 | // Panel contents 16 | .panel-body { 17 | padding: 15px; 18 | .clearfix(); 19 | } 20 | 21 | 22 | // List groups in panels 23 | // 24 | // By default, space out list group content from panel headings to account for 25 | // any kind of custom content between the two. 26 | 27 | .panel { 28 | > .list-group { 29 | margin-bottom: 0; 30 | 31 | .list-group-item { 32 | border-width: 1px 0; 33 | 34 | // Remove border radius for top one 35 | &:first-child { 36 | .border-top-radius(0); 37 | } 38 | // But keep it for the last one 39 | &:last-child { 40 | border-bottom: 0; 41 | } 42 | } 43 | } 44 | } 45 | // Collapse space between when there's no additional content. 46 | .panel-heading + .list-group { 47 | .list-group-item:first-child { 48 | border-top-width: 0; 49 | } 50 | } 51 | 52 | 53 | // Tables in panels 54 | // 55 | // Place a non-bordered `.table` within a panel (not within a `.panel-body`) and 56 | // watch it go full width. 57 | 58 | .panel { 59 | > .table { 60 | margin-bottom: 0; 61 | } 62 | > .panel-body + .table { 63 | border-top: 1px solid @table-border-color; 64 | } 65 | } 66 | 67 | 68 | // Optional heading 69 | .panel-heading { 70 | padding: 10px 15px; 71 | border-bottom: 1px solid transparent; 72 | .border-top-radius(@panel-border-radius - 1); 73 | } 74 | 75 | // Within heading, strip any `h*` tag of it's default margins for spacing. 76 | .panel-title { 77 | margin-top: 0; 78 | margin-bottom: 0; 79 | font-size: ceil((@font-size-base * 1.125)); 80 | > a { 81 | color: inherit; 82 | } 83 | } 84 | 85 | // Optional footer (stays gray in every modifier class) 86 | .panel-footer { 87 | padding: 10px 15px; 88 | background-color: @panel-footer-bg; 89 | border-top: 1px solid @panel-inner-border; 90 | .border-bottom-radius(@panel-border-radius - 1); 91 | } 92 | 93 | 94 | // Collapsable panels (aka, accordion) 95 | // 96 | // Wrap a series of panels in `.panel-group` to turn them into an accordion with 97 | // the help of our collapse JavaScript plugin. 98 | 99 | .panel-group { 100 | // Tighten up margin so it's only between panels 101 | .panel { 102 | margin-bottom: 0; 103 | border-radius: @panel-border-radius; 104 | overflow: hidden; // crop contents when collapsed 105 | + .panel { 106 | margin-top: 5px; 107 | } 108 | } 109 | 110 | .panel-heading { 111 | border-bottom: 0; 112 | + .panel-collapse .panel-body { 113 | border-top: 1px solid @panel-inner-border; 114 | } 115 | } 116 | .panel-footer { 117 | border-top: 0; 118 | + .panel-collapse .panel-body { 119 | border-bottom: 1px solid @panel-inner-border; 120 | } 121 | } 122 | 123 | // New subcomponent for wrapping collapsable content for proper animations 124 | .panel-collapse { 125 | 126 | } 127 | } 128 | 129 | 130 | // Contextual variations 131 | .panel-default { 132 | .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border); 133 | } 134 | .panel-primary { 135 | .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border); 136 | } 137 | .panel-success { 138 | .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border); 139 | } 140 | .panel-warning { 141 | .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border); 142 | } 143 | .panel-danger { 144 | .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border); 145 | } 146 | .panel-info { 147 | .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border); 148 | } 149 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/popovers.less: -------------------------------------------------------------------------------- 1 | // 2 | // Popovers 3 | // -------------------------------------------------- 4 | 5 | 6 | .popover { 7 | position: absolute; 8 | top: 0; 9 | left: 0; 10 | z-index: @zindex-popover; 11 | display: none; 12 | max-width: @popover-max-width; 13 | padding: 1px; 14 | text-align: left; // Reset given new insertion method 15 | background-color: @popover-bg; 16 | background-clip: padding-box; 17 | border: 1px solid @popover-fallback-border-color; 18 | border: 1px solid @popover-border-color; 19 | border-radius: @border-radius-large; 20 | .box-shadow(0 5px 10px rgba(0,0,0,.2)); 21 | 22 | // Overrides for proper insertion 23 | white-space: normal; 24 | 25 | // Offset the popover to account for the popover arrow 26 | &.top { margin-top: -10px; } 27 | &.right { margin-left: 10px; } 28 | &.bottom { margin-top: 10px; } 29 | &.left { margin-left: -10px; } 30 | } 31 | 32 | .popover-title { 33 | margin: 0; // reset heading margin 34 | padding: 8px 14px; 35 | font-size: @font-size-base; 36 | font-weight: normal; 37 | line-height: 18px; 38 | background-color: @popover-title-bg; 39 | border-bottom: 1px solid darken(@popover-title-bg, 5%); 40 | border-radius: 5px 5px 0 0; 41 | } 42 | 43 | .popover-content { 44 | padding: 9px 14px; 45 | } 46 | 47 | // Arrows 48 | // 49 | // .arrow is outer, .arrow:after is inner 50 | 51 | .popover .arrow { 52 | &, 53 | &:after { 54 | position: absolute; 55 | display: block; 56 | width: 0; 57 | height: 0; 58 | border-color: transparent; 59 | border-style: solid; 60 | } 61 | } 62 | .popover .arrow { 63 | border-width: @popover-arrow-outer-width; 64 | } 65 | .popover .arrow:after { 66 | border-width: @popover-arrow-width; 67 | content: ""; 68 | } 69 | 70 | .popover { 71 | &.top .arrow { 72 | left: 50%; 73 | margin-left: -@popover-arrow-outer-width; 74 | border-bottom-width: 0; 75 | border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback 76 | border-top-color: @popover-arrow-outer-color; 77 | bottom: -@popover-arrow-outer-width; 78 | &:after { 79 | content: " "; 80 | bottom: 1px; 81 | margin-left: -@popover-arrow-width; 82 | border-bottom-width: 0; 83 | border-top-color: @popover-arrow-color; 84 | } 85 | } 86 | &.right .arrow { 87 | top: 50%; 88 | left: -@popover-arrow-outer-width; 89 | margin-top: -@popover-arrow-outer-width; 90 | border-left-width: 0; 91 | border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback 92 | border-right-color: @popover-arrow-outer-color; 93 | &:after { 94 | content: " "; 95 | left: 1px; 96 | bottom: -@popover-arrow-width; 97 | border-left-width: 0; 98 | border-right-color: @popover-arrow-color; 99 | } 100 | } 101 | &.bottom .arrow { 102 | left: 50%; 103 | margin-left: -@popover-arrow-outer-width; 104 | border-top-width: 0; 105 | border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback 106 | border-bottom-color: @popover-arrow-outer-color; 107 | top: -@popover-arrow-outer-width; 108 | &:after { 109 | content: " "; 110 | top: 1px; 111 | margin-left: -@popover-arrow-width; 112 | border-top-width: 0; 113 | border-bottom-color: @popover-arrow-color; 114 | } 115 | } 116 | 117 | &.left .arrow { 118 | top: 50%; 119 | right: -@popover-arrow-outer-width; 120 | margin-top: -@popover-arrow-outer-width; 121 | border-right-width: 0; 122 | border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback 123 | border-left-color: @popover-arrow-outer-color; 124 | &:after { 125 | content: " "; 126 | right: 1px; 127 | border-right-width: 0; 128 | border-left-color: @popover-arrow-color; 129 | bottom: -@popover-arrow-width; 130 | } 131 | } 132 | 133 | } 134 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/print.less: -------------------------------------------------------------------------------- 1 | // 2 | // Basic print styles 3 | // -------------------------------------------------- 4 | // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css 5 | 6 | @media print { 7 | 8 | * { 9 | text-shadow: none !important; 10 | color: #000 !important; // Black prints faster: h5bp.com/s 11 | background: transparent !important; 12 | box-shadow: none !important; 13 | } 14 | 15 | a, 16 | a:visited { 17 | text-decoration: underline; 18 | } 19 | 20 | a[href]:after { 21 | content: " (" attr(href) ")"; 22 | } 23 | 24 | abbr[title]:after { 25 | content: " (" attr(title) ")"; 26 | } 27 | 28 | // Don't show links for images, or javascript/internal links 29 | .ir a:after, 30 | a[href^="javascript:"]:after, 31 | a[href^="#"]:after { 32 | content: ""; 33 | } 34 | 35 | pre, 36 | blockquote { 37 | border: 1px solid #999; 38 | page-break-inside: avoid; 39 | } 40 | 41 | thead { 42 | display: table-header-group; // h5bp.com/t 43 | } 44 | 45 | tr, 46 | img { 47 | page-break-inside: avoid; 48 | } 49 | 50 | img { 51 | max-width: 100% !important; 52 | } 53 | 54 | @page { 55 | margin: 2cm .5cm; 56 | } 57 | 58 | p, 59 | h2, 60 | h3 { 61 | orphans: 3; 62 | widows: 3; 63 | } 64 | 65 | h2, 66 | h3 { 67 | page-break-after: avoid; 68 | } 69 | 70 | // Bootstrap components 71 | .navbar { 72 | display: none; 73 | } 74 | .table { 75 | td, 76 | th { 77 | background-color: #fff !important; 78 | } 79 | } 80 | .btn, 81 | .dropup > .btn { 82 | > .caret { 83 | border-top-color: #000 !important; 84 | } 85 | } 86 | .label { 87 | border: 1px solid #000; 88 | } 89 | 90 | .table { 91 | border-collapse: collapse !important; 92 | } 93 | .table-bordered { 94 | th, 95 | td { 96 | border: 1px solid #ddd !important; 97 | } 98 | } 99 | 100 | } 101 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/progress-bars.less: -------------------------------------------------------------------------------- 1 | // 2 | // Progress bars 3 | // -------------------------------------------------- 4 | 5 | 6 | // Bar animations 7 | // ------------------------- 8 | 9 | // Webkit 10 | @-webkit-keyframes progress-bar-stripes { 11 | from { background-position: 40px 0; } 12 | to { background-position: 0 0; } 13 | } 14 | 15 | // Firefox 16 | @-moz-keyframes progress-bar-stripes { 17 | from { background-position: 40px 0; } 18 | to { background-position: 0 0; } 19 | } 20 | 21 | // Opera 22 | @-o-keyframes progress-bar-stripes { 23 | from { background-position: 0 0; } 24 | to { background-position: 40px 0; } 25 | } 26 | 27 | // Spec and IE10+ 28 | @keyframes progress-bar-stripes { 29 | from { background-position: 40px 0; } 30 | to { background-position: 0 0; } 31 | } 32 | 33 | 34 | 35 | // Bar itself 36 | // ------------------------- 37 | 38 | // Outer container 39 | .progress { 40 | overflow: hidden; 41 | height: @line-height-computed; 42 | margin-bottom: @line-height-computed; 43 | background-color: @progress-bg; 44 | border-radius: @border-radius-base; 45 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); 46 | } 47 | 48 | // Bar of progress 49 | .progress-bar { 50 | float: left; 51 | width: 0%; 52 | height: 100%; 53 | font-size: @font-size-small; 54 | color: @progress-bar-color; 55 | text-align: center; 56 | background-color: @progress-bar-bg; 57 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); 58 | .transition(width .6s ease); 59 | } 60 | 61 | // Striped bars 62 | .progress-striped .progress-bar { 63 | #gradient > .striped(@progress-bar-bg); 64 | background-size: 40px 40px; 65 | } 66 | 67 | // Call animation for the active one 68 | .progress.active .progress-bar { 69 | -webkit-animation: progress-bar-stripes 2s linear infinite; 70 | -moz-animation: progress-bar-stripes 2s linear infinite; 71 | -ms-animation: progress-bar-stripes 2s linear infinite; 72 | -o-animation: progress-bar-stripes 2s linear infinite; 73 | animation: progress-bar-stripes 2s linear infinite; 74 | } 75 | 76 | 77 | 78 | // Variations 79 | // ------------------------- 80 | 81 | .progress-bar-success { 82 | .progress-bar-variant(@progress-bar-success-bg); 83 | } 84 | 85 | .progress-bar-info { 86 | .progress-bar-variant(@progress-bar-info-bg); 87 | } 88 | 89 | .progress-bar-warning { 90 | .progress-bar-variant(@progress-bar-warning-bg); 91 | } 92 | 93 | .progress-bar-danger { 94 | .progress-bar-variant(@progress-bar-danger-bg); 95 | } 96 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/scaffolding.less: -------------------------------------------------------------------------------- 1 | // 2 | // Scaffolding 3 | // -------------------------------------------------- 4 | 5 | 6 | // Reset the box-sizing 7 | 8 | *, 9 | *:before, 10 | *:after { 11 | .box-sizing(border-box); 12 | } 13 | 14 | 15 | // Body reset 16 | 17 | html { 18 | font-size: 62.5%; 19 | -webkit-tap-highlight-color: rgba(0,0,0,0); 20 | } 21 | 22 | body { 23 | font-family: @font-family-base; 24 | font-size: @font-size-base; 25 | line-height: @line-height-base; 26 | color: @text-color; 27 | background-color: @body-bg; 28 | } 29 | 30 | // Reset fonts for relevant elements 31 | input, 32 | button, 33 | select, 34 | textarea { 35 | font-family: inherit; 36 | font-size: inherit; 37 | line-height: inherit; 38 | } 39 | 40 | // Reset unusual Firefox-on-Android default style. 41 | // 42 | // See https://github.com/necolas/normalize.css/issues/214 43 | 44 | button, 45 | input, 46 | select[multiple], 47 | textarea { 48 | background-image: none; 49 | } 50 | 51 | 52 | // Links 53 | 54 | a { 55 | color: @link-color; 56 | text-decoration: none; 57 | 58 | &:hover, 59 | &:focus { 60 | color: @link-hover-color; 61 | text-decoration: underline; 62 | } 63 | 64 | &:focus { 65 | .tab-focus(); 66 | } 67 | } 68 | 69 | 70 | // Images 71 | 72 | img { 73 | vertical-align: middle; 74 | } 75 | 76 | // Responsive images (ensure images don't scale beyond their parents) 77 | .img-responsive { 78 | .img-responsive(); 79 | } 80 | 81 | // Rounded corners 82 | .img-rounded { 83 | border-radius: @border-radius-large; 84 | } 85 | 86 | // Image thumbnails 87 | // 88 | // Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`. 89 | .img-thumbnail { 90 | padding: @thumbnail-padding; 91 | line-height: @line-height-base; 92 | background-color: @thumbnail-bg; 93 | border: 1px solid @thumbnail-border; 94 | border-radius: @thumbnail-border-radius; 95 | .transition(all .2s ease-in-out); 96 | 97 | // Keep them at most 100% wide 98 | .img-responsive(inline-block); 99 | } 100 | 101 | // Perfect circle 102 | .img-circle { 103 | border-radius: 50%; // set radius in percents 104 | } 105 | 106 | 107 | // Horizontal rules 108 | 109 | hr { 110 | margin-top: @line-height-computed; 111 | margin-bottom: @line-height-computed; 112 | border: 0; 113 | border-top: 1px solid @hr-border; 114 | } 115 | 116 | 117 | // Only display content to screen readers 118 | // 119 | // See: http://a11yproject.com/posts/how-to-hide-content/ 120 | 121 | .sr-only { 122 | position: absolute; 123 | width: 1px; 124 | height: 1px; 125 | margin: -1px; 126 | padding: 0; 127 | overflow: hidden; 128 | clip: rect(0 0 0 0); 129 | border: 0; 130 | } 131 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/tables.less: -------------------------------------------------------------------------------- 1 | // 2 | // Tables 3 | // -------------------------------------------------- 4 | 5 | 6 | table { 7 | max-width: 100%; 8 | background-color: @table-bg; 9 | } 10 | th { 11 | text-align: left; 12 | } 13 | 14 | 15 | // Baseline styles 16 | 17 | .table { 18 | width: 100%; 19 | margin-bottom: @line-height-computed; 20 | // Cells 21 | thead, 22 | tbody, 23 | tfoot { 24 | > tr { 25 | > th, 26 | > td { 27 | padding: @table-cell-padding; 28 | line-height: @line-height-base; 29 | vertical-align: top; 30 | border-top: 1px solid @table-border-color; 31 | } 32 | } 33 | } 34 | // Bottom align for column headings 35 | thead > tr > th { 36 | vertical-align: bottom; 37 | border-bottom: 2px solid @table-border-color; 38 | } 39 | // Remove top border from thead by default 40 | caption + thead, 41 | colgroup + thead, 42 | thead:first-child { 43 | tr:first-child { 44 | th, td { 45 | border-top: 0; 46 | } 47 | } 48 | } 49 | // Account for multiple tbody instances 50 | tbody + tbody { 51 | border-top: 2px solid @table-border-color; 52 | } 53 | 54 | // Nesting 55 | .table { 56 | background-color: @body-bg; 57 | } 58 | } 59 | 60 | 61 | // Condensed table w/ half padding 62 | 63 | .table-condensed { 64 | thead, 65 | tbody, 66 | tfoot { 67 | > tr { 68 | > th, 69 | > td { 70 | padding: @table-condensed-cell-padding; 71 | } 72 | } 73 | } 74 | } 75 | 76 | 77 | // Bordered version 78 | // 79 | // Add borders all around the table and between all the columns. 80 | 81 | .table-bordered { 82 | border: 1px solid @table-border-color; 83 | > thead, 84 | > tbody, 85 | > tfoot { 86 | > tr { 87 | > th, 88 | > td { 89 | border: 1px solid @table-border-color; 90 | } 91 | } 92 | } 93 | > thead { 94 | > tr { 95 | > th, 96 | > td { 97 | border-bottom-width: 2px; 98 | } 99 | } 100 | } 101 | } 102 | 103 | 104 | // Zebra-striping 105 | // 106 | // Default zebra-stripe styles (alternating gray and transparent backgrounds) 107 | 108 | .table-striped { 109 | > tbody { 110 | > tr:nth-child(odd) { 111 | > td, 112 | > th { 113 | background-color: @table-bg-accent; 114 | } 115 | } 116 | } 117 | } 118 | 119 | 120 | // Hover effect 121 | // 122 | // Placed here since it has to come after the potential zebra striping 123 | 124 | .table-hover { 125 | > tbody { 126 | > tr:hover { 127 | > td, 128 | > th { 129 | background-color: @table-bg-hover; 130 | } 131 | } 132 | } 133 | } 134 | 135 | 136 | // Table cell sizing 137 | // 138 | // Reset default table behavior 139 | 140 | table col[class*="col-"] { 141 | float: none; 142 | display: table-column; 143 | } 144 | table { 145 | td, 146 | th { 147 | &[class*="col-"] { 148 | float: none; 149 | display: table-cell; 150 | } 151 | } 152 | } 153 | 154 | 155 | // Table backgrounds 156 | // 157 | // Exact selectors below required to override `.table-striped` and prevent 158 | // inheritance to nested tables. 159 | 160 | .table > thead > tr, 161 | .table > tbody > tr, 162 | .table > tfoot > tr { 163 | > td.active, 164 | > th.active, 165 | &.active > td, 166 | &.active > th { 167 | background-color: @table-bg-active; 168 | } 169 | } 170 | 171 | // Generate the contextual variants 172 | .table-row-variant(success; @state-success-bg; @state-success-border); 173 | .table-row-variant(danger; @state-danger-bg; @state-danger-border); 174 | .table-row-variant(warning; @state-warning-bg; @state-warning-border); 175 | 176 | 177 | // Responsive tables 178 | // 179 | // Wrap your tables in `.table-scrollable` and we'll make them mobile friendly 180 | // by enabling horizontal scrolling. Only applies <768px. Everything above that 181 | // will display normally. 182 | 183 | @media (max-width: @screen-sm) { 184 | .table-responsive { 185 | width: 100%; 186 | margin-bottom: 15px; 187 | overflow-y: hidden; 188 | overflow-x: scroll; 189 | border: 1px solid @table-border-color; 190 | 191 | // Tighten up spacing and give a background color 192 | > .table { 193 | margin-bottom: 0; 194 | background-color: #fff; 195 | 196 | // Ensure the content doesn't wrap 197 | > thead, 198 | > tbody, 199 | > tfoot { 200 | > tr { 201 | > th, 202 | > td { 203 | white-space: nowrap; 204 | } 205 | } 206 | } 207 | } 208 | 209 | // Special overrides for the bordered tables 210 | > .table-bordered { 211 | border: 0; 212 | 213 | // Nuke the appropriate borders so that the parent can handle them 214 | > thead, 215 | > tbody, 216 | > tfoot { 217 | > tr { 218 | > th:first-child, 219 | > td:first-child { 220 | border-left: 0; 221 | } 222 | > th:last-child, 223 | > td:last-child { 224 | border-right: 0; 225 | } 226 | } 227 | > tr:last-child { 228 | > th, 229 | > td { 230 | border-bottom: 0; 231 | } 232 | } 233 | } 234 | } 235 | } 236 | } 237 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | .img-thumbnail(); 9 | display: block; // Override the inline-block from `.img-thumbnail` 10 | 11 | > img { 12 | .img-responsive(); 13 | } 14 | } 15 | 16 | 17 | // Add a hover state for linked versions only 18 | a.thumbnail:hover, 19 | a.thumbnail:focus { 20 | border-color: @link-color; 21 | } 22 | 23 | // Images and captions 24 | .thumbnail > img { 25 | margin-left: auto; 26 | margin-right: auto; 27 | } 28 | .thumbnail .caption { 29 | padding: @thumbnail-caption-padding; 30 | color: @thumbnail-caption-color; 31 | } 32 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/tooltip.less: -------------------------------------------------------------------------------- 1 | // 2 | // Tooltips 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .tooltip { 8 | position: absolute; 9 | z-index: @zindex-tooltip; 10 | display: block; 11 | visibility: visible; 12 | font-size: @font-size-small; 13 | line-height: 1.4; 14 | .opacity(0); 15 | 16 | &.in { .opacity(.9); } 17 | &.top { margin-top: -3px; padding: 5px 0; } 18 | &.right { margin-left: 3px; padding: 0 5px; } 19 | &.bottom { margin-top: 3px; padding: 5px 0; } 20 | &.left { margin-left: -3px; padding: 0 5px; } 21 | } 22 | 23 | // Wrapper for the tooltip content 24 | .tooltip-inner { 25 | max-width: @tooltip-max-width; 26 | padding: 3px 8px; 27 | color: @tooltip-color; 28 | text-align: center; 29 | text-decoration: none; 30 | background-color: @tooltip-bg; 31 | border-radius: @border-radius-base; 32 | } 33 | 34 | // Arrows 35 | .tooltip-arrow { 36 | position: absolute; 37 | width: 0; 38 | height: 0; 39 | border-color: transparent; 40 | border-style: solid; 41 | } 42 | .tooltip { 43 | &.top .tooltip-arrow { 44 | bottom: 0; 45 | left: 50%; 46 | margin-left: -@tooltip-arrow-width; 47 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0; 48 | border-top-color: @tooltip-arrow-color; 49 | } 50 | &.top-left .tooltip-arrow { 51 | bottom: 0; 52 | left: 5px; 53 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0; 54 | border-top-color: @tooltip-arrow-color; 55 | } 56 | &.top-right .tooltip-arrow { 57 | bottom: 0; 58 | right: 5px; 59 | border-width: @tooltip-arrow-width @tooltip-arrow-width 0; 60 | border-top-color: @tooltip-arrow-color; 61 | } 62 | &.right .tooltip-arrow { 63 | top: 50%; 64 | left: 0; 65 | margin-top: -@tooltip-arrow-width; 66 | border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0; 67 | border-right-color: @tooltip-arrow-color; 68 | } 69 | &.left .tooltip-arrow { 70 | top: 50%; 71 | right: 0; 72 | margin-top: -@tooltip-arrow-width; 73 | border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width; 74 | border-left-color: @tooltip-arrow-color; 75 | } 76 | &.bottom .tooltip-arrow { 77 | top: 0; 78 | left: 50%; 79 | margin-left: -@tooltip-arrow-width; 80 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; 81 | border-bottom-color: @tooltip-arrow-color; 82 | } 83 | &.bottom-left .tooltip-arrow { 84 | top: 0; 85 | left: 5px; 86 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; 87 | border-bottom-color: @tooltip-arrow-color; 88 | } 89 | &.bottom-right .tooltip-arrow { 90 | top: 0; 91 | right: 5px; 92 | border-width: 0 @tooltip-arrow-width @tooltip-arrow-width; 93 | border-bottom-color: @tooltip-arrow-color; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | .clearfix(); 11 | } 12 | .pull-right { 13 | float: right !important; 14 | } 15 | .pull-left { 16 | float: left !important; 17 | } 18 | 19 | 20 | // Toggling content 21 | // ------------------------- 22 | 23 | .hide { 24 | display: none !important; 25 | } 26 | .show { 27 | display: block !important; 28 | } 29 | .invisible { 30 | visibility: hidden; 31 | } 32 | .text-hide { 33 | .hide-text(); 34 | } 35 | 36 | 37 | // For Affix plugin 38 | // ------------------------- 39 | 40 | .affix { 41 | position: fixed; 42 | } 43 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/bootstrap/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid darken(@well-bg, 7%); 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/fontawesome/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .@{fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/fontawesome/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/fontawesome/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/fontawesome/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.0.1 3 | * the iconic font designed for Bootstrap 4 | * ------------------------------------------------------------------------------ 5 | * The full suite of pictographic icons, examples, and documentation can be 6 | * found at http://fontawesome.io. Stay up to date on Twitter at 7 | * http://twitter.com/fontawesome. 8 | * 9 | * License 10 | * ------------------------------------------------------------------------------ 11 | * - The Font Awesome font is licensed under SIL OFL 1.1 - 12 | * http://scripts.sil.org/OFL 13 | * - Font Awesome CSS, LESS, and SASS files are licensed under MIT License - 14 | * http://opensource.org/licenses/mit-license.html 15 | * - Font Awesome documentation licensed under CC BY 3.0 - 16 | * http://creativecommons.org/licenses/by/3.0/ 17 | * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: 18 | * "Font Awesome by Dave Gandy - http://fontawesome.io" 19 | * 20 | * Author - Dave Gandy 21 | * ------------------------------------------------------------------------------ 22 | * Email: dave@fontawesome.io 23 | * Twitter: http://twitter.com/davegandy 24 | * Work: Lead Product Designer @ Kyruus - http://kyruus.com 25 | */ 26 | 27 | @import "variables"; 28 | @import "mixins"; 29 | @import "path"; 30 | @import "core"; 31 | @import "larger"; 32 | @import "fixed-width"; 33 | @import "list"; 34 | @import "bordered-pulled"; 35 | @import "spinning"; 36 | @import "rotated-flipped"; 37 | @import "stacked"; 38 | @import "icons"; 39 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/fontawesome/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/fontawesome/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: -@fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/fontawesome/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon-rotate(@degrees, @rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 6 | -webkit-transform: rotate(@degrees); 7 | -moz-transform: rotate(@degrees); 8 | -ms-transform: rotate(@degrees); 9 | -o-transform: rotate(@degrees); 10 | transform: rotate(@degrees); 11 | } 12 | 13 | .fa-icon-flip(@horiz, @vert, @rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 15 | -webkit-transform: scale(@horiz, @vert); 16 | -moz-transform: scale(@horiz, @vert); 17 | -ms-transform: scale(@horiz, @vert); 18 | -o-transform: scale(@horiz, @vert); 19 | transform: scale(@horiz, @vert); 20 | } 21 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/fontawesome/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff') format('woff'), 9 | url('@{fa-font-path}/fontawesome-webfont.ttf') format('truetype'), 10 | url('@{fa-font-path}/fontawesome-webfont.svg') format('svg'); 11 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/fontawesome/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/fontawesome/spinning.less: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @-ms-keyframes spin { 24 | 0% { -ms-transform: rotate(0deg); } 25 | 100% { -ms-transform: rotate(359deg); } 26 | } 27 | @keyframes spin { 28 | 0% { transform: rotate(0deg); } 29 | 100% { transform: rotate(359deg); } 30 | } 31 | -------------------------------------------------------------------------------- /inst/themes/mathjax/stylesheets/vendors/fontawesome/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /inst/themes/mathjax/templates/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/templates/.DS_Store -------------------------------------------------------------------------------- /inst/themes/mathjax/templates/includes/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/inst/themes/mathjax/templates/includes/.DS_Store -------------------------------------------------------------------------------- /inst/themes/mathjax/templates/includes/book/exercise.html: -------------------------------------------------------------------------------- 1 |
      2 |

      Exercise

      3 |
      4 |
      5 | Correct! 6 |
      7 | 8 |
      9 | False! 10 |
      11 | 12 |
      13 | {% autoescape false %}{{ section.content }}{% endautoescape %} 14 |
      15 |
      {{ section.code.base }}
      16 | 17 | 18 | 19 | {% if section.code.context %} 20 | 21 | {% endif %} 22 | 23 |
      24 | Submit 25 | Solution 26 | {% if githubId %} 27 | Have a Question? 28 | {% endif %} 29 |
      30 | -------------------------------------------------------------------------------- /inst/themes/mathjax/templates/includes/book/header.html: -------------------------------------------------------------------------------- 1 |
      2 | 3 | {% if githubId %} 4 | 5 | {% endif %} 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {% if githubId %} 15 | Star (-) 16 | Watch (-) 17 | {% endif %} 18 | 19 | 20 |

      {{ title }}

      21 |
      22 | -------------------------------------------------------------------------------- /inst/themes/mathjax/templates/includes/book/progress.html: -------------------------------------------------------------------------------- 1 |
      2 |
      3 |
      4 |
      5 |
      6 | {% for p in progress.chapters %} 7 | 8 | {% endfor %} 9 |
      10 |
      -------------------------------------------------------------------------------- /inst/themes/mathjax/templates/includes/book/quiz.html: -------------------------------------------------------------------------------- 1 |
      2 |

      Quiz

      3 |
      4 | 5 |
      6 | {% autoescape false %}{{ section.content }}{% endautoescape %} 7 |
      8 | 9 | 10 | {% for quiz in section.quiz %} 11 |
      12 |
      Question {{ loop.index }} of {{ section.quiz.length }}
      13 | 14 |
      15 | 18 | 19 | 23 | 24 |
      25 | {% autoescape false %}{{ quiz.base }}{% endautoescape %} 26 |
      27 |
      28 | 29 | 34 |
      35 | {% endfor %} 36 | 37 |
      38 | Submit 39 | Solution 40 | {% if githubId %} 41 | Have a Question? 42 | {% endif %} 43 |
      44 | -------------------------------------------------------------------------------- /inst/themes/mathjax/templates/includes/book/summary.html: -------------------------------------------------------------------------------- 1 |
      2 | 5 | 48 |
      49 | -------------------------------------------------------------------------------- /inst/themes/mathjax/templates/includes/mathjax.html: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /inst/themes/mathjax/templates/langs.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block title %}{{ title }}{% endblock %} 4 | 5 | {% block content %} 6 |
      7 |
      8 |

      Choose a language

      9 | 10 |
        11 | {% for lang in langs %} 12 |
      • 13 | {{ lang.title }} 14 |
      • 15 | {% endfor %} 16 |
      17 |
      18 |
      19 | {% endblock %} 20 | 21 | {% block javascript %}{% endblock %} -------------------------------------------------------------------------------- /inst/themes/mathjax/templates/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% block head %} 5 | 6 | {% block title %} | {{ title }}{% endblock %} 7 | 8 | {% include "includes/mathjax.html" %} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {% if progress.current.next and progress.current.next.path %} 17 | 18 | {% endif %} 19 | {% if progress.current.prev and progress.current.prev.path %} 20 | 21 | {% endif %} 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | {% endblock %} 38 | 39 | 40 | {% block content %}{% endblock %} 41 | {% block style %} 42 | 43 | {% endblock %} 44 | {% block javascript %} 45 | 46 | 47 | 48 | 49 | {% endblock %} 50 | 51 | 52 | -------------------------------------------------------------------------------- /inst/themes/mathjax/templates/site.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block title %}{{ progress.current.title }}{% parent %}{% endblock %} 4 | {% block content %} 5 |
      6 | {% include "includes/book/header.html" %} 7 | {% include "includes/book/summary.html" %} 8 |
      9 |
      10 |
      11 | {% include "includes/book/progress.html" %} 12 | 13 |
      14 | {% for section in content %} 15 |
      16 | {% if section.type == "normal" %} 17 | {% autoescape false %}{{ section.content }}{% endautoescape %} 18 | {% elif section.type == "exercise" %} 19 | {% include "./includes/book/exercise.html" with {section: section} %} 20 | {% elif section.type == "quiz" %} 21 | {% include "./includes/book/quiz.html" with {section: section} %} 22 | {% endif %} 23 |
      24 | {% endfor %} 25 |
      26 |
      27 |
      28 | 29 | {% if progress.current.prev and progress.current.prev.path %} 30 | 31 | {% endif %} 32 | {% if progress.current.next and progress.current.next.path %} 33 | 34 | {% endif %} 35 |
      36 |
      37 | {% endblock %} 38 | -------------------------------------------------------------------------------- /man/Rgitbook-package.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.0): do not edit by hand 2 | \docType{package} 3 | \name{Rgitbook-package} 4 | \alias{Rgitbook-package} 5 | \title{Gitbook Projects with R Markdown} 6 | \description{ 7 | Gitbook Projects with R Markdown 8 | } 9 | \details{ 10 | This package provides functions for working with \url{Gitbook.io} projects 11 | from within R. Moreover, it provides support for working with R markdown 12 | files using the \code{knitr} package. Support for MathJax is also included. 13 | } 14 | \author{ 15 | \email{jason@bryer.org} 16 | } 17 | \keyword{Gitbook} 18 | \keyword{Github} 19 | \keyword{Markdown} 20 | \keyword{R} 21 | 22 | -------------------------------------------------------------------------------- /man/buildGitbook.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.0): do not edit by hand 2 | \name{buildGitbook} 3 | \alias{buildGitbook} 4 | \title{This will build a gitbook from the source markdown files.} 5 | \usage{ 6 | buildGitbook(source.dir = getwd(), out.dir = paste0(getwd(), "/_book"), 7 | buildRmd = TRUE, format, gitbook.params, ...) 8 | } 9 | \arguments{ 10 | \item{source.dir}{location containing the source files.} 11 | 12 | \item{out.dir}{location of the built book.} 13 | 14 | \item{format}{the format of book. Options are pdf or ebook. If omitted, 15 | this will build a website.} 16 | 17 | \item{buildRmd}{should \code{\link{buildRmd}} be called first.} 18 | 19 | \item{gitbook.params}{other parameters passed to the gitbook command.} 20 | 21 | \item{...}{other parameters passed to \code{\link{buildRmd}}.} 22 | } 23 | \description{ 24 | This function is simply a wrapper to a system call to \code{gitbook}. 25 | } 26 | \details{ 27 | \url{https://github.com/GitbookIO/gitbook} 28 | } 29 | 30 | -------------------------------------------------------------------------------- /man/buildRmd.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.0): do not edit by hand 2 | \name{buildRmd} 3 | \alias{buildRmd} 4 | \title{Builds markdown files from all Rmarkdown files in the given directories.} 5 | \usage{ 6 | buildRmd(dir = getwd(), clean = FALSE, log.dir, log.ext = ".txt", ...) 7 | } 8 | \arguments{ 9 | \item{dir}{root directory of the gitbook project.} 10 | 11 | \item{clean}{if TRUE, all Rmd files will be built regardless of their 12 | modification date.} 13 | 14 | \item{log.dir}{if specified, the output from \code{\link{knitr}} will be saved 15 | to a log file in the given directory.} 16 | 17 | \item{log.ext}{if log files are saved, the file extension to use.} 18 | 19 | \item{...}{other parameters passed to \code{\link{knit}}.} 20 | } 21 | \description{ 22 | This function will build Rmarkdown files in the given directory to markdown. 23 | The default is to traverse all subdirectories of the working directory 24 | looking for .Rmd files to process. This function will save a file in the 25 | working directory called \code{.rmdbuild} that contain the status of the 26 | last successful build. This allows the function to only process changed files. 27 | } 28 | 29 | -------------------------------------------------------------------------------- /man/checkForGitbook.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.0): do not edit by hand 2 | \name{checkForGitbook} 3 | \alias{checkForGitbook} 4 | \title{Check if Gitbook is installed.} 5 | \usage{ 6 | checkForGitbook(quiet = FALSE) 7 | } 8 | \arguments{ 9 | \item{quiet}{logical indicating whether messages should be printed.} 10 | } 11 | \description{ 12 | If Gitbook is not installed it will try to do so. If the installion fails or 13 | Node.js is not installed, an error will be thrown. 14 | } 15 | 16 | -------------------------------------------------------------------------------- /man/gitbookInfo.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.0): do not edit by hand 2 | \name{gitbookInfo} 3 | \alias{gitbookInfo} 4 | \title{Returns the version information about the currently installed gitbook and 5 | what is avaialble from \url{https://www.npmjs.org/}.} 6 | \usage{ 7 | gitbookInfo() 8 | } 9 | \value{ 10 | a character vector with two elements, \code{installed.version} and 11 | \code{available.version}. 12 | } 13 | \description{ 14 | Returns the version information about the currently installed gitbook and 15 | what is avaialble from \url{https://www.npmjs.org/}. 16 | } 17 | 18 | -------------------------------------------------------------------------------- /man/initGitbook.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.0): do not edit by hand 2 | \name{initGitbook} 3 | \alias{initGitbook} 4 | \title{Create files and folders based on contents of SUMMARY.md.} 5 | \usage{ 6 | initGitbook(dir = getwd()) 7 | } 8 | \arguments{ 9 | \item{dir}{source directory for the Gitbook.} 10 | } 11 | \description{ 12 | This first calls system command \code{gitbook init} but then will change 13 | the all the file extensions from \code{.md} to \code{.Rmd} excluding 14 | \code{SUMMARY.md} and \code{README.md}. 15 | } 16 | 17 | -------------------------------------------------------------------------------- /man/installGitbook.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.0): do not edit by hand 2 | \name{installGitbook} 3 | \alias{installGitbook} 4 | \title{This will install Gitbook.io.} 5 | \usage{ 6 | installGitbook() 7 | } 8 | \description{ 9 | This function will install Gitbook from \url{http://nodejs.org/download/} 10 | regardless if the current version. That is, this function will either update 11 | or install a new version of Gitbook.io. 12 | } 13 | \details{ 14 | On many systems this function will not work as installing requires root 15 | access. The function will print the required commands for you to copy-and-paste 16 | to the terminal. 17 | } 18 | 19 | -------------------------------------------------------------------------------- /man/newGitbook.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.0): do not edit by hand 2 | \name{newGitbook} 3 | \alias{newGitbook} 4 | \title{Initializes a new Gitbook.} 5 | \usage{ 6 | newGitbook(dir) 7 | } 8 | \arguments{ 9 | \item{dir}{location of the built gitbook.} 10 | } 11 | \description{ 12 | This will initalize a new Gitbook in the given directory. When done, it will 13 | also change the working directory. 14 | } 15 | 16 | -------------------------------------------------------------------------------- /man/openGitbook.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.0): do not edit by hand 2 | \name{openGitbook} 3 | \alias{openGitbook} 4 | \title{Open a built gitbook.} 5 | \usage{ 6 | openGitbook(out.dir = paste0(getwd(), "/_book")) 7 | } 8 | \arguments{ 9 | \item{out.dir}{location of the built gitbook.} 10 | } 11 | \description{ 12 | This function is a wrapper to the system call of \code{open} which should 13 | open the book in the system's default web browser. 14 | } 15 | 16 | -------------------------------------------------------------------------------- /man/publishGitbook.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2 (4.0.0): do not edit by hand 2 | \name{publishGitbook} 3 | \alias{publishGitbook} 4 | \title{Publish the built gitbook to Github.} 5 | \usage{ 6 | publishGitbook(repo, out.dir = paste0(getwd(), "/_book"), 7 | message = "Update built gitbook") 8 | } 9 | \arguments{ 10 | \item{repo}{the github repository. Should be of form username/repository} 11 | 12 | \item{out.dir}{location of the built gitbook.} 13 | 14 | \item{message}{commit message.} 15 | } 16 | \description{ 17 | Note that this is a wrapper to system \code{git} call. 18 | } 19 | \details{ 20 | This function assumes that the repository has already exists on Github. 21 | 22 | Thanks to ramnathv for the shell script. 23 | https://github.com/GitbookIO/gitbook/issues/106#issuecomment-40747887 24 | } 25 | 26 | -------------------------------------------------------------------------------- /website/.bookignore: -------------------------------------------------------------------------------- 1 | *.RMD 2 | *.rmd 3 | *.Rmd 4 | log/ 5 | *.R 6 | *.Rproj 7 | .rmdbuild 8 | 9 | -------------------------------------------------------------------------------- /website/.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | _book/ 3 | .rmdbuild.Rda 4 | *.DS_Store 5 | log/ 6 | .Rhistory 7 | -------------------------------------------------------------------------------- /website/README.Rmd: -------------------------------------------------------------------------------- 1 | # Gitbook with R Markdown 2 | 3 | ##### Author: Jason Bryer [jason@bryer.org](mailto:jason@bryer.org) 4 | ##### Website: [jason.bryer.org/Rgitbook](http://jason.bryer.org/Rgitbook) 5 | ##### Repository: [github.com/jbryer/Rgitbook/tree/master](https://github.com/jbryer/Rgitbook/tree/master) 6 | 7 | [Gitbook](http://gitbook.io) `r citep(bib['gitbook'])` is a Node.js framework for developing/writing books using [Markdown](https://daringfireball.net/projects/markdown/). Using the same source markdown files, it can generate books in web, PDF, eBook, and JSON formats. More information about Gitbook is available at their website at [www.gitbook.io/](http://www.gitbook.io/). 8 | 9 | This page describes an [R](http://www.r-project.org) package that interfaces with Gitbook for generating books using R markdown. Virtually all aspects of developing Gitbooks can be done in R. [RStudio](http://rstudio.com) is a particulary nice Integrated Development Environment (IDE) for workting with R and R Markdown. This book, created using Gitbook and the `Rgitbook` R package, will describe the process of book development. 10 | 11 | This book in fact uses the Gitbook.io framework and `Rgitbook` R package. You can browse the source code at [Github](https://github.com/jbryer/Rgitbook/tree/master/website) and the R script to build the book and R package [here](https://github.com/jbryer/Rgitbook/tree/master). 12 | 13 | -------------------------------------------------------------------------------- /website/README.md: -------------------------------------------------------------------------------- 1 | # Gitbook with R Markdown 2 | 3 | ##### Author: Jason Bryer [jason@bryer.org](mailto:jason@bryer.org) 4 | ##### Website: [jason.bryer.org/Rgitbook](http://jason.bryer.org/Rgitbook) 5 | ##### Repository: [github.com/jbryer/Rgitbook/tree/master](https://github.com/jbryer/Rgitbook/tree/master) 6 | 7 | [Gitbook](http://gitbook.io) (Pessé & O'Mullan, 2014) is a Node.js framework for developing/writing books using [Markdown](https://daringfireball.net/projects/markdown/). Using the same source markdown files, it can generate books in web, PDF, eBook, and JSON formats. More information about Gitbook is available at their website at [www.gitbook.io/](http://www.gitbook.io/). 8 | 9 | This page describes an [R](http://www.r-project.org) package that interfaces with Gitbook for generating books using R markdown. Virtually all aspects of developing Gitbooks can be done in R. [RStudio](http://rstudio.com) is a particulary nice Integrated Development Environment (IDE) for workting with R and R Markdown. This book, created using Gitbook and the `Rgitbook` R package, will describe the process of book development. 10 | 11 | This book in fact uses the Gitbook.io framework and `Rgitbook` R package. You can browse the source code at [Github](https://github.com/jbryer/Rgitbook/tree/master/website) and the R script to build the book and R package [here](https://github.com/jbryer/Rgitbook/tree/master). 12 | 13 | -------------------------------------------------------------------------------- /website/SUMMARY.md: -------------------------------------------------------------------------------- 1 | # Gitbook Projects with R Markdown 2 | 3 | * [Installation](installation/installation.md) 4 | * [Current Version](installation/gitbookInfo.md) 5 | * [Creating a New Gitbook](creating/newGitbook.md) 6 | * [Citations](creating/citations.md) 7 | * [Building Gitbooks](building/building.md) 8 | * [R Markdown](building/buildRmd.md) 9 | * [Gitbook](building/buildGitbook.md) 10 | * [Viewing the Results](building/openGitbook.md) 11 | * [Publishing](publishing/publishGitbook.md) 12 | * [References](references.md) 13 | -------------------------------------------------------------------------------- /website/building/buildGitbook.Rmd: -------------------------------------------------------------------------------- 1 | ```{r knitsetup, echo=FALSE, results='hide', warning=FALSE, message=FALSE, cache=FALSE} 2 | opts_knit$set(base.dir='./', fig.path='', out.format='md') 3 | opts_chunk$set(prompt=TRUE, comment='', results='markup') 4 | # See yihui.name/knitr/options for more Knitr options. 5 | ##### Put other setup R code here 6 | 7 | ``` 8 | 9 | # Building Gitbook 10 | 11 | The `buildGitbook` function create a Gitbook from your source files. 12 | 13 | ```{r buildGitbook, eval=FALSE} 14 | buildGitbook() 15 | ``` 16 | 17 | The parameters for the `buildGitbook` function are: 18 | 19 | * `source.dir` (default is `getwd()`) - The directory containing your Gitbook source files. 20 | * `out.dir` (default is the `_book` directory in the current working directory) - The directory where your Gitbook will be built. 21 | * `theme` (default is the MathJax theme) - The path to the Gitbook theme that should be used. The `Rgitbook` includes a theme that adds support for MathJax. 22 | * `buildRmd` (default is `TRUE`) - Should the R Markdown files be built first. 23 | * `format` - The format of the generated Gitbook. Options include `pdf` and `ebook`. 24 | * `title` - The title of your Gitbook. 25 | * `intro` - The introduction of your Gitbook. 26 | * `github` - Your Github root address. 27 | * `...` - Other parameters passed to `buildRmd`. 28 | 29 | 30 | -------------------------------------------------------------------------------- /website/building/buildGitbook.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # Building Gitbook 5 | 6 | The `buildGitbook` function create a Gitbook from your source files. 7 | 8 | 9 | ```r 10 | > buildGitbook() 11 | ``` 12 | 13 | 14 | The parameters for the `buildGitbook` function are: 15 | 16 | * `source.dir` (default is `getwd()`) - The directory containing your Gitbook source files. 17 | * `out.dir` (default is the `_book` directory in the current working directory) - The directory where your Gitbook will be built. 18 | * `theme` (default is the MathJax theme) - The path to the Gitbook theme that should be used. The `Rgitbook` includes a theme that adds support for MathJax. 19 | * `buildRmd` (default is `TRUE`) - Should the R Markdown files be built first. 20 | * `format` - The format of the generated Gitbook. Options include `pdf` and `ebook`. 21 | * `title` - The title of your Gitbook. 22 | * `intro` - The introduction of your Gitbook. 23 | * `github` - Your Github root address. 24 | * `...` - Other parameters passed to `buildRmd`. 25 | 26 | 27 | -------------------------------------------------------------------------------- /website/building/buildRmd.Rmd: -------------------------------------------------------------------------------- 1 | ```{r knitsetup, echo=FALSE, results='hide', warning=FALSE, message=FALSE, cache=FALSE} 2 | opts_knit$set(base.dir='./', fig.path='', out.format='md') 3 | opts_chunk$set(prompt=TRUE, comment='', results='markup') 4 | # See yihui.name/knitr/options for more Knitr options. 5 | ##### Put other setup R code here 6 | 7 | ``` 8 | 9 | # Building R Markdown Files 10 | 11 | NOTE: The `buildRmd` function will be called from the `buildGitbook` function by default and therefore it is not necessary to call this function directly. However, this page will describe the process. 12 | 13 | The first step in building a Gitbook is to convert all R Markdown files to markdown. The `buildRmd` function will locate each `.Rmd` file in your project and build it using the `knitr` package. This function will also create a `.rmdbuild` file in the root of your Gitbook website. This file contains information about the last build. In short, this allows the `buildRmd` file to only rebuild files that have changed since the last build therefore substantially decreasing the amount of time it takes to rebuild your book. 14 | 15 | ```{r buildRmd, eval=FALSE} 16 | buildRmd() 17 | ``` 18 | 19 | There are a number of parameters for the `buildRmd` function. 20 | 21 | * `dir` (default is `getwd()`) - Specifies the directory containing your book source files. 22 | * `clean` (defualt is `FALSE`) - If `TRUE`, all `.Rmd` files will be built even if they have not changed since the last build. 23 | * `log.dir` - If specified, the output from the `knit` process will be saved to a log file instead of the console. A seperate log file for each `.Rmd` file will be created. 24 | * `log.ext` (default is `.txt`) - The file extension for log files if used. 25 | * `...` Other parmaters passed to the `knit` function. 26 | -------------------------------------------------------------------------------- /website/building/buildRmd.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # Building R Markdown Files 5 | 6 | NOTE: The `buildRmd` function will be called from the `buildGitbook` function by default and therefore it is not necessary to call this function directly. However, this page will describe the process. 7 | 8 | The first step in building a Gitbook is to convert all R Markdown files to markdown. The `buildRmd` function will locate each `.Rmd` file in your project and build it using the `knitr` package. This function will also create a `.rmdbuild` file in the root of your Gitbook website. This file contains information about the last build. In short, this allows the `buildRmd` file to only rebuild files that have changed since the last build therefore substantially decreasing the amount of time it takes to rebuild your book. 9 | 10 | 11 | ```r 12 | > buildRmd() 13 | ``` 14 | 15 | 16 | There are a number of parameters for the `buildRmd` function. 17 | 18 | * `dir` (default is `getwd()`) - Specifies the directory containing your book source files. 19 | * `clean` (defualt is `FALSE`) - If `TRUE`, all `.Rmd` files will be built even if they have not changed since the last build. 20 | * `log.dir` - If specified, the output from the `knit` process will be saved to a log file instead of the console. A seperate log file for each `.Rmd` file will be created. 21 | * `log.ext` (default is `.txt`) - The file extension for log files if used. 22 | * `...` Other parmaters passed to the `knit` function. 23 | -------------------------------------------------------------------------------- /website/building/building.md: -------------------------------------------------------------------------------- 1 | 2 | # Building Gitbooks 3 | 4 | Now that your Gitbook project is setup, you can edit the `.Rmd` files with your content. The `Rgitbook` package adds two important features: The ability to include R code directly in your documents and support for [MathJax](http://www.mathjax.org/). RStudio has an excellent tutorial on using R Markdown on their website at [http://www.rstudio.com/ide/docs/authoring/using_markdown](http://www.rstudio.com/ide/docs/authoring/using_markdown). However, the basic format is: 5 | 6 | ```{r label, options} 7 | # R code 8 | ``` 9 | 10 | The full list of options that alter how the R markdown chunck is processed and displayed is avaiable here: [http://yihui.name/knitr/options](http://yihui.name/knitr/options). 11 | 12 | [MathJax](http://www.mathjax.org/) is a JavaScript library that allows for embedding LaTeX style formulas in HTML, for example \\( a^2 + b^2 = c^2 \\). 13 | 14 | $${ e }^{ i\pi }+1=0$$ 15 | 16 | For inline equations, use surround the equation with `\\(` and `\\)`. For equations on their own line, the typical LaTeX formatting applies by surround the equation between `$$`. If you are new to LaTeX equations, the Daum Equation Editor for [Google Chrome](https://chrome.google.com/webstore/detail/daum-equation-editor/dinfmiceliiomokeofbocegmacmagjhe?hl=en) or [Mac OS X](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=2&cad=rja&uact=8&ved=0CDUQFjAB&url=https%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fdaum-equation-editor%2Fid540665783%3Fmt%3D12&ei=fHJWU4nLKeHIsATbs4HgBQ&usg=AFQjCNH69beGYAfr5ojnPILLNOG-goN9sw&sig2=T_SN94407Vof0hIAmKRtAA&bvm=bv.65177938,d.cWc) provides a nice user interface for designing equations. 17 | 18 | Building Gitbooks is a two step processes. First, R Markdown files must be converted to plain Markdown files and second, the Markdown files be converted to a Gitbook (either HTML, PDF, or eBook). The next two sections outline the functions and options for building. 19 | -------------------------------------------------------------------------------- /website/building/openGitbook.Rmd: -------------------------------------------------------------------------------- 1 | ```{r knitsetup, echo=FALSE, results='hide', warning=FALSE, message=FALSE, cache=FALSE} 2 | opts_knit$set(base.dir='./', fig.path='', out.format='md') 3 | opts_chunk$set(prompt=TRUE, comment='', results='markup') 4 | # See yihui.name/knitr/options for more Knitr options. 5 | ##### Put other setup R code here 6 | 7 | ``` 8 | 9 | # Open Built Gitbooks 10 | 11 | The `openGitbook` is a convenience function that will open the built Gitbook in the system's default web browser. The only parameter for this function is the directory where the Gitbook was generated, which defaults to the `_book` subdirectory of the current working directory. 12 | 13 | ```{r openGitbook, eval=FALSE} 14 | openGitbook() 15 | ``` 16 | -------------------------------------------------------------------------------- /website/building/openGitbook.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # Open Built Gitbooks 5 | 6 | The `openGitbook` is a convenience function that will open the built Gitbook in the system's default web browser. The only parameter for this function is the directory where the Gitbook was generated, which defaults to the `_book` subdirectory of the current working directory. 7 | 8 | 9 | ```r 10 | > openGitbook() 11 | ``` 12 | 13 | -------------------------------------------------------------------------------- /website/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/website/cover.jpg -------------------------------------------------------------------------------- /website/cover.pxm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/website/cover.pxm -------------------------------------------------------------------------------- /website/creating/citations.Rmd: -------------------------------------------------------------------------------- 1 | ```{r knitsetup, echo=FALSE, results='hide', warning=FALSE, message=FALSE, cache=FALSE} 2 | opts_knit$set(base.dir='./', fig.path='', out.format='md') 3 | opts_chunk$set(prompt=TRUE, comment='', results='markup') 4 | # See yihui.name/knitr/options for more Knitr options. 5 | ##### Put other setup R code here 6 | 7 | ``` 8 | 9 | # Citations 10 | 11 | `Rgitbook` uses the `knitcitations` `r citep(bib['knitcitations'])` to manage citations. You can use the `citep` and `citet` functions using the knitr inline syntax. For example: 12 | 13 | 14 | The devtools ` r citep(bib['devtools']) ` package makes it easy to develop R packages. 15 | 16 | 17 | The `Rgitbook` will make a knitcitations bibliography object named `bib` available to all `.Rmd` files being processed. This file contains all the citations in the `references.bib` BibTeX file. 18 | -------------------------------------------------------------------------------- /website/creating/citations.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # Citations 5 | 6 | `Rgitbook` uses the `knitcitations` (Boettiger, 2014) to manage citations. You can use the `citep` and `citet` functions using the knitr inline syntax. For example: 7 | 8 | 9 | The devtools ` r citep(bib['devtools']) ` package makes it easy to develop R packages. 10 | 11 | 12 | The `Rgitbook` will make a knitcitations bibliography object named `bib` available to all `.Rmd` files being processed. This file contains all the citations in the `references.bib` BibTeX file. 13 | -------------------------------------------------------------------------------- /website/creating/figures/gitbookfiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbryer/Rgitbook/4b783da2919567609fb2879d29deec7c691edbfc/website/creating/figures/gitbookfiles.png -------------------------------------------------------------------------------- /website/creating/newGitbook.Rmd: -------------------------------------------------------------------------------- 1 | ```{r knitsetup, echo=FALSE, results='hide', warning=FALSE, message=FALSE, cache=FALSE} 2 | opts_knit$set(base.dir='./', fig.path='', out.format='md') 3 | opts_chunk$set(prompt=TRUE, comment='', results='markup') 4 | # See yihui.name/knitr/options for more Knitr options. 5 | ##### Put other setup R code here 6 | 7 | ``` 8 | 9 | # Creating a New Gitbook 10 | 11 | Creating a new Gitbook is a two step processes. First, the `newGitbook` function will create the initial set of files in the directory specified. 12 | 13 | ```{r newGitbook, eval=FALSE} 14 | newGitbook('testbook') 15 | ``` 16 | 17 | ``` 18 | Creating /Users/jbryer/Dropbox/Projects/testbook 19 | Writing .bookignore... 20 | Writing .gitignore... 21 | Writing README.md... 22 | Writing SUMMARY.md... 23 | You can now open README.md and SUMMARY.md. Once you are done 24 | editting SUMMARY.md, initGitbook() will create the file and folder 25 | structure for your new Gitbook. 26 | ``` 27 | 28 | Here, we see the initial set of files the `newGitbook` created. 29 | 30 | ``` 31 | Jasons-MacBook-Air:testbook jbryer$ ls -la 32 | total 32 33 | drwxr-xr-x 6 jbryer staff 204 Apr 18 10:52 . 34 | drwxr-xr-x 110 jbryer staff 3740 Apr 18 10:52 .. 35 | -rw-r--r-- 1 jbryer staff 35 Apr 18 10:52 .bookignore 36 | -rw-r--r-- 1 jbryer staff 49 Apr 18 10:52 .gitignore 37 | -rw-r--r-- 1 jbryer staff 75 Apr 18 10:52 README.md 38 | -rw-r--r-- 1 jbryer staff 231 Apr 18 10:52 SUMMARY.md 39 | ``` 40 | 41 | The `README.md` file contains the introduction page of your book and the `SUMMARY.md` file contains the structore, or table of contents, of your book. The `.bookingore` and `.gitignore` spefies files that should be ignored by Gitbook and Git, respectively. They contain the typical set of files to be ignored but can be editted as necessary. 42 | 43 | At this point, you should edit the `SUMMARY.md` file to reflect your book's outline. Although you will eventually be working with R markdown files (with `.Rmd` file extensions), the links in this file should be to the `.md` version. Once your outline is complete, the `initGitbook` function will create all the R markdown files specified in `SUMMARY.md`. 44 | 45 | ```{r initGitbook, eval=FALSE} 46 | initGitbook() 47 | ``` 48 | 49 | Here is the file structure as it appears in RStudio. 50 | 51 | ![Gitbook Files](figures/gitbookfiles.png) 52 | 53 | Now that all the required files are created, you can edit each file writing your book. Each `.Rmd` file contains a Knitr chunk at the top, not to be echoed or output printed, containing some basic Knitr options. The full list of supported options is available at [http://yihui.name/knitr/options](http://yihui.name/knitr/options). 54 | 55 | -------------------------------------------------------------------------------- /website/creating/newGitbook.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # Creating a New Gitbook 5 | 6 | Creating a new Gitbook is a two step processes. First, the `newGitbook` function will create the initial set of files in the directory specified. 7 | 8 | 9 | ```r 10 | > newGitbook("testbook") 11 | ``` 12 | 13 | 14 | ``` 15 | Creating /Users/jbryer/Dropbox/Projects/testbook 16 | Writing .bookignore... 17 | Writing .gitignore... 18 | Writing README.md... 19 | Writing SUMMARY.md... 20 | You can now open README.md and SUMMARY.md. Once you are done 21 | editting SUMMARY.md, initGitbook() will create the file and folder 22 | structure for your new Gitbook. 23 | ``` 24 | 25 | Here, we see the initial set of files the `newGitbook` created. 26 | 27 | ``` 28 | Jasons-MacBook-Air:testbook jbryer$ ls -la 29 | total 32 30 | drwxr-xr-x 6 jbryer staff 204 Apr 18 10:52 . 31 | drwxr-xr-x 110 jbryer staff 3740 Apr 18 10:52 .. 32 | -rw-r--r-- 1 jbryer staff 35 Apr 18 10:52 .bookignore 33 | -rw-r--r-- 1 jbryer staff 49 Apr 18 10:52 .gitignore 34 | -rw-r--r-- 1 jbryer staff 75 Apr 18 10:52 README.md 35 | -rw-r--r-- 1 jbryer staff 231 Apr 18 10:52 SUMMARY.md 36 | ``` 37 | 38 | The `README.md` file contains the introduction page of your book and the `SUMMARY.md` file contains the structore, or table of contents, of your book. The `.bookingore` and `.gitignore` spefies files that should be ignored by Gitbook and Git, respectively. They contain the typical set of files to be ignored but can be editted as necessary. 39 | 40 | At this point, you should edit the `SUMMARY.md` file to reflect your book's outline. Although you will eventually be working with R markdown files (with `.Rmd` file extensions), the links in this file should be to the `.md` version. Once your outline is complete, the `initGitbook` function will create all the R markdown files specified in `SUMMARY.md`. 41 | 42 | 43 | ```r 44 | > initGitbook() 45 | ``` 46 | 47 | 48 | Here is the file structure as it appears in RStudio. 49 | 50 | ![Gitbook Files](figures/gitbookfiles.png) 51 | 52 | Now that all the required files are created, you can edit each file writing your book. Each `.Rmd` file contains a Knitr chunk at the top, not to be echoed or output printed, containing some basic Knitr options. The full list of supported options is available at [http://yihui.name/knitr/options](http://yihui.name/knitr/options). 53 | 54 | -------------------------------------------------------------------------------- /website/installation/gitbookInfo.Rmd: -------------------------------------------------------------------------------- 1 | ```{r knitsetup, echo=FALSE, results='hide', warning=FALSE, message=FALSE, cache=FALSE} 2 | opts_knit$set(base.dir='./', fig.path='', out.format='md') 3 | opts_chunk$set(prompt=TRUE, comment='', results='markup') 4 | # See yihui.name/knitr/options for more Knitr options. 5 | ##### Put other setup R code here 6 | 7 | ``` 8 | 9 | # Checking the Installed Version of Gitbook 10 | 11 | Gitbook.io is under active development. The `gitbookInfo` function will indicate whether a new version of Gitbook is available. 12 | 13 | ```{r gitbookInfo} 14 | gitbookInfo() 15 | ``` 16 | 17 | If a new version is available, the `installGitbook` function will install the latest version. 18 | 19 | ```{r installgitbook, eval=FALSE} 20 | installGitbook() 21 | ``` 22 | 23 | Additionally, the `checkForGitbook` function will also indicate whether Gitbook is installed and available but will not check the [Node Package Modules](https://www.npmjs.org/) website for the currently available version. 24 | 25 | ```{r checkForGitbook} 26 | checkForGitbook() 27 | ``` 28 | 29 | The `quiet` parameter will not print any messages. The function returns a logical indicating whether Gitbook is available or not. This may be useful if you are automating your Gitbook development. 30 | 31 | ```{r checkForGitbookQuiet} 32 | isAvailable <- checkForGitbook(quiet=TRUE) 33 | isAvailable 34 | ``` 35 | 36 | -------------------------------------------------------------------------------- /website/installation/gitbookInfo.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # Checking the Installed Version of Gitbook 5 | 6 | Gitbook.io is under active development. The `gitbookInfo` function will indicate whether a new version of Gitbook is available. 7 | 8 | 9 | ```r 10 | > gitbookInfo() 11 | ``` 12 | 13 | ``` 14 | gitbook is up-to-date with version 0.4.6 15 | ``` 16 | 17 | 18 | If a new version is available, the `installGitbook` function will install the latest version. 19 | 20 | 21 | ```r 22 | > installGitbook() 23 | ``` 24 | 25 | 26 | Additionally, the `checkForGitbook` function will also indicate whether Gitbook is installed and available but will not check the [Node Package Modules](https://www.npmjs.org/) website for the currently available version. 27 | 28 | 29 | ```r 30 | > checkForGitbook() 31 | ``` 32 | 33 | ``` 34 | gitbook is installed and available 35 | ``` 36 | 37 | 38 | The `quiet` parameter will not print any messages. The function returns a logical indicating whether Gitbook is available or not. This may be useful if you are automating your Gitbook development. 39 | 40 | 41 | ```r 42 | > isAvailable <- checkForGitbook(quiet = TRUE) 43 | > isAvailable 44 | ``` 45 | 46 | ``` 47 | [1] TRUE 48 | ``` 49 | 50 | 51 | -------------------------------------------------------------------------------- /website/installation/installation.Rmd: -------------------------------------------------------------------------------- 1 | ```{r knitsetup, echo=FALSE, results='hide', warning=FALSE, message=FALSE, cache=FALSE} 2 | opts_knit$set(base.dir='./', fig.path='', out.format='md') 3 | opts_chunk$set(prompt=TRUE, comment='', results='markup') 4 | # See yihui.name/knitr/options for more Knitr options. 5 | ##### Put other setup R code here 6 | 7 | ``` 8 | 9 | # Installation 10 | 11 | The `gitbook` R package is currently avaiable on [Github](http://github.com). The `devtools` `r citep(bib['devtools'])` package provides a function to install R packages directly from github. 12 | 13 | ```{r installPackage, eval=FALSE} 14 | devtools::install_github('jbryer/Rgitbook') 15 | require(Rgitbook) 16 | ``` 17 | 18 | The [Gitbook.io](http://gitbook.io) framework is built using [Node.js](http://nodejs.org/). Installers are available for most major platforms and can be downloaded from the Node.js website at [http://nodejs.org/download/](http://nodejs.org/download/). 19 | 20 | Once Node.js is installed the `installGitbook` function will attempt to download and install the Gitbook.io framework. 21 | 22 | ```{r installGitbook, eval=FALSE} 23 | installGitbook() 24 | ``` 25 | 26 | We can verify that Gitbook is installed using the `checkForGitbook` function. 27 | 28 | ```{r verifyinstall} 29 | checkForGitbook() 30 | ``` 31 | 32 | ### If Gitbook Installation Fails 33 | 34 | It is possible that the installation of Gitbook will not work since it requires root/administrator access. The `installGitbook` function will print an error message to help you install outside of R. On Mac and Linux systems, the following Unix command will install Gitbook: 35 | 36 | ``` 37 | sudo npm install gitbook -g 38 | ``` 39 | 40 | If you wish to build PDF versions of your book, install the PDF format using the following command: 41 | 42 | ``` 43 | sudo npm install gitbook-pdf -g 44 | ``` 45 | 46 | 47 | -------------------------------------------------------------------------------- /website/installation/installation.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # Installation 5 | 6 | The `gitbook` R package is currently avaiable on [Github](http://github.com). The `devtools` (Wickham & Chang, 2013) package provides a function to install R packages directly from github. 7 | 8 | 9 | ```r 10 | > devtools::install_github("jbryer/Rgitbook") 11 | > require(Rgitbook) 12 | ``` 13 | 14 | 15 | The [Gitbook.io](http://gitbook.io) framework is built using [Node.js](http://nodejs.org/). Installers are available for most major platforms and can be downloaded from the Node.js website at [http://nodejs.org/download/](http://nodejs.org/download/). 16 | 17 | Once Node.js is installed the `installGitbook` function will attempt to download and install the Gitbook.io framework. 18 | 19 | 20 | ```r 21 | > installGitbook() 22 | ``` 23 | 24 | 25 | We can verify that Gitbook is installed using the `checkForGitbook` function. 26 | 27 | 28 | ```r 29 | > checkForGitbook() 30 | ``` 31 | 32 | ``` 33 | gitbook is installed and available 34 | ``` 35 | 36 | 37 | ### If Gitbook Installation Fails 38 | 39 | It is possible that the installation of Gitbook will not work since it requires root/administrator access. The `installGitbook` function will print an error message to help you install outside of R. On Mac and Linux systems, the following Unix command will install Gitbook: 40 | 41 | ``` 42 | sudo npm install gitbook -g 43 | ``` 44 | 45 | If you wish to build PDF versions of your book, install the PDF format using the following command: 46 | 47 | ``` 48 | sudo npm install gitbook-pdf -g 49 | ``` 50 | 51 | 52 | -------------------------------------------------------------------------------- /website/publishing/publishGitbook.Rmd: -------------------------------------------------------------------------------- 1 | ```{r knitsetup, echo=FALSE, results='hide', warning=FALSE, message=FALSE, cache=FALSE} 2 | opts_knit$set(base.dir='./', fig.path='', out.format='md') 3 | opts_chunk$set(prompt=TRUE, comment='', results='markup') 4 | # See yihui.name/knitr/options for more Knitr options. 5 | ##### Put other setup R code here 6 | 7 | ``` 8 | 9 | # Publishing a Gitbook to Github 10 | 11 | The final step is to publish your Gitbook to Github. The `publishGitbook` is a wrapper to `git` that will publish your Gitbook to the `gh-pages` branch of the specified repository. 12 | 13 | ```{r publishGitbook, eval=FALSE} 14 | publishGitbook('jbryer/Rgitbook') 15 | ``` 16 | 17 | The parameters for the `publishGitbook` function are: 18 | 19 | * `repo` - The Github repository to publish to. It should be of the username/repository format. 20 | * `out.dir` (default is the `_book` subdirectory of the current working directory) - The directory containing the generated Gitbook. 21 | * `message` (default is "Update built gitbook") - The commit message. 22 | -------------------------------------------------------------------------------- /website/publishing/publishGitbook.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # Publishing a Gitbook to Github 5 | 6 | The final step is to publish your Gitbook to Github. The `publishGitbook` is a wrapper to `git` that will publish your Gitbook to the `gh-pages` branch of the specified repository. 7 | 8 | 9 | ```r 10 | > publishGitbook("jbryer/Rgitbook") 11 | ``` 12 | 13 | 14 | The parameters for the `publishGitbook` function are: 15 | 16 | * `repo` - The Github repository to publish to. It should be of the username/repository format. 17 | * `out.dir` (default is the `_book` subdirectory of the current working directory) - The directory containing the generated Gitbook. 18 | * `message` (default is "Update built gitbook") - The commit message. 19 | -------------------------------------------------------------------------------- /website/references.Rmd: -------------------------------------------------------------------------------- 1 | # References 2 | 3 | ```{r setup, echo=FALSE, results='hide', message=FALSE, warning=FALSE} 4 | # Uncomment to list all items in the BibTeX file. 5 | #for(i in names(bib)) { print(i); citep(bib[i]) } 6 | ``` 7 | 8 | ```{r bibliography, echo=FALSE, results='asis'} 9 | bibliography() 10 | ``` 11 | -------------------------------------------------------------------------------- /website/references.md: -------------------------------------------------------------------------------- 1 | # References 2 | 3 | 4 | 5 | 6 | 7 | - Hadley Wickham, Winston Chang, (2013) devtools: Tools to make developing R code easier. [http://CRAN.R-project.org/package=devtools](http://CRAN.R-project.org/package=devtools) 8 | - Samy Pessé, Aaron O'Mullan, (2014) Gitbook: Build beautiful interactive books using GitHub/Git and Markdown. [http://www.gitbook.io/](http://www.gitbook.io/) 9 | - Carl Boettiger, (2014) knitcitations: Citations for knitr markdown files. [http://CRAN.R-project.org/package=knitcitations](http://CRAN.R-project.org/package=knitcitations) 10 | 11 | -------------------------------------------------------------------------------- /website/rgitbook.bib: -------------------------------------------------------------------------------- 1 | @Manual{devtools, 2 | title = {devtools: Tools to make developing R code easier}, 3 | author = {Hadley Wickham and Winston Chang}, 4 | year = {2013}, 5 | note = {R package version 1.4.1}, 6 | url = {http://CRAN.R-project.org/package=devtools} 7 | } 8 | 9 | @Manual{rcore, 10 | title = {R: A Language and Environment for Statistical Computing}, 11 | author = {{R Core Team}}, 12 | organization = {R Foundation for Statistical Computing}, 13 | address = {Vienna, Austria}, 14 | year = {2014}, 15 | url = {http://www.R-project.org/} 16 | } 17 | 18 | @Manual{knitcitations, 19 | title = {knitcitations: Citations for knitr markdown files}, 20 | author = {Carl Boettiger}, 21 | year = {2014}, 22 | note = {R package version 0.5-0}, 23 | url = {http://CRAN.R-project.org/package=knitcitations}, 24 | } 25 | 26 | @Manual{gitbook, 27 | title = {Gitbook: Build beautiful interactive books using GitHub/Git and Markdown}, 28 | author = {Samy Pessé and Aaron O'Mullan}, 29 | year = {2014}, 30 | url = {http://www.gitbook.io/} 31 | } 32 | --------------------------------------------------------------------------------