Services & ResourcesWolfram Forums
 MathGroup Archive
 2007 January February March April May June July August September October

TeXForm and custom LaTeX macros

• To: mathgroup at smc.vnet.net
• Subject: [mg76145] TeXForm and custom LaTeX macros
• From: Will Robertson <wspr81 at gmail.com>
• Date: Wed, 16 May 2007 05:54:31 -0400 (EDT)

Hello,

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 would like to be able to do something like this:
Format[dddot[x_], TeXForm] := "\dddot{" <> ToString[x] <> "}"
dddot[y] // TeXForm

and get output of
\dddot{y}

but obviously that doesn't happen. In fact, I don't even understand
the output of Mathematica at all (v6):
\text{$\backslash \backslash$dddot$\{$y$\}$}

Why are there *two* backslashes in there? I can see that it's trying
to get the "\dddot" printed literally in the TeX output, but that's
not very useful to me. Any suggestions would be greatly appreciated.