Skip to content

CHAPTER ​

Starts a new chapter in a Notebook.

Syntax ​

leo-grammar
CHAPTER strValue [ color:ColorSpec ] .

Parameters ​

  • <main-parameter> (strValue) - The name for the chapter.
  • color (ColorSpec, optional) - Sets the color to draw the chapter name in. The default is "black".

Details ​

The CHAPTER command is the first level for structuring a Notebook. Each chapter must have a non-ambiguous name which is specified through the <main-parameter>.

Each chapter contains fields which show attribute values and allow the user to edit these. Within a chapter these attribute fields may be grouped together by the GROUP command. A chapter automatically ends when the next chapter starts.

The color is specified through a ColorSpec, which has to evaluate to a strValue or an intValue (see LEO Colors for details).

The same attribute can appear in multiple chapters (using multiple ATTR commands) and each one can also have different configurations of parameters. The underlying attribute and its value is always the same in such a case.

See Also ​

Examples ​

A Notebook with two chapters, each with different attributes. The second chapter name is drawn using a green color.

leo
NOTEBOOK

CHAPTER "General"
  ATTR "Name"
  ATTR "Description" lines:5
  ATTR "Comment" lines:5

CHAPTER "Presentation" color:"green"
  ATTR "Position"
  ATTR "Size"
  ATTR "Font color" dialog:color

Versions and Changes ​

Available since ADOxx 1.3