ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\UI\examples\Legacy\LatexContent Namespace Reference

Functions

 base ()
 

Function Documentation

◆ base()

ILIAS\UI\examples\Legacy\LatexContent\base ( )

description: > Example for rendering a legacy content with laTeX code. The content can be text or HTML. LaTeX code within is embedded in the delimiters [tex] and [/tex]

expected output: > ILIAS shows the string 'This should be rendered as a formula: ' followed by a mathematical function definition with an integral. The function definition is rendered graphically. The rendering may take a tenth of a second when the page is shown. Before that the LaTeX source code is shown. A right click with the mouse on the rendered expression will show a popup menu from MathJax.

Here you can set different display options.

Definition at line 40 of file base.php.

41{
42 //Init Factory and Renderer
43 global $DIC;
44 $f = $DIC->ui()->factory();
45 $renderer = $DIC->ui()->renderer();
46
47 //Init Component
48 $legacy = $f->legacy()->latexContent('This should be rendered as a formula: [tex]f(x)=\int_{-\infty}^x e^{-t^2}dt[/tex]');
49
50 //Render
51 return $renderer->render($legacy);
52}
$renderer
global $DIC
Definition: shib_login.php:26

References $DIC, Vendor\Package\$f, and $renderer.