summary refs log tree commit diff
path: root/src/guile/skribilo/engine
diff options
context:
space:
mode:
authorLudovic Courtes2006-01-18 22:16:43 +0000
committerLudovic Courtes2006-01-18 22:16:43 +0000
commit72c195ec8923ca616648ccf64b002a80bcda1415 (patch)
tree296c3ac25929a20f2f1ec6f1523c16913c382bbd /src/guile/skribilo/engine
parent46c709dc1f242fa680d4425da4dfc9314686e9cc (diff)
parent5a6d3f06176735d654b5db8d396b3b043bfca3c8 (diff)
downloadskribilo-72c195ec8923ca616648ccf64b002a80bcda1415.tar.gz
skribilo-72c195ec8923ca616648ccf64b002a80bcda1415.tar.lz
skribilo-72c195ec8923ca616648ccf64b002a80bcda1415.zip
Merge from lcourtes@laas.fr--2004-libre
Patches applied:

 * lcourtes@laas.fr--2004-libre/skribilo--devel--1.2  (patch 25-30)

   - Removed the Bigloo/STkLos in the `legacy' directory.
   - Cleaned up the Arch inventory and removed old useless makefiles.
   - Introduced SRFI-3[45] conditions; cleaned up `evaluator.scm'.
   - More SRFI-3[45] enhancements; first stab at the user documentation.
   - Towards a self-hosted user manual.
   - Various fixes: HTML engine, resolution, compatibility.

git-archimport-id: lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-27
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 ">")))