Darwin Help

Back to Index

Document

Class Document - holds contents of a human-readable document

Calling Sequence  Document(content1,content2,...)
Return Type  Document
Selectors
NameTypeDescription

content_i {string,structure}the contents of the Document
Methods HTMLC, LaTeXC, print, string, type
Synopsis The Document structure holds text and other structures which are expected to be laid out as a Document. When a Document is converted, each content_i is converted to the same target. Normally a Document is converted to a string, HTML or Latex. Besides text, the following structures are valid inside Documents:

Name/UseDescription

Alphabetical(int)Convert a number to alphabetical numerals
Alphanumerical(int)Convert a number to alphanumerical numerals
Bold(txt,...)Bold text
Center(txt,...)Center the contents
Code(txt,...)preformated, equally spaced text
Color(code,txt)Color the contents
Copyright(who)Insert copyright symbol, year and argument.
Font(font,txt,...)Set contents with a given font
HyperLink(txt,URL)URL linked data
Indent(txt,...)Indented data
IT(txt,...)Italic text
LastUpdatedBy(who)Convenient macro to end Document page.
List(format,txt,...)List/Definitions/bullets
MapleFormula(string)mathematical formula in Maple format
Ordinal(int)Convert a number to its ordinal ending
Paragraph(int,txt,...)A paragraph of text, lines adjusted
PlusMin(string)Expand +- to proper plus-minus symbols
PostscriptFigure(psfile,...)Figure from postscript source
Roman(int)Convert a number to roman numerals
SectionHeader(lev,txt)Section/subsection header
Size(size,txt,...)Set contents to a given size
Table(...)Tabular data
TT(txt,...)tty format (equally spaced font)

where txt means a string or any structure that will represent text.

Examples
> d := Document( Paragraph(2,Hi), Indent(5,List(Roman,first,second)) );
d := Document(Paragraph(2,Hi),Indent(5,List(Roman,first,second)))
> print(d);
  Hi
     I first
     
     II second
     


See also Code,   Color,   Copyright,   HTML,   HyperLink,   Indent,   LastUpdatedBy,   latex,   List,   Paragraph,   PostscriptFigure,   print,   Roman,   RunDarwinSession,   screenwidth,   Table,   TT,   View