Skip to content

debruine/booktem

Repository files navigation

booktem

Codecov test coverage

The goal of booktem is to make the creation of methods books quick and easy. It integrates with webexercises for short self-checking quizzes and glossary for defining terms in text and creating glossary tables.

Installation

You can install the development version of booktem like so:

devtools::install_github("debruine/booktem")

Example

Set up a book; this function creates a project at the specified path, renders the demo book in Quarto, opens the book in a web browser, and opens the project in a new RStudio window. The demo book gives examples of the features included in the book.

library(booktem)

create_book(path = "demobook", 
            title = "My Demo Book",
            authors = "My Name")

Set up a custom red, white and blue stripe on the top of the book (instead of the psyTeachR rainbow stripe).

stripe_colors <- c(red = "red",
                   white = "white",
                   blue = "blue")
stripe_css <- stripes(stripe_colors, height = 10)

create_book(path = "demobook", 
            title = "My Demo Book",
            authors = "My Name",
            css = stripe_css)