MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

About TeXForm

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115052] About TeXForm
  • From: Themis Matsoukas <tmatsoukas at me.com>
  • Date: Wed, 29 Dec 2010 05:59:37 -0500 (EST)

Can someone explain the difference between the variations below? I am still on Mathematica 7.0 (mac).

The following produces proper latex code for a table including its headings:

XYZ = TableForm[
   {
    {1, 2},
    {3, 4},
    {4, 6}
    }, TableHeadings -> {{"1\[Rule]2", "2\[Rule]3", "1\[Rule]3"}, {"q", "w"}}
   ] // TeXForm


\begin{array}{lll}
  & q & w \\
 \text{1$\to $2} & 1 & 2 \\
 \text{2$\to $3} & 3 & 4 \\
 \text{1$\to $3} & 4 & 6
\end{array}


The following produces the latex code for the table without the table headings:

XYZ
% // TeXForm

\left(
\begin{array}{cc}
 1 & 2 \\
 3 & 4 \\
 4 & 6
\end{array}
\right)


The following produces output similar to the verbatim environment with all the latex commands turned into latex  text:

XYZ // TeXForm

\text{
$\backslash $begin$\{$array$\}\{$lll$\}$
  $\&$ q $\&$ w $\backslash \backslash $
 $\backslash $text$\{$1$\$\backslash $to $\$$2$\}$ $\&$ 1 $\&$ 2
   $\backslash \backslash $
 $\backslash $text$\{$2$\$\backslash $to $\$$3$\}$ $\&$ 3 $\&$ 4
   $\backslash \backslash $
 $\backslash $text$\{$1$\$\backslash $to $\$$3$\}$ $\&$ 4 $\&$ 6
$\backslash $end$\{$array$\}$
}

I would have expected all three variations to produce the same output.

Thanks

Themis


  • Prev by Date: Re: Wolfram free input shortcut is "cntrl =" What do we use for underscript now?
  • Next by Date: Re: Solve : missing elims in the Mathematica 8 version of the Mathematica 7 Solve[eqns,vars,elims]
  • Previous by thread: Re: Font problem under Linux
  • Next by thread: Re: About TeXForm