axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] TeX help


From: William Sit
Subject: Re: [Axiom-developer] TeX help
Date: Sat, 06 Sep 2003 15:30:10 -0400

Tim:
  
If you are not concerned with the general line break algorithm in TeX output in
Axiom, there are a number of ways to typeset the expression you gave, on several
lines.  One such is given below.

However, it in unreasonable to expect any TeX output (from Axiom or otherwise)
to include a line breaking algorithm. Even though I believe Axiom uses such an
algorithm in its text mode display of long expressions (as do Maple, and
Mathematica), this is made possible (and desirable) only because the programs
have the information on font metric and screen display dimensions. So in
principle, when the TeX expression is generated, the difficulty is not the
algorithm, but rather the parameters needed to run the algorithm because font
metric and display space or page dimensions are not available at the time.

So the logical place to use the algorithm is at TeX compile time. But LaTeX does
not perform line break analysis in math mode as far as I know -- or at best it
performs minimal analysis so that when not in display mode, it breaks an in-line
expression at places such as the equal sign of an equation expression, or the
comma within a list. In Lamport's user's guide, p. 50, he explicitly
states:"Breaking a single formula across lines in this way is visual formatting,
and I wish LaTeX could do it for you. However, doing it well requires more
intelligence than LaTeX has, and doing it poorly can make the formula hard to
understand, so you must do it yourself."

Unfortunately, manually editing these output is very problematical because of
the superfluous parentheses and extra/lack of spacings. Moreover, in order to
break the line, many left parentheses will be left dangling before the line
break, causing the TeX compiler to stop if the quiet flag is not set. In the
following, quiet (or batch mode) should be used. This is not a problem if the
goal is just some hardcopy or screen viewing, but may be a problem in some
automated systems.

\begin{eqnarray*}
&\displaystyle{{1
\over {{18} \  {a \sp 2} \  {x \sp 2} \  {\sqrt {3}} \
{\root {3} \of {a}} }} \cdot
\biggl(
{-{2 \  {b \sp 2} \  {x \sp 2} \  {\sqrt {3}} \  {\log
\left(
{{{{\root {3} \of {a}} \  {{\root {3} \of {{{b \  x}+a}}} \sp
2}}+{{{\root
{3} \of {a}} \sp 2} \  {\root {3} \of {{{b \  x}+a}}}}+a}}
\right)}}+&\\
&{4 \  {b \sp 2} \  {x \sp 2} \  {\sqrt {3}} \  {\log
\left(
{{{{{\root {3} \of {a}} \sp 2} \  {\root {3} \of {{{b \  x}+a}}}} -a}}
\right)}}+&\\&{{12}
\  {b \sp 2} \  {x \sp 2} \  {\arctan
\left(
{{{{2 \  {\sqrt {3}} \  {{\root {3} \of {a}} \sp 2} \  {\root {3} \of
{{{b \
x}+a}}}}+{a \  {\sqrt {3}}}} \over {3 \  a}}}
\right)}}+&\\&{{\left(
{{12} \  b \  x} -{9 \  a}
\right)}
\  {\sqrt {3}} \  {\root {3} \of {a}} \  {{\root {3} \of {{{b \
x}+a}}} \sp
2}}}
\biggr)&}
\end{eqnarray*}


William




reply via email to

[Prev in Thread] Current Thread [Next in Thread]