aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog19
-rw-r--r--src/guile/skribilo/engine/lout.scm17
2 files changed, 35 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ed9b64a..ad10f1a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,25 @@
# arch-tag: automatic-ChangeLog--skribilo@sv.gnu.org--2006/skribilo--devo--1.2
#
+2007-08-29 13:22:43 GMT Ludovic Court`es <ludovic.courtes@laas.fr> patch-158
+
+ Summary:
+ lout: Provide support for separate first-paragraph gap style.
+ Revision:
+ skribilo--devo--1.2--patch-158
+
+ * src/guile/skribilo/engine/lout.scm (lout-engine)[first-paragraph-gap]:
+ New custom.
+ (paragraph)[first-paragraph?]: New. Use it to honor
+ `first-paragraph-gap'.
+
+ modified files:
+ ChangeLog src/guile/skribilo/engine/lout.scm
+
+ new patches:
+ lcourtes@laas.fr--2006-libre/skribilo--devo--1.2--patch-100
+
+
2007-08-29 13:22:11 GMT Ludovic Court`es <ludovic.courtes@laas.fr> patch-157
Summary:
diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm
index 5285c76..d2a34e2 100644
--- a/src/guile/skribilo/engine/lout.scm
+++ b/src/guile/skribilo/engine/lout.scm
@@ -630,6 +630,10 @@
(paragraph-gap
"\n//1.0vx @ParaIndent @Wide &{0i}\n")
+ ;; Gap for the first paragraph within a container
+ ;; (e.g., the first paragraph of a chapter).
+ (first-paragraph-gap "\n@LP\n")
+
;; For multi-page tables, it may be
;; useful to set this to `#t'. However,
;; this looks kind of buggy.
@@ -1528,7 +1532,18 @@
(markup-markup (ast-parent n)))
'(chapter section subsection subsubsection slide))))
:before (lambda (n e)
- (let ((gap (engine-custom e 'paragraph-gap)))
+ (define (first-paragraph?)
+ ;; Return true if N is the first paragraph in this container.
+ (let* ((parent (ast-parent n))
+ (siblings (markup-body parent)))
+ (and (pair? siblings)
+ (eq? n (find (lambda (n)
+ (is-markup? n 'paragraph))
+ siblings)))))
+
+ (let ((gap (if (first-paragraph?)
+ (engine-custom e 'first-paragraph-gap)
+ (engine-custom e 'paragraph-gap))))
(display (if (string? gap) gap "\n@PP\n")))))
;*---------------------------------------------------------------------*/