From 9745ff5744d97fa66b42587e6a304d3bdf8054ab Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 7 Apr 2008 22:22:16 +0200 Subject: doc: Use the native API instead of `--compat=skribe'. * doc/user/Makefile.am (skrflags): Remove `--compat=skribe'. * doc/user/*.skb: Trivial API update. --- doc/user/Makefile.am | 3 --- doc/user/char.skb | 14 +++++++++++--- doc/user/document.skb | 10 ++++++++-- doc/user/package.skb | 2 +- doc/user/sectioning.skb | 4 ++-- doc/user/slide.skb | 18 +++++++++--------- doc/user/src/bib5.skb | 2 +- doc/user/start.skb | 8 ++++---- doc/user/user.skb | 24 +++++++++++++++++++++++- 9 files changed, 59 insertions(+), 26 deletions(-) (limited to 'doc') diff --git a/doc/user/Makefile.am b/doc/user/Makefile.am index 44f32f4..201a116 100644 --- a/doc/user/Makefile.am +++ b/doc/user/Makefile.am @@ -37,9 +37,6 @@ skrflags = -I $(srcdir) -P $(top_srcdir)/doc/img \ -e '(define %top-srcdir "$(top_srcdir)")' \ -e '(define %top-builddir "$(top_builddir)")' -# FIXME: Eventually, we should use the native API. -skrflags += --compat=skribe - if HAVE_PLOTICUS skrflags += -e "(define %have-ploticus? (= 1 1))" \ -e "(define %ploticus-path \"$(PLOTICUS)\")" diff --git a/doc/user/char.skb b/doc/user/char.skb index c56c455..d036c21 100644 --- a/doc/user/char.skb +++ b/doc/user/char.skb @@ -1,5 +1,6 @@ ;;; char.skb -- Characters, strings and symbols ;;; +;;; Copyright 2008 Ludovic Courtès ;;; Copyright 2003, 2004 Manuel Serrano ;;; ;;; @@ -86,13 +87,20 @@ of the capacity of the targeted format.]) (tr :bg *prgm-skribe-color* (td :align 'left s) (td :align 'left (symbol s)))) - (sort (let ((t (make-hashtable))) + (sort (let ((t (make-hash-table))) (for-each (lambda (e) (for-each (lambda (s) - (hashtable-put! t (car s) (car s))) + (hash-set! t (car s) (car s))) (engine-symbol-table e))) *api-engines*) - (hashtable->list t)) + (hash-fold (lambda (key value result) + (cons key result)) + '() + t)) string ;;; Copyright 2003, 2004 Manuel Serrano ;;; ;;; @@ -29,8 +30,8 @@ (ta (table (tr (map (lambda (n) (td :valign 'top :align 'center n)) (if (list? a) a (list a))))))) - (skribe-eval (center (bold t)) e) - (skribe-eval (center ta) e) + (evaluate-document (center (bold t)) e) + (evaluate-document (center ta) e) (output b e)))) ;*---------------------------------------------------------------------*/ @@ -91,3 +92,8 @@ document.]) (example-produce (example :legend "The author markup" (prgm :file "src/api3.skb")) (disp (include "src/api3.skb"))))) + +;;; Local Variables: +;;; coding: latin-1 +;;; ispell-local-dictionary: "american" +;;; End: diff --git a/doc/user/package.skb b/doc/user/package.skb index 9cf67cc..4188c53 100644 --- a/doc/user/package.skb +++ b/doc/user/package.skb @@ -26,7 +26,7 @@ (p [This chapter describes the standard packages that come with Skribilo. Additional packages may be found from the ,(ref :url -(skribe-url) :text "Skribe web page"), but they may require slight +*skribe-url* :text "Skribe web page"), but they may require slight modifications to work correctly with Skribilo.]) (p [In order to use the facilities described in the following diff --git a/doc/user/sectioning.skb b/doc/user/sectioning.skb index db227d7..1fc19cb 100644 --- a/doc/user/sectioning.skb +++ b/doc/user/sectioning.skb @@ -1,6 +1,6 @@ ;;; sectioning.skb -- Sectioning markups ;;; -;;; Copyright 2007 Ludovic Courtès +;;; Copyright 2007, 2008 Ludovic Courtès ;;; Copyright 2003, 2004 Manuel Serrano ;;; ;;; @@ -26,7 +26,7 @@ (lambda (n e) (let* ((t (markup-option n :title)) (b (markup-body n))) - (skribe-eval (center (bold t)) e) + (evaluate-document (center (bold t)) e) (output b e)))) ;*---------------------------------------------------------------------*/ diff --git a/doc/user/slide.skb b/doc/user/slide.skb index 92d3f43..aa7edb7 100644 --- a/doc/user/slide.skb +++ b/doc/user/slide.skb @@ -31,29 +31,29 @@ (ta (table (tr (map (lambda (n) (td :valign 'top :align 'center n)) (if (list? a) a (list a))))))) - (skribe-eval (center (bold t)) e) - (skribe-eval (center ta) e) + (evaluate-document (center (bold t)) e) + (evaluate-document (center ta) e) (output b e)))) (define dummy-slide-output (lambda (n e) (let* ((t (markup-option n :title)) (b (markup-body n))) - (skribe-eval (bold t) e) + (evaluate-document (bold t) e) (output b e)))) (define dummy-slide-vspace-output (lambda (n e) - (skribe-eval (linebreak) e) - (skribe-eval (center (tt "[vspace]")) e) - (skribe-eval (linebreak) e))) + (evaluate-document (linebreak) e) + (evaluate-document (center (tt "[vspace]")) e) + (evaluate-document (linebreak) e))) (define dummy-slide-embed-output (lambda (n e) - (skribe-eval (linebreak) e) - (skribe-eval (tt (or (markup-option n :alt) + (evaluate-document (linebreak) e) + (evaluate-document (tt (or (markup-option n :alt) (markup-option n :command))) - e))) + e))) ;*---------------------------------------------------------------------*/ ;* Computer programs */ diff --git a/doc/user/src/bib5.skb b/doc/user/src/bib5.skb index a0ee361..3ace2b7 100644 --- a/doc/user/src/bib5.skb +++ b/doc/user/src/bib5.skb @@ -17,7 +17,7 @@ (markup-writer '&bib-entry-title e :action (lambda (n e) - (skribe-eval (it (markup-body n)) e))) + (evaluate-document (it (markup-body n)) e))) e)) (the-bibliography :pred (lambda (m n) diff --git a/doc/user/start.skb b/doc/user/start.skb index addb51c..0776799 100644 --- a/doc/user/start.skb +++ b/doc/user/start.skb @@ -135,12 +135,12 @@ presents here the kind of documents that can be created with Skribilo.]) (p [In this section we present how to introduce a simple computation into a document. For instance, the following sentence -,(disp [ -Document creation date: ,(date)]) -is generated with the following piece of code +,(disp [Document creation date: ,(date->string (current-date))]) + +is generated with the following piece of code (using ,(srfi-ref 19)): ,(prgm :language skribe [ -\[Document creation date: \,(date)\] +\[Document creation date: \,(date->string (current-date))\] ]) Here, we use the Skribilo function ,(code "date") to compute the date to diff --git a/doc/user/user.skb b/doc/user/user.skb index 2d5ca48..dfb5a79 100644 --- a/doc/user/user.skb +++ b/doc/user/user.skb @@ -34,7 +34,29 @@ (skribilo package pie) (skribilo package slide) (skribilo package web-book2) - (skribilo reader)) + + (skribilo source lisp) + (skribilo source xml) + (skribilo source c)) + +;*---------------------------------------------------------------------*/ +;* Internals */ +;*---------------------------------------------------------------------*/ +(use-modules (skribilo ast) + (skribilo reader) + (skribilo engine) + (skribilo writer) + (skribilo output) + (skribilo evaluator) + (skribilo config) + (skribilo index) + (skribilo lib)) ;; for `skribe-warning' + +;*---------------------------------------------------------------------*/ +;* SRFIs */ +;*---------------------------------------------------------------------*/ +(use-modules (srfi srfi-19)) + (if %have-ploticus? (set! %ploticus-program %ploticus-path)) -- cgit v1.2.3