MathGroup Archive 2002

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

Search the Archive

TeXForm and negative exponents

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

Hi all!

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


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.


 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...

 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!


  • 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