Something went wrong. Try again.
A literate programming tool.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126#let document-language = "en"#let document-region = "CA"#let git-revision = sys.inputs.at("git-revision", default: "")#let version-stamp = sys.inputs.at("version-date", default: "")#let source-state = sys.inputs.at("source-state", default: "unversioned")#let version-date = if version-stamp == "" { none} else { datetime( year: int(version-stamp.slice(0, 4)), month: int(version-stamp.slice(5, 7)), day: int(version-stamp.slice(8, 10)), )}#set document( title: [Loom: A Literate Programming Tool], author: "Leo Qi", description: [My imagining of how software can explains itself. Combine the interactivity of websites in approaching an narrative in a non-sequential way, literate programming techniques of combining "documentation" and "source" in the same medium.], keywords: ("Loom", "literate programming", "Clojure", "Typst"), date: version-date,)#set page( paper: "a4", margin: (x: 1in, left: 1in, right: 3in), numbering: "1")#set text( lang: document-language, region: document-region, font: "Vollkorn", hyphenate: false)#set par( justify: false)
#show raw.where(block: true): set block( width: calc.inf * 1pt, breakable: false, above: 3em, below: 3em,)#show heading: set text(weight: "light")#show heading.where(depth: 2): set text(style: "italic")#show heading.where(depth: 3): set text(style: "italic", weight: "medium")
#show title: set align(center)
#let author-metadata = [ Author: Leo Qi #if version-date != none [ #linebreak() Date published: #version-date.display() ]]#let git-status = if source-state == "clean" and git-revision != "" [ #link("https://tangled.org/leoqi.ca/loom/commit/" + git-revision)[See this version on Git #git-revision.slice(0, 7)]] else if source-state == "modified" [ Modified checkout (no exact Git version)] else [ Unversioned preview]
#context { if target() == "html" { // Packaging reads the same locale used for text, without a second Nix value. html.elem("header", attrs: ( class: "loom-version-header", data-language: document-language + "-" + document-region, ))[ #html.elem("div", attrs: (class: "loom-version-author"))[#author-metadata] #html.elem("div", attrs: (class: "loom-version-git"))[#git-status] ] } else { set par(justify: false) set text(size: 9pt) block(width: 100%, fill: rgb("#f4f4ef"), inset: 8pt)[ #grid( columns: (1fr, 1fr), gutter: 1em, align(left, author-metadata), align(right, git-status), ) ] }}
// Each named section owns one H2 and displays its definitions once.#include "readme.typ"#context { if target() == "html" { html.elem("details", attrs: (class: "loom-toc"))[ #html.elem("summary")[Table of contents] #outline(title: none) ] } else { outline(title: [Table of contents]) }}#v(1em)
#context if target() == "html" { html.elem("div", attrs: (id: "loom-content", tabindex: "-1"))[]}#include "using-this-site.typ"
= Tutorials#include "using-loom.typ"#include "extending-loom.typ"
= Howtos#include "integrate-loom-into-your-workflow.typ"#include "integrate-literate-programming-into-your-projects.typ"
= Reference#include "command-line-interface.typ"
= Explanation#include "how-is-loom-built.typ"#include "how-is-this-website-built.typ"
#bibliography("works.bib")