From d43ab320c8c711aef6417d33a33d0b3d2058f690 Mon Sep 17 00:00:00 2001 From: Ludovic Courtes Date: Sun, 19 Mar 2006 20:08:40 +0000 Subject: Various documentation fixes + completed the doc automake stuff. * doc/user/Makefile.am (%.html): Added `-P ../img'. (%.lout): Likewise. (SUBDIRS): New. * doc/user/char.skb (Some characters): Use the Lout-specific example for `!' when relevant. * doc/user/figure.skb (The figure markup): Avoid using `example-produce'. * doc/user/slide.skb (dummy-slide-set-output): New. (dummy-slide-output): New. (dummy-slide-vspace-output): New. (dummy-slide-embed-output): New. (Example of Skribilo Slides): Use a processor, as in `document.skb', in order to use the dummy output functions. git-archimport-id: lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-50 --- doc/user/Makefile.am | 14 +++++++++-- doc/user/char.skb | 9 ++++--- doc/user/figure.skb | 10 +++----- doc/user/slide.skb | 59 +++++++++++++++++++++++++++++++++++++++++---- doc/user/src/Makefile.am | 11 +++++++++ doc/user/src/api20-html.skb | 2 ++ doc/user/src/api20-lout.skb | 2 ++ doc/user/src/api20.skb | 2 -- doc/user/user.skb | 8 +++++- 9 files changed, 97 insertions(+), 20 deletions(-) create mode 100644 doc/user/src/Makefile.am create mode 100644 doc/user/src/api20-html.skb create mode 100644 doc/user/src/api20-lout.skb delete mode 100644 doc/user/src/api20.skb (limited to 'doc/user') diff --git a/doc/user/Makefile.am b/doc/user/Makefile.am index d6ab75f..d53d46c 100644 --- a/doc/user/Makefile.am +++ b/doc/user/Makefile.am @@ -1,3 +1,13 @@ +SUBDIRS = src + +EXTRA_DIST = bib.skb char.skb colframe.skb document.skb emacs.skb \ + engine.skb enumeration.skb eq.skb examples.skb figure.skb \ + font.skb footnote.skb htmle.skb image.skb index.skb \ + justify.skb latexe.skb lib.skb line.skb links.skb \ + markup.skb ornament.skb package.skb prgm.skb sectioning.skb \ + skribe-config.skb skribec.skb skribeinfo.skb slide.skb start.skb \ + syntax.skb table.skb toc.skb user.skb xmle.skb + BUILT_SOURCES = user.html skribilo = $(top_srcdir)/src/skribilo @@ -5,7 +15,7 @@ load_path = $(top_srcdir)/src/guile:$(top_srcdir)/src/guile/skribilo/package %.html: %.skb GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \ - $(skribilo) --target html -I ../ -o $@ $< + $(skribilo) --target html -I ../ -P ../img -o $@ $< if HAVE_LOUT @@ -13,7 +23,7 @@ BUILT_SOURCES += user.ps %.lout: %.skb GUILE_LOAD_PATH=$(load_path):$$GUILE_LOAD_PATH \ - $(skribilo) --target lout -I ../ -o $@ $< + $(skribilo) --target lout -I ../ -P ../img -o $@ $< %.ps: %.lout $(LOUT) -c $(<:%.lout=%) -o $@ $< diff --git a/doc/user/char.skb b/doc/user/char.skb index 85409f0..fe15831 100644 --- a/doc/user/char.skb +++ b/doc/user/char.skb @@ -49,9 +49,12 @@ without any transformation from the engine.]) (p [The sequences ,(code "$1"), ,(code "$2"), ... in the ,(param 'format) are replaced with the actual values of the arguments ,(param 'node).]) -(example-produce - (example :legend "Some characters" (prgm :file "src/api20.skb")) - (disp (include "src/api20.skb")))) +(let ((file (if (engine-format? "lout") + "src/api20-lout.skb" + "src/api20-html.skb"))) + (example-produce + (example :legend "Some characters" (prgm :file file)) + (disp (include file))))) ;*--- Symbols ---------------------------------------------------------*/ (subsection :title "Symbols" diff --git a/doc/user/figure.skb b/doc/user/figure.skb index 08fbdd5..f6bfe8c 100644 --- a/doc/user/figure.skb +++ b/doc/user/figure.skb @@ -32,9 +32,10 @@ :see-also '(ref document)) -(example-produce + ;; Note: We can't use `example-produce' because the Lout engine, for + ;; instance, forbids the occurrence of `figure' within a table. (example :legend "The figure markup" (prgm :file "src/api14.skb")) - (disp (include "src/api14.skb"))) + (include "src/api14.skb") ;*--- List of figures -------------------------------------------------*/ (subsection :title "List of figures" @@ -51,8 +52,3 @@ shows how to display the list of figures of a document.]) (example :legend "The figure markup" (prgm :file "src/api15.skb")) (disp (include "src/api15.skb"))))) - - - - - diff --git a/doc/user/slide.skb b/doc/user/slide.skb index aff8ab5..ec2186a 100644 --- a/doc/user/slide.skb +++ b/doc/user/slide.skb @@ -10,10 +10,45 @@ ;*=====================================================================*/ (skribe-load "slide.skr") +;*---------------------------------------------------------------------*/ +;* dummy-slide-set-output ... */ +;*---------------------------------------------------------------------*/ +(define dummy-slide-set-output + (lambda (n e) + (let* ((a (markup-option n :author)) + (t (markup-option n :title)) + (b (markup-body n)) + (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) + (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) + (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))) + +(define dummy-slide-embed-output + (lambda (n e) + (skribe-eval (linebreak) e) + (skribe-eval (tt (or (markup-option n :alt) + (markup-option n :command))) + e))) + ;*---------------------------------------------------------------------*/ ;* Computer programs */ ;*---------------------------------------------------------------------*/ -(chapter :title "Slide Package" +(chapter :title "Slide Package" (p [ This chapter describes the facilities Skribe offers authoring slides. @@ -105,11 +140,25 @@ output format does not support embedded application.])) "html4"))) ;; Show the example and its result (example-produce - (example :legend "Example of Skribe slides" + (example :legend "Example of Skribilo slides" (prgm :file "src/slides.skb")) - (disp (include "src/slides.skb"))) + (disp + (processor :combinator + (lambda (e1 e2) + (let ((e (copy-engine 'document-engine e2))) + (markup-writer 'document e + :options '(:title :author :ending) + :action dummy-slide-set-output) + (markup-writer 'slide e + :options '(:title :ident + :number :toc :vspace) + :action dummy-slide-output) + (markup-writer 'slide-vspace + :action dummy-slide-vspace-output) + (markup-writer 'slide-embed + :action dummy-slide-embed-output) + e)) + (include "src/slides.skb")))) ;; Show only the example (i.e. don't produce a document in a document) (example :legend "Example of Skribe slides" (prgm :file "src/slides.skb"))))) - - diff --git a/doc/user/src/Makefile.am b/doc/user/src/Makefile.am new file mode 100644 index 0000000..6d7daf4 --- /dev/null +++ b/doc/user/src/Makefile.am @@ -0,0 +1,11 @@ +EXTRA_DIST = api1.skb api10.skb api11.skb api12.skb api13.skb \ + api14.skb api15.skb api16.skb api17.skb api18.skb \ + api19.skb api2.skb api20-html.skb api20-lout.skb api3.skb \ + api4.skb api5.skb api6.skb api7.skb api8.skb \ + api9.skb bib1.sbib bib2.skb bib3.skb bib4.skb \ + bib5.skb bib6.skb eq1.skb eq2.skb index1.skb \ + index2.skb index3.skb links1.skb links2.skb prgm1.skb \ + prgm2.skb prgm3.skb slides.skb start1.skb start2.skb \ + start3.skb start4.skb start5.skb + +## arch-tag: 9614a784-cac2-4399-bd61-18c9172f48a8 diff --git a/doc/user/src/api20-html.skb b/doc/user/src/api20-html.skb new file mode 100644 index 0000000..686efcb --- /dev/null +++ b/doc/user/src/api20-html.skb @@ -0,0 +1,2 @@ +[A simple ,(! "string"). A more annoying one ,(! "string"). +A last one with arguments ,(! "$1 $2" (bold 1) (it 2)).] diff --git a/doc/user/src/api20-lout.skb b/doc/user/src/api20-lout.skb new file mode 100644 index 0000000..89fb961 --- /dev/null +++ b/doc/user/src/api20-lout.skb @@ -0,0 +1,2 @@ +[A simple ,(! "string"). A more annoying one ,(! "@B { string }"). +A last one with arguments ,(! "@Underline { $1 $2 }" (bold 1) (it 2)).] diff --git a/doc/user/src/api20.skb b/doc/user/src/api20.skb deleted file mode 100644 index 686efcb..0000000 --- a/doc/user/src/api20.skb +++ /dev/null @@ -1,2 +0,0 @@ -[A simple ,(! "string"). A more annoying one ,(! "string"). -A last one with arguments ,(! "$1 $2" (bold 1) (it 2)).] diff --git a/doc/user/user.skb b/doc/user/user.skb index 1403e71..f6a25ef 100644 --- a/doc/user/user.skb +++ b/doc/user/user.skb @@ -30,6 +30,12 @@ (let ((he (find-engine 'html))) (engine-custom-set! he 'body-width 100.)) +;*---------------------------------------------------------------------*/ +;* Lout custom */ +;*---------------------------------------------------------------------*/ +(let ((le (find-engine 'lout))) + (engine-custom-set! le 'document-type 'doc)) + ;*---------------------------------------------------------------------*/ ;* The various indexes */ ;*---------------------------------------------------------------------*/ @@ -155,7 +161,7 @@ as HTML, Info pages, man pages, Postscript, etc.])))) (begin (chapter :title "Table of contents" (toc :chapter #t :section #t :subsection #t)) - (section :title "Index" :number #f :ident "Index" + (chapter :title "Index" :number #f :ident "Index" (mark "global index") (the-index :column (if (engine-format? "latex") 2 3) *markup-index* *custom-index* *function-index* *package-index* -- cgit v1.2.3