aspose.tex.plugins

The Aspose.TeX.Plugins is a root namespace for all classes of Aspose.TeX.Plugins classes.

Classes

ClassDescription
FigureRendererPluginThe Figure Renderer plugin class.

The example shows how to render a LaTeX fragment in PNG.

python<br/>from aspose.pydrawing import Color <br/>from aspose.tex.plugins import FigureRendererPlugin, PngFigureRendererPluginOptions, StreamDataSource, StringDataSource <br/> <br/># Create the Figure Renderer. <br/>renderer = FigureRendererPlugin() <br/>options = PngFigureRendererPluginOptions() <br/>options.background_color = Color.yellow <br/>options.resolution = 150 <br/>options.margin = 10.0 <br/>options.preamble = "LaTeX preamble" <br/> <br/># Create the PngFigureRendererPluginOptions instance and set up options. <br/>options = options <br/># Add an input LaTeX fragment. <br/>options.add_input_data_source(StringDataSource("LaTeX fragment")) <br/># Create a stream to write the image to. <br/>with open("output path", "wb") as stream: <br/> # Add an output stream. <br/> options.add_output_data_target(StreamDataSource(stream)) <br/> # Run the process. <br/> result = renderer.process(options) <br/><br/>
FigureRendererPluginOptionsThe options for the FigureRendererPlugin.
FigureRendererPluginResultThe Figure Renderer plugin’s common result.
IDataSourceThe general data source interface.
IOperationResultThe general operation result interface.
IPluginThe general plugin interface.
IPluginOptionsThe general plugin options interface.
MathRendererPluginMathRenderer plugin class.

The example shows how to render a LaTeX formula in PNG.

python<br/>from aspose.pydrawing import Color <br/>from aspose.tex.plugins import MathRendererPlugin, PngMathRendererPluginOptions, StreamDataSource, StringDataSource <br/> <br/># Create MathRenderer. <br/>renderer = MathRendererPlugin() <br/>options = PngMathRendererPluginOptions() <br/>options.background_color = Color.yellow <br/>options.text_color = Color.blue <br/>options.resolution = 150 <br/>options.margin = 10.0 <br/>options.preamble = "LaTeX preamble" <br/> <br/># Create the PngMathRendererPluginOptions instance and set up options. <br/>options = options <br/># Add a source formula. <br/>options.add_input_data_source(StringDataSource("LaTeX formula")) <br/># Create a stream to write the image to. <br/>with open("output path", "wb") as stream: <br/> # Add an output stream. <br/> options.add_output_data_target(StreamDataSource(stream)) <br/> # Run the process. <br/> result = renderer.process(options) <br/><br/>
MathRendererPluginOptionsThe options for the MathRendererPlugin.
MathRendererPluginResultThe Math Renderer plugin’s common result.
PngFigureRendererPluginOptionsThe Figure Renderer plugin’s options to render a LaTeX figure in PNG.
PngMathRendererPluginOptionsThe Math Renderer plugin’s options to render a math formula in PNG.
ResultContainerThe plugin execution result container.
StreamDataSourceThe stream data source for plugin’s load and save operations.
StringDataSourceThe string data source for plugin’s load operations.
SvgFigureRendererPluginOptionsThe Figure Renderer plugin’s options to render a LaTeX figure in SVG.
SvgMathRendererPluginOptionsThe Math Renderer plugin’s options to render a math formula in SVG.

Enumerations

EnumerationDescription
DataTypeEnumerates available data types for plugins I/O.