summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/guile/skribilo/ast.scm11
-rw-r--r--src/guile/skribilo/engine/lout.scm9
2 files changed, 11 insertions, 9 deletions
diff --git a/src/guile/skribilo/ast.scm b/src/guile/skribilo/ast.scm
index 746cbbf..21df4f3 100644
--- a/src/guile/skribilo/ast.scm
+++ b/src/guile/skribilo/ast.scm
@@ -65,6 +65,7 @@
container-search-down search-down find-down find1-down
find-up find1-up
ast-document ast-chapter ast-section
+ first-paragraph?
;; numbering
markup-number-string
@@ -619,6 +620,16 @@
(define (ast-section m)
(find1-up (lambda (n) (is-markup? n 'section)) m))
+(define (first-paragraph? n)
+ ;; Return true if N is the first paragraph in this container.
+ (and (is-markup? n 'paragraph)
+ (let* ((parent (ast-parent n))
+ (siblings (markup-body parent)))
+ (and (pair? siblings)
+ (eq? n (find (lambda (n)
+ (is-markup? n 'paragraph))
+ siblings))))))
+
;;;
;;; Section numbering.
diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm
index 70d8f97..1aefe5c 100644
--- a/src/guile/skribilo/engine/lout.scm
+++ b/src/guile/skribilo/engine/lout.scm
@@ -1534,15 +1534,6 @@
;* support for paragraphs ... */
;*---------------------------------------------------------------------*/
-(define (first-paragraph? n)
- ;; 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)))))
-
(define (make-drop-capital? n e)
;; Return true if the first letter of N's body should be output as a drop
;; capital.