diff options
author | Ludovic Courtès | 2008-11-20 23:43:09 +0100 |
---|---|---|
committer | Ludovic Courtès | 2008-11-20 23:43:09 +0100 |
commit | 542f6aad4b4455d9a1d6d824cb4377d084c76745 (patch) | |
tree | 595c6ae4a9cae9e414be6e7c8e96b53fc0c2b5e9 | |
parent | 81750b833c3ecc8b159abf71ec3ec3b6cf7b9a53 (diff) | |
download | skribilo-542f6aad4b4455d9a1d6d824cb4377d084c76745.tar.gz skribilo-542f6aad4b4455d9a1d6d824cb4377d084c76745.tar.lz skribilo-542f6aad4b4455d9a1d6d824cb4377d084c76745.zip |
info: Use `text-table', handle footnotes.
* src/guile/skribilo/engine/info.scm: Use the `text-table' module.
(document): Properly handle footnotes.
-rw-r--r-- | src/guile/skribilo/engine/info.scm | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/guile/skribilo/engine/info.scm b/src/guile/skribilo/engine/info.scm index 27e959a..a1c3b81 100644 --- a/src/guile/skribilo/engine/info.scm +++ b/src/guile/skribilo/engine/info.scm @@ -33,6 +33,7 @@ :autoload (skribilo output) (output) :autoload (skribilo debug) (*debug*) :autoload (skribilo utils justify) (make-justifier) + :autoload (skribilo utils text-table) (table->ascii) :use-module (srfi srfi-8) :use-module (srfi srfi-13) @@ -155,9 +156,11 @@ ;*---------------------------------------------------------------------*/ (markup-writer 'document info-engine :action (lambda (doc e) - (let ((title (markup-option doc :title)) - (author (markup-option doc :author)) - (body (markup-body doc))) + (let ((title (markup-option doc :title)) + (author (markup-option doc :author)) + (body (markup-body doc)) + (footnotes (reverse! + (container-env-get n 'footnote-env)))) (scribe-document->info doc (if title title "") (if (list? authors) authors @@ -172,15 +175,17 @@ (newline) (print "-------------") ;; FIXME: Handle footnotes. -;; (for-each (lambda (fn) -;; (with-access::%footnote fn (number note id) -;; (output (string-append -;; "*" -;; (number->string number) -;; ": ")) -;; (info note) -;; (output-newline))) -;; footnotes) + (for-each (lambda (fn) + (let ((label (markup-option fn :label)) + (note (markup-body fn)) + (id (markup-ident fn))) + (output (string-append "*" + (number->string number) + ": ") + e) + (output note e) + (output-newline))) + footnotes) ))))))) ;*---------------------------------------------------------------------*/ |