summaryrefslogtreecommitdiff
path: root/src/guile
diff options
context:
space:
mode:
authorLudovic Courtès2009-01-07 18:06:30 +0100
committerLudovic Courtès2009-01-07 18:06:30 +0100
commit03cf45121f3fc919af56becafdf311d43cea6e07 (patch)
tree2fe3d62593007f25519bab0afb49c9d623777ad9 /src/guile
parentb1fa98f9ab6bd42a93847dde9baf6fc445de3f9f (diff)
downloadskribilo-03cf45121f3fc919af56becafdf311d43cea6e07.tar.gz
skribilo-03cf45121f3fc919af56becafdf311d43cea6e07.tar.lz
skribilo-03cf45121f3fc919af56becafdf311d43cea6e07.zip
info: New `:info-node' for `chapter', `section', etc.
* src/guile/skribilo/engine/info.scm (block-title): Use the `:info-node' option if available. (chapter, section, subsection, subsubsection): Mark `:info-node' as supported and `:html-file' as not supported. * src/guile/skribilo/package/base.scm (chapter, section, subsection, subsubsection): New `:info-node' option.
Diffstat (limited to 'src/guile')
-rw-r--r--src/guile/skribilo/engine/info.scm22
-rw-r--r--src/guile/skribilo/package/base.scm11
2 files changed, 18 insertions, 15 deletions
diff --git a/src/guile/skribilo/engine/info.scm b/src/guile/skribilo/engine/info.scm
index 2744f4e..2f983b7 100644
--- a/src/guile/skribilo/engine/info.scm
+++ b/src/guile/skribilo/engine/info.scm
@@ -143,12 +143,14 @@
;* block-title ::%chapter ... */
;*---------------------------------------------------------------------*/
(define (block-title obj e)
- (let ((title (markup-option obj :title))
- (subtitle (markup-option obj :subtitle)))
- (let ((title (if title title subtitle)))
- (if (string? title)
- title
- (ast->string title)))))
+ (or (let ((title (markup-option obj :info-node)))
+ (and title (ast->string title)))
+ (let ((title (markup-option obj :title))
+ (subtitle (markup-option obj :subtitle)))
+ (let ((title (if title title subtitle)))
+ (if (string? title)
+ title
+ (ast->string title))))))
;*---------------------------------------------------------------------*/
;* check-node-title-conflicts ... */
@@ -600,7 +602,7 @@
;* info ::%section ... */
;*---------------------------------------------------------------------*/
(markup-writer 'section info-engine
- :options '(:title :html-title :number :toc :file :env)
+ :options '(:title :info-node :number :toc :file :env)
:action (lambda (n e)
(let ((body (markup-body n))
(title (markup-option n :title)))
@@ -621,7 +623,7 @@
;* info ::%subsection ... */
;*---------------------------------------------------------------------*/
(markup-writer 'subsection info-engine
- :options '(:title :html-title :number :toc :env :file)
+ :options '(:title :info-node :number :toc :env :file)
:action (lambda (n e)
(let ((body (markup-body n))
(title (markup-option n :title)))
@@ -638,7 +640,7 @@
;* info ::%subsubsection ... */
;*---------------------------------------------------------------------*/
(markup-writer 'subsubsection info-engine
- :options '(:title :html-title :number :toc :env :file)
+ :options '(:title :info-node :number :toc :env :file)
:action (lambda (n e)
(let ((body (markup-body n))
(title (markup-option n :title)))
@@ -664,7 +666,7 @@
;* info ::%chapter ... */
;*---------------------------------------------------------------------*/
(markup-writer 'chapter info-engine
- :options '(:title :number :file :toc :html-title :env)
+ :options '(:title :number :file :toc :info-node :env)
:action (lambda (n e)
(let ((body (markup-body n))
(file (markup-option n :file))
diff --git a/src/guile/skribilo/package/base.scm b/src/guile/skribilo/package/base.scm
index c8aac4a..862d146 100644
--- a/src/guile/skribilo/package/base.scm
+++ b/src/guile/skribilo/package/base.scm
@@ -1,6 +1,6 @@
;;; base.scm -- The base markup package of Skribe/Skribilo.
;;;
-;;; Copyright 2005, 2006, 2007, 2008 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright 2005, 2006, 2007, 2008, 2009 Ludovic Courtès <ludo@gnu.org>
;;; Copyright 2003, 2004 Manuel Serrano
;;;
;;;
@@ -200,7 +200,8 @@
opts
:key
(ident #f) (class "chapter")
- title (html-title #f) (file #f) (toc #t) (number #t))
+ title (html-title #f) (info-node #f)
+ (file #f) (toc #t) (number #t))
(new container
(markup 'chapter)
(ident (or ident (symbol->string (gensym "chapter"))))
@@ -227,7 +228,7 @@
opts
:key
(ident #f) (class "section")
- title (file #f) (toc #t) (number #t))
+ title info-node (file #f) (toc #t) (number #t))
(new container
(markup 'section)
(ident (or ident (symbol->string (gensym "section"))))
@@ -255,7 +256,7 @@
opts
:key
(ident #f) (class "subsection")
- title (file #f) (toc #t) (number #t))
+ title info-node (file #f) (toc #t) (number #t))
(new container
(markup 'subsection)
(ident (or ident (symbol->string (gensym "subsection"))))
@@ -280,7 +281,7 @@
opts
:key
(ident #f) (class "subsubsection")
- title (file #f) (toc #f) (number #t))
+ title info-node (file #f) (toc #f) (number #t))
(new container
(markup 'subsubsection)
(ident (or ident (symbol->string (gensym "subsubsection"))))