Services & Resources / Wolfram Forums
MathGroup Archive
*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

Re: TeXForm and negative exponents

  • To: mathgroup at
  • Subject: [mg32626] Re: TeXForm and negative exponents
  • From: Paul Abbott <paul at>
  • Date: Fri, 1 Feb 2002 02:02:27 -0500 (EST)
  • Organization: University of Western Australia
  • References: <a1gv2g$n6g$>
  • Sender: owner-wri-mathgroup at

Jens Dreger <jens.dreger at> wrote:

> Example:
>  In[1]:= TeXForm[1/(1 + 2 Exp[-3 t])]
>  Out[1]:= \frac{1}{1 + \frac{2}{e^{3\,t}}}
> ....
> The output I want is:
>  \frac{1}{1 + 2 e^{-3 t}}

Here is one way:

In[1]:= Unprotect[Times]

Out[1]= {Times}

In[2]:= Format[a_*E^(b_),TeXForm]:= a HoldForm[e^b]

In[3]:= Protect[Times]

Out[3]= {Times}

In[4]:= TeXForm[1/(1 + 2 Exp[-3 t])]

Out[4]//TeXForm= \frac{1}{1 + 2\,e^{-3\,t}}


Paul Abbott                                   Phone: +61-8-9380-2734
Department of Physics                           Fax: +61-8-9380-1014
The University of Western Australia      (CRICOS Provider No 00126G)         
35 Stirling Highway
Crawley WA 6009                      mailto:paul at 

            God IS a weakly left-handed dice player

  • Prev by Date: Re: Keeping order with Union
  • Next by Date: Re: help: recursive functions
  • Previous by thread: Re: Keeping order with Union
  • Next by thread: Re: finding independent variable groups