-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
700fd57
commit 9b18bd1
Showing
10 changed files
with
594 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
46 changes: 46 additions & 0 deletions
46
inst/rmarkdown/templates/lecturenotes-lean/skeleton/skeleton.Rmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: Course title | ||
subtitle: Lecture title | ||
author: | ||
name: Your name | ||
affiliation: University | Course code | ||
# date: "`r format(Sys.time(), '%d %B %Y')`" ## Or "Lecture no." | ||
output: | ||
html_document: | ||
keep_md: false | ||
theme: journal | ||
highlight: haddock | ||
# code_folding: show | ||
toc: yes | ||
toc_depth: 4 | ||
toc_float: yes | ||
css: css/preamble.css ## For multi-col environments | ||
pdf_document: | ||
latex_engine: xelatex | ||
keep_tex: false ## Change to true if want keep intermediate .tex file | ||
toc: true | ||
toc_depth: 3 | ||
dev: cairo_pdf | ||
# fig_width: 7 ## Optional: Set default PDF figure width | ||
# fig_height: 6 ## Optional: Set default PDF figure height | ||
extra_dependencies: ['booktabs', 'threeparttable', 'float'] # "longtable" | ||
includes: | ||
in_header: tex/preamble.tex ## For multi-col environments | ||
pandoc_args: | ||
--template=tex/mytemplate.tex ## For affiliation field. See: https://bit.ly/2T191uZ | ||
always_allow_html: true | ||
urlcolor: blue | ||
mainfont: cochineal | ||
sansfont: Fira Sans | ||
monofont: Fira Code ## Although, see: https://tex.stackexchange.com/q/294362 | ||
## Automatically knit to both formats: | ||
knit: (function(inputFile, encoding) { | ||
rmarkdown::render(inputFile, encoding = encoding, | ||
output_format = 'all') | ||
}) | ||
--- | ||
|
||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set(echo = TRUE, cache = TRUE, dpi=300) | ||
``` | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: Lecture Notes (lean) | ||
description: > | ||
My Rmd lecture notes setup, designed for exporting to both HTML and PDF | ||
formats. Takes care of things like consistent multi-column environments and | ||
regression table output, support for non-standard fonts in figures, nice | ||
affiliation typesetting for PDF format, etc. | ||
Note: This "lean" version just includes the scaffolding without any example | ||
code. | ||
create_dir: FALSE |
2 changes: 2 additions & 0 deletions
2
inst/rmarkdown/templates/lecturenotes/skeleton/css/preamble.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/* See: https://bookdown.org/yihui/rmarkdown-cookbook/multi-column.html */ | ||
.columns {display: flex; flex-basis: auto} |
File renamed without changes.
Oops, something went wrong.