summaryrefslogtreecommitdiff
path: root/skribe/doc/user/src
diff options
context:
space:
mode:
Diffstat (limited to 'skribe/doc/user/src')
-rw-r--r--skribe/doc/user/src/api1.skb5
-rw-r--r--skribe/doc/user/src/api10.skb12
-rw-r--r--skribe/doc/user/src/api11.skb22
-rw-r--r--skribe/doc/user/src/api12.skb1
-rw-r--r--skribe/doc/user/src/api13.skb10
-rw-r--r--skribe/doc/user/src/api14.skb9
-rw-r--r--skribe/doc/user/src/api15.skb25
-rw-r--r--skribe/doc/user/src/api16.skb5
-rw-r--r--skribe/doc/user/src/api17.skb9
-rw-r--r--skribe/doc/user/src/api18.skb2
-rw-r--r--skribe/doc/user/src/api19.skb3
-rw-r--r--skribe/doc/user/src/api2.skb5
-rw-r--r--skribe/doc/user/src/api20.skb2
-rw-r--r--skribe/doc/user/src/api3.skb8
-rw-r--r--skribe/doc/user/src/api4.skb2
-rw-r--r--skribe/doc/user/src/api5.skb2
-rw-r--r--skribe/doc/user/src/api6.skb1
-rw-r--r--skribe/doc/user/src/api7.skb3
-rw-r--r--skribe/doc/user/src/api8.skb15
-rw-r--r--skribe/doc/user/src/api9.skb5
-rw-r--r--skribe/doc/user/src/bib1.sbib39
-rw-r--r--skribe/doc/user/src/bib2.skb7
-rw-r--r--skribe/doc/user/src/bib3.skb3
-rw-r--r--skribe/doc/user/src/bib4.skb5
-rw-r--r--skribe/doc/user/src/bib5.skb24
-rw-r--r--skribe/doc/user/src/bib6.skb1
-rw-r--r--skribe/doc/user/src/index1.skb1
-rw-r--r--skribe/doc/user/src/index2.skb11
-rw-r--r--skribe/doc/user/src/index3.skb1
-rw-r--r--skribe/doc/user/src/links1.skb23
-rw-r--r--skribe/doc/user/src/links2.skb4
-rw-r--r--skribe/doc/user/src/prgm1.skb15
-rw-r--r--skribe/doc/user/src/prgm2.skb18
-rw-r--r--skribe/doc/user/src/prgm3.skb55
-rw-r--r--skribe/doc/user/src/slides.skb27
-rw-r--r--skribe/doc/user/src/start1.skb2
-rw-r--r--skribe/doc/user/src/start2.skb2
-rw-r--r--skribe/doc/user/src/start3.skb10
-rw-r--r--skribe/doc/user/src/start4.skb13
-rw-r--r--skribe/doc/user/src/start5.skb9
40 files changed, 416 insertions, 0 deletions
diff --git a/skribe/doc/user/src/api1.skb b/skribe/doc/user/src/api1.skb
new file mode 100644
index 0000000..80c4389
--- /dev/null
+++ b/skribe/doc/user/src/api1.skb
@@ -0,0 +1,5 @@
+(section :title "A title" "This is the body of the section")
+(section :title "A title" "This" " is" " the body of the section")
+(section :title "A title" :number 3 "This" " is" " the body of the section")
+(section :title "A title" :toc #f :number 3 "This" " is" " the body of the section")
+(section :title "A title" :number 3 :toc #f "This" " is" " the body of the section")
diff --git a/skribe/doc/user/src/api10.skb b/skribe/doc/user/src/api10.skb
new file mode 100644
index 0000000..207d8a7
--- /dev/null
+++ b/skribe/doc/user/src/api10.skb
@@ -0,0 +1,12 @@
+(center [A ,(linebreak) multilines ,(linebreak) text])
+(hrule)
+(flush :side 'left [A ,(linebreak) multilines ,(linebreak) text])
+(hrule)
+(flush :side 'right [A ,(linebreak) multilines ,(linebreak) text])
+(hrule)
+(pre [A text layout that
+
+ preserves
+ linebreaks and spaces ,(it "(into which it is still legal")
+,(it "to use Skribe markups)").
+])
diff --git a/skribe/doc/user/src/api11.skb b/skribe/doc/user/src/api11.skb
new file mode 100644
index 0000000..5014e30
--- /dev/null
+++ b/skribe/doc/user/src/api11.skb
@@ -0,0 +1,22 @@
+(itemize (item [A first item.])
+ (item [A ,(bold "second") one:
+ ,(itemize (item "One.")
+ (item "Two.")
+ (item "Three."))])
+ (item [Lists can be nested. For instance that item contains a
+ ,(tt "description"):
+ ,(description (item :key (bold "foo")
+ [is a usual Lisp dummy identifier.])
+ (item :key (bold "bar")
+ [is another one.])
+ (item :key (list (bold "foo") (bold "bar"))
+ [A description entry may contain more than
+ one keyword.]))])
+ (item [The last ,(tt "itemize") entry contains an ,(tt "enumerate"):
+ ,(enumerate (item "One.") (item "Two.") (item "Three."))]))
+
+(itemize :symbol "-"
+ (item "One.")
+ (item "Two.")
+ (item "Three.")
+ (item "Four."))
diff --git a/skribe/doc/user/src/api12.skb b/skribe/doc/user/src/api12.skb
new file mode 100644
index 0000000..b0c68da
--- /dev/null
+++ b/skribe/doc/user/src/api12.skb
@@ -0,0 +1 @@
+(center (frame :width 10. :margin 10 (p [This is a frame.])))
diff --git a/skribe/doc/user/src/api13.skb b/skribe/doc/user/src/api13.skb
new file mode 100644
index 0000000..a9acb04
--- /dev/null
+++ b/skribe/doc/user/src/api13.skb
@@ -0,0 +1,10 @@
+(center
+ (color :bg "#aaaaaa"
+ :margin 10
+ :width 30.
+ (center
+ (color :bg "#eeeeee" :fg "blue" :width 100. :margin 10 [This is an
+example of color box that uses a color for the
+background ,(emph "and") the ,(color :fg "red" "foreground"). It also specifies
+a width, that is, an horizontal space, the text should
+span to.]))))
diff --git a/skribe/doc/user/src/api14.skb b/skribe/doc/user/src/api14.skb
new file mode 100644
index 0000000..a3ede40
--- /dev/null
+++ b/skribe/doc/user/src/api14.skb
@@ -0,0 +1,9 @@
+(center
+ (figure :legend "This is a unnumbered figure"
+ :ident "fig1"
+ :number #f
+ (frame [Skribe is a functional programming language.])))
+
+(center
+ (figure :legend "The great Penguin"
+ (image :file "linux.gif")))
diff --git a/skribe/doc/user/src/api15.skb b/skribe/doc/user/src/api15.skb
new file mode 100644
index 0000000..f8f4958
--- /dev/null
+++ b/skribe/doc/user/src/api15.skb
@@ -0,0 +1,25 @@
+(resolve (lambda (n e env)
+ (let* ((d (ast-document n))
+ (ex (container-env-get d 'figure-env)))
+ (table (map (lambda (e)
+ (tr (td :align 'left
+ (markup-option e ':number)
+ " "
+ (ref :handle (handle e)
+ :text (markup-option e :legend))
+ " (section "
+ (let ((c (ast-section e)))
+ (ref :handle (handle c)
+ :text (markup-option c :title)))
+ ")")))
+ (sort ex
+ (lambda (e1 e2)
+ (let ((n1 (markup-option e1 :number))
+ (n2 (markup-option e2 :number)))
+ (cond
+ ((not (number? n1))
+ #t)
+ ((not (number? n2))
+ #f)
+ (else
+ (< n1 n2)))))))))))
diff --git a/skribe/doc/user/src/api16.skb b/skribe/doc/user/src/api16.skb
new file mode 100644
index 0000000..a9d5705
--- /dev/null
+++ b/skribe/doc/user/src/api16.skb
@@ -0,0 +1,5 @@
+(image :file "linux.gif" "A first image")
+(image :height 50 :file "linux.gif" "A smaller one")
+(image :file "bsd.gif" "A second image")
+(image :width 50 :file "bsd.gif")
+(image :width 200 :height 40 :file "bsd.gif")
diff --git a/skribe/doc/user/src/api17.skb b/skribe/doc/user/src/api17.skb
new file mode 100644
index 0000000..42fa54f
--- /dev/null
+++ b/skribe/doc/user/src/api17.skb
@@ -0,0 +1,9 @@
+(center
+ (table :border 1 :width 50. :frame 'hsides :cellstyle 'collapse
+ (tr :bg "#cccccc" (th :align 'center :colspan 3 "A table"))
+ (tr (th "Col 1") (th "Col 2") (th "Col 3"))
+ (tr (td :align 'center "10") (td "-20") (td "30"))
+ (tr (td :align 'right :rowspan 2 :valign 'center "12") (td "21"))
+ (tr (td :align 'center :colspan 2 "1234"))
+ (tr (td :align 'center :colspan 2 "1234") (td :align 'right "5"))
+ (tr (td :align 'center :colspan 1 "1") (td :colspan 2 "2345"))))
diff --git a/skribe/doc/user/src/api18.skb b/skribe/doc/user/src/api18.skb
new file mode 100644
index 0000000..2112dc4
--- /dev/null
+++ b/skribe/doc/user/src/api18.skb
@@ -0,0 +1,2 @@
+[Scheme,(footnote [To be pronounced ,(char "[")Skim,(char "]")])
+is a programming language,(footnote [And a great one!]).]
diff --git a/skribe/doc/user/src/api19.skb b/skribe/doc/user/src/api19.skb
new file mode 100644
index 0000000..cfc11f6
--- /dev/null
+++ b/skribe/doc/user/src/api19.skb
@@ -0,0 +1,3 @@
+(itemize (item [The character ,(code "#\\a"): ,(char #\a).])
+ (item [The character ,(code "\"a\""): ,(char "a").])
+ (item [The character ,(code "97"): ,(char 97).]))
diff --git a/skribe/doc/user/src/api2.skb b/skribe/doc/user/src/api2.skb
new file mode 100644
index 0000000..2c20965
--- /dev/null
+++ b/skribe/doc/user/src/api2.skb
@@ -0,0 +1,5 @@
+(document :title "This is a Scribe document"
+ :author (list (author :name "Foo" :email (mailto "foo@nowhere.org"))
+ (author :name "Bar" :email (mailto "bar@anywhere.org"))
+ (author :name "Gee" :email (mailto "gee@nowhere.org")))
+ "A body...")
diff --git a/skribe/doc/user/src/api20.skb b/skribe/doc/user/src/api20.skb
new file mode 100644
index 0000000..686efcb
--- /dev/null
+++ b/skribe/doc/user/src/api20.skb
@@ -0,0 +1,2 @@
+[A simple ,(! "string"). A more annoying one ,(! "<strong>string</strong>").
+A last one with arguments ,(! "<u>$1 $2</u>" (bold 1) (it 2)).]
diff --git a/skribe/doc/user/src/api3.skb b/skribe/doc/user/src/api3.skb
new file mode 100644
index 0000000..ed46eea
--- /dev/null
+++ b/skribe/doc/user/src/api3.skb
@@ -0,0 +1,8 @@
+(author :name "Manuel Serrano"
+ :affiliation "Inria Sophia-Antipolis"
+ :url (ref :url "http://www.inria.fr/mimosa/Manuel.Serrano")
+ :email (mailto "Manuel.Serrano@inria.fr")
+ :address `("2004 route des Lucioles - BP 93"
+ "F-06902 Sophia Antipolis, Cedex"
+ "France")
+ :phone "phone: (+33) 4 92 38 76 41")
diff --git a/skribe/doc/user/src/api4.skb b/skribe/doc/user/src/api4.skb
new file mode 100644
index 0000000..cfe13f7
--- /dev/null
+++ b/skribe/doc/user/src/api4.skb
@@ -0,0 +1,2 @@
+(chapter :title "This is a simple chapter" :number #f :toc #f [
+Its body is just one sentence.])
diff --git a/skribe/doc/user/src/api5.skb b/skribe/doc/user/src/api5.skb
new file mode 100644
index 0000000..01188c1
--- /dev/null
+++ b/skribe/doc/user/src/api5.skb
@@ -0,0 +1,2 @@
+(section :title "This is a simple section" :number #f :toc #f [
+Its body is just one sentence.])
diff --git a/skribe/doc/user/src/api6.skb b/skribe/doc/user/src/api6.skb
new file mode 100644
index 0000000..22a1c77
--- /dev/null
+++ b/skribe/doc/user/src/api6.skb
@@ -0,0 +1 @@
+(toc :chapter #t :section #f :subsection #f)
diff --git a/skribe/doc/user/src/api7.skb b/skribe/doc/user/src/api7.skb
new file mode 100644
index 0000000..c6aec8b
--- /dev/null
+++ b/skribe/doc/user/src/api7.skb
@@ -0,0 +1,3 @@
+(resolve (lambda (n e env)
+ (toc :chapter #t :section #t :subsection #t
+ (handle (ast-chapter n)))))
diff --git a/skribe/doc/user/src/api8.skb b/skribe/doc/user/src/api8.skb
new file mode 100644
index 0000000..a4403ff
--- /dev/null
+++ b/skribe/doc/user/src/api8.skb
@@ -0,0 +1,15 @@
+(itemize (item (roman "a roman text."))
+ (item (bold "a bold text."))
+ (item (it "an italic text."))
+ (item (emph "an emphasized text."))
+ (item (underline "an underline text."))
+ (item (kbd "a keyboard description."))
+ (item (tt "a typewritter text."))
+ (item (code "a text representing computer code."))
+ (item (var "a computer program variable description."))
+ (item (samp "a sample."))
+ (item (sc "a smallcaps text."))
+ (item (sf "a sans-serif text."))
+ (item (sup "a superscripts text."))
+ (item (sub "a subscripts text."))
+ (item (underline (bold (it "an underline, bold, italic text.")))))
diff --git a/skribe/doc/user/src/api9.skb b/skribe/doc/user/src/api9.skb
new file mode 100644
index 0000000..1f6890e
--- /dev/null
+++ b/skribe/doc/user/src/api9.skb
@@ -0,0 +1,5 @@
+(itemize
+ (item (font :size -2 [A smaller font.]))
+ (item (font :size 6 [An absolute font size.]))
+ (item (font :size 4. [A larger font.]))
+ (item (font :face "Helvetica" [An helvetica example.])))
diff --git a/skribe/doc/user/src/bib1.sbib b/skribe/doc/user/src/bib1.sbib
new file mode 100644
index 0000000..3f1c04f
--- /dev/null
+++ b/skribe/doc/user/src/bib1.sbib
@@ -0,0 +1,39 @@
+(book queinnec:lisp
+ (author "Queinnec, C.")
+ (title "Lisp In Small Pieces")
+ (publisher "Cambridge University Press")
+ (year "1996"))
+
+(book scheme:ieee
+ (title "IEEE Standard for the Scheme Programming Language")
+ (author "IEEE Std 1178-1990")
+ (publisher "Institute of Electrical and Electronic Engineers, Inc.")
+ (address "New York, NY")
+ (year "1991"))
+
+(misc bigloo
+ (url "http://www.inria.fr/mimosa/fp/Bigloo"))
+
+(misc scheme:r4rs
+ (title "The Revised4 Report on the Algorithmic Language Scheme")
+ (author "Clinger, W. and Rees, J.")
+ (month "Nov")
+ (year "1991")
+ (url "http://www.cs.indiana.edu/scheme-repository/R4RS/r4rs_toc.html"))
+
+(article scheme:r5rs
+ (title "The Revised5 Report on the Algorithmic Language Scheme")
+ (author "Kelsey, R. and Clinger, W. and Rees, J.")
+ (journal "Higher-Order and Symbolic Computation")
+ (volume "11")
+ (number "1")
+ (month "Sep")
+ (year "1998")
+ (url "http://kaolin.unice.fr/Bigloo/doc/r5rs.html"))
+
+(book as:sicp
+ (author "Abelson, H. and Sussman, G.")
+ (title "Structure and Interpretation of Computer Programs")
+ (year "1985")
+ (publisher "MIT Press")
+ (address "Cambridge, Mass., USA"))
diff --git a/skribe/doc/user/src/bib2.skb b/skribe/doc/user/src/bib2.skb
new file mode 100644
index 0000000..25417b5
--- /dev/null
+++ b/skribe/doc/user/src/bib2.skb
@@ -0,0 +1,7 @@
+[Scheme ,(ref :bib 'scheme:r5rs) is functional programming language. It exists
+several books about this language ,(ref :bib '(as:sicp queinnec:lisp)).
+
+,(linebreak 2)
+,(center (bold [-- Bibliography --]))
+
+,(center (frame :border 1 :margin 2 :width 90. (the-bibliography)))]
diff --git a/skribe/doc/user/src/bib3.skb b/skribe/doc/user/src/bib3.skb
new file mode 100644
index 0000000..9cb838e
--- /dev/null
+++ b/skribe/doc/user/src/bib3.skb
@@ -0,0 +1,3 @@
+(center
+ (frame :border 1 :margin 2 :width 90.
+ (the-bibliography :pred (lambda (m n) #t))))
diff --git a/skribe/doc/user/src/bib4.skb b/skribe/doc/user/src/bib4.skb
new file mode 100644
index 0000000..81ba5df
--- /dev/null
+++ b/skribe/doc/user/src/bib4.skb
@@ -0,0 +1,5 @@
+(center
+ (frame :border 1 :margin 2 :width 90.
+ (the-bibliography :pred (lambda (m n)
+ (and (eq? (markup-option m 'kind) 'book)
+ (pair? (markup-option m 'used)))))))
diff --git a/skribe/doc/user/src/bib5.skb b/skribe/doc/user/src/bib5.skb
new file mode 100644
index 0000000..a0ee361
--- /dev/null
+++ b/skribe/doc/user/src/bib5.skb
@@ -0,0 +1,24 @@
+(center
+ (frame :border 1 :margin 2 :width 90.
+ (processor :engine
+ (make-engine '_ :filter string-upcase)
+ :combinator
+ (lambda (e1 e2)
+ (let ((e (copy-engine '_ e2)))
+ (markup-writer '&bib-entry-ident e
+ :action
+ (lambda (n e)
+ (let* ((be (ast-parent n))
+ (o (markup-option be 'author))
+ (y (markup-option be 'year)))
+ (output (markup-body o) e1)
+ (display ":")
+ (output (markup-body y) e))))
+ (markup-writer '&bib-entry-title e
+ :action
+ (lambda (n e)
+ (skribe-eval (it (markup-body n)) e)))
+ e))
+ (the-bibliography :pred
+ (lambda (m n)
+ (eq? (markup-option m 'kind) 'book))))))
diff --git a/skribe/doc/user/src/bib6.skb b/skribe/doc/user/src/bib6.skb
new file mode 100644
index 0000000..013ca97
--- /dev/null
+++ b/skribe/doc/user/src/bib6.skb
@@ -0,0 +1 @@
+(bibliography :command "gzip -d --to-stdout ~a | skribebibtex" "scheme.bib.gz")
diff --git a/skribe/doc/user/src/index1.skb b/skribe/doc/user/src/index1.skb
new file mode 100644
index 0000000..199428c
--- /dev/null
+++ b/skribe/doc/user/src/index1.skb
@@ -0,0 +1 @@
+(define *index1* (make-index "a new index"))
diff --git a/skribe/doc/user/src/index2.skb b/skribe/doc/user/src/index2.skb
new file mode 100644
index 0000000..f49cf33
--- /dev/null
+++ b/skribe/doc/user/src/index2.skb
@@ -0,0 +1,11 @@
+[The identifier ,(code "Foo"),(index :index *index1* "Foo") is a usually
+used as an example. When two identifiers have to used, frequently the
+second choice is ,(code "Bar"),(index :index *index1* "Bar" :shape (it "Bar")).
+When three are needed, some use ,(code "Baz")
+,(index :index *index1* "Baz" :shape (it "Baz")).
+
+This illustrates how to use identifier
+,(index :index *index1* "Foo" :note "How to use Foo")
+,(index :index *index1* "Foo" :note "How not to use Foo")
+,(index :index *index1* "Fooz")
+...]
diff --git a/skribe/doc/user/src/index3.skb b/skribe/doc/user/src/index3.skb
new file mode 100644
index 0000000..3d76a90
--- /dev/null
+++ b/skribe/doc/user/src/index3.skb
@@ -0,0 +1 @@
+(the-index *index1*)
diff --git a/skribe/doc/user/src/links1.skb b/skribe/doc/user/src/links1.skb
new file mode 100644
index 0000000..e0ce61c
--- /dev/null
+++ b/skribe/doc/user/src/links1.skb
@@ -0,0 +1,23 @@
+[This hyperlink points to the ,(ref :figure "The great Penguin" :text "figure")
+of the chapter ,(ref :chapter "Standard Markups") (or also, the
+,(ref :ident "Standard Markups" :text "chapter") about markups).
+In the second example of reference, no ,(code ":text") option is specified:
+,(ref :figure "The great Penguin"). One may use the ,(param ":ident")
+field when specified such as: ,(ref :ident "fig1") or ,(ref :figure "fig1").
+
+,(linebreak)
+That other one points to a well known
+,(ref :url "http://slashdot.org/" :text "url"). The same without
+,(code ":text"): ,(ref :url "http://slashdot.org/").
+
+,(linebreak)
+With more complex tricks that are explained in Section
+,(ref :section "Resolve"), it is also possible use, for the text of the
+reference, a container number such as chapter:
+,(resolve (lambda (n e env)
+ (let ((s (find1-down (lambda (x)
+ (and (is-markup? x 'chapter)
+ (string=? (markup-option x :title)
+ "Standard Markups")))
+ (ast-document n))))
+ (ref :handle (handle s) :text (markup-option s :number))))).]
diff --git a/skribe/doc/user/src/links2.skb b/skribe/doc/user/src/links2.skb
new file mode 100644
index 0000000..7cdee07
--- /dev/null
+++ b/skribe/doc/user/src/links2.skb
@@ -0,0 +1,4 @@
+[It is possible to send a mail by
+,(mailto "foo@nowhere.com" :text "clicking") that link. That same
+reference without ,(code ":text") options: ,(mailto "foo@nowhere.com").
+]
diff --git a/skribe/doc/user/src/prgm1.skb b/skribe/doc/user/src/prgm1.skb
new file mode 100644
index 0000000..dcdeb88
--- /dev/null
+++ b/skribe/doc/user/src/prgm1.skb
@@ -0,0 +1,15 @@
+(frame :width 100.
+ (prog :line 10 :mark "##" [
+SKRIBE=skribe
+
+all: demo.html demo.man ##main-goal
+
+demo.html: demo.skb
+ $(SKRIBE) demo.skb -o demo.html
+
+demo.man: demo.skb
+ $(SKRIBE) demo.skb -o demo.man
+]))
+
+(p [The main goal is specified line ,(ref :line "main-goal").])
+
diff --git a/skribe/doc/user/src/prgm2.skb b/skribe/doc/user/src/prgm2.skb
new file mode 100644
index 0000000..5b5644b
--- /dev/null
+++ b/skribe/doc/user/src/prgm2.skb
@@ -0,0 +1,18 @@
+(frame :width 100.
+ (prog (source :language bigloo :file "prgm.skb" :definition 'fib)))
+
+(p [The Fibonacci function is defined line ,(ref :line "fib").])
+
+;!start
+(frame :width 100.
+ (prog :line 11 :mark #f
+ (source :language skribe :file "prgm.skb" :start 11 :stop 24)))
+;!stop
+
+(p [Here is the source of the frame above:])
+
+(frame :width 100.
+ (prog :line 30 :mark #f
+ (source :language skribe :file "src/prgm2.skb"
+ :start ";!start"
+ :stop ";!stop")))
diff --git a/skribe/doc/user/src/prgm3.skb b/skribe/doc/user/src/prgm3.skb
new file mode 100644
index 0000000..51cb564
--- /dev/null
+++ b/skribe/doc/user/src/prgm3.skb
@@ -0,0 +1,55 @@
+(define (makefile-fontifier string)
+ (with-input-from-string string
+ (lambda ()
+ (read/rp (regular-grammar ()
+ ((: #\# (+ all))
+ ;; makefile comment
+ (let ((cmt (the-string)))
+ (cons (it cmt) (ignore))))
+ ((bol (: (+ (out " \t\n:")) #\:))
+ ;; target
+ (let ((prompt (the-string)))
+ (cons (bold prompt) (ignore))))
+ ((bol (: (+ alpha) #\=))
+ ;; variable definitions
+ (let* ((len (- (the-length) 1))
+ (var (the-substring 0 len)))
+ (cons (list (color :fg "#bb0000" (bold var)) "=")
+ (ignore))))
+ ((+ (out " \t\n:=$"))
+ ;; plain strings
+ (let ((str (the-string)))
+ (cons str (ignore))))
+ ((: #\$ #\( (+ (out " )\n")) #\))
+ ;; variable references
+ (let ((str (the-string))
+ (var (the-substring 2 (- (the-length) 1))))
+ (cons (underline str) (ignore))))
+ ((+ (in " \t\n:"))
+ ;; separators
+ (let ((nl (the-string)))
+ (cons nl (ignore))))
+ (else
+ ;; default
+ (let ((c (the-failure)))
+ (if (eof-object? c)
+ '()
+ (skribe-error 'makefile "Unexpected char" c)))))
+ (current-input-port)))))
+
+(define makefile
+ (language :name "Makefile"
+ :fontifier makefile-fontifier))
+
+(frame :width 100.
+ (prog (source :language makefile [
+SKRIBE=skribe
+
+all: demo.html demo.man
+
+demo.html: demo.skb
+ $(SKRIBE) demo.skb -o demo.html
+
+demo.man: demo.skb
+ $(SKRIBE) demo.skb -o demo.man
+])))
diff --git a/skribe/doc/user/src/slides.skb b/skribe/doc/user/src/slides.skb
new file mode 100644
index 0000000..ac584d1
--- /dev/null
+++ b/skribe/doc/user/src/slides.skb
@@ -0,0 +1,27 @@
+(skribe-load "slide.skr" :advi #t)
+
+(document :title (color :fg "red" (sf (font :size +2. "Skribe Slides")))
+ :author (author :name (it "Manuel Serrano")
+ :affiliation [Inria Sophia Antipolis]
+ :address (ref :url "http://www.inria.fr/mimosa/Manuel.Serrano"))
+
+ (if (engine-format? "html")
+ (slide :title "Table of contents" :number #f :toc #f
+ (toc :chapter #f :section #f :subsection #f :subsubsection #f
+ :slide #t)))
+
+ (slide :title "X11 client" :toc #t :vspace 0.3
+
+ (itemize
+ (item "xlock")
+ (item "xeyes")
+ (item "xterm")))
+
+ (slide :title "Xclock" :toc #t :vspace 0.3
+
+ (center (sf (underline "The Unix xclock client")))
+ (slide-vspace 0.3)
+
+ (slide-pause)
+ (slide-embed :command "xlock"
+ :alt (frame "Can't run embedded application"))))
diff --git a/skribe/doc/user/src/start1.skb b/skribe/doc/user/src/start1.skb
new file mode 100644
index 0000000..4e37dda
--- /dev/null
+++ b/skribe/doc/user/src/start1.skb
@@ -0,0 +1,2 @@
+(document :title [Hello World!] [
+This is a very simple text.])
diff --git a/skribe/doc/user/src/start2.skb b/skribe/doc/user/src/start2.skb
new file mode 100644
index 0000000..9fcfdbf
--- /dev/null
+++ b/skribe/doc/user/src/start2.skb
@@ -0,0 +1,2 @@
+(document :title [Hello World!] [
+This is a ,(bold [very]) ,(it [simple]) ,(color :fg [red] [text]).])
diff --git a/skribe/doc/user/src/start3.skb b/skribe/doc/user/src/start3.skb
new file mode 100644
index 0000000..0705966
--- /dev/null
+++ b/skribe/doc/user/src/start3.skb
@@ -0,0 +1,10 @@
+(document :title [Hello World!]
+
+(section :title [A first Section] [
+ This is a ,(bold [very]) ,(it [simple]) ,(color :fg [red] [text]).])
+
+(section :title [A second Section] [
+ That section contains an ,(bold itemize) construction:
+ ,(itemize (item [first item])
+ (item [second item])
+ (item [third item]))]))
diff --git a/skribe/doc/user/src/start4.skb b/skribe/doc/user/src/start4.skb
new file mode 100644
index 0000000..3311925
--- /dev/null
+++ b/skribe/doc/user/src/start4.skb
@@ -0,0 +1,13 @@
+(document :title [Various links] [
+
+(section :title "A Section" [
+The first link points to an external web page. Here we point to a
+,(ref :url [http://slashdot.org/] [Slashdot])
+web page. The second one points to the second
+,(ref :section [A second Section] [Section])
+of that document.])
+
+(section :title [A second Section] [
+The last links points to the first
+,(ref :scribe [user.scr] :figure [A simple web page] [Figure])
+of the Scribe User Manual.])])
diff --git a/skribe/doc/user/src/start5.skb b/skribe/doc/user/src/start5.skb
new file mode 100644
index 0000000..9e6b877
--- /dev/null
+++ b/skribe/doc/user/src/start5.skb
@@ -0,0 +1,9 @@
+(resolve (lambda (n e env)
+ (let* ((current-chapter (ast-chapter n))
+ (body (markup-body current-chapter))
+ (sects (filter (lambda (x) (is-markup? x 'section))
+ body)))
+ (itemize
+ (map (lambda (x)
+ (item (it (markup-option x :title))))
+ sects))))) \ No newline at end of file