Class LaTeX

Description

Generate LaTeX output.

This class is used primarily for Invoice and Waiver form generation it has methods for escaping LaTeX special characters and processing lists into LaTeX tables.

  • access: public
  • static:

Located in /include/classes/LaTeX.inc (line 23)


	
			
Method Summary
 string beginDocument (string $title, string $author, [int $size = 10])
 string centerText (mixed $text)
 string endDocument ([boolean $includeColophon = FALSE])
 string escapeText (string $text)
 string formatText (string $text, string $type)
 string produceLongtable (array $cells, [string $format = ""], [boolean $colored = TRUE], [boolean $border = FALSE], [string $firstHead = ""], [string $otherHead = ""], [string $otherFoot = ""], [string $lastFoot = ""])
 string spanRow (string $text, int $numCols, [string $format = "c"])
Methods
beginDocument (line 116)

Begin a LaTeX document.

  • return: document intro
string beginDocument (string $title, string $author, [int $size = 10])
  • string $title: document's title
  • string $author: document's author
  • int $size: text size, in pts, default 10
centerText (line 52)

Centers text.

Handles arrays of lines, or single line strings.

  • return: wrapped with LaTeX centering commands
string centerText (mixed $text)
  • mixed $text
endDocument (line 190)

End a LaTeX document.

  • return: document closing
string endDocument ([boolean $includeColophon = FALSE])
  • boolean $includeColophon: attach production information?
escapeText (line 31)

Escape LaTeX special characters.

  • return: with special characters escaped
string escapeText (string $text)
  • string $text
formatText (line 85)

Apply text formatting.

  • return: wrapped with LaTeX formattng commands
string formatText (string $text, string $type)
  • string $text
  • string $type: what kind of formatting to apply
produceLongtable (line 151)

Format an array into a table.

Creates a long table, spanning pages if needed, with custom headers/footers on terminal/non-terminal pages.

Formatting can include an optional border and zebra striping.

  • return: formatted table
string produceLongtable (array $cells, [string $format = ""], [boolean $colored = TRUE], [boolean $border = FALSE], [string $firstHead = ""], [string $otherHead = ""], [string $otherFoot = ""], [string $lastFoot = ""])
  • array $cells: the information for the table, rows then columns
  • string $format: the LaTeX string defined the alignment of the cells
  • boolean $colored: zebra striping desired? defaults to yes
  • boolean $border: add a border around the table? defaults to yes
  • string $firstHead: table header, first page, defaults to nothing
  • string $otherHead: table header, non first page, defaults to nothing
  • string $otherFoot: table footer, non-terminal page, defaults to nothing
  • string $lastFoot: table footer, last page, defaults to nothing
spanRow (line 74)

Allow text to span multiple columns in a table.

  • return: wrapped with LaTeX spanning commands
string spanRow (string $text, int $numCols, [string $format = "c"])
  • string $text
  • int $numCols: how many columns to spaan
  • string $format: what LaTeX format to apply, defaults to centered

Documentation generated on Tue, 25 Apr 2006 13:04:05 -0400 by phpDocumentor 1.3.0RC3