GithubHelp home page GithubHelp logo

marblo / lecturenotes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grantmcdermott/lecturenotes

0.0 1.0 0.0 24.94 MB

My lecture notes Rmd template

License: Other

R 0.04% TeX 0.18% HTML 99.78% CSS 0.01%

lecturenotes's Introduction

An R Markdown template for writing lecture notes and academic papers

lecturenotes is a personalised .Rmd template that I use for writing my lecture notes and academic papers. It is intended for documents that are going to be exported (i.e. “knitted”) to both HTML and PDF formats. In so doing, it tries to take care of various annoyances and inconsistencies that arise between these two formats. For example:

  • Recognizing the author “affiliation” field in PDF documents.
  • Support for consistent multi-column environments in both HTML and PDF.
  • Support for non-standard fonts when knitting to PDF.
  • Sensible handling of interactive content depending on the output format.
  • Etc.

To get a sense of the resulting output, here are some screen grabs of the knitted template:

  1. PDF (live)

  2. HTML (live)

Installation and usage

I don’t foresee submitting this bespoke package to CRAN. However, you can easily install it from GitHub:

# install.packages("remotes")
remotes::install_github("grantmcdermott/lecturenotes")

Once the package is installed, open up the lecturenotes template in RStudio by navigating to:

File > New File > R Markdown > From Template > Lecture Notes

Limitations

This R Markdown template was mostly designed for my own use. As such, it comes with no guarantees; although, please do let me know if you run into problems. Some potential limitations and requirements perhaps worth highlighting:

  • The PDF output has only been tested on a TexLive distribution using XeLaTeX. I cannot guarantee that other LaTeX distributions or engines will work without some tinkering.
  • Similarly, I have adopted some opinionated takes on optimal LaTeX fonts. I use Cochineal as the main font and Fira for the sans and mono fonts. You may need to change or comment out these lines of the template, depending on your own system and/or preferences.
  • The template generally does a good job of automatically handling interactive content depending on the output format. For example, it tries to ignore interactive content when exporting to PDF. One notable exception is rendering of GIFs. I provide an example of how to handle this manually in the template itself.

Acknowledgements

This template essentially pulls together a bunch of tips, tricks, and ideas that I’ve accumulated over time to fit my own idiosyncratic writing and formatting needs. Some of these I stumbled upon on myself, most of them I found the old-fashioned way (i.e. searching on the Internet). Here is a non-exhaustive list of helpful sources that I’ve drawn upon.

License

The material in this repository is made available under the MIT license.

lecturenotes's People

Contributors

grantmcdermott avatar marblo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.