Skip to content

Commit

Permalink
Completed PDF version
Browse files Browse the repository at this point in the history
  • Loading branch information
ismayc committed Aug 16, 2016
1 parent e65629f commit 21119a1
Show file tree
Hide file tree
Showing 45 changed files with 56,161 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
@@ -0,0 +1,2 @@
^.*\.Rproj$
^\.Rproj\.user$
3 changes: 3 additions & 0 deletions .gitignore
@@ -0,0 +1,3 @@
.Rproj.user
.Rhistory
.RData
19 changes: 19 additions & 0 deletions DESCRIPTION
@@ -0,0 +1,19 @@
Package: thesisdown
Title: An updated R Markdown thesis template using the bookdown package
Version: 0.0.1
Authors@R: person("Chester", "Ismay", email = "chester.ismay@gmail.com", role = c("aut", "cre"))
Description: Using the bookdown package and LaTeX and Word thesis templates from
Reed College, this package aims to encourage reproducible research using
simple Markdown syntax while embedding all of the R code to produce plots
and analyses as well.
Depends:
R (>= 3.3.0),
devtools,
dplyr,
ggplot2,
bookdown,
knitr
License: MIT
Encoding: UTF-8
LazyData: true
RoxygenNote: 5.0.1
3 changes: 3 additions & 0 deletions NAMESPACE
@@ -0,0 +1,3 @@
# Generated by roxygen2: do not edit by hand

export(thesis_pdf)
33 changes: 33 additions & 0 deletions R/thesis.R
@@ -0,0 +1,33 @@
#' Creates an R Markdown PDF Thesis document
#'
#' This is a function called in output in the YAML of the driver Rmd file
#' to specify using the Reed College Senior Thesis LaTeX template and cls files.
#'
#' @export
#' @param toc A Boolean (TRUE or FALSE) specifying where table of contents should be created
#' @param toc_depth A positive integer
#' @return A modified \code{pdf_document} based on the Reed Senior Thesis LaTeX
#' template
#' @examples
#' \dontrun{
#' output: thesisdown::thesis_pdf
#' }
thesis_pdf <- function(toc = TRUE, toc_depth = 3){
#template <- system.file("template.tex", package = )

base <- bookdown::pdf_book(template = "template.tex",
toc = toc,
toc_depth = toc_depth,
highlight = "pygments",
keep_tex = TRUE,
pandoc_args = "--chapters")

# Mostly copied from knitr::render_sweave
base$knitr$opts_chunk$comment <- NA
base$knitr$opts_chunk$fig.align <- "center"
base$knitr$knit_hooks$plot <- knitr:::hook_plot_tex

base
# }

}
15 changes: 15 additions & 0 deletions R/thesisdown.R
@@ -0,0 +1,15 @@
#' thesisdown: A package for creating undergraduate, Masters, and PhD theses
#'using R Markdown
#'
#' The reedtemplates package provides three important functions:
#' reed_thesis, label, and ref.
#'
#' @section thesis_gitbook:
#' Creates an R Markdown thesis template as a webpage
#' @section thesis_pdf:
#' Creates an R Markdown thesis template as a PDF
#' @section thesis_word:
#' Creates an R Markdown thesis template as a Microsoft Word document
#' @docType package
#' @name thesisdown
NULL
32 changes: 32 additions & 0 deletions inst/rmarkdown/templates/thesis/skeleton/_book/thesis.log
@@ -0,0 +1,32 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex 2016.5.22) 16 AUG 2016 13:40
entering extended mode
\write18 enabled.
%&-line parsing enabled.
**thesis.tex
(./thesis.tex
LaTeX2e <2016/03/31>
Babel <3.9r> and hyphenation patterns for 83 language(s) loaded.

! LaTeX Error: File `reedthesis.cls' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: cls)

Enter file name:
! Emergency stop.
<read *>

l.33 \usepackage
{graphicx,latexsym}^^M
*** (cannot \read from terminal in nonstop modes)


Here is how much of TeX's memory you used:
10 strings out of 493014
192 string characters out of 6133351
53601 words of memory out of 5000000
3651 multiletter control sequences out of 15000+600000
3640 words of font info for 14 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
10i,0n,7p,81b,8s stack positions out of 5000i,500n,10000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!
Binary file not shown.

0 comments on commit 21119a1

Please sign in to comment.