%freebsd.l10n; %freebsd.l10n-common; ]> (declare-flow-object-class formatting-instruction "UNREGISTERED::James Clark//Flow Object Class::formatting-instruction") (define %section-autolabel% #t) (define %label-preface-sections% #f) (define %may-format-variablelist-as-table% #f) (define %indent-programlisting-lines% #f) (define %indent-screen-lines% #f) (define (article-titlepage-recto-elements) (list (normalize "title") (normalize "subtitle") (normalize "corpauthor") (normalize "authorgroup") (normalize "author") (normalize "releaseinfo") (normalize "copyright") (normalize "pubdate") (normalize "revhistory") (normalize "legalnotice") (normalize "abstract"))) (define %admon-graphics% ;; Use graphics in admonitions? #f) (define %admon-graphics-path% ;; Path to admonition images "./imagelib/admon/") (define ($admon-graphic$ #!optional (nd (current-node))) ;; Admonition graphic file (string-append %admon-graphics-path% (case-fold-down (gi nd)) ".png")) (define %show-all-trademark-symbols% ;; Show all the trademark symbols, not just the required ;; symbols. #f) (element chapterinfo (process-children)) (element sect1info (process-children)) (element sect2info (process-children)) (element sect3info (process-children)) (element sect4info (process-children)) (element sect5info (process-children)) (element (chapterinfo authorgroup author) (literal (author-list-string))) (element (sect1info authorgroup author) (literal (author-list-string))) (element (sect2info authorgroup author) (literal (author-list-string))) (element (sect3info authorgroup author) (literal (author-list-string))) (element (sect4info authorgroup author) (literal (author-list-string))) (element (sect5info authorgroup author) (literal (author-list-string))) (define (custom-authorgroup) ($italic-seq$ (make sequence (process-node-list (select-elements (descendants (current-node)) (normalize "contrib"))) (process-children) (literal ". ")))) (element (chapterinfo authorgroup) (custom-authorgroup)) (element (sect1info authorgroup) (custom-authorgroup)) (element (sect2info authorgroup) (custom-authorgroup)) (element (sect3info authorgroup) (custom-authorgroup)) (element (sect4info authorgroup) (custom-authorgroup)) (element (sect5info authorgroup) (custom-authorgroup)) (element sgmltag ($mono-seq$ (make sequence (literal "<") (process-children) (literal ">")))) (element errorname (make sequence ($mono-seq$ (process-children)) )) (element command ($mono-seq$)) (element envar ($mono-seq$)) (element warning ($admonition$)) (element (warning title) (empty-sosofo)) (element (warning para) ($admonpara$)) (element (warning simpara) ($admonpara$)) (element caution ($admonition$)) (element (caution title) (empty-sosofo)) (element (caution para) ($admonpara$)) (element (caution simpara) ($admonpara$)) (element hostid (if %hyphenation% (urlwrap) ($mono-seq$))) (element username ($mono-seq$)) (element groupname ($mono-seq$)) (element devicename ($mono-seq$)) (element maketarget ($mono-seq$)) (element makevar ($mono-seq$)) (define (generate-anchor #!optional (nd (current-node))) (cond ((equal? (gi nd) (normalize "question")) (string-append "Q" (question-answer-label))) (else (string-append "AEN" (number->string (all-element-number nd)))))) (define (xref-biblioentry target) (let* ((abbrev (node-list-first (node-list-filter-out-pis (children target)))) (label (attribute-string (normalize "xreflabel") target))) (if biblio-xref-title (let* ((citetitles (select-elements (descendants target) (normalize "citetitle"))) (titles (select-elements (descendants target) (normalize "title"))) (isbn (select-elements (descendants target) (normalize "isbn"))) (publisher (select-elements (descendants target) (normalize "publishername"))) (title (if (node-list-empty? citetitles) (node-list-first titles) (node-list-first citetitles)))) (with-mode xref-title-mode (make sequence (process-node-list title)))) (if biblio-number (make sequence (literal "[" (number->string (bibentry-number target)) "]")) (if label (make sequence (literal "[" label "]")) (if (equal? (gi abbrev) (normalize "abbrev")) (make sequence (process-node-list abbrev)) (make sequence (literal "[" (id target) "]")))))))) (define (can-link-here) (cond ((has-ancestor-member? (current-node) '("TITLE" "QUESTION")) #f) (#t #t))) (define (create-link attrlist target) (if (can-link-here) (make element gi: "A" attributes: attrlist target) target)) ;; Standard boolean XNOR (NOT Exclusive OR). (define (xnor x y) (or (and x y) (and (not x) (not y)))) ;; Standard boolean XOR (Exclusive OR). (define (xor x y) (not (xnor x y))) ;; Determine if a given node is in a title. (define (is-in-title? node) (has-ancestor-member? node (list (normalize "title")))) ;; Number of references to a trademark before the current ;; reference in each chunk. Trademarks in title tags, and ;; trademarks in normal text (actually just text that is not in ;; title tags) are counted separately. (define ($chunk-trademark-number$ trademark) (let* ((trademarks (select-elements (descendants (chunk-parent trademark)) (normalize "trademark")))) (let loop ((nl trademarks) (num 1)) (if (node-list-empty? nl) num (if (node-list=? (node-list-first nl) trademark) num (if (and (string=? (data trademark) (data (node-list-first nl))) (xnor (is-in-title? trademark) (is-in-title? (node-list-first nl)))) (loop (node-list-rest nl) (+ num 1)) (loop (node-list-rest nl) num))))))) ;; Determine if we should show a trademark symbol. Either in ;; first occurrence in the proper context, if the role ;; attribute is set to force, or if %show-all-trademark-symbols% ;; is set to true. (define (show-tm-symbol? trademark) (or %show-all-trademark-symbols% (= ($chunk-trademark-number$ trademark) 1) (equal? (attribute-string (normalize "role") trademark) "force"))) (element (acronym remark) (let* ((role (attribute-string (normalize "role")))) (if (not (equal? role "acronym")) ($charseq$) (empty-sosofo)))) (define (local-en-label-title-sep) (list (list (normalize "warning") ": ") (list (normalize "caution") ": ") (list (normalize "chapter") " ") (list (normalize "sect1") " ") (list (normalize "sect2") " ") (list (normalize "sect3") " ") (list (normalize "sect4") " ") (list (normalize "sect5") " ") ))