Moodle  2.2.1
http://www.collinsharper.com
latex Class Reference

Public Member Functions

 latex ()
 supported ()
 construct_latex_document ($formula, $fontsize=12)
 execute ($command, $log=null)
 render ($formula, $filename, $fontsize=12, $density=240, $background='', $log=null)
 clean_up ($filename)

Data Fields

 $temp_dir
 $error

Detailed Description

Definition at line 8 of file latex.php.


Member Function Documentation

clean_up ( filename)

Delete files created in temporary area Don't forget to copy the final gif/png before calling this

Parameters:
string$filenamefile base (no extension)

Definition at line 142 of file latex.php.

construct_latex_document ( formula,
fontsize = 12 
)

Turn the bit of TeX into a valid latex document

Parameters:
string$forumulathe TeX formula
int$fontsizethe font size
Returns:
string the latex document

Definition at line 40 of file latex.php.

Here is the call graph for this function:

Here is the caller graph for this function:

execute ( command,
log = null 
)

execute an external command, with optional logging

Parameters:
string$commandcommand to execute
file$logvalid open file handle - log info will be written to this file
Returns:
return code from execution of command

Definition at line 66 of file latex.php.

Here is the caller graph for this function:

latex ( )

Constructor - create temporary directories and build paths to external 'helper' binaries. Other platforms could/should be added

Definition at line 18 of file latex.php.

Here is the call graph for this function:

render ( formula,
filename,
fontsize = 12,
density = 240,
background = '',
log = null 
)

Render TeX string into gif/png

Parameters:
string$formulaTeX formula
string$filenamebase of filename for output (no extension)
int$fontsizefont size
int$densitydensity value for .ps to .gif/.png conversion
string$backgroundbackground color (e.g, #FFFFFF).
file$logvalid open file handle for optional logging (debugging only)
Returns:
bool true if successful

Definition at line 88 of file latex.php.

Here is the call graph for this function:

supported ( )

Accessor function for support_platform field.

Returns:
boolean value of supported_platform

Definition at line 30 of file latex.php.


Field Documentation

Definition at line 11 of file latex.php.

$temp_dir

Definition at line 10 of file latex.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations