blob: 8c4635b1020f6c19461ed530f8acc950c4a7003b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
;; $Id: dbtitle.dsl,v 1.4 2003/02/17 19:42:45 adicarlo Exp $
;;
;; This file is part of the Modular DocBook Stylesheet distribution.
;; See ../README or http://docbook.sourceforge.net/projects/dsssl/
;;
(define title-style
(style
font-family-name: %title-font-family%
font-weight: 'bold
quadding: 'start))
;; So we can pass different sosofo's to this routine and get identical
;; treatment (see REFNAME in dbrfntry.dsl)
;;
(define ($lowtitlewithsosofo$ tlevel hlevel sosofo)
(let ((hs (HSIZE (- 3 tlevel))))
(make paragraph
font-family-name: %title-font-family%
font-weight: 'bold
font-size: hs
line-spacing: (* hs %line-spacing-factor%)
space-before: (* hs %head-before-factor%)
space-after: (* hs %head-after-factor%)
start-indent: %body-start-indent%
quadding: 'start
keep-with-next?: #t
heading-level: (if %generate-heading-level% hlevel 0)
sosofo)))
(define ($lowtitle$ tlevel hlevel)
($lowtitlewithsosofo$ tlevel hlevel (process-children)))
(define ($runinhead$)
(let* ((title (data (current-node)))
(titlelen (string-length title))
(lastchar (string-ref title (- titlelen 1)))
(punct (if (member lastchar %content-title-end-punct%)
""
%default-title-end-punct%)))
(make sequence
font-weight: 'bold
(process-children-trim)
(literal punct " "))))
(element title ($lowtitle$ 2 4)) ;; the default TITLE format
(element titleabbrev (empty-sosofo))
(element subtitle (empty-sosofo))
(mode title-mode
(element title
(process-children)))
|