Книга помощи определяется в так называемом файле проекта, который имеет синтаксис языка Коммон Лисп. Определение книги выглядит аналогично определению программной системы посредством ASDlite (вариант ASDF).
Макрос define-book
из пакета ystok.help
базируется на asd:defsystem
и использует подклассы стандартных компонентов и модулей ASDlite.
В качестве примера рассмотрим файл yhelp-book.asd.
(in-package :help)
(define-book YHELP-BOOK
:id "yhelp" ; book_id
:description "YstokHelp: Help Athoring Tool" ; full book title
:pathname (pathname-location (merge-pathnames "ru/" *load-truename*))
:output-pathname (pathname-location (merge-pathnames "../help/" *load-truename*))
:start "introduction" ; explicit start-topic
:content-header (:prev :up :next :toggle) ; topic header/footer specification
:content-footer (:prev :up :next)
:charset "windows-1251"
:language "ru"
:components
((:aux-file "help.html")
;(:frameset "help.html")
(:aux-file "help.js")
(:aux-file "popupref.js")
(:aux-file "popup.js")
(:aux-file "navi.css")
(:aux-file "cont.css")
(:aux-folder "yhgfx") ; auxiliary YstokHelp graphics
(:navi-topic "index")
(:topic "yhusing")
(:topic "introduction")
(:topic "folders")
(:topic "aux-files")
(:topic "navi-files")
(:topic "cont-files")
(:chapter compiler ; chapter name and id
:components
((:topic "index")
(:topic "help-scheme")
(:topic "help-attribute")
(:topic "segments")
(:topic "book-definition")
(:topic "index-compiler")
(:topic "toc-compiler")
(:topic "book-compiler")
))
(:chapter run-time ; chapter name and id
:components
((:aux-file "help.html") ; chapter frameset
(:topic "index")
(:topic "api")))
;; Generated components
(:index "idx" ; file name (prefix)
:type :permuted)
(:toc "toc"
:max-level 3 ; acceptable (absolute) levels in final TOC
:source (:h1 :h2 (:h3))) ; heading tags gathered
) )