11. Skribilo User Manual — Standard Packages |
This chapter describes the standard packages that come with Skribilo. Additional packages may be found from the Skribe web page, but they may require slight modifications to work correctly with Skribilo.
In order to use the facilities described in the following sections, the Skribilo source file must contains statements such as:
where THE-PACKAGE is the desired package. GNU Guile users will recognize that this is Guile's standard way to use Scheme modules. The effect of the use-modules clause is to insert the bindings exported by THE-PACKAGE into the current module's name space. Note that third-party Skribilo packages can have arbitrary Guile module names. And of course, the use-modules clause can be used to import any Guile module, not just Skribilo packages.
This package enables producing LaTeX documents conforming to the
ACM proceeding (ACMPROC) style. It introduces the
markup abstract
:
This package enables producing LaTeX documents conforming to the
Journal of Functional Programming (JFP) style. It introduces the
markup abstract
:
This package enables producing LaTeX documents conforming to the
Lecture Notes on Computer Science (LNCS) style. It introduces the
markups abstract
and references
:
(abstract :postscript)
(references [:sort])
the-bibliography
, bib-sort/authors
.Currently, native language support in Skribilo is rudimentary, limited to the following package. In the future, it should be possible to specify a document's language so that the output engine behaves accordingly, e.g., by choosing the right typographical rules and the right phrases.
This package is to be used to authoring simple letters. It redefines the
document
markup.
(document :author :date :where [:class "letter"
] [:ident])
This package provides a convenient mode for rendering books (i.e., documents made of chapters and sections) in HTML. It modifies the left-margin custom of the HTML engine (see HTML customs) such that the left margin of each HTML file produced contains a menu allowing for quick navigation within the HTML document.
This package provides a different way to render books in HTML. Concretely, it prepends a small table of contents to each chapter, section, etc., that appears in an HTML file of its own, making it easy to move around the various HTML files of the document. Compared to web-book, it does not clutter the left margin of the HTML pages.
Unlike web-book, this package is ``purely functional'' in that it does not modify the HTML engine customs and writers.
The html-navtabs package enables quick navigation inside HTML documents by means of tabs. The produced HTML code uses CSS declarations. The html-navtabs package does not introduce any new markups. It is configured via additional engine customs.
html-navtabs is to be used in conjunction with the
html-engine
engine. Specifically, it adds the following new customization to this
engine:
html-navtabs introduces two new containers (i.e., a document
chapter
section
, ...)
attributes: :html-tabs-bar and :no-tabs. The
attribute :html-tabs-bar may contain any Skribe expression. It
controls the content of the navtabs sub-bar (i.e., a small line above
the tabs). The attribute :no-tabs disable tabs for this
container.
Below is a full example using html-navtabs.
;*---------------------------------------------------------------------*/ ;* Skribilo's `html-navtabs' package */ ;*---------------------------------------------------------------------*/ (use-modules (skribilo package html-navtabs) (srfi srfi-1)) ;*---------------------------------------------------------------------*/ ;* HTML customization */ ;*---------------------------------------------------------------------*/ (let* ((he (find-engine 'html)) (oldh (markup-writer-get '&html-chapter-header he)) (colors (circular-list "#ffb643" "#de8bff"))) ;; re-bindings (markup-writer '&html-chapter-header he :options 'all :predicate (lambda (n e) (is-markup? (ast-parent n) 'chapter)) :action (lambda (n e) (engine-custom-set! e 'left-margin-background (car colors)) (set! colors (cdr colors)) (output n e oldh)))) ;*---------------------------------------------------------------------*/ ;* menu ... */ ;*---------------------------------------------------------------------*/ (define-markup (menu e #!rest opt #!key title) (table :width 95. :border 1 :cellpadding 0 :cellspacing 0 :class "menu" (tr :bg (engine-custom e 'title-background) (th (color :fg (engine-custom e 'background) (bold title)))) (tr :bg (engine-custom e 'background) (td (the-body opt))))) ;*---------------------------------------------------------------------*/ ;* linux */ ;*---------------------------------------------------------------------*/ (define (linux n e) (menu e :title "Linux" (apply table :width 100. :border 0 :class "linux" (tr (td :align 'left :valign 'top (bold "Linux"))) (map (lambda (l) (tr (td :align 'left :valign 'top l))) (list (ref :url "http://www.kernel.org/" :text "Linux kernel") (ref :url "http://www.gentoo.org/" :text "Gentoo") (ref :url "http://www.debian.org/" :text "Debian") (ref :url "http://www.redhat.org/" :text "Red Hat") (ref :url "http://www.mandrake.org/" :text "Mandrake")))))) ;*---------------------------------------------------------------------*/ ;* HTML customizations */ ;*---------------------------------------------------------------------*/ (let ((he (find-engine 'html))) (engine-custom-set! he 'favicon "icons/serrano.gif") (engine-custom-set! he 'left-margin-size 25.) (engine-custom-set! he 'left-margin (lambda (n e) (list (center (linux n e))))) (engine-custom-set! he 'javascript #t) (engine-custom-set! he 'head "div.skribetitle { padding-top: 40; } div.skribetitle td { font-size: xx-large; font-weight: bold; font-style: oblique; } body { border: 1px; border-color: black; border-style: inset; margin: 0; padding: 0; } div.navtabs-bar form { border: 0 0 0 0; padding: 2px 2px 2px 2px; margin: 2px 2px 2px 2px; clear: none; display: inline; } div.navtabs-bar select { margin: 2px 2px 2px 2px; font-family: Arial,Helvetica,sans-serif; font-size: small; } ")) ;*---------------------------------------------------------------------*/ ;* The title */ ;*---------------------------------------------------------------------*/ (define title (table :width 100. :cellpadding 10. (tr (td :align 'center (image :file "linux.png")) (td :align 'left [Skribilo ,(tt [html-navtabs]) Sample])))) ;*---------------------------------------------------------------------*/ ;* The document */ ;*---------------------------------------------------------------------*/ (document :title title :html-title "html-navtabs" :html-tabs-bar (table (tr (td :align 'right "a two-line table")) (tr (td :align 'right "yep"))) (section :title "Foo" :number #f (p [The in-line foo section])) (chapter :title "Bar" :file #t :html-tabs-bar [This is the bar chapter] (p [Yehhh.])) (chapter :title "Gee" :file #t :html-tabs-bar [This is the gee chapter] (p ":-)")))