Skip to content

profinit/quarto-templates

Repository files navigation

Quarto Templates

This project is an implementation of Profinit templates for Quarto.

Important links:

Prerequisites

  • Quarto.
  • (Optional) Python: only needed if we are using Python for code blocks. If we do not want to use the default installation, we should have our Python activated.
  • (Optional) R: only needed if we are using R code blocks.

Python: Packages

In Python, we want to have the following packages installed:

  • jupyter: necessary for generating reports.
  • (Recommended) tabulate: recommended for better handling of tables.

Quick Tryout

With the following procedure, we can very quickly try the Profinit template on a pre-prepared file.

quarto use template profinit/quarto-templates

This will install all necessary files either in the current directory or in a chosen subdirectory. Among other things, template.qmd will be downloaded, on which we can easily try the templates.

cd /path/to/dir/with/template/qmd
quarto render template.qmd --to profinit-html

Installation

Suppose we have some template.qmd file that we want to render using Quarto. Now we may want

Before installing, we must first go to the directory where this file is.

cd /path/to/file/qmd/directory

Now into this directory, we will install the Profinit Quarto templates.

quarto add profinit/quarto-templates

This command will add the _extensions folder to the working directory.

Usage

Now we are in the directory with template.qmd. When rendering, the directory from which we are running the rendering must have the Profinit Quarto templates installed. Now using the following commands.

Html

quarto render template.qmd --to profinit-html

Pdf

quarto render template.qmd --to profinit-pdf

Revealjs

quarto render template.qmd --to profinit-revealjs

Docx

quarto render template.qmd --to profinit-docx

All Configured Formats

Quarto can also be used to render all configured formats in the Quarto header:

quarto render template.qmd

Note that this can sometimes cause errors due to format conflicts (like with docx and pdf both configured).