diff --git a/Scripts/Functions/Render/Backends/Docbook/Styles/docbook2pdf.dsl b/Scripts/Functions/Render/Backends/Docbook/Styles/docbook2pdf.dsl
new file mode 100644
index 0000000..2303673
--- /dev/null
+++ b/Scripts/Functions/Render/Backends/Docbook/Styles/docbook2pdf.dsl
@@ -0,0 +1,1061 @@
+
+
+
+]]>
+
+
+]]>
+]>
+
+
+
+
+
+
+
+
+
+;;==========================================================================
+;; PRINT
+;;==========================================================================
+
+;;======================================
+;;General Options
+;;======================================
+
+;;Do you want to print on both sides of the paper?
+(define %two-side%
+ #t)
+
+;;Do you want enumerated sections? (E.g, 1.1, 1.1.1, 1.2, etc.)
+(define %section-autolabel%
+ #f)
+
+;;Show URL links? If the text of the link and the URL are identical,
+;;the parenthetical URL is suppressed.
+(define %show-ulinks%
+ #t)
+
+;Make Ulinks footnotes to stop bleeding in the edges - this increases
+;'jade --> print' time tremendously keep this in mind before
+;complaining!
+(define %footnote-ulinks%
+ #t)
+
+;;Tex Backend on
+(define tex-backend
+ #t)
+
+;;Define Line Spacing
+(define %line-spacing-factor% 1.1)
+
+;;Define the Paragraph Style
+(define para-style
+ (style
+ font-size: %bf-size%
+ font-weight: 'medium
+ font-posture: 'upright
+ font-family-name: %body-font-family%
+ line-spacing: (* %bf-size% %line-spacing-factor%)))
+
+(define ($object-titles-after$)
+ (list (normalize "figure")))
+
+;;======================================
+;;Book Options
+;;======================================
+
+
+;;Do you want a title page for a Book?
+(define %generate-book-titlepage%
+ #t)
+
+;;Do you want a separate page for the title?
+(define %generate-book-titlepage-on-separate-page%
+ #t)
+
+;;Generate Book TOC?
+(define %generate-book-toc%
+ #t)
+
+;;What depth should the TOC generate?
+;;!Only top level of appendixes!
+(define (toc-depth nd)
+ (if (string=? (gi nd) (normalize "book"))
+ 3
+ (if (string=? (gi nd) (normalize "appendix"))
+ 0
+ 1)))
+
+;;Do you want a TOC for the element part?
+(define %generate-part-toc%
+ #f)
+
+;;Do you want the part toc on the part titlepage or separate?
+(define %generate-part-toc-on-titlepage%
+ #t)
+
+;;Generate Part Title Page?
+(define %generate-part-titlepage%
+ #f)
+
+;;Do you want the Part intro on the part title page?
+(define %generate-partintro-on-titlepage%
+ #t)
+
+;;What elements should have a LOT?
+(define ($generate-book-lot-list$)
+ (list (normalize "equation")))
+
+;;Do you want chapters enumerated?
+(define %chapter-autolabel%
+ #t)
+
+;;Do you want Chapter's and Appendix's
+;;to have automatic labels?
+(define %chap-app-running-head-autolabel%
+ #t)
+
+
+;;======================================
+;;Article Options
+;;======================================
+
+;;Do you want a title page for an Article?
+(define %generate-article-titlepage%
+ #t)
+
+;;Generate Article TOC?
+(define %generate-article-toc%
+ #t)
+
+;;Do you want a separate page for the title?
+(define %generate-article-titlepage-on-separate-page%
+ #t)
+
+;;Do you want the article toc on the titlepage or separate?
+(define %generate-article-toc-on-titlepage%
+ #t)
+
+;;Do you want to start new page numbers with each article?
+(define %article-page-number-restart%
+ #f)
+
+;;Titlepage Separate?
+(define (chunk-skip-first-element-list)
+ '())
+
+;;Titlepage Not Separate
+;(define (chunk-skip-first-element-list)
+; (list (normalize "sect1")
+; (normalize "section")))
+
+;;======================================
+;;Columns
+;;======================================
+
+;;How many columns do you want?
+(define %page-n-columns%
+ 1)
+
+;;How much space between columns?
+(define %page-column-sep%
+ 0.2in)
+
+;;How many Columns on the titlepage?
+(define %titlepage-n-columns%
+ 1)
+
+;;Balance columns?
+(define %page-balance-colums%
+#t)
+
+;;======================================
+;;Fonts
+;;======================================
+
+;;Defines the general size of the text in the document. normal(10),
+;;presbyopic(12), and large-type(24).
+(define %visual-acuity%
+ "normal")
+
+;;What font would you like for titles?
+(define %title-font-family%
+ "Helvetica")
+
+;;What font would you like for the body?
+(define %body-font-family%
+ "Palatino")
+
+;;What font would you like for mono-seq?
+(define %mono-font-family%
+ "Courier New")
+
+;;If the base fontsize is 10pt, and '%hsize-bump-factor%' is
+;; 1.2, hsize 1 is 12pt, hsize 2 is 14.4pt, hsize 3 is 17.28pt, etc
+(define %hsize-bump-factor%
+ 1.1)
+
+;;What size do you want the body fonts?
+(define %bf-size%
+ (case %visual-acuity%
+ (("tiny") 8pt)
+ (("normal") 10pt)
+ (("presbyopic") 12pt)
+ (("large-type") 24pt)))
+
+(define-unit em %bf-size%)
+
+;;======================================
+;;Margins
+;;======================================
+
+(define %left-right-margin% 6pi)
+
+;;How much indentation for the body?
+(define %body-start-indent%
+ 4pi)
+
+;;How big is the left margin? (relative to physical page)
+(define %left-margin%
+ 8pi) ;white-paper-column
+
+;;How big is the right margin? (relative to physical page)
+(define %right-margin%
+ 8pi) ;white-paper-column
+
+;;How big do you want the margin at the top?
+(define %top-margin%
+(if (equal? %visual-acuity% "large-type")
+ 7.5pi
+ 6pi))
+
+;;How big do you want the margin at the bottom?
+(define %bottom-margin%
+ (if (equal? %visual-acuity% "large-type")
+ 7.5pi
+ 5pi))
+
+;;Define the text width. (Change the elements in the formula rather
+;;than the formula itself)
+;(define %text-width% (- %page-width% (* %left-right-margin% 2)))
+(define %text-width% (- %page-width% (+ %left-margin% %right-margin%)))
+
+;;Define the body width. (Change the elements in the formula rather
+;;than the formula itself)
+(define %body-width%
+ (- %text-width% %body-start-indent%))
+
+;;Define distance between paragraphs
+(define %para-sep%
+ (/ %bf-size% 2.0))
+
+;;Define distance between block elements (figures, tables, etc.).
+(define %block-sep%
+ (* %para-sep% 2.0))
+
+;;Indent block elements?
+(define %block-start-indent%
+ 0pt)
+;0pt
+
+;;======================================
+;;Admon Graphics
+;;======================================
+
+;;Do you want admon graohics on?
+(define %admon-graphics%
+ #f)
+
+;;Where are the admon graphics?
+(define %admon-graphics-path%
+ "../images/")
+
+;;======================================
+;;Quadding
+;;======================================
+
+;;What quadding do you want by default; start, center, justify, or end?
+(define %default-quadding%
+ 'justify)
+
+;;What quadding for component titles(Chapter, Appendix, etc)?
+(define %component-title-quadding%
+ 'start)
+
+;;What quadding for section titles?
+(define %section-title-quadding%
+ 'start)
+
+;;What quadding for section sub-titles?
+(define %section-subtitle-quadding%
+ 'start)
+
+;;What quadding for article title?
+(define %article-title-quadding%
+ 'center)
+
+;;What quadding for article sub-titles?
+(define %article-subtitle-quadding%
+ 'center)
+
+;;What quadding for division subtitles?
+(define %division-subtitle-quadding%
+ 'start)
+
+;;What quadding for component subtitles?
+(define %component-subtitle-quadding%
+ 'start)
+
+
+
+
+;;======================================
+;;Paper Options
+;;======================================
+
+;;What size paper do you need? A4, USletter, USlandscape, or RedHat?
+(define %paper-type%
+ "USletter")
+
+;;Now define those paper types' width
+(define %page-width%
+ (case %paper-type%
+ (("A4") 210mm)
+ (("USletter") 8.5in)
+ (("USlandscape") 11in)))
+
+;;Now define those paper types' height
+(define %page-height%
+ (case %paper-type%
+ (("A4") 297mm)
+ (("USletter") 11in)
+ (("USlandscape") 8.5in)))
+
+;;======================================
+;;Functions
+;;======================================
+
+(define (OLSTEP)
+ (case
+ (modulo (length (hierarchical-number-recursive "ORDEREDLIST")) 4)
+ ((1) 1.2em)
+ ((2) 1.2em)
+ ((3) 1.6em)
+ ((0) 1.4em)))
+
+(define (ILSTEP) 1.0em)
+
+(define (PROCSTEP ilvl)
+ (if (> ilvl 1) 1.8em 1.4em))
+
+(define (PROCWID ilvl)
+ (if (> ilvl 1) 1.8em 1.4em))
+
+
+(define ($comptitle$)
+ (make paragraph
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: (HSIZE 2)
+ line-spacing: (* (HSIZE 2) %line-spacing-factor%)
+ space-before: (* (HSIZE 2) %head-before-factor%)
+ space-after: (* (HSIZE 2) %head-after-factor%)
+ start-indent: 0pt
+ first-line-start-indent: 0pt
+ quadding: 'start
+ keep-with-next?: #t
+ (process-children-trim)))
+
+;;Callouts are confusing in Postscript... fix them.
+(define %callout-fancy-bug%
+ #f)
+
+
+;;By default perils are centered and dropped into a box with a really
+;;big border - I have simply decreased the border thickness -
+;;unfortunately it takes all this to do it - sigh.
+(define ($peril$)
+ (let* ((title (select-elements
+ (children (current-node)) (normalize "title")))
+ (has-title (not (node-list-empty? title)))
+ (adm-title (if has-title
+ (make sequence
+ (with-mode title-sosofo-mode
+ (process-node-list (node-list-first title))))
+ (literal
+ (gentext-element-name
+ (current-node)))))
+ (hs (HSIZE 2)))
+ (if %admon-graphics%
+ ($graphical-admonition$)
+ (make display-group
+ space-before: %block-sep%
+ space-after: %block-sep%
+ font-family-name: %admon-font-family%
+ font-size: (- %bf-size% 1pt)
+ font-weight: 'medium
+ font-posture: 'upright
+ line-spacing: (* (- %bf-size% 1pt) %line-spacing-factor%)
+ (make box
+ display?: #t
+ box-type: 'border
+ line-thickness: .5pt
+ start-indent: (+ (inherited-start-indent) (* 2 (ILSTEP)) 2pt)
+ end-indent: (inherited-end-indent)
+ (make paragraph
+ space-before: %para-sep%
+ space-after: %para-sep%
+ start-indent: 1em
+ end-indent: 1em
+ font-family-name: %title-font-family%
+ font-weight: 'bold
+ font-size: hs
+ line-spacing: (* hs %line-spacing-factor%)
+ quadding: 'center
+ keep-with-next?: #t
+ adm-title)
+ (process-children))))))
+
+
+;;======================================
+;;Non-printing Elements
+;;======================================
+(element TITLEABBREV (empty-sosofo))
+(element SUBTITLE (empty-sosofo))
+(element SETINFO (empty-sosofo))
+(element BOOKINFO (empty-sosofo))
+(element BIBLIOENTRY (empty-sosofo))
+(element BIBLIOMISC (empty-sosofo))
+(element BOOKBIBLIO (empty-sosofo))
+(element SERIESINFO (empty-sosofo))
+(element DOCINFO (empty-sosofo))
+(element ARTHEADER (empty-sosofo))
+;;(element ADDRESS (empty-sosofo))
+
+;;Show comment element?
+(define %show-comments%
+ #t)
+
+;;======================================
+;;Formalpara titles
+;;======================================
+
+
+;;Change the way Formal Paragraph titles are displayed. The commented
+;;out section will run the titles in the paragraphs.
+(element (formalpara title)
+ ;(make sequence
+ ;font-weight: 'bold
+ ;($runinhead$))
+ ($lowtitle$ 5 7))
+
+;;======================================
+;;Inlines
+;;======================================
+
+(element application ($mono-seq$))
+(element command ($bold-seq$))
+(element filename ($mono-seq$))
+(element function ($mono-seq$))
+(element guibutton ($bold-seq$))
+(element guiicon ($bold-seq$))
+(element guilabel ($italic-seq$))
+(element guimenu ($bold-seq$))
+(element guimenuitem ($bold-seq$))
+(element hardware ($bold-mono-seq$))
+(element keycap ($bold-seq$))
+(element literal ($mono-seq$))
+(element parameter ($italic-mono-seq$))
+(element prompt ($mono-seq$))
+(element symbol ($charseq$))
+(element emphasis ($italic-seq$))
+
+
+
+
+
+
+
+
+
+
+;; this is necessary because right now jadetex does not understand
+;; symbolic entities, whereas things work well with numeric entities.
+(declare-characteristic preserve-sdata?
+ "UNREGISTERED::James Clark//Characteristic::preserve-sdata?"
+ #f)
+
+
+;;=========================
+;;Header HTML 4.0.1
+;;=========================
+
+(define %html-pubid% "-//W3C//DTD HTML 4.01//EN")
+
+;;=========================
+;;Common Stuff
+;;=========================
+
+;;Should there be a link to the legalnotice?
+(define %generate-legalnotice-link%
+ #t)
+
+;;What graphics extensions allowed?
+(define %graphic-extensions%
+'("gif" "png" "jpg" "jpeg" "tif" "tiff" "eps" "epsf" ))
+
+;;What is the default extension for images?
+(define %graphic-default-extension% "png")
+
+;;Use element ids as filenames?
+(define %use-id-as-filename%
+ #f)
+
+
+;;=========================
+;;Book Stuff
+;;=========================
+
+;;Do you want a TOC for Books?
+(define %generate-book-toc%
+ #t)
+
+;;What depth should the TOC generate?
+;;!Only top level of appendixes!
+(define (toc-depth nd)
+ (if (string=? (gi nd) (normalize "book"))
+ 3
+ (if (string=? (gi nd) (normalize "appendix"))
+ 0
+ 1)))
+
+;;What elements should have an LOT?
+(define ($generate-book-lot-list$)
+ (list (normalize "equation")))
+
+;;Do you want a title page for your Book?
+(define %generate-book-titlepage%
+#t)
+
+;;=========================
+;;Part Stuff
+;;=========================
+
+;;Should parts have TOCs?
+(define %generate-part-toc%
+ #t)
+
+;;Should part TOCs be on their titlepages?
+(define %generate-part-toc-on-titlepage%
+ #t)
+
+;;Do you want a title page for your part?
+(define %generate-part-titlepage%
+ #t)
+
+;;Should the Part intro be on the part title page?
+(define %generate-partintro-on-titlepage%
+ #t)
+
+(define %para-autolabel%
+ #t)
+
+;;========================
+;;Chapter Stuff
+;;=======================
+
+;;No TOCs in Chapters
+(define $generate-chapter-toc$
+ (lambda ()
+ #f))
+
+;;=========================
+;;Navigation
+;;=========================
+
+;;Should there be navigation at top?
+(define %header-navigation%
+ #t)
+
+;;Should there be navigation at bottom?
+(define %footer-navigation%
+ #t)
+
+;;Use tables to create the navigation?
+(define %gentext-nav-use-tables%
+ #t)
+
+;;If tables are used for navigation,
+;;how wide should they be?
+(define %gentext-nav-tblwidth%
+"100%")
+
+;;Add arrows to navigation (comment these
+;;out if you want admon graphics here)
+(define (gentext-en-nav-prev prev)
+ (make sequence (literal "<<< Previous")))
+
+;;Add arrows to navigation (comment these
+;;out if you want admon graphics here)
+(define (gentext-en-nav-next next)
+ (make sequence (literal "Next >>>")))
+
+
+;;=========================
+;;Tables and Lists
+;;=========================
+
+;;Should Variable lists be tables?
+(define %always-format-variablelist-as-table%
+ #f)
+
+;;What is the length of the 'Term' in a variablelist?
+(define %default-variablelist-termlength%
+ 20)
+
+;;When true | If the terms are shorter than
+;;the termlength above then the variablelist
+;;will be formatted as a table.
+(define %may-format-variablelist-as-table%
+#f)
+
+;;This overrides the tgroup definition
+;;(copied from 1.20, dbtable.dsl).
+;;It changes the table background color,
+;;cell spacing and cell padding.
+;;This is based on gtk-doc additions - thanks!
+
+(element tgroup
+ (let* ((wrapper (parent (current-node)))
+ (frameattr (attribute-string (normalize "frame") wrapper))
+ (pgwide (attribute-string (normalize "pgwide") wrapper))
+ (footnotes (select-elements (descendants (current-node))
+ (normalize "footnote")))
+ (border (if (equal? frameattr (normalize "none"))
+ '(("BORDER" "0"))
+ '(("BORDER" "1"))))
+ (bgcolor '(("BGCOLOR" "#E0E0E0")))
+ (width (if (equal? pgwide "1")
+ (list (list "WIDTH" ($table-width$)))
+ '()))
+ (head (select-elements (children (current-node)) (normalize "thead")))
+ (body (select-elements (children (current-node)) (normalize "tbody")))
+ (feet (select-elements (children (current-node)) (normalize "tfoot"))))
+ (make element gi: "TABLE"
+ attributes: (append
+ border
+ width
+ bgcolor
+ '(("CELLSPACING" "0"))
+ '(("CELLPADDING" "4"))
+ (if %cals-table-class%
+ (list (list "CLASS" %cals-table-class%))
+ '()))
+ (process-node-list head)
+ (process-node-list body)
+ (process-node-list feet)
+ (make-table-endnotes))))
+
+;;===================
+;; Admon Graphics
+;;===================
+
+;;Should Admon Graphics be used?
+(define %admon-graphics%
+ #t)
+
+;;Where are those admon graphics?
+(define %admon-graphics-path%
+ "./stylesheet-images/")
+
+;;Given an admonition node, returns the
+;;name of the graphic that should
+;;be used for that admonition.
+;;Define admon graphics usage
+;;NOTE these will change to pngs
+;;soon in the GDP when Tigert gets
+;;the time to make special ones for us!
+(define ($admon-graphic$ #!optional (nd (current-node)))
+ (cond ((equal? (gi nd) (normalize "tip"))
+ (string-append %admon-graphics-path% "tip.gif"))
+ ((equal? (gi nd) (normalize "note"))
+ (string-append %admon-graphics-path% "note.gif"))
+ ((equal? (gi nd) (normalize "important"))
+ (string-append %admon-graphics-path% "important.gif"))
+ ((equal? (gi nd) (normalize "caution"))
+ (string-append %admon-graphics-path% "caution.gif"))
+ ((equal? (gi nd) (normalize "warning"))
+ (string-append %admon-graphics-path% "warning.gif"))
+ (else (error (string-append (gi nd) " is not an admonition.")))))
+
+;;Given an admonition node, returns
+;;the width of the graphic that will
+;;be used for that admonition.
+(define ($admon-graphic-width$ #!optional (nd (current-node)))
+ "25")
+
+;;=========================
+;;Labels
+;;=========================
+
+;;Enumerate Chapters?
+(define %chapter-autolabel%
+ #f)
+
+;;Enumerate Sections?
+(define %section-autolabel%
+ #f)
+
+;;=========================
+;; HTML Attributes
+;;=========================
+
+;;What attributes should be hung off
+;;of 'body'?
+(define %body-attr%
+ (list
+ (list "BGCOLOR" "#FFFFFF")
+ (list "TEXT" "#000000")
+ (list "LINK" "#0000FF")
+ (list "VLINK" "#840084")
+ (list "ALINK" "#0000FF")))
+
+;;Default extension for filenames?
+(define %html-ext%
+ ".html")
+
+;;Use a CSS stylesheet?
+;;Which one? Should work on
+;;this one soon
+;(define %stylesheet%
+; "./gnome.css")
+
+;;Use it
+;(define %stylesheet-type%
+;"text/css")
+
+
+;;========================
+;;Title Pages for Books
+;;=======================
+
+(define (book-titlepage-recto-elements)
+ (list (normalize "title")
+ (normalize "subtitle")
+ (normalize "corpauthor")
+ (normalize "authorgroup")
+ (normalize "author")
+ (normalize "orgname")
+ (normalize "graphic")
+ (normalize "copyright")
+ (normalize "legalnotice")
+ (normalize "releaseinfo")
+ (normalize "publisher")
+ (normalize "isbn")))
+
+;;========================
+;;Title Pages for Articles
+;;========================
+
+;;Should Articles have a TOC?
+(define %generate-article-toc%
+ #t)
+
+;;Which elements should appear
+;;on title page?
+(define (article-titlepage-recto-elements)
+ (list (normalize "title")
+ (normalize "subtitle")
+ (normalize "authorgroup")
+ (normalize "copyright")
+ (normalize "legalnotice")
+ (normalize "abstract")))
+
+;;How should elements on title page look?
+(mode article-titlepage-recto-mode
+
+;;Author name is too big - change it!
+ (element author
+ (let ((author-name (author-string))
+ (author-affil (select-elements (children (current-node))
+ (normalize "affiliation"))))
+ (make sequence
+ (make element gi: "H4"
+ attributes: (list (list "CLASS" (gi)))
+ (make element gi: "A"
+ attributes: (list (list "NAME" (element-id)))
+ (literal author-name)))
+ (process-node-list author-affil))))
+
+;;Address?
+ (element address
+ (make sequence
+ (make element gi: "DIV"
+ attributes: (list (list "CLASS" (gi)))
+ (process-children))))
+
+;;Get rid of spam-producing "mailto" links
+;;and get rid of email indentation
+ (element email
+ (make sequence
+ (make element gi: "DIV"
+ attributes: (list (list "CLASS" (gi)))
+ (process-children))))
+
+;;Point Abstract to custom table function
+;;(See $dcm-abstract-object$ below. For default
+;;use $semiformal-object$
+ (element abstract
+ (make element gi: "DIV"
+ ($dcm-abstract-object$)))
+
+ (element (abstract title) (empty-sosofo))
+
+;;subtitle sizing
+(element subtitle
+ (make element gi: "H4"
+ attributes: (list (list "CLASS" (gi)))
+ (process-children-trim))))
+
+;;=================
+;; INLINES
+;;=================
+
+;Define my own series of fonts for various elements
+(element application ($mono-seq$))
+(element command ($bold-seq$))
+(element filename ($mono-seq$))
+(element function ($mono-seq$))
+(element guibutton ($bold-seq$))
+(element guiicon ($bold-seq$))
+(element guilabel ($bold-mono-seq$))
+(element guimenu ($bold-seq$))
+(element guimenuitem ($bold-seq$))
+(element guisubmenu ($bold-seq$))
+(element hardware ($bold-mono-seq$))
+(element keycap ($bold-seq$))
+(element literal ($mono-seq$))
+(element parameter ($italic-mono-seq$))
+(element prompt ($mono-seq$))
+(element symbol ($charseq$))
+(element emphasis ($italic-seq$))
+
+;;Show comment element?
+(define %show-comments%
+ #t)
+
+;;====================
+;; General Formatting
+;;====================
+
+;;Formal Paras are ugly by default!
+;;Make the title run in - otherwise
+;;you should use a sect!
+(element formalpara
+ (make element gi: "DIV"
+ attributes: (list
+ (list "CLASS" (gi)))
+ (make element gi: "P"
+ (process-children))))
+
+;;This is the old one
+;(element (formalpara title)
+;($lowtitle$ 5))
+
+;;This is the new one
+(element (formalpara title)
+ (make element gi: "B"
+ ($runinhead$)))
+
+;;Make captions come after objects in the list
+(define ($object-titles-after$)
+ (list (normalize "figure")))
+
+
+;; Handle qanda labelling with Q: A:
+(define (qanda-defaultlabel)
+ (normalize "qanda"))
+
+;;From FreeBSD Sheets (Thanks!) Display Q and A in bigger bolder fonts
+
+(element question
+ (let* ((chlist (children (current-node)))
+ (firstch (node-list-first chlist))
+ (restch (node-list-rest chlist)))
+ (make element gi: "DIV"
+ attributes: (list (list "CLASS" (gi)))
+ (make element gi: "P"
+ (make element gi: "BIG"
+ (make element gi: "A"
+ attributes: (list
+ (list "NAME" (element-id)))
+ (empty-sosofo))
+ (make element gi: "B"
+ (literal (question-answer-label
+ (current-node)) " ")
+ (process-node-list (children firstch)))))
+ (process-node-list restch))))
+
+;;Literal Elements
+
+;;Indent Literal layouts?
+(define %indent-literallayout-lines%
+ #f)
+
+;;Indent Programlistings?
+(define %indent-programlisting-lines%
+ #f)
+
+;;Number lines in Programlistings?
+(define %number-programlisting-lines%
+ #f)
+
+;;Should verbatim items be 'shaded' with a table?
+(define %shade-verbatim%
+ #t)
+
+;;Define shade-verbatim attributes
+(define ($shade-verbatim-attr$)
+ (list
+ (list "BORDER" "0")
+ (list "BGCOLOR" "#E0E0E0")
+ (list "WIDTH" ($table-width$))))
+
+;;===================
+;; Entities
+;;===================
+
+;;Netscape doesn't handle trademark
+;;entity right at all!! Get rid of it.
+;;Make a TM in a superscipt font.
+(element trademark
+ (make sequence
+ (process-children)
+ (make element gi: "sup"
+ (literal "TM"))))
+
+
+;;===================
+;; New Definitions
+;;==================
+
+(define ($dcm-abstract-object$)
+ (make element gi: "TABLE"
+ attributes: '(("BORDER" "0")
+ ("BGCOLOR" "#E0E0E0")
+ ("WIDTH" "50%")
+ ("CELLSPACING" "0")
+ ("CELLPADDING" "0")
+ ("ALIGN" "CENTER"))
+ (make element gi: "TR"
+ (make element gi: "TD"
+ attributes: '(("VALIGN" "TOP"))
+ (make element gi: "B"
+ (literal "Abstract"))))
+ (make element gi: "TR"
+ (make element gi: "TD"
+ attributes: '(("VALIGN" "TOP"))
+ (process-children)))))
+
+;;Redefine Titlepage Separator on Articles
+
+(define (article-titlepage-separator side)
+ (make empty-element gi: "HR"
+ attributes: '(("WIDTH" "75%")
+ ("ALIGN" "CENTER")
+ ("COLOR" "#000000")
+ ("SIZE" "1"))))
+
+
+
+
+(define (chunk-element-list)
+ (list (normalize "preface")
+ (normalize "chapter")
+ (normalize "appendix")
+ (normalize "article")
+ (normalize "glossary")
+ (normalize "bibliography")
+ (normalize "index")
+ (normalize "colophon")
+ (normalize "setindex")
+ (normalize "reference")
+ (normalize "refentry")
+ (normalize "part")
+ (normalize "sect1")
+ (normalize "section")
+ (normalize "book") ;; just in case nothing else matches...
+ (normalize "set") ;; sets are definitely chunks...
+ ))
+
+;;Do you want Callouts to be graphics?
+(define %callout-graphics%
+#f)
+
+
+;;Make Callout graphics PNGs
+(define %callout-graphics-path%
+ "./imagelib/callouts/")
+
+ ;; Redefine $callout-bug$ to support the %callout-graphic-ext%
+ ;; variable.
+ (define ($callout-bug$ conumber)
+ (let ((number (if conumber (format-number conumber "1") "0")))
+ (if conumber
+ (if %callout-graphics%
+ (if (<= conumber %callout-graphics-number-limit%)
+ (make empty-element gi: "IMG"
+ attributes: (list (list "SRC"
+ (root-rel-path
+ (string-append
+ %callout-graphics-path%
+ number
+ %callout-graphics-ext%)))
+ (list "HSPACE" "0")
+ (list "VSPACE" "0")
+ (list "BORDER" "0")
+ (list "ALT"
+ (string-append
+ "(" number ")"))))
+ (make element gi: "B"
+ (literal "(" (format-number conumber "1") ")")))
+ (make element gi: "B"
+ (literal "(" (format-number conumber "1") ")")))
+ (make element gi: "B"
+ (literal "(??)")))))
+
+
+
+
+
+
+
diff --git a/Scripts/Functions/Render/Backends/Docbook/Styles/docbook2xhtml-chunks.xsl b/Scripts/Functions/Render/Backends/Docbook/Styles/docbook2xhtml-chunks.xsl
index 966c4b4..9c99ade 100755
--- a/Scripts/Functions/Render/Backends/Docbook/Styles/docbook2xhtml-chunks.xsl
+++ b/Scripts/Functions/Render/Backends/Docbook/Styles/docbook2xhtml-chunks.xsl
@@ -3,5 +3,5 @@ $Id$
-->
-
+
diff --git a/Scripts/Functions/Render/Backends/Docbook/Styles/docbook2xhtml-single.xsl b/Scripts/Functions/Render/Backends/Docbook/Styles/docbook2xhtml-single.xsl
index 647350b..271e624 100755
--- a/Scripts/Functions/Render/Backends/Docbook/Styles/docbook2xhtml-single.xsl
+++ b/Scripts/Functions/Render/Backends/Docbook/Styles/docbook2xhtml-single.xsl
@@ -3,5 +3,5 @@ $Id$
-->
-
+
diff --git a/Scripts/Functions/Render/Backends/Docbook/docbook.sh b/Scripts/Functions/Render/Backends/Docbook/docbook.sh
index dd19d52..6cd3210 100755
--- a/Scripts/Functions/Render/Backends/Docbook/docbook.sh
+++ b/Scripts/Functions/Render/Backends/Docbook/docbook.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
-# render_docbook.sh -- This function performs base-rendition action
-# for DocBook files.
+# docbook.sh -- This function performs base-rendition action for
+# DocBook files.
#
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
#
@@ -27,7 +27,7 @@ function docbook {
# Initialize absolute path to Xsl directory. This is the location
# where customization of XSL tranformations are stored in.
- RENDER_DOCBOOK_XSLDIR="${RENDER_BACKEND_DIR}/$(cli_getRepoName ${RENDER_BACKEND} -d)/Styles"
+ DOCBOOK_STYLES_DIR="${RENDER_BACKEND_DIR}/$(cli_getRepoName ${RENDER_BACKEND} -d)/Styles"
${RENDER_BACKEND}_convertToPdf
${RENDER_BACKEND}_convertToXhtml
diff --git a/Scripts/Functions/Render/Backends/Docbook/docbook_convertToPdf.sh b/Scripts/Functions/Render/Backends/Docbook/docbook_convertToPdf.sh
index da9eeca..c358267 100755
--- a/Scripts/Functions/Render/Backends/Docbook/docbook_convertToPdf.sh
+++ b/Scripts/Functions/Render/Backends/Docbook/docbook_convertToPdf.sh
@@ -1,15 +1,14 @@
#!/bin/bash
#
-# docbook_convertToPdf.sh -- This function produces PDF output for
-# repository documentation manual, in DocBook XML format. The
-# procedure was taken from `docbook-style-xsl-1.69.1-5.1'
-# documentation, which says: ---To get to print, you need an XSLT
-# engine (e.g., `xsltproc') to produce formatting objects (FO), which
-# then must be processed with an FO engine (e.g., `pdfxmltex') to
-# produce PostScript or PDF output---. To make the whole process
-# transparent, a temporal directory is created for intermediate works.
-# Once the PDF file is produced there, it is moved to its final
-# location.
+# docbook_convertToPdf.sh -- This function takes DocBook XML as input
+# and produces two different PDF as outputs; one from DocBook XML and
+# another from DocBook SGML. To make the whole process transparent, a
+# temporal directory is created for intermediate works and final files
+# are moved then to their final location.
+#
+# Inside `centos-art.sh' script we provide support for both outputs
+# produced from DocBook XML and DocBook SGML for you to evaluate and
+# if possible correct.
#
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
#
@@ -33,72 +32,10 @@
function docbook_convertToPdf {
- local -a XSL_TEMPLATE
- local -a XSL_INSTANCE
- local XSL_INSTANCE_FINAL=''
-
- # Print action message.
- cli_printMessage "${FILE}.pdf" --as-updating-line
-
- # Define name of temporal directory where the DocBook to PDF
- # transformation will take place.
- local TMPDIR=$(cli_getTemporalFile "docbook2pdf")
-
- # Define absolute path to DocBook source file. This is the
- # repository documentation manual file where DOCTYPE and ENTITY
- # definition lines are set.
- local SRC=${INSTANCE}
-
- # Define absolute path to PDF target file. This is the final
- # location the PDF file produced as result of DocBook to PDF
- # transformation will be stored in.
- local DST="${FILE}.pdf"
-
- # Define file name of formatting object (.fo) file. This file is
- # an intermediate file needed to produced the PDF.
- local FO=$(basename ${FILE}).fo
-
- # Define file name of PDF file. This is the file we were looking
- # for and the one moved, once produced.
- local PDF=$(basename ${FILE}).pdf
-
- # Prepare XSL final instances used in transformations.
- ${RENDER_BACKEND}_prepareXsl4Using "${RENDER_DOCBOOK_XSLDIR}/docbook2fo.xsl"
-
- # Verify temporal directory and create it if doesn't exist.
- if [[ ! -d $TMPDIR ]];then
- mkdir $TMPDIR
- fi
-
- # Move inside temporal directory.
- pushd $TMPDIR > /dev/null
-
- # Create formatting object supressing output from stderr.
- xsltproc --output ${FO} ${XSL_INSTANCE_FINAL} ${SRC} &> /dev/null
-
- # Create PDF format from formatting object. The `pdfxmltex' commad
- # must be executed twice in order for document's cross-references
- # to be built correctly.
- if [[ $? -eq 0 ]];then
- pdfxmltex ${FO} > /dev/null
- pdfxmltex ${FO} > /dev/null
- else
- cli_printMessage "`gettext "Cannot produce the formatting object."`" --as-error-line
- fi
-
- # Verify `' exit status and, if everything is ok, move PDF file
- # from temporal directory to its target location.
- if [[ $? -eq 0 ]];then
- mv $PDF $DST
- else
- cli_printMessage "`gettext "Cannot produce the PDF file."`" --as-error-line
- fi
-
- # Return to where we initially were.
- popd > /dev/null
+ # Tranform DocBook XML to PDF.
+ ${RENDER_BACKEND}_convertToPdfFromXml
- # Remove temporal directory and temporal XSL instances created.
- rm -r $TMPDIR
- rm ${XSL_INSTANCE[*]}
+ # Tranform DocBook SGML to PDF.
+ ${RENDER_BACKEND}_convertToPdfFromSgml
}
diff --git a/Scripts/Functions/Render/Backends/Docbook/docbook_convertToPdfFromSgml.sh b/Scripts/Functions/Render/Backends/Docbook/docbook_convertToPdfFromSgml.sh
new file mode 100755
index 0000000..48c45bc
--- /dev/null
+++ b/Scripts/Functions/Render/Backends/Docbook/docbook_convertToPdfFromSgml.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+#
+# docbook_convertToPdfFromSgml.sh -- This function transforms DocBook
+# files which have set the SGML DTD in them. To produce PDF from
+# DocBook SGML DTD, we take the DocBook XML DTD file and change its
+# DTD from XML to SGML. Since XML is SGML shoudn't be any problem.
+# Once the DTD has been changed from XML to SGML, we use the jw shell
+# script to convert the SGML-based DocBook file to PDF. Customization
+# can be achieved through DSL (docbook-style-dsssl-1.79-4.1) shipped
+# in this distribution.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id$
+# ----------------------------------------------------------------------
+
+function docbook_convertToPdfFromSgml {
+
+ # Print action message.
+ cli_printMessage "${FILE}-sgml.pdf" --as-updating-line
+
+ local -a STYLE_TEMPLATE
+ local -a STYLE_INSTANCE
+ local STYLE_INSTANCE_FINAL=''
+
+ # Define file name of SGML-based file. This is a mere copy of
+ # XML-based file, but using the `-sgml.docbook' prefix.
+ SRC=$(echo $TEMPLATE | sed -r 's!\.docbook$!-sgml.docbook!')
+
+ # Create SGML-based file as copy of main XML-based DocBook file.
+ cp $TEMPLATE $SRC
+
+ # Replace document definition from XML to SGML.
+ sed -i -r \
+ -e 's!"-//OASIS//DTD DocBook XML!"-//OASIS//DTD DocBook!' \
+ -e 's!"http://www\.oasis-open\.org/docbook/xml/([[:digit:]])\.([[:digit:]])/docbookx\.dtd"!"docbook/sgml-dtd-\1.\2-1.0-30.1/docbook.dtd"!' \
+ $SRC
+
+ # Prepare style final instance used in transformations.
+ ${RENDER_BACKEND}_prepareStyles "${DOCBOOK_STYLES_DIR}/docbook2pdf.dsl"
+
+ # Create PDF format.
+ docbook2pdf --dsl ${STYLE_INSTANCE_FINAL} ${SRC} &> /dev/null
+
+ # Remove temporal directory and temporal style instances created.
+ rm $SRC
+ rm ${STYLE_INSTANCE[*]}
+
+}
diff --git a/Scripts/Functions/Render/Backends/Docbook/docbook_convertToPdfFromXml.sh b/Scripts/Functions/Render/Backends/Docbook/docbook_convertToPdfFromXml.sh
new file mode 100755
index 0000000..e3ab41d
--- /dev/null
+++ b/Scripts/Functions/Render/Backends/Docbook/docbook_convertToPdfFromXml.sh
@@ -0,0 +1,122 @@
+#!/bin/bash
+#
+# docbook_convertToPdfFromXml.sh -- This function transforms DocBook
+# files which have set the XML DTD in them. To produce PDF from
+# DocBook XML DTD, we need an XSLT engine (e.g., through `xsltproc'
+# command) to produce formatting objects (FO), which then must be
+# processed with an FO engine (e.g., through `pdfxmltex' command,
+# which uses PassiveTex) to produce the PDF output.
+#
+# In this configuration and using default configuration settings, I've
+# presented the following problems:
+#
+# 1. Something is wrong with headings. They seem not to expand along
+# the whole page-body. They seem to be rendered in a reduced width
+# (1in approximatly). This provokes the heading to be broken in a
+# two-to-five letters column and sometimes the heading overlaps the
+# sectioning titles (e.g., chatper, section). I tried to customize
+# the value of `header.column.widths' and `page.margin.top' but it
+# seem to be not there where I need to touch.
+#
+# 2. TOC's indentation is not rendered. Even the `toc.indent.width'
+# property is set to 24 by default.
+#
+# 3. Inside lists, when items are more than one line, the
+# indentation seems to work for the first line only. All other
+# lines in the same item are not indented and begin completly
+# unaligned.
+#
+# 4. Long file paths near the end of page-body aren't hyphenated.
+# Even the `hyphenate' property is set to true by default.
+#
+# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# ----------------------------------------------------------------------
+# $Id: docbook.sh 3678 2011-06-16 18:22:08Z al $
+# ----------------------------------------------------------------------
+
+function docbook_convertToPdfFromXml {
+
+ # Print action message.
+ cli_printMessage "${FILE}-xml.pdf" --as-updating-line
+
+ local -a STYLE_TEMPLATE
+ local -a STYLE_INSTANCE
+ local STYLE_INSTANCE_FINAL=''
+
+ # Define name of temporal directory where the DocBook to PDF
+ # transformation will take place.
+ local TMPDIR=$(cli_getTemporalFile "docbook2pdf")
+
+ # Define absolute path to DocBook source file. This is the
+ # repository documentation manual file where DOCTYPE and ENTITY
+ # definition lines are set.
+ local SRC=${INSTANCE}
+
+ # Define absolute path to PDF target file. This is the final
+ # location the PDF file produced as result of DocBook to PDF
+ # transformation will be stored in.
+ local DST="${FILE}-xml.pdf"
+
+ # Define file name of formatting object (.fo) file. This file is
+ # an intermediate file needed to produced the PDF.
+ local FO=$(basename ${FILE}).fo
+
+ # Define file name of PDF file. This is the file we were looking
+ # for and the one moved, once produced.
+ local PDF=$(basename ${FILE}).pdf
+
+ # Prepare XSL final instances used in transformations.
+ ${RENDER_BACKEND}_prepareStyles "${DOCBOOK_STYLES_DIR}/docbook2fo.xsl"
+
+ # Verify temporal directory and create it if doesn't exist.
+ if [[ ! -d $TMPDIR ]];then
+ mkdir $TMPDIR
+ fi
+
+ # Move inside temporal directory.
+ pushd $TMPDIR > /dev/null
+
+ # Create formatting object supressing output from stderr.
+ xsltproc --output ${FO} ${STYLE_INSTANCE_FINAL} ${SRC} &> /dev/null
+
+ # Create PDF format from formatting object. The `pdfxmltex' commad
+ # must be executed twice in order for document's cross-references
+ # to be built correctly.
+ if [[ $? -eq 0 ]];then
+ pdfxmltex ${FO} > /dev/null
+ pdfxmltex ${FO} > /dev/null
+ else
+ cli_printMessage "`gettext "Cannot produce the formatting object."`" --as-error-line
+ fi
+
+ # Verify `pdfxmltex' exit status and, if everything is ok, move
+ # PDF file from temporal directory to its target location.
+ if [[ $? -eq 0 ]];then
+ mv $PDF $DST
+ else
+ cli_printMessage "`gettext "Cannot produce the PDF file."`" --as-error-line
+ fi
+
+ # Return to where we initially were.
+ popd > /dev/null
+
+ # Remove temporal directory and temporal style instances created.
+ rm -r $TMPDIR
+ rm ${STYLE_INSTANCE[*]}
+
+}
diff --git a/Scripts/Functions/Render/Backends/Docbook/docbook_convertToXhtml.sh b/Scripts/Functions/Render/Backends/Docbook/docbook_convertToXhtml.sh
index ef4ddc8..74b0cb0 100755
--- a/Scripts/Functions/Render/Backends/Docbook/docbook_convertToXhtml.sh
+++ b/Scripts/Functions/Render/Backends/Docbook/docbook_convertToXhtml.sh
@@ -28,9 +28,9 @@
function docbook_convertToXhtml {
- local -a XSL_TEMPLATE
- local -a XSL_INSTANCE
- local XSL_INSTANCE_FINAL=''
+ local -a STYLE_TEMPLATE
+ local -a STYLE_INSTANCE
+ local STYLE_INSTANCE_FINAL=''
# Print action message.
if [[ -f ${FILE}.xhtml ]];then
@@ -50,13 +50,13 @@ function docbook_convertToXhtml {
local DST="${FILE}.xhtml"
# Prepare XSL final instances used in transformations.
- ${RENDER_BACKEND}_prepareXsl4Using $(cli_getFilesList \
- ${RENDER_DOCBOOK_XSLDIR} --pattern='.*docbook2xhtml-(single|common)\.xsl')
+ ${RENDER_BACKEND}_prepareStyles $(cli_getFilesList \
+ ${DOCBOOK_STYLES_DIR} --pattern='.*docbook2xhtml-(single|common)\.xsl')
# Transform DocBook XML to XHTML supressing all stderr output.
- xsltproc --output ${DST} ${XSL_INSTANCE_FINAL} ${SRC} &> /dev/null
+ xsltproc --output ${DST} ${STYLE_INSTANCE_FINAL} ${SRC} &> /dev/null
# Remove XSL instance files.
- rm ${XSL_INSTANCE[*]}
+ rm ${STYLE_INSTANCE[*]}
}
diff --git a/Scripts/Functions/Render/Backends/Docbook/docbook_convertToXhtmlChunk.sh b/Scripts/Functions/Render/Backends/Docbook/docbook_convertToXhtmlChunk.sh
index 3ae5e01..5a9babb 100755
--- a/Scripts/Functions/Render/Backends/Docbook/docbook_convertToXhtmlChunk.sh
+++ b/Scripts/Functions/Render/Backends/Docbook/docbook_convertToXhtmlChunk.sh
@@ -29,9 +29,9 @@
function docbook_convertToXhtmlChunk {
- local -a XSL_TEMPLATE
- local -a XSL_INSTANCE
- local XSL_INSTANCE_FINAL=''
+ local -a STYLE_TEMPLATE
+ local -a STYLE_INSTANCE
+ local STYLE_INSTANCE_FINAL=''
# Print action message.
if [[ -d ${FILE}-xhtml ]];then
@@ -51,13 +51,13 @@ function docbook_convertToXhtmlChunk {
local DST="${FILE}-xhtml/"
# Prepare XSL final instances used in transformations.
- ${RENDER_BACKEND}_prepareXsl4Using $(cli_getFilesList \
- ${RENDER_DOCBOOK_XSLDIR} --pattern='.*docbook2xhtml-(chunks|common)\.xsl')
+ ${RENDER_BACKEND}_prepareStyles $(cli_getFilesList \
+ ${DOCBOOK_STYLES_DIR} --pattern='.*docbook2xhtml-(chunks|common)\.xsl')
# Transform DocBook XML to XHTML supressing all stderr output.
- xsltproc --output ${DST} ${XSL_INSTANCE_FINAL} ${SRC} &> /dev/null
+ xsltproc --output ${DST} ${STYLE_INSTANCE_FINAL} ${SRC} &> /dev/null
# Remove XSL instance files.
- rm ${XSL_INSTANCE[*]}
+ rm ${STYLE_INSTANCE[*]}
}
diff --git a/Scripts/Functions/Render/Backends/Docbook/docbook_prepareXsl4Using.sh b/Scripts/Functions/Render/Backends/Docbook/docbook_prepareXsl4Using.sh
index c53fb51..f8cd8a1 100755
--- a/Scripts/Functions/Render/Backends/Docbook/docbook_prepareXsl4Using.sh
+++ b/Scripts/Functions/Render/Backends/Docbook/docbook_prepareXsl4Using.sh
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# docbook_prepareXsl4Using.sh -- This function prepares XSL final
+# docbook_prepareStyles.sh -- This function prepares XSL final
# instances used in transformations based on XSL templates.
#
# Copyright (C) 2009, 2010, 2011 The CentOS Artwork SIG
@@ -23,50 +23,52 @@
# $Id$
# ----------------------------------------------------------------------
-function docbook_prepareXsl4Using {
+function docbook_prepareStyles {
- local XSL_TEMPLATE_FILE=''
- local XSL_TEMPLATE_FILES=$@
- local XSL_INSTANCE_COMMON=''
+ local STYLE_TEMPLATE_FILE=''
+ local STYLE_TEMPLATE_FILES=$@
+ local STYLE_INSTANCE_COMMON=''
local COUNT=0
- for XSL_TEMPLATE_FILE in $XSL_TEMPLATE_FILES;do
+ for STYLE_TEMPLATE_FILE in $STYLE_TEMPLATE_FILES;do
- XSL_TEMPLATE[((++${#XSL_TEMPLATE[*]}))]="${XSL_TEMPLATE_FILE}"
- XSL_INSTANCE[((++${#XSL_INSTANCE[*]}))]="$(cli_getTemporalFile ${XSL_TEMPLATE_FILE})"
+ STYLE_TEMPLATE[((++${#STYLE_TEMPLATE[*]}))]="${STYLE_TEMPLATE_FILE}"
+ STYLE_INSTANCE[((++${#STYLE_INSTANCE[*]}))]="$(cli_getTemporalFile ${STYLE_TEMPLATE_FILE})"
# Keep track of array's real index value. Remember, it starts
# at zero but counting starts at 1 instead. So, substracting 1
# from counting we have the real index value we need to work
# with the information stored in the array.
- COUNT=$(( ${#XSL_INSTANCE[*]} - 1 ))
+ COUNT=$(( ${#STYLE_INSTANCE[*]} - 1 ))
# Create XSL instance from XSL template.
- cp ${XSL_TEMPLATE[$COUNT]} ${XSL_INSTANCE[$COUNT]}
+ cp ${STYLE_TEMPLATE[$COUNT]} ${STYLE_INSTANCE[$COUNT]}
# Define both final an common XSL instances based on XSL
# template.
- if [[ $XSL_TEMPLATE_FILE =~ 'docbook2fo\.xsl$' ]];then
- XSL_INSTANCE_FINAL=${XSL_INSTANCE[$COUNT]}
- elif [[ $XSL_TEMPLATE_FILE =~ 'docbook2xhtml-(chunks|single)\.xsl$' ]];then
- XSL_INSTANCE_FINAL=${XSL_INSTANCE[${COUNT}]}
- elif [[ $XSL_TEMPLATE_FILE =~ 'docbook2xhtml-common\.xsl$' ]];then
- XSL_INSTANCE_COMMON=${XSL_INSTANCE[${COUNT}]}
+ if [[ $STYLE_TEMPLATE_FILE =~ 'docbook2fo\.xsl$' ]];then
+ STYLE_INSTANCE_FINAL=${STYLE_INSTANCE[$COUNT]}
+ elif [[ $STYLE_TEMPLATE_FILE =~ 'docbook2pdf\.dsl$' ]];then
+ STYLE_INSTANCE_FINAL=${STYLE_INSTANCE[${COUNT}]}
+ elif [[ $STYLE_TEMPLATE_FILE =~ 'docbook2xhtml-(chunks|single)\.xsl$' ]];then
+ STYLE_INSTANCE_FINAL=${STYLE_INSTANCE[${COUNT}]}
+ elif [[ $STYLE_TEMPLATE_FILE =~ 'docbook2xhtml-common\.xsl$' ]];then
+ STYLE_INSTANCE_COMMON=${STYLE_INSTANCE[${COUNT}]}
fi
done
# Verify XSL final instance. This is the file used by `xsltproc'
# to produce the specified output. We cannot continue without it.
- cli_checkFiles $XSL_INSTANCE_FINAL
+ cli_checkFiles $STYLE_INSTANCE_FINAL
# Expand common translation markers in XSL common instances. This
# expantion is optional.
- if [[ -f $XSL_INSTANCE_COMMON ]];then
- cli_replaceTMarkers $XSL_INSTANCE_COMMON
+ if [[ -f $STYLE_INSTANCE_COMMON ]];then
+ cli_replaceTMarkers $STYLE_INSTANCE_COMMON
fi
# Expand specific translation markers in XSL final instance.
- sed -r -i "s!=XSL_XHTML_COMMON=!${XSL_INSTANCE_COMMON}!" ${XSL_INSTANCE_FINAL}
+ sed -r -i "s!=STYLE_XHTML_COMMON=!${STYLE_INSTANCE_COMMON}!" ${STYLE_INSTANCE_FINAL}
}