Skip to main content

Quarto Guide

1. Installation

Since Quarto is a command-line interface (CLI) tool, the installation method differs slightly between Arch-based (Manjaro) and RPM-based (OpenSUSE) systems.

Manjaro (Arch-based)

The easiest way to install Quarto on Manjaro is via the AUR (Arch User Repository). We recommend the "bin" version to avoid long compilation times.

Using Pamac (GUI/CLI):

pamac build quarto-cli-bin

Using Yay (CLI):

yay -S quarto-cli-bin

OpenSUSE (RPM-based)

Quarto does not officially publish an .rpm file, but they provide a standalone Linux tarball that works perfectly on OpenSUSE (Leap or Tumbleweed).

  1. Download the tarball: Go to the Quarto Releases page and download quarto-1.x.x-linux-amd64.tar.gz.

  2. Install via Terminal: Assuming the file is in your Downloads folder:

    # Create a directory for quarto
    sudo mkdir -p /opt/quarto

    # Extract the archive (replace version number with downloaded version)
    cd ~/Downloads
    sudo tar -C /opt/quarto -xvzf quarto-1.6.39-linux-amd64.tar.gz --strip-components=1

    # Create a symlink so you can run 'quarto' from anywhere
    sudo ln -s /opt/quarto/bin/quarto /usr/local/bin/quarto
  3. Verify Installation:

    quarto check

2. Project Setup

To utilize the templates and styles you provided, you should organize your project directory clearly.

Recommended Structure:

my-project/
├── index.qmd # Your main document
├── scss/
│ ├── light-custom.scss # Light theme overrides
│ └── dark-custom.scss # Dark theme overrides
├── _quarto.yml # (Optional) Project-wide settings
└── assets/ # Images and data

3. The Document Template (.qmd)

Create a file named index.qmd. This uses the YAML header you provided, which configures Quarto to output both a themed HTML file and a Typst PDF.

---
# --- Document Metadata ---
title: "Your 12-Month Postpartum Nutrition & Movement System"
subtitle: "Full Guide"
author: "Labinator Team"
affiliation: "Labinator.com"
date: "04/01/2026"

# --- Export Formats ---
format:
html:
theme:
light: [flatly, scss/light-custom.scss]
dark: [darkly, scss/dark-custom.scss]
toc: true
toc-location: left
number-sections: true
embed-resources: true
code-fold: true
smooth-scroll: true
highlight-style: atom-one

typst:
papersize: a4
font: "Inter"
section-numbering: "1.1.1"
font-size: 11pt
toc: true
---

# Introduction

Welcome to the guide. This document renders into a responsive HTML page with light/dark mode toggles and a high-quality PDF via Typst.

## Nutrition Basics

Your nutrition plan starts here.

## Movement Logic

\( E = mc^2 \) but for calories.

Note on File Paths: In the template above, I updated the path to scss/light-custom.scss to match the folder structure suggested in Section 2. If your scss files are in the same folder as the .qmd, remove the scss/ prefix.


4. Custom Styling (SCSS)

Quarto uses SASS/SCSS variables to override Bootstrap defaults. Create these two files to handle your color theming.

File: scss/light-custom.scss

/*-- scss:defaults --*/
$link-color: #0056b3;
$link-hover-color: #003d80;

/*-- scss:rules --*/
/* Custom CSS rules go here */
.callout-note {
border-left-color: $link-color;
}

File: scss/dark-custom.scss

/*-- scss:defaults --*/
$link-color: #c7e36c;
$link-hover-color: #dde8b7;

/*-- scss:rules --*/
/* Custom CSS rules go here */
body {
transition: background-color 0.3s ease;
}

Important: Note the use of /*-- scss:defaults --*/. This tells Quarto to inject these variables before Bootstrap loads, allowing you to change core system colors (like $primary or $link-color) effectively.


5. Rendering and Previewing

Once your .qmd and .scss files are ready, use the terminal to build your document.

Live Preview (Best for Writing)

This command opens a local web server and auto-reloads the browser whenever you save the file.

quarto preview index.qmd

Final Rendering

To build all formats defined in your YAML (HTML and Typst in this case):

quarto render index.qmd

This will produce:

  1. index.html (Self-contained HTML)
  2. index.pdf (Generated via Typst)

While you can use any text editor (Vim, Nano, Kate), the following offer the best integration for Manjaro and OpenSUSE:

  1. VS Code (or VSCodium):

    • Install the official Quarto Extension.
    • Provides syntax highlighting, completion for citations (@), and a "Render" button directly in the UI.
  2. RStudio:

    • If your workflow involves R, RStudio comes bundled with Quarto support out of the box.

7. Troubleshooting

Typst Font Issues: Your template requests the font "Inter".

  • Manjaro: sudo pacman -S inter-font
  • OpenSUSE: sudo zypper install google-inter-fonts
  • If the font is not installed on your Linux system, Typst will default to a standard sans-serif font.

Missing Dependencies (Python/R): If you include code blocks (e.g., python or r), ensure the kernels are installed:

# Python support
pip install jupyter

# R support
R -e "install.packages('rmarkdown')"