summary refs log tree commit diff
path: root/src/guile/skribilo/engine
diff options
context:
space:
mode:
authorLudovic Court`es2005-11-02 10:08:38 +0000
committerLudovic Court`es2005-11-02 10:08:38 +0000
commitb76d5e1b252967521f210eac10ddbf089dde8c6a (patch)
tree00fc81c51256991c04799d79a749bbdd5b9fad30 /src/guile/skribilo/engine
parentba63b8d4780428d9f63f6ace7f49361b77401112 (diff)
parentf553cb65b157b6df9563cefa593902d59301461b (diff)
downloadskribilo-b76d5e1b252967521f210eac10ddbf089dde8c6a.tar.gz
skribilo-b76d5e1b252967521f210eac10ddbf089dde8c6a.tar.lz
skribilo-b76d5e1b252967521f210eac10ddbf089dde8c6a.zip
Cleaned up the source tree and the installation process.
Patches applied:

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-6
   Cosmetic changes.

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-7
   Removed useless files, integrated packages.

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-8
   Removed useless files, integrated packages.

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-9
   Moved the STkLos and Bigloo code to `legacy'.

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-10
   Installed Autoconf/Automake machinery.  Fixed a few things.

 * lcourtes@laas.fr--2005-mobile/skribilo--devel--1.2--patch-11
   Changes related to source-highlighting and to the manual.


git-archimport-id: lcourtes@laas.fr--2004-libre/skribilo--devel--1.2--patch-10
Diffstat (limited to 'src/guile/skribilo/engine')
-rw-r--r--src/guile/skribilo/engine/Makefile.am5
-rw-r--r--src/guile/skribilo/engine/html.scm2
-rw-r--r--src/guile/skribilo/engine/latex.scm2
-rw-r--r--src/guile/skribilo/engine/lout.scm185
4 files changed, 101 insertions, 93 deletions
diff --git a/src/guile/skribilo/engine/Makefile.am b/src/guile/skribilo/engine/Makefile.am
new file mode 100644
index 0000000..7b6ec2c
--- /dev/null
+++ b/src/guile/skribilo/engine/Makefile.am
@@ -0,0 +1,5 @@
+guilemoduledir = $(GUILE_SITE)/skribilo/engine
+dist_guilemodule_DATA = base.scm context.scm html.scm html4.scm	\
+			latex-simple.scm latex.scm		\
+			lout.scm				\
+			xml.scm
diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm
index 3ad7da6..6e0dc85 100644
--- a/src/guile/skribilo/engine/html.scm
+++ b/src/guile/skribilo/engine/html.scm
@@ -82,7 +82,7 @@
 ;*---------------------------------------------------------------------*/
 ;*    html-engine ...                                                  */
 ;*---------------------------------------------------------------------*/
-(define html-engine
+(define-public html-engine
    ;; setup the html engine
    (default-engine-set!
       (make-engine 'html
diff --git a/src/guile/skribilo/engine/latex.scm b/src/guile/skribilo/engine/latex.scm
index 8bd0ae3..2a59b4f 100644
--- a/src/guile/skribilo/engine/latex.scm
+++ b/src/guile/skribilo/engine/latex.scm
@@ -16,6 +16,8 @@
 ;*       @ref ../../doc/user/latexe.skb:ref@                           */
 ;*=====================================================================*/
 
+(define-skribe-module (skribilo engine latex))
+
 ;*---------------------------------------------------------------------*/
 ;*    latex-verbatim-encoding ...                                      */
 ;*---------------------------------------------------------------------*/
diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm
index b675e8a..36df9f9 100644
--- a/src/guile/skribilo/engine/lout.scm
+++ b/src/guile/skribilo/engine/lout.scm
@@ -384,10 +384,10 @@
 	     "    @PageMark @Tag\n"
 	     "}\n\n"
 
-	     "# @SkribeLeaders is used in `toc'\n"
+	     "# @SkribiloLeaders is used in `toc'\n"
 	     "# (this is mostly copied from the expert's guide)\n"
