semilogx font problem

I am having a font problem with semilogx, usetex=true and

    > font.family:sans-serif. The xticks are using a serif font.
    > These lines are enough to recreate the problem on my
    > machine.

    > t=arange(0,1,0.01) y=sin(2*pi*t) figure(10) semilogx(t,y)
    > ylabel('Mag.') xlabel('Time (sec.)') savefig('test.png')

The basic problem here (I think) is that the LogFormatterMathtext is
using a math font to do exponential xtick formatting and a regular
text font to do the other text in the figure

class LogFormatterMathtext(LogFormatter):
...snip
        if not isDecade and self.labelOnlyBase: s = ''
        elif not isDecade:
            s = '$%d^{%.2f}$'% (b, fx)
        else:
            s = '$%d^{%d}$'% (b, self.nearest_long(fx))

        return s

Compare with this script, where the ylabel gets the math font as well

  import matplotlib
  matplotlib.use('Agg')
  matplotlib.rcParams['text.usetex'] = True
  from pylab import figure, savefig, nx
  t=nx.arange(0,1,0.01)
  y=nx.sin(2*nx.pi*t)
  fig = figure()
  ax = fig.add_subplot(111)
  ax.semilogx(t,y)
  ax.set_ylabel(r'$\exp{\frac{1}{2}}$')
  ax.set_xlabel('Time (sec.)')
  fig.savefig('test.png')

Not sure what the right fix is here... One option would for text.py
to treat all numbers as math if usetex is enabled (not recommending
here, just free associating)

  if usetex:
     try: float(self._text)
     except ValueError: pass
     else: self._text = '$%s$' % self._text

or something to that effect. Another would be to try and force the
font for the superscripts to be the same as the regular ticks.

I thought something like this might work:

        usetex = rcParams['text.usetex']
        if not isDecade and self.labelOnlyBase: s = ''
        elif not isDecade:
            if usetex: s = r'$\rm{%d^{%.2f}}$'% (b, fx)
            else: s = '$%d^{%.2f}$'% (b, fx)
        else:
            if usetex: s = r'$\rm{%d^{%d}}$'% (b, self.nearest_long(fx))
            else: s = r'$%d^{%d}$'% (b, self.nearest_long(fx))

but it didn't so there is something I am missing.

JDH