13.3 Skribilo User Manual — Lout Engine
Contents↑ Engines

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.

13.3.1 Lout Customization

document-type default: 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 default: 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 default: "@SysInclude { tbl }\n" A string containing @Include directives.
inline-definitions-proc default: (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 default: "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 default: "Palatino Base 10p" Lout specification of the document font.
initial-break default: (unquote (string-append "unbreakablefirst " "unbreakablelast " "hyphen adjust 1.2fx")) Lout specification of the default paragraph breaking style.
initial-language default: "English" Lout specification of the document's language. This is used to select hyphenation rules, among other things.
column-number default: 1 Number of columns.
first-page-number default: 1 Number of the first page.
page-orientation default: portrait A symbol denoting the page orientation, one of portrait, landscape, reverse-portrait or reverse-landscape.
cover-sheet? default: #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 default: #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 default: #f For report, this can be an arbitrary Skribe expression for use as an abstract.
abstract-title default: #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 default: #f For book, the publisher.
edition default: #f For book, the edition.
before-title-page default: #f For book, an expression that will appear before the title page.
on-title-page default: #f For book, the expression used as the title page.
after-title-page default: #f For book, an expression that will appear right after the title page.
at-end default: #f For book, an expression that will appear at the end of the book, on a page of its own.
optimize-pages? default: #f A boolean indicating whether to optimize pages. Refer to Lout's User's Guide for caveat.
doc-cover-sheet-proc default: (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 default: #f Kept for backward compability, do not use.
paragraph-gap default: "\n//1.0vx @ParaIndent @Wide &{0i}\n" 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 default: "\n@LP\n" 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? default: #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 default: 2 Number of lines over which dropped capitals span. Only 2 and 3 are currently supported.
use-header-rows? default: #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? default: #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 default: (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 default: "." A string, which is the leader used in table-of-content entries.
toc-leader-space default: "2.5s" Inter-leader space in table-of-contents entries.
toc-entry-proc default: (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 default: "lout" The lout program path, only useful when producing lout-illustration on other engines.
lout-program-arguments default: () List of additional arguments that should be passed to lout, e.g., ("-I foo" "-I bar").
make-pdf-docinfo? default: #t Tells whether to produce PDF "docinfo", i.e., meta-information with title, author, etc.
pdf-title default: #t Title for use as the PDF document meta-information. If #t, the document's :title is used.
pdf-author default: #t Author for use as the PDF document meta-information. If #t, the document's :author is used.
pdf-keywords default: #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 default: (("SkribiloVersion" (unquote (skribilo-version)))) A list of key-value pairs (strings) to appear in the PDF meta-information.
make-pdf-outline? default: #t Tells whether to produce a PDF outline (aka. "bookmarks").
pdf-bookmark-title-proc default: (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 default: (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 default: (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? default: #t Indicate whether to use colors or not.
source-color default: #t A boolean enabling/disabling color of source code (see source markup).
source-comment-color default: "#ffa600" The source comment color.
source-define-color default: "#6959cf" The source define color.
source-module-color default: "#1919af" The source module color.
source-markup-color default: "#1919af" The source markup color.
source-thread-color default: "#ad4386" The source thread color.
source-string-color default: "red" The source string color.
source-bracket-color default: "red" The source bracket color.
source-type-color default: "#00cf00" The source type color.

13.3.2 Additional Markup

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).

(lout-illustration :alt :ident [:file] illustration...)
:ident An identifier. This identifier is also used as the basis of the EPS file name with non-Lout engines. html lout latex context info xml
: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.
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.

Ex. 42: A Lout illustration

... produces:

a document toolchain



1This option is supported when Guile 2.0+ is being used.
(made with skribilo)