Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions R/epurate.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,25 @@ QIMR <- function(toc = TRUE, code_folding = "hide", number_sections=TRUE) {
code_folding = code_folding,
)
}

# Features of EAFIT Template
EAFIT <- function(toc = TRUE, code_folding = "show", number_sections = TRUE) {

# get the locations of resource files located within the package
css <- system.file("rmarkdown", "templates", "EAFIT" ,"resources", "style.css", package = "epuRate")
template <- system.file("rmarkdown", "templates", "EAFIT" ,"resources", "template_eafit.html", package = "epuRate")
bibliography <- system.file("rmarkdown", "templates", "EAFIT" ,"resources", "bibliography.bib", package = "epuRate")

# call the base html_document function
rmarkdown::html_document( theme= "lumen",
template = template,
css = css,
bibliography = bibliography,
toc = toc,
toc_float = TRUE,
toc_depth = 2,
number_sections = number_sections,
df_print = "paged",
code_folding = code_folding,
)
}
140 changes: 140 additions & 0 deletions inst/rmarkdown/templates/EAFIT/resources/bibliography.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
@Manual{R-bookdown,
title = {bookdown: Authoring Books and Technical Documents with R Markdown},
author = {Yihui Xie},
year = {2020},
note = {R package version 0.19},
url = {https://CRAN.R-project.org/package=bookdown},
}

@Manual{R-citr,
title = {citr: RStudio Add-in to Insert Markdown Citations},
author = {Frederik Aust},
year = {2019},
note = {R package version 0.3.2},
url = {https://CRAN.R-project.org/package=citr},
}

@Manual{R-epuRate,
title = {epuRate: A clean template for R Markdown documents},
author = {Yan Holtz},
year = {2020},
note = {R package version 0.1},
}

@Manual{R-ggsci,
title = {ggsci: Scientific Journal and Sci-Fi Themed Color Palettes for
'ggplot2'},
author = {Nan Xiao},
year = {2018},
note = {R package version 2.9},
url = {https://CRAN.R-project.org/package=ggsci},
}

@Manual{R-hrbrthemes,
title = {hrbrthemes: Additional Themes, Theme Components and Utilities for 'ggplot2'},
author = {Bob Rudis},
year = {2020},
note = {R package version 0.8.0},
url = {https://CRAN.R-project.org/package=hrbrthemes},
}

@Manual{R-icon,
title = {icon: SVG Icons for R Documents and Apps},
author = {Mitchell O'Hara-Wild},
year = {2020},
note = {R package version 0.1.0.9000},
url = {https://github.com/mitchelloharawild/icon},
}

@Manual{R-knitr,
title = {knitr: A General-Purpose Package for Dynamic Report Generation in R},
author = {Yihui Xie},
year = {2020},
note = {R package version 1.29},
url = {https://CRAN.R-project.org/package=knitr},
}

@Manual{R-patchwork,
title = {patchwork: The Composer of Plots},
author = {Thomas Lin Pedersen},
year = {2019},
note = {R package version 1.0.0},
url = {https://CRAN.R-project.org/package=patchwork},
}

@Manual{R-rmarkdown,
title = {rmarkdown: Dynamic Documents for R},
author = {JJ Allaire and Yihui Xie and Jonathan McPherson and Javier Luraschi and Kevin Ushey and Aron Atkins and Hadley Wickham and Joe Cheng and Winston Chang and Richard Iannone},
year = {2020},
note = {R package version 2.2},
url = {https://CRAN.R-project.org/package=rmarkdown},
}

@Manual{R-tidytuesdayR,
title = {tidytuesdayR: Access the Weekly 'TidyTuesday' Project Dataset},
author = {Ellis Hughes},
year = {2020},
note = {R package version 1.0.0},
url = {https://CRAN.R-project.org/package=tidytuesdayR},
}

@Manual{R-tidyverse,
title = {tidyverse: Easily Install and Load the 'Tidyverse'},
author = {Hadley Wickham},
year = {2019},
note = {R package version 1.3.0},
url = {https://CRAN.R-project.org/package=tidyverse},
}

@Book{bookdown2016,
title = {bookdown: Authoring Books and Technical Documents with {R} Markdown},
author = {Yihui Xie},
publisher = {Chapman and Hall/CRC},
address = {Boca Raton, Florida},
year = {2016},
note = {ISBN 978-1138700109},
url = {https://github.com/rstudio/bookdown},
}

@Book{knitr2015,
title = {Dynamic Documents with {R} and knitr},
author = {Yihui Xie},
publisher = {Chapman and Hall/CRC},
address = {Boca Raton, Florida},
year = {2015},
edition = {2nd},
note = {ISBN 978-1498716963},
url = {https://yihui.org/knitr/},
}

@InCollection{knitr2014,
booktitle = {Implementing Reproducible Computational Research},
editor = {Victoria Stodden and Friedrich Leisch and Roger D. Peng},
title = {knitr: A Comprehensive Tool for Reproducible Research in {R}},
author = {Yihui Xie},
publisher = {Chapman and Hall/CRC},
year = {2014},
note = {ISBN 978-1466561595},
url = {http://www.crcpress.com/product/isbn/9781466561595},
}

@Book{rmarkdown2018,
title = {R Markdown: The Definitive Guide},
author = {Yihui Xie and J.J. Allaire and Garrett Grolemund},
publisher = {Chapman and Hall/CRC},
address = {Boca Raton, Florida},
year = {2018},
note = {ISBN 9781138359338},
url = {https://bookdown.org/yihui/rmarkdown},
}

@Article{tidyverse2019,
title = {Welcome to the {tidyverse}},
author = {Hadley Wickham and Mara Averick and Jennifer Bryan and Winston Chang and Lucy D'Agostino McGowan and Romain Fran??ois and Garrett Grolemund and Alex Hayes and Lionel Henry and Jim Hester and Max Kuhn and Thomas Lin Pedersen and Evan Miller and Stephan Milton Bache and Kirill M??ller and Jeroen Ooms and David Robinson and Dana Paige Seidel and Vitalie Spinu and Kohske Takahashi and Davis Vaughan and Claus Wilke and Kara Woo and Hiroaki Yutani},
year = {2019},
journal = {Journal of Open Source Software},
volume = {4},
number = {43},
pages = {1686},
doi = {10.21105/joss.01686},
}
Binary file not shown.
100 changes: 100 additions & 0 deletions inst/rmarkdown/templates/EAFIT/resources/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
h1, .h1, h2, .h2, h3, .h3 {
margin-top: 40px;
}

h1 {
padding-top: 40px;
}

h1.title {
text-align: center;
}

h3.subtitle {
text-align: center;
}

pre {
border: 0px solid #cccccc;
border-radius: 0px;
}

body{
text-align: justify;
font-size: 10pt
}




/* ---------- Links ----------------- */
a {
color: #000080;
}
a:hover {
color: #000080;
}




/* ---------- TOC ----------------- */
#TOC {
top: 40%;
position: fixed;
width: 210px;
}
.tocify {
border: none;
color: grey;
border-radius: 0px;
}
.list-group-item.active {
color: #000080;
background-color: white;
border-left: solid;
border-color: #000080;
}
.list-group-item:hover {
color: #000080;
background-color: white;
border-left: solid;
border-color: #000080;
}
.tocify-extend-page {
display: none;
}

/* ------ This is just to fix the bug on Safari where table of content is on top of content */
.toc-content {
margin-left: 210px
}

/* ------ Don't display on small media */
@media (max-width: 1400px) {
#TOC {
width: auto;
display: none;
}
.toc-content {
margin-left: auto
}
}


/* ---------- Button ----------------- */
.btn {
border-width: 0 0px 0px 0px;
font-weight: normal;
text-transform: ;
color: #000080;
}
.btn-default {
color: #000080;
background-color: #ffffff;
border-color: #ffffff;
}

.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus {
background-color: #000080;
}
Loading