From 5a6d3f06176735d654b5db8d396b3b043bfca3c8 Mon Sep 17 00:00:00 2001 From: Ludovic Court`es Date: Wed, 18 Jan 2006 16:20:20 +0000 Subject: Various fixes: HTML engine, resolution, compatibility. * src/guile/skribilo/engine/html.scm: Load `(skribilo parameters)'. Use `*destination-file*' instead of `*skribe-dest*'. * src/guile/skribilo/parameters.scm (*ref-base*): Documented it. * src/guile/skribilo/prog.scm (extract-mark): Expect lists, not just pairs. (split-line): Likewise. * src/guile/skribilo/resolve.scm (do-resolve!)[]: Differentiate items matching `list?' and those just matching `pair?'. * src/guile/skribilo/utils/compat.scm: Load `(srfi srfi-13)'. (%skribe-known-files): Augmented. Fixed `web-book.skr'. (skribe-load): Produce output upon verbosity. (file-prefix): Fixed. (file-suffix): Fixed. git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-30 --- src/guile/skribilo/engine/html.scm | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'src/guile/skribilo/engine/html.scm') diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm index a376713..1f3466f 100644 --- a/src/guile/skribilo/engine/html.scm +++ b/src/guile/skribilo/engine/html.scm @@ -17,6 +17,7 @@ ;*=====================================================================*/ (define-skribe-module (skribilo engine html) + :autoload (skribilo parameters) (*destination-file*) :use-module ((srfi srfi-19) :renamer (symbol-prefix-proc 's19:))) @@ -60,17 +61,17 @@ (engine-custom e 'subsection-file)) (and (is-markup? node 'subsubsection) (engine-custom e 'subsubsection-file))) - (let* ((b (or (and (string? *skribe-dest*) - (prefix *skribe-dest*)) + (let* ((b (or (and (string? (*destination-file*)) + (prefix (*destination-file*))) "")) - (s (or (and (string? *skribe-dest*) - (suffix *skribe-dest*)) + (s (or (and (string? (*destination-file*)) + (suffix (*destination-file*))) "html")) (nm (get-file-name b s))) (markup-option-add! node filename nm) nm)) ((document? node) - *skribe-dest*) + (*destination-file*)) (else (let ((p (ast-parent node))) (if (container? p) @@ -986,8 +987,8 @@ (sui-blocks 'subsection n e) (sui-blocks 'subsubsection n e) (display " )\n")) - (if (string? *skribe-dest*) - (let ((f (format #f "~a.sui" (prefix *skribe-dest*)))) + (if (string? (*destination-file*)) + (let ((f (format #f "~a.sui" (prefix (*destination-file*))))) (with-output-to-file f sui)) (sui))) @@ -1132,22 +1133,17 @@ (printf "" (- 4 level)) (printf "" - (if (and *skribe-dest* - (string=? f *skribe-dest*)) + (if (and (*destination-file*) + (string=? f (*destination-file*))) "" - (strip-ref-base (or f *skribe-dest* ""))) + (strip-ref-base (or f (*destination-file*) ""))) (string-canonicalize id)) (output (markup-option c :title) e) (display "") (display "\n") ;; the children (for-each (lambda (n) (toc-entry n (+ 1 level))) ch))) - (define (symbol->keyword s) - (cond-expand - (stklos - (make-keyword s)) - (bigloo - (string->keyword (string-append ":" (symbol->string s)))))) + (let* ((c (markup-option n :chapter)) (s (markup-option n :section)) (ss (markup-option n :subsection)) @@ -1925,9 +1921,10 @@ (markup-class n) "inbound"))) (printf ""))) -- cgit v1.2.3