4.5 TeX Format

FriCAS can produce TeX output for your output formats:TeX @{TeX} expressions. TeX output format @{TeX} output format The output is produced using macros from the LaTeX document preparation system by Leslie Lamport\cite{1}. The printed version of this book was produced using this formatter.

To turn on TeX output formatting, issue this. set output tex

)set output tex on

Here is an example of its output.

matrix [ [i*x^i + j*%i*y^j for i in 1..2] for j in 3..4]
{{3   i   {y \\sp 3}}+x} &
{{3   i   {y \\sp 3}}+{2   {x \\sp 2}}} \\ 
{{4   i   {y \\sp 4}}+x} &
{{4   i   {y \\sp 4}}+{2   {x \\sp 2}}}

This formats as [3iy3+x3iy3+2x24iy4+x4iy4+2x2]

To turn TeX output formatting off, issue )set output tex off. The LaTeX macros in the output generated by FriCAS are all standard except for the following definitions:

\\def\\csch{\\mathop csch\\nolimits}
\\def\\erf{\\mathop erf\\nolimits}
  {{ \\left. {#1} \\right|}
   {\\left| {#2} \\right. }