Single page and printing

It is also possible to have everything on one single long html page.

For that, two things have to be done:
  1. Change @(define singlepage-mode #f) to @(define singlepage-mode #t) in the headers of your .scrbl file

  2. Different method of compilation. Instead of compiling as we explained here, do this:
    1. Create new directory:
      mkdir singlepage

    2. Now compile:
      scribble --dest singlepage slides-manual.scrbl

This might be useful, for example, for printing. However, it is also easy to print multiple pages, using the program called wkhtmltopdf. The only problem is to keep track of the ordering of pages. Notice that the index.html has the list of all your multiple pages, and this script will extract them and print the filenames sorted:

#!/usr/bin/env racket
#lang racket
(require xml xml/path racket/file)
(define x
  (call-with-input-file "index.html"
    (lambda (inport) (xml->xexpr (document-element (read-xml inport))))))
(for ([ttl (se-path*/list '(a) x)]
      #:when (and (string? ttl) (equal? (se-path* '(a #:class) x) "toptoclink")))
  (for ([fp (find-files
             (lambda (f) (equal? (string-append ttl ".html") (path->string f))))])
    (write-string (path->string fp))
  (for ([fp (find-files
             (lambda (f) (regexp-match
                          (regexp (string-append ttl "_[0-9]+" ".html"))
                          (path->string f))))])
    (display (path->string fp))