From any Scilab datatype and provide a representation to the TeX, LaTeX or MathML formats
str = prettyprint(a) // Show the variable a with the default format (LaTeX)
str = prettyprint(a, exportFormat) // Show the variable a with the specified format
str = prettyprint(a, exportFormat, delim) // As above but change the delimiter
str = prettyprint(a, exportFormat, delim, processByElement) // As above but process each element independently
str = prettyprint(a,exportFormat, delim, processByElement, isWrapped) // As above Add the special keyword of Tex or LaTeX export
:a is a Scilab variable : :exportFormat is the format, if omitted ‘latex’ is used by default,
it can be ‘latex’, ‘tex’ or ‘mathml’.
: :str the representation of the variable a :
Taking a variable, the prettyprint function will provide a formated representation of it. Formats can be TeX, LaTeX or MathML. They can be used in third party applications but also within Scilab with the most of the `Scilab graphic features`_. The following types are handled by this function:
str = prettyprint(`rand`_(3,3)) // Return the LaTeX representation of a 3,3 matrix
`xstring`_(0.2,0.2,str) // Show the representation in a graphic Windows
prettyprint(`rand`_(3,4),"mathml") // Return the MathML representation of a 3,4 matrix
prettyprint(`rand`_(3,4),"mathml","[") // Return the MathML representation of a 3,4 matrix with '[' as delimiter
s=`poly`_(0,'s'); G=[1,s;1+s^2,3*s^3];
`xstring`_(0.2,0.2,prettyprint(G*s-1)); // Show a polynomial through a LaTeX representation