-	     "def @SkribeLeaders { "
-	     ,leader " |" ,leader-space " @SkribeLeaders }\n\n"))))
+	     "def @SkribiloLeaders { "
+	     ,leader " |" ,leader-space " @SkribiloLeaders }\n\n"))))
 
 (define (lout-make-doc-cover-sheet doc engine)
   ;; Create a cover sheet for node `doc' which is a doc-style Lout document.
@@ -397,7 +397,8 @@
 	(author (markup-option doc :author))
 	(date-line (engine-custom engine 'date-line))
 	(cover-sheet? (engine-custom engine 'cover-sheet?))
-	(multi-column? (> 1 (engine-custom engine 'column-number))))
+	(multi-column? (> (engine-custom engine 'column-number) 1)))
+
     (if multi-column?
 	;; In single-column document, `@FullWidth' yields a blank page.
 	(display "\n@FullWidth {"))
@@ -1205,7 +1206,7 @@
 	  (entry-proc node engine)
 
 	  (display " &1rt @OneCol { ")
-	  (printf " @SkribeLeaders & @PageOf { ~a }"
+	  (printf " @SkribiloLeaders & @PageOf { ~a }"
 		  (lout-tagify (markup-ident node)))
 	  (display " &0io } }")
 
@@ -2876,93 +2877,93 @@
 ;*---------------------------------------------------------------------*/
 ;*    Slides                                                           */
 ;*                                                                     */
-;* At some point, this should move to `slide.skr'.                     */
-;*---------------------------------------------------------------------*/
-; (skribe-load "slide.skr")
-
-; (markup-writer 'slide
-;    ;; FIXME:  In `slide.skr', `:ident' is systematically generated.
-;    :options '(:title :number :toc :ident) ;; '(:bg :vspace :image)
-
-;    :validate (lambda (n e)
-; 		(eq? (engine-custom e 'document-type) 'slides))
-
-;    :before (lambda (n e)
-; 	      (display "\n@Overhead\n")
-; 	      (display "  @Title { ")
-; 	      (output (markup-option n :title) e)
-; 	      (display " }\n")
-; 	      (if (markup-ident n)
-; 		  (begin
-; 		     (display "  @Tag { ")
-; 		     (display (lout-tagify (markup-ident n)))
-; 		     (display " }\n")))
-; 	      (if (markup-option n :number)
-; 		  (begin
-; 		     (display "  @BypassNumber { ")
-; 		     (output (markup-option n :number) e)
-; 		     (display " }\n")))
-; 	      (display "@Begin\n")
-
-; 	      ;; `doc' documents produce their PDF outline right after
-; 	      ;; `@Text @Begin'; other types of documents must produce it
-; 	      ;; as part of their first chapter.
-; 	      (lout-output-pdf-meta-info (ast-document n) e))
-
-;    :after "@End @Overhead\n")
-
-; (markup-writer 'slide-vspace
-;    :options '(:unit)
-;    :validate (lambda (n e)
-; 		(and (pair? (markup-body n))
-; 		     (number? (car (markup-body n)))))
-;    :action (lambda (n e)
-; 	      (printf "\n//~a~a # slide-vspace\n"
-; 		      (car (markup-body n))
-; 		      (case (markup-option n :unit)
-; 			 ((cm)              "c")
-; 			 ((point points pt) "p")
-; 			 ((inch inches)     "i")
-; 			 (else
-; 			  (skribe-error 'lout
-; 					"Unknown vspace unit"
-; 					(markup-option n :unit)))))))
-
-; (markup-writer 'slide-pause
-;    ;; FIXME:  Use a `pdfmark' custom action and a PDF transition action.
-;    ;; << /Type /Action
-;    ;; << /S /Trans
-;    ;; entry in the trans dict
-;    ;; << /Type /Trans  /S /Dissolve >>
-;    :action (lambda (n e)
-; 	     (let ((filter (make-string-replace lout-verbatim-encoding))
-; 		   (pdfmark "
-; [ {ThisPage} << /Trans << /S /Wipe /Dm /V /D 3 /M /O >> >> /PUT pdfmark"))
-;                (display (lout-embedded-postscript-code
-;                          (filter pdfmark))))))
-
-; ;; For movies, see
-; ;; http://www.tug.org/tex-archive/macros/latex/contrib/movie15/movie15.sty .
-; (markup-writer 'slide-embed
-;    :options '(:alt :geometry :rgeometry :geometry-opt :command)
-;    ;; FIXME:  `pdfmark'.
-;    ;; << /Type /Action   /S /Launch
-;    :action (lambda (n e)
-; 	     (let ((command (markup-option n :command))
-; 		   (filter (make-string-replace lout-verbatim-encoding))
-; 		   (pdfmark "[ /Rect [ 0 ysize xsize 0 ]
-;   /Name /Comment
-;   /Contents (This is an embedded application)
-;   /ANN pdfmark
-
-; [ /Type /Action
-;   /S    /Launch
-;   /F    (~a)
-;   /OBJ pdfmark"))
-; 	     (display (string-append
-; 		       "4c @Wide 3c @High "
-; 		       (lout-embedded-postscript-code
-; 			(filter (format #f pdfmark command))))))))
+;* At some point, we might want to move this to `slide.scm'.           */
+;*---------------------------------------------------------------------*/
+
+(use-modules (skribilo packages slide))
+
+(markup-writer 'slide
+   :options '(:title :number :toc :ident) ;; '(:bg :vspace :image)
+
+   :validate (lambda (n e)
+		(eq? (engine-custom e 'document-type) 'slides))
+
+   :before (lambda (n e)
+	      (display "\n@Overhead\n")
+	      (display "  @Title { ")
+	      (output (markup-option n :title) e)
+	      (display " }\n")
+	      (if (markup-ident n)
+		  (begin
+		     (display "  @Tag { ")
+		     (display (lout-tagify (markup-ident n)))
+		     (display " }\n")))
+	      (if (markup-option n :number)
+		  (begin
+		     (display "  @BypassNumber { ")
+		     (output (markup-option n :number) e)
+		     (display " }\n")))
+	      (display "@Begin\n")
+
+	      ;; `doc' documents produce their PDF outline right after
+	      ;; `@Text @Begin'; other types of documents must produce it
+	      ;; as part of their first chapter.
+	      (lout-output-pdf-meta-info (ast-document n) e))
+
+   :after "@End @Overhead\n")
+
+(markup-writer 'slide-vspace
+   :options '(:unit)
+   :validate (lambda (n e)
+		(and (pair? (markup-body n))
+		     (number? (car (markup-body n)))))
+   :action (lambda (n e)
+	      (printf "\n//~a~a # slide-vspace\n"
+		      (car (markup-body n))
+		      (case (markup-option n :unit)
+			 ((cm)              "c")
+			 ((point points pt) "p")
+			 ((inch inches)     "i")
+			 (else
+			  (skribe-error 'lout
+					"Unknown vspace unit"
+					(markup-option n :unit)))))))
+
+(markup-writer 'slide-pause
+   ;; FIXME:  Use a `pdfmark' custom action and a PDF transition action.
+   ;; << /Type /Action
+   ;; << /S /Trans
+   ;; entry in the trans dict
+   ;; << /Type /Trans  /S /Dissolve >>
+   :action (lambda (n e)
+	     (let ((filter (make-string-replace lout-verbatim-encoding))
+		   (pdfmark "
+[ {ThisPage} << /Trans << /S /Wipe /Dm /V /D 3 /M /O >> >> /PUT pdfmark"))
+               (display (lout-embedded-postscript-code
+                         (filter pdfmark))))))
+
+For movies, see
+http://www.tug.org/tex-archive/macros/latex/contrib/movie15/movie15.sty .
+(markup-writer 'slide-embed
+   :options '(:alt :geometry :rgeometry :geometry-opt :command)
+   ;; FIXME:  `pdfmark'.
+   ;; << /Type /Action   /S /Launch
+   :action (lambda (n e)
+	     (let ((command (markup-option n :command))
+		   (filter (make-string-replace lout-verbatim-encoding))
+		   (pdfmark "[ /Rect [ 0 ysize xsize 0 ]
+  /Name /Comment
+  /Contents (This is an embedded application)
+  /ANN pdfmark
+
+[ /Type /Action
+  /S    /Launch
+  /F    (~a)
+  /OBJ pdfmark"))
+	     (display (string-append
+		       "4c @Wide 3c @High "
+		       (lout-embedded-postscript-code
+			(filter (format #f pdfmark command))))))))
 
 ;*---------------------------------------------------------------------*/
 ;*    Restore the base engine                                          */