Commit 22cd8a90 authored by Dave Cooper's avatar Dave Cooper
Browse files

added graphics to reference section

parent 12290a1d
......@@ -298,6 +298,26 @@ If you specify :part-symbol-supplied, do not specify :instance-supplied."))
(when (and (the example-code) (not (search "(generate-sample-drawing" (the example-code))))
(warn "Sample code found in ~s, but no call to generate-sample-drawing was found."
(the part-full-symbol)))
(let (pdf-file named-pdf-file)
(when (and (the example-code)
(or (search "(generate-sample-drawing" (the example-code))
(search "(with-format (pdf" (the example-code))))
(format t "~&~%Loading example code and generating example image for ~s...~%"
(the part-full-symbol))
(the load-example)
(setq pdf-file (merge-pathnames "example.pdf" (glisp:temporary-folder))
named-pdf-file (merge-pathnames (format nil "example-~s.pdf" (the part-full-symbol))
(uiop:copy-file pdf-file named-pdf-file))
`((:p (:textbf (:underline "Mixins:")) " "
,(format nil "~{~a~^, ~}" (mapcar #'(lambda (sym) (string sym)) (the mixins-list))))
(:p ((:list :style :description)
......@@ -307,6 +327,19 @@ If you specify :part-symbol-supplied, do not specify :instance-supplied."))
(remove-if-not #'(lambda(keyword)
(getf (the part-documentation-plist) keyword))
(remove :examples (safe-sort *allowed-part-documentation-keywords* #'string<))))))
,(when (the example-code)
`((:boxed-figure :caption ,(format nil "Example Code for ~s" (the part-full-symbol))
:label ,(format nil "fig:example-code-~s" (the part-full-symbol)))
(:small (:verbatim ,(the example-code)))))
,(when named-pdf-file
`((:image-figure :image-file ,named-pdf-file
:width "3in" :height "3in"
:caption ,(format nil "~s example" (the part-full-symbol))
:label ,(format nil "fig:~s" (the part-full-symbol)))))
(:p ,@(or
......@@ -339,7 +372,7 @@ If you specify :part-symbol-supplied, do not specify :instance-supplied."))
(list-elements (the sections))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment