aboutsummaryrefslogtreecommitdiff
path: root/doc/modules
diff options
context:
space:
mode:
authorLudovic Courtès2007-12-01 16:01:58 +0100
committerLudovic Courtès2007-12-01 16:01:58 +0100
commit54ae61cd32d6580791aff55bfce96386fdff9550 (patch)
tree628ad90a727839e76f0c2f20dcf058e6f895b4a7 /doc/modules
parentdc4a68366c60ae8c0e9f2f4632d28bd8cae52cd0 (diff)
downloadskribilo-54ae61cd32d6580791aff55bfce96386fdff9550.tar.gz
skribilo-54ae61cd32d6580791aff55bfce96386fdff9550.tar.lz
skribilo-54ae61cd32d6580791aff55bfce96386fdff9550.zip
doc: Improve building using the Lout engine, with a `book' style.
* doc/modules/skribilo/documentation/api.scm (doc-engine): Use `ctrtable' instead of `table'. * doc/modules/skribilo/documentation/manual.scm: Add customs for the `lout' engine. (ctrtable): New. (prgm): Don't center frames in Lout. * doc/user/Makefile.am (EXTRA_DIST): Add `lout/book-style.lout'. (%.ps): Add "-r4 -I$(srcdir)/lout". * doc/user/char.skb: Use `ctrtable' instead of `(center (table...' for the list of chars. * doc/user/markup.skb: Add emacsology. * doc/user/package.skb: Don't show the sample code with non-HTML engines. * doc/user/src/html-navtabs.skb: Fix typo. * doc/user/user.skb: Don't produce out-of-chapter text in Lout.
Diffstat (limited to 'doc/modules')
-rw-r--r--doc/modules/skribilo/documentation/api.scm11
-rw-r--r--doc/modules/skribilo/documentation/manual.scm46
2 files changed, 45 insertions, 12 deletions
diff --git a/doc/modules/skribilo/documentation/api.scm b/doc/modules/skribilo/documentation/api.scm
index 429dcf6..1426521 100644
--- a/doc/modules/skribilo/documentation/api.scm
+++ b/doc/modules/skribilo/documentation/api.scm
@@ -1,7 +1,7 @@
;;; api.scm -- The style for documenting Scheme APIs.
;;;
+;;; Copyright 2005, 2006, 2007 Ludovic Courtès <ludo@gnu.org>
;;; Copyright 2003, 2004 Manuel Serrano
-;;; Copyright 2005, 2006, 2007 Ludovic Courtès <ludovic.courtes@laas.fr>
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
@@ -30,7 +30,7 @@
:use-module (skribilo utils syntax) ;; `%skribilo-module-reader'
:use-module (skribilo package base)
- :use-module (skribilo documentation manual) ;; `*markup-index*'
+ :use-module (skribilo documentation manual)
:use-module (skribilo documentation env) ;; `*api-engines*'
:use-module (srfi srfi-1)
@@ -609,8 +609,7 @@
((engine-format? "latex")
#f)
(else
- (center
- (apply table
+ (apply ctrtable
:&location &invocation-location
:width *prgm-width*
(tr :class 'api-table-header
@@ -629,5 +628,5 @@
(td :valign 'top
(code (exp->skribe (cadr def)))))
(td :align 'left :valign 'top (cadr r))))
- (filter cadr args))))))))))
-
+ (filter cadr args)))))))))
+
diff --git a/doc/modules/skribilo/documentation/manual.scm b/doc/modules/skribilo/documentation/manual.scm
index 6978afd..2c08aa1 100644
--- a/doc/modules/skribilo/documentation/manual.scm
+++ b/doc/modules/skribilo/documentation/manual.scm
@@ -1,7 +1,7 @@
;;; manual.scm -- Skribilo manuals and documentation style.
;;;
-;;; Copyright 2003, 2004 Manuel Serrano
;;; Copyright 2007 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright 2003, 2004 Manuel Serrano
;;;
;;;
;;; This program is free software; you can redistribute it and/or modify
@@ -92,7 +92,7 @@
:text "Directory"))))))))
;*---------------------------------------------------------------------*/
-;* Html configuration */
+;* HTML configuration */
;*---------------------------------------------------------------------*/
(let* ((he (find-engine 'html))
(bd (markup-writer-get 'bold he)))
@@ -118,6 +118,35 @@
(engine-custom-set! le 'usepackage npckg))
;*---------------------------------------------------------------------*/
+;* Lout */
+;*---------------------------------------------------------------------*/
+(let* ((le (find-engine 'lout)))
+ (engine-custom-set! le 'document-type 'book)
+ (engine-custom-set! le 'document-include
+ "@Include { \"book-style.lout\" }")
+ (engine-custom-set! le 'initial-language "English")
+ (engine-custom-set! le 'initial-font "Palatino Base 10p"))
+
+
+
+;*---------------------------------------------------------------------*/
+;* ctrtable ... */
+;*---------------------------------------------------------------------*/
+(define-markup (ctrtable :rest args)
+ (resolve (lambda (n e env)
+ ;; With Lout, centering whole tables precludes breaking over
+ ;; several pages (because `@Center' has an `@OneRow' effect),
+ ;; which is a problem with large tables.
+ (if (engine-format? "lout" e)
+ (list (linebreak)
+ (apply table
+ :&location &invocation-location
+ args))
+ (center (apply table
+ :&location &invocation-location
+ args))))))
+
+;*---------------------------------------------------------------------*/
;* prgm ... */
;*---------------------------------------------------------------------*/
(define-markup (prgm :rest opts :key (language skribe) (line #f) (file #f) (definition #f))
@@ -136,10 +165,15 @@
(line
(prog :line line sc))
(else
- (pre sc)))))
- (center
- (frame :margin 5 :border 0 :width *prgm-width*
- (color :margin 5 :width 100. :bg c pr)))))
+ (pre sc))))
+ (f (frame :margin 5 :border 0 :width *prgm-width*
+ (color :margin 5 :width 100. :bg c pr))))
+ (resolve (lambda (n e env)
+ ;; Same trick as for `ctrtable': don't center frames (which
+ ;; are actually `@Tbl') in Lout.
+ (if (engine-format? "lout" e)
+ (list (! "\n@LP\n@DP\n") f)
+ f)))))
;*---------------------------------------------------------------------*/
;* disp ... */