9. Scribe User Manual -- Customization

9. Scribe User Manual -- Customization

Browsing

Home: Scribe User Manual

Previous chapter: Graphical User Interfaces
Next chapter: Scribe style files


Customization

Global customization
    Colors
    Header and footer
    Fonts
    Paths
HTML customization
LaTeX customization


Chapters

Getting Started
Syntax
Standard Library
Hyperlinks and References
Index
Bibliography
Computer programs
Graphical User Interfaces
Customization
Scribe style files
Editing Scribe Programs
Compiling Scribe programs
Compiling Texi documents
Using Bibtex databases
Functions and Variables


Scribe

Home page:Scribe

Documentation:user
expert


Scribe document rendering can be customized, that is arbitrarily changed. For instance, the colors, fonts, dimensions can be customized. It is beyond the scope of this manual to describe how to implement complex customization. This information can be found in the Scribe Programming Manual. In this manual we present simple customizations that do not require computer programming knowledge.

Scribe supports conditional compilation. The Scribe runtime provides the scribe-format? function that checks, at runtime, the format of the target being produced.

Customization expressions can be placed everywhere in a Scribe document. However two places should be preferred:

9.1 Global customization

Some variables control the rendering of Scribe texts. The Scribe compiler uses these variables to decide how to compile source texts. In order to change one of these variables, a set expression must be used. For instance, to change the background color of the Scribe text, one should use:

9.1.1 Colors

*scribe-background*Scribe variable

The background color of the document. The background color of this manual is: #ffefd5.

*scribe-foreground*Scribe variable

The text color of the document. The text color of this manual is: black.

*scribe-tbackground*Scribe variable

The background color used for the titles of the document. The background title color of this manual is: #ffe4c4.

*scribe-tforeground*Scribe variable

The foreground color used for the titles of the document. The foreground title color of this manual is: #800020.

*scribe-prgm-color*Scribe variable

The background color used for the programs of the document. The program color of this manual is: #ffffcc.


9.1.2 Header and footer

*scribe-header*Scribe variable

A Scribe expression defining the header of the document.

*scribe-footer*Scribe variable

A Scribe expression defining the footer of the document.


9.1.3 Fonts

*scribe-title-font*Scribe variable

The font used to display the title.

*scribe-author-font*Scribe variable

The font used to display the author name in the author function call.

*scribe-index-font-size*Scribe variable

The font size used to display the index split.


9.1.4 Paths

*scribe-path*Scribe variable

The path from where text files are loaded.

*scribe-style-path*Scribe variable

The path from where style files are loaded.

*scribe-library-path*Scribe variable

The path from where libraries files are loaded. A library implements a Scribe back-end (such as the HTML or Info back-ends).

Note that all these paths can also be configured by the mean of a compiler
option.



9.2 HTML customization

*scribe-html-left-margin*Scribe HTML variable

A Scribe expression that specifies the contents of the left margin. If this expression is #f no left margin is displayed.

*scribe-html-right-margin*Scribe HTML variable

A Scribe expression that specifies the contents of the right margin. If this expression is #f no right margin is displayed.


9.3 LaTeX customization

*scribe-tex-document-class*Scribe TeX variable

Specifies the document class of the produced latex file. If now document class is provided, Scribe will use book if the document contains chapters. Otherwise, article will be used.

*scribe-tex-packages*Scribe TeX variable

The list of LaTeX packages to be included in the target file. A package can be specified by a string, the package name or by a list of two elements composed of the package name and an option. For instance:

(set! *scribe-tex-packages*
      (cons* "fullpage" '("fontenc" "T1") *scribe-tex-packages*))

This will produce a TeX statement such as:

\documentclass{article}
...
\usepackage{fullpage}
\usepackage[T1]{fontenc}

*scribe-tex-author-hook*Scribe TeX variable

Specifies an optional convenience function to be called by the TeX back-end before the authors are emitted. If the variable is #f no hook is called. If the value is a procedure of 1 argument, the procedure is called with the list of authors.

For the sake of the example, let us consider the LaTeX acmproc class file. This LaTeX style requires a statement specifying the number of authors before the authors themselves. This can be implemented with the following function:

(if (scribe-format? 'tex)
    (set! *scribe-tex-author-hook*
          (lambda (l)
             (print "\\numberofauthors{" (length l) "}"))))

*scribe-tex-authors*Scribe TeX variable

The LaTex code to be emitted before the authors list.

*scribe-tex-author-start*Scribe TeX variable

The LaTex code to be emitted for when beginning one author.

*scribe-tex-author-stop*Scribe TeX variable

The LaTex code to be emitted for when ending one author.



This
Scribe page is generated by scribeinfo.
Last update Sun Feb 17 12:09:40 2002