Writing Articles The same format, laid out as a page

Ada Example

1. Articles

A file ending in .article is shown as one page, like a blog post, instead of as slides. Everything that works in a .slide file works here too, and sections are numbered in a table of contents.

2. Code

package main

import "fmt"

func fib(n int) int {
    a, b := 0, 1
    for range n {
        a, b = b, a+b
    }
    return a
}


func main() {
    for i := range 10 {
        fmt.Print(fib(i), " ")
    }
    fmt.Println()
}

The source can be shown in pieces, with prose between them:

func worker(id int, jobs <-chan int, results chan<- string) {
    for j := range jobs {
        time.Sleep(200 * time.Millisecond)
        results <- fmt.Sprintf("worker %d did job %d", id, j)
    }
}
Format File Layout
slides .slide one section per slide
article .article one long page

2.1. A subsection

Subsections start with ### and nest inside a section.

3. Pictures

Diagrams work in articles too.

4. Custom style sheets

Articles load style sheets from the directory automatically:

/* Custom styles loaded automatically for notes.article */

.custom-card {
  margin: 20px 20px 40px 20px;
  padding: 1em 1.5em;
  border-left: 4px solid #00add8;
  background-color: #e8f4f8;
  border-radius: 4px;
}
This card is styled by rules in notes.article.css.