diff --git a/.github/workflows/pushrelease.yml b/.github/workflows/pushrelease.yml index aca6bb10..e453fc5f 100644 --- a/.github/workflows/pushrelease.yml +++ b/.github/workflows/pushrelease.yml @@ -24,13 +24,23 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 + - name: Checkout repo + uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@master + - name: Setup R + uses: r-lib/actions/setup-r@master with: r-version: ${{ matrix.config.r }} - uses: r-lib/actions/setup-pandoc@master +# - name: Setup tinytex +# uses: r-lib/actions/setup-tinytex@master + +# - name: Setup pandoc +# uses: r-lib/actions/setup-pandoc@v1 +# with: +# pandoc-version: '2.7.3' # The pandoc version to download (if necessary) and use. + - name: Query dependencies run: | install.packages('remotes') @@ -96,6 +106,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} WITH_V: true DEFAULT_BUMP: patch + RELEASE_BRANCHES: main - name: Checkout two uses: actions/checkout@v2 - name: Create Release diff --git a/.gitignore b/.gitignore index 6d15e36a..1430ca5d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ oxforddown/* docs/* Untitled/* *.Rd +*.maf +*.mtc* +inst/rmarkdown/templates/thesis/skeleton/_bookdown_files/* diff --git a/DESCRIPTION b/DESCRIPTION index ce1dda1a..272f9eb4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: iheiddown -Title: A RMarkdown class for IHEID documents -Date: 2020-09-14 -Version: 0.7.0 +Title: A package for writing IHEID documents in RMarkdown +Date: 2020-10-01 +Version: 0.7.1 Authors@R: c(person(given = "James", family = "Hollway", diff --git a/NEWS.md b/NEWS.md index 509a5885..acde23e1 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,16 @@ +# iheiddown 0.7.1 + +## Thesis + +* Rescaled `{citr}` image in chapter 2 of template +* Added `{Equatiomatic}` option to chapter 3 of thesis template +* Added IHEIDThesisExample.pdf for demonstration purposes + +## Package + +* Updated README +* Added info on load + # iheiddown 0.7.0 ## Thesis diff --git a/R/zzz.R b/R/zzz.R new file mode 100644 index 00000000..26fa4b5c --- /dev/null +++ b/R/zzz.R @@ -0,0 +1,9 @@ +#' @importFrom utils packageVersion packageDescription +.onLoad <- function(libname, pkgname) { + packageStartupMessage(pkgname, " for IHEID\n") + packageStartupMessage("Version ", utils::packageVersion("iheiddown"), + " created on ", + utils::packageDescription("iheiddown", fields = "Date"), + "\n" + ) +} diff --git a/README.md b/README.md index 29734140..3e535988 100644 --- a/README.md +++ b/README.md @@ -5,40 +5,58 @@ ![GitHub Release Date](https://img.shields.io/github/release-date/jhollway/iheiddown) ![GitHub issues](https://img.shields.io/github/issues-raw/jhollway/iheiddown) [![HitCount](http://hits.dwyl.com/jhollway/iheiddown.svg)](http://hits.dwyl.com/jhollway/iheiddown) -[![Codecov test coverage](https://codecov.io/gh/jhollway/iheiddown/branch/master/graph/badge.svg)](https://codecov.io/gh/jhollway/iheiddown?branch=master) +[![Codecov test coverage](https://codecov.io/gh/jhollway/iheiddown/branch/main/graph/badge.svg)](https://codecov.io/gh/jhollway/iheiddown?branch=main) -This GitHub repository provides an R Markdown template for writing -a Masters or PhD Dissertation at the Graduate Institute of International and Development Studies in Geneva -in RStudio based on the [IHEID LaTeX dissertation template](https://github.com/jhollway/iheidmytex). - -_R Markdown_ creates a user-friendly, simple and straightforward way to write a well-formatted dissertation, -with nicely formatted paragraphs, tables and figures that can be generated directly from your data, -weaving together argument, evidence, and interpretation. -The use of LaTeX in combination with _Markdown_ is more consistent than the output of a word processor, -much less prone to corruption or crashing, and the resulting file is smaller than a Word file. -While you may have never had problems using Word in the past, -your thesis is likely going to be about twice as large and complex as anything you've written before, -taxing Word's capabilities. -Though `iheiddown` should shine in particular for those who are analysing data, -or are including tables, figures, equations, or complex cross-references -(e.g. table of contents, figures, tables, appendices, or an index) in their dissertation, -the user-friendly nature and pretty output should make it of great benefit to nearly anyone writing a thesis project. - -## Features +`{iheiddown}` is a package that provides templates for writing documents +in styles consistent with the Graduate Institute of International and Development Studies in Geneva/ +Institut de hautes études internationales et du développement (IHEID) +in (R) markdown. -- Conforms to the PhD dissertation guidelines +The main use case for `{iheiddown}` is for writing +a **Masters or PhD Dissertation at IHEID**, +as it offers a user-friendly, simple, and straightforward way +to write a well-formatted and consistent dissertation +that weaves together argument, evidence, and interpretation. -- All six title pages with IHEID logo +## Features -- Front and back matter, including dedication, abstract, abbreviations, +The package is built upon the [IHEID LaTeX dissertation template](https://github.com/jhollway/iheidmytex), +which offers versus common word processors: +- less prone to corruption or crashing +- more internal consistency +- ensured consistency with the IHEID dissertation and other guidelines, e.g. dedication, abstract, abbreviations, tables of contents, figures, and tables +- automatic figure and table referencing +- automatic creation of your bibliography +- cross-referencing +- smaller files +- automatic versioning +- and much more! +Though you may have never had problems using Word in the past, +the size and structure of most theses tax Word's capabilities. + +However, `{iheiddown}` helps you avoid the need to (learn how to) write in LaTeX. +LaTeX can be daunting for first time users, +and many users often feel it would only pay off if they were writing very complex dissertations. +`{iheiddown}` allows students to write their dissertations in _RMarkdown_. +[_Markdown_](https://www.markdownguide.org) is a simple and easy-to-use way to 'markup' parts of plain text as headings, **bold** or *italics* +(and much more) in ways that remain very readable and thus editable as you write. +`{iheiddown}`, R, and LaTeX do the work to turn this into a beautiful dissertation. +You write in minimally marked-up plan text and you get a correctly-formatted dissertation out at the end. + +But wait, there's more! +Because `{iheiddown}` is an **R** package, +it especially shines for those who are analysing data. +[R](https://www.r-project.org) is a *free* statistical programme and language +that has a *huge* range of packages available for most current methods of analysis and visualisation. +[RStudio](https://rstudio.com) is a typical frontend that makes working in **R** +and especially with `{iheiddown}` easy. +So though `{iheiddown}` is especially attractive to those writing dissertations with many tables and figures, +the user-friendly nature and pretty output should make it of great benefit to nearly anyone writing a thesis project. -- Linked cross-referencing - -- And much more! - +You can see an example of the kind of dissertation output you can expect [here](https://github.com/jhollway/iheiddown/inst/rmarkdown/templates/thesis/skeleton/versions/Thesis.pdf). ## Installing iheiddown @@ -97,17 +115,17 @@ the preface of the thesis when it is compiled. So where is the real content of the dissertation? Just as the abstract and acknowledgements, etc, -were kept in a "front-and-back-matter/" folder, +were kept in a "front-matter/" folder, so too are the individual chapters of your dissertation kept in a "chapters/" folder. The placeholder text is designed to take you through the basic syntax and more complicated options available when -using Rmarkdown, +using _RMarkdown_, but once you feel comfortable and have created your own examples, feel free to delete the placeholder text (or even the files) and create your own in its place. -Markdown is easy to read as well as write, +_Markdown_ is easy to read as well as write, so there's no need for endless compilation. But when it comes time to compile the document, just turn to your main .Rmd file ('Untitled.Rmd' in our case) diff --git a/inst/rmarkdown/templates/syllabus/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/syllabus/skeleton/skeleton.Rmd index a3fde086..742f4fba 100644 --- a/inst/rmarkdown/templates/syllabus/skeleton/skeleton.Rmd +++ b/inst/rmarkdown/templates/syllabus/skeleton/skeleton.Rmd @@ -76,7 +76,7 @@ csl: geneva-syllabus.csl ##################### output: iheiddown::syllabus_pdf: - input: "Untitled.Rmd" # Replace with whatever the name of this file is, e.g. "MINT001.Rmd" + input: "skeleton.Rmd" # Replace with whatever the name of this file is, e.g. "MINT001.Rmd" output_file: *code link-citations: true draft: true diff --git a/inst/rmarkdown/templates/thesis/skeleton/_bookdown.yml b/inst/rmarkdown/templates/thesis/skeleton/_bookdown.yml index 5d7d3969..339369f4 100644 --- a/inst/rmarkdown/templates/thesis/skeleton/_bookdown.yml +++ b/inst/rmarkdown/templates/thesis/skeleton/_bookdown.yml @@ -12,7 +12,7 @@ rmd_subdir: ["front-matter","chapters"] output_dir: "versions" # Please suggest and submit changes to the source .Rmd files here: -edit: https://github.com/jhollway/iheiddown/tree/master/%s +edit: https://github.com/jhollway/iheiddown/tree/main/%s # If this is set to true, then you don't have to manually delete the merged _main.Rmd file # if something goes wrong when you try to build diff --git a/inst/rmarkdown/templates/thesis/skeleton/chapters/02-theory.Rmd b/inst/rmarkdown/templates/thesis/skeleton/chapters/02-theory.Rmd index 6b529324..cbcbbc50 100644 --- a/inst/rmarkdown/templates/thesis/skeleton/chapters/02-theory.Rmd +++ b/inst/rmarkdown/templates/thesis/skeleton/chapters/02-theory.Rmd @@ -60,12 +60,14 @@ You can add prefixes too [see @bookdown2016; cf. @solomon2020]. A more efficient way for entering these into your documents is by using the R package `citr`. The `citr` package includes an 'addin' for RStudio that you can bind a keyboard shortcut to, and that raises a search window where you can type author, year, or title information in to to find the required entry/ies. - -![Citing with citr](../figures/citr.png) - It is enormously useful, particularly as your bibliography gets larger. If you'd like to learn more, see [the README of its GitHub account](https://github.com/crsh/citr). +![Citing with citr](../figures/citr.png){ width=100%, height=45% } + + +\newpage + ### Tips for bibliographies - Like with thesis formatting, the sooner you start compiling your bibliography for something as large as thesis, the better. diff --git a/inst/rmarkdown/templates/thesis/skeleton/chapters/03-method.Rmd b/inst/rmarkdown/templates/thesis/skeleton/chapters/03-method.Rmd index 41039040..852fdd6d 100644 --- a/inst/rmarkdown/templates/thesis/skeleton/chapters/03-method.Rmd +++ b/inst/rmarkdown/templates/thesis/skeleton/chapters/03-method.Rmd @@ -49,6 +49,14 @@ c_2&c_3\hfill&c_4\hfill&\ldots&c_{n+2}\hfill\cr c_n&c_{n+1}\hfill&c_{n+2}\hfill&\ldots&c_{2n}\hfill\cr \end{matrix}\right|>0$$ + +### Model equations + +One hassle is writing \LaTeX\ equations for the models you run in your analysis. +Fortunately, there is an app (sic: package) for that! +[`{Equatiomatic}`](https://github.com/datalorax/equatiomatic) takes some of the pain out of that chore. +More details can be found [here](https://datalorax.github.io/equatiomatic/articles/intro-equatiomatic.html#other-models-1). + ### Symbols Many of the symbols you will need can be found on the [Comprehensive LaTeX Symbol Guide](https://mirror.utexas.edu/ctan/info/symbols/comprehensive/symbols-letter.pdf). diff --git a/inst/rmarkdown/templates/thesis/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/thesis/skeleton/skeleton.Rmd index 6a2ec0a0..63412068 100644 --- a/inst/rmarkdown/templates/thesis/skeleton/skeleton.Rmd +++ b/inst/rmarkdown/templates/thesis/skeleton/skeleton.Rmd @@ -49,10 +49,11 @@ doi-in-bibliography: true #set to true if you want DOI's to be shown in the bibl ##################### ## PDF Formatting ## ##################### -draft: true # add as DRAFT mark in the footer? +draft: true # add DRAFT mark in the footer? page-layout: oneside #'oneside' for PDF output (equal margins), -# 'twoside' for two-sided binding (mirror margins and blank pages) -hidelinks: false #if false, the PDF output highlights clickable links with a colored border - you will probably want to set this to true for PDF version you wish to physically print +# or 'twoside' for two-sided binding (mirror margins and blank pages) +hidelinks: false #if false, the PDF output highlights clickable links with a colored border +# you will probably want to set this to true for PDF version you wish to physically print ##################### ## Output Options ## diff --git a/inst/rmarkdown/templates/thesis/skeleton/versions/IHEIDThesisExample.pdf b/inst/rmarkdown/templates/thesis/skeleton/versions/IHEIDThesisExample.pdf new file mode 100644 index 00000000..afffee27 Binary files /dev/null and b/inst/rmarkdown/templates/thesis/skeleton/versions/IHEIDThesisExample.pdf differ diff --git a/inst/rmarkdown/templates/thesis/template.yaml b/inst/rmarkdown/templates/thesis/template.yaml index e9edbfb5..56914939 100644 --- a/inst/rmarkdown/templates/thesis/template.yaml +++ b/inst/rmarkdown/templates/thesis/template.yaml @@ -2,4 +2,4 @@ name: Thesis description: > A template for writing a thesis at the Graduate Institute of International and Development Studies, Geneva (IHEID) -create_dir: false \ No newline at end of file +create_dir: false