From ad89f8efd5519eb8d40c2fec368c960a6a8e48bc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 1 Dec 2007 16:59:20 +0100 Subject: doc: Improved rendering of `example' in Lout. * doc/modules/skribilo/documentation/manual.scm: Add `lout' writer for `example'. (example-produce): Remove `(it "Example:")'. --- doc/modules/skribilo/documentation/manual.scm | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'doc/modules') diff --git a/doc/modules/skribilo/documentation/manual.scm b/doc/modules/skribilo/documentation/manual.scm index 86629a2..6df032e 100644 --- a/doc/modules/skribilo/documentation/manual.scm +++ b/doc/modules/skribilo/documentation/manual.scm @@ -67,6 +67,26 @@ legend) e))))) +;*---------------------------------------------------------------------*/ +;* Lout configuration */ +;*---------------------------------------------------------------------*/ +(let ((le (find-engine 'lout))) + (markup-writer 'example le + :options '(:legend :number) + :action (lambda (n e) + (let ((ident (markup-ident n)) + (number (markup-option n :number)) + (legend (markup-option n :legend))) + (evaluate-document (mark ident) e) + (display "\n@LP\n5c @Wide @FullWidthRule\n@LP\n") + (output (list (! "{ Schoolbook Bold 1.0f } @Font { $1 }" + (list (format #f "Example ~a. " number) + legend)) + (! "\n@LP\n") + (markup-body n)) + e))))) + + ;*---------------------------------------------------------------------*/ ;* html-browsing-extra ... */ ;*---------------------------------------------------------------------*/ @@ -240,10 +260,10 @@ ;* example-produce ... */ ;*---------------------------------------------------------------------*/ (define-markup (example-produce example . produce) - (list (it "Example:") - example + (list example (if (pair? produce) - (list (paragraph "Produces:") (car produce))))) + (list (paragraph "... produces:") + (car produce))))) ;*---------------------------------------------------------------------*/ ;* markup-ref ... */ -- cgit v1.2.3