Re: TeXForm and custom LaTeX macros

*To*: mathgroup at smc.vnet.net*Subject*: [mg76192] Re: TeXForm and custom LaTeX macros*From*: Will Robertson <wspr81 at gmail.com>*Date*: Thu, 17 May 2007 06:10:03 -0400 (EDT)*References*: <f2emkm$2vn$1@smc.vnet.net>

On May 16, 7:32 pm, Will Robertson <wsp... at gmail.com> wrote: > > I'm not having much luck customising the output from TeXForm. I'm a > bit of a new user of Mathematica, I'm afraid. I've found a little more in the tutorial on using Format[], but the information it gives is wrong. Here's what it says: > In[11]:= Format[x, TeXForm] := "{\\bf x}" > > The output format for x that you specified is now used whenever the TeX form is needed. > > In[12]:= TeXForm[1 + x^2] > Out[12]//TeXForm= > x^2+1 First of all, the TeXForm[1+x^2] shows no difference in formatting than if the Format[] was omitted. Secondly, when we change the example as follows > In[6]:= TeXForm[x] > > Out[6]//TeXForm= > \text{$\{\backslash \backslash $bf x$\}$} This is clearly not the intention of the original Format[] (and still the same doubled \backslash, if you even wanted one in the first place). So I guess this whole thing isn't working as it's supposed to in version 6 (dunno about older versions). Will