summary refs log tree commit diff
path: root/src/guile/skribilo/engine
diff options
context:
space:
mode:
authorLudovic Court`es2006-01-18 16:20:20 +0000
committerLudovic Court`es2006-01-18 16:20:20 +0000
commit5a6d3f06176735d654b5db8d396b3b043bfca3c8 (patch)
tree2e34bb9c9f46dd2cf96946bdfde0310aad017898 /src/guile/skribilo/engine
parentff5f019ffd54745954d8a6ed094f0fd10ac0e467 (diff)
downloadskribilo-5a6d3f06176735d654b5db8d396b3b043bfca3c8.tar.gz
skribilo-5a6d3f06176735d654b5db8d396b3b043bfca3c8.tar.lz
skribilo-5a6d3f06176735d654b5db8d396b3b043bfca3c8.zip
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!)[<pair>]: 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
Diffstat (limited to 'src/guile/skribilo/engine')
-rw-r--r--src/guile/skribilo/engine/html.scm33
1 files changed, 15 insertions, 18 deletions
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 "<td colspan=\"~a\" width=\"100%\">"
 			    (- 4 level))
 		    (printf "<a href=\"~a#~a\">"
-			    (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 "</a></td>")
 		    (display "</tr>\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 "<a href=\"~a#~a\" class=\"~a\""
-			 (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)
 			 class)
 		 (display ">")))