<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN"
"http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [
<!ENTITY mathml "http://www.w3.org/1998/Math/MathML">
]>

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xlink="http://www.w3.org/1999/xlink" >


  <head>
    <title>Section4.5</title>
    <link rel="stylesheet" type="text/css" href="graphicstyle.css" />
    <script type="text/javascript" src="bookax1.js" />
  </head>

  <body>
<a href="book-contents.xhtml" style="margin-right: 10px;">Book Contents</a><a href="section-4.4.xhtml" style="margin-right: 10px;">Previous Section 4.4 Monospace Two-Dimensional Mathematical Format</a><a href="section-4.6.xhtml" style="margin-right: 10px;">Next Section 4.6 IBM Script Formula Format</a>
<a href="book-index.xhtml">Book Index</a><div class="section"  id="sec-4.5">
<h2 class="sectiontitle">4.5  TeX Format</h2>


<a name="ugInOutTeX" class="label"/>


<p>Axiom can produce <span class="texlogo">TeX</span> output for your <span class="index">output formats:TeX
@{<span class="texlogo">TeX</span>}</span><a name="chapter-4-29"/> expressions.  <span class="index">TeX output format @{<span class="texlogo">TeX</span>} output format</span><a name="chapter-4-30"/>
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.
</p>


<p>To turn on <span class="texlogo">TeX</span> output formatting, issue this.
<span class="index">set output tex</span><a name="chapter-4-31"/>
</p>



<div id="spadComm4-11" class="spadComm" >
<form id="formComm4-11" action="javascript:makeRequest('4-11');" >
<input id="comm4-11" type="text" class="command" style="width: 12em;" value=")set output tex on" />
</form>
<span id="commSav4-11" class="commSav" >)set output tex on</span>
<div id="mathAns4-11" ></div>
</div>



<p>Here is an example of its output.
</p>



<div class="verbatim"><br />
matrix&nbsp;[&nbsp;[i*x**i&nbsp;+&nbsp;j*%i*y**j&nbsp;for&nbsp;i&nbsp;in&nbsp;1..2]&nbsp;for&nbsp;j&nbsp;in&nbsp;3..4]<br />
</div>




<div class="verbatim"><br />
\left[<br />
\begin{array}{cc}<br />
{{3&nbsp;&amp;nbsp;&nbsp;i&nbsp;&amp;nbsp;&nbsp;{y&nbsp;\sp&nbsp;3}}+x}&nbsp;&amp;&nbsp;<br />
{{3&nbsp;&amp;nbsp;&nbsp;i&nbsp;&amp;nbsp;&nbsp;{y&nbsp;\sp&nbsp;3}}+{2&nbsp;&amp;nbsp;&nbsp;{x&nbsp;\sp&nbsp;2}}}&nbsp;\&amp;nbsp;<br />
{{4&nbsp;&amp;nbsp;&nbsp;i&nbsp;&amp;nbsp;&nbsp;{y&nbsp;\sp&nbsp;4}}+x}&nbsp;&amp;&nbsp;<br />
{{4&nbsp;&amp;nbsp;&nbsp;i&nbsp;&amp;nbsp;&nbsp;{y&nbsp;\sp&nbsp;4}}+{2&nbsp;&amp;nbsp;&nbsp;{x&nbsp;\sp&nbsp;2}}}&nbsp;<br />
\end{array}<br />
\right]<br />
</div>




<p>This formats as
<math xmlns="&mathml;" mathsize="big" display="block"><mstyle><mrow><mo>[</mo><mtable><mtr><mtd><mrow><mrow><mn>3</mn><mspace width="0.5 em" /><mi>i</mi><mspace width="0.5 em" /><mrow><msup><mi>y</mi><mn>3</mn></msup></mrow></mrow><mo>+</mo><mi>x</mi></mrow></mtd><mtd><mrow><mrow><mn>3</mn><mspace width="0.5 em" /><mi>i</mi><mspace width="0.5 em" /><mrow><msup><mi>y</mi><mn>3</mn></msup></mrow></mrow><mo>+</mo><mrow><mn>2</mn><mspace width="0.5 em" /><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow></mrow></mrow></mtd></mtr><mtr><mtd><mrow><mrow><mn>4</mn><mspace width="0.5 em" /><mi>i</mi><mspace width="0.5 em" /><mrow><msup><mi>y</mi><mn>4</mn></msup></mrow></mrow><mo>+</mo><mi>x</mi></mrow></mtd><mtd><mrow><mrow><mn>4</mn><mspace width="0.5 em" /><mi>i</mi><mspace width="0.5 em" /><mrow><msup><mi>y</mi><mn>4</mn></msup></mrow></mrow><mo>+</mo><mrow><mn>2</mn><mspace width="0.5 em" /><mrow><msup><mi>x</mi><mn>2</mn></msup></mrow></mrow></mrow></mtd></mtr></mtable><mo>]</mo></mrow></mstyle></math>
</p>


<p>To turn <span class="texlogo">TeX</span> output formatting off, issue 
<span class="teletype">)set output tex off</span>.
The LaTeX macros in the output generated by Axiom
are all standard except for the following definitions:
</p>



<div class="verbatim"><br />
\def\csch{\mathop&nbsp;csch\nolimits}<br />
<br />
\def\erf{\mathop&nbsp;erf\nolimits}<br />
<br />
\def\zag#1#2{<br />
&nbsp;&nbsp;{{&nbsp;\left.&nbsp;{#1}&nbsp;\right|}<br />
&nbsp;&nbsp;&nbsp;\over<br />
&nbsp;&nbsp;&nbsp;{\left|&nbsp;{#2}&nbsp;\right.&nbsp;}<br />
&nbsp;&nbsp;}<br />
}<br />
</div>





</div><a href="book-contents.xhtml" style="margin-right: 10px;">Book Contents</a>
<a href="section-4.4.xhtml" style="margin-right: 10px;">Previous Section 4.4 Monospace Two-Dimensional Mathematical Format</a><a href="section-4.6.xhtml" style="margin-right: 10px;">Next Section 4.6 IBM Script Formula Format</a>
<a href="book-index.xhtml">Book Index</a></body>
</html>