]]> ]]> %misc.ent; ]> (element username ($mono-seq$)) (element groupname ($mono-seq$)) (element devicename ($mono-seq$)) (element maketarget ($mono-seq$)) (element makevar ($mono-seq$)) (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)) tags since the latter cause links to be created by themselves. Obviously, nested links lead to all kinds of evil. This normally wouldn't be a problem since no one in their right mind will put a or in a , but it comes up when someone uses, say, a man page entity (e.g., &man.ls.1;); the latter may cause a link to be created, but its use inside a is perfectly legal. The (can-link-here) routine isn't perfect; in fact, it's a hack and an ugly one at that. Ideally, it would detect if the currect output would wind up in an tag and return #f if that's the case. Slightly less ideally it would check the current mode and return #f if, say, we're currently in TOC mode. Right now, it makes a best guess attempt at guessing which tags might cause links to be generated. --> (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)) (define %refentry-xref-link% ;; REFENTRY refentry-xref-link ;; PURP Generate URL links when cross-referencing RefEntrys? ;; DESC ;; If true, a web link will be generated, presumably ;; to an online man->HTML gateway. The text of the link is ;; generated by the $create-refentry-xref-link$ function. ;; /DESC ;; AUTHOR N/A ;; /REFENTRY #t) (define ($create-refentry-xref-link$ #!optional (n (current-node))) (let* ((r (select-elements (children n) (normalize "refentrytitle"))) (m (select-elements (children n) (normalize "manvolnum")))) (string-append "//man.NetBSD.org/" (data r) "." (data m)))) (element citerefentry (let ((href ($create-refentry-xref-link$))) (if %refentry-xref-link% (create-link (list (list "HREF" href)) (if %refentry-xref-italic% ($italic-seq$) ($charseq$))) (if %refentry-xref-italic% ($italic-seq$) ($charseq$))))) ]]> number ;; then get the apparent level (substring renderas 4 5)) ;; from "renderas", (SECTLEVEL))) ;; else use the real level (hs (HSIZE (- 4 hlevel)))) (make sequence (make paragraph font-family-name: %title-font-family% font-weight: (if (< hlevel 5) 'bold 'medium) font-posture: (if (< hlevel 5) 'upright 'italic) font-size: hs line-spacing: (* hs %line-spacing-factor%) space-before: (* hs %head-before-factor%) space-after: (if (node-list-empty? subtitles) (* hs %head-after-factor%) 0pt) start-indent: (if (or (>= hlevel 3) (member (gi) (list (normalize "refsynopsisdiv") (normalize "refsect1") (normalize "refsect2") (normalize "refsect3")))) %body-start-indent% 0pt) first-line-start-indent: 0pt quadding: %section-title-quadding% keep-with-next?: #t heading-level: (if %generate-heading-level% (+ hlevel 1) 0) ;; SimpleSects are never AUTO numbered...they aren't hierarchical (if (> hlevel (- max-section-level-labels 1)) (empty-sosofo) (if (string=? (element-label (current-node)) "") (empty-sosofo) (literal (element-label (current-node)) (gentext-label-title-sep (gi sect))))) (element-title-sosofo (current-node))) (with-mode section-title-mode (process-node-list subtitles)) ($section-info$ info)))) ]]>