Skip to content

Commit

Permalink
Merge pull request #183 from Samasaur1/master
Browse files Browse the repository at this point in the history
Add an optional list of abbreviations and allow single quotes in prelims
  • Loading branch information
ismayc committed Dec 5, 2022
2 parents 3511003 + ed3ecc4 commit 8f66a48
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 2 deletions.
11 changes: 10 additions & 1 deletion inst/rmarkdown/templates/thesis/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ output:
# (e.g., abstract, acknowledgements) below or use code similar to line 25-26
# for the .RMD files. If you are NOT producing a PDF, delete or silence
# lines 25-39 in this YAML header.
abstract: '`r if(knitr:::is_latex_output()) paste(readLines(here::here("prelims", "00-abstract.Rmd")), collapse = "\n ")`'
abstract: |
`r if(knitr:::is_latex_output()) paste(readLines(here::here("prelims", "00-abstract.Rmd")), collapse = "\n ")`
# If you'd rather include the preliminary content in files instead of inline
# like below, use a command like that for the abstract above. Note that a tab
# is needed on the line after the `|`.
Expand All @@ -45,6 +46,14 @@ dedication: |
preface: |
This is an example of a thesis setup to use the reed thesis document class
(for LaTeX) and the R bookdown package, in general.
abbreviations:
ABC: American Broadcasting Company
CBS: Colombia Broadcasting System
CUS: Computer User Services
PBS: Public Broadcasting System
NBC: National Broadcasting Company
# Note that abbreviations in lowercase letters will NOT be automatically capitalized
# Delete or silence the abbreviations section if you do not want a list of abbreviations

# Specify the location of the bibliography below
bibliography: bib/thesis.bib
Expand Down
12 changes: 12 additions & 0 deletions inst/rmarkdown/templates/thesis/skeleton/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,18 @@
\end{preface}
$endif$

$if(abbreviations)$
\chapter*{List of Abbreviations}
\begin{table}[h]
\centering
\begin{tabular}{ll}
$for(abbreviations/pairs)$
\textbf{$it.key$} & $it.value$ \\
$endfor$
\end{tabular}
\end{table}
$endif$

$if(toc)$
\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
\setcounter{secnumdepth}{$toc-depth$}
Expand Down
11 changes: 10 additions & 1 deletion inst/rstudio/templates/project/resources/index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ output:
# (e.g., abstract, acknowledgements) below or use code similar to line 25-26
# for the .RMD files. If you are NOT producing a PDF, delete or silence
# lines 25-39 in this YAML header.
abstract: '`r if(knitr:::is_latex_output()) paste(readLines(here::here("prelims", "00-abstract.Rmd")), collapse = "\n ")`'
abstract: |
`r if(knitr:::is_latex_output()) paste(readLines(here::here("prelims", "00-abstract.Rmd")), collapse = "\n ")`
# If you'd rather include the preliminary content in files instead of inline
# like below, use a command like that for the abstract above. Note that a tab
# is needed on the line after the `|`.
Expand All @@ -45,6 +46,14 @@ dedication: |
preface: |
This is an example of a thesis setup to use the reed thesis document class
(for LaTeX) and the R bookdown package, in general.
abbreviations:
ABC: American Broadcasting Company
CBS: Colombia Broadcasting System
CUS: Computer User Services
PBS: Public Broadcasting System
NBC: National Broadcasting Company
# Note that abbreviations in lowercase letters will NOT be automatically capitalized
# Delete or silence the abbreviations section if you do not want a list of abbreviations

# Specify the location of the bibliography below
bibliography: bib/thesis.bib
Expand Down
12 changes: 12 additions & 0 deletions inst/rstudio/templates/project/resources/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,18 @@
\end{preface}
$endif$

$if(abbreviations)$
\chapter*{List of Abbreviations}
\begin{table}[h]
\centering
\begin{tabular}{ll}
$for(abbreviations/pairs)$
\textbf{$it.key$} & $it.value$ \\
$endfor$
\end{tabular}
\end{table}
$endif$

$if(toc)$
\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$black$endif$}
\setcounter{secnumdepth}{$toc-depth$}
Expand Down

0 comments on commit 8f66a48

Please sign in to comment.