aboutsummaryrefslogtreecommitdiff
path: root/doc/user/examples.skb
blob: a37ece45ad0bd16f1c2bbe4c6c4bce9d0aad989d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
;*=====================================================================*/
;*    serrano/prgm/project/skribe/doc/user/examples.skb                */
;*    -------------------------------------------------------------    */
;*    Author      :  Manuel Serrano                                    */
;*    Creation    :  Wed Sep  3 13:35:34 2003                          */
;*    Last change :  Tue Feb  3 14:52:33 2004 (serrano)                */
;*    Copyright   :  2003-04 Manuel Serrano                            */
;*    -------------------------------------------------------------    */
;*    The list of examples                                             */
;*=====================================================================*/

;*---------------------------------------------------------------------*/
;*    Examples                                                         */
;*---------------------------------------------------------------------*/
(chapter :title "List of examples"

(resolve (lambda (n e env)
	    (let* ((d (ast-document n))
		   (ex (container-env-get d 'example-env)))
	       (table (map (lambda (e)
			      (tr (td :align 'left
				      (markup-option e :number)
				      ". "
				      (ref :handle (handle e)
					   :text (markup-option e :legend))
				      " (chapter "
				      (let ((c (ast-chapter e)))
					 (ref :handle (handle c)
					      :text (markup-option c :title)))
				      ")")))
			   (sort ex
				 (lambda (e1 e2)
				    (< (markup-option e1 :number) 
				       (markup-option e2 :number))))))))))