====== OutputFormat ======
----
====Description====
''OutputFormat'' is a enum that defines different formats of string representation of expressions in Redberry.
There are several available output formats. In order to specify a particular one one can do:
import cc.redberry.groovy.Redberry
import cc.redberry.core.context.OutputFormat
use(Redberry){
def expr = 'a * F^{A}_{A m n} + g_mn'.t
println expr.toString(OutputFormat.Maple)
}
> a * F[m, n, ~A, A] + g_[m, n]
The above result can be directly pasted to Maple system.
The available output formats are:
''Redberry'',
''Cadabra'',
''LaTeX'',
''WolframMathematica'',
''Maple'',
''UTF8'',
''SimpleRedberry''. The last one can be used to print matrix objects in a convenient and human-readable format.
One can set the default output format in the following way:
//set Cadabra output by default
CC.defaultOutputFormat = OutputFormat.Cadabra
====See also====
* Related guides: [[documentation:guide:inputting_and_printing_mathematical_expressions]], [[documentation:guide:setting_up_matrix_objects]]
* JavaDocs: [[http://api.redberry.cc/redberry/1.1.9/java-api//cc/redberry/core/context/OutputFormat.html| OutputFormat]]
* Source code: [[https://bitbucket.org/redberry/redberry/src/tip/core/src/main/java/cc/redberry/core/context/OutputFormat.java|OutputFormat.java]]