72 lines
1.6 KiB
Plaintext
72 lines
1.6 KiB
Plaintext
Document
|
||
|
||
This document exercises various constructs to check text output.
|
||
|
||
1. Part A
|
||
|
||
Scribble is a collection of tools for creating prose documents—papers,
|
||
books, library documentation, etc.—in HTML or PDF (via Latex) form. More
|
||
generally, Scribble helps you write programs that are rich in textual
|
||
content, whether the content is prose to be typeset or any other form of
|
||
text to be generated programmatically.
|
||
|
||
1.1. A Subsection
|
||
|
||
Here’s some Racket code:
|
||
|
||
(define half (lambda (x)
|
||
(x x)))
|
||
(x x)
|
||
|
||
1.2. Another Subsection
|
||
|
||
(require racket/base)
|
||
|
||
(cons car cdr) -> stuff?
|
||
car : (or/c #f
|
||
other?)
|
||
cdr : any?
|
||
|
||
Ok?
|
||
|
||
2. B
|
||
|
||
* Run
|
||
|
||
scribble --pdf mouse.scrbl
|
||
|
||
to generate PDF as "mouse.pdf". This will work only if you have
|
||
pdflatex installed. If you’d like to see the intermediate Latex, try
|
||
|
||
scribble --latex mouse.scrbl
|
||
|
||
to generate "mouse.tex".
|
||
|
||
* Run
|
||
|
||
scribble --html mouse.scrbl
|
||
|
||
to generate HTML as "mouse.html". You may notice that the apostrophe
|
||
in “he’s” turned into a curly apostrophe.
|
||
|
||
* Run
|
||
|
||
scribble --htmls mouse.scrbl
|
||
|
||
to generate HTML as "mouse/index.html". Sub-sections (which we add
|
||
next) will appear as separate HTML files in the "mouse" directory.
|
||
|
||
Run the scribble command(s) from the old section again. You may notice
|
||
the curly double-quotes in the output, and the --- turned into an em
|
||
dash.
|
||
|
||
3. C
|
||
|
||
3.1. Inside C
|
||
|
||
Section C had no text before its subsections.
|
||
|
||
3.2. Inside C, Again
|
||
|
||
But the subsections have text.
|