diff options
author | Ludovic Courtès | 2012-12-01 15:46:31 +0100 |
---|---|---|
committer | Ludovic Courtès | 2012-12-01 15:47:09 +0100 |
commit | 3d6d88762828f407ade638ddb369248baf3011f4 (patch) | |
tree | 3236f404e47c679dd1168250be5d30887190ad57 /src | |
parent | e2140ac8c217a3523fab8371cfb6e6e8d31ec98e (diff) | |
download | skribilo-3d6d88762828f407ade638ddb369248baf3011f4.tar.gz skribilo-3d6d88762828f407ade638ddb369248baf3011f4.tar.lz skribilo-3d6d88762828f407ade638ddb369248baf3011f4.zip |
html: footnotes: Fix predicate to determine whether nodes are in the same file.
* src/guile/skribilo/engine/html.scm (section-in-separate-file?,
section-in-current-file?): Remove.
(sections-in-same-file?): New procedure.
(&html-generic-document)[ftnote]: Use it.
Diffstat (limited to 'src')
-rw-r--r-- | src/guile/skribilo/engine/html.scm | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm index 2595277..9f21d2c 100644 --- a/src/guile/skribilo/engine/html.scm +++ b/src/guile/skribilo/engine/html.scm @@ -1147,22 +1147,11 @@ (display "</tbody>\n</table>\n"))))))) -(define (section-in-separate-file? n e) - ;; Return true if N, a node (chapter, section, etc.), is to be put in a - ;; separate file, according to the customs of engine E. - (and (container? n) - (not (document? n)) - (or (markup-option n :file) - (let ((kind (markup-markup n))) - (engine-custom e (string->symbol - (string-append (symbol->string kind) - "-file"))))))) - -(define (section-in-current-file? n e) - ;; Return true if N is to be output in the current file, or in the main - ;; file. - (and (container? n) - (not (section-in-separate-file? n e)))) +(define (sections-in-same-file? n1 n2 e) + ;; Return #t when N1 and N2 are to be output in the same file according to + ;; E's settings. + (and (container? n1) (container? n2) + (equal? (html-file n1 e) (html-file n2 e)))) ;*---------------------------------------------------------------------*/ ;* &html-generic-document ... */ @@ -1207,7 +1196,7 @@ ;; Collect the footnotes of all the sub-containers that ;; are to be output in the same file. (match (find-down (lambda (s) - (section-in-current-file? s e)) + (sections-in-same-file? s n e)) n) ((containers ...) (reverse |