diff options
author | Ludovic Court`es | 2007-09-20 14:14:45 +0000 |
---|---|---|
committer | Ludovic Court`es | 2007-09-20 14:14:45 +0000 |
commit | 46b3f874e91db7d8a82a2f15bdea57fb4a6152b9 (patch) | |
tree | 7150efb36bed12716a467b88687bdb6c4281334a /src | |
parent | 8c3ac87055e188b2818a7d1d8c0cb7bf4eec8e8e (diff) | |
parent | d558e816b374367b40c6880f2f8eb9bcb6044113 (diff) | |
download | skribilo-46b3f874e91db7d8a82a2f15bdea57fb4a6152b9.tar.gz skribilo-46b3f874e91db7d8a82a2f15bdea57fb4a6152b9.tar.lz skribilo-46b3f874e91db7d8a82a2f15bdea57fb4a6152b9.zip |
lout: New `:word' option for `chapter' et al.
* src/guile/skribilo/engine/lout.scm (lout-block-before): Handle the
`:word' option (note `@BypassWord' should be added in Lout 3.37).
(chapter, section, subsection, subsubsection): Mark `:word' as
supported.
(ref): Sanity-check IDENT.
git-archimport-id: skribilo@sv.gnu.org--2006/skribilo--devo--1.2--patch-164
Diffstat (limited to 'src')
-rw-r--r-- | src/guile/skribilo/engine/lout.scm | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/guile/skribilo/engine/lout.scm b/src/guile/skribilo/engine/lout.scm index 1aefe5c..49df54d 100644 --- a/src/guile/skribilo/engine/lout.scm +++ b/src/guile/skribilo/engine/lout.scm @@ -1359,6 +1359,7 @@ (let ((lout-markup (lout-structure-markup (markup-markup n) e)) (title (markup-option n :title)) (number (markup-option n :number)) + (word (markup-option n :word)) (ident (markup-ident n))) (if (not lout-markup) @@ -1380,6 +1381,12 @@ (markup-number-string n)) (display " @BypassNumber { } # unnumbered\n")) + (if (and word + (eq? (engine-custom e 'document-type) + 'book)) + (format #t " @BypassWord { ~a }~%" + word)) + (cond ((string? ident) (begin (display " @Tag { ") @@ -1485,7 +1492,7 @@ ;* section ... .. @label chapter@ */ ;*---------------------------------------------------------------------*/ (markup-writer 'chapter - :options '(:title :number :toc :file :env) + :options '(:title :number :toc :file :env :word) :validate (lambda (n e) (document? (ast-parent n))) @@ -1503,7 +1510,7 @@ ;* section ... . @label section@ */ ;*---------------------------------------------------------------------*/ (markup-writer 'section - :options '(:title :number :toc :file :env) + :options '(:title :number :toc :file :env :word) :validate (lambda (n e) (is-markup? (ast-parent n) 'chapter)) :before lout-start-large-scale-structure @@ -1513,7 +1520,7 @@ ;* subsection ... @label subsection@ */ ;*---------------------------------------------------------------------*/ (markup-writer 'subsection - :options '(:title :number :toc :file :env) + :options '(:title :number :toc :file :env :word) :validate (lambda (n e) (is-markup? (ast-parent n) 'section)) :before lout-start-large-scale-structure @@ -1523,7 +1530,7 @@ ;* subsubsection ... @label subsubsection@ */ ;*---------------------------------------------------------------------*/ (markup-writer 'subsubsection - :options '(:title :number :toc :file :env) + :options '(:title :number :toc :file :env :word) :validate (lambda (n e) (is-markup? (ast-parent n) 'subsection)) :before lout-start-large-scale-structure @@ -2488,7 +2495,7 @@ (if text (output text e)) ;; Marks don't have a number - (if (eq? kind 'mark) + (if (and ident (eq? kind 'mark)) (format #t (lout-page-of ident)) (begin ;; Don't output a section/whatever number @@ -2504,7 +2511,7 @@ (markup-number-string target)))) (display " ") (display number)) - (if show-page-num? + (if (and ident show-page-num?) (format #t (lout-page-of ident)))))))))) ;*---------------------------------------------------------------------*/ |