summaryrefslogtreecommitdiff
path: root/doc/user/src/prgm2.skb
blob: 8ba1bc344914a1f4f607745ebb2ee19501e68e9f (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(use-modules (skribilo source lisp))

(linebreak)
(frame :width 100. 
       (prog (source :language scheme :file "prgm.skb" :definition 'fib)))

(p [The Fibonacci function is defined on line ,(ref :line "fib").])
(linebreak)

;!start
(frame :width 100.
       (prog :line 21 :mark #f
	     (source :language skribe :file "prgm.skb" :start 20 :stop 27)))
;!stop

(p [Here is the source of the frame above:])
(linebreak)

(frame :width 100.
       (prog :line 30 :mark #f
	     (source :language skribe :file "src/prgm2.skb"
		:start (string-append ";" "!start") ;; trick!
		:stop (string-append ";" "!stop"))))