I have customized the graphical admonitions starting from
the mandrake version of inlinegraphic. This places the
graphics next to the text of the admonition rather than even
with the top line. It does everything I would like it to
except use the admon-graphic-width parameter, which I have
hard-coded as 0.5in.
The mandrake stylesheet uses a formatting-instruction
directive to insert latex code directly into the generated
.tex file. I will give the entire file after the line in
question.
(graphic (make formatting-instruction
data: (string-append
"\begin[20]{0.5in}
\includegraphics{" ($admon-graphic$) "}
\end")
))
I would like to do something like:
(graphic (make formatting-instruction
data: (string-append
"\begin[20]{"
$admon-graphic-width$ "} \includegraphics{"
($admon-graphic$) "} \end")
))
But when I do this, openjade complains that "36pt is
not a string". "36pt" is the value of
$admon-graphic-width$ from dbparam.dsl.
Are there any tex-savy dsl-savy people out there who can
help?
For anyone interested, here is the code for graphcical
admonitions:
;; place graphical admonitions next to text
;; for now, admon graphics are hardwired at 0.5in wide
(define ($graphical-admonition$)
(let* ((adm (current-node))
(title (select-elements (children adm)
(normalize "title")))
(title? (not (node-list-empty? title)))
(adm-title (if title?
(with-mode title-sosofo-mode
(process-node-list (node-list-first title)))
(literal (gentext-element-name adm))))
(graphic (make formatting-instruction
data: (string-append
"\begin[20]{0.5in}
\includegraphics{" ($admon-graphic$) "}
\end")
))
(f-child (node-list-first (children (current-node))))
(r-child (node-list-rest (children (current-node)))))
(make display-group
space-before: %block-sep%
space-after: %block-sep%
start-indent: (+ (inherited-start-indent) 0.0in)
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%)
(if title?
(make display-group
(make paragraph
keep-with-next?: #t
font-weight: 'bold
adm-title)
(make paragraph
keep-with-next?: #t
graphic
(process-children)))
(make display-group
(make paragraph
keep-with-next?: #t
graphic
(process-children)))))))
toolchain:
openjade
docbook-dsssl-1.79
Kevin M. Dunn
Professor of Chemistry
Hampden-Sydney College
------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribe lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help lists.oasis-open.org
|