13.3 Skribilo User Manual — Lout Engine |
The Lout engine produces documents for the Lout typesetting system, which is then suitable for the production of PostScript/PDF files for printing. Lout is a typesetting system comparable to TeX/LaTeX in functionality. However, it is based on a lazy, purely functional programming language and makes it easy to customize document layout; it is also lightweight compared to typical LaTeX installations, consuming less than 10 MiB of disk space.
Skribilo's Lout engine provides lots of customization opportunities (currently more than the LaTeX engine), which are shown below. It also enhances Lout by adding new features: PDF bookmarks, high-level interface to the use of dropped capitals, improved paragraph indentation, etc.
| custom | default | description |
|---|---|---|
| document-type | doc | A symbol denoting the underlying Lout document type, i.e., one of doc (the default), report, book or slides. Note that these document types are not interchangeable: slides should be used only when using the slides package; report and book do not permit text in the body of a document outside chapters. Also, these document types provide different layout features, book being the ``richest'' one; in addition, some of the customs below do not apply to all these document types. |
| document-include | auto | Document style file include line (a string
such as @Include { my-doc-style.lout }) or the symbol auto in which case the include file is deduced from document-type. |
| includes | "@SysInclude { tbl }
" | A string containing @Include
directives. |
| inline-definitions-proc | (unquote lout-definitions) | A procedure that is passed the engine and returns Lout definitions to be included at the beginning of the document as a string. |
| encoding | "ISO-8859-1" | The encoding of the output document1. As of
Lout 3.39, only "ISO-8859-1" and "ISO-8859-2" are
supported. |
| initial-font | "Palatino Base 10p" | Lout specification of the document font. |
| initial-break | (unquote (string-append "unbreakablefirst " "unbreakablelast " "hyphen adjust 1.2fx")) | Lout specification of the default paragraph breaking style. |
| initial-language | "English" | Lout specification of the document's language. This is used to select hyphenation rules, among other things. |
| column-number | 1 | Number of columns. |
| first-page-number | 1 | Number of the first page. |
| page-orientation | portrait | A symbol denoting the page orientation, one of portrait, landscape, reverse-portrait or reverse-landscape. |
| cover-sheet? | #t | For report, this boolean determines whether a cover sheet should be produced. The doc-cover-sheet-proc custom may also honor this custom for doc documents. |
| date-line | #t | For report and slide, determines whether a date line will appear on the first page (if it's a boolean), or what date line will appear (if it's not a boolean). |
| abstract | #f | For report, this can be an arbitrary Skribe expression for use as an abstract. |
| abstract-title | #t | For report, the title/name of the abstract. If #f then no abstract title is produced. If #t, then a default abstract title is chosen according to initial-language. |
| publisher | #f | For book, the publisher. |
| edition | #f | For book, the edition. |
| before-title-page | #f | For book, an expression that will appear before the title page. |
| on-title-page | #f | For book, the expression used as the title page. |
| after-title-page | #f | For book, an expression that will appear right after the title page. |
| at-end | #f | For book, an expression that will appear at the end of the book, on a page of its own. |
| optimize-pages? | #f | A boolean indicating whether to optimize pages. Refer to Lout's User's Guide for caveat. |
| doc-cover-sheet-proc | (unquote lout-make-doc-cover-sheet) | For doc, a procedure that
produces the title or cover sheet. When invoked, the procedure is
passed the document node and the engine. |
| bib-refs-sort-proc | #f | Kept for backward compability, do not use. |
| paragraph-gap | "
//1.0vx @ParaIndent @Wide &{0i}
" | Lout code for paragraph gaps. Note that the
default value is not @PP as one would expect but is instead
similar to @PP with @ParaGap equal to 1.0vx, which means that a regular inter-line space is used as
inter-paragraph space. This differs from Lout's default where the
inter-paragraph space is larger than the inter-line space, but looks
better, at least in the author's eyes. |
| first-paragraph-gap | "
@LP
" | Gap for the first paragraph within a container (e.g., the first paragraph of a chapter). This allows paragraphs to have a different indentation depending on whether they are the first paragraph of a section or not. By default, the first paragraph is not indented and subsequent paragraph are indented. |
| drop-capital? | #f | A boolean or predicate indicating whether drop capitals should be used at the beginning of paragraphs. When invoked, the predicate is passed the node at hand and the engine. |
| drop-capital-lines | 2 | Number of lines over which dropped capitals span. Only 2 and 3 are currently supported. |
| use-header-rows? | #f | For multi-page tables,
setting this to #t allows header rows to be repeated on each new
page. However, it appears to be buggy at the moment. |
| use-lout-footnote-numbers? | #f | Tells whether to use Lout's footnote numbering scheme or Skribilo's number. Using Lout's numbering scheme may yield footnote numbers that are different from those obtained with other engines, which can be undesirable. |
| transform-url-ref-proc | (unquote lout-split-external-link) | A procedure that takes a URL
ref markup and returns a list containing (maybe) one
such ref markup. This custom can be used to modify the
way URLs are rendered. The default value is a procedure that limits the
size of the text passed to Lout's @ExternalLink symbols to work
around the fact that @ExternalLink objects are unbreakable. In
order to completely disable use of @ExternalLink, just set it to
markup-body. |
| toc-leader | "." | A string, which is the leader used in table-of-content entries. |
| toc-leader-space | "2.5s" | Inter-leader space in table-of-contents entries. |
| toc-entry-proc | (unquote lout-make-toc-entry) | Procedure that takes a large-scale structure (chapter, section, etc.) and the engine and produces the number and possibly title of this structure for use in table-of-contents. |
| lout-program-name | "lout" | The lout program path, only
useful when producing lout-illustration on other
engines. |
| lout-program-arguments | () | List of additional arguments that should be passed to lout, e.g., ("-I foo" "-I bar"). |
| make-pdf-docinfo? | #t | Tells whether to produce PDF "docinfo", i.e., meta-information with title, author, etc. |
| pdf-title | #t | Title for use as the PDF document
meta-information. If #t, the document's :title is used. |
| pdf-author | #t | Author for use as the PDF document
meta-information. If #t, the document's :author is used. |
| pdf-keywords | #f | Keywords (a list of string) in the PDF
document information. This custom is deprecated, use the :keywords option of document instead. |
| pdf-extra-info | (("SkribiloVersion" (unquote (skribilo-version)))) | A list of key-value pairs (strings) to appear in the PDF meta-information. |
| make-pdf-outline? | #t | Tells whether to produce a PDF outline (aka. "bookmarks"). |
| pdf-bookmark-title-proc | (unquote lout-pdf-bookmark-title) | Procedure that takes a node and an engine and return a string representing the title of that node's PDF bookmark. |
| pdf-bookmark-node-pred | (unquote lout-pdf-bookmark-node?) | Predicate that takes a node and an engine and returns true if that node should have a PDF outline entry. |
| pdf-bookmark-closed-pred | (unquote (lambda (n e) (not (and (markup? n) (memq (markup-markup n) (quote (chapter slide slide-topic))))))) | Predicate that takes a node and an engine and returns true if the bookmark for that node should be closed ("folded") when the user opens the PDF document. |
| color? | #t | Indicate whether to use colors or not. |
| source-color | #t | A boolean enabling/disabling color of source code (see source markup). |
| source-comment-color | "#ffa600" | The source comment color. |
| source-define-color | "#6959cf" | The source define color. |
| source-module-color | "#1919af" | The source module color. |
| source-markup-color | "#1919af" | The source markup color. |
| source-thread-color | "#ad4386" | The source thread color. |
| source-string-color | "red" | The source string color. |
| source-bracket-color | "red" | The source bracket color. |
| source-type-color | "#00cf00" | The source type color. |
The (skribilo engine lout) module also exports a new markup called lout-illustration, which provides an engine-independent way to include illustrations written in Lout, such as @Diag pictures. When an engine other than Lout is used, lout-illustration are first automatically translated to EPS (using Lout's @Illustration) and then to whatever image format is supported by the engine (see Section Images).
| prototype | ||
|---|---|---|
(lout-illustration :alt :ident [:file] | ||
| option | engines | description |
| :ident | html lout latex context info xml | An identifier. This identifier is also used as the basis of the EPS file name with non-Lout engines. |
| :file | If different from #f, this specifies a file where the Lout illustration is stored. | |
| :alt | A string displayed on display devices not
capable of displaying images, as for image. | |
| argument | description | |
illustration... | The illustration itself if :file is #f. | |
The following example shows a simple diagram. When using the
lout engine, the diagram is integrated in-line in the document.
When using other engines, it is integrated using image.
... produces:
|