Class MathjaxContentTransformer
- java.lang.Object
-
- org.eclipse.epsilon.picto.transformers.MathjaxContentTransformer
-
- All Implemented Interfaces:
ViewContentTransformer
public class MathjaxContentTransformer extends Object implements ViewContentTransformer
- Since:
- 2.2
- Author:
- Sina Madani
-
-
Constructor Summary
Constructors Constructor Description MathjaxContentTransformer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canTransform(ViewContent content)
protected static ExternalContentTransformation
convertTex(String tex, Path output)
String
getLabel(ViewContent content)
static Path
tex2svg(String tex)
Converts the TeX math to SVG file.static String
texToRawSvg(String tex)
Converts TeX math to SVG as String.ViewContent
transform(ViewContent content, PictoView pictoView)
-
-
-
Method Detail
-
canTransform
public boolean canTransform(ViewContent content)
- Specified by:
canTransform
in interfaceViewContentTransformer
-
getLabel
public String getLabel(ViewContent content)
- Specified by:
getLabel
in interfaceViewContentTransformer
-
transform
public ViewContent transform(ViewContent content, PictoView pictoView) throws Exception
- Specified by:
transform
in interfaceViewContentTransformer
- Throws:
Exception
-
texToRawSvg
public static String texToRawSvg(String tex) throws IOException
Converts TeX math to SVG as String.- Parameters:
tex
- The tex- Returns:
- The SVG as string
- Throws:
IOException
- If converison fails.- See Also:
tex2svg(String)
-
tex2svg
public static Path tex2svg(String tex) throws IOException
Converts the TeX math to SVG file.- Parameters:
tex
- The mathematics.- Returns:
- The path of the generated SVG.
- Throws:
IOException
- If the conversion goes wrong.
-
convertTex
protected static ExternalContentTransformation convertTex(String tex, Path output)
-
-