Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2002
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

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

Search the Archive

TeXForm and negative exponents

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32239] TeXForm and negative exponents
  • From: Jens Dreger <jens.dreger at physik.fu-berlin.de>
  • Date: Wed, 9 Jan 2002 03:17:34 -0500 (EST)
  • Organization: Freie Universitaet Berlin
  • Sender: owner-wri-mathgroup at wolfram.com

Hi all!

I want to save some expressions in TeX-format like so:

  Put[TeXForm[expr],file]

where expr contains exponentials with negative exponents
which I want to show up in the output as _negative_.
For some reason, Mathematica always "simplifies" the
expression so it only contains positive exponents.

Example:

 In[1]:= TeXForm[1/(1 + 2 Exp[-3 t])]
 Out[1]:= \frac{1}{1 + \frac{2}{e^{3\,t}}}

Ok, so I thought, HoldForm might help:

 In[2]:= TeXForm[HoldForm[(1 + 2 Exp[-3 t] )]]
 Out[2]:= 1 + 2\,\exp (-3\,t)

Great, only my expression does not contain Exp[], but
the 2d form. In that case, HoldForm does not seem to do
the trick...

                                1
 In[3]:= TeXForm[HoldForm[--------------]
                          (1+2 e^{-3 t})

 Out[3]:= \frac{1}{1 + \frac{2}{e^{3\,t}}}

The output I want is:

 \frac{1}{1 + 2 e^{-3 t}}

Wrapping StandardForm around expr does seem to help,
but then the TeX-Output contains all kinds of special
commands, which I don't want. In this small example
it's ok, but not on the large expressions.

Is there an easy way, to get TeXFrom to do what I intend?

Thanks a lot in advance!

Jens.


  • Prev by Date: Closing a dialogue box with Mathematica
  • Next by Date: Holding Arguments in a Second Argument List
  • Previous by thread: Re: Closing a dialogue box with Mathematica
  • Next by thread: Re: TeXForm and negative exponents