| [ Index ] |
PHP Cross Reference of MantisBT |
[Summary view] [Print] [Text view]
1 <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ 2 <!ENTITY % html "IGNORE"> 3 <![%html;[ 4 <!ENTITY % print "IGNORE"> 5 <!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA dsssl> 6 ]]> 7 <!ENTITY % print "INCLUDE"> 8 <![%print;[ 9 <!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA dsssl> 10 ]]> 11 ]> 12 13 <!-- 14 ;;####################################################################### 15 ;;# # 16 ;;# The GNOME Documentation Project's # 17 ;;# Custion DocBook Stylesheet Layer # 18 ;;# by Dave Mason dcm@redhat.com # 19 ;;# Based on Norman Walsh's Modular Stylesheets # 20 ;;# # 21 ;;# This is intended as a drop-in replacement for # 22 ;;# the cygnus-both.dsl file in DocBook Tools. # 23 ;;# Just copy it to the location dbtools created # 24 ;;# and rename it cygnus-both.dsl # 25 ;;# # 26 ;;# This is Version 1.0-4 # 27 ;;# patched to fix RTF output (#49677) # 28 ;;# patched to work with docbook-dsssl-1.72 # 29 ;;# patched for ADDRESS output (#50605) # 30 ;;# removed comment and remark # 31 ;;# disabled use-id-as-filename # 32 ;;# don't define %graphic-default-extension% # 33 ;;####################################################################### 34 --> 35 36 <style-sheet> 37 38 39 <style-specification id="print" use="docbook"> 40 <style-specification-body> 41 42 ;;========================================================================== 43 ;; PRINT 44 ;;========================================================================== 45 46 ;;====================================== 47 ;;General Options 48 ;;====================================== 49 50 ;;Do you want to print on both sides of the paper? 51 (define %two-side% 52 #t) 53 54 ;;Do you want enumerated sections? (E.g, 1.1, 1.1.1, 1.2, etc.) 55 (define %section-autolabel% 56 #f) 57 58 ;;Show URL links? If the text of the link and the URL are identical, 59 ;;the parenthetical URL is suppressed. 60 (define %show-ulinks% 61 #t) 62 63 ;Make Ulinks footnotes to stop bleeding in the edges - this increases 64 ;'jade --> print' time tremendously keep this in mind before 65 ;complaining! 66 (define %footnote-ulinks% 67 #t) 68 69 ;;Tex Backend on 70 (define tex-backend 71 #t) 72 73 ;;Define Line Spacing 74 (define %line-spacing-factor% 1.1) 75 76 ;;Define the Paragraph Style 77 (define para-style 78 (style 79 font-size: %bf-size% 80 font-weight: 'medium 81 font-posture: 'upright 82 font-family-name: %body-font-family% 83 line-spacing: (* %bf-size% %line-spacing-factor%))) 84 85 (define %para-indent% 86 ;; First line start-indent for paragraphs (other than the first) 87 10pt) 88 89 (define ($object-titles-after$) 90 (list (normalize "figure"))) 91 92 ;;====================================== 93 ;;Book Options 94 ;;====================================== 95 96 97 ;;Do you want a title page for a Book? 98 (define %generate-book-titlepage% 99 #t) 100 101 ;;Do you want a separate page for the title? 102 (define %generate-book-titlepage-on-separate-page% 103 #t) 104 105 ;;Generate Book TOC? 106 (define %generate-book-toc% 107 #t) 108 109 ;;What depth should the TOC generate? 110 ;;!Only top level of appendixes! 111 (define (toc-depth nd) 112 (if (string=? (gi nd) (normalize "book")) 113 3 114 (if (string=? (gi nd) (normalize "appendix")) 115 0 116 1))) 117 118 ;;Do you want a TOC for the element part? 119 (define %generate-part-toc% 120 #f) 121 122 ;;Do you want the part toc on the part titlepage or separate? 123 (define %generate-part-toc-on-titlepage% 124 #t) 125 126 ;;Generate Part Title Page? 127 (define %generate-part-titlepage% 128 #f) 129 130 ;;Do you want the Part intro on the part title page? 131 (define %generate-partintro-on-titlepage% 132 #t) 133 134 ;;What elements should have a LOT? 135 (define ($generate-book-lot-list$) 136 (list (normalize "equation"))) 137 138 ;;Do you want chapters enumerated? 139 (define %chapter-autolabel% 140 #t) 141 142 ;;Do you want Chapter's and Appendix's 143 ;;to have automatic labels? 144 (define %chap-app-running-head-autolabel% 145 #t) 146 147 148 ;;====================================== 149 ;;Article Options 150 ;;====================================== 151 152 ;;Do you want a title page for an Article? 153 (define %generate-article-titlepage% 154 #t) 155 156 ;;Generate Article TOC? 157 (define %generate-article-toc% 158 #t) 159 160 ;;Do you want a separate page for the title? 161 (define %generate-article-titlepage-on-separate-page% 162 #t) 163 164 ;;Do you want the article toc on the titlepage or separate? 165 (define %generate-article-toc-on-titlepage% 166 #t) 167 168 ;;Do you want to start new page numbers with each article? 169 (define %article-page-number-restart% 170 #f) 171 172 ;;Titlepage Separate? 173 (define (chunk-skip-first-element-list) 174 '()) 175 176 ;;Titlepage Not Separate 177 ;(define (chunk-skip-first-element-list) 178 ; (list (normalize "sect1") 179 ; (normalize "section"))) 180 181 ;;====================================== 182 ;;Columns 183 ;;====================================== 184 185 ;;How many columns do you want? 186 (define %page-n-columns% 187 1) 188 189 ;;How much space between columns? 190 (define %page-column-sep% 191 0.2in) 192 193 ;;How many Columns on the titlepage? 194 (define %titlepage-n-columns% 195 1) 196 197 ;;Balance columns? 198 (define %page-balance-colums% 199 #t) 200 201 ;;====================================== 202 ;;Fonts 203 ;;====================================== 204 205 ;;Defines the general size of the text in the document. normal(10), 206 ;;presbyopic(12), and large-type(24). 207 (define %visual-acuity% 208 "normal") 209 210 ;;What font would you like for titles? 211 (define %title-font-family% 212 "Helvetica") 213 214 ;;What font would you like for the body? 215 (define %body-font-family% 216 "Palatino") 217 218 ;;What font would you like for mono-seq? 219 (define %mono-font-family% 220 "Courier New") 221 222 ;;If the base fontsize is 10pt, and '%hsize-bump-factor%' is 223 ;; 1.2, hsize 1 is 12pt, hsize 2 is 14.4pt, hsize 3 is 17.28pt, etc 224 (define %hsize-bump-factor% 225 1.1) 226 227 ;;What size do you want the body fonts? 228 (define %bf-size% 229 (case %visual-acuity% 230 (("tiny") 8pt) 231 (("normal") 10pt) 232 (("presbyopic") 12pt) 233 (("large-type") 24pt))) 234 235 (define-unit em %bf-size%) 236 237 ;;====================================== 238 ;;Margins 239 ;;====================================== 240 241 (define %left-right-margin% 6pi) 242 243 ;;How much indentation for the body? 244 (define %body-start-indent% 245 2pi) 246 247 ;;How big is the left margin? (relative to physical page) 248 (define %left-margin% 249 8pi) ;white-paper-column 250 251 ;;How big is the right margin? (relative to physical page) 252 (define %right-margin% 253 8pi) ;white-paper-column 254 255 ;;How big do you want the margin at the top? 256 (define %top-margin% 257 (if (equal? %visual-acuity% "large-type") 258 7.5pi 259 6pi)) 260 261 ;;How big do you want the margin at the bottom? 262 (define %bottom-margin% 263 (if (equal? %visual-acuity% "large-type") 264 7.5pi 265 5pi)) 266 267 ;;Define the text width. (Change the elements in the formula rather 268 ;;than the formula itself) 269 ;(define %text-width% (- %page-width% (* %left-right-margin% 2))) 270 (define %text-width% (- %page-width% (+ %left-margin% %right-margin%))) 271 272 ;;Define the body width. (Change the elements in the formula rather 273 ;;than the formula itself) 274 (define %body-width% 275 (- %text-width% %body-start-indent%)) 276 277 ;;Define distance between paragraphs 278 (define %para-sep% 279 (/ %bf-size% 2.0)) 280 281 ;;Define distance between block elements (figures, tables, etc.). 282 (define %block-sep% 283 (* %para-sep% 2.0)) 284 285 ;;Indent block elements? 286 (define %block-start-indent% 287 0pt) 288 ;0pt 289 290 ;;====================================== 291 ;;Admon Graphics 292 ;;====================================== 293 294 ;;Do you want admon graohics on? 295 (define %admon-graphics% 296 #f) 297 298 ;;Where are the admon graphics? 299 (define %admon-graphics-path% 300 "images/") 301 302 ;;====================================== 303 ;;Quadding 304 ;;====================================== 305 306 ;;What quadding do you want by default; start, center, justify, or end? 307 (define %default-quadding% 308 'justify) 309 310 ;;What quadding for component titles(Chapter, Appendix, etc)? 311 (define %component-title-quadding% 312 'start) 313 314 ;;What quadding for section titles? 315 (define %section-title-quadding% 316 'start) 317 318 ;;What quadding for section sub-titles? 319 (define %section-subtitle-quadding% 320 'start) 321 322 ;;What quadding for article title? 323 (define %article-title-quadding% 324 'center) 325 326 ;;What quadding for article sub-titles? 327 (define %article-subtitle-quadding% 328 'center) 329 330 ;;What quadding for division subtitles? 331 (define %division-subtitle-quadding% 332 'start) 333 334 ;;What quadding for component subtitles? 335 (define %component-subtitle-quadding% 336 'start) 337 338 339 340 341 ;;====================================== 342 ;;Paper Options 343 ;;====================================== 344 345 ;;What size paper do you need? A4, USletter, USlandscape, or RedHat? 346 (define %paper-type% 347 "USletter") 348 349 ;;Now define those paper types' width 350 (define %page-width% 351 (case %paper-type% 352 (("A4") 210mm) 353 (("USletter") 8.5in) 354 (("USlandscape") 11in))) 355 356 ;;Now define those paper types' height 357 (define %page-height% 358 (case %paper-type% 359 (("A4") 297mm) 360 (("USletter") 11in) 361 (("USlandscape") 8.5in))) 362 363 ;;====================================== 364 ;;Functions 365 ;;====================================== 366 367 (define (OLSTEP) 368 (case 369 (modulo (length (hierarchical-number-recursive "ORDEREDLIST")) 4) 370 ((1) 1.2em) 371 ((2) 1.2em) 372 ((3) 1.6em) 373 ((0) 1.4em))) 374 375 (define (ILSTEP) 1.0em) 376 377 (define (PROCSTEP ilvl) 378 (if (> ilvl 1) 1.8em 1.4em)) 379 380 (define (PROCWID ilvl) 381 (if (> ilvl 1) 1.8em 1.4em)) 382 383 384 (define ($comptitle$) 385 (make paragraph 386 font-family-name: %title-font-family% 387 font-weight: 'bold 388 font-size: (HSIZE 2) 389 line-spacing: (* (HSIZE 2) %line-spacing-factor%) 390 space-before: (* (HSIZE 2) %head-before-factor%) 391 space-after: (* (HSIZE 2) %head-after-factor%) 392 start-indent: 0pt 393 first-line-start-indent: 0pt 394 quadding: 'start 395 keep-with-next?: #t 396 (process-children-trim))) 397 398 ;;Callouts are confusing in Postscript... fix them. 399 (define %callout-fancy-bug% 400 #f) 401 402 403 ;;By default perils are centered and dropped into a box with a really 404 ;;big border - I have simply decreased the border thickness - 405 ;;unfortunately it takes all this to do it - sigh. 406 (define ($peril$) 407 (let* ((title (select-elements 408 (children (current-node)) (normalize "title"))) 409 (has-title (not (node-list-empty? title))) 410 (adm-title (if has-title 411 (make sequence 412 (with-mode title-sosofo-mode 413 (process-node-list (node-list-first title)))) 414 (literal 415 (gentext-element-name 416 (current-node))))) 417 (hs (HSIZE 2))) 418 (if %admon-graphics% 419 ($graphical-admonition$) 420 (make display-group 421 space-before: %block-sep% 422 space-after: %block-sep% 423 font-family-name: %admon-font-family% 424 font-size: (- %bf-size% 1pt) 425 font-weight: 'medium 426 font-posture: 'upright 427 line-spacing: (* (- %bf-size% 1pt) %line-spacing-factor%) 428 (make box 429 display?: #t 430 box-type: 'border 431 line-thickness: .5pt 432 start-indent: (+ (inherited-start-indent) (* 2 (ILSTEP)) 2pt) 433 end-indent: (inherited-end-indent) 434 (make paragraph 435 space-before: %para-sep% 436 space-after: %para-sep% 437 start-indent: 1em 438 end-indent: 1em 439 font-family-name: %title-font-family% 440 font-weight: 'bold 441 font-size: hs 442 line-spacing: (* hs %line-spacing-factor%) 443 quadding: 'center 444 keep-with-next?: #t 445 adm-title) 446 (process-children)))))) 447 448 449 ;;====================================== 450 ;;Non-printing Elements 451 ;;====================================== 452 (element TITLEABBREV (empty-sosofo)) 453 (element SUBTITLE (empty-sosofo)) 454 (element SETINFO (empty-sosofo)) 455 (element BOOKINFO (empty-sosofo)) 456 (element BIBLIOENTRY (empty-sosofo)) 457 (element BIBLIOMISC (empty-sosofo)) 458 (element BOOKBIBLIO (empty-sosofo)) 459 (element SERIESINFO (empty-sosofo)) 460 (element DOCINFO (empty-sosofo)) 461 (element ARTHEADER (empty-sosofo)) 462 ;;(element ADDRESS (empty-sosofo)) 463 464 ;;Show comment element? 465 (define %show-comments% 466 #t) 467 468 ;;====================================== 469 ;;Formalpara titles 470 ;;====================================== 471 472 473 ;;Change the way Formal Paragraph titles are displayed. The commented 474 ;;out section will run the titles in the paragraphs. 475 (element (formalpara title) 476 ;(make sequence 477 ;font-weight: 'bold 478 ;($runinhead$)) 479 ($lowtitle$ 5 7)) 480 481 ;;====================================== 482 ;;Inlines 483 ;;====================================== 484 485 (element application ($mono-seq$)) 486 (element command ($bold-seq$)) 487 (element filename ($mono-seq$)) 488 (element function ($mono-seq$)) 489 (element guibutton ($bold-seq$)) 490 (element guiicon ($bold-seq$)) 491 (element guilabel ($italic-seq$)) 492 (element guimenu ($bold-seq$)) 493 (element guimenuitem ($bold-seq$)) 494 (element hardware ($bold-mono-seq$)) 495 (element keycap ($bold-seq$)) 496 (element literal ($mono-seq$)) 497 (element parameter ($italic-mono-seq$)) 498 (element prompt ($mono-seq$)) 499 (element symbol ($charseq$)) 500 (element emphasis ($italic-seq$)) 501 502 </style-specification-body> 503 </style-specification> 504 505 506 <!-- 507 ;;=========================================================================== 508 ;; HTML 509 ;;=========================================================================== 510 --> 511 512 <style-specification id="html" use="docbook"> 513 <style-specification-body> 514 515 ;; this is necessary because right now jadetex does not understand 516 ;; symbolic entities, whereas things work well with numeric entities. 517 (declare-characteristic preserve-sdata? 518 "UNREGISTERED::James Clark//Characteristic::preserve-sdata?" 519 #f) 520 521 522 ;;========================= 523 ;;Header HTML 4.0.1 524 ;;========================= 525 526 (define %html-pubid% "-//W3C//DTD HTML 4.01//EN") 527 528 (define %stylesheet% "stylesheet.css") 529 (define %stylesheet-type% "text/css") 530 531 ;;========================= 532 ;;Common Stuff 533 ;;========================= 534 535 ;;Should there be a link to the legalnotice? 536 (define %generate-legalnotice-link% 537 #t) 538 539 ;;What graphics extensions allowed? 540 (define %graphic-extensions% 541 '("gif" "png" "jpg" "jpeg" "tif" "tiff" "eps" "epsf" )) 542 543 ;;What is the default extension for images? 544 (define %graphic-default-extension% "png") 545 546 ;;Use element ids as filenames? 547 (define %use-id-as-filename% 548 #t) 549 550 551 ;;========================= 552 ;;Book Stuff 553 ;;========================= 554 555 ;;Do you want a TOC for Books? 556 (define %generate-book-toc% 557 #t) 558 559 ;;What depth should the TOC generate? 560 ;;!Only top level of appendixes! 561 (define (toc-depth nd) 562 (if (string=? (gi nd) (normalize "book")) 563 3 564 (if (string=? (gi nd) (normalize "appendix")) 565 0 566 1))) 567 568 ;;What elements should have an LOT? 569 (define ($generate-book-lot-list$) 570 (list (normalize "equation"))) 571 572 ;;Do you want a title page for your Book? 573 (define %generate-book-titlepage% 574 #t) 575 576 ;;========================= 577 ;;Part Stuff 578 ;;========================= 579 580 ;;Should parts have TOCs? 581 (define %generate-part-toc% 582 #t) 583 584 ;;Should part TOCs be on their titlepages? 585 (define %generate-part-toc-on-titlepage% 586 #t) 587 588 ;;Do you want a title page for your part? 589 (define %generate-part-titlepage% 590 #t) 591 592 ;;Should the Part intro be on the part title page? 593 (define %generate-partintro-on-titlepage% 594 #t) 595 596 (define %para-autolabel% 597 #t) 598 599 ;;======================== 600 ;;Chapter Stuff 601 ;;======================= 602 603 ;;No TOCs in Chapters 604 (define $generate-chapter-toc$ 605 (lambda () 606 #f)) 607 608 ;;========================= 609 ;;Navigation 610 ;;========================= 611 612 ;;Should there be navigation at top? 613 (define %header-navigation% 614 #t) 615 616 ;;Should there be navigation at bottom? 617 (define %footer-navigation% 618 #t) 619 620 ;;Use tables to create the navigation? 621 (define %gentext-nav-use-tables% 622 #t) 623 624 ;;If tables are used for navigation, 625 ;;how wide should they be? 626 (define %gentext-nav-tblwidth% 627 "100%") 628 629 ;;Add arrows to navigation (comment these 630 ;;out if you want admon graphics here) 631 (define (gentext-en-nav-prev prev) 632 (make sequence (literal "<<< Previous"))) 633 634 ;;Add arrows to navigation (comment these 635 ;;out if you want admon graphics here) 636 (define (gentext-en-nav-next next) 637 (make sequence (literal "Next >>>"))) 638 639 640 ;;========================= 641 ;;Tables and Lists 642 ;;========================= 643 644 ;;Should Variable lists be tables? 645 (define %always-format-variablelist-as-table% 646 #f) 647 648 ;;What is the length of the 'Term' in a variablelist? 649 (define %default-variablelist-termlength% 650 20) 651 652 ;;When true | If the terms are shorter than 653 ;;the termlength above then the variablelist 654 ;;will be formatted as a table. 655 (define %may-format-variablelist-as-table% 656 #f) 657 658 ;;This overrides the tgroup definition 659 ;;(copied from 1.20, dbtable.dsl). 660 ;;It changes the table background color, 661 ;;cell spacing and cell padding. 662 ;;This is based on gtk-doc additions - thanks! 663 664 (element tgroup 665 (let* ((wrapper (parent (current-node))) 666 (frameattr (attribute-string (normalize "frame") wrapper)) 667 (pgwide (attribute-string (normalize "pgwide") wrapper)) 668 (footnotes (select-elements (descendants (current-node)) 669 (normalize "footnote"))) 670 (border (if (equal? frameattr (normalize "none")) 671 '(("BORDER" "0")) 672 '(("BORDER" "1")))) 673 (bgcolor '(("BGCOLOR" "#E0E0E0"))) 674 (width (if (equal? pgwide "1") 675 (list (list "WIDTH" ($table-width$))) 676 '())) 677 (head (select-elements (children (current-node)) (normalize "thead"))) 678 (body (select-elements (children (current-node)) (normalize "tbody"))) 679 (feet (select-elements (children (current-node)) (normalize "tfoot")))) 680 (make element gi: "TABLE" 681 attributes: (append 682 border 683 width 684 bgcolor 685 '(("CELLSPACING" "0")) 686 '(("CELLPADDING" "4")) 687 (if %cals-table-class% 688 (list (list "CLASS" %cals-table-class%)) 689 '())) 690 (process-node-list head) 691 (process-node-list body) 692 (process-node-list feet) 693 (make-table-endnotes)))) 694 695 ;;=================== 696 ;; Admon Graphics 697 ;;=================== 698 699 ;;Should Admon Graphics be used? 700 (define %admon-graphics% 701 #t) 702 703 ;;Where are those admon graphics? 704 (define %admon-graphics-path% 705 "images/") 706 707 ;;Given an admonition node, returns the 708 ;;name of the graphic that should 709 ;;be used for that admonition. 710 ;;Define admon graphics usage 711 ;;NOTE these will change to pngs 712 ;;soon in the GDP when Tigert gets 713 ;;the time to make special ones for us! 714 (define ($admon-graphic$ #!optional (nd (current-node))) 715 (cond ((equal? (gi nd) (normalize "tip")) 716 (string-append %admon-graphics-path% "tip.gif")) 717 ((equal? (gi nd) (normalize "note")) 718 (string-append %admon-graphics-path% "note.gif")) 719 ((equal? (gi nd) (normalize "important")) 720 (string-append %admon-graphics-path% "important.gif")) 721 ((equal? (gi nd) (normalize "caution")) 722 (string-append %admon-graphics-path% "caution.gif")) 723 ((equal? (gi nd) (normalize "warning")) 724 (string-append %admon-graphics-path% "warning.gif")) 725 (else (error (string-append (gi nd) " is not an admonition."))))) 726 727 ;;Given an admonition node, returns 728 ;;the width of the graphic that will 729 ;;be used for that admonition. 730 (define ($admon-graphic-width$ #!optional (nd (current-node))) 731 "25") 732 733 ;;========================= 734 ;;Labels 735 ;;========================= 736 737 ;;Enumerate Chapters? 738 (define %chapter-autolabel% 739 #f) 740 741 ;;Enumerate Sections? 742 (define %section-autolabel% 743 #f) 744 745 ;;========================= 746 ;; HTML Attributes 747 ;;========================= 748 749 ;;What attributes should be hung off 750 ;;of 'body'? 751 (define %body-attr% 752 (list 753 (list "BGCOLOR" "#FFFFFF") 754 (list "TEXT" "#000000") 755 (list "LINK" "#0000FF") 756 (list "VLINK" "#840084") 757 (list "ALINK" "#0000FF"))) 758 759 ;;Default extension for filenames? 760 (define %html-ext% 761 ".html") 762 763 ;;Use a CSS stylesheet? 764 ;;Which one? Should work on 765 ;;this one soon 766 ;(define %stylesheet% 767 ; "./gnome.css") 768 769 ;;Use it 770 ;(define %stylesheet-type% 771 ;"text/css") 772 773 (define ($classname-seq$ #!optional (sosofo (process-children))) 774 ;; fragments of computer code 775 (make element gi: "CODE" 776 attributes: (list 777 (list "CLASS" (gi))) 778 sosofo)) 779 780 (define ($code-seq$ #!optional (sosofo (process-children))) 781 ;; fragments of computer code 782 (make element gi: "CODE" 783 attributes: (list 784 (list "CLASS" (gi))) 785 sosofo)) 786 787 (define ($command-seq$ #!optional (sosofo (process-children))) 788 ;; fragments of computer code 789 (make element gi: "TT" 790 attributes: (list 791 (list "CLASS" (gi))) 792 sosofo)) 793 794 (define ($function-seq$ #!optional (sosofo (process-children))) 795 ;; fragments of computer code 796 (make element gi: "CODE" 797 attributes: (list 798 (list "CLASS" (gi))) 799 sosofo)) 800 801 (define ($literal-seq$ #!optional (sosofo (process-children))) 802 ;; fragments of computer code 803 (make element gi: "CODE" 804 attributes: (list 805 (list "CLASS" (gi))) 806 sosofo)) 807 808 (define ($programlisting-seq$ #!optional (sosofo (process-children))) 809 ;; fragments of computer code 810 (make element gi: "PRE" 811 attributes: (list 812 (list "CLASS" (gi))) 813 sosofo)) 814 815 ;;======================== 816 ;;Title Pages for Books 817 ;;======================= 818 819 (define (book-titlepage-recto-elements) 820 (list (normalize "title") 821 (normalize "subtitle") 822 (normalize "corpauthor") 823 (normalize "authorgroup") 824 (normalize "author") 825 (normalize "orgname") 826 (normalize "graphic") 827 (normalize "copyright") 828 (normalize "legalnotice") 829 (normalize "releaseinfo") 830 (normalize "publisher") 831 (normalize "isbn"))) 832 833 ;;======================== 834 ;;Title Pages for Articles 835 ;;======================== 836 837 ;;Should Articles have a TOC? 838 (define %generate-article-toc% 839 #t) 840 841 ;;Which elements should appear 842 ;;on title page? 843 (define (article-titlepage-recto-elements) 844 (list (normalize "title") 845 (normalize "subtitle") 846 (normalize "authorgroup") 847 (normalize "copyright") 848 (normalize "legalnotice") 849 (normalize "abstract"))) 850 851 ;;How should elements on title page look? 852 (mode article-titlepage-recto-mode 853 854 ;;Author name is too big - change it! 855 (element author 856 (let ((author-name (author-string)) 857 (author-affil (select-elements (children (current-node)) 858 (normalize "affiliation")))) 859 (make sequence 860 (make element gi: "H4" 861 attributes: (list (list "CLASS" (gi))) 862 (make element gi: "A" 863 attributes: (list (list "NAME" (element-id))) 864 (literal author-name))) 865 (process-node-list author-affil)))) 866 867 ;;Address? 868 (element address 869 (make sequence 870 (make element gi: "DIV" 871 attributes: (list (list "CLASS" (gi))) 872 (process-children)))) 873 874 ;;Get rid of spam-producing "mailto" links 875 ;;and get rid of email indentation 876 (element email 877 (make sequence 878 (make element gi: "DIV" 879 attributes: (list (list "CLASS" (gi))) 880 (process-children)))) 881 882 ;;Point Abstract to custom table function 883 ;;(See $dcm-abstract-object$ below. For default 884 ;;use $semiformal-object$ 885 (element abstract 886 (make element gi: "DIV" 887 ($dcm-abstract-object$))) 888 889 (element (abstract title) (empty-sosofo)) 890 891 ;;subtitle sizing 892 (element subtitle 893 (make element gi: "H4" 894 attributes: (list (list "CLASS" (gi))) 895 (process-children-trim)))) 896 897 ;;================= 898 ;; INLINES 899 ;;================= 900 901 ;Define my own series of fonts for various elements 902 (element application ($mono-seq$)) 903 (element classname ($classname-seq$)) 904 (element code ($code-seq$)) 905 (element command ($command-seq$)) 906 (element filename ($mono-seq$)) 907 (element function ($function-seq$)) 908 (element guibutton ($bold-seq$)) 909 (element guiicon ($bold-seq$)) 910 (element guilabel ($bold-mono-seq$)) 911 (element guimenu ($bold-seq$)) 912 (element guimenuitem ($bold-seq$)) 913 (element guisubmenu ($bold-seq$)) 914 (element hardware ($bold-mono-seq$)) 915 (element keycap ($bold-seq$)) 916 (element literal ($literal-seq$)) 917 (element parameter ($italic-mono-seq$)) 918 (element prompt ($mono-seq$)) 919 (element programlisting ($programlisting-seq$)) 920 (element symbol ($charseq$)) 921 (element emphasis ($italic-seq$)) 922 923 ;;Show comment element? 924 (define %show-comments% 925 #t) 926 927 ;;==================== 928 ;; General Formatting 929 ;;==================== 930 931 ;;Formal Paras are ugly by default! 932 ;;Make the title run in - otherwise 933 ;;you should use a sect! 934 (element formalpara 935 (make element gi: "DIV" 936 attributes: (list 937 (list "CLASS" (gi))) 938 (make element gi: "P" 939 (process-children)))) 940 941 ;;This is the old one 942 ;(element (formalpara title) 943 ;($lowtitle$ 5)) 944 945 ;;This is the new one 946 (element (formalpara title) 947 (make element gi: "B" 948 ($runinhead$))) 949 950 ;;Make captions come after objects in the list 951 (define ($object-titles-after$) 952 (list (normalize "figure"))) 953 954 955 ;; Handle qanda labelling with Q: A: 956 (define (qanda-defaultlabel) 957 (normalize "qanda")) 958 959 ;;From FreeBSD Sheets (Thanks!) Display Q and A in bigger bolder fonts 960 961 (element question 962 (let* ((chlist (children (current-node))) 963 (firstch (node-list-first chlist)) 964 (restch (node-list-rest chlist))) 965 (make element gi: "DIV" 966 attributes: (list (list "CLASS" (gi))) 967 (make element gi: "P" 968 (make element gi: "BIG" 969 (make element gi: "A" 970 attributes: (list 971 (list "NAME" (element-id))) 972 (empty-sosofo)) 973 (make element gi: "B" 974 (literal (question-answer-label 975 (current-node)) " ") 976 (process-node-list (children firstch))))) 977 (process-node-list restch)))) 978 979 ;;Literal Elements 980 981 ;;Indent Literal layouts? 982 (define %indent-literallayout-lines% 983 #f) 984 985 ;;Indent Programlistings? 986 (define %indent-programlisting-lines% 987 #f) 988 989 ;;Number lines in Programlistings? 990 (define %number-programlisting-lines% 991 #f) 992 993 ;;Should verbatim items be 'shaded' with a table? 994 (define %shade-verbatim% 995 #t) 996 997 ;;Define shade-verbatim attributes 998 (define ($shade-verbatim-attr$) 999 (list 1000 (list "BORDER" "0") 1001 (list "BGCOLOR" "#E0E0E0") 1002 (list "WIDTH" ($table-width$)))) 1003 1004 ;;=================== 1005 ;; Entities 1006 ;;=================== 1007 1008 ;;Netscape doesn't handle trademark 1009 ;;entity right at all!! Get rid of it. 1010 ;;Make a TM in a superscipt font. 1011 (element trademark 1012 (make sequence 1013 (process-children) 1014 (make element gi: "sup" 1015 (literal "TM")))) 1016 1017 1018 ;;=================== 1019 ;; New Definitions 1020 ;;================== 1021 1022 (define ($dcm-abstract-object$) 1023 (make element gi: "TABLE" 1024 attributes: '(("BORDER" "0") 1025 ("BGCOLOR" "#E0E0E0") 1026 ("WIDTH" "50%") 1027 ("CELLSPACING" "0") 1028 ("CELLPADDING" "0") 1029 ("ALIGN" "CENTER")) 1030 (make element gi: "TR" 1031 (make element gi: "TD" 1032 attributes: '(("VALIGN" "TOP")) 1033 (make element gi: "B" 1034 (literal "Abstract")))) 1035 (make element gi: "TR" 1036 (make element gi: "TD" 1037 attributes: '(("VALIGN" "TOP")) 1038 (process-children))))) 1039 1040 ;;Redefine Titlepage Separator on Articles 1041 1042 (define (article-titlepage-separator side) 1043 (make empty-element gi: "HR" 1044 attributes: '(("WIDTH" "75%") 1045 ("ALIGN" "CENTER") 1046 ("COLOR" "#000000") 1047 ("SIZE" "1")))) 1048 1049 1050 1051 1052 (define (chunk-element-list) 1053 (list (normalize "preface") 1054 (normalize "chapter") 1055 (normalize "appendix") 1056 (normalize "article") 1057 (normalize "glossary") 1058 (normalize "bibliography") 1059 (normalize "index") 1060 (normalize "colophon") 1061 (normalize "setindex") 1062 (normalize "reference") 1063 (normalize "refentry") 1064 (normalize "part") 1065 (normalize "sect1") 1066 (normalize "section") 1067 (normalize "book") ;; just in case nothing else matches... 1068 (normalize "set") ;; sets are definitely chunks... 1069 )) 1070 1071 ;;Do you want Callouts to be graphics? 1072 (define %callout-graphics% 1073 #f) 1074 1075 1076 ;;Make Callout graphics PNGs 1077 (define %callout-graphics-path% 1078 "./imagelib/callouts/") 1079 1080 ;; Redefine $callout-bug$ to support the %callout-graphic-ext% 1081 ;; variable. 1082 (define ($callout-bug$ conumber) 1083 (let ((number (if conumber (format-number conumber "1") "0"))) 1084 (if conumber 1085 (if %callout-graphics% 1086 (if (<= conumber %callout-graphics-number-limit%) 1087 (make empty-element gi: "IMG" 1088 attributes: (list (list "SRC" 1089 (root-rel-path 1090 (string-append 1091 %callout-graphics-path% 1092 number 1093 %callout-graphics-ext%))) 1094 (list "HSPACE" "0") 1095 (list "VSPACE" "0") 1096 (list "BORDER" "0") 1097 (list "ALT" 1098 (string-append 1099 "(" number ")")))) 1100 (make element gi: "B" 1101 (literal "(" (format-number conumber "1") ")"))) 1102 (make element gi: "B" 1103 (literal "(" (format-number conumber "1") ")"))) 1104 (make element gi: "B" 1105 (literal "(??)"))))) 1106 1107 </style-specification-body> 1108 </style-specification> 1109 1110 <external-specification id="docbook" document="docbook.dsl"> 1111 1112 </style-sheet>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Sep 2 13:07:01 2010 | Cross-referenced by PHPXref 0.7 |