text.scrbl (2045B)
1 #lang scribble/manual 2 @(require (for-label racket/base)) 3 4 @title{Document} 5 6 This document exercises various constructs to check text output. 7 8 @section{Part A} 9 10 Scribble is a collection of tools for creating prose documents---papers, books, library documentation, etc.---in HTML or PDF (via Latex) 11 form. More generally, Scribble helps you 12 write programs that are rich 13 in textual content, whether the content is prose to be typeset or any 14 other form of text to be generated 15 programmatically. 16 17 @subsection{A Subsection} 18 19 Here's some Racket code: 20 21 @racketblock[ 22 (define half (lambda (x) 23 (x x))) 24 (x x) 25 ] 26 27 @subsection{Another Subsection} 28 29 @defmodule[racket/base] 30 31 @defproc[(cons [car (or/c #f 32 other?)] 33 [cdr any?]) 34 stuff?]{ 35 36 Ok?} 37 38 @section{B} 39 40 @itemlist[ 41 42 @item{Run 43 @commandline{scribble --pdf mouse.scrbl} 44 to generate PDF as @filepath{mouse.pdf}. This will 45 work only if you have @exec{pdflatex} installed. 46 If you'd like to see the intermediate Latex, try 47 @commandline{scribble --latex mouse.scrbl} 48 to generate @filepath{mouse.tex}.} 49 50 @item{Run 51 @commandline{scribble --html mouse.scrbl} 52 to generate HTML as @filepath{mouse.html}. You may 53 notice that the apostrophe in ``he's'' turned into a 54 curly apostrophe.} 55 56 @item{Run 57 @commandline{scribble --htmls mouse.scrbl} 58 to generate HTML as @filepath{mouse/index.html}. 59 Sub-sections (which we add next) will appear as separate 60 HTML files in the @filepath{mouse} directory.} 61 62 ] 63 64 Run the @exec{scribble} command(s) from the old section 65 again. You may notice the curly double-quotes in the output, and 66 the @litchar{---} turned into an em dash. 67 68 @section{C} 69 70 @subsection{Inside C} 71 72 Section C had no text before its subsections. 73 74 @subsection{Inside C, Again} 75 76 But the subsections have text.