diff options
author | Ludovic Court`es | 2005-11-02 10:08:38 +0000 |
---|---|---|
committer | Ludovic Court`es | 2005-11-02 10:08:38 +0000 |
commit | b76d5e1b252967521f210eac10ddbf089dde8c6a (patch) | |
tree | 00fc81c51256991c04799d79a749bbdd5b9fad30 /src/guile/skribilo/engine/lout.scm | |
parent | ba63b8d4780428d9f63f6ace7f49361b77401112 (diff) | |
parent | f553cb65b157b6df9563cefa593902d59301461b (diff) | |
download | skribilo-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/lout.scm')
-rw-r--r-- | src/guile/skribilo/engine/lout.scm | 185 |
1 files changed, 93 insertions, 92 deletions
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 */ |