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

9.1 Global customization
  9.1.1 Colors and backgrounds
  9.1.2 Header and footer
  9.1.3 Fonts
  9.1.4 Paths
9.2 User parameters
9.3 HTML customization
9.4 LaTeX customization

Chapters

1. Getting Started
2. Syntax
3. Standard Library
4. Hyperlinks and References
5. Index
6. Bibliography
7. Computer programs
8. Graphical User Interfaces
9. Customization
10. Scribe style files
11. Editing Scribe Programs
12. Compiling Scribe programs
13. Compiling Texi documents
14. Using Bibtex databases
15. Functions and Variables

Scribe

Home page:Scribe

Documentation:user
expert
styles

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:

(set! *scribe-background* "white")

9.1.1 Colors and backgrounds

*scribe-background*Scribe variable

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

*scribe-background-image*Scribe variable

The background image of the document.

*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 User parameters

*scribe-user*Scribe user parameters variable

The variable *scribe-user* only purpose is to enable user parameters to be sent to Scribe and used by various back-ends. By convention, this variable must contain a list. It belongs to the Scribe style to make use of the value found in this list.

9.3 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.4 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 page has been generated by Scribe.
Last update Wed Dec 18 09:23:02 2002